文字

ReflectionProperty::isProtected

(PHP 5)

ReflectionProperty::isProtectedChecks if property is protected

说明

public bool ReflectionProperty::isProtected ( void )

Checks whether the property is protected.

参数

此函数没有参数。

返回值

TRUE if the property is protected, FALSE otherwise.

参见

  • ReflectionProperty::isPublic() - Checks if property is public
  • ReflectionProperty::isPrivate() - Checks if property is private
  • ReflectionProperty::isStatic() - Checks if property is static

用户评论:

[#1] Ievgen Iefimenko the_boss at bk dot ru [2012-06-09 21:44:09]

<?php



class Classname{
    private 
$variable;
}

$obj = new Classname;
$rp = new ReflectionProperty($obj,'variable');
echo 
$rp->isPrivate();
?>

上一篇: 下一篇: