Esempio n. 1
0
 /**
  * @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;
 }
Esempio n. 2
0
 /**
  * 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();
 }