/** * Constructs a name node. * * @param string|array $parts Parts of the name (or name as string) * @param int $line Line * @param null|string $docComment Nearest doc comment */ public function __construct($parts, $line = -1, $docComment = null) { if (!is_array($parts)) { $parts = explode('\\', $parts); } parent::__construct(array('parts' => $parts), $line, $docComment); }
/** * Constructs a name node. * * @param string|array $parts Parts of the name (or name as string) * @param array $attributes Additional attributes */ public function __construct($parts, array $attributes = array()) { if (!is_array($parts)) { $parts = explode('\\', $parts); } parent::__construct(array('parts' => $parts), $attributes); }
/** * Constructs a const node for use in class const and const statements. * * @param string $name Name * @param PHPParser_Node_Expr $value Value * @param int $line Line * @param null|string $docComment Nearest doc comment */ public function __construct($name, PHPParser_Node_Expr $value, $line = -1, $docComment = null) { parent::__construct(array('name' => $name, 'value' => $value), $line, $docComment); }
/** * Constructs a const node for use in class const and const statements. * * @param string $name Name * @param PHPParser_Node_Expr $value Value * @param array $attributes Additional attributes */ public function __construct($name, PHPParser_Node_Expr $value, array $attributes = array()) { parent::__construct(array('name' => $name, 'value' => $value), $attributes); }
/** * Constructs a parameter node. * * @param string $name Name * @param null|PHPParser_Node_Expr $default Default value * @param null|string|PHPParser_Node_Name $type Typehint * @param bool $byRef Whether is passed by reference * @param array $attributes Additional attributes */ public function __construct($name, $default = null, $type = null, $byRef = false, array $attributes = array()) { parent::__construct(array('name' => $name, 'default' => $default, 'type' => $type, 'byRef' => $byRef), $attributes); }
/** * Constructs a function call argument node. * * @param PHPParser_Node_Expr $value Value to pass * @param bool $byRef Whether to pass by ref * @param array $attributes Additional attributes */ public function __construct(PHPParser_Node_Expr $value, $byRef = false, array $attributes = array()) { parent::__construct(array('value' => $value, 'byRef' => $byRef), $attributes); }
/** * Constructs a function call argument node. * * @param PHPParser_Node_Expr $value Value to pass * @param bool $byRef Whether to pass by ref * @param int $line Line * @param null|string $docComment Nearest doc comment */ public function __construct(PHPParser_Node_Expr $value, $byRef = false, $line = -1, $docComment = null) { parent::__construct(array('value' => $value, 'byRef' => $byRef), $line, $docComment); }
/** * Constructs a parameter node. * * @param string $name Name * @param null|PHPParser_Node_Expr $default Default value * @param null|string|PHPParser_Node_Name $type Typehint * @param bool $byRef Whether is passed by reference * @param int $line Line * @param null|string $docComment Nearest doc comment */ public function __construct($name, $default = null, $type = null, $byRef = false, $line = -1, $docComment = null) { parent::__construct(array('name' => $name, 'default' => $default, 'type' => $type, 'byRef' => $byRef), $line, $docComment); }
/** * Constructs a case node. * * @param null|PHPParser_Node_Expr $conds Conditions * @param PHPParser_Node[] $stmts Statements * @param int $line Line * @param null|string $docComment Nearest doc comment */ public function __construct(array $conds, array $stmts = array(), $line = -1, $docComment = null) { parent::__construct(array('conds' => $conds, 'stmts' => $stmts), $line, $docComment); }