3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace TYPO3\Flow\Mvc\Controller; /* * * This script belongs to the TYPO3 Flow framework. * * * * It is free software; you can redistribute it and/or modify it under * * the terms of the GNU Lesser General Public License, either version 3 * * of the License, or (at your option) any later version. * * * * The TYPO3 project - inspiring people to share! * * */ use TYPO3\Flow\Annotations as Flow; /** * An HTTP based multi-action controller. * * The action specified in the given ActionRequest is dispatched to a method in * the concrete controller whose name ends with "*Action". If no matching action * method is found, the action specified in $errorMethodName is invoked. * * This controller also takes care of mapping arguments found in the ActionRequest * to the corresponding method arguments of the action method. It also invokes * validation for these arguments by invoking the Property Mapper. * * By defining media types in $supportedMediaTypes, content negotiation based on * the browser's Accept header and additional routing configuration is used to * determine the output format the controller should return. * * Depending on the action being called, a fitting view - by default a Fluid template * view - will be selected. By specifying patterns, custom view classes or an alternative * controller / action to template path mapping can be defined. * * @Flow\Scope("singleton") * @api */ class ActionController extends AbstractController { /** * @Flow\Inject * @var \TYPO3\Flow\Object\ObjectManagerInterface */ protected $objectManager; /** * @Flow\Inject * @var \TYPO3\Flow\Reflection\ReflectionService */ protected $reflectionService; /** * @Flow\Inject * @var \TYPO3\Flow\Mvc\Controller\MvcPropertyMappingConfigurationService */ protected $mvcPropertyMappingConfigurationService; /** * The current view, as resolved by resolveView() * * @var \TYPO3\Flow\Mvc\View\ViewInterface * @api */ protected $view = NULL; /** * Pattern after which the view object name is built if no format-specific * view could be resolved. * * @var string * @api */ protected $viewObjectNamePattern = '@package\View\@controller\@action@format'; /** * A list of formats and object names of the views which should render them. * * Example: * * array('html' => 'MyCompany\MyApp\MyHtmlView', 'json' => 'MyCompany\... * * @var array */ protected $viewFormatToObjectNameMap = array(); /** * The default view object to use if none of the resolved views can render * a response for the current request. * * @var string * @api */ protected $defaultViewObjectName = 'TYPO3\Fluid\View\TemplateView'; /** * Name of the action method * * @var string */ protected $actionMethodName; /** * Name of the special error action method which is called in case of errors * * @var string * @api */ protected $errorMethodName = 'errorAction'; /** * @var array */ protected $settings; /** * @param array $settings * @return void */ public function injectSettings(array $settings) { $this->settings = $settings; } /** * Handles a request. The result output is returned by altering the given response. * * @param \TYPO3\Flow\Mvc\RequestInterface $request The request object * @param \TYPO3\Flow\Mvc\ResponseInterface $response The response, modified by this handler * @return void * @throws \TYPO3\Flow\Mvc\Exception\UnsupportedRequestTypeException * @api */ public function processRequest(\TYPO3\Flow\Mvc\RequestInterface $request, \TYPO3\Flow\Mvc\ResponseInterface $response) { $this->initializeController($request, $response); $this->actionMethodName = $this->resolveActionMethodName(); $this->initializeActionMethodArguments(); $this->initializeActionMethodValidators(); $this->mvcPropertyMappingConfigurationService->initializePropertyMappingConfigurationFromRequest($this->request, $this->arguments); $this->initializeAction(); $actionInitializationMethodName = 'initialize' . ucfirst($this->actionMethodName); if (method_exists($this, $actionInitializationMethodName)) { call_user_func(array($this, $actionInitializationMethodName)); } $this->mapRequestArgumentsToControllerArguments(); $this->view = $this->resolveView(); if ($this->view !== NULL) { $this->view->assign('settings', $this->settings); $this->initializeView($this->view); } $this->callActionMethod(); } /** * Resolves and checks the current action method name * * @return string Method name of the current action * @throws \TYPO3\Flow\Mvc\Exception\NoSuchActionException */ protected function resolveActionMethodName() { $actionMethodName = $this->request->getControllerActionName() . 'Action'; if (!is_callable(array($this, $actionMethodName))) { throw new \TYPO3\Flow\Mvc\Exception\NoSuchActionException('An action "' . $actionMethodName . '" does not exist in controller "' . get_class($this) . '".', 1186669086); } return $actionMethodName; } /** * Implementation of the arguments initialization in the action controller: * Automatically registers arguments of the current action * * Don't override this method - use initializeAction() instead. * * @return void * @throws \TYPO3\Flow\Mvc\Exception\InvalidArgumentTypeException * @see initializeArguments() */ protected function initializeActionMethodArguments() { $actionMethodParameters = static::getActionMethodParameters($this->objectManager); if (isset($actionMethodParameters[$this->actionMethodName])) { $methodParameters = $actionMethodParameters[$this->actionMethodName]; } else { $methodParameters = array(); } $this->arguments->removeAll(); foreach ($methodParameters as $parameterName => $parameterInfo) { $dataType = NULL; if (isset($parameterInfo['type'])) { $dataType = $parameterInfo['type']; } elseif ($parameterInfo['array']) { $dataType = 'array'; } if ($dataType === NULL) throw new \TYPO3\Flow\Mvc\Exception\InvalidArgumentTypeException('The argument type for parameter $' . $parameterName . ' of method ' . get_class($this) . '->' . $this->actionMethodName . '() could not be detected.' , 1253175643); $defaultValue = (isset($parameterInfo['defaultValue']) ? $parameterInfo['defaultValue'] : NULL); $this->arguments->addNewArgument($parameterName, $dataType, ($parameterInfo['optional'] === FALSE), $defaultValue); } } /** * Returns a map of action method names and their parameters. * * @param \TYPO3\Flow\Object\ObjectManagerInterface $objectManager * @return array Array of method parameters by action name * @Flow\CompileStatic */ static public function getActionMethodParameters($objectManager) { $reflectionService = $objectManager->get('TYPO3\Flow\Reflection\ReflectionService'); $result = array(); $className = get_called_class(); $methodNames = get_class_methods($className); foreach ($methodNames as $methodName) { if (strlen($methodName) > 6 && strpos($methodName, 'Action', strlen($methodName) - 6) !== FALSE) { $result[$methodName] = $reflectionService->getMethodParameters($className, $methodName); } } return $result; } /** * Adds the needed validators to the Arguments: * * - Validators checking the data type from the @param annotation * - Custom validators specified with validate annotations. * - Model-based validators (validate annotations in the model) * - Custom model validator classes * * @return void */ protected function initializeActionMethodValidators() { $validateGroupAnnotations = static::getActionValidationGroups($this->objectManager); if (isset($validateGroupAnnotations[$this->actionMethodName])) { $validationGroups = $validateGroupAnnotations[$this->actionMethodName]; } else { $validationGroups = array('Default', 'Controller'); } $actionMethodParameters = static::getActionMethodParameters($this->objectManager); if (isset($actionMethodParameters[$this->actionMethodName])) { $methodParameters = $actionMethodParameters[$this->actionMethodName]; } else { $methodParameters = array(); } $actionValidateAnnotations = static::getActionValidateAnnotationData($this->objectManager); if (isset($actionValidateAnnotations[$this->actionMethodName])) { $validateAnnotations = $actionValidateAnnotations[$this->actionMethodName]; } else { $validateAnnotations = array(); } $parameterValidators = $this->validatorResolver->buildMethodArgumentsValidatorConjunctions(get_class($this), $this->actionMethodName, $methodParameters, $validateAnnotations); foreach ($this->arguments as $argument) { $validator = $parameterValidators[$argument->getName()]; $baseValidatorConjunction = $this->validatorResolver->getBaseValidatorConjunction($argument->getDataType(), $validationGroups); if (count($baseValidatorConjunction) > 0) { $validator->addValidator($baseValidatorConjunction); } $argument->setValidator($validator); } } /** * Returns a map of action method names and their validation groups. * * @param \TYPO3\Flow\Object\ObjectManagerInterface $objectManager * @return array Array of validation groups by action method name * @Flow\CompileStatic */ static public function getActionValidationGroups($objectManager) { $reflectionService = $objectManager->get('TYPO3\Flow\Reflection\ReflectionService'); $result = array(); $className = get_called_class(); $methodNames = get_class_methods($className); foreach ($methodNames as $methodName) { if (strlen($methodName) > 6 && strpos($methodName, 'Action', strlen($methodName) - 6) !== FALSE) { $validationGroupsAnnotation = $reflectionService->getMethodAnnotation($className, $methodName, 'TYPO3\Flow\Annotations\ValidationGroups'); if ($validationGroupsAnnotation !== NULL) { $result[$methodName] = $validationGroupsAnnotation->validationGroups; } } } return $result; } /** * Returns a map of action method names and their validation parameters. * * @param \TYPO3\Flow\Object\ObjectManagerInterface $objectManager * @return array Array of validate annotation parameters by action method name * @Flow\CompileStatic */ static public function getActionValidateAnnotationData($objectManager) { $reflectionService = $objectManager->get('TYPO3\Flow\Reflection\ReflectionService'); $result = array(); $className = get_called_class(); $methodNames = get_class_methods($className); foreach ($methodNames as $methodName) { if (strlen($methodName) > 6 && strpos($methodName, 'Action', strlen($methodName) - 6) !== FALSE) { $validateAnnotations = $reflectionService->getMethodAnnotations($className, $methodName, 'TYPO3\Flow\Annotations\Validate'); $result[$methodName] = array_map(function($validateAnnotation) { return array( 'type' => $validateAnnotation->type, 'options' => $validateAnnotation->options, 'argumentName' => $validateAnnotation->argumentName, ); }, $validateAnnotations); } } return $result; } /** * Initializes the controller before invoking an action method. * * Override this method to solve tasks which all actions have in * common. * * @return void * @api */ protected function initializeAction() { } /** * Calls the specified action method and passes the arguments. * * If the action returns a string, it is appended to the content in the * response object. If the action doesn't return anything and a valid * view exists, the view is rendered automatically. * * @return void */ protected function callActionMethod() { $preparedArguments = array(); foreach ($this->arguments as $argument) { $preparedArguments[] = $argument->getValue(); } $validationResult = $this->arguments->getValidationResults(); if (!$validationResult->hasErrors()) { $actionResult = call_user_func_array(array($this, $this->actionMethodName), $preparedArguments); } else { $actionIgnoredArguments = static::getActionIgnoredValidationArguments($this->objectManager); if (isset($actionIgnoredArguments[$this->actionMethodName])) { $ignoredArguments = $actionIgnoredArguments[$this->actionMethodName]; } else { $ignoredArguments = array(); } // if there exists more errors than in ignoreValidationAnnotations_=> call error method // else => call action method $shouldCallActionMethod = TRUE; foreach ($validationResult->getSubResults() as $argumentName => $subValidationResult) { if (!$subValidationResult->hasErrors()) continue; if (array_search($argumentName, $ignoredArguments) !== FALSE) { continue; } $shouldCallActionMethod = FALSE; } if ($shouldCallActionMethod) { $actionResult = call_user_func_array(array($this, $this->actionMethodName), $preparedArguments); } else { $actionResult = call_user_func(array($this, $this->errorMethodName)); } } if ($actionResult === NULL && $this->view instanceof \TYPO3\Flow\Mvc\View\ViewInterface) { $this->response->appendContent($this->view->render()); } elseif (is_string($actionResult) && strlen($actionResult) > 0) { $this->response->appendContent($actionResult); } elseif (is_object($actionResult) && method_exists($actionResult, '__toString')) { $this->response->appendContent((string)$actionResult); } } /** * @param \TYPO3\Flow\Object\ObjectManagerInterface $objectManager * @return array Array of arguments ignored for validation by action method name * @Flow\CompileStatic */ static public function getActionIgnoredValidationArguments($objectManager) { $reflectionService = $objectManager->get('TYPO3\Flow\Reflection\ReflectionService'); $result = array(); $className = get_called_class(); $methodNames = get_class_methods($className); foreach ($methodNames as $methodName) { if (strlen($methodName) > 6 && strpos($methodName, 'Action', strlen($methodName) - 6) !== FALSE) { $ignoreValidationAnnotations = $reflectionService->getMethodAnnotations($className, $methodName, 'TYPO3\Flow\Annotations\IgnoreValidation'); $ignoredArguments = array_map(function($annotation) { return $annotation->argumentName; }, $ignoreValidationAnnotations); if ($ignoredArguments !== array()) { $result[$methodName] = $ignoredArguments; } } } return $result; } /** * Prepares a view for the current action and stores it in $this->view. * By default, this method tries to locate a view with a name matching * the current action. * * @return \TYPO3\Flow\Mvc\View\ViewInterface the resolved view * @api * @throws \TYPO3\Flow\Mvc\Exception\ViewNotFoundException if no view can be resolved */ protected function resolveView() { $viewObjectName = $this->resolveViewObjectName(); if ($viewObjectName !== FALSE) { $view = $this->objectManager->get($viewObjectName); } elseif ($this->defaultViewObjectName != '') { $view = $this->objectManager->get($this->defaultViewObjectName); } if (!isset($view)) { throw new \TYPO3\Flow\Mvc\Exception\ViewNotFoundException(sprintf('Could not resolve view for action "%s" in controller "%s"', $this->request->getControllerActionName(), get_class($this)), 1355153185); } if (!$view instanceof \TYPO3\Flow\Mvc\View\ViewInterface) { throw new \TYPO3\Flow\Mvc\Exception\ViewNotFoundException(sprintf('View has to be of type ViewInterface, got "%s" in action "%s" of controller "%s"', get_class($view), $this->request->getControllerActionName(), get_class($this)), 1355153188); } $view->setControllerContext($this->controllerContext); return $view; } /** * Determines the fully qualified view object name. * * @return mixed The fully qualified view object name or FALSE if no matching view could be found. * @api */ protected function resolveViewObjectName() { $possibleViewObjectName = $this->viewObjectNamePattern; $packageKey = $this->request->getControllerPackageKey(); $subpackageKey = $this->request->getControllerSubpackageKey(); $format = $this->request->getFormat(); if ($subpackageKey !== NULL && $subpackageKey !== '') { $packageKey.= '\\' . $subpackageKey; } $possibleViewObjectName = str_replace('@package', str_replace('.', '\\', $packageKey), $possibleViewObjectName); $possibleViewObjectName = str_replace('@controller', $this->request->getControllerName(), $possibleViewObjectName); $possibleViewObjectName = str_replace('@action', $this->request->getControllerActionName(), $possibleViewObjectName); $viewObjectName = $this->objectManager->getCaseSensitiveObjectName(strtolower(str_replace('@format', $format, $possibleViewObjectName))); if ($viewObjectName === FALSE) { $viewObjectName = $this->objectManager->getCaseSensitiveObjectName(strtolower(str_replace('@format', '', $possibleViewObjectName))); } if ($viewObjectName === FALSE && isset($this->viewFormatToObjectNameMap[$format])) { $viewObjectName = $this->viewFormatToObjectNameMap[$format]; } return $viewObjectName; } /** * Initializes the view before invoking an action method. * * Override this method to solve assign variables common for all actions * or prepare the view in another way before the action is called. * * @param \TYPO3\Flow\Mvc\View\ViewInterface $view The view to be initialized * @return void * @api */ protected function initializeView(\TYPO3\Flow\Mvc\View\ViewInterface $view) { } /** * A special action which is called if the originally intended action could * not be called, for example if the arguments were not valid. * * The default implementation sets a flash message, request errors and forwards back * to the originating action. This is suitable for most actions dealing with form input. * * @return string * @api */ protected function errorAction() { $errorFlashMessage = $this->getErrorFlashMessage(); if ($errorFlashMessage !== FALSE) { $this->flashMessageContainer->addMessage($errorFlashMessage); } $referringRequest = $this->request->getReferringRequest(); if ($referringRequest !== NULL) { $subPackageKey = $referringRequest->getControllerSubpackageKey(); if ($subPackageKey !== NULL) { rtrim($packageAndSubpackageKey = $referringRequest->getControllerPackageKey() . '\\' . $referringRequest->getControllerSubpackageKey(), '\\'); } else { $packageAndSubpackageKey = $referringRequest->getControllerPackageKey(); } $argumentsForNextController = $referringRequest->getArguments(); $argumentsForNextController['__submittedArguments'] = $this->request->getArguments(); $argumentsForNextController['__submittedArgumentValidationResults'] = $this->arguments->getValidationResults(); $this->forward($referringRequest->getControllerActionName(), $referringRequest->getControllerName(), $packageAndSubpackageKey, $argumentsForNextController); } $message = 'An error occurred while trying to call ' . get_class($this) . '->' . $this->actionMethodName . '().' . PHP_EOL; foreach ($this->arguments->getValidationResults()->getFlattenedErrors() as $propertyPath => $errors) { foreach ($errors as $error) { $message .= 'Error for ' . $propertyPath . ': ' . $error->render() . PHP_EOL; } } return $message; } /** * A template method for displaying custom error flash messages, or to * display no flash message at all on errors. Override this to customize * the flash message in your action controller. * * @return \TYPO3\Flow\Error\Message The flash message or FALSE if no flash message should be set * @api */ protected function getErrorFlashMessage() { return new \TYPO3\Flow\Error\Error('An error occurred while trying to call %1$s->%2$s()', NULL, array(get_class($this), $this->actionMethodName)); } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tIvg0
function name:  (null)
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   38     0  E >   DECLARE_CLASS                                            'typo3%5Cflow%5Cmvc%5Ccontroller%5Cactioncontroller', 'typo3%5Cflow%5Cmvc%5Ccontroller%5Cabstractcontroller'
  537     1      > RETURN                                                   1

Function %00typo3%5Cflow%5Cmvc%5Ccontroller%5C%7Bclosure%7D%2Fin%2FtIvg0%3A312%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tIvg0
function name:  TYPO3\Flow\Mvc\Controller\{closure}
number of ops:  9
compiled vars:  !0 = $validateAnnotation
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  312     0  E >   RECV                                             !0      
  314     1        FETCH_OBJ_R                                      ~1      !0, 'type'
          2        INIT_ARRAY                                       ~2      ~1, 'type'
  315     3        FETCH_OBJ_R                                      ~3      !0, 'options'
          4        ADD_ARRAY_ELEMENT                                ~2      ~3, 'options'
  316     5        FETCH_OBJ_R                                      ~4      !0, 'argumentName'
          6        ADD_ARRAY_ELEMENT                                ~2      ~4, 'argumentName'
          7      > RETURN                                                   ~2
  318     8*     > RETURN                                                   null

End of function %00typo3%5Cflow%5Cmvc%5Ccontroller%5C%7Bclosure%7D%2Fin%2FtIvg0%3A312%240

Function %00typo3%5Cflow%5Cmvc%5Ccontroller%5C%7Bclosure%7D%2Fin%2FtIvg0%3A408%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tIvg0
function name:  TYPO3\Flow\Mvc\Controller\{closure}
number of ops:  4
compiled vars:  !0 = $annotation
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  408     0  E >   RECV                                             !0      
          1        FETCH_OBJ_R                                      ~1      !0, 'argumentName'
          2      > RETURN                                                   ~1
          3*     > RETURN                                                   null

End of function %00typo3%5Cflow%5Cmvc%5Ccontroller%5C%7Bclosure%7D%2Fin%2FtIvg0%3A408%241

Class TYPO3\Flow\Mvc\Controller\ActionController:
Function injectsettings:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tIvg0
function name:  injectSettings
number of ops:  4
compiled vars:  !0 = $settings
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  119     0  E >   RECV                                             !0      
  120     1        ASSIGN_OBJ                                               'settings'
          2        OP_DATA                                                  !0
  121     3      > RETURN                                                   null

End of function injectsettings

Function processrequest:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 38, Position 2 = 44
Branch analysis from position: 38
2 jumps found. (Code = 43) Position 1 = 53, Position 2 = 65
Branch analysis from position: 53
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 65
Branch analysis from position: 44
filename:       /in/tIvg0
function name:  processRequest
number of ops:  68
compiled vars:  !0 = $request, !1 = $response, !2 = $actionInitializationMethodName
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  132     0  E >   RECV                                             !0      
          1        RECV                                             !1      
  133     2        INIT_METHOD_CALL                                         'initializeController'
          3        SEND_VAR_EX                                              !0
          4        SEND_VAR_EX                                              !1
          5        DO_FCALL                                      0          
  135     6        INIT_METHOD_CALL                                         'resolveActionMethodName'
          7        DO_FCALL                                      0  $5      
          8        ASSIGN_OBJ                                               'actionMethodName'
          9        OP_DATA                                                  $5
  137    10        INIT_METHOD_CALL                                         'initializeActionMethodArguments'
         11        DO_FCALL                                      0          
  138    12        INIT_METHOD_CALL                                         'initializeActionMethodValidators'
         13        DO_FCALL                                      0          
  139    14        FETCH_OBJ_R                                      ~8      'mvcPropertyMappingConfigurationService'
         15        INIT_METHOD_CALL                                         ~8, 'initializePropertyMappingConfigurationFromRequest'
         16        CHECK_FUNC_ARG                                           
         17        FETCH_OBJ_FUNC_ARG                               $9      'request'
         18        SEND_FUNC_ARG                                            $9
         19        CHECK_FUNC_ARG                                           
         20        FETCH_OBJ_FUNC_ARG                               $10     'arguments'
         21        SEND_FUNC_ARG                                            $10
         22        DO_FCALL                                      0          
  141    23        INIT_METHOD_CALL                                         'initializeAction'
         24        DO_FCALL                                      0          
  142    25        INIT_NS_FCALL_BY_NAME                                    'TYPO3%5CFlow%5CMvc%5CController%5Cucfirst'
         26        CHECK_FUNC_ARG                                           
         27        FETCH_OBJ_FUNC_ARG                               $13     'actionMethodName'
         28        SEND_FUNC_ARG                                            $13
         29        DO_FCALL                                      0  $14     
         30        CONCAT                                           ~15     'initialize', $14
         31        ASSIGN                                                   !2, ~15
  143    32        INIT_NS_FCALL_BY_NAME                                    'TYPO3%5CFlow%5CMvc%5CController%5Cmethod_exists'
         33        FETCH_THIS                                       $17     
         34        SEND_VAR_EX                                              $17
         35        SEND_VAR_EX                                              !2
         36        DO_FCALL                                      0  $18     
         37      > JMPZ                                                     $18, ->44
  144    38    >   INIT_NS_FCALL_BY_NAME                                    'TYPO3%5CFlow%5CMvc%5CController%5Ccall_user_func'
         39        FETCH_THIS                                       ~19     
         40        INIT_ARRAY                                       ~20     ~19
         41        ADD_ARRAY_ELEMENT                                ~20     !2
         42        SEND_VAL_EX                                              ~20
         43        DO_FCALL                                      0          
  147    44    >   INIT_METHOD_CALL                                         'mapRequestArgumentsToControllerArguments'
         45        DO_FCALL                                      0          
  149    46        INIT_METHOD_CALL                                         'resolveView'
         47        DO_FCALL                                      0  $24     
         48        ASSIGN_OBJ                                               'view'
         49        OP_DATA                                                  $24
  150    50        FETCH_OBJ_R                                      ~25     'view'
         51        TYPE_CHECK                                  1020          ~25
         52      > JMPZ                                                     ~26, ->65
  151    53    >   FETCH_OBJ_R                                      ~27     'view'
         54        INIT_METHOD_CALL                                         ~27, 'assign'
         55        SEND_VAL_EX                                              'settings'
         56        CHECK_FUNC_ARG                                           
         57        FETCH_OBJ_FUNC_ARG                               $28     'settings'
         58        SEND_FUNC_ARG                                            $28
         59        DO_FCALL                                      0          
  152    60        INIT_METHOD_CALL                                         'initializeView'
         61        CHECK_FUNC_ARG                                           
         62        FETCH_OBJ_FUNC_ARG                               $30     'view'
         63        SEND_FUNC_ARG                                            $30
         64        DO_FCALL                                      0          
  154    65    >   INIT_METHOD_CALL                                         'callActionMethod'
         66        DO_FCALL                                      0          
  155    67      > RETURN                                                   null

End of function processrequest

Function resolveactionmethodname:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 26
Branch analysis from position: 13
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tIvg0
function name:  resolveActionMethodName
number of ops:  28
compiled vars:  !0 = $actionMethodName
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  164     0  E >   FETCH_OBJ_R                                      ~1      'request'
          1        INIT_METHOD_CALL                                         ~1, 'getControllerActionName'
          2        DO_FCALL                                      0  $2      
          3        CONCAT                                           ~3      $2, 'Action'
          4        ASSIGN                                                   !0, ~3
  165     5        INIT_NS_FCALL_BY_NAME                                    'TYPO3%5CFlow%5CMvc%5CController%5Cis_callable'
          6        FETCH_THIS                                       ~5      
          7        INIT_ARRAY                                       ~6      ~5
          8        ADD_ARRAY_ELEMENT                                ~6      !0
          9        SEND_VAL_EX                                              ~6
         10        DO_FCALL                                      0  $7      
         11        BOOL_NOT                                         ~8      $7
         12      > JMPZ                                                     ~8, ->26
  166    13    >   NEW                                              $9      'TYPO3%5CFlow%5CMvc%5CException%5CNoSuchActionException'
         14        CONCAT                                           ~10     'An+action+%22', !0
         15        CONCAT                                           ~11     ~10, '%22+does+not+exist+in+controller+%22'
         16        INIT_NS_FCALL_BY_NAME                                    'TYPO3%5CFlow%5CMvc%5CController%5Cget_class'
         17        FETCH_THIS                                       $12     
         18        SEND_VAR_EX                                              $12
         19        DO_FCALL                                      0  $13     
         20        CONCAT                                           ~14     ~11, $13
         21        CONCAT                                           ~15     ~14, '%22.'
         22        SEND_VAL_EX                                              ~15
         23        SEND_VAL_EX                                              1186669086
         24        DO_FCALL                                      0          
         25      > THROW                                         0          $9
  168    26    > > RETURN                                                   !0
  169    27*     > RETURN                                                   null

End of function resolveactionmethodname

Function initializeactionmethodarguments:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 13
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
2 jumps found. (Code = 77) Position 1 = 18, Position 2 = 64
Branch analysis from position: 18
2 jumps found. (Code = 78) Position 1 = 19, Position 2 = 64
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 26
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
2 jumps found. (Code = 43) Position 1 = 31, Position 2 = 47
Branch analysis from position: 31
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 47
2 jumps found. (Code = 43) Position 1 = 49, Position 2 = 52
Branch analysis from position: 49
1 jumps found. (Code = 42) Position 1 = 53
Branch analysis from position: 53
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
Branch analysis from position: 52
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
Branch analysis from position: 26
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 29
Branch analysis from position: 28
2 jumps found. (Code = 43) Position 1 = 31, Position 2 = 47
Branch analysis from position: 31
Branch analysis from position: 47
Branch analysis from position: 29
Branch analysis from position: 64
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 64
Branch analysis from position: 13
2 jumps found. (Code = 77) Position 1 = 18, Position 2 = 64
Branch analysis from position: 18
Branch analysis from position: 64
filename:       /in/tIvg0
function name:  initializeActionMethodArguments
number of ops:  66
compiled vars:  !0 = $actionMethodParameters, !1 = $methodParameters, !2 = $parameterInfo, !3 = $parameterName, !4 = $dataType, !5 = $defaultValue
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  182     0  E >   INIT_STATIC_METHOD_CALL                                  'getActionMethodParameters'
          1        CHECK_FUNC_ARG                                           
          2        FETCH_OBJ_FUNC_ARG                               $6      'objectManager'
          3        SEND_FUNC_ARG                                            $6
          4        DO_FCALL                                      0  $7      
          5        ASSIGN                                                   !0, $7
  183     6        FETCH_OBJ_R                                      ~9      'actionMethodName'
          7        ISSET_ISEMPTY_DIM_OBJ                         0          !0, ~9
          8      > JMPZ                                                     ~10, ->13
  184     9    >   FETCH_OBJ_R                                      ~11     'actionMethodName'
         10        FETCH_DIM_R                                      ~12     !0, ~11
         11        ASSIGN                                                   !1, ~12
         12      > JMP                                                      ->14
  186    13    >   ASSIGN                                                   !1, <array>
  189    14    >   FETCH_OBJ_R                                      ~15     'arguments'
         15        INIT_METHOD_CALL                                         ~15, 'removeAll'
         16        DO_FCALL                                      0          
  190    17      > FE_RESET_R                                       $17     !1, ->64
         18    > > FE_FETCH_R                                       ~18     $17, !2, ->64
         19    >   ASSIGN                                                   !3, ~18
  191    20        ASSIGN                                                   !4, null
  192    21        ISSET_ISEMPTY_DIM_OBJ                         0          !2, 'type'
         22      > JMPZ                                                     ~21, ->26
  193    23    >   FETCH_DIM_R                                      ~22     !2, 'type'
         24        ASSIGN                                                   !4, ~22
         25      > JMP                                                      ->29
  194    26    >   FETCH_DIM_R                                      ~24     !2, 'array'
         27      > JMPZ                                                     ~24, ->29
  195    28    >   ASSIGN                                                   !4, 'array'
  197    29    >   TYPE_CHECK                                    2          !4
         30      > JMPZ                                                     ~26, ->47
         31    >   NEW                                              $27     'TYPO3%5CFlow%5CMvc%5CException%5CInvalidArgumentTypeException'
         32        CONCAT                                           ~28     'The+argument+type+for+parameter+%24', !3
         33        CONCAT                                           ~29     ~28, '+of+method+'
         34        INIT_NS_FCALL_BY_NAME                                    'TYPO3%5CFlow%5CMvc%5CController%5Cget_class'
         35        FETCH_THIS                                       $30     
         36        SEND_VAR_EX                                              $30
         37        DO_FCALL                                      0  $31     
         38        CONCAT                                           ~32     ~29, $31
         39        CONCAT                                           ~33     ~32, '-%3E'
         40        FETCH_OBJ_R                                      ~34     'actionMethodName'
         41        CONCAT                                           ~35     ~33, ~34
         42        CONCAT                                           ~36     ~35, '%28%29+could+not+be+detected.'
         43        SEND_VAL_EX                                              ~36
         44        SEND_VAL_EX                                              1253175643
         45        DO_FCALL                                      0          
         46      > THROW                                         0          $27
  198    47    >   ISSET_ISEMPTY_DIM_OBJ                         0          !2, 'defaultValue'
         48      > JMPZ                                                     ~38, ->52
         49    >   FETCH_DIM_R                                      ~39     !2, 'defaultValue'
         50        QM_ASSIGN                                        ~40     ~39
         51      > JMP                                                      ->53
         52    >   QM_ASSIGN                                        ~40     null
         53    >   ASSIGN                                                   !5, ~40
  199    54        FETCH_OBJ_R                                      ~42     'arguments'
         55        INIT_METHOD_CALL                                         ~42, 'addNewArgument'
         56        SEND_VAR_EX                                              !3
         57        SEND_VAR_EX                                              !4
         58        FETCH_DIM_R                                      ~43     !2, 'optional'
         59        TYPE_CHECK                                    4  ~44     ~43
         60        SEND_VAL_EX                                              ~44
         61        SEND_VAR_EX                                              !5
         62        DO_FCALL                                      0          
  190    63      > JMP                                                      ->18
         64    >   FE_FREE                                                  $17
  201    65      > RETURN                                                   null

End of function initializeactionmethodarguments

Function getactionmethodparameters:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 14, Position 2 = 39
Branch analysis from position: 14
2 jumps found. (Code = 78) Position 1 = 15, Position 2 = 39
Branch analysis from position: 15
2 jumps found. (Code = 46) Position 1 = 20, Position 2 = 31
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 32, Position 2 = 38
Branch analysis from position: 32
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 38
Branch analysis from position: 31
Branch analysis from position: 39
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 39
filename:       /in/tIvg0
function name:  getActionMethodParameters
number of ops:  42
compiled vars:  !0 = $objectManager, !1 = $reflectionService, !2 = $result, !3 = $className, !4 = $methodNames, !5 = $methodName
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  210     0  E >   RECV                                             !0      
  211     1        INIT_METHOD_CALL                                         !0, 'get'
          2        SEND_VAL_EX                                              'TYPO3%5CFlow%5CReflection%5CReflectionService'
          3        DO_FCALL                                      0  $6      
          4        ASSIGN                                                   !1, $6
  213     5        ASSIGN                                                   !2, <array>
  215     6        INIT_NS_FCALL_BY_NAME                                    'TYPO3%5CFlow%5CMvc%5CController%5Cget_called_class'
          7        DO_FCALL                                      0  $9      
          8        ASSIGN                                                   !3, $9
  216     9        INIT_NS_FCALL_BY_NAME                                    'TYPO3%5CFlow%5CMvc%5CController%5Cget_class_methods'
         10        SEND_VAR_EX                                              !3
         11        DO_FCALL                                      0  $11     
         12        ASSIGN                                                   !4, $11
  217    13      > FE_RESET_R                                       $13     !4, ->39
         14    > > FE_FETCH_R                                               $13, !5, ->39
  218    15    >   INIT_NS_FCALL_BY_NAME                                    'TYPO3%5CFlow%5CMvc%5CController%5Cstrlen'
         16        SEND_VAR_EX                                              !5
         17        DO_FCALL                                      0  $14     
         18        IS_SMALLER                                       ~15     6, $14
         19      > JMPZ_EX                                          ~15     ~15, ->31
         20    >   INIT_NS_FCALL_BY_NAME                                    'TYPO3%5CFlow%5CMvc%5CController%5Cstrpos'
         21        SEND_VAR_EX                                              !5
         22        SEND_VAL_EX                                              'Action'
         23        INIT_NS_FCALL_BY_NAME                                    'TYPO3%5CFlow%5CMvc%5CController%5Cstrlen'
         24        SEND_VAR_EX                                              !5
         25        DO_FCALL                                      0  $16     
         26        SUB                                              ~17     $16, 6
         27        SEND_VAL_EX                                              ~17
         28        DO_FCALL                                      0  $18     
         29        TYPE_CHECK                                  1018  ~19     $18
         30        BOOL                                             ~15     ~19
         31    > > JMPZ                                                     ~15, ->38
  219    32    >   INIT_METHOD_CALL                                         !1, 'getMethodParameters'
         33        SEND_VAR_EX                                              !3
         34        SEND_VAR_EX                                              !5
         35        DO_FCALL                                      0  $21     
         36        ASSIGN_DIM                                               !2, !5
         37        OP_DATA                                                  $21
  217    38    > > JMP                                                      ->14
         39    >   FE_FREE                                                  $13
  223    40      > RETURN                                                   !2
  224    41*     > RETURN                                                   null

End of function getactionmethodparameters

Function initializeactionmethodvalidators:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 13
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 27
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
2 jumps found. (Code = 43) Position 1 = 37, Position 2 = 41
Branch analysis from position: 37
1 jumps found. (Code = 42) Position 1 = 42
Branch analysis from position: 42
2 jumps found. (Code = 77) Position 1 = 58, Position 2 = 83
Branch analysis from position: 58
2 jumps found. (Code = 78) Position 1 = 59, Position 2 = 83
Branch analysis from position: 59
2 jumps found. (Code = 43) Position 1 = 76, Position 2 = 79
Branch analysis from position: 76
1 jumps found. (Code = 42) Position 1 = 58
Branch analysis from position: 58
Branch analysis from position: 79
Branch analysis from position: 83
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 83
Branch analysis from position: 41
2 jumps found. (Code = 77) Position 1 = 58, Position 2 = 83
Branch analysis from position: 58
Branch analysis from position: 83
Branch analysis from position: 27
2 jumps found. (Code = 43) Position 1 = 37, Position 2 = 41
Branch analysis from position: 37
Branch analysis from position: 41
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 27
Branch analysis from position: 23
Branch analysis from position: 27
filename:       /in/tIvg0
function name:  initializeActionMethodValidators
number of ops:  85
compiled vars:  !0 = $validateGroupAnnotations, !1 = $validationGroups, !2 = $actionMethodParameters, !3 = $methodParameters, !4 = $actionValidateAnnotations, !5 = $validateAnnotations, !6 = $parameterValidators, !7 = $argument, !8 = $validator, !9 = $baseValidatorConjunction
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  237     0  E >   INIT_STATIC_METHOD_CALL                                  'getActionValidationGroups'
          1        CHECK_FUNC_ARG                                           
          2        FETCH_OBJ_FUNC_ARG                               $10     'objectManager'
          3        SEND_FUNC_ARG                                            $10
          4        DO_FCALL                                      0  $11     
          5        ASSIGN                                                   !0, $11
  238     6        FETCH_OBJ_R                                      ~13     'actionMethodName'
          7        ISSET_ISEMPTY_DIM_OBJ                         0          !0, ~13
          8      > JMPZ                                                     ~14, ->13
  239     9    >   FETCH_OBJ_R                                      ~15     'actionMethodName'
         10        FETCH_DIM_R                                      ~16     !0, ~15
         11        ASSIGN                                                   !1, ~16
         12      > JMP                                                      ->14
  241    13    >   ASSIGN                                                   !1, <array>
  244    14    >   INIT_STATIC_METHOD_CALL                                  'getActionMethodParameters'
         15        CHECK_FUNC_ARG                                           
         16        FETCH_OBJ_FUNC_ARG                               $19     'objectManager'
         17        SEND_FUNC_ARG                                            $19
         18        DO_FCALL                                      0  $20     
         19        ASSIGN                                                   !2, $20
  245    20        FETCH_OBJ_R                                      ~22     'actionMethodName'
         21        ISSET_ISEMPTY_DIM_OBJ                         0          !2, ~22
         22      > JMPZ                                                     ~23, ->27
  246    23    >   FETCH_OBJ_R                                      ~24     'actionMethodName'
         24        FETCH_DIM_R                                      ~25     !2, ~24
         25        ASSIGN                                                   !3, ~25
         26      > JMP                                                      ->28
  248    27    >   ASSIGN                                                   !3, <array>
  250    28    >   INIT_STATIC_METHOD_CALL                                  'getActionValidateAnnotationData'
         29        CHECK_FUNC_ARG                                           
         30        FETCH_OBJ_FUNC_ARG                               $28     'objectManager'
         31        SEND_FUNC_ARG                                            $28
         32        DO_FCALL                                      0  $29     
         33        ASSIGN                                                   !4, $29
  251    34        FETCH_OBJ_R                                      ~31     'actionMethodName'
         35        ISSET_ISEMPTY_DIM_OBJ                         0          !4, ~31
         36      > JMPZ                                                     ~32, ->41
  252    37    >   FETCH_OBJ_R                                      ~33     'actionMethodName'
         38        FETCH_DIM_R                                      ~34     !4, ~33
         39        ASSIGN                                                   !5, ~34
         40      > JMP                                                      ->42
  254    41    >   ASSIGN                                                   !5, <array>
  256    42    >   FETCH_OBJ_R                                      ~37     'validatorResolver'
         43        INIT_METHOD_CALL                                         ~37, 'buildMethodArgumentsValidatorConjunctions'
         44        INIT_NS_FCALL_BY_NAME                                    'TYPO3%5CFlow%5CMvc%5CController%5Cget_class'
         45        FETCH_THIS                                       $38     
         46        SEND_VAR_EX                                              $38
         47        DO_FCALL                                      0  $39     
         48        SEND_VAR_NO_REF_EX                                       $39
         49        CHECK_FUNC_ARG                                           
         50        FETCH_OBJ_FUNC_ARG                               $40     'actionMethodNa

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
265.55 ms | 1428 KiB | 32 Q