public static function processOsSpecificTemplate($os, $template, $override = false, $mode = 0644)
    {

        // prepare the target filename
        $targetFile = Setup::prepareOsSpecificPath($template);

        // query whether we've to override the file
        if ($override === false && is_file($targetFile) === true) {
            return;
        }

        // prepare the target directory
        Setup::prepareDirectory($template);

        // process the template and store the result in the passed file
        ob_start();
        include Setup::prepareOsSpecificPath(sprintf('resources/templates/os-specific/%s/%s.phtml', $os, $template));
        file_put_contents($targetFile, ob_get_clean());

        // set the correct mode for the file
        Setup::changeFilePermissions($template, $mode);
    }
public static function processOsSpecificTemplate($os, $template, $override = false, $mode = 0644)
    {

        // prepare the target filename
        $targetFile = Setup::prepareOsSpecificPath($template);

        // query whether we've to override the file
        if ($override === false && is_file($targetFile) === true) {
            return;
        }

        // prepare the target directory
        Setup::prepareDirectory($template);

        // process the template and store the result in the passed file
        ob_start();
        include Setup::prepareOsSpecificPath(sprintf('resources/templates/os-specific/%s/%s.phtml', $os, $template));
        file_put_contents($targetFile, ob_get_clean());

        // set the correct mode for the file
        Setup::changeFilePermissions($template, $mode);
    }
public static function processOsSpecificTemplate ( $ os , $ template , $ override = false , $ mode = 0644 ) { // prepare the target filename $ targetFile = Setup :: prepareOsSpecificPath ( $ template ) ; // query whether we've to override the file if ( $ override === false && is_file ( $ targetFile ) === true ) { return ; } // prepare the target directory Setup :: prepareDirectory ( $ template ) ; // process the template and store the result in the passed file ob_start ( ) ; include Setup :: prepareOsSpecificPath ( sprintf ( 'resources/templates/os-specific/%s/%s.phtml' , $ os , $ template ) ) ; file_put_contents ( $ targetFile , ob_get_clean ( ) ) ; // set the correct mode for the file Setup :: changeFilePermissions ( $ template , $ mode ) ; }
Processes the OS specific template and replace the properties with the OS specific values.

@param string  $os       The OS we want to process the template for
@param string  $template The path to the template
@param boolean $override TRUE if the file should be overwritten if exists, else FALSE
@param integer $mode     The mode of the target file

@return void
Processes the OS specific template and replace the properties with the OS specific values .