PHP Class Phrocco\Phrocco

It works on a single language file, delegating the processing to an adapter class, then writes the resulting parsed content to an output file using the built-in templates.
Author: Ross Riley
Afficher le fichier Open project: rossriley/phrocco Class Usage Examples

Méthodes publiques

Свойство Type Description
$adapter `AdapterInterface` This is primarily for internal use, storing a reference to the adapter class that will handle conversion.
$file `string` The file that we will operate on.
$layoutFile `string` Pass in standalone template files / css files to change the way the documentation looks.
$output_file `string` The output file that the final html doc file will be written to.
$sections `array` ####Class Variables Sections array is the main storage for code mapped to documentation.
$stylesheetFile
$title `string` Gets passed into the template file to become the HTML page title.

Protected Properties

Свойство Type Description
$adapterTypes array #### Available adapter types.

Méthodes publiques

Méthode Description
__construct ( `string` $language, `string` $file, `array` $options = [] ) : `void` ###Class Constructor
parse ( ) : `void` Proxies the parsing responsibility to the selected adapter.
render ( ) : `string` ### Template Render By this point the sections array will be populated with either side of the Comment / Code divide.
write ( $content ) : `void` ### Template Write method By this point the sections array will be populated with either side of the Comment / Code divide.

Méthodes protégées

Méthode Description
createAdapter ( `string` $type ) : `AdapterInterface` ###Create adapter by type.

Method Details

__construct() public méthode

###Class Constructor
public __construct ( `string` $language, `string` $file, `array` $options = [] ) : `void`
$language `string`
$file `string`
$options `array`
Résultat `void`

createAdapter() protected méthode

###Create adapter by type.
protected createAdapter ( `string` $type ) : `AdapterInterface`
$type `string`
Résultat `AdapterInterface`

parse() public méthode

Proxies the parsing responsibility to the selected adapter.
public parse ( ) : `void`
Résultat `void`

render() public méthode

This method includes the template file and returns the generated content ready to write to file.
public render ( ) : `string`
Résultat `string`

write() public méthode

This method includes the template file and writes the final buffer to the output file.
public write ( $content ) : `void`
Résultat `void`

Property Details

$adapter public_oe property

This is primarily for internal use, storing a reference to the adapter class that will handle conversion.
public `AdapterInterface` $adapter
Résultat `AdapterInterface`

$adapterTypes protected_oe static_oe property

#### Available adapter types.
protected static array $adapterTypes
Résultat array

$file public_oe property

The file that we will operate on.
public `string` $file
Résultat `string`

$layoutFile public_oe property

Pass in standalone template files / css files to change the way the documentation looks.
public `string` $layoutFile
Résultat `string`

$output_file public_oe property

The output file that the final html doc file will be written to.
public `string` $output_file
Résultat `string`

$sections public_oe property

####Class Variables Sections array is the main storage for code mapped to documentation.
public `array` $sections
Résultat `array`

$stylesheetFile public_oe property

public $stylesheetFile

$title public_oe property

Gets passed into the template file to become the HTML page title.
public `string` $title
Résultat `string`