PHP Class yii\apidoc\models\Context

Since: 2.0
Author: Carsten Brandt ([email protected])
Inheritance: extends yii\base\Component
Datei anzeigen Open project: yiisoft/yii2-apidoc Class Usage Examples

Public Properties

Property Type Description
$classes yii\apidoc\models\ClassDoc[]
$errors array
$files list of php files that have been added to this context.
$interfaces yii\apidoc\models\InterfaceDoc[]
$traits yii\apidoc\models\TraitDoc[]
$warnings array

Public Methods

Method Description
addFile ( string $fileName ) Adds file to context
getType ( string $type ) : null | yii\apidoc\models\ClassDoc | yii\apidoc\models\InterfaceDoc | yii\apidoc\models\TraitDoc Returning TypeDoc for a type given
updateReferences ( ) Updates references

Protected Methods

Method Description
handlePropertyFeature ( yii\apidoc\models\ClassDoc $class ) Add properties for getters and setters if class is subclass of Object.
inheritDocs ( yii\apidoc\models\ClassDoc $class ) Inhertit docsblocks using @inheritDoc tag.
isSubclassOf ( yii\apidoc\models\ClassDoc $classA, yii\apidoc\models\ClassDoc | string $classB ) : boolean
updateSubInterfaceInheritance ( $interface ) Add methods to subinterfaces
updateSubclassInheritance ( yii\apidoc\models\ClassDoc $class ) Add implemented interfaces and used traits to subclasses
updateSubclassInterfacesTraits ( yii\apidoc\models\ClassDoc $class ) Add implemented interfaces and used traits to subclasses

Private Methods

Method Description
getFirstNotOptionalParameter ( yii\apidoc\models\MethodDoc $method ) : yii\apidoc\models\ParamDoc
getInterfaces ( yii\apidoc\models\ClassDoc $class ) : array
getParents ( yii\apidoc\models\ClassDoc $class ) : array
hasNonOptionalParams ( yii\apidoc\models\MethodDoc $method, integer $number ) : boolean Check whether a method has $number non-optional parameters.
inheritMethodRecursive ( yii\apidoc\models\MethodDoc $method, yii\apidoc\models\ClassDoc $class ) : mixed
inheritPropertyRecursive ( PropertyDoc $method, yii\apidoc\models\ClassDoc $class ) : mixed

Method Details

addFile() public method

Adds file to context
public addFile ( string $fileName )
$fileName string

getType() public method

Returning TypeDoc for a type given
public getType ( string $type ) : null | yii\apidoc\models\ClassDoc | yii\apidoc\models\InterfaceDoc | yii\apidoc\models\TraitDoc
$type string
return null | yii\apidoc\models\ClassDoc | yii\apidoc\models\InterfaceDoc | yii\apidoc\models\TraitDoc

handlePropertyFeature() protected method

Add properties for getters and setters if class is subclass of Object.
protected handlePropertyFeature ( yii\apidoc\models\ClassDoc $class )
$class yii\apidoc\models\ClassDoc

inheritDocs() protected method

Inhertit docsblocks using @inheritDoc tag.
See also: http://phpdoc.org/docs/latest/guides/inheritance.html
protected inheritDocs ( yii\apidoc\models\ClassDoc $class )
$class yii\apidoc\models\ClassDoc

isSubclassOf() protected method

protected isSubclassOf ( yii\apidoc\models\ClassDoc $classA, yii\apidoc\models\ClassDoc | string $classB ) : boolean
$classA yii\apidoc\models\ClassDoc
$classB yii\apidoc\models\ClassDoc | string
return boolean

updateReferences() public method

Updates references
public updateReferences ( )

updateSubInterfaceInheritance() protected method

Add methods to subinterfaces
protected updateSubInterfaceInheritance ( $interface )

updateSubclassInheritance() protected method

Add implemented interfaces and used traits to subclasses
protected updateSubclassInheritance ( yii\apidoc\models\ClassDoc $class )
$class yii\apidoc\models\ClassDoc

updateSubclassInterfacesTraits() protected method

Add implemented interfaces and used traits to subclasses
protected updateSubclassInterfacesTraits ( yii\apidoc\models\ClassDoc $class )
$class yii\apidoc\models\ClassDoc

Property Details

$classes public_oe property

public ClassDoc[],yii\apidoc\models $classes
return yii\apidoc\models\ClassDoc[]

$errors public_oe property

public array $errors
return array

$files public_oe property

list of php files that have been added to this context.
public $files

$interfaces public_oe property

public InterfaceDoc[],yii\apidoc\models $interfaces
return yii\apidoc\models\InterfaceDoc[]

$traits public_oe property

public TraitDoc[],yii\apidoc\models $traits
return yii\apidoc\models\TraitDoc[]

$warnings public_oe property

Since: 2.0.6
public array $warnings
return array