Overview

Namespaces

  • None
  • Peg
    • Cli
      • Commands
    • Config
    • Custom
      • Command
        • Action
          • Generate
          • Parse
      • CommandLine
      • Config
      • Localization
      • Utilities
    • Lib
      • Definitions
        • Element
      • Generator
      • Lexers
      • Plugins
      • Signals
        • Data
          • Definitions
          • Lexers
        • Type
  • PHP

Classes

  • ClassElement
  • ClassVariable
  • Constant
  • Enumeration
  • FunctionElement
  • GlobalVariable
  • Header
  • NamespaceElement
  • Overload
  • Parameter
  • ReturnType
  • TypeComponents
  • TypeDef
  • VariableType
  • Overview
  • Namespace
  • Class
  • Tree
  • Todo

Class ClassElement

Represents a class element.

Namespace: Peg\Lib\Definitions\Element
Located at src/Definitions/Element/ClassElement.php
Methods summary
public
# __construct( string $name, mixed $description = "" )

Creates a class element.

Creates a class element.

Parameters

$name
string
$name
$description
public Peg\Lib\Definitions\Element\ClassElement
# AddParent( string $parent )

Add a parent class.

Add a parent class.

Parameters

$parent
string
$parent Name of parent class which may also include its namespace.

Returns

Peg\Lib\Definitions\Element\ClassElement
public Peg\Lib\Definitions\Element\ClassElement
# AddParents( array $parents )

Adds an array of parent classes.

Adds an array of parent classes.

Parameters

$parents
array
$parents Name of parent classes which may also include its namespace.

Returns

Peg\Lib\Definitions\Element\ClassElement
public Peg\Lib\Definitions\Element\ClassElement
# AddVariable( Peg\Lib\Definitions\Element\ClassVariable $variable )

Adds a variable to the class.

Adds a variable to the class.

Parameters

$variable
Peg\Lib\Definitions\Element\ClassVariable
$variable

Returns

Peg\Lib\Definitions\Element\ClassElement
public Peg\Lib\Definitions\Element\ClassElement
# AddEnumeration( Peg\Lib\Definitions\Element\Enumeration $enumeration )

Adds an enumeration to the class.

Adds an enumeration to the class.

Parameters

$enumeration
Peg\Lib\Definitions\Element\Enumeration
$enumeration

Returns

Peg\Lib\Definitions\Element\ClassElement
public Peg\Lib\Definitions\Element\ClassElement
# AddMethod( Peg\Lib\Definitions\Element\FunctionElement $method )

Adds a new method/function to the class.

Adds a new method/function to the class.

Parameters

$method
Peg\Lib\Definitions\Element\FunctionElement
$method

Returns

Peg\Lib\Definitions\Element\ClassElement
public boolean
# HasProperties( )

Check of the class as any properties.

Check of the class as any properties.

Returns

boolean
Properties summary
public string $name
#

Holds the name of the class

Holds the name of the class

public array $platforms
#

List of platforms where the element is supported.

List of platforms where the element is supported.

public boolean $struct
#

Flag that indicates if this class should be treated as a struct.

Flag that indicates if this class should be treated as a struct.

public boolean $forward_declaration
#

Flag that indicates if this class should be treated as a forward declaration.

Flag that indicates if this class should be treated as a forward declaration.

public boolean $has_parent
#

Flag that indicates if this class has parents.

Flag that indicates if this class has parents.

public string[] $parents
#

List of parents.

List of parents.

public Peg\Lib\Definitions\Element\ClassVariable[] $variables
#

List of member variables.

List of member variables.

public Peg\Lib\Definitions\Element\Enumeration[] $enumerations
#

List of enumerations.

List of enumerations.

public Peg\Lib\Definitions\Element\FunctionElement[] $methods
#

List of methods.

List of methods.

public string $description
#

Description of the element.

Description of the element.

public Peg\Lib\Definitions\Element\Header $header
#

Reference to the header containing this element.

Reference to the header containing this element.

public Peg\Lib\Definitions\Element\NamespaceElement $namespace
#

Reference to the namespace containing this element.

Reference to the namespace containing this element.

PEG Api API documentation generated by ApiGen 2.8.0