@param string $name
@param mixed  $classLoader

@return int|mixed
503557
public static function runApplication($name, ClassLoader $classLoader = null)
    {
        $class = sprintf('Ftven\\Build\\Cli\\Application\\%sApplication', ucfirst($name));

        /** @var CliApplication $application */
        $application = new $class;

        if (null !== $classLoader) {
            if (method_exists($application, 'setClassLoader')) {
                $application->setClassLoader($classLoader);
            }
        }

        return $application->run();
    }
499615
public static @CheckForNull Class<?> _findLoadedClass(ClassLoader cl, String name) {
        synchronized (getClassLoadingLock(cl, name)) {
            return (Class) invoke(FIND_LOADED_CLASS, RuntimeException.class, cl, name);
        }
    }
394852
protected function getter($name)
    {
        $value = parent::getter($name);
        $name = $this->getProperty($name);
        if (null == $value) {
            $relMap = EntityDescriptorRegistry::getInstance()
                ->getDescriptorFor(get_class($this))
                ->getRelationsMap();
            if ($relMap->containsKey($name)) {
                $value = $relMap->get($name)->load($this);
            }
        }
        return $value;
    }
569478
public function loadClass($name)
    {
        $name = ltrim($name, '\\');

        if ($this->getClass($name) instanceof LazyClassReflection) {
            try {
                $this->addClass($this->store->readClass($this, $name));
            } catch (\InvalidArgumentException $e) {
                // probably a PHP built-in class
                return;
            }
        }

        return $this->classes[$name];
    }
219598
public function getClass($name)
    {
        if ($this->hasClasses()) {
            foreach ($this->getClasses() as $class) {
                if ($class->getName() === $name) {
                    return $class;
                }
            }
        }
        return null;
    }
54007
public function getFirstDescendant($class_name)
    {
        if (!class_exists($class_name) && !interface_exists($class_name)) {
            return null;
        }

        $out = null;

        foreach ($this->children as $child_widget) {
            if ($child_widget instanceof $class_name) {
                $out = $child_widget;
                break;
            }

            if ($child_widget instanceof SwatUIParent) {
                $out = $child_widget->getFirstDescendant($class_name);
                if ($out !== null) {
                    break;
                }
            }
        }

        return $out;
    }
806536
public function getValidator($name)
    {
        if ($name instanceof ValidatorUnit) return $name;

        $fileName = 'Component/Validate/Validator/' . ucfirst($name) . 'Validator.php';
        $filePath = $this->loader->findFirst($fileName);
        if (! $filePath) throw new \InvalidArgumentException('validator not found. -> ' . $name);

        $class = $filePath->getClassName();
        $validator = new $class();

        return $validator;
    }
1050886
public static Class get(String clazzname, ClassLoader loader) throws ClassNotFoundException {
        return Util.loadClass(clazzname, loader != null? loader : ClassConfigurator.class.getClassLoader());
    }
582052
private static function load($class_name)
    {
        $class_name = trim($class_name, '\\');

        foreach (self::$_namespace_list as $namespace => $path_list) {
            $pattern = '/^' . str_replace('\\', '\\\\', $namespace) . '/';

            if (!preg_match($pattern, $class_name)) {
                continue;
            }

            $class_name = str_replace($namespace, '', trim($class_name, '\\'));
            $class_name = str_replace('\\', '/', trim($class_name, '\\'));

            foreach ($path_list as $path) {
                if (!file_exists("{$path}/{$class_name}.php")) {
                    continue;
                }

                require "{$path}/{$class_name}.php";

                return true;
            }
        }

        throw new Exception("Class: {$class_name} is not found.");
    }
1010655
public static function class_loader($name) {
        if (strncmp(__NAMESPACE__ . '\\', $name, self::$len) !== 0) {
            return false;
        }
        $name = substr($name, self::$len);
        $file_path = __DIR__ . '/' . str_replace('\\', '/', $name) . '.php';
        if (file_exists($file_path) && is_readable($file_path)) {
            include($file_path);
            return true;
        }
        return false;
    }
162981
public function helper($name) {
		if (isset($this->_helpers[$name])) {
			return $this->_helpers[$name];
		}
		list($plugin, $helperClassName) = pluginSplit($name, true);
		$helperClassName = Inflector::camelize($helperClassName) . "ShellHelper";
		App::uses($helperClassName, $plugin . "Console/Helper");
		if (!class_exists($helperClassName)) {
			throw new RuntimeException("Class " . $helperClassName . " not found");
		}
		$helper = new $helperClassName($this->stdout);
		$this->_helpers[$name] = $helper;

		return $helper;
	}
1300858
public static function loader($loader = null)
    {
        if ($loader) {
            return static::$_loader = $loader;
        }
        if (static::$_loader !== null) {
            return static::$_loader;
        }
        $loaders = spl_autoload_functions();
        foreach ($loaders as $key => $loader) {
            if (is_array($loader) && method_exists($loader[0], 'findFile')) {
                return static::$_loader = $loader[0];
            }
        }
    }
1367595
private function buildLoader($loader)
    {
        if ($loader instanceof TemplateLoaderInterface || is_callable($loader)) {
            return $loader;
        }

        if (is_string($loader) && is_subclass_of($loader, TemplateLoaderInterface::class, true)) {
            return function () use ($loader) {
                return new $loader();
            };
        }
    }
1250521
protected function retrieveClass($name)
    {
        if (!$this->enumExists($name)) {
            $this->enums[$name] = $this->buildClass($name);
        }

        return $this->enums[$name];
    }
169607
public static Reflector with(String name, ClassLoader classLoader) throws ReflectException {
        return with(getClassForName(name, classLoader));
    }
416282
public Class loadClass(String name)
    {
        try
        {
            return classLoader.loadClass( name );
        }
        catch (ClassNotFoundException notFound)
        {
            return null;
        }
        catch (NoClassDefFoundError notFound)
        {
            return null;
        }
    }
717912
public function get($name)
    {
        // create a loader by the same path and name.
        if(!isset($this->pathRegistry[$name]))
            throw new \Exedra\Exception\NotFoundException('Path with registry ['.$name.'] does not exist.');

        return $this->pathRegistry[$name];
    }