public function load($source, $context)
    {
        $key = $this->getSpecificSourceCacheKey(
            $source,
            $context
        );

        if (isset($this->commentTree[$key]) && is_array($this->commentTree[$key])) {
            return $this->commentTree[$key];
        }

        /**
         * Fetch key from cache.
         */
        $commentTree = $this->loadCommentTreeFromCache($source, $context);

        /**
         * If cache key is empty, build it.
         */
        if (empty($commentTree)) {
            $commentTree = $this->buildCommentTreeAndSaveIntoCache($source, $context);
        }

        $this->commentTree[$key] = $commentTree;

        return $commentTree;
    }
public function load($source, $context)
    {
        $key = $this->getSpecificSourceCacheKey(
            $source,
            $context
        );

        if (isset($this->commentTree[$key]) && is_array($this->commentTree[$key])) {
            return $this->commentTree[$key];
        }

        /**
         * Fetch key from cache.
         */
        $commentTree = $this->loadCommentTreeFromCache($source, $context);

        /**
         * If cache key is empty, build it.
         */
        if (empty($commentTree)) {
            $commentTree = $this->buildCommentTreeAndSaveIntoCache($source, $context);
        }

        $this->commentTree[$key] = $commentTree;

        return $commentTree;
    }
public function load ( $ source , $ context ) { $ key = $ this -> getSpecificSourceCacheKey ( $ source , $ context ) ; if ( isset ( $ this -> commentTree [ $ key ] ) && is_array ( $ this -> commentTree [ $ key ] ) ) { return $ this -> commentTree [ $ key ] ; } /**
         * Fetch key from cache.
         */ $ commentTree = $ this -> loadCommentTreeFromCache ( $ source , $ context ) ; /**
         * If cache key is empty, build it.
         */ if ( empty ( $ commentTree ) ) { $ commentTree = $ this -> buildCommentTreeAndSaveIntoCache ( $ source , $ context ) ; } $ this -> commentTree [ $ key ] = $ commentTree ; return $ commentTree ; }
Load Comment tree from cache.

If element is not loaded yet, loads it from Database and store it into
cache.

@param string $source  Source of comments
@param string $context Context of comment

@return array Comment tree loaded
Load Comment tree from cache .