PHP Class Dingo\Api\Console\Command\Docs

Inheritance: extends Illuminate\Console\Command
Show file Open project: dingo/api

Protected Properties

Property Type Description
$blueprint Dingo\Blueprint\Blueprint The blueprint instance.
$description string The console command description.
$docs Dingo\Blueprint\Blueprint Blueprint instance.
$name string Default documentation name.
$router Dingo\Api\Routing\Router Router instance.
$signature string The name and signature of the console command.
$version string Default documentation version.
$writer Dingo\Blueprint\Writer Writer instance.

Public Methods

Method Description
__construct ( Router $router, Blueprint $blueprint, Dingo\Blueprint\Writer $writer, string $name, string $version ) : void Create a new docs command instance.
handle ( ) : mixed Execute the console command.

Protected Methods

Method Description
addControllerIfNotExists ( Collection $controllers, object $controller ) : void Add a controller to the collection if it does not exist. If the controller implements an interface suffixed with "Docs" it will be used instead of the controller.
getControllers ( ) : array Get all the controller instances.
getDocName ( ) : string Get the documentation name.
getIncludePath ( ) : string Get the include path for documentation files.
getVersion ( ) : string Get the documentation version.

Method Details

__construct() public method

Create a new docs command instance.
public __construct ( Router $router, Blueprint $blueprint, Dingo\Blueprint\Writer $writer, string $name, string $version ) : void
$router Dingo\Api\Routing\Router
$blueprint Dingo\Blueprint\Blueprint
$writer Dingo\Blueprint\Writer
$name string
$version string
return void

addControllerIfNotExists() protected method

Add a controller to the collection if it does not exist. If the controller implements an interface suffixed with "Docs" it will be used instead of the controller.
protected addControllerIfNotExists ( Collection $controllers, object $controller ) : void
$controllers Illuminate\Support\Collection
$controller object
return void

getControllers() protected method

Get all the controller instances.
protected getControllers ( ) : array
return array

getDocName() protected method

Get the documentation name.
protected getDocName ( ) : string
return string

getIncludePath() protected method

Get the include path for documentation files.
protected getIncludePath ( ) : string
return string

getVersion() protected method

Get the documentation version.
protected getVersion ( ) : string
return string

handle() public method

Execute the console command.
public handle ( ) : mixed
return mixed

Property Details

$blueprint protected property

The blueprint instance.
protected Blueprint,Dingo\Blueprint $blueprint
return Dingo\Blueprint\Blueprint

$description protected property

The console command description.
protected string $description
return string

$docs protected property

Blueprint instance.
protected Blueprint,Dingo\Blueprint $docs
return Dingo\Blueprint\Blueprint

$name protected property

Default documentation name.
protected string $name
return string

$router protected property

Router instance.
protected Router,Dingo\Api\Routing $router
return Dingo\Api\Routing\Router

$signature protected property

The name and signature of the console command.
protected string $signature
return string

$version protected property

Default documentation version.
protected string $version
return string

$writer protected property

Writer instance.
protected Writer,Dingo\Blueprint $writer
return Dingo\Blueprint\Writer