PHP Class Mpociot\ApiDoc\Generators\AbstractGenerator

显示文件 Open project: mpociot/laravel-apidoc-generator Class Usage Examples

Public Methods

Method Description
callRoute ( string $method, string $uri, array $parameters = [], array $cookies = [], array $files = [], array $server = [], string $content = null ) : Illuminate\Http\Response Call the given URI and return the Response.
prepareMiddleware ( boolean $disable = false ) : void Prepares / Disables route middlewares.
processRoute ( Illuminate\Routing\Route $route, array $bindings = [], boolean $withResponse = true ) : array

Protected Methods

Method Description
addRouteModelBindings ( $route, array $bindings ) : mixed
fancyImplode ( array $arr, string $first, string $last ) : string
getParameters ( array $routeData, array $routeAction, array $bindings ) : mixed
getRouteDescription ( Illuminate\Routing\Route $route ) : string
getRouteGroup ( string $route ) : string
getRouteResponse ( $route, $bindings, $headers = [] ) : Illuminate\Http\Response
getRouteRules ( $route, array $bindings ) : array
getUri ( $route ) : mixed
normalizeRule ( string $rule ) : string Normalizes a rule so that we can accept short types.
parseParameters ( string $rule, string $parameter ) : array Parse a parameter list.
parseRule ( string $rule, string $ruleName, array &$attributeData, integer $seed ) : void
parseStringRule ( string $rules ) : array Parse a string based rule.
splitValuePairs ( $parameters, $first = 'is ', $last = 'or ' )
transformHeadersToServerVars ( array $headers ) : array Transform headers array to array of $_SERVER vars with HTTP_* format.

Method Details

addRouteModelBindings() protected method

protected addRouteModelBindings ( $route, array $bindings ) : mixed
$route
$bindings array
return mixed

callRoute() abstract public method

Call the given URI and return the Response.
abstract public callRoute ( string $method, string $uri, array $parameters = [], array $cookies = [], array $files = [], array $server = [], string $content = null ) : Illuminate\Http\Response
$method string
$uri string
$parameters array
$cookies array
$files array
$server array
$content string
return Illuminate\Http\Response

fancyImplode() protected method

protected fancyImplode ( array $arr, string $first, string $last ) : string
$arr array
$first string
$last string
return string

getParameters() protected method

protected getParameters ( array $routeData, array $routeAction, array $bindings ) : mixed
$routeData array
$routeAction array
$bindings array
return mixed

getRouteDescription() protected method

protected getRouteDescription ( Illuminate\Routing\Route $route ) : string
$route Illuminate\Routing\Route
return string

getRouteGroup() protected method

protected getRouteGroup ( string $route ) : string
$route string
return string

getRouteResponse() protected method

protected getRouteResponse ( $route, $bindings, $headers = [] ) : Illuminate\Http\Response
$route
$bindings
$headers
return Illuminate\Http\Response

getRouteRules() protected method

protected getRouteRules ( $route, array $bindings ) : array
$route
$bindings array
return array

getUri() abstract protected method

abstract protected getUri ( $route ) : mixed
$route
return mixed

normalizeRule() protected method

Normalizes a rule so that we can accept short types.
protected normalizeRule ( string $rule ) : string
$rule string
return string

parseParameters() protected method

Parse a parameter list.
protected parseParameters ( string $rule, string $parameter ) : array
$rule string
$parameter string
return array

parseRule() protected method

protected parseRule ( string $rule, string $ruleName, array &$attributeData, integer $seed ) : void
$rule string
$ruleName string
$attributeData array
$seed integer
return void

parseStringRule() protected method

Parse a string based rule.
protected parseStringRule ( string $rules ) : array
$rules string
return array

prepareMiddleware() abstract public method

Prepares / Disables route middlewares.
abstract public prepareMiddleware ( boolean $disable = false ) : void
$disable boolean
return void

processRoute() abstract public method

abstract public processRoute ( Illuminate\Routing\Route $route, array $bindings = [], boolean $withResponse = true ) : array
$route Illuminate\Routing\Route
$bindings array
$withResponse boolean
return array

splitValuePairs() protected method

protected splitValuePairs ( $parameters, $first = 'is ', $last = 'or ' )

transformHeadersToServerVars() protected method

Transform headers array to array of $_SERVER vars with HTTP_* format.
protected transformHeadersToServerVars ( array $headers ) : array
$headers array
return array