Created
May 21, 2010 02:53
-
-
Save riaf/408395 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 HogeController | |
{ | |
public function index($b) { | |
return $b->provide('fuga'); | |
// return $this->phpt('index'); | |
} | |
} | |
use blanka\Router, | |
blanka\response\Ok, | |
blanka\container\ContainerBuilder, | |
blanka\plugin\PHPTemplate; | |
$cb = new ContainerBuilder; | |
$cb->bind('fuga')->toValue('xxx'); | |
$cb->bind('controller')->to('HogeController'); | |
Blanka::app($cb->build()) | |
->load(new PHPTemplate(__DIR__. '/templates', 'html')) | |
->respond(Router::it() | |
->{'/ :index'}('@controller::index') | |
->{'/test :test'}(function($b) { | |
return $b->provide('fuga'); | |
}) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment