/** * Determines the type for the given type name, which is used, e.g., for return specifications. * * @param string $name the name * @return PC_Obj_MultiType the type */ public function get_type_by_name($name) { switch ($name) { case 'array': return PC_Obj_MultiType::create_array(); case 'callable': return PC_Obj_MultiType::create_callable(); case 'bool': return PC_Obj_MultiType::create_bool(); case 'float': return PC_Obj_MultiType::create_float(); case 'int': return PC_Obj_MultiType::create_int(); case 'string': return PC_Obj_MultiType::create_string(); case 'self': // TODO get class name return PC_Obj_MultiType::create_object(); default: return PC_Obj_MultiType::create_object($name); } }
function yy_r212() { $this->_retvalue = PC_Obj_MultiType::create_callable(); }
function yy_r356() { $this->_retvalue = PC_Obj_MultiType::create_callable(); $this->state->end_function(); }
/** * Creates a variable with type TCALLABLE * * @param string $file the file of the def * @param int $line the line of the def * @param string $varname optionally, the variable-name * @return PC_Obj_Variable the variable */ public static function create_callable($file, $line, $varname = '') { return new self($file, $line, $varname, PC_Obj_MultiType::create_callable()); }