Exemplo n.º 1
0
 public function __construct(Factory $factory, $documentClass)
 {
     $this->configClass = $factory->getConfigClass($documentClass);
     if (!$this->configClass) {
         var_dump($this->configClass);
     }
     $this->factory = $factory;
     $this->class = $documentClass;
     $this->parseAndCheckFields();
     $this->parseAndCheckReferences();
     $this->parseAndCheckEmbeddeds();
     if (!$this->isEmbedded()) {
         $field = array('type' => 'raw');
         $this->parseField($field, 'id');
     }
 }
Exemplo n.º 2
0
 public function testConfigs()
 {
     $factory = new Factory($this->mongator, $this->faker);
     $this->assertTrue(is_array($factory->getConfigClass('Model\\Article')));
 }