Action not allowed.
File: D:\...\examples\fifteen\app\components\FifteenControl.php Line: 55
Line 48: }
Line 49:
Line 50:
Line 51:
Line 52: public function handleClick($x, $y)
Line 53: {
Line 54: if (!$this->isClickable($x, $y)) {
Line 55: throw new /*Nette\Application\*/BadRequestException('Action not allowed.');
Line 56: }
Line 57:
Line 58: $this->move($x, $y);
Line 59: $this->round++;
Line 60: $this->onAfterClick($this);
Line 61:
Line 62: if ($this->order == range(0, $this->width * $this->width - 1)) {
<PHP inner-code> FifteenControl-> handleClick (arguments ▶)
| $x | NULL
|
| $y | string(1) "1"
|
Application/PresenterComponent.php (109) source ▶ call_user_func_array (arguments ▶)
| $function_name | array(2) { 0 => object(FifteenControl) (17) { "width" protected => int(4) "onAfterClick" => NULL "onGameOver" => array(1) { 0 => array(2) { ... } } "order" => array(16) { 0 => string(1) "0" 1 => string(1) "1" 2 => string(1) "2" 3 => string(1) "3" 4 => string(1) "4" 5 => string(1) "5" 6 => string(1) "6" 7 => string(1) "7" 8 => string(1) "8" 9 => string(1) "9" 10 => string(2) "10" 11 => string(2) "11" 12 => string(2) "12" 13 => string(2) "13" 14 => string(2) "14" 15 => string(2) "15" } "round" => int(0) "useAjax" => bool(TRUE) "template" private => NULL "invalidPartials" private => array(0) { } "beginedPartials" private => array(0) { } "hasInvalidChild" private => NULL "params" protected => array(2) { "y" => string(1) "1" "order" => array(16) { ... } } "components" private => array(0) { } "cloning" private => bool(FALSE) "serviceLocator" private => NULL "parent" private => object(DefaultPresenter) (28) { "fifteen" => object(FifteenControl) (17) { *RECURSION* } "autoCanonicalize" => bool(FALSE) "useLayoutTemplate" => bool(TRUE) "request" private => object(PresenterRequest) (5) { ... } "phase" private => int(3) "globalComponents" private => array(2) { ... } "globalParams" private => array(2) { ... } "view" private => string(7) "default" "scene" private => string(7) "default" "ajaxDriver" private => NULL "signalReceiver" private => string(4) "game" "signal" private => string(5) "click" "renderFinished" private => bool(FALSE) "partialMode" private => bool(FALSE) "router" private => object(MultiRouter) (1) { ... } "presenterLoader" private => object(PresenterLoader) (2) { ... } "httpRequest" private => object(HttpRequest) (7) { ... } "template" private => object(Template) (4) { ... } "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) { ... } } "name" private => string(4) "game" "lookupCache" private => array(1) { "Presenter" => array(2) { ... } } } 1 => string(11) "handleclick" } |
| $parameters | array(2) { 0 => NULL 1 => string(1) "1" } |
Line 102:
Line 103:
Line 104: protected function tryCall($method, array $params)
Line 105: {
Line 106: $class = $this->getClass();
Line 107: if (PresenterHelpers::isMethodCallable($class, $method)) {
Line 108: $args = PresenterHelpers::paramsToArgs($class, $method, $params);
Line 109: call_user_func_array(array($this, $method), $args);
Line 110: return TRUE;
Line 111: }
Line 112: return FALSE;
Line 113: }
Line 114:
Line 115:
Line 116:
Application/PresenterComponent.php (209) source ▶ PresenterComponent-> tryCall (arguments ▶)
| $method | string(11) "handleclick"
|
| $params | array(2) { "y" => string(1) "1" "order" => array(16) { 0 => string(1) "0" 1 => string(1) "1" 2 => string(1) "2" 3 => string(1) "3" 4 => string(1) "4" 5 => string(1) "5" 6 => string(1) "6" 7 => string(1) "7" 8 => string(1) "8" 9 => string(1) "9" 10 => string(2) "10" 11 => string(2) "11" 12 => string(2) "12" 13 => string(2) "13" 14 => string(2) "14" 15 => string(2) "15" } } |
Line 202: * Calls signal handler method.
Line 203: * @param string
Line 204: * @return void
Line 205: * @throws BadSignalException if there is not handler method
Line 206: */
Line 207: public function signalReceived($signal)
Line 208: {
Line 209: if (!$this->tryCall($this->formatSignalMethod($signal), $this->params)) {
Line 210: throw new BadSignalException("There is no handler for signal '$signal' in '{$this->getClass()}' class.");
Line 211: }
Line 212: }
Line 213:
Line 214:
Line 215:
Line 216: /**
Application/Presenter.php (292) source ▶ PresenterComponent-> signalReceived (arguments ▶)
| $signal | string(5) "click"
|
Line 285: }
Line 286:
Line 287: // auto invalidate
Line 288: if ($this->isPartialMode() && $component instanceof Control) {
Line 289: $component->invalidatePartial();
Line 290: }
Line 291:
Line 292: $component->signalReceived($this->signal);
Line 293: }
Line 294:
Line 295:
Line 296:
Line 297: /**
Line 298: * @param bool component or its id?
Line 299: * @return string|ISignalReceiver|NULL
Application/Presenter.php (181) source ▶ Presenter-> processSignal ()
Line 174: $this->phase = self::PHASE_PREPARE;
Line 175: $this->beforePrepare();
Line 176: // calls $this->prepare{scene}();
Line 177: $this->tryCall($this->formatPrepareMethod($this->getScene()), $this->params);
Line 178:
Line 179: // PHASE 3: SIGNAL HANDLING
Line 180: $this->phase = self::PHASE_SIGNAL;
Line 181: $this->processSignal();
Line 182: // save component tree persistent state
Line 183: $this->globalParams = $this->getGlobalParams();
Line 184:
Line 185: // PHASE 4: RENDERING SCENE
Line 186: $this->phase = self::PHASE_RENDER;
Line 187:
Line 188: if ($this->isPartialMode()) {
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\Application\BadRequestException.php |
| D:\...\Nette\Configurator.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)
|
exception 'BadRequestException' with message 'Action not allowed.' in D:\...\examples\fifteen\app\components\FifteenControl.php:55
Stack trace:
#0 [internal function]: FifteenControl->handleClick(NULL, '1')
#1 D:\...\Nette\Application\PresenterComponent.php(109): call_user_func_array(Array, Array)
#2 D:\...\Nette\Application\PresenterComponent.php(209): PresenterComponent->tryCall('handleclick', Array)
#3 D:\...\Nette\Application\Presenter.php(292): PresenterComponent->signalReceived('click')
#4 D:\...\Nette\Application\Presenter.php(181): Presenter->processSignal()
#5 D:\...\Nette\Application\Application.php(158): Presenter->run(Object(PresenterRequest))
#6 D:\...\examples\fifteen\app\bootstrap.php(32): Application->run()
#7 D:\...\examples\fifteen\document_root\index.php(10): require('D:\Web\nette\_t...')
#8 {main}
| 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