예제 #1
0
 /**
  * @param array $params
  * @param string $method
  * @return \Nette\Application\IResponse
  */
 public static function request(array $params = array(), $method = \Nette\Http\Request::GET)
 {
     $request = new \Nette\Application\Request('Test', $method, $params);
     $response = self::$presenter->run($request);
     self::$grid = self::$presenter[self::GRID_NAME];
     return $response;
 }
예제 #2
0
파일: test.link.php 프로젝트: vrana/nette
        $uri = $this->mycontrol->link('this?x=1&round=1#frag');
        echo "3.12 {$uri}\n\n";
        $uri = $this->mycontrol->link('//this?x=1&round=1#frag');
        echo "3.13 {$uri}\n\n";
    }
    /**
     * @view: default
     */
    public function handleBuy($x = 1, $y = 1)
    {
    }
}
class OtherPresenter extends TestPresenter
{
}
class Submodule_OtherPresenter extends TestPresenter
{
}
Environment::setVariable('appDir', dirname(__FILE__));
$httpRequest = Environment::getHttpRequest();
$uri = clone $httpRequest->getUri();
$uri->scriptPath = '/index.php';
$uri->host = 'localhost';
$httpRequest->setUri($uri);
$application = Environment::getApplication();
$application->setRouter(new SimpleRouter());
$request = new PresenterRequest('Test', HttpRequest::GET, array());
TestPresenter::$invalidLinkMode = TestPresenter::INVALID_LINK_WARNING;
$presenter = new TestPresenter($request);
$presenter->autoCanonicalize = FALSE;
$presenter->run();
예제 #3
0
파일: test.link.php 프로젝트: vlki/nette
        $uri = $this->mycontrol->link('this?x=1&round=1#frag');
        echo "3.12 {$uri}\n\n";
        $uri = $this->mycontrol->link('//this?x=1&round=1#frag');
        echo "3.13 {$uri}\n\n";
    }
    /**
     * @view: default
     */
    public function handleBuy($x = 1, $y = 1)
    {
    }
}
class OtherPresenter extends TestPresenter
{
}
class Submodule_OtherPresenter extends TestPresenter
{
}
Environment::setVariable('appDir', dirname(__FILE__));
$httpRequest = Environment::getHttpRequest();
$uri = clone $httpRequest->getUri();
$uri->scriptPath = '/index.php';
$uri->host = 'localhost';
$httpRequest->setUri($uri);
$application = Environment::getApplication();
$application->setRouter(new SimpleRouter());
$request = new PresenterRequest('Test', HttpRequest::GET, array());
TestPresenter::$invalidLinkMode = TestPresenter::INVALID_LINK_WARNING;
$presenter = new TestPresenter();
$presenter->autoCanonicalize = FALSE;
$presenter->run($request);