/** * @param string $entity Entity name * * @return Descriptor */ public function getDescriptor($entity) { if (isset($this->descriptors[$entity])) { return $this->descriptors[$entity]; } $config = $this->app->getConfig()->grab('entity.manager.descriptor.' . $entity); $descriptor = new Descriptor($config->getData(), $entity); $this->descriptors[$entity] = $descriptor; return $descriptor; }
/** * Constructor * * @param Config $config Configuration */ public function __construct(Config $config) { parent::__construct($config); $this->dispatcher = new Dispatcher($this); $this->context = new Context(); $this->router = new Router(); }