コード例 #1
0
ファイル: ConfigMapper.php プロジェクト: svobodni/web
 public function saveConfig()
 {
     $values = $this->data;
     $this->loadConfig();
     $data =& $this->data;
     foreach ($this->root as $item) {
         $data =& $data[$item];
     }
     $data = $data ?: array();
     $data = Arrays::mergeTree($values, $data);
     file_put_contents($this->fileName, $this->adapter->dump($this->data));
     if (function_exists('opcache_reset')) {
         opcache_reset();
     }
 }
コード例 #2
0
 /**
  * @param string                $Project
  * @param string                $Title
  * @param DirectoryParameter    $Source
  * @param DirectoryParameter    $Destination
  * @param null|ExcludeParameter $Exclude
  */
 public function __construct($Project, $Title, DirectoryParameter $Source, DirectoryParameter $Destination, ExcludeParameter $Exclude = null)
 {
     AutoLoader::getNamespaceAutoLoader('ApiGen', __DIR__ . '/../../../Vendor/ApiGen');
     AutoLoader::getNamespaceAutoLoader('TokenReflection', __DIR__ . '/../../../Vendor/ApiGen/libs/TokenReflection');
     AutoLoader::getNamespaceAutoLoader('FSHL', __DIR__ . '/../../../Vendor/ApiGen/libs/FSHL');
     $this->Project = $Project;
     $this->Title = $Title;
     $this->Source = $Source;
     $this->Destination = $Destination;
     $this->Exclude = $Exclude;
     set_time_limit(0);
     $Config = $this->getConfig();
     require_once __DIR__ . '/../../../Vendor/ApiGen/libs/Nette/Nette/loader.php';
     $Neon = new NeonAdapter();
     $File = FileSystem::getFileWriter(__DIR__ . '/ApiGen.config');
     file_put_contents($File->getLocation(), $Neon->dump($Config));
     $_SERVER['argv'] = array('DUMMY-SHELL-ARGS', '--config', $File->getLocation());
     include __DIR__ . '/../../../Vendor/ApiGen/apigen.php';
 }
コード例 #3
0
ファイル: ConfigBuilder.php プロジェクト: svobodni/web
 /**
  * Save data
  */
 public function save()
 {
     file_put_contents($this->fileName, $this->adapter->dump((array) $this->data));
     $this->load();
 }
コード例 #4
0
ファイル: BaseInstaller.php プロジェクト: svobodni/web
 /**
  * @param $data
  */
 public function saveConfig($data)
 {
     $config = new NeonAdapter();
     file_put_contents($this->getConfigPath(), $config->dump($data));
 }