PHP Class yii\apidoc\templates\html\ApiRenderer

Since: 2.0
Author: Carsten Brandt ([email protected])
Inheritance: extends yii\apidoc\renderers\ApiRenderer, implements yii\base\ViewContextInterface
Mostrar archivo Open project: yiisoft/yii2-apidoc Class Usage Examples

Public Properties

Property Type Description
$indexView path or alias of the view file to use for rendering the index page.
$layout path or alias of the layout file to use.
$typeView path or alias of the view file to use for rendering types (classes, interfaces, traits).

Public Methods

Method Description
generateApiUrl ( $typeName )
getSourceUrl ( $type, $line = null )
getView ( ) : View
getViewPath ( )
init ( )
render ( Context $context, $targetDir ) Renders a given [[Context]].
renderClasses ( array $names ) : string
renderDefaultValue ( mixed $value ) : string Renders the default value.
renderInheritance ( yii\apidoc\models\ClassDoc $class ) : string
renderInterfaces ( array $names ) : string
renderMethodSignature ( yii\apidoc\models\MethodDoc $method, $context = null ) : string
renderPropertySignature ( PropertyDoc $property, $context = null ) : string
renderTraits ( array $names ) : string

Protected Methods

Method Description
generateFileName ( string $typeName ) : string Generates file name for API page for a given type
generateLink ( $text, $href, $options = [] )
renderWithLayout ( string $viewFile, array $params ) : string Renders file applying layout

Method Details

generateApiUrl() public method

public generateApiUrl ( $typeName )

generateFileName() protected method

Generates file name for API page for a given type
protected generateFileName ( string $typeName ) : string
$typeName string
return string

getSourceUrl() public method

public getSourceUrl ( $type, $line = null )

getView() public method

public getView ( ) : View
return yii\web\View the view instance

getViewPath() public method

public getViewPath ( )

init() public method

public init ( )

render() public method

Renders a given [[Context]].
public render ( Context $context, $targetDir )
$context yii\apidoc\models\Context the api documentation context to render.
$targetDir

renderClasses() public method

public renderClasses ( array $names ) : string
$names array
return string

renderDefaultValue() public method

Renders the default value.
Since: 2.1.1
public renderDefaultValue ( mixed $value ) : string
$value mixed
return string

renderInheritance() public method

public renderInheritance ( yii\apidoc\models\ClassDoc $class ) : string
$class yii\apidoc\models\ClassDoc
return string

renderInterfaces() public method

public renderInterfaces ( array $names ) : string
$names array
return string

renderMethodSignature() public method

public renderMethodSignature ( yii\apidoc\models\MethodDoc $method, $context = null ) : string
$method yii\apidoc\models\MethodDoc
return string

renderPropertySignature() public method

public renderPropertySignature ( PropertyDoc $property, $context = null ) : string
$property yii\apidoc\models\PropertyDoc
return string

renderTraits() public method

public renderTraits ( array $names ) : string
$names array
return string

renderWithLayout() protected method

Renders file applying layout
protected renderWithLayout ( string $viewFile, array $params ) : string
$viewFile string the view name
$params array the parameters (name-value pairs) that will be extracted and made available in the view file.
return string

Property Details

$indexView public_oe property

path or alias of the view file to use for rendering the index page.
public $indexView

$layout public_oe property

path or alias of the layout file to use.
public $layout

$typeView public_oe property

path or alias of the view file to use for rendering types (classes, interfaces, traits).
public $typeView