MiniAsset\AssetTarget::ext PHP Method

ext() public method

public ext ( ) : string
return string
    public function ext()
    {
        $parts = explode('.', $this->name());
        return array_pop($parts);
    }

Usage Example

Beispiel #1
0
 /**
  * Get the last build timestamp for a given build.
  *
  * Will either read the cached version, or the on disk version. If
  * no timestamp is found for a file, a new time will be generated and saved.
  *
  * If timestamps are disabled, false will be returned.
  *
  * @param AssetTarget $build The build to get a timestamp for.
  * @return mixed The last build time, or false.
  */
 public function getTimestamp(AssetTarget $build)
 {
     $ext = $build->ext();
     if (empty($this->timestamp[$ext])) {
         return false;
     }
     $data = $this->_readTimestamp();
     $name = $this->buildCacheName($build);
     if (!empty($data[$name])) {
         return $data[$name];
     }
     $time = time();
     $this->setTimestamp($build, $time);
     return $time;
 }
All Usage Examples Of MiniAsset\AssetTarget::ext