db\ActiveRecordInterface getPrimaryKey()

getPrimaryKey() public abstract method

Returns the primary key value(s).

public abstract mixed getPrimaryKey ( $asArray = false )
$asArray boolean

Whether to return the primary key value as an array. If true, the return value will be an array with attribute names as keys and attribute values as values. Note that for composite primary keys, an array will always be returned regardless of this parameter value.

return mixed

The primary key value. An array (attribute name => attribute value) is returned if the primary key is composite or $asArray is true. A string is returned otherwise (null will be returned if the key value is null).

doc_Yii
2016-10-30 16:56:27
Comments
Leave a Comment

Please login to continue.