Minimal width is 2
File: D:\...\examples\fifteen\app\components\FifteenControl.php Line: 125
Line 118: }
Line 119:
Line 120:
Line 121:
Line 122: public function render()
Line 123: {
Line 124: if ($this->width < 2) {
Line 125: trigger_error('Minimal width is 2', E_USER_ERROR);
Line 126: }
Line 127: $template = $this->template;
Line 128: $template->setFile(dirname(__FILE__) . '/FifteenControl.phtml');
Line 129: $template->registerFilter(/*Nette\Application\*/'TemplateFilters::curlyBrackets');
Line 130: $template->width = $this->width;
Line 131: $template->order = $this->order;
Line 132: $template->useAjax = $this->useAjax;
components/FifteenControl.php (125) source ▶ trigger_error (arguments ▶)
| #0 | string(18) "Minimal width is 2"
|
| #1 | int(256)
|
Line 118: }
Line 119:
Line 120:
Line 121:
Line 122: public function render()
Line 123: {
Line 124: if ($this->width < 2) {
Line 125: trigger_error('Minimal width is 2', E_USER_ERROR);
Line 126: }
Line 127: $template = $this->template;
Line 128: $template->setFile(dirname(__FILE__) . '/FifteenControl.phtml');
Line 129: $template->registerFilter(/*Nette\Application\*/'TemplateFilters::curlyBrackets');
Line 130: $template->width = $this->width;
Line 131: $template->order = $this->order;
Line 132: $template->useAjax = $this->useAjax;
temp/cache-Nette.Template%0095c31fd33e6a57c9214259e750f2fe90.Default.default.phtml (28) source ▶ FifteenControl-> render ()
Line 21: <?php if ($component->beginPartial("round")): ?><p>Round #<?php echo $template->escape($fifteen->round + 1) ?></p><?php $component->endPartial("round"); endif; ?>
Line 22:
Line 23: <?php if ($component->beginPartial("flash")): ?><?php if (isset($flash)): ?><h2><?php echo $template->escape($flash) ?></h2><?php endif ?><?php $component->endPartial("flash"); endif; ?>
Line 24:
Line 25: <p><a href="<?php echo $template->escape($fifteen->link('shuffle')) ?>" onclick="<?php echo $template->escape($fifteen->ajaxLink(NULL)) ?>">Shuffle!</a></p>
Line 26:
Line 27: <div>
Line 28: <?php $fifteen->render() ?>
Line 29: </div>
Line 30:
Line 31: <img id="spinner" src="images/spinner.gif" alt="Wait please..." width="14" height="14">
Line 32: </body>
Line 33: </html>
Templates/TemplateFilters.php (66) source ▶ include (arguments ▶)
| #0 | string(123) "D:\...\examples\fifteen\app\temp\cache-Nette.Template%0095c31fd33e6a57c9214259e750f2fe90.Default.default.phtml"
|
Line 59: * @param string (hidden)
Line 60: * @return string
Line 61: */
Line 62: public static function phpEvaluation(Template $template/*, $content, $isFile*/)
Line 63: {
Line 64: extract($template->getParams(), EXTR_SKIP); // skip $this & $template
Line 65: if (func_num_args() > 2 && func_get_arg(2)) {
Line 66: include func_get_arg(1);
Line 67: } else {
Line 68: eval('?>' . func_get_arg(1));
Line 69: }
Line 70: }
Line 71:
Line 72:
Line 73:
Templates/Template.php (215) source ▶ TemplateFilters:: phpEvaluation (arguments ▶)
| $template | object(Template) (4) { "warnOnUndefined" => bool(TRUE) "file" private => string(89) "D:\...\examples\fifteen\document_root/../app/templates/Default.default.phtml" "params" private => array(4) { "component" => object(DefaultPresenter) (28) { "fifteen" => object(FifteenControl) (17) { ... } "autoCanonicalize" => bool(FALSE) "useLayoutTemplate" => bool(TRUE) "request" private => object(PresenterRequest) (5) { ... } "phase" private => int(4) "globalComponents" private => array(2) { ... } "globalParams" private => array(2) { ... } "view" private => string(7) "default" "scene" private => string(7) "default" "ajaxDriver" private => object(AjaxDriver) (1) { ... } "signalReceiver" private => string(4) "game" "signal" private => string(5) "click" "renderFinished" private => bool(TRUE) "partialMode" private => bool(FALSE) "router" private => object(MultiRouter) (1) { ... } "presenterLoader" private => object(PresenterLoader) (2) { ... } "httpRequest" private => object(HttpRequest) (7) { ... } "template" private => object(Template) (4) { *RECURSION* } "invalidPartials" private => array(1) { ... } "beginedPartials" private => array(0) { ... } "hasInvalidChild" private => NULL "params" protected => array(2) { ... } "components" private => array(1) { ... } "cloning" private => bool(FALSE) "serviceLocator" private => object(ServiceLocator) (3) { ... } "parent" private => NULL "name" private => NULL "lookupCache" private => array(1) { ... } } "presenter" => object(DefaultPresenter) (28) { "fifteen" => object(FifteenControl) (17) { ... } "autoCanonicalize" => bool(FALSE) "useLayoutTemplate" => bool(TRUE) "request" private => object(PresenterRequest) (5) { ... } "phase" private => int(4) "globalComponents" private => array(2) { ... } "globalParams" private => array(2) { ... } "view" private => string(7) "default" "scene" private => string(7) "default" "ajaxDriver" private => object(AjaxDriver) (1) { ... } "signalReceiver" private => string(4) "game" "signal" private => string(5) "click" "renderFinished" private => bool(TRUE) "partialMode" private => bool(FALSE) "router" private => object(MultiRouter) (1) { ... } "presenterLoader" private => object(PresenterLoader) (2) { ... } "httpRequest" private => object(HttpRequest) (7) { ... } "template" private => object(Template) (4) { *RECURSION* } "invalidPartials" private => array(1) { ... } "beginedPartials" private => array(0) { ... } "hasInvalidChild" private => NULL "params" protected => array(2) { ... } "components" private => array(1) { ... } "cloning" private => bool(FALSE) "serviceLocator" private => object(ServiceLocator) (3) { ... } "parent" private => NULL "name" private => NULL "lookupCache" private => array(1) { ... } } "baseUri" => string(45) "/nette/_trunk/examples/fifteen/document_root/" "fifteen" => object(FifteenControl) (17) { "width" protected => int(4) "onAfterClick" => NULL "onGameOver" => array(1) { ... } "order" => array(16) { ... } "round" => int(1) "useAjax" => bool(TRUE) "template" private => NULL "invalidPartials" private => array(0) { ... } "beginedPartials" private => array(0) { ... } "hasInvalidChild" private => NULL "params" protected => array(2) { ... } "components" private => array(0) { ... } "cloning" private => bool(FALSE) "serviceLocator" private => NULL "parent" private => object(DefaultPresenter) (28) { ... } "name" private => string(4) "game" "lookupCache" private => array(1) { ... } } } "filters" private => array(1) { 0 => string(30) "TemplateFilters::curlyBrackets" } } |
| #1 | string(140) "D:\...\examples\fifteen\document_root/../app/temp/cache-Nette.Template%0095c31fd33e6a57c9214259e750f2fe90.Default.default.phtml"
|
| #2 | bool(TRUE)
|
Line 208: // rendering
Line 209: try {
Line 210: self::$livelock[$this->file] = TRUE;
Line 211: $res = NULL;
Line 212: if ($return) {
Line 213: ob_start();
Line 214: }
Line 215: TemplateFilters::phpEvaluation($this, $content, $isFile);
Line 216: if ($return) {
Line 217: $res = ob_get_clean();
Line 218: }
Line 219:
Line 220: } catch (Exception $e) {
Line 221: if ($return) {
Line 222: ob_end_clean();
Application/Presenter.php (422) source ▶ Template-> render ()
Line 415:
Line 416: if (!$hasContent) {
Line 417: throw new BadRequestException("Page not found. Missing template '$file'.");
Line 418: }
Line 419: }
Line 420:
Line 421: $this->renderFinished();
Line 422: $template->render();
Line 423:
Line 424: // TODO: better, no in partial mode ajax
Line 425: $httpResponse = Environment::getHttpResponse();
Line 426: if ($httpResponse instanceof /*Nette::Web::*/HttpResponse) {
Line 427: $httpResponse->fixIE();
Line 428: }
Line 429: }
Application/Presenter.php (197) source ▶ Presenter-> renderTemplate ()
Line 190: }
Line 191:
Line 192: $this->beforeRender();
Line 193: // calls $this->render{scene}();
Line 194: $this->tryCall($this->formatRenderMethod($this->getScene()), $this->params);
Line 195:
Line 196: if (!$this->isRenderFinished()) {
Line 197: $this->renderTemplate();
Line 198: }
Line 199:
Line 200: if ($this->isPartialMode()) {
Line 201: $this->finishPartialMode();
Line 202: }
Line 203:
Line 204: } catch (AbortException $e) {
Application/Application.php (158) source ▶ Presenter-> run (arguments ▶)
| $request | object(PresenterRequest) (5) { "source" private => string(3) "GET" "name" private => string(7) "Default" "params" private => object(Hashtable) (4) { "do" => string(10) "game-click" "game-y" => string(1) "1" "game-order" => string(37) "0.1.2.3.4.5.6.7.8.9.10.11.12.13.14.15" "view" => string(7) "default" } "post" private => object(Hashtable) (0) { } "files" private => object(Hashtable) (0) { } } |
Line 151: }
Line 152: $this->presenter = new $class;
Line 153:
Line 154: // Instantiate topmost service locator
Line 155: $this->presenter->setServiceLocator(new /*Nette::*/ServiceLocator($this->serviceLocator));
Line 156:
Line 157: // Execute presenter
Line 158: $this->presenter->run($request);
Line 159: break;
Line 160:
Line 161: } catch (ForwardingException $e) {
Line 162: // not error, presenter forwards to new request
Line 163: $request = $e->getRequest();
Line 164:
Line 165: } catch (AbortException $e) {
app/bootstrap.php (32) source ▶ Application-> run ()
Line 25:
Line 26:
Line 27:
Line 28: /**
Line 29: * Run!
Line 30: */
Line 31: $application = Environment::getApplication();
Line 32: $application->run();
Line 33:
document_root/index.php (10) source ▶ require (arguments ▶)
| #0 | string(54) "D:\...\examples\fifteen\app\bootstrap.php"
|
Line 3: // absolute filesystem path to the web root
Line 4: define('WWW_DIR', dirname(__FILE__));
Line 5:
Line 6: // absolute filesystem path to the application root
Line 7: define('APP_DIR', WWW_DIR . '/../app');
Line 8:
Line 9: // load bootstrap file
Line 10: require APP_DIR . '/bootstrap.php';
Line 11:
| WWW_DIR | string(50) "D:\...\examples\fifteen\document_root"
|
| APP_DIR | string(57) "D:\...\examples\fifteen\document_root/../app"
|
| E_DEPRECATED | int(8192)
|
| __DIR__ | string(25) "D:\...\Nette"
|
| D:\...\examples\fifteen\document_root\index.php |
| D:\...\examples\fifteen\app\bootstrap.php |
| D:\...\Nette\loader.php |
| D:\...\Nette\Loaders\NetteLoader.php |
| D:\...\Nette\Loaders\AutoLoader.php |
| D:\...\Nette\Object.php |
| D:\...\Nette\exceptions.php |
| D:\...\Nette\Debug.php |
| D:\...\Nette\Version.php |
| D:\...\Nette\Environment.php |
| D:\...\Nette\ServiceLocator.php |
| D:\...\Nette\IServiceLocator.php |
| D:\...\Nette\Application\Application.php |
| D:\...\Nette\Web\HttpRequest.php |
| D:\...\Nette\Web\IHttpRequest.php |
| D:\...\Nette\Web\HttpResponse.php |
| D:\...\Nette\Web\IHttpResponse.php |
| D:\...\Nette\Web\Uri.php |
| D:\...\Nette\Application\MultiRouter.php |
| D:\...\Nette\Application\IRouter.php |
| D:\...\Nette\Collections\ArrayList.php |
| D:\...\Nette\Collections\Collection.php |
| D:\...\Nette\Collections\ICollection.php |
| D:\...\Nette\Collections\IList.php |
| D:\...\Nette\Application\SimpleRouter.php |
| D:\...\Nette\Collections\Hashtable.php |
| D:\...\Nette\Collections\IMap.php |
| D:\...\Nette\Application\PresenterRequest.php |
| D:\...\Nette\Application\PresenterLoader.php |
| D:\...\Nette\Application\IPresenterLoader.php |
| D:\...\examples\fifteen\app\presenters\DefaultPresenter.php |
| D:\...\Nette\Application\Presenter.php |
| D:\...\Nette\Application\Control.php |
| D:\...\Nette\Application\PresenterComponent.php |
| D:\...\Nette\ComponentContainer.php |
| D:\...\Nette\Component.php |
| D:\...\Nette\IComponent.php |
| D:\...\Nette\IComponentContainer.php |
| D:\...\Nette\Application\ISignalReceiver.php |
| D:\...\Nette\Application\IStatePersistent.php |
| D:\...\Nette\Application\IPresenter.php |
| D:\...\Nette\Application\PresenterHelpers.php |
| D:\...\examples\fifteen\app\components\FifteenControl.php |
| D:\...\Nette\Templates\Template.php |
| D:\...\Nette\Templates\ITemplate.php |
| D:\...\Nette\Caching\Cache.php |
| D:\...\Nette\Templates\TemplateStorage.php |
| D:\...\Nette\Caching\FileStorage.php |
| D:\...\Nette\Caching\ICacheStorage.php |
| D:\...\Nette\Configurator.php |
| D:\...\Nette\Templates\TemplateFilters.php |
| D:\...\examples\fifteen\app\temp\cache-Nette.Template%0095c31fd33e6a57c9214259e750f2fe90.Default.default.phtml |
| D:\...\Nette\Application\AjaxDriver.php |
| D:\...\Nette\Application\IAjaxDriver.php |
| D:\...\Nette\Debug.templates\bluescreen.phtml |
| HTTP_USER_AGENT | string(34) "Opera/9.51 (Windows NT 5.1; U; cs)"
|
| HTTP_HOST | string(9) "localhost"
|
| HTTP_ACCEPT | string(117) "text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1"
|
| HTTP_ACCEPT_LANGUAGE | string(23) "cs-CZ,cs;q=0.9,en;q=0.8"
|
| HTTP_ACCEPT_CHARSET | string(34) "iso-8859-1, utf-8, utf-16, *;q=0.1"
|
| HTTP_ACCEPT_ENCODING | string(38) "deflate, gzip, x-gzip, identity, *;q=0"
|
| HTTP_CACHE_CONTROL | string(8) "no-cache"
|
| HTTP_CONNECTION | string(14) "Keep-Alive, TE"
|
| HTTP_TE | string(42) "deflate, gzip, chunked, identity, trailers"
|
| SERVER_SOFTWARE | string(31) "Apache/2.0.59 (Win32) PHP/5.2.4"
|
| SERVER_NAME | string(9) "localhost"
|
| SERVER_ADDR | string(9) "127.0.0.1"
|
| SERVER_PORT | string(2) "80"
|
| REMOTE_ADDR | string(9) "127.0.0.1"
|
| GATEWAY_INTERFACE | string(7) "CGI/1.1"
|
| SERVER_PROTOCOL | string(8) "HTTP/1.1"
|
| REQUEST_METHOD | string(3) "GET"
|
| QUERY_STRING | string(71) "do=game-click&game-y=1&game-order=0.1.2.3.4.5.6.7.8.9.10.11.12.13.14.15"
|
| REQUEST_URI | string(126) "/nette/_trunk/examples/fifteen/document_root/index.php?do=game-click&game-y=1&game-order=0.1.2.3.4.5.6.7.8.9.10.11.12.13.14.15"
|
| SCRIPT_NAME | string(54) "/nette/_trunk/examples/fifteen/document_root/index.php"
|
| PHP_SELF | string(54) "/nette/_trunk/examples/fifteen/document_root/index.php"
|
| REQUEST_TIME | int(1215744322)
|
| User-Agent | Opera/9.51 (Windows NT 5.1; U; cs) |
| Host | localhost |
| Accept | text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1 |
| Accept-Language | cs-CZ,cs;q=0.9,en;q=0.8 |
| Accept-Charset | iso-8859-1, utf-8, utf-16, *;q=0.1 |
| Accept-Encoding | deflate, gzip, x-gzip, identity, *;q=0 |
| do | string(10) "game-click"
|
| game-y | string(1) "1"
|
| game-order | string(37) "0.1.2.3.4.5.6.7.8.9.10.11.12.13.14.15"
|
empty
| font | string(1) "1"
|
| __utma | string(55) "111872281.2025464270.1194480264.1199791191.1199796596.3"
|
X-Powered-By: Nette Framework