@param string $name

@return bool|ClassConstant
482647
protected function getConstantFromInterfaces($name)
    {
        if ($interfaces = $this->getImplementedInterfaceDefinitions()) {
            foreach ($interfaces as $interface) {
                if ($interface->hasConstant($name)) {
                    return $interface->getConstant($name);
                }
            }
        }

        return false;
    }
847276
public function getConstant($name, $object = null)
    {
        if ($object !== null) {
            $name = sprintf('%s::%s', get_class($object), $name);
        }

        return constant($name);
    }
892924
public function getParser($name)
    {
        if (!isset($this->instances[$name])) {
            if (!isset($this->mapping[$name])) {
                return null;
            }
            $class = $this->mapping[$name];
            $this->instances[$name] = new $class();
        }

        return $this->instances[$name];
    }
697632
public function get(string $name): Constant
    {
        if (!$this->has($name)) {
            $constant = new Constant($name, null);
            parent::add($constant);

            return $constant;
        }

        return parent::get($name);
    }
1251651
public function getConstant($name)
    {
        if ( ! isset($this->constants[$name])) {
            throw new \InvalidArgumentException(sprintf('The constant "%s" does not exist.'));
        }

        return $this->constants[$name];
    }
962266
public function load($name)
    {
        $helper = $this->getRegisteredHelper($name);

        $reflection = new \ReflectionClass($helper);
        $class = $reflection->newInstance($this->di);

        return $class;
    }
937557
public static function driver(string $name){

            //Get the name.
            $name = explode(':', $name);
            //Get the classname.
            $class = "\\NonDB\\Drivers\\" . $name[0];
            //Get the parameter.
            $param = $name[1];

            //See if the driver exists.
            if(!class_exists($class) || !( \NonDB\Components\Tool::checkImplement($class, "NonDB\\Interfaces\\Driver") )){
                throw new \NonDB\Exceptions\CoreException("Driver $class wasn't exists.", "0011");
                return false;
            }

            //Get driver.
            $driver = eval("return new $class(urldecode(\$param));");

            return $driver;

        }
917675
public static function isSingleton($name)
    {
        if (!static::exists($name)) {
            return false;
        }
        if (empty(static::$classNames[$name]['singleton']) &&
            empty(static::$classAliases[$name]['singleton'])
        ) {
            return false;
        }

        return true;
    }
231263
public function find($name)
    {
        return $this->first(function ($action) use ($name) {
            return class_basename($action) === studly_case($name);
        });
    }
256695
public function getConst($name, $sanitize = null)
    {
        return $this->sanitize(ArrayHelper::getValue(static::$constants, $name), $sanitize);
    }
1341994
public function instance($name)
    {
        // If the class name starts with a dot, then find the class in the same class path as the caller
        if(substr($name, 0, 1) == '.')
        {
            $name = $this->getJaxonClassPath() . $name;
        }
        // The class namespace is prepended to the class name
        elseif(substr($name, 0, 1) == ':' && ($namespace = $this->getJaxonNamespace()))
        {
            $name = str_replace('\\', '.', trim($namespace, '\\')) . '.' . substr($name, 1);
        }
        return jaxon()->sentry()->instance($name);
    }
1026959
public static function factory($name)
    {
        $classname = get_called_class();

        if (!isset(self::$instances[$classname])) {
            self::$instances[$classname] = array();
        }

        if ($name instanceof Value) {
            $name = $name->getValue();
        }

        if (!isset(self::$instances[$classname][$name])) {
            $instance = new static($name);
            $name = $instance->getName();

            if (!isset(self::$instances[$classname][$name])) {
                self::$instances[$classname][$name] = $instance;
            }
        }

        return self::$instances[$classname][$name];
    }
886379
protected function _normalizeClass($name)
    {
        if (!$name || $name[0] === '\\') {
            return $name;
        }
        if ($this->_states['uses']) {
            $tokens = explode('\\', $name, 2);
            if (isset($this->_states['uses'][$tokens[0]])) {
                $prefix = $this->_states['uses'][$tokens[0]];
                return count($tokens) === 2 ? '\\' . $prefix . '\\' . $tokens[1] : '\\' . $prefix;
            }
        }
        $current = $this->_states['current'];
        $prefix = '\\';
        if ($current->namespace) {
            $prefix .= $current->namespace->name . '\\';
        }
        return $prefix . $name;
    }
987432
public function hasComponent($name)
    {
        $className = $this->resolve($name);
        if (!$className) {
            return false;
        }

        return isset($this->classMap[$className]);
    }
1071361
public function createClassConstant(string $className, string $constantName): ClassConstFetch
    {
        $classNameNode = in_array($className, ['static', 'parent', 'self'], true) ? new Name(
            $className
        ) : new FullyQualified($className);

        $classConstFetchNode = $this->builderFactory->classConstFetch($classNameNode, $constantName);
        $classConstFetchNode->class->setAttribute(AttributeKey::RESOLVED_NAME, $classNameNode);

        return $classConstFetchNode;
    }
960694
public function getSource($name): string
    {
        return $this->innerLoader->getSourceContext($this->getRealName($name))->getCode();
    }
325808
public static function getConstantByName($name)
    {
        switch (strtolower($name)) {
            case 'single':
                return self::SINGLE;
            break;

            case 'multiple':
                return self::MULTIPLE;
            break;

            case 'ordered':
                return self::ORDERED;
            break;

            case 'record':
                return self::RECORD;
            break;

            default:
                return false;
            break;
        }
    }