Doctrine\ODM\OrientDB\UnitOfWork::load PHP Method

load() protected method

Optionally the query can be executed using the specified fetch plan.
protected load ( Rid $rid, mixed $fetchPlan = null ) : object | null
$rid Doctrine\ODM\OrientDB\Types\Rid
$fetchPlan mixed
return object | null
    protected function load(Rid $rid, $fetchPlan = null)
    {
        $results = $this->getHydrator()->load(array($rid->getValue()), $fetchPlan);
        if (isset($results) && count($results)) {
            $record = is_array($results) ? array_shift($results) : $results;
            $results = $this->getHydrator()->hydrate($record);
            return $results;
        }
        return null;
    }