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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Rotua Panjaitan
yii2
Commits
5d9c23c6
Commit
5d9c23c6
authored
Jul 30, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added Sort::hasAttribute().
parent
f2ceef4c
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
3 deletions
+17
-3
Sort.php
framework/yii/data/Sort.php
+10
-0
ColumnSchema.php
framework/yii/db/ColumnSchema.php
+3
-1
Schema.php
framework/yii/db/Schema.php
+2
-1
TableSchema.php
framework/yii/db/TableSchema.php
+2
-1
No files found.
framework/yii/data/Sort.php
View file @
5d9c23c6
...
@@ -358,4 +358,14 @@ class Sort extends Object
...
@@ -358,4 +358,14 @@ class Sort extends Object
}
}
return
implode
(
$this
->
separators
[
0
],
$sorts
);
return
implode
(
$this
->
separators
[
0
],
$sorts
);
}
}
/**
* Returns a value indicating whether the sort definition supports sorting by the named attribute.
* @param string $name the attribute name
* @return boolean whether the sort definition supports sorting by the named attribute.
*/
public
function
hasAttribute
(
$name
)
{
return
isset
(
$this
->
attributes
[
$name
]);
}
}
}
framework/yii/db/ColumnSchema.php
View file @
5d9c23c6
...
@@ -7,13 +7,15 @@
...
@@ -7,13 +7,15 @@
namespace
yii\db
;
namespace
yii\db
;
use
yii\base\Object
;
/**
/**
* ColumnSchema class describes the metadata of a column in a database table.
* ColumnSchema class describes the metadata of a column in a database table.
*
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
* @since 2.0
*/
*/
class
ColumnSchema
extends
\yii\base\Componen
t
class
ColumnSchema
extends
Objec
t
{
{
/**
/**
* @var string name of this column (without quotes).
* @var string name of this column (without quotes).
...
...
framework/yii/db/Schema.php
View file @
5d9c23c6
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
namespace
yii\db
;
namespace
yii\db
;
use
Yii
;
use
Yii
;
use
yii\base\Object
;
use
yii\base\NotSupportedException
;
use
yii\base\NotSupportedException
;
use
yii\base\InvalidCallException
;
use
yii\base\InvalidCallException
;
use
yii\caching\Cache
;
use
yii\caching\Cache
;
...
@@ -25,7 +26,7 @@ use yii\caching\GroupDependency;
...
@@ -25,7 +26,7 @@ use yii\caching\GroupDependency;
* @author Qiang Xue <qiang.xue@gmail.com>
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
* @since 2.0
*/
*/
abstract
class
Schema
extends
\yii\base\
Object
abstract
class
Schema
extends
Object
{
{
/**
/**
* The followings are the supported abstract column data types.
* The followings are the supported abstract column data types.
...
...
framework/yii/db/TableSchema.php
View file @
5d9c23c6
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
namespace
yii\db
;
namespace
yii\db
;
use
yii\base\Object
;
use
yii\base\InvalidParamException
;
use
yii\base\InvalidParamException
;
/**
/**
...
@@ -17,7 +18,7 @@ use yii\base\InvalidParamException;
...
@@ -17,7 +18,7 @@ use yii\base\InvalidParamException;
* @author Qiang Xue <qiang.xue@gmail.com>
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
* @since 2.0
*/
*/
class
TableSchema
extends
\yii\base\
Object
class
TableSchema
extends
Object
{
{
/**
/**
* @var string name of the catalog (database) that this table belongs to.
* @var string name of the catalog (database) that this table belongs to.
...
...
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