Core  3.2
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
WStartInternals Class Reference
+ Inheritance diagram for WStartInternals:
+ Collaboration diagram for WStartInternals:

Public Member Functions

 __construct ($contextRoot)
 
 deleteDeadLinks ($dir)
 
 linkFiles ($sourceDir, $destDir, &$linked=array())
 
 getSubDirs ($subdir)
 
 getImagesDirs ()
 
 getDocsDirs ()
 
 setVerbose ($verbose)
 
 setStdio ($stdio)
 
 absolutize ($file)
 
 relativize ($file)
 
 sedFile ($file, $callback)
 

Protected Member Functions

 setContextRoot ($contextRoot)
 
 mkdir ($dir)
 
 removeFilesByRegex ($dir, $regex)
 
 debug ($msg)
 
 verbose ($level, $msg)
 

Protected Attributes

 $stdio = null
 
 $verbose = false
 
 $contextRoot = false
 

Detailed Description

Definition at line 30 of file Class.Dcp_Utils_WStart.php.

Constructor & Destructor Documentation

__construct (   $contextRoot)

Definition at line 39 of file Class.Dcp_Utils_WStart.php.

+ Here is the call graph for this function:

Member Function Documentation

absolutize (   $file)

Compute absolute path from context's root

  • If the file is relative, then the absolute path is computed relative to the context's root.
  • If the file is already in a absolute form, then their current absolute form is used.
Parameters
$file
Returns
string

Definition at line 286 of file Class.Dcp_Utils_WStart.php.

debug (   $msg)
protected

Definition at line 234 of file Class.Dcp_Utils_WStart.php.

deleteDeadLinks (   $dir)

Scan given directory and delete dead symlinks (i.e. symlinks pointing to non-existing files)

Parameters
string$dir
Exceptions
WStartException

Definition at line 70 of file Class.Dcp_Utils_WStart.php.

+ Here is the call graph for this function:

getDocsDirs ( )

Definition at line 230 of file Class.Dcp_Utils_WStart.php.

+ Here is the call graph for this function:

getImagesDirs ( )

Definition at line 226 of file Class.Dcp_Utils_WStart.php.

+ Here is the call graph for this function:

getSubDirs (   $subdir)

Returns surdirs containing a specific subdir

Parameters
$subdir
Returns
string[] list of dir/subdir relative to contextRoot

Definition at line 202 of file Class.Dcp_Utils_WStart.php.

+ Here is the call graph for this function:

linkFiles (   $sourceDir,
  $destDir,
$linked = array() 
)

Link files from source dir to destination dir.

Parameters
string$sourceDirSource dir from which files are to be linked
string$destDirDestination dir to which the symlinks will be created
array$linkedList of conflicting/duplicates files (i.e. source files with the same name)
Exceptions
WStartException

Definition at line 109 of file Class.Dcp_Utils_WStart.php.

+ Here is the call graph for this function:

mkdir (   $dir)
protected

Create a directory if it does not already exists...

Parameters
string$dir
Exceptions
WStartException

Definition at line 155 of file Class.Dcp_Utils_WStart.php.

relativize (   $file)

Compute relative path from context's root

  • If the file is already in a relative form, then their current relative form is used.
  • If the file is absolute and located under the context'root, then the relative path from the context's root is used.
  • If the file is absolute and located outside the context's root, then an exception is thrown.
Parameters
$file
Returns
string
Exceptions
WStartException

Definition at line 305 of file Class.Dcp_Utils_WStart.php.

removeFilesByRegex (   $dir,
  $regex 
)
protected

Remove files matching the specified regex in the given directory

Parameters
$dir
$regex
Exceptions
WStartException

Definition at line 171 of file Class.Dcp_Utils_WStart.php.

+ Here is the call graph for this function:

sedFile (   $file,
  $callback 
)
Parameters
$file
$callback
Exceptions
WStartException

Definition at line 327 of file Class.Dcp_Utils_WStart.php.

+ Here is the call graph for this function:

setContextRoot (   $contextRoot)
protected

Definition at line 45 of file Class.Dcp_Utils_WStart.php.

setStdio (   $stdio)
Parameters
$stdio
Returns
WStartStdioInterface
Exceptions
WStartException

Definition at line 268 of file Class.Dcp_Utils_WStart.php.

setVerbose (   $verbose)
Parameters
int$verboseVerbose level (e.g. 1, 2, etc.)
Returns
bool

Definition at line 257 of file Class.Dcp_Utils_WStart.php.

+ Here is the call graph for this function:

verbose (   $level,
  $msg 
)
protected

Print a message with the specified verbose level.

Parameters
$level
$msg

Definition at line 244 of file Class.Dcp_Utils_WStart.php.

Field Documentation

$contextRoot = false
protected

Definition at line 37 of file Class.Dcp_Utils_WStart.php.

$stdio = null
protected

Definition at line 35 of file Class.Dcp_Utils_WStart.php.

$verbose = false
protected

Definition at line 36 of file Class.Dcp_Utils_WStart.php.


The documentation for this class was generated from the following file:
← centre documentaire © anakeen