src/FS/File/PHP/Encoder.php
public function encodeFile( $fileName, $overwrite = FALSE )
	{
		if( !file_exists( $fileName ) )
			return FALSE;
		if( $this->isEncoded( $fileName ) )
			return TRUE;
		$php		= FS_File_Reader::load( $fileName );
		$code		= $this->encode( $php );
		$dirname	= dirname( $fileName );
		$basename	= basename( $fileName );
		$target		= $dirname."/".$this->filePrefix.$basename.$this->fileSuffix;
		if( $fileName == $target && !$overwrite )
			throw new RuntimeException( 'File cannot be overwritten, use Parameter "overwrite".' );
//		copy( $fileName, "#".$fileName );
		return (bool) FS_File_Writer::save( $target, $code );
	}
public function encodeFile( $fileName, $overwrite = FALSE )
	{
		if( !file_exists( $fileName ) )
			return FALSE;
		if( $this->isEncoded( $fileName ) )
			return TRUE;
		$php		= FS_File_Reader::load( $fileName );
		$code		= $this->encode( $php );
		$dirname	= dirname( $fileName );
		$basename	= basename( $fileName );
		$target		= $dirname."/".$this->filePrefix.$basename.$this->fileSuffix;
		if( $fileName == $target && !$overwrite )
			throw new RuntimeException( 'File cannot be overwritten, use Parameter "overwrite".' );
//		copy( $fileName, "#".$fileName );
		return (bool) FS_File_Writer::save( $target, $code );
	}
public function encodeFile ( $ fileName , $ overwrite = FALSE ) { if ( ! file_exists ( $ fileName ) ) return FALSE ; if ( $ this -> isEncoded ( $ fileName ) ) return TRUE ; $ php = FS_File_Reader :: load ( $ fileName ) ; $ code = $ this -> encode ( $ php ) ; $ dirname = dirname ( $ fileName ) ; $ basename = basename ( $ fileName ) ; $ target = $ dirname . "/" . $ this -> filePrefix . $ basename . $ this -> fileSuffix ; if ( $ fileName == $ target && ! $ overwrite ) throw new RuntimeException ( 'File cannot be overwritten, use Parameter "overwrite".' ) ; //		copy( $fileName, "#".$fileName );
 return ( bool ) FS_File_Writer :: save ( $ target , $ code ) ; }
Encodes a PHP File.
@access		public
@return		void
Encodes a PHP File .