Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Attributes
Zend_Server_Reflection_Parameter Class Reference

Public Member Functions

 __construct (ReflectionParameter $r, $type='mixed', $description='')
 
 __call ($method, $args)
 
 getType ()
 
 setType ($type)
 
 getDescription ()
 
 setDescription ($description)
 
 setPosition ($index)
 
 getPosition ()
 

Protected Attributes

 $_reflection
 
 $_position
 
 $_type
 
 $_description
 

Detailed Description

Definition at line 33 of file Parameter.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( ReflectionParameter  $r,
  $type = 'mixed',
  $description = '' 
)

Constructor

Parameters
ReflectionParameter$r
string$typeParameter type
string$descriptionParameter description

Definition at line 65 of file Parameter.php.

66  {
67  $this->_reflection = $r;
68  $this->setType($type);
70  }
$type
Definition: item.phtml:13

Member Function Documentation

◆ __call()

__call (   $method,
  $args 
)

Proxy reflection calls

Parameters
string$method
array$args
Returns
mixed

Definition at line 79 of file Parameter.php.

80  {
81  if (method_exists($this->_reflection, $method)) {
82  return call_user_func_array(array($this->_reflection, $method), $args);
83  }
84 
85  #require_once 'Zend/Server/Reflection/Exception.php';
86  throw new Zend_Server_Reflection_Exception('Invalid reflection method');
87  }
$method
Definition: info.phtml:13

◆ getDescription()

getDescription ( )

Retrieve parameter description

Returns
string

Definition at line 120 of file Parameter.php.

121  {
122  return $this->_description;
123  }

◆ getPosition()

getPosition ( )

Return parameter position

Returns
int

Definition at line 157 of file Parameter.php.

158  {
159  return $this->_position;
160  }

◆ getType()

getType ( )

Retrieve parameter type

Returns
string

Definition at line 94 of file Parameter.php.

95  {
96  return $this->_type;
97  }

◆ setDescription()

setDescription (   $description)

Set parameter description

Parameters
string | null$description
Returns
void

Definition at line 131 of file Parameter.php.

132  {
133  if (!is_string($description) && (null !== $description)) {
134  #require_once 'Zend/Server/Reflection/Exception.php';
135  throw new Zend_Server_Reflection_Exception('Invalid parameter description');
136  }
137 
138  $this->_description = $description;
139  }

◆ setPosition()

setPosition (   $index)

Set parameter position

Parameters
int$index
Returns
void

Definition at line 147 of file Parameter.php.

148  {
149  $this->_position = (int) $index;
150  }
$index
Definition: list.phtml:44

◆ setType()

setType (   $type)

Set parameter type

Parameters
string | null$type
Returns
void

Definition at line 105 of file Parameter.php.

106  {
107  if (!is_string($type) && (null !== $type)) {
108  #require_once 'Zend/Server/Reflection/Exception.php';
109  throw new Zend_Server_Reflection_Exception('Invalid parameter type');
110  }
111 
112  $this->_type = $type;
113  }
$type
Definition: item.phtml:13

Field Documentation

◆ $_description

$_description
protected

Definition at line 56 of file Parameter.php.

◆ $_position

$_position
protected

Definition at line 44 of file Parameter.php.

◆ $_reflection

$_reflection
protected

Definition at line 38 of file Parameter.php.

◆ $_type

$_type
protected

Definition at line 50 of file Parameter.php.


The documentation for this class was generated from the following file: