public function AddSource($header_name, &$content, $subdir="src")
    {
        if($subdir)
        {
            $subdir = trim($subdir, "\\/") . "/";
            
            if(!file_exists($this->output_path . $subdir))
                \Peg\Lib\Utilities\FileSystem::MakeDir(
                    $this->output_path . $subdir, 
                    0755, 
                    true
                );
        }
        
        $header = $this->output_path 
            . $subdir
            . $this->GetSourceNamePHP($header_name)
        ;
        
        \Peg\Lib\Utilities\FileSystem::WriteFileIfDifferent($header, $content);
    }
public function AddSource($header_name, &$content, $subdir="src")
    {
        if($subdir)
        {
            $subdir = trim($subdir, "\\/") . "/";
            
            if(!file_exists($this->output_path . $subdir))
                \Peg\Lib\Utilities\FileSystem::MakeDir(
                    $this->output_path . $subdir, 
                    0755, 
                    true
                );
        }
        
        $header = $this->output_path 
            . $subdir
            . $this->GetSourceNamePHP($header_name)
        ;
        
        \Peg\Lib\Utilities\FileSystem::WriteFileIfDifferent($header, $content);
    }
public function AddSource ( $ header_name , & $ content , $ subdir = "src" ) { if ( $ subdir ) { $ subdir = trim ( $ subdir , "\\/" ) . "/" ; if ( ! file_exists ( $ this -> output_path . $ subdir ) ) \ Peg \ Lib \ Utilities \ FileSystem :: MakeDir ( $ this -> output_path . $ subdir , 0755 , true ) ; } $ header = $ this -> output_path . $ subdir . $ this -> GetSourceNamePHP ( $ header_name ) ; \ Peg \ Lib \ Utilities \ FileSystem :: WriteFileIfDifferent ( $ header , $ content ) ; }
Adds or updates a header source file if neccessary.
@param string $header_name Original name of header.
@param string $content
@param string $subdir
Adds or updates a header source file if neccessary .