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

  • ActionToRecord
  • CActiveFinder
  • CActiveRecord
  • CActiveRecordBehavior
  • CActiveRecordMetaData
  • CActiveRelation
  • CBaseActiveRelation
  • CBelongsToRelation
  • CHasManyRelation
  • CHasOneRelation
  • CJoinElement
  • CJoinQuery
  • CManyManyRelation
  • ContactsNameBehavior
  • CStatElement
  • CStatRelation
  • ERememberFiltersBehavior
  • FileSystemObjectBehavior
  • MobileLayouts
  • RecordAliases
  • RelationshipsBehavior
  • TopicReplies
  • X2ActiveRecord
  • X2Flow
  • Overview
  • Package
  • Class
  • Tree

Class CActiveFinder

CActiveFinder implements eager loading and lazy loading of related active records.

When used in eager loading, this class provides the same set of find methods as CActiveRecord.

CComponent
Extended by CActiveFinder
Package: system\db\ar
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/db/ar/CActiveFinder.php
Methods summary
public
# __construct( CActiveRecord $model, mixed $with )

Constructor. A join tree is built up based on the declared relationships between active record classes.

Constructor. A join tree is built up based on the declared relationships between active record classes.

Parameters

$model
CActiveRecord
$model the model that initiates the active finding process
$with
mixed
$with the relation names to be actively looked for
public mixed
# query( CDbCriteria $criteria, boolean $all = false )

Do not call this method. This method is used internally to perform the relational query based on the given DB criteria.

Do not call this method. This method is used internally to perform the relational query based on the given DB criteria.

Parameters

$criteria
CDbCriteria
$criteria the DB criteria
$all
boolean
$all whether to bring back all records

Returns

mixed
the query result
public CActiveRecord
# findBySql( string $sql, array $params = array() )

This method is internally called.

This method is internally called.

Parameters

$sql
string
$sql the SQL statement
$params
array
$params parameters to be bound to the SQL statement

Returns

CActiveRecord
public CActiveRecord[]
# findAllBySql( string $sql, array $params = array() )

This method is internally called.

This method is internally called.

Parameters

$sql
string
$sql the SQL statement
$params
array
$params parameters to be bound to the SQL statement

Returns

CActiveRecord[]
public string
# count( CDbCriteria $criteria )

This method is internally called.

This method is internally called.

Parameters

$criteria
CDbCriteria
$criteria the query criteria

Returns

string
public
# lazyFind( CActiveRecord $baseRecord )

Finds the related objects for the specified active record. This method is internally invoked by CActiveRecord to support lazy loading.

Finds the related objects for the specified active record. This method is internally invoked by CActiveRecord to support lazy loading.

Parameters

$baseRecord
CActiveRecord
$baseRecord the base record whose related objects are to be loaded
public CActiveRecord
# getModel( string $className )

Given active record class name returns new model instance.

Given active record class name returns new model instance.

Parameters

$className
string
$className active record class name

Returns

CActiveRecord
active record model instance

Since

1.1.14
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 $joinAll false
#

join all tables all at once. Defaults to false. This property is internally used.

join all tables all at once. Defaults to false. This property is internally used.

public boolean $baseLimited false
#

whether the base model has limit or offset. This property is internally used.

whether the base model has limit or offset. This property is internally used.

API documentation generated by ApiGen 2.8.0