protected function classIs($class, $base)
    {
        if (is_array($base)) {
            foreach ($base as $nextBase) {
                if ($this->classIs($class, $nextBase)) {
                    return true;
                }
            }
            return false;
        }

        // Check single origin
        return $class === $base || is_subclass_of($class, $base);
    }