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 Header

Represents an include file with all its elements.

Namespace: Peg\Lib\Definitions\Element
Located at src/Definitions/Element/Header.php
Methods summary
public
# __construct( string $name, boolean $enabled = true )

Initializes a header element.

Initializes a header element.

Parameters

$name
string
$name
$enabled
boolean
$enabled
public
# AddConstant( Peg\Lib\Definitions\Element\Constant $constant, string $namespace = "\\" )

Adds a new constant.

Adds a new constant.

Parameters

$constant
Peg\Lib\Definitions\Element\Constant
$constant
$namespace
string
$namespace
public
# AddEnumeration( Peg\Lib\Definitions\Element\Enumeration $enumeration, string $namespace = "\\" )

Adds a new enumeration.

Adds a new enumeration.

Parameters

$enumeration
Peg\Lib\Definitions\Element\Enumeration
$enumeration
$namespace
string
$namespace
public
# AddTypeDef( Peg\Lib\Definitions\Element\TypeDef $typedef, string $namespace = "\\" )

Adds a new enumeration.

Adds a new enumeration.

Parameters

$typedef
Peg\Lib\Definitions\Element\Enumeration
$typedef
$namespace
string
$namespace
public
# AddGlobalVariable( Peg\Lib\Definitions\Element\GlobalVariable $global_variable, string $namespace = "\\" )

Adds a new global variable.

Adds a new global variable.

Parameters

$global_variable
Peg\Lib\Definitions\Element\GlobalVariable
$global_variable
$namespace
string
$namespace
public
# AddFunction( Peg\Lib\Definitions\Element\FunctionElement $function, string $namespace = "\\" )

Adds a new function.

Adds a new function.

Parameters

$function
Peg\Lib\Definitions\Element\FunctionElement
$function
$namespace
string
$namespace
public
# AddClass( Peg\Lib\Definitions\Element\ClassElement $class, string $namespace = "\\" )

Adds a new class.

Adds a new class.

Parameters

$class
Peg\Lib\Definitions\Element\ClassElement
$class
$namespace
string
$namespace
public boolean
# HasConstants( )

Check if the header has constants.

Check if the header has constants.

Returns

boolean
public boolean
# HasEnumerations( )

Check if the header has enumerations.

Check if the header has enumerations.

Returns

boolean
public boolean
# HasTypeDefs( )

Check if the header has type definitions.

Check if the header has type definitions.

Returns

boolean
public boolean
# HasGlobalVariables( )

Check if the header has global variables.

Check if the header has global variables.

Returns

boolean
public boolean
# HasFunctions( )

Check if the header has functions.

Check if the header has functions.

Returns

boolean
public boolean
# HasClasses( )

Check if the header has classes.

Check if the header has classes.

Returns

boolean
Properties summary
public string $name
#

Holds the name of the file

Holds the name of the file

public boolean $enabled
#

Flag to exclude/include this file when generating the source code.

Flag to exclude/include this file when generating the source code.

public Peg\Lib\Definitions\Element\NamespaceElement[] $namespaces
#

List of namespaces declared on the file.

List of namespaces declared on the file.

PEG Api API documentation generated by ApiGen 2.8.0