Example #1
0
 /**
  * Get all public properties and dehydrates them for storage
  *
  * @return MutableMap
  */
 public function allPrepared()
 {
     $attributes = new MutableMap();
     $this->prepare();
     $this->all()->each(function ($value, $attribute) use($attributes) {
         $attributes->set($attribute, $value->getMongoType());
     });
     return $attributes;
 }
Example #2
0
 /**
  * @expectedException \OutOfBoundsException
  */
 public function testDelete()
 {
     $map = new MutableMap('a', 'b');
     $map->delete('b');
     $map->get(1);
 }