Sokil\Mongo\Database::resetMapping PHP Method

resetMapping() public method

Reset specified mapping
public resetMapping ( ) : Client
return Client
    public function resetMapping()
    {
        $this->mapping = array();
        return $this;
    }

Usage Example

Example #1
0
 public function testGetGridFSClassName_Classpath()
 {
     $this->database->resetMapping();
     $this->database->map('\\Sokil\\Mongo');
     $reflectionClass = new \ReflectionClass($this->database);
     $method = $reflectionClass->getMethod('getCollectionDefinition');
     $method->setAccessible(true);
     $classDefinition1 = $method->invoke($this->database, 'carPhotosGridFS');
     $classDefinition2 = $method->invoke($this->database, 'CarPhotosGridFS');
     $this->assertEquals('\\Sokil\\Mongo\\CarPhotosGridFS', $classDefinition1->class);
     $this->assertEquals('\\Sokil\\Mongo\\CarPhotosGridFS', $classDefinition2->class);
 }
All Usage Examples Of Sokil\Mongo\Database::resetMapping