PHP Класс F2m2\Apidocs\Commands\ApiDocsGenerator

Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$dotPrefix
$headers array The table headers for the command.
$prefix
$router
$routes Illuminate\Routing\RouteCollection An array of all the registered routes.
$storagePath

Открытые методы

Метод Описание
__construct ( Router $router ) : void Create a new route command instance.
make ( string $prefix ) : void Generates the API Documentation based upon a prefix

Защищенные методы

Метод Описание
copyAndSaveTemplate ( $type, $filepath ) : void Copies template type from filepath to target
filterRoute ( array $route ) : array | null Filter the route by URI and / or name.
generateDirectoryStructure ( ) : void Generates the directory structure for the API documentation
generateHTMLCode ( $endpoints ) : void Generates the HTML Code from the templates and saves them
getEndpointMethods ( $endpoints ) : array Returns functions for the endpoints
getEndpoints ( ) : array Returns an array of endpoints
getMethodPatterns ( string $uri, string $method ) : array Get the pattern filters for a given URI and method.
getPatternFilters ( Illuminate\Routing\Route $route ) : array Get all of the pattern filters matching the route.
getRouteInformation ( Illuminate\Routing\Route $route ) : array Get the route information for a given route.
getRoutes ( ) : array Compile the routes into a displayable format.
normalizeSectionName ( $name ) : string Retuns the last part of the section name
updateAndSaveDefaultLayoutTemplate ( string $content ) : void Saves the default layout with HTML content
updatePrefixAndSaveTemplate ( $type, $filepath ) : void Retrieves the content from the template and saves it to a new file
viewPathForType ( $viewType ) : array Returns the path for the view based upon View Type

Приватные методы

Метод Описание
convertToSnakeCase ( string $input ) : string Converts a CamelCase String to Snake Case
createContentForTemplate ( array $endpoints = [] ) : void Generates the content for the templates
generateAssetsDirectory ( ) : void Generates the assets directory by copying the files from the template directory to a public diretory

Описание методов

__construct() публичный Метод

Create a new route command instance.
public __construct ( Router $router ) : void
$router Illuminate\Routing\Router
Результат void

copyAndSaveTemplate() защищенный Метод

Copies template type from filepath to target
protected copyAndSaveTemplate ( $type, $filepath ) : void
Результат void

filterRoute() защищенный Метод

Filter the route by URI and / or name.
protected filterRoute ( array $route ) : array | null
$route array
Результат array | null

generateDirectoryStructure() защищенный Метод

Generates the directory structure for the API documentation
protected generateDirectoryStructure ( ) : void
Результат void

generateHTMLCode() защищенный Метод

Generates the HTML Code from the templates and saves them
protected generateHTMLCode ( $endpoints ) : void
$endpoints
Результат void

getEndpointMethods() защищенный Метод

Returns functions for the endpoints
protected getEndpointMethods ( $endpoints ) : array
$endpoints
Результат array

getEndpoints() защищенный Метод

Returns an array of endpoints
protected getEndpoints ( ) : array
Результат array

getMethodPatterns() защищенный Метод

Get the pattern filters for a given URI and method.
protected getMethodPatterns ( string $uri, string $method ) : array
$uri string
$method string
Результат array

getPatternFilters() защищенный Метод

Get all of the pattern filters matching the route.
protected getPatternFilters ( Illuminate\Routing\Route $route ) : array
$route Illuminate\Routing\Route
Результат array

getRouteInformation() защищенный Метод

Get the route information for a given route.
protected getRouteInformation ( Illuminate\Routing\Route $route ) : array
$route Illuminate\Routing\Route
Результат array

getRoutes() защищенный Метод

Compile the routes into a displayable format.
protected getRoutes ( ) : array
Результат array

make() публичный Метод

Generates the API Documentation based upon a prefix
public make ( string $prefix ) : void
$prefix string
Результат void

normalizeSectionName() защищенный Метод

Retuns the last part of the section name
protected normalizeSectionName ( $name ) : string
Результат string

updateAndSaveDefaultLayoutTemplate() защищенный Метод

Saves the default layout with HTML content
protected updateAndSaveDefaultLayoutTemplate ( string $content ) : void
$content string
Результат void

updatePrefixAndSaveTemplate() защищенный Метод

Retrieves the content from the template and saves it to a new file
protected updatePrefixAndSaveTemplate ( $type, $filepath ) : void
Результат void

viewPathForType() защищенный Метод

Returns the path for the view based upon View Type
protected viewPathForType ( $viewType ) : array
$viewType
Результат array

Описание свойств

$dotPrefix защищенное свойство

protected $dotPrefix

$headers защищенное свойство

The table headers for the command.
protected array $headers
Результат array

$prefix защищенное свойство

protected $prefix

$router защищенное свойство

protected $router

$routes защищенное свойство

An array of all the registered routes.
protected RouteCollection,Illuminate\Routing $routes
Результат Illuminate\Routing\RouteCollection

$storagePath защищенное свойство

protected $storagePath