src/File.php
public function output() {
        $parts = explode('/', $this->output_path);
        // get rid of the filename
        array_pop($parts);

        $path = implode('/', $parts);
        if ($path && !file_exists($path)) {
            if (!mkdir($path, 0777, true)) {
                throw new \Exception("could not make directory $path");
            }
        }

        if (!file_put_contents($this->output_path, $this->render())) {
            throw new \Exception("could not write $filename");
        }
    }
public function output() {
        $parts = explode('/', $this->output_path);
        // get rid of the filename
        array_pop($parts);

        $path = implode('/', $parts);
        if ($path && !file_exists($path)) {
            if (!mkdir($path, 0777, true)) {
                throw new \Exception("could not make directory $path");
            }
        }

        if (!file_put_contents($this->output_path, $this->render())) {
            throw new \Exception("could not write $filename");
        }
    }
public function output ( ) { $ parts = explode ( '/' , $ this -> output_path ) ; // get rid of the filename array_pop ( $ parts ) ; $ path = implode ( '/' , $ parts ) ; if ( $ path && ! file_exists ( $ path ) ) { if ( ! mkdir ( $ path , 0777 , true ) ) { throw new \ Exception ( "could not make directory $path" ) ; } } if ( ! file_put_contents ( $ this -> output_path , $ this -> render ( ) ) ) { throw new \ Exception ( "could not write $filename" ) ; } }
this file now has it's contents and it parsed
we just need to put it where it needs to go
this file now has it s contents and it parsed we just need to put it where it needs to go