classes/phing/Phing.php
protected static function initWrite($buildfilePath)
    {
        // Overwriting protection
        if (file_exists($buildfilePath)) {
            throw new ConfigurationException('Cannot overwrite existing file.');
        }

        $content = '<?xml version="1.0" encoding="UTF-8" ?>' . PHP_EOL;
        $content .= '' . PHP_EOL;
        $content .= '<project name="" description="" default="">' . PHP_EOL;
        $content .= '    ' . PHP_EOL;
        $content .= '    <target name="" description="">' . PHP_EOL;
        $content .= '        ' . PHP_EOL;
        $content .= '    </target>' . PHP_EOL;
        $content .= '    ' . PHP_EOL;
        $content .= '</project>' . PHP_EOL;

        file_put_contents($buildfilePath, $content);
    }
protected static function initWrite($buildfilePath)
    {
        // Overwriting protection
        if (file_exists($buildfilePath)) {
            throw new ConfigurationException('Cannot overwrite existing file.');
        }

        $content = '<?xml version="1.0" encoding="UTF-8" ?>' . PHP_EOL;
        $content .= '' . PHP_EOL;
        $content .= '<project name="" description="" default="">' . PHP_EOL;
        $content .= '    ' . PHP_EOL;
        $content .= '    <target name="" description="">' . PHP_EOL;
        $content .= '        ' . PHP_EOL;
        $content .= '    </target>' . PHP_EOL;
        $content .= '    ' . PHP_EOL;
        $content .= '</project>' . PHP_EOL;

        file_put_contents($buildfilePath, $content);
    }
protected static function initWrite ( $ buildfilePath ) { // Overwriting protection if ( file_exists ( $ buildfilePath ) ) { throw new ConfigurationException ( 'Cannot overwrite existing file.' ) ; } $ content = '<?xml version="1.0" encoding="UTF-8" ?>' . PHP_EOL ; $ content .= '' . PHP_EOL ; $ content .= '<project name="" description="" default="">' . PHP_EOL ; $ content .= '    ' . PHP_EOL ; $ content .= '    <target name="" description="">' . PHP_EOL ; $ content .= '        ' . PHP_EOL ; $ content .= '    </target>' . PHP_EOL ; $ content .= '    ' . PHP_EOL ; $ content .= '</project>' . PHP_EOL ; file_put_contents ( $ buildfilePath , $ content ) ; }
Writes sample buildfile

If $buildfilePath does not exist, the buildfile is created.

@param $buildfilePath buildfile's location

@return null
@throws ConfigurationException
Writes sample buildfile