Mongolid\Serializer\Type\ObjectID::convert PHP 메소드

convert() 공개 메소드

public convert ( ) : MongoDB\BSON\ObjectID
리턴 MongoDB\BSON\ObjectID
    public function convert()
    {
        return new MongoObjectID($this->objectIdString);
    }

Usage Example

예제 #1
0
 public function testShouldBeCastableToString()
 {
     $objectId = new ObjectID($this->mongoId);
     $this->assertSame((string) $this->mongoId, (string) $objectId->convert());
 }