Details for an endpoint.

@param string $tech Technology of the endpoint
@param string $resource ID of the endpoint
@return Endpoint
@throws InvalidParameterException
@throws NotFoundException
338681
public function getEndpointByTechAndResource($tech, $resource)
    {
        $uri = "endpoints/$tech/$resource";
        try {
            $response = $this->client->getEndpoint()->get($uri);
        } catch (RequestException $e) {
            $this->processRequestException($e);
        }

        return new Endpoint($this->client, \GuzzleHttp\json_decode($response->getBody()));
    }
1047908
public function moveResource()
    {
        try {
            if (!$this->hasRequestParameter('uri')) {
                throw new InvalidArgumentException('Resource uri must be specified.');
            }

            $data = $this->getRequestParameter('uri');
            $id = $data['id'];

            $this->validateUri($id);
            $this->validateInstanceRoot($id);

            $this->signatureValidator->checkSignature($data['signature'], $id);

            $ids = [$id];

            $this->validateMoveRequest();
            $response = $this->moveAllInstances($ids);
            $this->returnJson($response);
        } catch (\InvalidArgumentException $e) {
            $this->returnJsonError($e->getMessage());
        }
    }
747037
def info(self, resource):
        '''
        
        '''
        service_def, resource_def, path = self._get_service_information(
            resource)

        print (resource)
        print ("*******************************************")
        print ("Base URL: {0}" . format (self.tld))
        print ("Resource path: {0}" . format (resource_def.get("endpoint")))
        print ("Required parameters: {0}" . format (resource_def.get("required_params")))
        print ("Optional parameters" . format (resource_def.get("optional_params")))
475516
protected function getResourceAction($resource, $controller, $method, $options)
    {
        $name = $this->getResourceName($resource, $method, $options);

        return array('as' => $name, 'uses' => $controller .'@' .$method);
    }
107077
public function supports($resource, $type = null)
    {
        if (is_string($resource)) {
            if ($this->isFile($resource)) {
                return $this->validateExtension($resource);
            } else {
                return $this->isJson($resource);
            }
        }

        return false;
    }
415098
public function load($resource, $type = null) 
    {
        $path = $this->locator->locate($resource);
        
        if (!stream_is_local($path)) {
            throw new \InvalidArgumentException(sprintf('This is not a local file "%s".', $path));
        }

        if (!file_exists($path)) {
            throw new \InvalidArgumentException(sprintf('File "%s" not found.', $path));
        }
        
        $this->loaded[$resource] = $path;

        return Yaml::parse(file_get_contents($path));
    }
1046316
@GET
    @Path("/")
    @Produces(MediaType.APPLICATION_JSON)
    // Swagger annotations
    @ApiOperation(value = "Retrieve a list of technologies", httpMethod = "GET", notes = "Get a list of the currently registered set of technologies. This should not be cached as it may change at any time.")
    @ApiResponses(value = { @ApiResponse(code = 200, message = "The list of technologies") })
    public Response tech(@Context UriInfo info) {
        ServiceConnector serviceConnector = new ServiceConnector(info.getBaseUri());
        return Response.ok(serviceConnector.getServices().getServices(), MediaType.APPLICATION_JSON).build();
    }
374890
protected function buildOEmbedRequestUrl($resource, $endPoint, $format = self::FORMAT_DEFAULT)
    {
        $parameters = [
            'url' => $resource,
            'format' => $format,
            'version' => self::VERSION
        ];

        if ($this->getRequestParameters() !== null) {
            $parameters = Arrays::arrayMergeRecursiveOverrule($this->getRequestParameters()->toArray(), $parameters);
        }

        $urlParams = http_build_query($parameters, '', '&');
        $url = $endPoint . ((strpos($endPoint, '?') !== false) ? '&' : '?') . $urlParams;

        return $url;
    }
182152
protected function setResource( string $resource, string $endpoint ): self
	{
		$this->resource = $resource;
		$this->resource_endpoint = $endpoint;
		return $this;
	}
174566
public function router($resource, $arguments)
	{
		// if this is an ajax call
		if ($this->is_restful())
		{
			// have the Controller_Rest router deal with it
			return parent::router($resource, $arguments);
		}

		// check if a input specific method exists
		$controller_method = strtolower(\Input::method()) . '_' . $resource;

		// fall back to action_ if no rest method is provided
		if ( ! method_exists($this, $controller_method))
		{
			$controller_method = 'action_'.$resource;
		}

		// check if the action method exists
		if (method_exists($this, $controller_method))
		{
			return call_fuel_func_array(array($this, $controller_method), $arguments);
		}

		// if not, we got ourselfs a genuine 404!
		throw new \HttpNotFoundException();
	}
237833
protected function getComposerContent($resource)
    {
        $notFoundRetries = 2;
        $composer = null;

        while ($notFoundRetries) {
            try {
                $composer = $this->parseComposerContent($resource);

                break;
            } catch (TransportException $e) {
                if (404 !== $e->getCode()) {
                    throw $e;
                }

                // retry fetching if github returns a 404 since they happen randomly
                --$notFoundRetries;
                $composer = false;
            }
        }

        return $composer;
    }
229779
static public function createFromResource($resource) {
		if (!is_resource($resource))
			throw new Exception('Invalid (resource) parameter! This is not a resource!');
		if (get_resource_type($resource) != 'gd')
			throw new Exception('Invalid (resource) parameter! Resource is not a gd resource!');
		return new self($resource);
	}
201411
protected function getResourceName($resource)
    {
        if ($resource instanceof ResourceInterface) {
            $resource = $resource->getName();
        }

        if (false === is_string($resource)) {
            throw new InvalidArgumentException(
                'Resource argument must be string or an object implemented "Rad\Authorization\Rbac\ResourceInterface".'
            );
        }

        return $resource;
    }
1214074
public function getId($resource): ?string
    {
        assert(get_class($resource) === static::MODEL);
        assert($this->classImplements(static::MODEL, ModelInterface::class) === true);

        /** @var ModelInterface $modelClass */
        $modelClass = static::MODEL;

        $pkName = $modelClass::getPrimaryKeyName();

        return $resource->{$pkName};
    }
525669
public static function wrap($resource = '', $size = null)
    {
        if ($resource instanceof Stream) {
            return $resource;
        }

        $type = gettype($resource);

        if ($type == 'string') {
            return self::fromString($resource, $size);
        }

        if ($type == 'resource') {
            return new self($resource, $size);
        }

        throw new InvalidArgumentException('Invalid resource type: ' . $type);
    }
450649
protected function loadResource($resource, $required)
    {
        foreach ($this->loaders as $loader) {
            if (!$loader->supports($resource)) {
                continue;
            }

            try {
                return $loader->load($resource);
            } catch (ResourceNotFoundException $e) {
                if ($required) {
                    throw $e;
                }

                return [];
            }
        }

        throw new ResourceException(sprintf('There is no configuration loader available to load the resource "%s"', $resource));
    }
153340
protected function getScope() {
        if ($this->annotation->getScope() instanceof AbstractResourceFile) {
            return $this->annotation->getScope();
        } else {
            throw new \Chigi\Chiji\Exception\InvalidConfigException("Invalid Annotation interface resource.");
        }
    }