/** * @return string */ public function render() { $attributes = ''; foreach ($this->attributes->getAll() as $type => $values) { $attributes .= $this->renderField($type, $this->renderAttributeValues($values)); } return $attributes; }
/** * @param string $classes * @return ElementContainer */ public function addCssClasses($classes) { /** @var AbstractElement[] $elementsIterator */ $elementsIterator = $this->elements->getAll(); foreach ($elementsIterator as $elements) { $elements->addCssClasses($classes); } return $this; }
/** * @return array */ public function getControllerDirectories() { return $this->controllerDirectories->getAll(); }
/** * Data with the same key will be overridden * * @param array $data */ public function addData(array $data) { $this->data->setData($data); }
public function testGetStoreSetValue() { $config = new Store(); $config->set('test', 'foo'); $this->assertSame('foo', $config->get('test')); }
/** * @return string */ public static function getLocale() { return static::$store->get('locale'); }
/** * @param string $key * @param string $value * * @return Response */ public function setHeader($key, $value) { $this->headers->set($key, $value); return $this; }
/** * @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.'); }
/** * @return Store */ public function getConfig() { $store = new Store(require ROOT . '/config/public.php'); $store->setData(require ROOT . '/config/private.php'); return $store; }