Zephir\Compiler::stubs PHP Method

stubs() public method

Generate IDE stubs
public stubs ( Zephir\Commands\CommandInterface $command, boolean $fromGenerate = false )
$command Zephir\Commands\CommandInterface
$fromGenerate boolean
    public function stubs(CommandInterface $command, $fromGenerate = false)
    {
        if (!$fromGenerate) {
            $this->generate($command);
        }
        $this->logger->output('Generating stubs...');
        $stubsGenerator = new Stubs\Generator($this->files, $this->config);
        $path = $this->config->get('path', 'stubs');
        $path = str_replace('%version%', $this->config->get('version'), $path);
        $path = str_replace('%namespace%', ucfirst($this->config->get('namespace')), $path);
        $stubsGenerator->generate($path);
    }