tasks/ext/rSTTask.php

Show: inherited
Table of Contents

reStructuredText rendering task for Phing, the PHP build tool.

PHP version 5

Author
Christian Weiske  
Category
Tasks  
License
LGPL v3 or later http://www.gnu.org/licenses/lgpl.html  
Link
https://gitorious.org/phing/rsttask  
Package
phing.tasks.ext  
Version
SVN: $Id: rSTTask.php 1401 2011-12-28 16:48:57Z mrook $  

\rSTTask

Package: phing\tasks\ext

reStructuredText rendering task for Phing, the PHP build tool.

PHP version 5

Parent(s)
\Task < \ProjectComponent
Author
Christian Weiske  
Category
Tasks  
License
LGPL v3 or later http://www.gnu.org/licenses/lgpl.html  
Link
https://gitorious.org/phing/rsttask  

Properties

Propertyprotectedstring  $destination= 'null'

Output file or directory. May be omitted.

When it ends with a slash, it is considered to be a directory

Default valuenullDetails
Type
string
Propertyprotectedstring  $file= 'null'

Input file in rST format.

Required

Default valuenullDetails
Type
string
Propertyprotected  $filesets= 'array()'
Default valuearray()Details
Type
n/a
Propertyprotectedarray  $filterChains= 'array()'

all filterchains objects assigned to this task

Default valuearray()Details
Type
array
Propertyprotectedstring  $format= ''html''

Result format, defaults to "html".

Default value'html'Details
Type
string
See
\$supportedFormats  
Propertyprotected  $mapperElement= 'null'
Default valuenullDetails
Type
n/a
Propertyprotectedinteger  $mode= '0755'

mode to create directories with

Default value0755Details
Type
integer
Propertyprotectedarray  $supportedFormats= 'array( 'html''
static

Array of supported output formats

Default valuearray( 'html'Details
Type
array
See
\$format  
See
\$targetExt  
Propertyprotectedarray  $targetExt= 'array( 'html' => 'html''
static

Maps formats to file extensions

Default valuearray( 'html' => 'html'Details
Type
array
Propertyprotectedstring  $taskName= ''rST''

Taskname for logger
Default value'rST'Details
Type
string
Propertyprotectedstring  $toolParam= 'null'

Additional rst2* tool parameters.

Default valuenullDetails
Type
string
Propertyprotectedstring  $toolPath= 'null'

Full path to the tool, i.e. /usr/local/bin/rst2html

Default valuenullDetails
Type
string
Propertyprotectedboolean  $uptodate= 'false'

Only render files whole source files are newer than the target files

Default valuefalseDetails
Type
boolean

Methods

methodpubliccreateFileSet( ) : object

Nested creator, creates a FileSet for this task

Returns
Type Description
object The created fileset object
methodpubliccreateFilterChain( ) : \FilterChain

Creates a filterchain, stores and returns it

Returns
Type Description
\FilterChain The created filterchain object
methodpubliccreateMapper( ) : \Mapper

Nested creator, creates one Mapper for this task

Returns
Type Description
\Mapper The created Mapper type object
Throws
Exception Description
\BuildException
methodpublicgetDescription( ) : void

methodpublicgetLocation( ) : void

methodpublicgetOwningTarget( ) : void

methodpublicgetProject( ) : void

methodprotectedgetRegisterSlot( ) : void

methodpublicgetRuntimeConfigurableWrapper( ) : void

methodpublicgetTargetFile( string $file, string $destination = null ) : string

Determines and returns the target file name from the input file and the configured destination name.

Parameters
Name Type Description
$file string

Input file

$destination string

Destination file or directory name, may be null

Returns
Type Description
string Target file name
Details
Uses
\$format  
Uses
\$targetExt  
methodpublicgetTaskName( ) : void

methodpublicgetTaskType( ) : void

methodprotectedgetToolPath( string $format ) : string

Finds the rst2* binary path

Parameters
Name Type Description
$format string

Output format

Returns
Type Description
string Full path to rst2$format
Throws
Exception Description
\BuildException When the tool cannot be found
methodpublicinit( ) : void

Init method: requires the PEAR System class

methodpubliclog( ) : void

methodpublicmain( ) : void

The main entry point method.

methodpublicmaybeConfigure( ) : void

methodpublicperform( ) : void

methodprotectedrender( string $tool, string $source, string $targetFile ) : void

Renders a single file and applies filters on it

Parameters
Name Type Description
$tool string

conversion tool to use

$source string

rST source file

$targetFile string

target file name

methodprotectedrenderFile( string $tool, string $source, string $targetFile ) : void

Renders a single file with the rST tool.

Parameters
Name Type Description
$tool string

conversion tool to use

$source string

rST source file

$targetFile string

target file name

Throws
Exception Description
\BuildException When the conversion fails
methodpublicsetDescription( ) : void

methodpublicsetDestination( string $destination ) : void

The setter for the attribute "destination"

Parameters
Name Type Description
$destination string

Output file or directory. When it ends with a slash, it is taken as directory.

methodpublicsetFile( string $file ) : void

The setter for the attribute "file"

Parameters
Name Type Description
$file string

Path of file to render

methodpublicsetFormat( string $format ) : void

The setter for the attribute "format"

Parameters
Name Type Description
$format string

Output format

Throws
Exception Description
\BuildException When the format is not supported
methodpublicsetLocation( ) : void

methodpublicsetOwningTarget( ) : void

methodpublicsetProject( ) : void

methodpublicsetRuntimeConfigurableWrapper( ) : void

methodpublicsetTaskName( ) : void

methodpublicsetTaskType( ) : void

methodpublicsetToolparam( string $param ) : void

The setter for the attribute "toolparam"

Parameters
Name Type Description
$param string

Additional rst2* tool parameters

methodpublicsetToolpath(  $path ) : void

The setter for the attribute "toolpath"

Parameters
Name Type Description
$path
Throws
Exception Description
\BuildException When the tool does not exist or is not executable
methodpublicsetUptodate( string $uptodate ) : void

The setter for the attribute "uptodate"

Parameters
Name Type Description
$uptodate string

True/false

Documentation was generated by DocBlox 0.17.1.