getAttributes() public method

Get the attributes array.
public getAttributes ( mixed $model, array $fields = null ) : array
$model mixed
$fields array
return array
コード例 #1
0
ファイル: Resource.php プロジェクト: tobscure/json-api
 /**
  * Get the resource attributes.
  *
  * @return array
  */
 public function getAttributes()
 {
     $attributes = (array) $this->serializer->getAttributes($this->data, $this->getOwnFields());
     $attributes = $this->filterFields($attributes);
     $attributes = $this->mergeAttributes($attributes);
     return $attributes;
 }