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

  • Yii
  • YiiBase
  • Overview
  • Package
  • Class
  • Tree

Class Yii

Yii is a helper class serving common framework functionalities.

It encapsulates YiiBase which provides the actual implementation. By writing your own Yii class, you can customize some functionalities of YiiBase.

YiiBase
Extended by Yii
Package: system
Copyright: 2008-2013 Yii Software LLC
License: http://www.yiiframework.com/license/
Author: Qiang Xue <qiang.xue@gmail.com>
Since: 1.0
Located at x2engine/framework/yii.php
Methods summary
public static
# getRootPath( )

Precondition: Request component has already been created. If it hasn't, infinite recursion will occur when Yii::app()->getRequest () is called implicitly by self::app()->request.

Precondition: Request component has already been created. If it hasn't, infinite recursion will occur when Yii::app()->getRequest () is called implicitly by self::app()->request.

public static X2WebApplication
# createWebApplication( mixed $config = null )

Extends YiiBase::createWebApplication() to use X2WebApplication

Extends YiiBase::createWebApplication() to use X2WebApplication

Parameters

$config
mixed
$config application configuration.

Returns

X2WebApplication

Overrides

YiiBase::createWebApplication()
public static String
# getCustomPath( String $path )

Checks if a custom version of a file exists

Checks if a custom version of a file exists

Parameters

$path
String
$path The file path

Returns

String
$path The original file path, or the version in /custom if it exists
public static String
# resetCustomPath( String $customPath )

Checks if a custom version of a class file exists

Checks if a custom version of a class file exists

Parameters

$customPath
String
$path The path to something in /custom

Returns

String
$path The path to the original file or folder
public static string
# import( string $alias, boolean $forceInclude = false )

Modified to check custom paths This method is Copyright (c) 2008-2014 by Yii Software LLC http://www.yiiframework.com/license/

Modified to check custom paths This method is Copyright (c) 2008-2014 by Yii Software LLC http://www.yiiframework.com/license/

Parameters

$alias
string
$alias path alias to be imported
$forceInclude
boolean
$forceInclude whether to include the class file immediately. If false, the class file will be included only when the class is being used. This parameter is used only when the path alias refers to a class.

Returns

string
the class name or the directory that this alias refers to

Throws

CException
if the alias is invalid

Overrides

YiiBase::import()
public static
# x2_autoload( mixed $className, mixed $classMapOnly = false )

Added custom path checking This method is Copyright (c) 2008-2014 by Yii Software LLC http://www.yiiframework.com/license/

Added custom path checking This method is Copyright (c) 2008-2014 by Yii Software LLC http://www.yiiframework.com/license/

public static string
# t( string $category, string $message, array $params = array(), string $source = null, string $language = null )

Translates a message to the specified language. This method supports choice format (see CChoiceFormat), i.e., the message returned will be chosen from a few candidates according to the given number value. This feature is mainly used to solve plural format issue in case a message has different plural forms in some languages.

Translates a message to the specified language. This method supports choice format (see CChoiceFormat), i.e., the message returned will be chosen from a few candidates according to the given number value. This feature is mainly used to solve plural format issue in case a message has different plural forms in some languages.

Parameters

$category
string
$category message category. Please use only word letters. Note, category 'yii' is reserved for Yii framework core code use. See CPhpMessageSource for more interpretation about message category.
$message
string
$message the original message
$params
array
$params parameters to be applied to the message using <span class="php-keyword2">strtr</span>. The first parameter can be a number without key. And in this case, the method will call CChoiceFormat::format() to choose an appropriate message translation. Starting from version 1.1.6 you can pass parameter for CChoiceFormat::format() or plural forms format without wrapping it with array. This parameter is then available as {n} in the message translation string.
$source
string
$source which message source application component to use. Defaults to null, meaning using 'coreMessages' for messages belonging to the 'yii' category and using 'messages' for the rest messages.
$language
string
$language the target language. If null (default), the CApplication::getLanguage application language will be used.

Returns

string
the translated message

See

CMessageSource

Overrides

YiiBase::t()
public static
# logTranslation( mixed $category, mixed $message )
Methods inherited from YiiBase
app(), autoload(), beginProfile(), createApplication(), createComponent(), createConsoleApplication(), endProfile(), getFrameworkPath(), getLogger(), getPathOfAlias(), getVersion(), log(), powered(), registerAutoloader(), setApplication(), setLogger(), setPathOfAlias(), trace()
Properties summary
public static array $paths array()
#
public static mixed $systemuser
#
public static array $translationLog array()
#
protected static mixed $rootPath
#
Properties inherited from YiiBase
$_aliases, $_app, $_coreClasses, $_imports, $_includePaths, $_logger, $classMap, $enableIncludePath
API documentation generated by ApiGen 2.8.0