本文整理汇总了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()));
}