PHP Класс Gush\Helper\TemplateHelper

Наследование: extends Symfony\Component\Console\Helper\Helper, implements Symfony\Component\Console\Input\InputAwareInterface
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( StyleHelper $style, Application $application )
askAndRender ( string $templateDomain, string $templateName ) : string Asks and renders will render the template.
bindAndRender ( array $parameters, string $templateDomain, string $templateName ) : string Like askAndRender but directly binding parameters passed not as options but as direct input argument to method.
getCustomTemplate ( $domain ) : null | string
getName ( )
getNamesForDomain ( string $domain ) : array Returns the names of registered templates in the given domain.
getTemplate ( string $domain, string $name ) : Gush\Template\TemplateInterface Retrieves a template by domain and name.
parameterize ( Gush\Template\TemplateInterface $template ) Retrieves the requirements of the given template and asks the user for any parameters that are not available from the input, then binds the parameters to the template.
registerTemplate ( Gush\Template\TemplateInterface $template ) Registers a template.
setInput ( Symfony\Component\Console\Input\InputInterface $input )

Описание методов

__construct() публичный Метод

public __construct ( StyleHelper $style, Application $application )
$style StyleHelper
$application Gush\Application

askAndRender() публичный Метод

If any requirements are missing from the Input it will demand the parameters from the user.
public askAndRender ( string $templateDomain, string $templateName ) : string
$templateDomain string Domain for the template, e.g. pull-request
$templateName string Name of the template, e.g. symfony-doc
Результат string Rendered template string

bindAndRender() публичный Метод

Like askAndRender but directly binding parameters passed not as options but as direct input argument to method.
public bindAndRender ( array $parameters, string $templateDomain, string $templateName ) : string
$parameters array
$templateDomain string Domain for the template, e.g. pull-request
$templateName string Name of the template, e.g. symfony-doc
Результат string Rendered template string

getCustomTemplate() публичный Метод

public getCustomTemplate ( $domain ) : null | string
Результат null | string

getName() публичный Метод

public getName ( )

getNamesForDomain() публичный Метод

Returns the names of registered templates in the given domain.
public getNamesForDomain ( string $domain ) : array
$domain string Return template names for this domain
Результат array Array of template name strings

getTemplate() публичный Метод

Retrieves a template by domain and name.
public getTemplate ( string $domain, string $name ) : Gush\Template\TemplateInterface
$domain string Domain of the template
$name string Name of the template
Результат Gush\Template\TemplateInterface

parameterize() публичный Метод

Retrieves the requirements of the given template and asks the user for any parameters that are not available from the input, then binds the parameters to the template.
public parameterize ( Gush\Template\TemplateInterface $template )
$template Gush\Template\TemplateInterface Template to render

registerTemplate() публичный Метод

Registers a template.
public registerTemplate ( Gush\Template\TemplateInterface $template )
$template Gush\Template\TemplateInterface

setInput() публичный Метод

public setInput ( Symfony\Component\Console\Input\InputInterface $input )
$input Symfony\Component\Console\Input\InputInterface