-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit d15f878
Showing
14 changed files
with
463 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
coverage_clover: build/logs/clover.xml | ||
json_path: build/logs/coveralls-upload.json | ||
service_name: travis-ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
language: php | ||
|
||
php: | ||
- '5.5' | ||
- '5.6' | ||
- '7' | ||
|
||
before_install: | ||
- composer self-update | ||
- composer require phpunit/phpunit:4.8.* satooshi/php-coveralls:dev-master | ||
- composer install | ||
|
||
script: | ||
- mkdir -p build/logs | ||
- phpunit --configuration phpunit.xml.dist --coverage-clover build/logs/clover.xml | ||
|
||
after_success: | ||
- php vendor/bin/coveralls | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Copyright (c) 2015-2016 Damon Smith | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is furnished | ||
to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Easy System MVC | ||
=============== | ||
The package provides MVC layer interfaces. | ||
|
||
[![Build Status](https://travis-ci.org/easy-system/es-mvc.svg?branch=master)](https://travis-ci.org/easy-system/es-mvc) | ||
[![Coverage Status](https://coveralls.io/repos/github/easy-system/es-mvc/badge.svg?branch=master)](https://coveralls.io/github/easy-system/es-mvc?branch=master) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"name": "easy-system/es-mvc", | ||
"description": "Easy System MVC", | ||
"authors": [ | ||
{ | ||
"name": "Damon Smith", | ||
"email": "damon.easy.system@gmail.com" | ||
} | ||
], | ||
"require": { | ||
"php": "^5.5 || ^7.0", | ||
"easy-system/es-component": "*", | ||
"easy-system/es-container": "*", | ||
"easy-system/es-services": "*" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Es\\Mvc\\": "src/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { "Es\\Mvc\\Test\\": "test/" } | ||
}, | ||
"minimum-stability": "dev" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.1/phpunit.xsd" | ||
bootstrap="test/bootstrap.php" | ||
colors="true" | ||
stopOnSkipped="false" | ||
verbose = "true" | ||
> | ||
<testsuites> | ||
<testsuite name="Easy System - Mvc Test Suite"> | ||
<directory>test</directory> | ||
</testsuite> | ||
</testsuites> | ||
<filter> | ||
<whitelist> | ||
<directory>src</directory> | ||
</whitelist> | ||
</filter> | ||
</phpunit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
/** | ||
* This file is part of the "Easy System" package. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
* | ||
* @author Damon Smith <damon.easy.system@gmail.com> | ||
*/ | ||
namespace Es\Mvc; | ||
|
||
use Es\Component\ComponentInterface; | ||
|
||
/** | ||
* The system component. | ||
*/ | ||
class Component implements ComponentInterface | ||
{ | ||
/** | ||
* The current version of component. | ||
* | ||
* @var string | ||
*/ | ||
protected $version = '0.1.0'; | ||
|
||
/** | ||
* Gets the current version of component. | ||
* | ||
* @return string The version of component | ||
*/ | ||
public function getVersion() | ||
{ | ||
return $this->version; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
/** | ||
* This file is part of the "Easy System" package. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
* | ||
* @author Damon Smith <damon.easy.system@gmail.com> | ||
*/ | ||
namespace Es\Mvc; | ||
|
||
use Es\Services\ServiceLocatorInterface; | ||
|
||
/** | ||
* The interface for the Collection of controller plugins. | ||
*/ | ||
interface ControllerPluginsInterface extends ServiceLocatorInterface | ||
{ | ||
/** | ||
* Gets the plugin and sets its options. | ||
* | ||
* @param string $name The plugin name | ||
* @param array $options Optional; the plugin options | ||
* | ||
* @return mixed The requested plugin | ||
*/ | ||
public function getPlugin($name, array $options = []); | ||
|
||
/** | ||
* Merges with other plugins. | ||
* | ||
* @param ControllerPluginsInterface $source The data source | ||
* | ||
* @return self | ||
*/ | ||
public function merge(ControllerPluginsInterface $source); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
/** | ||
* This file is part of the "Easy System" package. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
* | ||
* @author Damon Smith <damon.easy.system@gmail.com> | ||
*/ | ||
namespace Es\Mvc; | ||
|
||
use Es\Services\ServiceLocatorInterface; | ||
|
||
/** | ||
* The interface for the Collection of controllers. | ||
*/ | ||
interface ControllersInterface extends ServiceLocatorInterface | ||
{ | ||
/** | ||
* Merges with other controllers. | ||
* | ||
* @param ControllersInterface $source The data source | ||
* | ||
* @return self | ||
*/ | ||
public function merge(ControllersInterface $source); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
/** | ||
* This file is part of the "Easy System" package. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
* | ||
* @author Damon Smith <damon.easy.system@gmail.com> | ||
*/ | ||
namespace Es\Mvc; | ||
|
||
use Es\Services\ServiceLocatorInterface; | ||
|
||
/** | ||
* The interface for the Collection of models. | ||
* | ||
* The model can be any data source that you want (including the presentation | ||
* of data using a database). | ||
*/ | ||
interface ModelsInterface extends ServiceLocatorInterface | ||
{ | ||
/** | ||
* Merges with other models. | ||
* | ||
* @param ModelsInterface $source The data source | ||
* | ||
* @return self | ||
*/ | ||
public function merge(ModelsInterface $source); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
/** | ||
* This file is part of the "Easy System" package. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
* | ||
* @author Damon Smith <damon.easy.system@gmail.com> | ||
*/ | ||
namespace Es\Mvc; | ||
|
||
use Es\Services\ServiceLocatorInterface; | ||
|
||
/** | ||
* The interface for the Collection of view helpers. | ||
*/ | ||
interface ViewHelpersInterface extends ServiceLocatorInterface | ||
{ | ||
/** | ||
* Gets the helper and sets its options. | ||
* | ||
* @param string $name The helper name | ||
* @param array $options Optional; the helper options | ||
* | ||
* @return mixed The requested helper | ||
*/ | ||
public function getHelper($name, array $options = []); | ||
|
||
/** | ||
* Merges with other view helpers. | ||
* | ||
* @param ViewHelpersInterface $source The data source | ||
* | ||
* @return self | ||
*/ | ||
public function merge(ViewHelpersInterface $source); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
/** | ||
* This file is part of the "Easy System" package. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
* | ||
* @author Damon Smith <damon.easy.system@gmail.com> | ||
*/ | ||
namespace Es\Mvc; | ||
|
||
/** | ||
* The representation of View. | ||
*/ | ||
interface ViewInterface | ||
{ | ||
/** | ||
* Sets the layout. | ||
* | ||
* @param ViewModelInterface $layout The layout | ||
*/ | ||
public function setLayout(ViewModelInterface $layout); | ||
|
||
/** | ||
* Gets the layout. | ||
* | ||
* @return ViewModelInterface The layout | ||
*/ | ||
public function getLayout(); | ||
|
||
/** | ||
* Renders the model. | ||
* | ||
* @param ViewModelInterface $model The view model | ||
* | ||
* @return string Returns the result of rendering | ||
*/ | ||
public function render(ViewModelInterface $model); | ||
} |
Oops, something went wrong.