MongoId::getHostname PHP Method

getHostname() public static method

Gets the hostname being used for this machine's ids
public static getHostname ( ) : string
return string
    public static function getHostname()
    {
        return gethostname();
    }

Usage Example

Beispiel #1
0
 /**
  * @param $mongoId
  */
 public function assertMongoId($mongoId)
 {
     if (is_string($mongoId)) {
         $mongoId = new \MongoId($mongoId);
     }
     $this->assertTrue($mongoId instanceof \MongoId);
     $this->assertNotNull($mongoId->getPID());
     $this->assertNotNull($mongoId->getTimestamp());
     $this->assertNotNull($mongoId->getInc());
     $this->assertNotNull($mongoId->getHostname());
     $this->assertEquals(24, strlen($mongoId->{'$id'}));
 }
All Usage Examples Of MongoId::getHostname