public function setAsKey($what)
    {
        switch ($what) {
            case self::CLASS_AS_KEY:
            case self::OFFSET_AS_KEY:
                $this->keytype = $what;
                break;
            default:
                $this->keytype = self::CLASS_AS_KEY;
                break;
        }
    }