includes/Utils.php
/**
     * Utility function for creating new file and write provided contents
     *
     * @param string $filePath
     * @param string $contents
     * @param integer $permission
     * @return boolean
     */
Utility function for creating new file and write provided contents
@param string $filePath
@param string $contents
@param integer $permission
@return boolean
Utility function for creating new file and write provided contents @param string $filePath @param string $contents @param integer $permission @return boolean
public static function createNewFile($filePath, $contents, $permission = 777) {
        $fp = fopen($filePath, 'w+');
        if ($fp) {
            fwrite($fp, $contents);
            fclose($fp);
            return true;
        } else {
            Logger::getLogger()->LogFatal("Could not open file " . $filePath);
            return false;
        }
    }
public static function createNewFile ( $ filePath , $ contents , $ permission = 777 ) { $ fp = fopen ( $ filePath , 'w+' ) ; if ( $ fp ) { fwrite ( $ fp , $ contents ) ; fclose ( $ fp ) ; return true ; } else { Logger :: getLogger ( ) -> LogFatal ( " Could not open file  " . $ filePath ) ; return false ; } }
Utility function for creating new file and write provided contents
 @param string $filePath
 @param string $contents
 @param integer $permission
 @return boolean
Utility function for creating new file and write provided contents @param string $filePath @param string $contents @param integer $permission @return boolean