/** * @return mixed */ public function toArray() { $out = []; foreach ($this->properties->getValues() as $v) { if ($v->isVisible()) { $v->addToArray($out); } } return $out; }
/** * @param ResourceTransformer $transformer * @param $original * @param PropertyValues $identifiers * @param Context $context * @return bool */ protected function entityEquals(ResourceTransformer $transformer, $original, PropertyValues $identifiers, Context $context) { if (count($identifiers->getValues()) === 0) { return false; } foreach ($identifiers->getValues() as $identifier) { $path = $this->splitPathParameters($identifier->getField()->getName()); $propertyValue = $this->resolveChildPath($transformer, $original, $path, $identifier->getField(), $context); if (!$identifier->equals($propertyValue)) { return false; } } return true; }