Overview

Namespaces

  • Pharborist
    • Constants
    • ControlStructures
    • Exceptions
    • Functions
    • Generators
    • Namespaces
    • Objects
    • Operators
    • Types
    • Variables

Classes

  • Pharborist\Variables\CompoundVariableNode
  • Pharborist\Variables\GlobalStatementNode
  • Pharborist\Variables\ReferenceVariableNode
  • Pharborist\Variables\StaticVariableNode
  • Pharborist\Variables\StaticVariableStatementNode
  • Pharborist\Variables\VariableNode
  • Pharborist\Variables\VariableVariableNode

Interfaces

  • Pharborist\Variables\VariableExpressionNode
  • Overview
  • Namespace
  • Class
 1: <?php
 2: namespace Pharborist\Types;
 3: 
 4: use Pharborist\Constants\ConstantNode;
 5: use Pharborist\FormatterFactory;
 6: use Pharborist\Namespaces\NameNode;
 7: 
 8: /**
 9:  * The NULL constant, spelled `null` or `NULL`.
10:  */
11: class NullNode extends ConstantNode implements ScalarNode {
12:   /**
13:    * Create a new NullNode.
14:    *
15:    * @param string $name
16:    *   Parameter is ignored.
17:    *
18:    * @return NullNode
19:    */
20:   public static function create($name = 'null') {
21:     $is_upper = FormatterFactory::getDefaultFormatter()->getConfig('boolean_null_upper');
22:     $node = new NullNode();
23:     $node->addChild(NameNode::create($is_upper ? 'NULL' : 'null'), 'constantName');
24:     return $node;
25:   }
26: 
27:   /**
28:    * @return null
29:    */
30:   public function toValue() {
31:     return NULL;
32:   }
33: }
34: 
Pharborist API documentation generated by ApiGen