示例#1
0
文件: Json.php 项目: imjerrybao/phpbu
 /**
  * Set the php settings.
  * Checking for include_path and ini settings.
  *
  * @param \phpbu\App\Configuration $configuration
  */
 public function setPhpSettings(Configuration $configuration)
 {
     if (isset($this->json['php'])) {
         if (isset($this->json['php']['includePath'])) {
             foreach ($this->json['php']['includePath'] as $path) {
                 $configuration->addIncludePath($this->toAbsolutePath($path));
             }
         }
         if (isset($this->json['php']['ini'])) {
             foreach ($this->json['php']['ini'] as $name => $value) {
                 $configuration->addIniSetting($name, $value);
             }
         }
     }
 }
示例#2
0
 /**
  * Set the php settings.
  * Checking for include_path and ini settings.
  *
  * @param  \phpbu\App\Configuration $configuration
  */
 public function setPhpSettings(Configuration $configuration)
 {
     foreach ($this->xpath->query('php/includePath') as $includePath) {
         $path = $includePath->nodeValue;
         if ($path) {
             $configuration->addIncludePath($this->toAbsolutePath($path));
         }
     }
     foreach ($this->xpath->query('php/ini') as $ini) {
         /** @var DOMElement $ini */
         $name = $ini->getAttribute('name');
         $value = $ini->getAttribute('value');
         $configuration->addIniSetting($name, $value);
     }
 }