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
 public function testHas()
 {
     $map = new MutableMap();
     $map->set('foo', 'bar');
     $this->assertTrue($map->has('foo'));
     $this->assertFalse($map->has('bar'));
 }