toArray() public method

Get value that will be used to represent this attribute when converting AbstractEntity to array
public toArray ( array $params = [] ) : string
$params array
return string
コード例 #1
0
ファイル: FloatAttribute.php プロジェクト: Webiny/Framework
 /**
  * Get value that will be used to represent this attribute when converting AbstractEntity to array
  *
  * @param array $params
  *
  * @return string
  */
 public function toArray($params = [])
 {
     return (double) parent::toArray($params);
 }
コード例 #2
0
ファイル: BooleanAttribute.php プロジェクト: Webiny/Framework
 public function toArray($params = [])
 {
     return $this->processToArrayValue(StdObjectWrapper::toBool(parent::toArray($params)));
 }