Add new result class to map.
If file is empty begin numeration from index 1.
Zero index reserved for \Result\ResultException

@param $class
760938
public function pushResult($class)
    {
        if (!$this->hasResult($class)) {
            $this->map[$class] = empty($this->map) ? 1
                : max(self::getResults()) + 1;
        }
    }
1162203
public function addClass ($class)
    {
        $targetArray = &$this->customClasses;
        if (!is_array($class))
            $targetArray[] = $class;
        else
            $targetArray = array_merge($targetArray, $class);
        return $this;
    }
642408
public function loadClass($class)
    {
        if (strpos($class, self::ANNOTATION_NAMESPACE) === 0) {
            $class = str_replace(self::ANNOTATION_NAMESPACE, '', $class);

            $file = __DIR__ . '/' . $class . '.php';
            if (file_exists($file)) {
                require_once $file;

                return true;
            }
        }
    }
226679
public function addClass( string $class ): Tag
    {

        if ( ! isset( $this->attributes['class'] ) ) {
            $this->attributes['class'] = $class;
        } else {
            $this->attributes['class'] .= " $class";
        }

        return $this;
    }
1329834
protected static function init_class($class, $file = null)
	{
		// include the file if needed
		if ($file)
		{
			include $file;
		}

		// if the loaded file contains a class...
		if (class_exists($class, false))
		{
			// call the classes static init if needed
			if (static::$auto_initialize === $class)
			{
				static::$auto_initialize = null;
				if (method_exists($class, '_init') and is_callable($class.'::_init'))
				{
					call_user_func($class.'::_init');
				}
			}
		}

		// or an interface...
		elseif (interface_exists($class, false))
		{
			// nothing to do here
		}

		// or a trait if you're not on 5.3 anymore...
		elseif (function_exists('trait_exists') and trait_exists($class, false))
		{
			// nothing to do here
		}

		// else something went wrong somewhere, barf and exit now
		elseif ($file)
		{
			throw new \Exception('File "'.\Fuel::clean_path($file).'" does not contain class "'.$class.'"');
		}
		else
		{
			throw new \FuelException('Class "'.$class.'" is not defined');
		}
	}
93338
public function setDataObjectClass($class)
    {
        if (!$class) {
            throw new InvalidArgumentException("Missing class provided");
        }

        if (!class_exists($class)) {
            throw new InvalidArgumentException("Non-existent classname \"{$class}\"");
        }

        if (!is_subclass_of($class, DataObject::class)) {
            throw new InvalidArgumentException("\"{$class}\" is not a DataObject subclass");
        }

        $this->dataObjectClass = $class;
        return $this;
    }
1255625
public function add($class=null)
	{
		$class = $this->get_class($class);

		if (!isset($this->reflections[$class]))
			$this->reflections[$class] = new ReflectionClass($class);
			
		return $this;
	}
464107
public function addClass($class)
    {
        if (!is_array($class)) {
            $class = preg_split('/\s+/', $class, null, PREG_SPLIT_NO_EMPTY);
        }
        $curClass = preg_split('/\s+/', $this->getAttribute('class'),
                               null, PREG_SPLIT_NO_EMPTY);
        foreach ($class as $c) {
            if (!in_array($c, $curClass)) {
                $curClass[] = $c;
            }
        }
        $this->setAttribute('class', implode(' ', $curClass));

        return $this;
    }
937491
protected function inflateIndex($class)
    {
        if ($class instanceof IndexInterface) {
            return $class;
        }

        if (!isset($this->inflated[$class])) {
            $this->inflated[$class] = $this->app->make($class);
        }

        return $this->inflated[$class];
    }
420477
public function addUse($class, $alias = null, $checkClassExists = true)
    {
        if (
            $checkClassExists === true &&
            $this->classFile->isClassDefined("\\{$class}") === false &&
            $this->classFile->isInterfaceDefined("\\{$class}") === false &&
            $this->classFile->isTraitDefined("\\{$class}") === false
        ) {
            throw Exception\ClassUse::classUseNotFound($class);
        }

        $use = new ClassUse($class, $alias);

        $this->append($use);

        return $this;
    }
719023
public function loadClass(string $class)
    {
        if (strpos($class, 'Proxy\__Transactional__\\') !== 0) {
            return null;
        }

        if ($file = $this->findProxyFile($class)) {
            require_once $file;

            return true;
        }

        return null;
    }
30371
private function initializeMethodNamesMap($class)
    {
        $this->serviceIdToMethodNameMap = array();
        $this->usedMethodNames = array();

        try {
            $reflectionClass = new \ReflectionClass($class);
            foreach ($reflectionClass->getMethods() as $method) {
                $this->usedMethodNames[strtolower($method->getName())] = true;
            }
        } catch (\ReflectionException $e) {
        }
    }
1172233
public function loadClass($class)
    {
        if (!$file = $this->findFile($class)) {
            return;
        }
        if (!$this->patchable($class)) {
            include $file;
            return true;
        }
        return $this->loadFile($file, $class);
    }
440773
public static function loadClass($class) {
    	
        //The current namespace prefix
        $prefix = $class;

        //Work backwards through the namespace names of the fully-qualified class name to find a mapped file name
        while(false !== $pos = strrpos($prefix, '\\')) {

            //Retain the trailing namespace separator in the prefix
            $prefix = substr($class, 0, $pos + 1);

            //The rest is the relative class name
            $relative_class = substr($class, $pos + 1);

            //Try to load a mapped file for the prefix and relative class
            $mapped_file = static :: loadMappedFile($prefix, $relative_class);

            if(false !== $mapped_file) {
                return $mapped_file;
            }

            //Remove the trailing namespace separator for the next iteration of strrpos()
            $prefix = rtrim($prefix, '\\');
        }

        //Never found a mapped file
        return false;
    }
689200
public function addMap($class, $path)
    {
        $class = static::normalizeClass($class);

        $path = static::normalizePath($path, false);

        $this->maps[$class] = $path;

        return $this;
    }
21263
public function loadClass( $class ) {

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

		return $this->loader->loadFile( $this->class_map[ $class ] );
	}
1091528
public function loadClass($class)
    {
        $e = error_reporting(error_reporting() | E_PARSE | E_ERROR | E_CORE_ERROR | E_COMPILE_ERROR);

        try {
            if ($this->isFinder && !isset($this->loaded[$class])) {
                $this->loaded[$class] = true;
                if (!$file = $this->classLoader[0]->findFile($class) ?: false) {
                    // no-op
                } elseif (\function_exists('opcache_is_script_cached') && @opcache_is_script_cached($file)) {
                    require $file;

                    return;
                } else {
                    require $file;
                }
            } else {
                ($this->classLoader)($class);
                $file = false;
            }
        } finally {
            error_reporting($e);
        }

        $this->checkClass($class, $file);
    }