Class Socialveo\Core\library\view\View

InheritanceSocialveo\Core\library\view\View » Phalcon\Mvc\View

Class View

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
_cacheRender() Render from cache Socialveo\Core\library\view\View
_engineRender() Checks whether view exists on registered extensions and render it Socialveo\Core\library\view\View
realpath() Transforms relative path to full path. Socialveo\Core\library\view\View

Property Details

$_aliases protected property
protected array $_aliases = []
$_defaultDomain protected property
protected string $_defaultDomain null
$_fallbackViewPaths protected property
protected array $_fallbackViewPaths = []
$_moduleView protected property
protected string|null $_moduleView null
$_origin protected property
protected boolean $_origin true
$_originFallbackViewPaths protected property

Method Details

_cacheRender() protected method

Render from cache

protected boolean _cacheRender ( $viewPath, Phalcon\Cache\BackendInterface $cache null )
$viewPath string
$cache Phalcon\Cache\BackendInterface
_engineRender() protected method

Checks whether view exists on registered extensions and render it

protected null|void _engineRender ( $engines, $viewPath, $silence, $mustClean, Phalcon\Cache\BackendInterface $cache null )
$engines array
$viewPath string
$silence boolean
$mustClean boolean
$cache Phalcon\Cache\BackendInterface
throws Exception
addFallbackPath() public method

Add fallback path

public void addFallbackPath ( $path )
$path string
addPathAlias() public method

Add path alias.

Example: $view->addPathAlias('module', '/path/to/module/views');

public void addPathAlias ( $alias, $path )
$alias string
$path string
detectNeedRecompile() public method

Get filemtime of all views of theme for recompile

public boolean detectNeedRecompile ( )
getDefaultDomain() public method

Get default domain

public string getDefaultDomain ( )
getFallbackPaths() public method

Get fallback paths

public array getFallbackPaths ( )
getOriginViewsDir() public method

public string getOriginViewsDir ( )
getPathAliases() public method

Get path aliases

public array getPathAliases ( )
getPick() public method

Pick view and return string content

public string getPick ( $renderView )
$renderView string
isOrigin() public method

public boolean isOrigin ( )
onRegisterEngine() public method

Attach callback for register engine event

public void onRegisterEngine ( $engine, $callback )
$engine string
$callback callable
realpath() protected static method

Transforms relative path to full path.

Unlike native realpath() works correctly with the unix symlinks, also this function doesn't check path existence.

protected static string realpath ( $path )
$path string
runRegisterEngineEvent() public method

public void runRegisterEngineEvent ( $name, Phalcon\Mvc\View\EngineInterface $engine, Phalcon\Di\InjectionAwareInterface $compiler )
$name string
$engine Phalcon\Mvc\View\EngineInterface
$compiler Phalcon\Di\InjectionAwareInterface
setDefaultDomain() public method

Set default domain

public void setDefaultDomain ( $domain )
$domain string
setFallbackPaths() public method

Set fallback paths

public array setFallbackPaths ( $paths )
$paths array
setPathAliases() public method

Set path aliases.

Example: $view->setPathAliases(['module' => '/path/to/module/views']);

public void setPathAliases ( array $aliases )
$aliases array
templateExists() public method

Checks the template existence

public boolean templateExists ( $templatePath, $extensions null )
$templatePath string
$extensions array|string|false|null