Update Aliases in alias file.

@param string $key
@param string $class

@return bool
175341
public static function update($key, $class)
    {
        $indexes = dot($key);

        self::$aliases[$indexes[0]] = array_add(self::$aliases[$indexes[0]], $indexes[1], $class);
        self::$aliases['kernel'] = config('alias.kernel');

        Aliases::set(config('alias.enable'), self::$aliases);
    }
473611
public static function classHasMethod($method, $class) {
        $methods = self::classMethods($class);

        if (!in_array($method, $methods)) {
          return false;
        }

        return true;
    }
606194
public static function load($class)
    {
        $class = static::normalizeClass($class);

        foreach (static::$directories as $directory)
        {
            if (file_exists($path = $directory.DIRECTORY_SEPARATOR.$class))
            {
                require_once $path;

                return true;
            }
        }
        return false;
    }
912110
public static function registerOption($key, $class)
    {
        if (empty($key)) {
            throw new Exception\AnnotationException(
                "Option key can not be empty!"
            );
        }
        if (!class_exists($class)) {
            throw new Exception\AnnotationException(
                "Class " . $class . " not found!"
            );
        }
        if (!in_array("UniMapper\Entity\Reflection\Property\IOption", class_implements($class))) {
            throw new Exception\AnnotationException(
                "Class " . $class
                . " should implement UniMapper\Entity\Reflection\Property\IOption!"
            );
        }
        self::$options[$key] = $class;
    }
627777
public function addExtension($key, $class)
    {
        $extension = new ExtensionCollection($key, $class);

        foreach ($extension->collection() as $obj_type => $collection) {
            foreach ($collection as $obj_key => $obj_class) {
                $this->{$obj_type}->addExtension($obj_key, $obj_class);
            }
        }
    }
555657
public function load($class)
    {
        if ($class[0] == '\\') $class = substr($class, 1);
        $class = str_replace(array('\\', '_'), DIRECTORY_SEPARATOR, $class).'.php';

        foreach ($this->directories as $directory)
        {
            if (file_exists($path = $directory.DIRECTORY_SEPARATOR.$class))
            {
                require_once $path;
                return true;
            }
        }
        return false;
    }
646272
public function remove(string $key)
    {
        // check if the $key is an alias
        if (isset($this->aliases[$key])) {
            $alias = $key;
            $key = $this->aliases[$key];
            unset($this->aliases[$alias]);
        }

        // if the key exists as a factory
        if ($this->hasFactory($key)) {
            unset($this->definitions['factory'][$key]);
            $this->removeAliasFor($key);
            return ! $this->hasFactory($key);
        }

        // if the key exists as an object
        if ($this->hasObject($key)) {
            unset($this->definitions['instance'][$key], $this->store[$key]);
            $this->removeAliasFor($key);
            return ! ($this->hasObject($key) || $this->hasStored($key));
        }

        // the key did not exist
        return false;
    }
79763
public function alias($key) {
        if (count($this->from) == 1) {
            $this->from = array($key => current($this->from));
        }
        return $this;
    }
275118
public function hasMany($alias, $class, $relatedKey = null, Closure $conditions = null) {
        $relation = (new OneToMany($alias, $class))
            ->setRelatedForeignKey($relatedKey);

        if ($conditions) {
            $relation->setConditions($conditions);
        }

        return $this->addRelation($relation);
    }
749157
public function addUse($class, $alias = null)
    {
        $as = $alias == null ? (int)(count($this->uses) + 1) : $alias;
        $this->uses[$as] = (string)$class;
        return $this;
    }
702156
public function addAlias($alias, $class, array $parameters = [])
        {
            if (!preg_match('#^[a-zA-Z0-9-_]+$#', $alias)) {
                throw new Exception(
                    'Aliases must be alphanumeric and can contain dashes and underscores only.'
                );
            }

            $this->aliases[$alias] = $class;

            if ($parameters) {
                $this->setParameters($alias, $parameters);
            }
        }
99727
public function from($class, $alias= '') {
        if ($class= $this->xpdo->loadClass($class)) {
            $alias= $alias ? $alias : $class;
            $this->query['from']['tables'][]= array (
                'table' => $this->xpdo->getTableName($class),
                'alias' => $alias
            );
        }
        return $this;
    }
630724
public function register($alias, $class)
	{
		$alias = strtolower($alias);

		if (array_key_exists($alias, $this->instances))
		{
			throw new \RuntimeException('You cannot register a provider when an instance of that class has already been created.');
		}

		$this->services[$alias] = $class;

		return $this;
	}
606673
public function bindClass($class, $alias = false) {

        $self  = $this;
        $clean = $alias ? $alias : \trim(\strtolower(\str_replace("\\", "/", $class)), "\\");

        $this->bind('/'.$clean.'/*', function() use($self, $class, $clean) {

            $parts      = \explode('/', \trim(\preg_replace("#$clean#","",$self["route"],1),'/'));
            $action     = isset($parts[0]) ? $parts[0]:"index";
            $params     = \count($parts)>1 ? \array_slice($parts, 1):[];

            return $self->invoke($class,$action, $params);
        });

        $this->bind('/'.$clean, function() use($self, $class) {
            return $self->invoke($class, 'index', []);
        });
    }
793392
public function loadClass(string $class): ?bool
    {
        if ($file = $this->findFile($class)) {
            _includeClassFile($file);
            return true;
        }

        return null;
    }
318954
public function setClass($class)
    {
        foreach ($this->results as $name) {
            $this->columns->offsetGet($name)->setClass($class);
        }
    }
941249
public function setClassAlias(string $aliasedClass)
    {
        $this->classAlias = RecursiveFormatterHelper::camelCaseToUnderscore(
            RecursiveFormatterHelper::namespaceAsArrayKey($aliasedClass)
        );

        return $this;
    }