/**
  * {@inheritdoc}
  */
 public function __construct($underscoreSeparatedKeys = true)
 {
     parent::__construct($underscoreSeparatedKeys);
     // Strategy
     $this->addStrategy('state', new SetTypeStrategy('string', 'string'));
     $this->addStrategy('type', new SetTypeStrategy('string', 'string'));
     $this->addStrategy('recovery', new SetTypeStrategy('bool', 'bool'));
     $this->addStrategy('error', new HasOneStrategy(new ErrorObject(), true));
 }
Пример #2
0
 /**
  * {@inheritdoc}
  */
 public function __construct($underscoreSeparatedKeys = true)
 {
     parent::__construct($underscoreSeparatedKeys);
     $this->addStrategy('date_created', new MongoDateStrategy());
     $this->addStrategy('date_modified', new MongoDateStrategy());
 }