Example #1
0
 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();
     }
 }
 /**
  * @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';
 }
Example #3
0
 /**
  * Save data
  */
 public function save()
 {
     file_put_contents($this->fileName, $this->adapter->dump((array) $this->data));
     $this->load();
 }
Example #4
0
 /**
  * @param $data
  */
 public function saveConfig($data)
 {
     $config = new NeonAdapter();
     file_put_contents($this->getConfigPath(), $config->dump($data));
 }