Packageindex Classtrees Modulegroups Elementlist Report XML Files

File: /home/cch/www/pear/PHPDoc/filehandler/PhpdocFileHandler.php
PEAR Repository - PHPDoc

PhpdocFileHandler

PhpdocObject
   |
  +-- PhpdocFileHandler

File handling functions in phpdoc.

 

private class PhpdocFileHandler extends PhpdocObject

File handling functions in phpdoc.

AuthorsUlf Wendel <ulf@redsys.de>
Version0.1alpha

 

Methods inherited from PhpdocObject

setflagoutput, out, nametourl, outl, introspection

Public Method Summary

array

Get(string $files)

Reads a list of files or one file.
bool

setFilePath(string $path)

Sets the filepath. The path is automatically added in front of all filenames

Private Method Summary

string

getFile(string $filename)

Reads a file.
void

createFile( $filename, $content, string $directory)

Creates a new file.

Create or overrides a file in a specified directory. If the
directory does not exists, it attempts to create it.
array

getFilesInDirectory(string $directory, [ string $suffix, boolean $flag_subdir, string $files ])

Returns a list of files in a specified directory
void

appendToFile( $filename, $content, string $directory)

Fields inherited from PhpdocObject

$err, $flag_output, $application, $warn

Private Field Summary

string

$path

Filepath. The path is automatically added in front of all filenames

Public Method Details

Get

public array Get( string $files )

  Reads a list of files or one file.

Parameter
string $files
filename
Returns array $contents

file contents indexed by filename

Throws PhpdocError

setFilePath

public bool setFilePath( string $path )

  Sets the filepath. The path is automatically added in front of all filenames

Parameter
string $path
Returns bool $ok


Private Method Details

getFile

private string getFile( string $filename )

  Reads a file.

Parameter
string $filename
Returns string $content

Throws PhpdocError

createFile

private void createFile( $filename, $content, string $directory )

  Creates a new file.

Create or overrides a file in a specified directory. If the
directory does not exists, it attempts to create it.

Parameter
$filename
$content
string $directory
Returns void


getFilesInDirectory

private array getFilesInDirectory( string $directory, [ string $suffix, boolean $flag_subdir, string $files ] )

  Returns a list of files in a specified directory

Parameter
string $directory
string $suffix = >>""<<
Suffix of the files returned
boolean $flag_subdir = >>true<<
include subdirectories?
string $files = >>""<<
New entries are added to this variable if provided.
Used only for the subdir feature.
Returns array $files

Throws PhpdocError

appendToFile

private void appendToFile( $filename, $content, string $directory )

 

Parameter
$filename
$content
string $directory
Returns void


Private Field Details

$path

private string $path

>>""<<

See Also setFilePath()


Packageindex Classtrees Modulegroups Elementlist Report XML Files
PHPDoc 1.0beta