本文整理匯總了PHP中CActiveRecord::getSafeAttributeNames方法的典型用法代碼示例。如果您正苦於以下問題:PHP CActiveRecord::getSafeAttributeNames方法的具體用法?PHP CActiveRecord::getSafeAttributeNames怎麽用?PHP CActiveRecord::getSafeAttributeNames使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CActiveRecord
的用法示例。
在下文中一共展示了CActiveRecord::getSafeAttributeNames方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getSafeAttributeNames
public function getSafeAttributeNames()
{
return array_merge(parent::getSafeAttributeNames(), $this->_safeAttributes);
}
示例2: getSafeAttributeNames
public function getSafeAttributeNames()
{
if (!$this->eavEnable) {
return parent::getSafeAttributeNames();
}
return array_merge($this->getSafeEavAttributeNames(), parent::getSafeAttributeNames());
}
示例3: getSafeAttributeNames
/**
* @inheritDoc
*/
public function getSafeAttributeNames()
{
$scenarios = $this->scenarios();
$scenario = $this->getScenario();
if ($scenarios === null) {
return parent::getSafeAttributeNames();
} elseif (isset($scenarios[$scenario])) {
return $scenarios[$scenario];
} else {
return array();
}
}
示例4: getSafeAttributeNames
/**
* Mark all table columns as safe attributes by default.
* @return array list of safe attributes (equal to table columns).
* @todo do something with it, coz it's security fail
*/
public function getSafeAttributeNames()
{
if ($this->setOnlySafeAttributes) {
return parent::getSafeAttributeNames();
} else {
return array_keys($this->getMetaData()->columns);
}
}
示例5: getSafeAttributeNames
public function getSafeAttributeNames()
{
return array_unique(array_merge(parent::getSafeAttributeNames(), $this->safeAttributes()));
}