protected function arrayUniqueObject($phpClasses) {
        $hashes = [];

        foreach ($phpClasses as $key => $phpClass) {
            $hashes[$key] = spl_object_hash($phpClass);
        }

        $hashes = array_unique($hashes);

        $uniqueArray = [];

        foreach ($hashes as $key => $hash) {
            $uniqueArray[$key] = $phpClasses[$key];
        }

        return $uniqueArray;
    }
protected function arrayUniqueObject($phpClasses) {
        $hashes = [];

        foreach ($phpClasses as $key => $phpClass) {
            $hashes[$key] = spl_object_hash($phpClass);
        }

        $hashes = array_unique($hashes);

        $uniqueArray = [];

        foreach ($hashes as $key => $hash) {
            $uniqueArray[$key] = $phpClasses[$key];
        }

        return $uniqueArray;
    }
protected function arrayUniqueObject ( $ phpClasses ) { $ hashes = [ ] ; foreach ( $ phpClasses as $ key => $ phpClass ) { $ hashes [ $ key ] = spl_object_hash ( $ phpClass ) ; } $ hashes = array_unique ( $ hashes ) ; $ uniqueArray = [ ] ; foreach ( $ hashes as $ key => $ hash ) { $ uniqueArray [ $ key ] = $ phpClasses [ $ key ] ; } return $ uniqueArray ; }
Makes an array of object unique using the spl_object_hash function

@param $phpClasses
@return array
Makes an array of object unique using the spl_object_hash function