Checks if the voter supports the given class.

@param string $class A class name

@return bool true if this Voter can process the class
967703
public function supportsClass($class)
    {
        if($class)
        {
            $classNameArray = explode('\\', $class);
            $className = $classNameArray[ count($classNameArray)-1 ];

            if( in_array($className, array('User', 'AdminVoter')) )
            {
                return true;
            }
        }

        return false;
    }
838695
public static function load($class) {
			// Checks if class is OAuth2, then OAuthRequest,
			// then searches the /src directory if the class name starts with OAuth.
			$class = strtolower($class);
			if($class == "oauth2")
				require_once __DIR__ . '/oauth.class.php';
			elseif($class == "oauthrequest")
				require_once __DIR__ . '/oauthrequest.class.php';
			elseif((substr($class, 0, 5) == "oauth") && file_exists(__DIR__ . "/" . substr($class, 5) . ".class.php"))
				require_once __DIR__ . '/' . substr($class, 5) . '.class.php';
			else return false;
			return true;
		}
488358
public function isTarget($class)
    {
        if (true === is_object($class)) {
            $class = get_class($class);
        }

        if ($class === $this->getTarget()) {
            return true;
        }

        $class = explode('\\', $class);
        $className = end($class);

        if ($className === $this->getTarget()) {
            return true;
        }

        return false;
    }
710455
public function votes($class = __CLASS__)
    {
        return $this->morphedByMany($class, config('follow.morph_prefix'), config('follow.followable_table'))
                    ->wherePivotIn('relation', [Follow::RELATION_UPVOTE, Follow::RELATION_DOWNVOTE])
                    ->withPivot('followable_type', 'relation', 'created_at');
    }
665596
public function hasMatchingClass($orientClass)
    {
        $classes = explode(',', $this->class);

        foreach ($classes as $class) {
            if ($class === $orientClass) {
                return true;
            }
        }

        return false;
    }
492893
public function autoload($class)
    {
        if (isset($this->classes[$class])) {
            require $this->classes[$class];

            return true;
        }
        // fallback for classes defined with leading backslash
        if (strpos($class, '\\') === 0) {
            $class = substr($class, 1);

            return $this->autoload($class);
        }

        return false;
    }
1154990
public function isSubclassOf($class)
    {
        return false;  // @FIXME see unit tests

        if (in_array($class, $this->struct['interfaces'])) {
            // checks first if implement a specified interface
            return true;
        }

        $parent = $this->getParentClass();
        if (!empty($parent)) {
            // checks second inheritance

            if ($parent->getName() === $class) {
                // checks class name
                return true;
            }
            // then checks interfaces implemented
            return in_array($class, $parent->getInterfaceNames());
        }
        return false;
    }
21263
public function loadClass( $class ) {

		if ( ! isset( $this->class_map[ $class ] ) )
			return FALSE;

		return $this->loader->loadFile( $this->class_map[ $class ] );
	}
68970
public function hasClassProperty($class)
    {
        if (! is_array($class)) {
            $class = func_get_args();
        }

        if (isset($this->htmlAttributes['class']) && is_array($this->htmlAttributes['class'])) {
            foreach ($this->htmlAttributes['class'] as $i => $string) {
                foreach ($class as $className) {
                    if (strpos($string, $className) !== false) {
                        return true;
                    }
                }
            }
        }

        return false;
    }
1053187
public function hasTriggerPermission($class)
    {
        $model = new $class();

        if (!$model instanceof NgRestModel) {
            return false;
        }

        return Yii::$app->adminmenu->getApiDetail($class::ngRestApiEndpoint());
    }
896207
public function votedItems($class = null)
    {
        if (!empty($class)) {
            $this->setVoteRelation($class);
        }

        return $this->morphedByMany($this->voteRelation, 'votable', $this->vote_table ?: 'votes')->withTimestamps();
    }
1288187
public function loadClass($class)
    {
        if (!$file = $this->findFile($class)) {
            return;
        }

        if (!$this->_patchers || !$this->patchable($class)) {
            includeFile($file);
            return true;
        }
        return $this->loadFile($file);
    }
715144
protected function hasTranslatableTrait($class)
    {
        $translatable = config('cms-models.analyzer.traits.translatable', []);

        if ( ! count($translatable)) {
            // @codeCoverageIgnoreStart
            return false;
            // @codeCoverageIgnoreEnd
        }

        return (bool) count(array_intersect($this->classUsesDeep($class), $translatable));
    }
794375
static public function hasClass(DOMElement $node, $class)
    {
        if (is_array($class) === false) {
            $class = array($class);
        }

        $attr = explode("\x20", $node->getAttribute('class'));

        foreach ($class as $c) {
            if (in_array($c, $attr) === false) {
                return false;
            }
        }

        return true;
    }
537112
public function baseDataClass($class)
    {
        $current = $class;
        while ($next = get_parent_class($current)) {
            if ($next === DataObject::class) {
                // Only use ClassInfo::class_name() to format the class if we've not used get_parent_class()
                return ($current === $class) ? ClassInfo::class_name($current) : $current;
            }
            $current = $next;
        }
        throw new InvalidArgumentException("$class is not a subclass of DataObject");
    }
834769
private function loadDeployer($class)
    {
        if (isset($this->deployersInstances[$class])) {
            return true;
        }

        $deployer = $this->objectsFactory->buildDeployer($class, $this->loadedConfigurator, $this->loadedCacheAdapter);

        if ($deployer === false) {
            $this->loadedLogger->warning('Could not load ' . $class . ' deployer.');

            return false;
        }

        try {
            $deployer->isSupported();
        } catch (PhassetsInternalException $e) {
            $this->loadedLogger->warning($class . ' deployer is not supported: ' . $e);
        }

        $this->deployersInstances[$class] = $deployer;
        $this->loadedLogger->debug('Deployer ' . $class . ' found & loaded.');

        return true;
    }
634220
public function loadClass($class)
    {
        $result = $this->loadCachedClass($class);

        if ($result === false) {
            $result = parent::loadClass($class);
        }

        if ($this->verbose) {
            return $result !== false;
        }
    }