PHP Class Dingo\Blueprint\Blueprint

Afficher le fichier Open project: dingo/blueprint Class Usage Examples

Protected Properties

Свойство Type Description
$files Illuminate\Filesystem\Filesystem Filesytsem instance.
$includePath string Include path for documentation files.
$reader Doctrine\Common\Annotations\SimpleAnnotationReader Simple annotation reader instance.

Méthodes publiques

Méthode Description
__construct ( Doctrine\Common\Annotations\SimpleAnnotationReader $reader, Illuminate\Filesystem\Filesystem $files ) : void Create a new generator instance.
generate ( Collection $controllers, string $name, string $version, string $includePath ) : boolean Generate documentation with the name and version.

Méthodes protégées

Méthode Description
appendAttributes ( string &$contents, Collection $attributes, integer $indent ) : void Append the attributes subsection to a resource or action.
appendBody ( string &$contents, string $body ) : void Append a body subsection to an action.
appendHeaders ( string &$contents, array $headers ) : void Append a headers subsection to an action.
appendParameters ( string &$contents, Collection $parameters ) : void Append the parameters subsection to a resource or action.
appendRequest ( string &$contents, Dingo\Blueprint\Annotation\Request $request, Resource $resource ) : void Append a request subsection to an action.
appendResponse ( string &$contents, Dingo\Blueprint\Annotation\Response $response, Resource $resource ) : void Append a response subsection to an action.
appendSection ( string &$contents, string $name, integer $indent, integer $lines = 2 ) : void Append a subsection to an action.
generateContentsFromResources ( Collection $resources, string $name ) : string Generate the documentation contents from the resources collection.
getFormat ( ) : string Get the API Blueprint format.
line ( integer $repeat = 1 ) : string Create a new line character.
prepareBody ( string $body, string $contentType ) : string Prepare a body.
registerAnnotationLoader ( ) : void Register the annotation loader.
tab ( integer $repeat = 1 ) : string Create a tab character.

Method Details

__construct() public méthode

Create a new generator instance.
public __construct ( Doctrine\Common\Annotations\SimpleAnnotationReader $reader, Illuminate\Filesystem\Filesystem $files ) : void
$reader Doctrine\Common\Annotations\SimpleAnnotationReader
$files Illuminate\Filesystem\Filesystem
Résultat void

appendAttributes() protected méthode

Append the attributes subsection to a resource or action.
protected appendAttributes ( string &$contents, Collection $attributes, integer $indent ) : void
$contents string
$attributes Illuminate\Support\Collection
$indent integer
Résultat void

appendBody() protected méthode

Append a body subsection to an action.
protected appendBody ( string &$contents, string $body ) : void
$contents string
$body string
Résultat void

appendHeaders() protected méthode

Append a headers subsection to an action.
protected appendHeaders ( string &$contents, array $headers ) : void
$contents string
$headers array
Résultat void

appendParameters() protected méthode

Append the parameters subsection to a resource or action.
protected appendParameters ( string &$contents, Collection $parameters ) : void
$contents string
$parameters Illuminate\Support\Collection
Résultat void

appendRequest() protected méthode

Append a request subsection to an action.
protected appendRequest ( string &$contents, Dingo\Blueprint\Annotation\Request $request, Resource $resource ) : void
$contents string
$request Dingo\Blueprint\Annotation\Request
$resource Resource
Résultat void

appendResponse() protected méthode

Append a response subsection to an action.
protected appendResponse ( string &$contents, Dingo\Blueprint\Annotation\Response $response, Resource $resource ) : void
$contents string
$response Dingo\Blueprint\Annotation\Response
$resource Resource
Résultat void

appendSection() protected méthode

Append a subsection to an action.
protected appendSection ( string &$contents, string $name, integer $indent, integer $lines = 2 ) : void
$contents string
$name string
$indent integer
$lines integer
Résultat void

generate() public méthode

Generate documentation with the name and version.
public generate ( Collection $controllers, string $name, string $version, string $includePath ) : boolean
$controllers Illuminate\Support\Collection
$name string
$version string
$includePath string
Résultat boolean

generateContentsFromResources() protected méthode

Generate the documentation contents from the resources collection.
protected generateContentsFromResources ( Collection $resources, string $name ) : string
$resources Illuminate\Support\Collection
$name string
Résultat string

getFormat() protected méthode

Get the API Blueprint format.
protected getFormat ( ) : string
Résultat string

line() protected méthode

Create a new line character.
protected line ( integer $repeat = 1 ) : string
$repeat integer
Résultat string

prepareBody() protected méthode

Prepare a body.
protected prepareBody ( string $body, string $contentType ) : string
$body string
$contentType string
Résultat string

registerAnnotationLoader() protected méthode

Register the annotation loader.
protected registerAnnotationLoader ( ) : void
Résultat void

tab() protected méthode

Create a tab character.
protected tab ( integer $repeat = 1 ) : string
$repeat integer
Résultat string

Property Details

$files protected_oe property

Filesytsem instance.
protected Filesystem,Illuminate\Filesystem $files
Résultat Illuminate\Filesystem\Filesystem

$includePath protected_oe property

Include path for documentation files.
protected string $includePath
Résultat string

$reader protected_oe property

Simple annotation reader instance.
protected SimpleAnnotationReader,Doctrine\Common\Annotations $reader
Résultat Doctrine\Common\Annotations\SimpleAnnotationReader