PageRenderTime 62ms CodeModel.GetById 15ms RepoModel.GetById 1ms app.codeStats 0ms

/Template/src/syntax_trees/ast/nodes/constant.php

https://github.com/Yannix/zetacomponents
PHP | 61 lines | 11 code | 2 blank | 48 comment | 0 complexity | a6ebb6868b8d149021fc07fe78f6fef2 MD5 | raw file
  1. <?php
  2. /**
  3. * File containing the ezcTemplateConstantAstNode class
  4. *
  5. * Licensed to the Apache Software Foundation (ASF) under one
  6. * or more contributor license agreements. See the NOTICE file
  7. * distributed with this work for additional information
  8. * regarding copyright ownership. The ASF licenses this file
  9. * to you under the Apache License, Version 2.0 (the
  10. * "License"); you may not use this file except in compliance
  11. * with the License. You may obtain a copy of the License at
  12. *
  13. * http://www.apache.org/licenses/LICENSE-2.0
  14. *
  15. * Unless required by applicable law or agreed to in writing,
  16. * software distributed under the License is distributed on an
  17. * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  18. * KIND, either express or implied. See the License for the
  19. * specific language governing permissions and limitations
  20. * under the License.
  21. *
  22. * @package Template
  23. * @version //autogen//
  24. * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
  25. * @access private
  26. */
  27. /**
  28. * Represents PHP constants.
  29. *
  30. * Creating the type is done by simply passing the constant name to the
  31. * constructor which will take care of storing it and exporting it to PHP
  32. * code later on.
  33. *
  34. * <code>
  35. * $c = new ezcTemplateConstantAstNode( 'E_NOTICE' );
  36. * </code>
  37. *
  38. * @package Template
  39. * @version //autogen//
  40. * @access private
  41. */
  42. class ezcTemplateConstantAstNode extends ezcTemplateAstNode
  43. {
  44. /**
  45. * The value for the constant.
  46. */
  47. public $value;
  48. /**
  49. * Constructs a new ezcTemplateConstantAstNode
  50. *
  51. * @param mixed $value The value of constant.
  52. */
  53. public function __construct( $value )
  54. {
  55. parent::__construct();
  56. $this->value = $value;
  57. }
  58. }
  59. ?>