hiqdev\assetpackagist\models\AssetPackage::getNormalName PHP Method

getNormalName() public method

public getNormalName ( )
    public function getNormalName()
    {
        return static::buildFullName($this->_type, static::normalizeName($this->_name));
    }

Usage Example

Example #1
0
 /**
  * @inheritdoc
  */
 public function readPackage(AssetPackage $package)
 {
     $name = $package->getNormalName();
     $path = $this->buildHashedPath($name);
     if (!file_exists($path)) {
         return null;
     }
     $json = file_get_contents($path);
     $updateTime = filemtime($path);
     $hash = hash('sha256', $json);
     $data = Json::decode($json);
     $releases = isset($data['packages'][$name]) ? $data['packages'][$name] : [];
     return compact('hash', 'releases', 'updateTime');
 }