Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
51faa62e
Commit
51faa62e
authored
Nov 13, 2013
by
Carsten Brandt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated interface and trait php-doc in yii\ar
[ci skip]
parent
ced7ee1b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
35 deletions
+5
-35
ActiveQueryInterface.php
framework/yii/ar/ActiveQueryInterface.php
+1
-1
ActiveQueryTrait.php
framework/yii/ar/ActiveQueryTrait.php
+1
-24
ActiveRelationInterface.php
framework/yii/ar/ActiveRelationInterface.php
+2
-0
ActiveRelationTrait.php
framework/yii/ar/ActiveRelationTrait.php
+1
-10
No files found.
framework/yii/ar/ActiveQueryInterface.php
View file @
51faa62e
...
@@ -9,7 +9,7 @@ namespace yii\ar;
...
@@ -9,7 +9,7 @@ namespace yii\ar;
use
yii\db\QueryInterface
;
use
yii\db\QueryInterface
;
/**
/**
* ActiveQueryInterface defines the common interface to be implemented by active record
relation
classes.
* ActiveQueryInterface defines the common interface to be implemented by active record
query
classes.
*
*
* A class implementing this interface should also use [[ActiveQueryTrait]].
* A class implementing this interface should also use [[ActiveQueryTrait]].
*
*
...
...
framework/yii/ar/ActiveQueryTrait.php
View file @
51faa62e
...
@@ -10,30 +10,7 @@ namespace yii\ar;
...
@@ -10,30 +10,7 @@ namespace yii\ar;
use
yii\db\ActiveRecord
;
use
yii\db\ActiveRecord
;
/**
/**
* ActiveQueryTrait implements the common set of methods that are used by DB queries associated with an Active Record class.
* ActiveQueryTrait implements the common methods and properties for active record query classes.
*
* ActiveQuery mainly provides the following methods to retrieve the query results:
*
* - [[one()]]: returns a single record populated with the first row of data.
* - [[all()]]: returns all records based on the query results.
* - [[count()]]: returns the number of records.
* - [[scalar()]]: returns the value of the first column in the first row of the query result.
* - [[exists()]]: returns a value indicating whether the query result has data or not.
*
* Because ActiveQuery extends from [[Query]], one can use query methods, such as [[where()]],
* [[orderBy()]] to customize the query options.
*
* ActiveQuery also provides the following additional query options:
*
* - [[with()]]: list of relations that this query should be performed with.
* - [[indexBy()]]: the name of the column by which the query result should be indexed.
* - [[asArray()]]: whether to return each record as an array.
*
* These options can be configured using methods of the same name. For example:
*
* ~~~
* $customers = Customer::find()->with('orders')->asArray()->all();
* ~~~
*
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @author Qiang Xue <qiang.xue@gmail.com>
* @author Carsten Brandt <mail@cebe.cc>
* @author Carsten Brandt <mail@cebe.cc>
...
...
framework/yii/ar/ActiveRelationInterface.php
View file @
51faa62e
...
@@ -10,6 +10,8 @@ namespace yii\ar;
...
@@ -10,6 +10,8 @@ namespace yii\ar;
/**
/**
* ActiveRelationInterface defines the common interface to be implemented by active record relation classes.
* ActiveRelationInterface defines the common interface to be implemented by active record relation classes.
*
*
* A class implementing this interface should also use [[ActiveRelationTrait]].
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @author Qiang Xue <qiang.xue@gmail.com>
* @author Carsten Brandt <mail@cebe.cc>
* @author Carsten Brandt <mail@cebe.cc>
* @since 2.0
* @since 2.0
...
...
framework/yii/ar/ActiveRelationTrait.php
View file @
51faa62e
...
@@ -11,16 +11,7 @@ use yii\base\InvalidConfigException;
...
@@ -11,16 +11,7 @@ use yii\base\InvalidConfigException;
use
yii\db\ActiveRecord
;
use
yii\db\ActiveRecord
;
/**
/**
* ActiveRelation represents a relation between two Active Record classes.
* ActiveRelationTrait implements the common methods and properties for active record relation classes.
*
* ActiveRelation instances are usually created by calling [[ActiveRecord::hasOne()]] and
* [[ActiveRecord::hasMany()]]. An Active Record class declares a relation by defining
* a getter method which calls one of the above methods and returns the created ActiveRelation object.
*
* A relation is specified by [[link]] which represents the association between columns
* of different tables; and the multiplicity of the relation is indicated by [[multiple]].
*
* If a relation involves a pivot table, it may be specified by [[via()]] or [[viaTable()]] method.
*
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @author Qiang Xue <qiang.xue@gmail.com>
* @author Carsten Brandt <mail@cebe.cc>
* @author Carsten Brandt <mail@cebe.cc>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment