Doctrine\OrientDB\Graph\VertexInterface::getId PHP Method

getId() public method

Returns the identifier of this vertex.
public getId ( ) : mixed
return mixed
    public function getId();

Usage Example

Example #1
0
 /**
  * {@inheritdoc}
  */
 public function add(VertexInterface $vertex)
 {
     if (array_key_exists($vertex->getId(), $this->getVertices())) {
         throw new Exception('Unable to insert multiple Vertices with the same ID in a Graph');
     }
     $this->vertices[$vertex->getId()] = $vertex;
     return $this;
 }