public static function filterArrayOfObjectsByMember($member, $objects, $filterValue) {

        $filterValues = is_array($filterValue) ? $filterValue : array($filterValue);

        $filteredObjects = array();

        foreach ($objects as $object) {
            if ($object instanceof SerialisableObject) {
                foreach ($filterValues as $value) {
                    if ($value == $object->__getSerialisablePropertyValue($member)) {
                        $filteredObjects[] = $object;
                        break;
                    }
                }
            } else {
                throw new ClassNotSerialisableException(get_class($object));
            }
        }

        return $filteredObjects;

    }
public static function filterArrayOfObjectsByMember($member, $objects, $filterValue) {

        $filterValues = is_array($filterValue) ? $filterValue : array($filterValue);

        $filteredObjects = array();

        foreach ($objects as $object) {
            if ($object instanceof SerialisableObject) {
                foreach ($filterValues as $value) {
                    if ($value == $object->__getSerialisablePropertyValue($member)) {
                        $filteredObjects[] = $object;
                        break;
                    }
                }
            } else {
                throw new ClassNotSerialisableException(get_class($object));
            }
        }

        return $filteredObjects;

    }
public static function filterArrayOfObjectsByMember ( $ member , $ objects , $ filterValue ) { $ filterValues = is_array ( $ filterValue ) ? $ filterValue : array ( $ filterValue ) ; $ filteredObjects = array ( ) ; foreach ( $ objects as $ object ) { if ( $ object instanceof SerialisableObject ) { foreach ( $ filterValues as $ value ) { if ( $ value == $ object -> __getSerialisablePropertyValue ( $ member ) ) { $ filteredObjects [ ] = $ object ; break ; } } } else { throw new ClassNotSerialisableException ( get_class ( $ object ) ) ; } } return $ filteredObjects ; }
Filter an array of objects by a specified member.  Perhaps in the future extend
to multiple match types.

@param $member
@param $objects
@param $filterValue
Filter an array of objects by a specified member . Perhaps in the future extend to multiple match types .