private function save()
    {
        foreach ($this->stream as $key => $file) {
            $layer = ucwords($key);
            $namespace = Text::replace($this->namespace, '\\', '/');
            $root = Text::replace("{$this->directory}/{$namespace}/{$layer}", '//', '/');

            $success = true;
            if (!Directory::exists($root)) {
                $success = Directory::make($root);
            }
            if (!$success) {
                return false;
            }
            $class = $this->class . (($key !== 'model') ? $layer : '');

            $filename = "{$root}/{$class}.php";

            return !!File::write($filename, $file);
        }
        return false;
    }
private function save()
    {
        foreach ($this->stream as $key => $file) {
            $layer = ucwords($key);
            $namespace = Text::replace($this->namespace, '\\', '/');
            $root = Text::replace("{$this->directory}/{$namespace}/{$layer}", '//', '/');

            $success = true;
            if (!Directory::exists($root)) {
                $success = Directory::make($root);
            }
            if (!$success) {
                return false;
            }
            $class = $this->class . (($key !== 'model') ? $layer : '');

            $filename = "{$root}/{$class}.php";

            return !!File::write($filename, $file);
        }
        return false;
    }
private function save ( ) { foreach ( $ this -> stream as $ key => $ file ) { $ layer = ucwords ( $ key ) ; $ namespace = Text :: replace ( $ this -> namespace , '\\' , '/' ) ; $ root = Text :: replace ( "{$this->directory}/{$namespace}/{$layer}" , '//' , '/' ) ; $ success = true ; if ( ! Directory :: exists ( $ root ) ) { $ success = Directory :: make ( $ root ) ; } if ( ! $ success ) { return false ; } $ class = $ this -> class . ( ( $ key !== 'model' ) ? $ layer : '' ) ; $ filename = "{$root}/{$class}.php" ; return ! ! File :: write ( $ filename , $ file ) ; } return false ; }
Write the template on disk
@return bool
Write the template on disk