Themosis\Asset\Asset::getType PHP Method

getType() public method

Return the asset type.
public getType ( ) : string
return string
    public function getType()
    {
        return $this->type;
    }

Usage Example

Example #1
0
 /**
  * Register the asset.
  *
  * @param Asset $asset
  * @return void
  */
 protected function register(Asset $asset)
 {
     // Avoid duplicate calls to each instance.
     if ($this->getArea() !== $asset->getArea()) {
         return;
     }
     if ($asset->getType() === 'script') {
         $this->registerScript($asset);
     } else {
         $this->registerStyle($asset);
     }
     // Add asset to list of called instances.
     static::$instantiated[$this->getArea()][$this->getKey()] = $this;
 }
All Usage Examples Of Themosis\Asset\Asset::getType