PHP Класс 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.
Показать файл
Открыть проект
Примеры использования класса
Открытые свойства
Свойство |
Тип |
Описание |
|
$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)
Открытые методы
Метод |
Описание |
|
__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. |
|
Защищенные методы
Метод |
Описание |
|
createAdapter ( `string` $type ) : `AdapterInterface` |
###Create adapter by type. |
|
Описание методов
__construct()
публичный Метод
public __construct ( `string` $language, `string` $file, `array` $options = [] ) : `void` |
$language |
`string` |
|
$file |
`string` |
|
$options |
`array` |
|
Результат |
`void` |
|
createAdapter()
защищенный Метод
###Create adapter by type.
protected createAdapter ( `string` $type ) : `AdapterInterface` |
$type |
`string` |
|
Результат |
`AdapterInterface` |
|
Proxies the parsing responsibility to the selected adapter.
public parse ( ) : `void` |
Результат |
`void` |
|
This method includes the template file and returns the generated content ready to write to file.
public render ( ) : `string` |
Результат |
`string` |
|
This method includes the template file and writes the final buffer to the output file.
public write ( $content ) : `void` |
Результат |
`void` |
|
Описание свойств
$adapter публичное свойство
This is primarily for internal use, storing a reference to the adapter class that will handle conversion.
public `AdapterInterface` $adapter |
Результат |
`AdapterInterface` |
|
$adapterTypes защищенное статическое свойство
#### Available adapter types.
protected static array $adapterTypes |
Результат |
array |
|
The file that we will operate on.
public `string` $file |
Результат |
`string` |
|
$layoutFile публичное свойство
Pass in standalone template files / css files to change the way the documentation looks.
public `string` $layoutFile |
Результат |
`string` |
|
$output_file публичное свойство
The output file that the final html doc file will be written to.
public `string` $output_file |
Результат |
`string` |
|
$sections публичное свойство
####Class Variables
Sections array is the main storage for code mapped to documentation.
public `array` $sections |
Результат |
`array` |
|
$stylesheetFile публичное свойство
$title публичное свойство
Gets passed into the template file to become the HTML page title.
public `string` $title |
Результат |
`string` |
|