PHP 클래스 Phlyty\View\MustacheViewModel

The main purpose of this class is to provide the view model with the App instance, thus giving it access to the various helper methods available in that class. Additionally, it provides an instance of Escaper, allowing you to do context-specific escaping within helpers you define in the view model.
파일 보기 프로젝트 열기: phly/phlyty 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$app Phlyty\App
$escaper Zend\Escaper\Escaper

공개 메소드들

메소드 설명
__app ( ) : App Retrieve application instance
__construct ( App $app, Zend\Escaper\Escaper $escaper = null ) Constructor
__escaper ( ) : Zend\Escaper\Escaper Retrieve escaper instance
bindHelper ( string $name, callable $helper ) : MustacheViewModel Bind a helper within the view model object's context

메소드 상세

__app() 공개 메소드

Retrieve application instance
public __app ( ) : App
리턴 Phlyty\App

__construct() 공개 메소드

Receive and set the App instance as a protected property. If an Escaper instance is passed, it will be assigned; otherwise, an Escaper instance will be instantiated and assigned.
public __construct ( App $app, Zend\Escaper\Escaper $escaper = null )
$app Phlyty\App
$escaper Zend\Escaper\Escaper

__escaper() 공개 메소드

Retrieve escaper instance
public __escaper ( ) : Zend\Escaper\Escaper
리턴 Zend\Escaper\Escaper

bindHelper() 공개 메소드

Allows using '$this' within the helper in order to access public properties and methods. Binds the helper to the public property given by $name.
public bindHelper ( string $name, callable $helper ) : MustacheViewModel
$name string
$helper callable
리턴 MustacheViewModel

프로퍼티 상세

$app 보호되어 있는 프로퍼티

protected App,Phlyty $app
리턴 Phlyty\App

$escaper 보호되어 있는 프로퍼티

protected Escaper,Zend\Escaper $escaper
리턴 Zend\Escaper\Escaper