classes/phing/tasks/ext/rSTTask.php
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
- subpackage
- rST
- version
- SVN: $Id: rSTTask.php 1277 2011-08-17 17:06:22Z mrook $
\rSTTask
reStructuredText rendering task for Phing, the PHP build tool.
PHP version 5
- Extends from
- \Task
- author
- Christian Weiske
- category
- Tasks
- copyright
- 2001,2002 THYRELL. All rights reserved
- license
- LGPL v3 or later http://www.gnu.org/licenses/lgpl.html
- link
- https://gitorious.org/phing/rsttask
- package
- Phing
- subpackage
- rST
- version
- $Revision: 912 $
Properties

string
$destination= 'null'
Output file or directory. May be omitted.
When it ends with a slash, it is considered to be a directory
nullDetails- Type
- string

array
$filterChains= 'array'
all filterchains objects assigned to this task
arrayDetails- Type
- array

string
$format= 'html'
Result format, defaults to "html".
htmlDetails- Type
- string
- see
- \$supportedFormats

array
$supportedFormats= 'array'
static
Array of supported output formats
arrayDetails- Type
- array
- see
- \$format
- see
- \$targetExt

array
$targetExt= 'array'
static
Maps formats to file extensions
arrayDetails- Type
- array

string
$toolPath= 'null'
Full path to the tool, i.e. /usr/local/bin/rst2html
nullDetails- Type
- string
Methods

createFileSet(
)
:
objectNested creator, creates a FileSet for this task
| Type | Description |
|---|---|
| object |

createFilterChain(
)
:
\FilterChainCreates a filterchain, stores and returns it
| Type | Description |
|---|---|
| \FilterChain |

createMapper(
)
:
\MapperNested creator, creates one Mapper for this task
| Type | Description |
|---|---|
| \Mapper |
- throws

getTargetFile(
string $file, string $destination
=
null
)
:
stringDetermines and returns the target file name from the
input file and the configured destination name.
| Name | Type | Description |
|---|---|---|
| $file | string | Input file |
| $destination | string | Destination file or directory name, may be null |
| Type | Description |
|---|---|
| string |
- uses
- \$format
- uses
- \$targetExt

getToolPath(
string $format
)
:
stringFinds the rst2* binary path
| Name | Type | Description |
|---|---|---|
| $format | string | Output format |
| Type | Description |
|---|---|
| string |
- throws
- When the tool cannot be found

render(
string $tool, string $source, string $targetFile
)
:
voidRenders a single file and applies filters on it
| Name | Type | Description |
|---|---|---|
| $tool | string | conversion tool to use |
| $source | string | rST source file |
| $targetFile | string | target file name |

renderFile(
string $tool, string $source, string $targetFile
)
:
voidRenders a single file with the rST tool.
| Name | Type | Description |
|---|---|---|
| $tool | string | conversion tool to use |
| $source | string | rST source file |
| $targetFile | string | target file name |
- throws
- When the conversion fails

setDestination(
string $destination
)
:
voidThe setter for the attribute "destination"
| Name | Type | Description |
|---|---|---|
| $destination | string | Output file or directory. When it ends with a slash, it is taken as directory. |

setFile(
string $file
)
:
voidThe setter for the attribute "file"
| Name | Type | Description |
|---|---|---|
| $file | string | Path of file to render |

setFormat(
string $format
)
:
voidThe setter for the attribute "format"
| Name | Type | Description |
|---|---|---|
| $format | string | Output format |
- throws
- When the format is not supported

setToolparam(
string $param
)
:
voidThe setter for the attribute "toolparam"
| Name | Type | Description |
|---|---|---|
| $param | string | Additional rst2* tool parameters |

setToolpath(
$path
)
:
voidThe setter for the attribute "toolpath"
| Name | Type | Description |
|---|---|---|
| $path |
- throws
- When the tool does not exist or is not executable