getId() 공개 메소드

The raw path of the directory under extensions.
public getId ( ) : string
리턴 string
예제 #1
0
 /**
  * Get the path to an extension's published asset.
  *
  * @param Extension $extension
  * @param string    $path
  * @return string
  */
 public function getAsset(Extension $extension, $path)
 {
     return $this->app->basePath() . '/assets/extensions/' . $extension->getId() . $path;
 }
예제 #2
0
파일: Migrator.php 프로젝트: Luceos/core
 /**
  * Run "down" a migration instance.
  *
  * @param            $path
  * @param  string    $file
  * @param  string    $path
  * @param  Extension $extension
  * @return void
  */
 protected function runDown($path, $file, Extension $extension = null)
 {
     $migration = $this->resolve($path, $file);
     $this->runClosureMigration($migration, 'down');
     // Once we have successfully run the migration "down" we will remove it from
     // the migration repository so it will be considered to have not been run
     // by the application then will be able to fire by any later operation.
     $this->repository->delete($file, $extension ? $extension->getId() : null);
     $this->note("<info>Rolled back:</info> {$file}");
 }
예제 #3
0
 /**
  * Runs the database migrations to reset the database to its old state.
  *
  * @param Extension $extension
  */
 public function migrateDown(Extension $extension)
 {
     $this->migrate($extension->getId(), false);
 }
예제 #4
0
파일: Migrator.php 프로젝트: RobR8/core
 /**
  * Rolls all of the currently applied migrations back.
  *
  * @param string    $path
  * @param Extension $extension
  * @return int
  */
 public function reset($path, Extension $extension = null)
 {
     $this->notes = [];
     $migrations = array_reverse($this->repository->getRan($extension->getId()));
     $this->requireFiles($path, $migrations);
     $count = count($migrations);
     if ($count === 0) {
         $this->note('<info>Nothing to rollback.</info>');
     } else {
         foreach ($migrations as $migration) {
             $this->runDown($migration, $extension);
         }
     }
     return $count;
 }