本文整理汇总了PHP中Ak::get_this_object_methods方法的典型用法代码示例。如果您正苦于以下问题:PHP Ak::get_this_object_methods方法的具体用法?PHP Ak::get_this_object_methods怎么用?PHP Ak::get_this_object_methods使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ak
的用法示例。
在下文中一共展示了Ak::get_this_object_methods方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Test_get_this_object_methods
function Test_get_this_object_methods()
{
if (AK_PHP5) {
$expected_methods = array('AkTestingObjectInspectionChild', 'child_function', 'child_method');
} else {
$expected_methods = array('aktestingobjectinspectionchild', 'child_function', 'child_method');
}
$resulting_methods = Ak::get_this_object_methods($this->AkTestingObjectInspectionChildInstance);
$this->assertEqual($expected_methods, $resulting_methods);
}
示例2: get_object_info
/**
* Gets information about given object
*
* @access public
* @static
* @uses Ak::get_this_object_methods
* @uses Ak::get_this_object_attributes
* @param object &$object Object to get info from
* @param boolean $include_inherited_info By setting this to true, parent Object properties
* and methods will be included.
* @return string html output with Object info
*/
function get_object_info($object, $include_inherited_info = false)
{
$object_name = get_class($object);
$methods = $include_inherited_info ? get_class_methods($object) : Ak::get_this_object_methods($object);
$vars = $include_inherited_info ? get_class_vars($object_name) : Ak::get_this_object_attributes($object);
$var_desc = '';
if (is_array($vars)) {
$var_desc = '<ul>';
foreach ($vars as $varname => $var_value) {
$var_desc .= "<li>{$varname} = {$var_value} (" . gettype($var_value) . ")</li>\n";
}
$var_desc .= "</ul>";
}
return Ak::t('Object <b>%object_name</b> information:<hr> <b>object Vars:</b><br>%var_desc <hr> <b>object Methods:</b><br><ul><li>%methods</li></ul>', array('%object_name' => $object_name, '%var_desc' => $var_desc, '%methods' => join("();</li>\n<li>", $methods) . '();'));
}
示例3: Test_get_this_object_methods
public function Test_get_this_object_methods()
{
$expected_methods = array('AkTestingObjectInspectionChild', 'child_function', 'child_method');
$resulting_methods = Ak::get_this_object_methods($this->AkTestingObjectInspectionChildInstance);
$this->assertEqual($expected_methods, $resulting_methods);
}