Cache all resources.

@param Collection $resources
@return Collection
492105
public function cacheResources($resources)
    {
        if ($this->cacheIsEnabled()) {
            IlluminateCache::put(
                config('health.cache.key'),
                $resources,
                $this->getMinutes()
            );
        }

        return $resources;
    }
783494
public function setResources($resources) {

		if(false === is_array($resources)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type array, "%s" given', __METHOD__, gettype($resources)), E_USER_ERROR);
		}

		$this -> resources = $resources;
	}
621853
public function from($resources)
    {
        settype($resources, 'array');

        //Prepent the resource prefix
        foreach ($resources as &$resource) {
            if (strpos($resource, $this->_prefix) !== 0) {
                $resource = $this->_prefix.$resource;
            }
        }

        $this->from = array_unique(array_merge($this->from, $resources));

        return $this;
    }
995874
public void cache(Map<String, Object> resources) {
		verifyState();

		if (!cacheLocked.get()) {
			resourceCache.get().putAll(resources);
		}
	}
1082056
public function load($resource, $type = null)
    {
        $collection = new RouteCollection();
        
        foreach ($this->routes as $resource) {
            $collection->addCollection(
                  $this->import($resource, NULL)
                  );
        }
        
        return $collection;
    }
1285994
public function materializeCollection($collection)
    {
        $materializedCollection = new Collection();
        foreach ($collection as $resource) {
            $materializedCollection->add($this->materialize($resource));
        }
        return $materializedCollection;
    }
830201
public function resourceFields(Resource $resource): Collection
    {
        $this->resourceInstance = $resource;

        $lens           = $this->lens();
        $lens->resource = $resource->model();

        return $lens->resolveFields($this);
    }
377680
public function set(ResourceInterface $resource): ResourceCollectionInterface
    {
        $this->collection[$this->buildArrayKey($resource->type(), $resource->id())] = $resource;

        return $this;
    }
887499
public static function getCollection($path, $resource = 'Resource')
    {
        $response = self::connection()->get(self::$api_path . $path);

        return self::mapCollection($resource, $response);
    }
771423
public static function hydrateCollection(array $resources)
    {
        $hydrated = [];

        foreach ($resources as $resource) {
            $hydrated[] = self::hydrate($resource);
        }

        return $hydrated;
    }
259192
public function add(ResourceInterface $resource)
    {
        $this->resources[$resource->getName()] = $resource;
        $this->indexes[] = $resource->getName();

        return $this;
    }
443759
public function set($collectionId, EntityCollectionInterface $collection)
    {
        $this->getCache()->set($collectionId, $collection);
        return $this;
    }
801644
public function setItems($items)
    {
        $this->items = ($items instanceof Collection) ? $items : Collection::make($items);

        return $this;
    }
13827
public function remove($resource)
    {
        $keysToRemove = array_keys($this->collection, $resource, true);
        $this->collection = array_values(array_diff_key($this->collection, array_flip($keysToRemove)));
        return $this;
    }
321863
protected function convertHierachicalResources(&$resources)
    {
        foreach ($resources as &$resource) {
            if (gettype($resource)=="string") {
                $resource = $this->getAssetManager()->getAssetUrl($resource);
            } else if (gettype($resource)=="array") {
                $this->convertHierachicalResources($resource);
            }
        }
        return $resources;
    }
577378
public function resources(array $resources)
    {
        foreach ($resources as $name => $resource) {
            $options = [];

            if (\is_array($resource)) {
                list($resource, $options) = $resource;
            }

            $this->resource($name, $resource, $options);
        }
    }
747559
private function setCachedSettings(Collection $settings)
    {
        $expiresAt = Carbon::now()->addMinutes(15);
        $settings  = $settings->toArray();

        Cache::put(self::CACHE_NAME, $settings, $expiresAt);

        $this->fireEvent('cache_updated', array($settings));
    }