Overview

Packages

  • application
    • commands
    • components
      • actions
      • filters
      • leftWidget
      • permissions
      • sortableWidget
      • util
      • webupdater
      • x2flow
        • actions
        • triggers
      • X2GridView
      • X2Settings
    • controllers
    • models
      • embedded
    • modules
      • accounts
        • controllers
        • models
      • actions
        • controllers
        • models
      • calendar
        • controllers
        • models
      • charts
        • models
      • contacts
        • controllers
        • models
      • docs
        • components
        • controllers
        • models
      • groups
        • controllers
        • models
      • marketing
        • components
        • controllers
        • models
      • media
        • controllers
        • models
      • mobile
        • components
      • opportunities
        • controllers
        • models
      • products
        • controllers
        • models
      • quotes
        • controllers
        • models
      • services
        • controllers
        • models
      • template
        • models
      • users
        • controllers
        • models
      • workflow
        • controllers
        • models
      • x2Leads
        • controllers
        • models
  • Net
  • None
  • PHP
  • system
    • base
    • caching
      • dependencies
    • collections
    • console
    • db
      • ar
      • schema
        • cubrid
        • mssql
        • mysql
        • oci
        • pgsql
        • sqlite
    • i18n
      • gettext
    • logging
    • test
    • utils
    • validators
    • web
      • actions
      • auth
      • filters
      • form
      • helpers
      • renderers
      • services
      • widgets
        • captcha
        • pagers
  • Text
    • Highlighter
  • zii
    • behaviors
    • widgets
      • grid
      • jui

Classes

  • CPradoViewRenderer
  • CViewRenderer
  • Overview
  • Package
  • Class
  • Tree

Class CViewRenderer

CViewRenderer is the base class for view renderer classes.

A view renderer is an application component that renders views written in a customized syntax.

Once installing a view renderer as a 'viewRenderer' application component, the normal view rendering process will be intercepted by the renderer. The renderer will first parse the source view file and then render the the resulting view file.

Parsing results are saved as temporary files that may be stored under the application runtime directory or together with the source view file.

CComponent
Extended by CApplicationComponent implements IApplicationComponent
Extended by CViewRenderer implements IViewRenderer

Direct known subclasses

CPradoViewRenderer
Abstract
Package: system\web\renderers
Copyright: 2008-2013 Yii Software LLC
License: http://www.yiiframework.com/license/
Author: Steve Heyns http://customgothic.com/
Author: Qiang Xue <qiang.xue@gmail.com>
Since: 1.0
Located at x2engine/framework/web/renderers/CViewRenderer.php
Methods summary
abstract protected
# generateViewFile( string $sourceFile, string $viewFile )

Parses the source view file and saves the results as another file.

Parses the source view file and saves the results as another file.

Parameters

$sourceFile
string
$sourceFile the source view file path
$viewFile
string
$viewFile the resulting view file path
public mixed
# renderFile( CBaseController $context, string $sourceFile, mixed $data, boolean $return )

Renders a view file. This method is required by IViewRenderer.

Renders a view file. This method is required by IViewRenderer.

Parameters

$context
CBaseController
$context the controller or widget who is rendering the view file.
$sourceFile
string
$sourceFile the view file path
$data
mixed
$data the data to be passed to the view
$return
boolean
$return whether the rendering result should be returned

Returns

mixed
the rendering result, or null if the rendering result is not needed.

Implementation of

IViewRenderer::renderFile()
protected string
# getViewFile( string $file )

Generates the resulting view file path.

Generates the resulting view file path.

Parameters

$file
string
$file source view file path

Returns

string
resulting view file path
Methods inherited from CApplicationComponent
getIsInitialized(), init()
Methods inherited from CComponent
__call(), __get(), __isset(), __set(), __unset(), asa(), attachBehavior(), attachBehaviors(), attachEventHandler(), canGetProperty(), canSetProperty(), detachBehavior(), detachBehaviors(), detachEventHandler(), disableBehavior(), disableBehaviors(), enableBehavior(), enableBehaviors(), evaluateExpression(), getEventHandlers(), hasEvent(), hasEventHandler(), hasProperty(), raiseEvent()
Properties summary
public boolean $useRuntimePath true
#

whether to store the parsing results in the application's runtime directory. Defaults to true. If false, the parsing results will be saved as files under the same directory as the source view files and the file names will be the source file names appended with letter 'c'.

whether to store the parsing results in the application's runtime directory. Defaults to true. If false, the parsing results will be saved as files under the same directory as the source view files and the file names will be the source file names appended with letter 'c'.

public integer $filePermission 0755
#

the chmod permission for temporary directories and files generated during parsing. Defaults to 0755 (owner rwx, group rx and others rx).

the chmod permission for temporary directories and files generated during parsing. Defaults to 0755 (owner rwx, group rx and others rx).

public string $fileExtension '.php'
#

the extension name of the view file. Defaults to '.php'.

the extension name of the view file. Defaults to '.php'.

Properties inherited from CApplicationComponent
$behaviors
Magic properties inherited from CApplicationComponent
$isInitialized
API documentation generated by ApiGen 2.8.0