Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Static Public Member Functions
Zend_Server_Reflection Class Reference

Static Public Member Functions

static reflectClass ($class, $argv=false, $namespace='')
 
static reflectFunction ($function, $argv=false, $namespace='')
 

Detailed Description

Definition at line 41 of file Reflection.php.

Member Function Documentation

◆ reflectClass()

static reflectClass (   $class,
  $argv = false,
  $namespace = '' 
)
static

Perform class reflection to create dispatch signatures

Creates a Zend_Server_Reflection_Class object for the class or object provided.

If extra arguments should be passed to dispatchable methods, these may be provided as an array to $argv.

Parameters
string | object$classClass name or object
null | array$argvOptional arguments to be used during the method call
string$namespaceOptional namespace with which to prefix the method name (used for the signature key). Primarily to avoid collisions, also for XmlRpc namespacing
Returns
Zend_Server_Reflection_Class
Exceptions
Zend_Server_Reflection_Exception

Definition at line 60 of file Reflection.php.

61  {
62  if (is_object($class)) {
63  $reflection = new ReflectionObject($class);
65  $reflection = new ReflectionClass($class);
66  } else {
67  #require_once 'Zend/Server/Reflection/Exception.php';
68  throw new Zend_Server_Reflection_Exception('Invalid class or object passed to attachClass()');
69  }
70 
71  if ($argv && !is_array($argv)) {
72  #require_once 'Zend/Server/Reflection/Exception.php';
73  throw new Zend_Server_Reflection_Exception('Invalid argv argument passed to reflectClass');
74  }
75 
76  return new Zend_Server_Reflection_Class($reflection, $namespace, $argv);
77  }
elseif(isset( $params[ 'redirect_parent']))
Definition: iframe.phtml:17
$_option $_optionId $class
Definition: date.phtml:13

◆ reflectFunction()

static reflectFunction (   $function,
  $argv = false,
  $namespace = '' 
)
static

Perform function reflection to create dispatch signatures

Creates dispatch prototypes for a function. It returns a Zend_Server_Reflection_Function object.

If extra arguments should be passed to the dispatchable function, these may be provided as an array to $argv.

Parameters
string$functionFunction name
null | array$argvOptional arguments to be used during the method call
string$namespaceOptional namespace with which to prefix the function name (used for the signature key). Primarily to avoid collisions, also for XmlRpc namespacing
Returns
Zend_Server_Reflection_Function
Exceptions
Zend_Server_Reflection_Exception

Definition at line 96 of file Reflection.php.

97  {
98  if (!is_string($function) || !function_exists($function)) {
99  #require_once 'Zend/Server/Reflection/Exception.php';
100  throw new Zend_Server_Reflection_Exception('Invalid function "' . $function . '" passed to reflectFunction');
101  }
102 
103 
104  if ($argv && !is_array($argv)) {
105  #require_once 'Zend/Server/Reflection/Exception.php';
106  throw new Zend_Server_Reflection_Exception('Invalid argv argument passed to reflectClass');
107  }
108 
109  return new Zend_Server_Reflection_Function(new ReflectionFunction($function), $namespace, $argv);
110  }

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