示例#1
0
文件: Json.php 项目: imjerrybao/phpbu
 /**
  * Set the phpbu application settings.
  *
  * @param \phpbu\App\Configuration $configuration
  */
 public function setAppSettings(Configuration $configuration)
 {
     if (isset($this->json['bootstrap'])) {
         $configuration->setBootstrap($this->toAbsolutePath($this->json['bootstrap']));
     }
     if (isset($this->json['verbose'])) {
         $configuration->setVerbose($this->json['verbose']);
     }
     if (isset($this->json['colors'])) {
         $configuration->setColors($this->json['colors']);
     }
 }
示例#2
0
 /**
  * Set the phpbu application settings.
  *
  * @param  \phpbu\App\Configuration $configuration
  */
 public function setAppSettings(Configuration $configuration)
 {
     $root = $this->document->documentElement;
     if ($root->hasAttribute('bootstrap')) {
         $configuration->setBootstrap($this->toAbsolutePath($root->getAttribute('bootstrap')));
     }
     if ($root->hasAttribute('verbose')) {
         $configuration->setVerbose(Str::toBoolean($root->getAttribute('verbose'), false));
     }
     if ($root->hasAttribute('colors')) {
         $configuration->setColors(Str::toBoolean($root->getAttribute('colors'), false));
     }
 }