src/FileManager.php
public function execute(string $layer = 'all')
    {
        switch ($layer) {
            case self::LAYER_ALL:
                $streams = [self::LAYER_MODEL, self::LAYER_REPOSITORY, self::LAYER_CONTROLLER];
                break;
            default:
                $streams = [$layer];
        }

        $this->stream = [];
        foreach ($streams as $stream) {
            $template = dirname(__DIR__, 2) . '/' . TEMPLATE_DIR . '/' . $stream . $this->extension;
            $this->stream[$stream] = File::read($template);
        }

        if ($this->stream && is_array($this->stream)) {
            $this->replace();
            $this->save();
        }
    }
public function execute(string $layer = 'all')
    {
        switch ($layer) {
            case self::LAYER_ALL:
                $streams = [self::LAYER_MODEL, self::LAYER_REPOSITORY, self::LAYER_CONTROLLER];
                break;
            default:
                $streams = [$layer];
        }

        $this->stream = [];
        foreach ($streams as $stream) {
            $template = dirname(__DIR__, 2) . '/' . TEMPLATE_DIR . '/' . $stream . $this->extension;
            $this->stream[$stream] = File::read($template);
        }

        if ($this->stream && is_array($this->stream)) {
            $this->replace();
            $this->save();
        }
    }
Generate streams of layer(s)
@param string $layer (self::LAYER_ALL)