public static function indexArrayOfObjectsByMember($member, $objects) {

        $returnValues = array();

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

        return $returnValues;

    }
public static function indexArrayOfObjectsByMember($member, $objects) {

        $returnValues = array();

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

        return $returnValues;

    }
public static function indexArrayOfObjectsByMember ( $ member , $ objects ) { $ returnValues = array ( ) ; foreach ( $ objects as $ object ) { if ( $ object instanceof SerialisableObject ) { $ returnValues [ $ object -> __getSerialisablePropertyValue ( $ member ) ] = $ object ; } else { throw new ClassNotSerialisableException ( get_class ( $ object ) ) ; } } return $ returnValues ; }
Index the array of passed objects by the supplied member, returning an associative array.

@param $member
@param $objects
Index the array of passed objects by the supplied member returning an associative array .