HasObjectProperties::check()

Not yet in a tagged release

Description

HasObjectProperties::check() - does an object have non-static properties?

// remember to import first
use GanbaroDigital\MissingBits\ClassesAndObjects\HasObjectProperties;

// our method signature
bool HasObjectProperties(object $target, $propTypes = ReflectionProperty::IS_PUBLIC);

Parameters

HasObjectProperties::check() takes two parameters:

Return Values

HasObjectProperties::check() returns a boolean:

Throws

HasObjectProperties::check() throws an InvalidArgumentException if:

Constraints

HasObjectProperties::check() only works on objects. Use HasClassProperties::check() to check for static properties.