Stores given custom $aliases to the custom alias backup table.

@param \eZ\Publish\SPI\Persistence\Content\UrlAlias[] $aliases

@return int
328055
protected function storeCustomAliases(array $aliases)
    {
        $pathCount = 0;

        foreach ($aliases as $alias) {
            $paths = $this->combinePaths($alias->pathData);
            $pathCount += count($paths);

            foreach ($paths as $path) {
                $this->storeCustomAliasPath(
                    $alias->destination,
                    $path,
                    reset($alias->languageCodes),
                    $alias->alwaysAvailable,
                    $alias->forward
                );
            }
        }

        return $pathCount;
    }
213247
public function getTableFromAlias(string $alias) : \Dms\Core\Persistence\Db\Schema\Table
    {
        if ($this->alias === $alias) {
            return $this->table;
        }

        foreach ($this->joins as $join) {
            if ($join->getAlias() === $alias) {
                return $join->getTable();
            }
        }

        throw InvalidArgumentException::format(
            'Invalid alias supplied to %s: expecting one of (%s), \'%s\' given',
            __METHOD__, Debug::formatValues($this->getAliases()), $alias
        );
    }
309550
function getAlias( $alias ) {

        return isset( $this->aliases[ $alias ] ) ? $this->aliases[ $alias ] : $alias;

    }
783382
protected function backupCustomLocationAliases()
    {
        $table = static::CUSTOM_ALIAS_BACKUP_TABLE;

        if (!$this->tableExists($table)) {
            $this->createCustomLocationUrlAliasBackupTable();
        }

        if (!$this->isTableEmpty($table)) {
            throw new RuntimeException(
                "Table '{$table}' contains data. " .
                "Ensure it's empty or non-existent (it will be automatically created)."
            );
        }

        $this->doBackupCustomLocationAliases();
    }
222256
function FunctionCount(array $params, $alias = '', $distinctParams = false)
    {
        return parent::CreateFunctionCount($params, $alias, $distinctParams);
    }
989244
public static function getInstance(array $aliases = array())
	{
		if (is_null(static::$instance)) static::$instance = new static($aliases);
		
		$aliases = array_merge(static::$instance->getAliases(), $aliases);

		static::$instance->setAliases($aliases);

		return static::$instance;
	}
813090
protected function addAliases($aliases)
    {
        if ($aliases == null) {
            return;
        }
        foreach ($aliases as $alias => $aliasClass) {
            $this->output->writeln('<info>Adding '.$aliasClass.' to Laravel config app.php file</info>');
            $this->addAlias("'$alias' => ".$aliasClass);
        }
    }
336041
protected function _buildOrder($aliases = [])
    {
        $result = [];
        foreach ($this->_parts['order'] as $column => $dir) {
            $column = $this->dialect()->name($column, $aliases);
            $result[] = "{$column} {$dir}";
        }
        return $this->_buildClause('ORDER BY', join(', ', $result));
    }
1257459
private function findRootAlias($alias, $parentAlias)
    {
        $rootAlias = null;

        if (in_array($parentAlias, $this->getRootAliases(), true)) {
            $rootAlias = $parentAlias;
        } elseif (isset($this->joinRootAliases[$parentAlias])) {
            $rootAlias = $this->joinRootAliases[$parentAlias];
        } else {
            // Should never happen with correct joining order. Might be
            // thoughtful to throw exception instead.
            $rootAlias = $this->getRootAlias();
        }

        $this->joinRootAliases[$alias] = $rootAlias;

        return $rootAlias;
    }
1054797
public function setAliases($aliases)
    {
        if (!is_array($aliases) && !$aliases instanceof \Traversable) {
            throw new InvalidArgumentException('$aliases must be an array or an instance of \Traversable');
        }

        foreach ($aliases as $alias) {
            $this->validateName($alias);
        }

        $this->aliases = $aliases;

        return $this;
    }
1098740
final function Table($alias = '', array $fieldAliases = array())
    {
        $sql = $this->SqlBuilder();
        return $sql->Table($this->TableName(), $this->FieldNames($fieldAliases), $alias);
    }
262668
protected function getSelectedForAllAliases(array $aliases)
    {
        if (empty($aliases)) {
            $selected = $this->mergeOrderByAttributes($this->getSelectedQueryAttributes($this->operation->getAttributes()));
        } else {
            // If there are aliases, then we need to loop through each one to determine was was actually selected for each.
            $selected = [];
            foreach ($aliases as $alias => $schema) {
                $selected = array_replace(
                    $selected,
                    $this->mergeOrderByAttributes($this->getSelectedQueryAttributes($this->operation->getAttributes(), $schema), $alias)
                );
            }
        }

        return $selected;
    }
1358462
private static function get_aliases( $subcommands ) {
		$aliases = array();

		foreach ( $subcommands as $name => $subcommand ) {
			$alias = $subcommand->get_alias();
			if ( $alias ) {
				$aliases[ $alias ] = $name;
			}
		}

		return $aliases;
	}
845696
protected function orderByPart(array $aliases) {
        $sortFields = [];

        foreach ($aliases as $alias) {
            $sortFields[] = $this->getDriverEscaper()->reserved($alias['name']) . '.' .
                    $this->getDriverEscaper()->reserved('object') . ' ' .
                    $alias['dir'] . $this->operationSeparator;
        }

        $result = $this->getDriverEscaper()->dbCommand('ORDER BY') . ' ' .
                implode($this->getDriverEscaper()->getFieldsSeparator(), $sortFields)
                . $this->operationSeparator;

        return $result;
    }
1298337
public function searchAlias( $alias, array $aliases = [] )
    {
        if ( isset( $aliases[ $alias ] ) )
        {
            $ttl = $aliases[ $alias ];
        }
        else if ( array_search( $alias, (array)$aliases ) !== false )
        {
            $ttl = 3600;
        }
        else
        {
            return false;
        }

        return $ttl;
    }
1118452
function _getExtensionKpublicgs($aliases)
    {
        if ($aliases === null) {
            $aliases = new Auth_OpenID_NamespaceMap();
        }

        $ax_args = array();

        foreach ($this->data as $type_uri => $values) {
            $alias = $aliases->add($type_uri);

            $ax_args['type.' . $alias] = $type_uri;
            $ax_args['count.' . $alias] = strval(count($values));

            foreach ($values as $i => $value) {
              $key = sprintf('value.%s.%d', $alias, $i + 1);
              $ax_args[$key] = $value;
            }
        }

        return $ax_args;
    }
783743
function alias( $aliasName )
    {
        $aliasList = $this->aliasList();
        if ( !array_key_exists( $aliasName, $aliasList ) )
            return false;
        return $aliasList[$aliasName];
    }