示例#1
0
 /**
  * @param Container $app
  */
 public function __construct(Container $app)
 {
     parent::__construct($app);
     // Set PHP as parent
     $php = new Php($this->app);
     $this->setParent($php);
 }
 /**
  * Build command options, including the configured root directory
  * option, if not specified already.
  *
  * @param string|\string[] $flags
  *
  * @return string
  */
 protected function buildOptions($flags)
 {
     if ($magento_root = $this->config->get('rocketeer-magento::magento_root')) {
         if (!isset($flags['--root-dir'])) {
             $flags['--root-dir'] = $magento_root;
         }
     }
     return parent::buildOptions($flags);
 }
示例#3
0
 public function __call($method, $args)
 {
     $aliases = array('advagg-clear-all-files' => 'advaggClearAllFiles', 'advagg-caf' => 'advaggClearAllFiles', 'cache-rebuild' => 'cacheRebuild', 'cr' => 'cacheRebuild', 'rebuild' => 'cacheRebuild', 'config-import' => 'configImport', 'cim' => 'configImport', 'drupal-directory' => 'drupalDirectory', 'dd' => 'drupalDirectory', 'site-set' => 'siteSet', 'use' => 'siteSet', 'sql-dump' => 'sqlDump', 'updb' => 'updatedb', 'views-dev' => 'viewsDev', 'vd' => 'viewsDev');
     if (array_key_exists($method, $aliases)) {
         return call_user_func_array([$this, $aliases[$method]], $args);
     } else {
         $parent = get_parent_class();
         if ($parent && (method_exists($parent, $method) || method_exists($parent, '__call'))) {
             return parent::__call($method, $args);
         }
     }
 }