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 constant/#define defined on some include file.
12:  */
13: class Constant
14: {
15: 
16:     /**
17:      * Holds the name of the constant
18:      * @var string
19:      */
20:     public $name;
21: 
22:     /**
23:      * Value of the constant
24:      * @var string
25:      */
26:     public $value;
27:     
28:     /**
29:      * Description of the element.
30:      * @var string
31:      */
32:     public $description;
33: 
34:     /**
35:      * Reference to the header containing this element.
36:      * @var \Peg\Lib\Definitions\Element\Header
37:      */
38:     public $header;
39:     
40:     /**
41:      * Reference to the header containing this element.
42:      * @var \Peg\Lib\Definitions\Element\NamespaceElement
43:      */
44:     public $namespace;
45:     
46:     /**
47:      * Create a constant element.
48:      * @param string $name
49:      * @param string $value
50:      * @param string $description
51:      */
52:     public function __construct($name, $value, $description="")
53:     {
54:         $this->name = $name;
55:         $this->value = $value;
56:         $this->description = $description;
57:     }
58: 
59: }
PEG Api API documentation generated by ApiGen 2.8.0