Doctrine\ODM\PHPCR\UnitOfWork::setFetchDepth PHP 메소드

setFetchDepth() 공개 메소드

Sets the fetch depth on the session if the PHPCR session instance supports it and returns the previous fetch depth value
public setFetchDepth ( integer | null $fetchDepth = null ) : integer
$fetchDepth integer | null
리턴 integer previous fetch depth value
    public function setFetchDepth($fetchDepth = null)
    {
        if (!$this->useFetchDepth) {
            return 0;
        }
        $oldFetchDepth = $this->session->getSessionOption($this->useFetchDepth);
        if (isset($fetchDepth)) {
            $this->session->setSessionOption($this->useFetchDepth, $fetchDepth);
        }
        return $oldFetchDepth;
    }
UnitOfWork