Esempio n. 1
0
 /**
  * Registers a model definition.
  * 
  * @param \WordPress\Model\DefinitionInterface $definition
  * 
  * @return \WordPress\Model\Manager
  */
 public function register(DefinitionInterface $definition)
 {
     $this->definitions[$definition->getName()] = $definition;
     $this->classMap[$definition->getClassName()] = $definition->getName();
     return $this;
 }
 /**
  *
  * @param DefinitionInterface[] $eachDefinition
  * @return DefinitionInterface
  */
 public final function withEachDefinition($eachDefinition)
 {
     $this->definition = $this->definition->withEachDefinition($eachDefinition);
     return $this;
 }