예제 #1
0
 /**
  * @param PhrestSDK $sdk
  * @param string    $namespace
  */
 public function __construct(PhrestSDK $sdk, $namespace = 'SDK')
 {
     $this->sdk = $sdk;
     $this->config = $this->sdk->app->di->get('config');
     Files::$outputDir = $this->sdk->srcDir;
     Generator::$namespace = rtrim($namespace, '\\');
 }
예제 #2
0
 /**
  * @param PhrestSDK $sdk
  * @param Config    $config
  * @param string    $namespace
  */
 public function __construct(PhrestSDK $sdk, $config, $namespace = 'SDK')
 {
     $this->sdk = $sdk;
     $this->config = $config;
     self::$name = $config->name;
     Files::$outputDir = rtrim($this->sdk->srcDir, '/');
     Generator::$namespace = rtrim($namespace, '\\');
     if (getenv('FORCE')) {
         self::$force = true;
     }
 }