Register a database migration path.

@param  array|string  $paths
@return void
336780
protected function loadMigrationsFrom($paths)
    {
        $this->app->afterResolving('migrator', function ($migrator) use ($paths) {
            foreach ((array) $paths as $path) {
                $migrator->path($path);
            }
        });
    }
1334103
public function registerXPathNamespaces($namespaces)
    {
        // Convenience method to add multiple namespaces at once
        foreach ($namespaces as $prefix => $uri) {
            $this->registerXPathNamespace($prefix, $uri);
        }
    }
482072
public function autoMigrate($definitions) {
		if(!is_array($definitions))
			$definitions = [$definitions];
		$entitiesSchema = $this->getEntitiesSchemas($definitions);
		$sqlSchema = $this->getSQLSchemas();
		$this->processSchemas($entitiesSchema, $sqlSchema);
	}
544362
protected function _setupTasks( array $paths )
	{
		$this->_tasks = $this->_createTasks( $paths, $this->_schema, $this->_conn, $this->_additional );

		foreach( $this->_tasks as $name => $task )
		{
			foreach( (array) $task->getPreDependencies() as $taskname ) {
				$this->_dependencies[$name][] = $taskname;
			}

			foreach( (array) $task->getPostDependencies() as $taskname ) {
				$this->_dependencies[$taskname][] = $name;
			}
		}
	}
229905
protected function outputMigrationList(array $migrations): void
	{
		$tableBody = [];

		foreach($migrations as $migration)
		{
			$name = $migration->version;

			if(!empty($migration->package))
			{
				$name .= ' (' . $migration->package . ')';
			}

			$description = $this->resolve($migration)->getDescription();

			$tableBody[] = [$name, $description];
		}

		$this->table(['Migration', 'Description'], $tableBody);
	}
414680
public function reset($paths = [], $pretend = false)
    {
        $this->notes = [];

        // Next, we will reverse the migration list so we can run them back in the
        // correct order for resetting this database. This will allow us to get
        // the database back into its "empty" state ready for the migrations.
        $migrations = array_reverse($this->repository->getRan());

        if (count($migrations) === 0) {
            $this->note('<info>Nothing to rollback.</info>');

            return [];
        }

        return $this->resetMigrations($migrations, $paths, $pretend);
    }
498272
public static function addPath($path)
    {
        if ( ! isset(self::$_i18nPaths[$path]))
        {
            self::$_i18nPaths[$path] = $path;
        }
    }
312504
protected function bootMigrations()
    {
        if (isset($this->dir) and isset($this->migrationDirs) and is_array($this->migrationDirs)) {
            foreach ($this->migrationDirs as $dirPath) {
                $this->publishes([ $this->getDatabasePath($dirPath) => database_path($this->migrationDestinationPath) ], 'migrations');
            }
        }
    }
946181
protected function executeMigrations(array $migrations)
	{
		if ( !$migrations ) {
			return;
		}

		$db = $this->_context->getDatabase();

		foreach ( $migrations as $migration ) {
			$db->beginTransaction();
			$migration_type = pathinfo($migration, PATHINFO_EXTENSION);

			$this->_migrationRunners[$migration_type]->run(
				$this->_migrationsDirectory . '/' . $migration,
				$this->_context
			);

			$sql = 'INSERT INTO Migrations (Name, ExecutedOn)
					VALUES (:name, :executed_on)';
			$db->perform($sql, array('name' => $migration, 'executed_on' => time()));
			$db->commit();
		}
	}
581096
public function saveApplicationPaths(array $paths)
  {
      foreach ($paths as $key => $value) {
          $this->applyInstance("path.$key", realpath($value));
      }
  }
1224722
protected function registerResources()
    {
        $this->loadRoutesFrom(__DIR__ . '/../routes/web.php');
        $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');
        $this->loadTranslationsFrom(__DIR__ . '/../resources/lang', 'avored-ecommerce');
        $this->loadViewsFrom(__DIR__ . '/../resources/views', 'avored-ecommerce');
    }
749863
public function register_namespace( $namespace, $paths )
    {
        if ( isset( $this->namespaces[ $namespace ] ) )
        {
            $this->namespaces[ $namespace ] = array_merge(
                $this->namespaces[ $namespace ],
                (array) $paths
            );
        } 
        else 
        {
            $this->namespaces[ $namespace ] = (array) $paths;
            
            // Register PSR_0 as the first autoload filter for every namespace
            $this->register_autoload_filter( $namespace, array( $this, "PSR_0" ) );
        }
    }
428733
public static function registerModulePath($path)
    {
        if (file_exists($path)) {
            self::$_modulePaths[] = $path;
        } else {
            user_error(__d('wasabi_cms', 'Module path {0} does not exist.', $path));
        }
    }
22608
protected function runMigrationByPaths($migrationPaths, $command)
    {
        $app = $this->mockApplication();

        $this->validateMigrationPaths($migrationPaths);

        /* @todo: since version 2.0.12 you may also specify an array of migration paths. */
        foreach ($migrationPaths as $migrationPath) {
            $migrateController = $this->buildMigration($app);
            $migrateController->migrationPath = $migrationPath;

            $this->runMigration($migrateController, $command);
        }

        $this->destroyApplication();
    }
372473
public function preloadEmbeddedNodes(
        array $messages,
        array $paths = [],
        string $namespace = NcrPreloader::DEFAULT_NAMESPACE
    ): void {
        $this->ncrPreloader->addEmbeddedNodeRefs($messages, $paths, $namespace);
    }
994657
protected function fixRelativePaths(array $paths)
    {
        $base = dirname($this->path);
        $base = ($base === '.') ? '' : "{$base}/";

        array_walk_recursive(
            $paths,
            function (&$path) use ($base) {
                $path = "{$base}{$path}";
            }
        );
        return $paths;
    }
11691
public function bindPaths(array $paths)
    {
        foreach($paths as $key => $val)
        {
            $paths[$key] = realpath($val);
        }

        return $paths;
    }