protected function parseStates(array $states)
    {
        $newStates = array();
        foreach ($states as $key => $state) {
            if (null === $state) {
                $newStates[] = $key;
            } elseif (self::CFG_STATE_DISABLE !== $state) {
                $newStates[] = $state;
            } elseif (null !== $index = array_search($key, $newStates)) {
                unset($newStates[$index]);
            }
        }

        return $newStates;
    }