phpDocumentor
[ class tree: phpDocumentor ] [ index: phpDocumentor ] [ all elements ]

Class: Io

Source Location: /PhpDocumentor-1.3.2/phpDocumentor/Io.inc

Class Overview


Class to handle file and user io opperations


Author(s):

Version:

  • $Id: Io.inc,v 1.15.2.3 2007/03/29 19:09:42 ashnazg Exp $

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 50]
Class to handle file and user io opperations


[ Top ]


Class Variables

$ignore =  false

[line 63]

Format: array(array(regexp-ready string to search for whole path,

regexp-ready string to search for basename of ignore strings),...)


Type:   false|array


[ Top ]

$phpDocOptions =

[line 57]

Holds all the options that are avaible to the cmd line interface

and to the different web interfaces


Type:   mixed


[ Top ]

$valid_booleans = array
    (
        '', ' ', 'on', 'On', 'ON', 'y', 'Y', 'yes', 'Yes', 'YES', 'true', 'True', 'TRUE', '1', 
        'off', 'Off', 'OFF', 'n', 'N', 'no', 'No', 'NO', 'false', 'False', 'FALSE', '0'
    )

[line 69]

A specific array of values that boolean-based arguments can understand, aided by the decideOnOrOff() helper method.

Type:   array


[ Top ]



Method Detail

Io (Constructor)   [line 84]

Io Io( )

creates an array $this->phpDocOptions and sets program options in it.

Array is in the format of:

 [filename][tag][] = "f";
 [filename][tag][] = "-file";
 [filename][desc] "name of file to parse"


[ Top ]

checkIgnore   [line 654]

bool checkIgnore( string $file, string $path, array $ignore, [ $ignore_no_ext = true])

Tell whether to ignore a file or a directory allows * and ? wildcards

Parameters:

string   $file   —  just the file name of the file or directory, in the case of directories this is the last dir
string   $path   —  the full path
array   $ignore   — 
   $ignore_no_ext   — 

[ Top ]

dirList   [line 336]

array dirList( string $directory, [off|on $hidden = "off"])

  • Return: list of files in a directory

Parameters:

string   $directory   —  full path to the directory you want the list of
off|on   $hidden   —  whether to list files that begin with . like .bash_history

[ Top ]

displayHelpMsg   [line 191]

string displayHelpMsg( )

create the help message for display on the command-line
  • Return: a string containing a help message

[ Top ]

getAllFiles   [line 816]

mixed getAllFiles( string $file)

Take a filename with wildcards and return all files that match the

wildcards

  • Return: if $file contains wildcards, returns an array of matching files, otherwise returns false
  • Author: Greg Beaver <cellog@users.sourceforge.net>

Parameters:

string   $file   —  a full path from the -f command-line parameter, with potential * and ? wildcards.

[ Top ]

getBase   [line 398]

void getBase( array $filelist)

Retrieve common directory (case-insensitive in windows)

takes the list of files, and returns the subdirectory they share in common, so in this list:

  1.  array(
  2.  "/dir1/dir2/subdir/dir3/filename.ext",
  3.  "/dir1/dir2/subdir/dir4/filename.ext",
  4.  "/dir1/dir2/mydir/dir5/filename.ext");

getBase will return "/dir1/dir2"


Parameters:

array   $filelist   —  array of strings

[ Top ]

getDirTree   [line 508]

void getDirTree( $dir, $base_dir, [ $ignore = array()], [ $hidden = "off"])


Parameters:

   $dir   — 
   $base_dir   — 
   $ignore   — 
   $hidden   — 

[ Top ]

getReadmeInstallChangelog   [line 491]

array getReadmeInstallChangelog( string $base, array $filelist)

  • Return: array(filelist - README/INSTALL/CHANGELOG, README/INSTALL/CHANGELOG)

Parameters:

string   $base   —  base directory from getBase()
array   $filelist   —  file list from dirList()

[ Top ]

getRegExpableSearchString   [line 762]

string getRegExpableSearchString( string $s)

Converts $s into a string that can be used with preg_match

Parameters:

string   $s   —  string with wildcards ? and *

[ Top ]

getTutorials   [line 447]

array getTutorials( array $filelist)

Retrieve tutorial subdirectories and their contents from the list of

files to parse

  • Return: array(filelist - tutorials, tutorials)

Parameters:

array   $filelist   —  array of paths (strings)

[ Top ]

isIncludeable   [line 232]

boolean isIncludeable( string $filename)

calls http://www.php.net/file_exists for each value in include_path,

then calls http://www.php.net/is_readable when it finds the file


Parameters:

string   $filename   — 

[ Top ]

parseArgv   [line 263]

array parseArgv( )

Parses $_SERVER['argv'] and creates a setup array
  • Return: a setup array
  • Global: array $argv: command-line arguments

[ Top ]

readPhpFile   [line 588]

void readPhpFile( string $path, [ $quietMode = false])

Reads a file and returns it as a string Does basic error checking

file extensions are set in phpdoc.inc

  • Global: array $_phpDocumentor_cvsphpfile_exts: PHP File extensions, used to validate that $path is a PHP File
  • Global: array $_phpDocumentor_phpfile_exts: PHP File extensions in a CVS repository, used to validate that $path is a PHP File

Parameters:

string   $path   — 
   $quietMode   — 

[ Top ]

removeNonMatches   [line 789]

string|array removeNonMatches( array $dir, string $match)

Removes files from the $dir array that do not match the search string in

$match


Parameters:

array   $dir   —  array of filenames (full path)
string   $match   —  search string with wildcards

[ Top ]

_setupIgnore   [line 729]

void _setupIgnore( array $ignore)

Construct the $ignore array

Parameters:

array   $ignore   —  strings of files/paths/wildcards to ignore

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:58:52 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.