3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace App\Presenters; use Nette, App\Model; /** * Base presenter for all application presenters. * @author Jiřička Jakub <info@jirickajakub.cz> * @package Admin */ abstract class BasePresenter extends Nette\Application\UI\Presenter { // Import Autowired extension use \Kdyby\Autowired\AutowireProperties; use \Kdyby\Autowired\AutowireComponentFactories; // Startup function for loging public function startup() { parent::startup(); if (!$this->user->isLoggedIn()) { $this->flashMessage('Musíte být přihlášeni!', 'alert alert-danger'); $this->redirect('Sign:in', ['backlink' => $this->storeRequest()]); } } // Signout function public function handleSignOut() { $this->getUser()->logout(); $this->flashMessage('Byly jste úspěšně odhlášeni!', 'alert alert-success'); $this->redirect('Sign:in'); } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lotFs
function name:  (null)
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   DECLARE_CLASS                                            'app%5Cpresenters%5Cbasepresenter', 'nette%5Capplication%5Cui%5Cpresenter'
   35     1      > RETURN                                                   1

Class App\Presenters\BasePresenter:
Function startup:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 18
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/lotFs
function name:  startup
number of ops:  19
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   INIT_STATIC_METHOD_CALL                                  'startup'
          1        DO_FCALL                                      0          
   22     2        FETCH_OBJ_R                                      ~1      'user'
          3        INIT_METHOD_CALL                                         ~1, 'isLoggedIn'
          4        DO_FCALL                                      0  $2      
          5        BOOL_NOT                                         ~3      $2
          6      > JMPZ                                                     ~3, ->18
   23     7    >   INIT_METHOD_CALL                                         'flashMessage'
          8        SEND_VAL_EX                                              'Mus%C3%ADte+b%C3%BDt+p%C5%99ihl%C3%A1%C5%A1eni%21'
          9        SEND_VAL_EX                                              'alert+alert-danger'
         10        DO_FCALL                                      0          
   24    11        INIT_METHOD_CALL                                         'redirect'
         12        SEND_VAL_EX                                              'Sign%3Ain'
         13        INIT_METHOD_CALL                                         'storeRequest'
         14        DO_FCALL                                      0  $5      
         15        INIT_ARRAY                                       ~6      $5, 'backlink'
         16        SEND_VAL_EX                                              ~6
         17        DO_FCALL                                      0          
   26    18    > > RETURN                                                   null

End of function startup

Function handlesignout:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lotFs
function name:  handleSignOut
number of ops:  12
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   30     0  E >   INIT_METHOD_CALL                                         'getUser'
          1        DO_FCALL                                      0  $0      
          2        INIT_METHOD_CALL                                         $0, 'logout'
          3        DO_FCALL                                      0          
   31     4        INIT_METHOD_CALL                                         'flashMessage'
          5        SEND_VAL_EX                                              'Byly+jste+%C3%BAsp%C4%9B%C5%A1n%C4%9B+odhl%C3%A1%C5%A1eni%21'
          6        SEND_VAL_EX                                              'alert+alert-success'
          7        DO_FCALL                                      0          
   32     8        INIT_METHOD_CALL                                         'redirect'
          9        SEND_VAL_EX                                              'Sign%3Ain'
         10        DO_FCALL                                      0          
   33    11      > RETURN                                                   null

End of function handlesignout

End of class App\Presenters\BasePresenter.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
135.75 ms | 1000 KiB | 13 Q