- BC Break ?
- Parameter injection in v2.x ?
- min
- MinPackage (router + resource + json)
<?php | |
use Ray\Di\ProviderInterface; | |
use Ray\Di\Di\Inject; | |
interface CarInterface{} | |
interface CarConfigInterface{} | |
class CarConfig extends \ArrayObject implements CarConfigInterface{} |
// original | |
$this['events'] = $this->resource->get->uri('app://spout/resources/listing') | |
->withQuery([ | |
'type' => 'event', | |
'sort' => 'datetime' | |
]) | |
->eager | |
->request()['resources']; | |
// link |
/** | |
* @param string|Uri $uri | |
* @param array $query | |
* | |
* @return callable | |
*/ | |
function resource($uri, array $query) | |
{ | |
$resource = (new Injector(new AppModule, __DIR__ . '/tmp'))->getInstance(ResourceInterface::class); | |
$request = $resource->get->uri($uri)->withQuery($query)->eager->request(); |
Aura v2 https://github.com/auraphp/Aura.Router/blob/d50ad32e20409bd7fc8522dc81bf220b35c974aa/src/Router.php | |
public function match($path, array $server = array()) | |
Symfony http://api.symfony.com/2.0/Symfony/Component/Routing/RouterInterface.html | |
public array match(string $pathinfo); | |
ZF2 http://framework.zend.com/manual/current/en/modules/zend.mvc.routing.html | |
public function match(Request $request); | |
PHP-Router https://github.com/dannyvankooten/PHP-Router/blob/master/src/PHPRouter/Router.php#L72 |
<?php | |
namespace Ray\Di; | |
use Ray\Aop\Compiler; | |
use Ray\Aop\Matcher; | |
use Ray\Aop\Pointcut; | |
use Ray\Aop\WeavedInterface; | |
class DependencyCompilerTest extends \PHPUnit_Framework_TestCase |
curl -s http://php-osx.liip.ch/install.sh | bash -s 7.x
# macports | |
export PATH="/opt/local/bin:/opt/local/sbin:$PATH" | |
# PHP | |
export PATH="/usr/local/php5/bin:$PATH" | |
# mysql | |
export PATH="/usr/local/mysql/bin/:$PATH" | |
# composer | |
export PATH="$HOME/.composer/vendor/bin:$PATH" | |
# npm | |
export PATH="./node_modules/.bin:$PATH" |
<!doctype html> | |
<html> | |
<head> | |
<title>React page</title> | |
<!-- css and stuff --> | |
</head> | |
<body> | |
<!-- render server content here --> |