3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * This file is part of the Nette Framework (http://nette.org) * Copyright (c) 2004 David Grudl (http://davidgrudl.com) */ namespace Nette; use Nette; /** * The Nette Framework (http://nette.org) * * @author David Grudl */ class Framework { /** Nette Framework version identification */ const NAME = 'Nette Framework', VERSION = '2.3-dev', VERSION_ID = 20300, REVISION = '$WCREV$ released on $WCDATE$'; /** * Static class - cannot be instantiated. */ final public function __construct() { throw new StaticClassException; } } /** * This file is part of the Nette Framework (http://nette.org) * Copyright (c) 2004 David Grudl (http://davidgrudl.com) */ namespace Nette\Forms; use Nette; /** * Creates, validates and renders HTML forms. * * @author David Grudl * * @property mixed $action * @property string $method * @property-read array $groups * @property Nette\Localization\ITranslator|NULL $translator * @property-read bool $anchored * @property-read ISubmitterControl|FALSE $submitted * @property-read bool $success * @property-read array $httpData * @property-read array $errors * @property-read Nette\Utils\Html $elementPrototype * @property IFormRenderer $renderer */ class Form extends Container implements Nette\Utils\IHtmlString { /** validator */ const EQUAL = ':equal', IS_IN = self::EQUAL, NOT_EQUAL = ':notEqual', FILLED = ':filled', BLANK = ':blank', REQUIRED = self::FILLED, VALID = ':valid'; /** @deprecated CSRF protection */ const PROTECTION = Controls\CsrfProtection::PROTECTION; // button const SUBMITTED = ':submitted'; // text const MIN_LENGTH = ':minLength', MAX_LENGTH = ':maxLength', LENGTH = ':length', EMAIL = ':email', URL = ':url', PATTERN = ':pattern', INTEGER = ':integer', NUMERIC = ':integer', FLOAT = ':float', MIN = ':min', MAX = ':max', RANGE = ':range'; // multiselect const COUNT = self::LENGTH; // file upload const MAX_FILE_SIZE = ':fileSize', MIME_TYPE = ':mimeType', IMAGE = ':image', MAX_POST_SIZE = ':maxPostSize'; /** method */ const GET = 'get', POST = 'post'; /** submitted data types */ const DATA_TEXT = 1; const DATA_LINE = 2; const DATA_FILE = 3; const DATA_KEYS = 8; /** @internal tracker ID */ const TRACKER_ID = '_form_'; /** @internal protection token ID */ const PROTECTOR_ID = '_token_'; /** @var array of function(Form $sender); Occurs when the form is submitted and successfully validated */ public $onSuccess; /** @var array of function(Form $sender); Occurs when the form is submitted and is not valid */ public $onError; /** @var array of function(Form $sender); Occurs when the form is submitted */ public $onSubmit; /** @var mixed or NULL meaning: not detected yet */ private $submittedBy; /** @var array */ private $httpData; /** @var Nette\Utils\Html <form> element */ private $element; /** @var IFormRenderer */ private $renderer; /** @var Nette\Localization\ITranslator */ private $translator; /** @var ControlGroup[] */ private $groups = array(); /** @var array */ private $errors = array(); /** @var Nette\Http\IRequest used only by standalone form */ public $httpRequest; /** * Form constructor. * @param string */ public function __construct($name = NULL) { if ($name !== NULL) { $this->getElementPrototype()->id = 'frm-' . $name; $tracker = new Controls\HiddenField($name); $tracker->setOmitted(); $this[self::TRACKER_ID] = $tracker; } parent::__construct(NULL, $name); } /** * @return void */ protected function validateParent(Nette\ComponentModel\IContainer $parent) { parent::validateParent($parent); $this->monitor(__CLASS__); } /** * This method will be called when the component (or component's parent) * becomes attached to a monitored object. Do not call this method yourself. * @param Nette\ComponentModel\IComponent * @return void */ protected function attached($obj) { if ($obj instanceof self) { throw new Nette\InvalidStateException('Nested forms are forbidden.'); } } /** * Returns self. * @return Form */ public function getForm($need = TRUE) { return $this; } /** * Sets form's action. * @param mixed URI * @return self */ public function setAction($url) { $this->getElementPrototype()->action = $url; return $this; } /** * Returns form's action. * @return mixed URI */ public function getAction() { return $this->getElementPrototype()->action; } /** * Sets form's method. * @param string get | post * @return self */ public function setMethod($method) { if ($this->httpData !== NULL) { throw new Nette\InvalidStateException(__METHOD__ . '() must be called until the form is empty.'); } $this->getElementPrototype()->method = strtolower($method); return $this; } /** * Returns form's method. * @return string get | post */ public function getMethod() { return $this->getElementPrototype()->method; } /** * Cross-Site Request Forgery (CSRF) form protection. * @param string * @return Controls\CsrfProtection */ public function addProtection($message = NULL) { return $this[self::PROTECTOR_ID] = new Controls\CsrfProtection($message); } /** * Adds fieldset group to the form. * @param string caption * @param bool set this group as current * @return ControlGroup */ public function addGroup($caption = NULL, $setAsCurrent = TRUE) { $group = new ControlGroup; $group->setOption('label', $caption); $group->setOption('visual', TRUE); if ($setAsCurrent) { $this->setCurrentGroup($group); } if (!is_scalar($caption) || isset($this->groups[$caption])) { return $this->groups[] = $group; } else { return $this->groups[$caption] = $group; } } /** * Removes fieldset group from form. * @param string|ControlGroup * @return void */ public function removeGroup($name) { if (is_string($name) && isset($this->groups[$name])) { $group = $this->groups[$name]; } elseif ($name instanceof ControlGroup && in_array($name, $this->groups, TRUE)) { $group = $name; $name = array_search($group, $this->groups, TRUE); } else { throw new Nette\InvalidArgumentException("Group not found in form '$this->name'"); } foreach ($group->getControls() as $control) { $control->getParent()->removeComponent($control); } unset($this->groups[$name]); } /** * Returns all defined groups. * @return ControlGroup[] */ public function getGroups() { return $this->groups; } /** * Returns the specified group. * @param string name * @return ControlGroup */ public function getGroup($name) { return isset($this->groups[$name]) ? $this->groups[$name] : NULL; } /********************* translator ****************d*g**/ /** * Sets translate adapter. * @return self */ public function setTranslator(Nette\Localization\ITranslator $translator = NULL) { $this->translator = $translator; return $this; } /** * Returns translate adapter. * @return Nette\Localization\ITranslator|NULL */ public function getTranslator() { return $this->translator; } /********************* submission ****************d*g**/ /** * Tells if the form is anchored. * @return bool */ public function isAnchored() { return TRUE; } /** * Tells if the form was submitted. * @return ISubmitterControl|FALSE submittor control */ public function isSubmitted() { if ($this->submittedBy === NULL) { $this->getHttpData(); } return $this->submittedBy; } /** * Tells if the form was submitted and successfully validated. * @return bool */ public function isSuccess() { return $this->isSubmitted() && $this->isValid(); } /** * Sets the submittor control. * @return self */ public function setSubmittedBy(ISubmitterControl $by = NULL) { $this->submittedBy = $by === NULL ? FALSE : $by; return $this; } /** * Returns submitted HTTP data. * @return mixed */ public function getHttpData($type = NULL, $htmlName = NULL) { if ($this->httpData === NULL) { if (!$this->isAnchored()) { throw new Nette\InvalidStateException('Form is not anchored and therefore can not determine whether it was submitted.'); } $data = $this->receiveHttpData(); $this->httpData = (array) $data; $this->submittedBy = is_array($data); } if ($htmlName === NULL) { return $this->httpData; } return Helpers::extractHttpData($this->httpData, $htmlName, $type); } /** * Fires submit/click events. * @return void */ public function fireEvents() { if (!$this->isSubmitted()) { return; } $this->validate(); if ($this->submittedBy instanceof ISubmitterControl) { if ($this->isValid()) { $this->submittedBy->onClick($this->submittedBy); } else { $this->submittedBy->onInvalidClick($this->submittedBy); } } if ($this->onSuccess) { foreach ($this->onSuccess as $handler) { if (!$this->isValid()) { $this->onError($this); break; } $params = Nette\Utils\Callback::toReflection($handler)->getParameters(); $values = isset($params[1]) ? $this->getValues($params[1]->isArray()) : NULL; Nette\Utils\Callback::invoke($handler, $this, $values); } } elseif (!$this->isValid()) { $this->onError($this); } $this->onSubmit($this); } /** * Internal: returns submitted HTTP data or NULL when form was not submitted. * @return array|NULL */ protected function receiveHttpData() { $httpRequest = $this->getHttpRequest(); if (strcasecmp($this->getMethod(), $httpRequest->getMethod())) { return; } if ($httpRequest->isMethod('post')) { $data = Nette\Utils\Arrays::mergeTree($httpRequest->getPost(), $httpRequest->getFiles()); } else { $data = $httpRequest->getQuery(); if (!$data) { return; } } if ($tracker = $this->getComponent(self::TRACKER_ID, FALSE)) { if (!isset($data[self::TRACKER_ID]) || $data[self::TRACKER_ID] !== $tracker->getValue()) { return; } } return $data; } /********************* validation ****************d*g**/ public function validate(array $controls = NULL) { $this->cleanErrors(); if ($controls === NULL && $this->submittedBy instanceof ISubmitterControl) { $controls = $this->submittedBy->getValidationScope(); } $this->validateMaxPostSize(); parent::validate($controls); } public function validateMaxPostSize() { if (!$this->submittedBy || strcasecmp($this->getMethod(), 'POST') || empty($_SERVER['CONTENT_LENGTH'])) { return; } $maxSize = ini_get('post_max_size'); $units = array('k' => 10, 'm' => 20, 'g' => 30); if (isset($units[$ch = strtolower(substr($maxSize, -1))])) { $maxSize <<= $units[$ch]; } if ($maxSize > 0 && $maxSize < $_SERVER['CONTENT_LENGTH']) { $this->addError(sprintf(Validator::$messages[self::MAX_FILE_SIZE], $maxSize)); } } /** * Adds global error message. * @param string error message * @return void */ public function addError($message) { $this->errors[] = $message; } /** * Returns global validation errors. * @return array */ public function getErrors() { return array_unique(array_merge($this->errors, parent::getErrors())); } /** * @return bool */ public function hasErrors() { return (bool) $this->getErrors(); } /** * @return void */ public function cleanErrors() { $this->errors = array(); } /** * Returns form's validation errors. * @return array */ public function getOwnErrors() { return array_unique($this->errors); } /** @deprecated */ public function getAllErrors() { trigger_error(__METHOD__ . '() is deprecated; use getErrors() instead.', E_USER_DEPRECATED); return $this->getErrors(); } /********************* rendering ****************d*g**/ /** * Returns form's HTML element template. * @return Nette\Utils\Html */ public function getElementPrototype() { if (!$this->element) { $this->element = Nette\Utils\Html::el('form'); $this->element->action = ''; // RFC 1808 -> empty uri means 'this' $this->element->method = self::POST; } return $this->element; } /** * Sets form renderer. * @return self */ public function setRenderer(IFormRenderer $renderer = NULL) { $this->renderer = $renderer; return $this; } /** * Returns form renderer. * @return IFormRenderer */ public function getRenderer() { if ($this->renderer === NULL) { $this->renderer = new Rendering\DefaultFormRenderer; } return $this->renderer; } /** * Renders form. * @return void */ public function render() { $args = func_get_args(); array_unshift($args, $this); echo call_user_func_array(array($this->getRenderer(), 'render'), $args); } /** * Renders form to string. * @return can throw exceptions? (hidden parameter) * @return string */ public function __toString() { try { return $this->getRenderer()->render($this); } catch (\Exception $e) { if (func_num_args()) { throw $e; } trigger_error("Exception in " . __METHOD__ . "(): {$e->getMessage()} in {$e->getFile()}:{$e->getLine()}", E_USER_ERROR); } } /********************* backend ****************d*g**/ /** * @return Nette\Http\IRequest */ private function getHttpRequest() { if (!$this->httpRequest) { $factory = new Nette\Http\RequestFactory; $this->httpRequest = $factory->createHttpRequest(); } return $this->httpRequest; } /** * @return array */ public function getToggles() { $toggles = array(); foreach ($this->getControls() as $control) { $toggles = $control->getRules()->getToggleStates($toggles); } return $toggles; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lhi0d
function name:  (null)
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   66     0  E >   DECLARE_CLASS                                            'nette%5Cforms%5Cform', 'nette%5Cforms%5Ccontainer'
  682     1      > RETURN                                                   1

Class Nette\Framework:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/lhi0d
function name:  __construct
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   33     0  E >   NEW                                              $0      'Nette%5CStaticClassException'
          1        DO_FCALL                                      0          
          2      > THROW                                         0          $0
   34     3*     > RETURN                                                   null

End of function __construct

End of class Nette\Framework.

Class Nette\Forms\Form:
Function __construct:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 19
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/lhi0d
function name:  __construct
number of ops:  24
compiled vars:  !0 = $name, !1 = $tracker
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  160     0  E >   RECV_INIT                                        !0      null
  162     1        TYPE_CHECK                                  1020          !0
          2      > JMPZ                                                     ~2, ->19
  163     3    >   INIT_METHOD_CALL                                         'getElementPrototype'
          4        DO_FCALL                                      0  $3      
          5        SEPARATE                                         $3      $3
          6        CONCAT                                           ~5      'frm-', !0
          7        ASSIGN_OBJ                                               $3, 'id'
          8        OP_DATA                                                  ~5
  164     9        NEW                                              $6      'Nette%5CForms%5CControls%5CHiddenField'
         10        SEND_VAR_EX                                              !0
         11        DO_FCALL                                      0          
         12        ASSIGN                                                   !1, $6
  165    13        INIT_METHOD_CALL                                         !1, 'setOmitted'
         14        DO_FCALL                                      0          
  166    15        FETCH_THIS                                       $10     
         16        FETCH_CLASS_CONSTANT                             ~11     'TRACKER_ID'
         17        ASSIGN_DIM                                               $10, ~11
         18        OP_DATA                                                  !1
  168    19    >   INIT_STATIC_METHOD_CALL                                  
         20        SEND_VAL_EX                                              null
         21        SEND_VAR_EX                                              !0
         22        DO_FCALL                                      0          
  169    23      > RETURN                                                   null

End of function __construct

Function validateparent:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lhi0d
function name:  validateParent
number of ops:  8
compiled vars:  !0 = $parent
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  175     0  E >   RECV                                             !0      
  177     1        INIT_STATIC_METHOD_CALL                                  'validateParent'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
  178     4        INIT_METHOD_CALL                                         'monitor'
          5        SEND_VAL_EX                                              'Nette%5CForms%5CForm'
          6        DO_FCALL                                      0          
  179     7      > RETURN                                                   null

End of function validateparent

Function attached:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 7
Branch analysis from position: 3
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lhi0d
function name:  attached
number of ops:  8
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  188     0  E >   RECV                                             !0      
  190     1        INSTANCEOF                                               !0
          2      > JMPZ                                                     ~1, ->7
  191     3    >   NEW                                              $2      'Nette%5CInvalidStateException'
          4        SEND_VAL_EX                                              'Nested+forms+are+forbidden.'
          5        DO_FCALL                                      0          
          6      > THROW                                         0          $2
  193     7    > > RETURN                                                   null

End of function attached

Function getform:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lhi0d
function name:  getForm
number of ops:  4
compiled vars:  !0 = $need
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  200     0  E >   RECV_INIT                                        !0      <true>
  202     1        FETCH_THIS                                       ~1      
          2      > RETURN                                                   ~1
  203     3*     > RETURN                                                   null

End of function getform

Function setaction:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lhi0d
function name:  setAction
number of ops:  9
compiled vars:  !0 = $url
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  211     0  E >   RECV                                             !0      
  213     1        INIT_METHOD_CALL                                         'getElementPrototype'
          2        DO_FCALL                                      0  $1      
          3        SEPARATE                                         $1      $1
          4        ASSIGN_OBJ                                               $1, 'action'
          5        OP_DATA                                                  !0
  214     6        FETCH_THIS                                       ~3      
          7      > RETURN                                                   ~3
  215     8*     > RETURN                                                   null

End of function setaction

Function getaction:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lhi0d
function name:  getAction
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  224     0  E >   INIT_METHOD_CALL                                         'getElementPrototype'
          1        DO_FCALL                                      0  $0      
          2        FETCH_OBJ_R                                      ~1      $0, 'action'
          3      > RETURN                                                   ~1
  225     4*     > RETURN                                                   null

End of function getaction

Function setmethod:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 8
Branch analysis from position: 4
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lhi0d
function name:  setMethod
number of ops:  19
compiled vars:  !0 = $method
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  233     0  E >   RECV                                             !0      
  235     1        FETCH_OBJ_R                                      ~1      'httpData'
          2        TYPE_CHECK                                  1020          ~1
          3      > JMPZ                                                     ~2, ->8
  236     4    >   NEW                                              $3      'Nette%5CInvalidStateException'
          5        SEND_VAL_EX                                              'Nette%5CForms%5CForm%3A%3AsetMethod%28%29+must+be+called+until+the+form+is+empty.'
          6        DO_FCALL                                      0          
          7      > THROW                                         0          $3
  238     8    >   INIT_METHOD_CALL                                         'getElementPrototype'
          9        DO_FCALL                                      0  $5      
         10        SEPARATE                                         $5      $5
         11        INIT_NS_FCALL_BY_NAME                                    'Nette%5CForms%5Cstrtolower'
         12        SEND_VAR_EX                                              !0
         13        DO_FCALL                                      0  $7      
         14        ASSIGN_OBJ                                               $5, 'method'
         15        OP_DATA                                                  $7
  239    16        FETCH_THIS                                       ~8      
         17      > RETURN                                                   ~8
  240    18*     > RETURN                                                   null

End of function setmethod

Function getmethod:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lhi0d
function name:  getMethod
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  249     0  E >   INIT_METHOD_CALL                                         'getElementPrototype'
          1        DO_FCALL                                      0  $0      
          2        FETCH_OBJ_R                                      ~1      $0, 'method'
          3      > RETURN                                                   ~1
  250     4*     > RETURN                                                   null

End of function getmethod

Function addprotection:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lhi0d
function name:  addProtection
number of ops:  10
compiled vars:  !0 = $message
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  258     0  E >   RECV_INIT                                        !0      null
  260     1        FETCH_THIS                                       $1      
          2        FETCH_CLASS_CONSTANT                             ~2      'PROTECTOR_ID'
          3        NEW                                              $4      'Nette%5CForms%5CControls%5CCsrfProtection'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0          
          6        ASSIGN_DIM                                       ~3      $1, ~2
          7        OP_DATA                                                  $4
          8      > RETURN                                                   ~3
  261     9*     > RETURN                                                   null

End of function addprotection

Function addgroup:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 17
Branch analysis from position: 14
2 jumps found. (Code = 47) Position 1 = 22, Position 2 = 25
Branch analysis from position: 22
2 jumps found. (Code = 43) Position 1 = 26, Position 2 = 31
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
Branch analysis from position: 17
filename:       /in/lhi0d
function name:  addGroup
number of ops:  36
compiled vars:  !0 = $caption, !1 = $setAsCurrent, !2 = $group
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  270     0  E >   RECV_INIT                                        !0      null
          1        RECV_INIT                                        !1      <true>
  272     2        NEW                                              $3      'Nette%5CForms%5CControlGroup'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !2, $3
  273     5        INIT_METHOD_CALL                                         !2, 'setOption'
          6        SEND_VAL_EX                                              'label'
          7        SEND_VAR_EX                                              !0
          8        DO_FCALL                                      0          
  274     9        INIT_METHOD_CALL                                         !2, 'setOption'
         10        SEND_VAL_EX                                              'visual'
         11        SEND_VAL_EX                                              <true>
         12        DO_FCALL                                      0          
  276    13      > JMPZ                                                     !1, ->17
  277    14    >   INIT_METHOD_CALL                                         'setCurrentGroup'
         15        SEND_VAR_EX                                              !2
         16        DO_FCALL                                      0          
  280    17    >   INIT_NS_FCALL_BY_NAME                                    'Nette%5CForms%5Cis_scalar'
         18        SEND_VAR_EX                                              !0
         19        DO_FCALL                                      0  $9      
         20        BOOL_NOT                                         ~10     $9
         21      > JMPNZ_EX                                         ~10     ~10, ->25
         22    >   FETCH_OBJ_IS                                     ~11     'groups'
         23        ISSET_ISEMPTY_DIM_OBJ                         0  ~12     ~11, !0
         24        BOOL                                             ~10     ~12
         25    > > JMPZ                                                     ~10, ->31
  281    26    >   FETCH_OBJ_W                                      $13     'groups'
         27        ASSIGN_DIM                                       ~14     $13
         28        OP_DATA                                                  !2
         29      > RETURN                                                   ~14
         30*       JMP                                                      ->35
  283    31    >   FETCH_OBJ_W                                      $15     'groups'
         32        ASSIGN_DIM                                       ~16     $15, !0
         33        OP_DATA                                                  !2
         34      > RETURN                                                   ~16
  285    35*     > RETURN                                                   null

End of function addgroup

Function removegroup:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 5, Position 2 = 8
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 13
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 42
Branch analysis from position: 42
2 jumps found. (Code = 77) Position 1 = 45, Position 2 = 52
Branch analysis from position: 45
2 jumps found. (Code = 78) Position 1 = 46, Position 2 = 52
Branch analysis from position: 46
1 jumps found. (Code = 42) Position 1 = 45
Branch analysis from position: 45
Branch analysis from position: 52
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 52
Branch analysis from position: 13
2 jumps found. (Code = 46) Position 1 = 15, Position 2 = 23
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 34
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 42
Branch analysis from position: 42
Branch analysis from position: 34
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 23
Branch analysis from position: 8
filename:       /in/lhi0d
function name:  removeGroup
number of ops:  56
compiled vars:  !0 = $name, !1 = $group, !2 = $control
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  293     0  E >   RECV                                             !0      
  295     1        INIT_NS_FCALL_BY_NAME                                    'Nette%5CForms%5Cis_string'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $3      
          4      > JMPZ_EX                                          ~4      $3, ->8
          5    >   FETCH_OBJ_IS                                     ~5      'groups'
          6        ISSET_ISEMPTY_DIM_OBJ                         0  ~6      ~5, !0
          7        BOOL                                             ~4      ~6
          8    > > JMPZ                                                     ~4, ->13
  296     9    >   FETCH_OBJ_R                                      ~7      'groups'
         10        FETCH_DIM_R                                      ~8      ~7, !0
         11        ASSIGN                                                   !1, ~8
         12      > JMP                                                      ->42
  298    13    >   INSTANCEOF                                       ~10     !0, 'Nette%5CForms%5CControlGroup'
         14      > JMPZ_EX                                          ~10     ~10, ->23
         15    >   INIT_NS_FCALL_BY_NAME                                    'Nette%5CForms%5Cin_array'
         16        SEND_VAR_EX                                              !0
         17        CHECK_FUNC_ARG                                           
         18        FETCH_OBJ_FUNC_ARG                               $11     'groups'
         19        SEND_FUNC_ARG                                            $11
         20        SEND_VAL_EX                                              <true>
         21        DO_FCALL                                      0  $12     
         22        BOOL                                             ~10     $12
         23    > > JMPZ                                                     ~10, ->34
  299    24    >   ASSIGN                                                   !1, !0
  300    25        INIT_NS_FCALL_BY_NAME                                    'Nette%5CForms%5Carray_search'
         26        SEND_VAR_EX                                              !1
         27        CHECK_FUNC_ARG                                           
         28        FETCH_OBJ_FUNC_ARG                               $14     'groups'
         29        SEND_FUNC_ARG                                            $14
         30        SEND_VAL_EX                                              <true>
         31        DO_FCALL                                      0  $15     
         32        ASSIGN                                                   !0, $15
         33      > JMP                                                      ->42
  303    34    >   NEW                                              $17     'Nette%5CInvalidArgumentException'
         35        ROPE_INIT                                     3  ~20     'Group+not+found+in+form+%27'
         36        FETCH_OBJ_R                                      ~18     'name'
         37        ROPE_ADD                                      1  ~20     ~20, ~18
         38        ROPE_END                                      2  ~19     ~20, '%27'
         39        SEND_VAL_EX                                              ~19
         40        DO_FCALL                                      0          
         41      > THROW                                         0          $17
  306    42    >   INIT_METHOD_CALL                                         !1, 'getControls'
         43        DO_FCALL                                      0  $23     
         44      > FE_RESET_R                                       $24     $23, ->52
         45    > > FE_FETCH_R                                               $24, !2, ->52
  307    46    >   INIT_METHOD_CALL                                         !2, 'getParent'
         47        DO_FCALL                                      0  $25     
         48        INIT_METHOD_CALL                                         $25, 'removeComponent'
         49        SEND_VAR_EX                                              !2
         50        DO_FCALL                                      0          
  306    51      > JMP                                                      ->45
         52    >   FE_FREE                                                  $24
  310    53        FETCH_OBJ_UNSET                                  $27     'groups'
         54        UNSET_DIM                                                $27, !0
  311    55      > RETURN                                                   null

End of function removegroup

Function getgroups:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lhi0d
function name:  getGroups
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  320     0  E >   FETCH_OBJ_R                                      ~0      'groups'
          1      > RETURN                                                   ~0
  321     2*     > RETURN                                                   null

End of function getgroups

Function getgroup:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 8
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lhi0d
function name:  getGroup
number of ops:  11
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  329     0  E >   RECV                                             !0      
  331     1        FETCH_OBJ_IS                                     ~1      'groups'
          2        ISSET_ISEMPTY_DIM_OBJ                         0          ~1, !0
          3      > JMPZ                                                     ~2, ->8
          4    >   FETCH_OBJ_R                                      ~3      'groups'
          5        FETCH_DIM_R                                      ~4      ~3, !0
          6        QM_ASSIGN                                        ~5      ~4
          7      > JMP                                                      ->9
          8    >   QM_ASSIGN                                        ~5      null
          9    > > RETURN                                                   ~5
  332    10*     > RETURN                                                   null

End of function getgroup

Function settranslator:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lhi0d
function name:  setTranslator
number of ops:  6
compiled vars:  !0 = $translator
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  342     0  E >   RECV_INIT                                        !0      null
  344     1        ASSIGN_OBJ                                               'translator'
          2        OP_DATA                                                  !0
  345     3        FETCH_THIS                                       ~2      
          4      > RETURN                                                   ~2
  346     5*     > RETURN                                                   null

End of function settranslator

Function gettranslator:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lhi0d
function name:  getTranslator
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  355     0  E >   FETCH_OBJ_R                                      ~0      'translator'
          1      > RETURN                                                   ~0
  356     2*     > RETURN                                                   null

End of function gettranslator

Function isanchored:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lhi0d
function name:  isAnchored
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  368     0  E > > RETURN                                                   <true>
  369     1*     > RETURN                                                   null

End of function isanchored

Function issubmitted:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
filename:       /in/lhi0d
function name:  isSubmitted
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  378     0  E >   FETCH_OBJ_R                                      ~0      'submittedBy'
          1        TYPE_CHECK                                    2          ~0
          2      > JMPZ                                                     ~1, ->5
  379     3    >   INIT_METHOD_CALL                                         'getHttpData'
          4        DO_FCALL                                      0          
  381     5    >   FETCH_OBJ_R                                      ~3      'submittedBy'
          6      > RETURN                                                   ~3
  382     7*     > RETURN                                                   null

End of function issubmitted

Function issuccess:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 3, Position 2 = 6
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/lhi0d
function name:  isSuccess
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  391     0  E >   INIT_METHOD_CALL                                         'isSubmitted'
          1        DO_FCALL                                      0  $0      
          2      > JMPZ_EX                                          ~1      $0, ->6
          3    >   INIT_METHOD_CALL                                         'isValid'
          4        DO_FCALL                                      0  $2      
          5        BOOL                                             ~1      $2
          6    > > RETURN                                                   ~1
  392     7*     > RETURN                                                   null

End of function issuccess

Function setsubmittedby:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lhi0d
function name:  setSubmittedBy
number of ops:  11
compiled vars:  !0 = $by
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  399     0  E >   RECV_INIT                                        !0      null
  401     1        TYPE_CHECK                                    2          !0
          2      > JMPZ                                                     ~2, ->5
          3    >   QM_ASSIGN                                        ~3      <false>
          4      > JMP                                                      ->6
          5    >   QM_ASSIGN                                        ~3      !0
          6    >   ASSIGN_OBJ                                               'submittedBy'
          7        OP_DATA                                                  ~3
  402     8        FETCH_THIS                                       ~4      
          9      > RETURN                                                   ~4
  403    10*     > RETURN                                                   null

End of function setsubmittedby

Function gethttpdata:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 24
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 13
Branch analysis from position: 9
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 26, Position 2 = 28
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
filename:       /in/lhi0d
function name:  getHttpData
number of ops:  37
compiled vars:  !0 = $type, !1 = $htmlName, !2 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  410     0  E >   RECV_INIT                                        !0      null
          1        RECV_INIT                       

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
297.42 ms | 1428 KiB | 24 Q