/** * Parse events node * * @param \Arbor\Parser\XML $dataXML * @throws \InvalidConfigKeyException * @since 0.1.0 */ private function appendEvent($dataXML) { $arguments = $this->getArguments($dataXML, array('bind', 'class', 'method')); $config = array(); $serviceArguments = array(); foreach ($dataXML as $xmlKey => $xmlValue) { switch ($xmlKey) { case 'config': $configData = $this->getArguments($xmlValue, array('enviorment')); if ($configData['enviorment'] == $this->enviorment->getName()) { $config = $this->appendConfig($xmlValue, $arguments); } break; default: throw new InvalidConfigKeyException($xmlKey); } } $this->setEventData($arguments['bind'], array('class' => $arguments['class'], 'method' => $arguments['method'], 'config' => $config)); }
/** * Get is silent (for test and command). * * @return boolean * @since 0.1.0 */ public function isSilent() { return $this->enviorment->isSilent(); }
public function __construct(Enviorment $enviorment) { if (!$enviorment->isSilent()) { session_start(); } }