public function valideAliasName($aliasName)
    {
        if ($aliasName === null || $aliasName === $this->originalDir) {
            return $this->originalDir;
        }

        if (array_key_exists($aliasName, $this->alias)) {
            return $this->aliasArrayToName($this->alias[$aliasName]);
        }

        if (!preg_match('#^(\d*)x(\d*)(_focus)?$#', $aliasName)) {
            throw new \Exception($aliasName.' is not valid alias name');
        }

        if (preg_match('#^(x\d+|\d+x)_focus$#', $aliasName)) {
            return str_replace('_focus', '', $aliasName);
        }

        return $aliasName;
    }