Documentation

PrettierEndpointFactory extends EndpointFactory
in package

We know that, consistently, GET endpoints that return components whose names end in "Collection" would be better named as "list" or "filter"

Table of Contents

Properties

$logger  : LoggerInterface|null

Methods

__construct()  : mixed
create()  : Endpoint
fromPathItem()  : Endpoint
getMethodNameForOperation()  : string
instantiate()  : string
methodParameters()  : Parameter[]}
Parse parameter information from an operation
normalizePath()  : string
Calculate a "normalized" path to the directory containing the class based on its URL

Properties

Methods

__construct()

public __construct(LoggerInterface $logger) : mixed
Parameters
$logger : LoggerInterface

create()

public create(string $path, string $namespace[, null|string|Type $baseType = null ][, string|null $description = null ]) : Endpoint
Parameters
$path : string

Relative path to class from BaseMapper->getBasePath()

$namespace : string
$baseType : null|string|Type = null
$description : string|null = null
Return values
Endpoint

getMethodNameForOperation()

protected getMethodNameForOperation(string $operation, Operation $operationDescription, string $url, array<string|int, mixed> $parameters, Type $returnType) : string
Parameters
$operation : string
$operationDescription : Operation
$url : string
$parameters : array<string|int, mixed>
$returnType : Type
Return values
string

instantiate()

protected instantiate(bool $instantiate, Type $type, string $arg) : string
Parameters
$instantiate : bool
$type : Type
$arg : string
Return values
string

methodParameters()

Parse parameter information from an operation

protected methodParameters(Operation $operation) : Parameter[]}
Parameters
$operation : Operation
Return values
Parameter[]}

normalizePath()

Calculate a "normalized" path to the directory containing the class based on its URL

protected normalizePath(string $path) : string

The process removes all path parameters from the url: /foo/{foo_id}/bar/{bar_id}/{baz} would normalize to /foo for a class named Bar.

Parameters
$path : string
Return values
string

        
On this page

Search results