/** * @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, '\\'); }
/** * @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; } }