Пример #1
0
 /**
  * Resolves and checks the current command method name
  *
  * Note: The resulting command method name might not have the correct case, which isn't a problem because PHP is
  * case insensitive regarding method names.
  *
  * @throws \TYPO3\CMS\Extbase\Mvc\Exception\NoSuchCommandException
  * @return string Method name of the current command
  */
 protected function resolveCommandMethodName()
 {
     $commandMethodName = $this->request->getControllerCommandName() . 'Command';
     if (!is_callable(array($this, $commandMethodName))) {
         throw new \TYPO3\CMS\Extbase\Mvc\Exception\NoSuchCommandException('A command method "' . $commandMethodName . '()" does not exist in controller "' . get_class($this) . '".', 1300902143);
     }
     return $commandMethodName;
 }
Пример #2
0
 /**
  * Resolves and checks the current command method name
  *
  * Note: The resulting command method name might not have the correct case, which isn't a problem because PHP is
  * case insensitive regarding method names.
  *
  * @throws \TYPO3\CMS\Extbase\Mvc\Exception\NoSuchCommandException
  * @return string Method name of the current command
  * @throws NoSuchCommandException
  */
 protected function resolveCommandMethodName()
 {
     $commandMethodName = $this->request->getControllerCommandName() . 'Command';
     if (!is_callable([$this, $commandMethodName])) {
         throw new NoSuchCommandException(sprintf('A command method "%s()" does not exist in controller "%s".', $commandMethodName, get_class($this)), 1300902143);
     }
     return $commandMethodName;
 }