ExtractTask Class Reference

Inheritance diagram for ExtractTask:

Shell Object List of all members.

Public Member Functions

 __buildFiles ()
 __extract ()
 __extractTokens ()
 __findVersion ($code, $file)
 __formatString ($string)
 __markerError ($file, $line, $marker, $count)
 __mergeFiles ($output)
 __searchDirectory ($path=null)
 __store ($file=0, $input=0, $fileList=array(), $get=0)
 __writeFiles ()
 __writeHeader ()
 basic ($functionName= '__')
 execute ()
 extended ($functionName= '__d', $shift=0, $plural=false)
 help ()

Public Attributes

 $__file = null
 $__filename = 'default'
 $__fileVersions = array()
 $__oneFile = true
 $__output = null
 $__strings = array()
 $__tokens = array()
 $files = array()
 $path = null

Detailed Description

Definition at line 60 of file extract.php.


Member Function Documentation

ExtractTask::__buildFiles (  ) 

Build the translate template file contents out of obtained strings

private

Definition at line 410 of file extract.php.

References $filename, $output, and __store().

Referenced by __extractTokens().

ExtractTask::__extract (  ) 

Extract text

private

Definition at line 188 of file extract.php.

References $filename, __(), __extractTokens(), Shell::hr(), Shell::in(), name(), and Shell::out().

Referenced by execute().

ExtractTask::__extractTokens (  ) 

Extract tokens out of all files to be processed

private

Definition at line 245 of file extract.php.

References __(), __buildFiles(), __c(), __dc(), __dcn(), __dn(), __findVersion(), __n(), __writeFiles(), basic(), extended(), and Shell::out().

Referenced by __extract().

ExtractTask::__findVersion ( code,
file 
)

Find the version number of a file looking for SVN commands

Parameters:
string $code Source code of file
string $file File private

Definition at line 600 of file extract.php.

Referenced by __extractTokens().

ExtractTask::__formatString ( string  ) 

Format a string to be added as a translateable string

Parameters:
string $string String to format
Returns:
string Formatted string private

Definition at line 614 of file extract.php.

Referenced by basic(), and extended().

ExtractTask::__markerError ( file,
line,
marker,
count 
)

Indicate an invalid marker on a processed file

Parameters:
string $file File where invalid marker resides
integer $line Line number
string $marker Marker found
integer $count Count private

Definition at line 634 of file extract.php.

References Shell::out().

Referenced by basic(), and extended().

ExtractTask::__mergeFiles ( output  ) 

Merge output files

Parameters:
array $output Output to merge
Returns:
array Merged output private

Definition at line 549 of file extract.php.

References $output.

Referenced by __writeFiles().

ExtractTask::__searchDirectory ( path = null  ) 

Search the specified path for files that may contain translateable strings

Parameters:
string $path Path (or set to null to use current)
Returns:
array Files private

Definition at line 664 of file extract.php.

References $files, $id, and $path.

Referenced by execute().

ExtractTask::__store ( file = 0,
input = 0,
fileList = array(),
get = 0 
)

Prepare a file to be stored

Parameters:
string $file Filename
string $input What to store
array $fileList File list
integer $get Set to 1 to get files to store, false to set
Returns:
mixed If $get == 1, files to store, otherwise void private

Definition at line 477 of file extract.php.

References __writeHeader().

Referenced by __buildFiles(), and __writeFiles().

ExtractTask::__writeFiles (  ) 

Write the files that need to be stored

private

Definition at line 499 of file extract.php.

References $output, __mergeFiles(), __store(), Object::_stop(), exists(), Shell::in(), and Shell::out().

Referenced by __extractTokens().

ExtractTask::__writeHeader (  ) 

Build the translation template header

Returns:
string Translation template header private

Definition at line 574 of file extract.php.

References $output.

Referenced by __store().

ExtractTask::basic ( functionName = '__'  ) 

Will parse __(), __c() functions

Parameters:
string $functionName Function name that indicates translatable string (e.g: '__') public

Definition at line 290 of file extract.php.

References __formatString(), and __markerError().

Referenced by __extractTokens().

ExtractTask::execute (  ) 

Execution method always used for tasks

public

Definition at line 129 of file extract.php.

References __extract(), __searchDirectory(), Object::_stop(), debug(), Shell::err(), Shell::in(), Shell::out(), and params().

ExtractTask::extended ( functionName = '__d',
shift = 0,
plural = false 
)

Will parse __d(), __dc(), __n(), __dn(), __dcn()

Parameters:
string $functionName Function name that indicates translatable string (e.g: '__')
integer $shift Number of parameters to shift to find translateable string
boolean $plural Set to true if function supports plural format, false otherwise public

Definition at line 327 of file extract.php.

References __formatString(), and __markerError().

Referenced by __extractTokens().

ExtractTask::help (  ) 

Show help options

public

Reimplemented from Shell.

Definition at line 220 of file extract.php.

References __(), debug(), Shell::hr(), Shell::in(), and Shell::out().


Member Data Documentation

ExtractTask::$__file = null

Definition at line 95 of file extract.php.

ExtractTask::$__filename = 'default'

Definition at line 81 of file extract.php.

ExtractTask::$__fileVersions = array()

Definition at line 116 of file extract.php.

ExtractTask::$__oneFile = true

Definition at line 88 of file extract.php.

ExtractTask::$__output = null

Definition at line 123 of file extract.php.

ExtractTask::$__strings = array()

Definition at line 109 of file extract.php.

ExtractTask::$__tokens = array()

Definition at line 102 of file extract.php.

ExtractTask::$files = array()

Definition at line 74 of file extract.php.

Referenced by __searchDirectory().

ExtractTask::$path = null

Definition at line 67 of file extract.php.

Referenced by __searchDirectory().


The documentation for this class was generated from the following file:
Generated on Sun Nov 22 00:30:56 2009 for CakePHP 1.2.x.x (v1.2.4.8284) by doxygen 1.4.7