Esempio n. 1
0
 /**
  *
  * @return $this
  */
 protected function loadTypes()
 {
     $config = $this->manager->getConfig($this->name);
     $types = isset($config['types']) ? (array) $config['types'] : array();
     $this->types = array();
     foreach ($types as $name => $type) {
         if (!$type instanceof Type) {
             $type = Type::objectify($type, array($this, $name));
         }
         $this->types[$name] = $type;
     }
     return $this;
 }
Esempio n. 2
0
 /**
  * Constructor
  *
  * @param Type $type
  */
 public function __construct(Type $type)
 {
     $manager = $type->getResource()->getManager();
     parent::__construct($manager);
     $this->type = $type;
 }