コード例 #1
0
 /**
  * @param string $namespace
  * @param string $name
  * @param bool $needFullName
  * @return string
  */
 private function parseImageName($namespace, $name, $needFullName = false)
 {
     $name = $this->config->getNameResolver($namespace)->getName($name);
     $needFullName && Validators::validateImageFullName($name);
     if (!Validators::isImageFullName($name)) {
         if (!($fullName = $this->cacheStorage->getFullName($namespace, $name))) {
             if (!($fullName = $this->storage->getFullName($namespace, $name))) {
                 Validators::validateImageFullName($name);
             }
             $this->cacheStorage->storeAlias($namespace, $fullName, $name);
         }
         $name = $fullName;
     }
     return $name;
 }
コード例 #2
0
 /**
  * @param string $namespace
  * @param string $name
  */
 public function __construct($namespace, $name)
 {
     Validators::validateImageFullName($name);
     $this->namespace = $namespace;
     $this->name = $name;
 }