Beispiel #1
0
 /**
  * @param string $controller
  *
  * @return string
  */
 private function buildController($controller)
 {
     $controller = ClassHelper::pathToNamespace(ClassHelper::snakeToCamel($controller));
     $controllerClassString = ($this->extendByParentNamespace ? $controller : '') . self::CONTROLLER_CLASS;
     $controllerClassString = $controller . '\\' . $controllerClassString;
     return $controllerClassString;
 }
 /**
  * @param string $class
  * @param string $excepted
  * @param string $prefix
  * @param bool $withoutBasename
  * @dataProvider dataProviderNamespaceToPath
  */
 public function testNamespaceToPath($class, $excepted, $prefix, $withoutBasename)
 {
     $this->assertEquals($excepted, ClassHelper::namespaceToPath($class, $prefix, $withoutBasename));
 }
Beispiel #3
-1
 /**
  * @return AbstractHtmlElement
  *
  * @throws NotExistsException
  */
 private function getSubmitElement()
 {
     $elementsIterator = $this->elements->getAll();
     foreach ($elementsIterator as $element) {
         if (ClassHelper::extractClass(get_class($element)) === 'SubmitElement') {
             return $element;
         }
     }
     throw new NotExistsException('The form "' . $this->attributes->get('id') . '" has no submit element.');
 }