PHP 클래스 Gush\Helper\TemplateHelper

상속: extends Symfony\Component\Console\Helper\Helper, implements Symfony\Component\Console\Input\InputAwareInterface
파일 보기 프로젝트 열기: gushphp/gush 1 사용 예제들

공개 메소드들

메소드 설명
__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