Skip to content

Instantly share code, notes, and snippets.

/**
* @ORM\Entity
* @ORM\Table(name="eav_content_type")
* @Annotation\Name("eav_content_type")
* @Annotation\Object("PrenditCms\Core\Eav\Entity\EavContentType")
*/
class EavContentType
{
/**
* @var int $id
@prendit
prendit / gist:8237520
Last active January 2, 2016 02:29
zf2 collection problem
public function extract()
{
if ($this->object instanceof Traversable) {
$this->object = ArrayUtils::iteratorToArray($this->object, false);
}
if (!is_array($this->object)) {
return array();
}