public static fromFullName ( string $full ) : static | ||
$full | string | package name |
리턴 | static |
public static function fromFullName($full)
{
list($type, $name) = static::splitFullName($full);
return new static($type, $name);
}
/** * Synchronizes file system packages to the database */ public function actionSyncToDb() { $packages = $this->packageStorage->listPackages(); foreach ($packages as $name => $data) { $message = "Package %N{$name}%n "; $package = AssetPackage::fromFullName($name); $package->load(); $message .= $this->packageRepository->exists($package) ? 'already exists. %BUpdated.%n' : 'does not exist. %GCreated.%n'; $this->packageRepository->save($package); $this->stdout(Console::renderColoredString($message . "\n")); } }