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
'Request\Value\Factory' => Aura\Web\Request\Accept\Value\ValueFactory::class, | |
'Request' => new Service( | |
Application\Request\Request::class, | |
[ | |
new Service(Aura\Web\Request\Client::class, [$_SERVER]), | |
new Service(Aura\Web\Request\Content::class, [$_SERVER]), | |
new Service( | |
Aura\Web\Request\Globals::class, | |
[ | |
new Service(Aura\Web\Request\Values::class, [$_COOKIE]), |
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
<?php | |
namespace Framework\Application; | |
use Framework\Config\Configuration; | |
use Duality\Core\DualityException; | |
use Duality\Core\Container; | |
use Duality\Structure\Storage; | |
use Duality\Structure\File\StreamFile; |
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
<?php | |
namespace Micro; | |
use Framework\Route\Definition\Builder\Builder; | |
use Framework\Route\Definition\Definition; | |
use Framework\Service\Config\Router\Router; | |
class Micro | |
implements MicroApplication |
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
<?php | |
/** | |
* | |
*/ | |
use Blog\Blog; | |
use Framework\Application\App; | |
use Framework\View\Manager\ViewManager; | |
use Request\Request; | |
use Response\Response; |
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
<?php | |
/** | |
* @param string $name | |
* @param array $args | |
* @return object | |
*/ | |
protected function newInstanceArgs($name, array $args = []) | |
{ | |
$class = new ReflectionClass($name); |
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
//http://slimerjs.org/ | |
var page = require('webpage').create(); | |
page.viewportSize = { width:1280, height:800 }; | |
page.open('http://localhost/phpmetrics.html') | |
.then(function(){ | |
window.setTimeout(function() { |
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
<?php | |
class MyService { | |
protected $request; | |
function __construct($request) | |
{ | |
$this->request = $request; | |
} |
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
sed -i 's/\-i \-a \-n php5 libphp5\.la/\-i \-n php5 libphp5\.la/g' Makefile |
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
$config = [ | |
'alias' => [], | |
'events' => ['Mvc' => [function($route, $request) { var_dump($route, $request); }]], | |
'services' => [ | |
'Response' => new Response\HttpResponse, | |
'Route' => new RouteConfig([ | |
'hostname' => 'localhost', | |
'method' => 'GET', | |
'path' => '/', | |
'scheme' => 'http' |
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
protected function hydrate(Config $config, $service) | |
{ | |
foreach($config->calls() as $method => $value) { | |
if (is_string($method)) { | |
if (Args::PROPERTY == $method[0]) { | |
$service->{substr($method, 1)} = $this->resolve($value); | |
continue; | |
} | |
$service->$method($this->resolve($value)); |
OlderNewer