The resources settings from short form will be converted to long form
which include full url to each resource

@param array $resources Resources

@return array $resource Resource settings after converted
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;
    }
759432
public function setResources(array $resources)
    {
        $this->resources = [];

        foreach ($resources as $resource) {
            $this->addResource($resource);
        }
    }
805931
protected function handleResource(array $resources)
    {
        $found = array_by_key_value($resources, 'name', $this->resource);
        if (!isset($found, $found['class_name'])) {
            throw new NotFoundException("Resource '{$this->resource}' not found for service '{$this->name}'.");
        }

        $className = $found['class_name'];

        if (!class_exists($className)) {
            throw new InternalServerErrorException('Service configuration class name lookup failed for resource ' .
                $this->resourcePath);
        }

        /** @var ResourceInterface $resource */
        $resource = $this->instantiateResource($className, $found);

        $newPath = $this->resourceArray;
        array_shift($newPath);
        $newPath = implode('/', $newPath);

        return $resource->handleRequest($this->request, $newPath);
    }
1278996
protected function collectResource($resource)
    {
        if ($resource instanceof MissingValue) {
            return $resource;
        }

        $collects = $this->collects();

        $this->collection = $collects && ! $resource->first() instanceof $collects
            ? $resource->mapInto($collects)
            : $resource->toBase();

        return $resource instanceof AbstractPaginator
                    ? $resource->setCollection($this->collection)
                    : $this->collection;
    }
638284
private function sanitizeResources($resources)
    {
        return $resources->map(function ($resource) {
            return collect($resource)->mapWithKeys(function ($value, $key) {
                return [$this->sanitizeKey($key) => $value];
            });
        });
    }
788335
public function load($resource)
    {
        $features = array();

        if (isset($resource['features'])) {
            foreach ($resource['features'] as $iterator => $hash) {
                $feature = $this->loadFeatureHash($hash, $iterator);
                $features[] = $feature;
            }
        } elseif (isset($resource['feature'])) {
            $feature = $this->loadFeatureHash($resource['feature']);
            $features[] = $feature;
        }

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

        return $resources;
    }
1329564
public function getResourceUrl($resource)
    {
        Assert::oneOf(
            $resource,
            self::getResourcesNames(),
            'Resource type "%s" is not supported by the ACME server (supported: %2$s)'
        );

        return isset($this->serverResources[$resource]) ? $this->serverResources[$resource] : null;
    }
1043233
public function addResources(array $resources) {
		foreach ($resources as $name => $resource) {
			if (is_numeric($name)) {
				$this->addResource($resource);
				continue;
			}
			
			$this->addResource($resource, $name);
		}
		
		return $this;
	}
88245
private function buildUrl($resource, $args)
    {
        //Merge args(apiKey, Format, noJsonCallback)
        $args = array_merge($args, $this->args);
        $query = http_build_query($args);

        $url = $this->url;
        $url .= $resource . '?' . $query;

        return $url;
    }
1356947
public function getInlcudeResources($resource)
    {
        switch ($resource) {
            case 'administrative_areas':
                return $this->administrativeAreas()->getQuery();
            case 'cities':
                return $this->cities()->getQuery()->select("ctrystore_cities.*");
        }
        return false;
    }
1291353
public function mergeConfig($resources)
    {
        $configs = array();
        foreach (is_array($resources) ? $resources : func_get_args() as $resource) {
            $configs = ArrayUtils::merge($configs, $this->loadConfig($resource));
        }

        return $configs;
    }
662649
public function loadResourceNamespaceMap($rootDir, array $resources)
    {
        return array_map(function($resource) use ($rootDir) {
            return $rootDir . '/' . trim($resource, '/') . '/';
        }, $resources);
    }
574134
protected function addResources($resources)
    {
        foreach ($resources as $permission => $controllers) {
            foreach ($controllers as $controller => $actions) {
                if ($controller == '') {
                    $controller = null;
                } else {
                    if (!$this->hasResource($controller)) {
                        $this->addResource(new GenericResource($controller));
                    }
                }

                foreach ($actions as $action => $roles) {
                    if ($action == '') {
                        $action = null;
                    }

                    if ($permission == 'allow') {
                        foreach ($roles as $role) {
                            $this->allow($role, $controller, $action);
                        }
                    } elseif ($permission == 'deny') {
                        foreach ($roles as $role) {
                            $this->deny($role, $controller, $action);
                        }
                    } else {
                        throw new \Exception('No valid permission defined: ' . $permission);
                    }
                }

            }
        }

        return $this;
    }
419958
public function getActionsByResource($resource)
    {
        if (!isset($this->resources[$resource])) {
            return null; // no resource found
        }

        $actions = array();
        foreach ($this->resources[$resource] as $action => $path) {
            $actions[] = $action;
        }

        return $actions;
    }
953887
protected function handleResource(array $resources)
    {
        //  Fall through is to process just like a no-resource request
        $resources = $this->getResourceHandlers();
        if ((false !== $resources) && !empty($this->resource)) {
            if (in_array($this->resource, $resources)) {
                return $this->processRequest();
            }
        }

        throw new NotFoundException("Resource '{$this->resource}' not found for service '{$this->name}'.");
    }
1137698
public function resources(array $controllers)
    {
        $resource = new RouteResource;
        foreach ($controllers as $controller)
            $resource->set($this->resource($controller));
        return $resource;
    }