Last active
August 29, 2015 14:08
-
-
Save devosc/a731cf699b7b0e371d34 to your computer and use it in GitHub Desktop.
Call 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 | |
/** | |
* | |
*/ | |
use Blog\Blog; | |
use Framework\Application\App; | |
use Framework\View\Manager\ViewManager; | |
use Request\Request; | |
use Response\Response; | |
/** | |
* | |
*/ | |
include __DIR__ . '/../init.php'; | |
/** | |
* | |
*/ | |
class Controller | |
{ | |
protected $blog; | |
function valid(Request $request, $strict) | |
{ | |
var_dump($strict); | |
return $this; | |
} | |
function add(Response $response, $date_created) | |
{ | |
var_dump($date_created); | |
$this->blog = new Blog; | |
return $this; | |
} | |
function response(ViewManager $vm, Response $response, $args) | |
{ | |
var_dump($this->blog, $args); | |
return $response; | |
} | |
} | |
/** | |
* | |
*/ | |
$web = new App(include __DIR__ . '/../config/web.php'); | |
$response = $web->call( | |
'Controller.valid.add.response', | |
['date_created' => time(), 'strict' => true] | |
); | |
var_dump($response instanceof Response); |
Author
devosc
commented
Oct 30, 2014
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment