예제 #1
0
 /**
  * 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));
 }
예제 #2
0
 /**
  * Get is silent (for test and command).
  *
  * @return boolean
  * @since 0.1.0
  */
 public function isSilent()
 {
     return $this->enviorment->isSilent();
 }
예제 #3
0
파일: Session.php 프로젝트: kszere/cd-sms
 public function __construct(Enviorment $enviorment)
 {
     if (!$enviorment->isSilent()) {
         session_start();
     }
 }