src/Manager.php
public function concatenateObjectList()
    {
        //Short circuit if cache is disabled
        if (empty($this->cache) || empty($this->cacheKey) || empty($this->cacheTime)) {
            $this->source = 'raw';
            $this->output = $this->concatenateObjects();
            return;
        }

        //See if you can grab it from cache, unless cache refresh param is set
        if (!$this->cacheRefresh &&
            ($this->output = $this->cache->get($this->cacheKey)) !== null
        ) {
            $this->getActualLastModifiedTime();

            $lastCacheModifiedTime = $this->extractLastModifiedTime($this->output);

            if ($lastCacheModifiedTime == $this->lastModifiedTime) {
                //The cached timestamp is the same as what's in the cached copy so we can return it,
                //otherwise we can skip this and re-fetch since the source files are newer

                $this->source = 'cache';
                return;
            }
        }

        //Short circuit failed, get from cache failed, grab it and cache it
        $this->output = $this->concatenateObjects();

        $this->cache->set($this->cacheKey, $this->output, $this->cacheTime);

        $this->source = 'fetched';
    }
public function concatenateObjectList()
    {
        //Short circuit if cache is disabled
        if (empty($this->cache) || empty($this->cacheKey) || empty($this->cacheTime)) {
            $this->source = 'raw';
            $this->output = $this->concatenateObjects();
            return;
        }

        //See if you can grab it from cache, unless cache refresh param is set
        if (!$this->cacheRefresh &&
            ($this->output = $this->cache->get($this->cacheKey)) !== null
        ) {
            $this->getActualLastModifiedTime();

            $lastCacheModifiedTime = $this->extractLastModifiedTime($this->output);

            if ($lastCacheModifiedTime == $this->lastModifiedTime) {
                //The cached timestamp is the same as what's in the cached copy so we can return it,
                //otherwise we can skip this and re-fetch since the source files are newer

                $this->source = 'cache';
                return;
            }
        }

        //Short circuit failed, get from cache failed, grab it and cache it
        $this->output = $this->concatenateObjects();

        $this->cache->set($this->cacheKey, $this->output, $this->cacheTime);

        $this->source = 'fetched';
    }
public function concatenateObjectList ( ) { //Short circuit if cache is disabled if ( empty ( $ this -> cache ) || empty ( $ this -> cacheKey ) || empty ( $ this -> cacheTime ) ) { $ this -> source = 'raw' ; $ this -> output = $ this -> concatenateObjects ( ) ; return ; } //See if you can grab it from cache, unless cache refresh param is set if ( ! $ this -> cacheRefresh && ( $ this -> output = $ this -> cache -> get ( $ this -> cacheKey ) ) !== null ) { $ this -> getActualLastModifiedTime ( ) ; $ lastCacheModifiedTime = $ this -> extractLastModifiedTime ( $ this -> output ) ; if ( $ lastCacheModifiedTime == $ this -> lastModifiedTime ) { //The cached timestamp is the same as what's in the cached copy so we can return it, //otherwise we can skip this and re-fetch since the source files are newer $ this -> source = 'cache' ; return ; } } //Short circuit failed, get from cache failed, grab it and cache it $ this -> output = $ this -> concatenateObjects ( ) ; $ this -> cache -> set ( $ this -> cacheKey , $ this -> output , $ this -> cacheTime ) ; $ this -> source = 'fetched' ; }
Concatenate the object list

@param $objects
Concatenate the object list