Horde_Vcs_File_Base::_getLog PHP Méthode

_getLog() protected méthode

protected _getLog ( string $rev = null )
$rev string The revision identifier.
    protected function _getLog($rev = null)
    {
        $class = 'Horde_Vcs_Log_' . $this->_driver;
        if (!is_null($rev) && !empty($this->_cache)) {
            $cacheId = implode('|', array($class, $this->sourceroot, $this->getPath(), $rev, $this->_cacheVersion));
            // Individual revisions can be cached forever
            if ($this->_cache->exists($cacheId, 0)) {
                $ob = unserialize($this->_cache->get($cacheId, 0));
            }
        }
        if (empty($ob) || !$ob) {
            $ob = new $class($rev);
        }
        $ob->setRepository($this->_rep);
        $ob->setFile($this);
        if (!is_null($rev) && !empty($this->_cache)) {
            $this->_cache->set($cacheId, serialize($ob));
        }
        return $ob;
    }