public function getIndexedPreference( $name, $withIndex = false, $ignoreExpired = true )
    {
        $values = [];

        foreach( $this->getPreferences() as $pref )
        {
            if( $pref->getName() == $name )
            {
                if( $ignoreExpired && $pref->getExpiresAt() && ( $pref->getExpiresAt() < new \DateTime() ) )
                    continue;

                if( $withIndex )
                    $values[ $pref->getIx() ] = [ 'index' => $pref->getIx(), 'value' => $pref->getValue() ];
                else
                    $values[ $pref->getIx() ] = $pref->getValue();
            }
        }

        ksort( $values, SORT_NUMERIC );

        return $values;
    }