本文整理匯總了PHP中MatchaModel::__getEncryptedFields方法的典型用法代碼示例。如果您正苦於以下問題:PHP MatchaModel::__getEncryptedFields方法的具體用法?PHP MatchaModel::__getEncryptedFields怎麽用?PHP MatchaModel::__getEncryptedFields使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類MatchaModel
的用法示例。
在下文中一共展示了MatchaModel::__getEncryptedFields方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: setModel
/**
* function setModel($model):
* This method will set the model array as an object within MatchaCUP scope
*
* @param $model
*
* @return bool|\MatchaCUP
*/
public function setModel($model)
{
$this->model = is_array($model) ? MatchaUtils::__arrayToObject($model) : $model;
if (isset($this->model->table)) {
if (is_string($this->model->table)) {
$this->table = $this->model->table;
} else {
$this->table = $this->model->table->name;
}
} else {
$this->table = false;
}
$this->date = new DateTime();
$this->primaryKey = MatchaModel::__getTablePrimaryKeyColumnName($this->table);
$this->fields = MatchaModel::__getFields($this->model);
$this->encryptedFields = MatchaModel::__getEncryptedFields($this->model);
$this->phantomFields = MatchaModel::__getPhantomFields($this->model);
$this->arrayFields = MatchaModel::__getArrayFields($this->model);
$this->hasMany = isset($model['hasMany']) ? $model['hasMany'] : [];
$this->hasOne = isset($model['hasOne']) ? $model['hasOne'] : [];
}