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
 1: <?php
 2: /**
 3:  * @author Jefferson González
 4:  * @license MIT
 5:  * @link http://github.com/peg-org/peg-src Source code.
 6:  */
 7: 
 8: namespace Peg\Lib\Definitions\Element;
 9: 
10: /**
11:  * Represents a global variable element declared on a header file.
12:  */
13: class GlobalVariable extends VariableType
14: {
15:     
16:     /**
17:      * Holds the name of the element
18:      * @var string
19:      */
20:     public $name;
21:     
22:     /**
23:      * Reference to the header containing this element.
24:      * @var \Peg\Lib\Definitions\Element\Header
25:      */
26:     public $header;
27:     
28:     /**
29:      * Reference to the namespace containing this element.
30:      * @var \Peg\Lib\Definitions\Element\NamespaceElement
31:      */
32:     public $namespace;
33:     
34:     /**
35:      * Create a global variable element using a declaration specification
36:      * for its type.
37:      * @param string $name Name of the variable.
38:      * @param string $type Parameter type by specification, eg: const int*
39:      * @param string $description A description used to generate documentation.
40:      */
41:     public function __construct($name, $type, $description="")
42:     {
43:         parent::__construct($type, $description);
44:         
45:         $this->name = $name;
46:     }
47: 
48: }
PEG Api API documentation generated by ApiGen 2.8.0