本文整理匯總了PHP中check::classmethods方法的典型用法代碼示例。如果您正苦於以下問題:PHP check::classmethods方法的具體用法?PHP check::classmethods怎麽用?PHP check::classmethods使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類check
的用法示例。
在下文中一共展示了check::classmethods方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array
<?php
require "tests.php";
require "rename_scope.php";
check::classes(array("rename_scope", "Interface_UP", "Interface_BP", "Natural_UP", "Natural_BP", "Bucket"));
check::classmethods("Interface_UP", array("__construct", "__set", "__isset", "__get"));
check::classmethods("Interface_BP", array("__construct", "__set", "__isset", "__get"));
check::classmethods("Natural_UP", array("__construct", "__set", "__isset", "__get", "rtest"));
check::classmethods("Natural_BP", array("__construct", "__set", "__isset", "__get", "rtest"));
check::classparent("Natural_UP", "Interface_UP");
check::classparent("Natural_BP", "Interface_BP");
check::done();
示例2: array
<?php
require "tests.php";
require "smart_pointer_rename.php";
check::classes(array("Foo", "Bar"));
check::classmethods("foo", array("ftest1", "ftest2", "__set", "__isset", "__get", "__construct"));
check::classmethods("bar", array("__deref__", "test", "ftest1", "ftest2", "__set", "__isset", "__get", "__construct"));
$foo = new foo();
check::classname("foo", $foo);
$bar = new bar($foo);
check::classname("bar", $bar);
# check foo's ftest1, ftest2
check::equal(1, $foo->ftest1(1), "foo->ftest1");
check::equal(2, $foo->ftest2(1, 2), "foo->ftest2");
# check bar's ftest1, ftest2, ftest
check::equal(1, $bar->ftest1(1), "bar->ftest1");
check::equal(2, $bar->ftest2(1, 2), "bar->ftest2");
check::equal(3, $bar->test(), "bar->test");
# check deref returns foo
check::classname("foo", $bar->__deref__());
check::done();