protected function getItems($raw, $class, $attachment)
    {
        if ($class->hasFilter()) {
            $query = $class->getFilter();

            return call_user_func_array($query, [$raw->$attachment()]);
        } else {
            return is_object($raw) ? $raw->$attachment : $raw[$attachment];
        }
    }