Doctrine\OrientDB\Graph\Vertex::setPotential PHP 메소드

setPotential() 공개 메소드

Sets the potential for the vertex, if the vertex has no potential or the one it has is higher than the new one.
public setPotential ( integer $potential, Doctrine\OrientDB\Graph\VertexInterface $from ) : boolean
$potential integer
$from Doctrine\OrientDB\Graph\VertexInterface
리턴 boolean
    public function setPotential($potential, VertexInterface $from)
    {
        $potential = (int) $potential;
        if (!$this->getPotential() || $potential < $this->getPotential()) {
            $this->potential = $potential;
            $this->potentialFrom = $from;
            return true;
        }
        return false;
    }