Themosis\Asset\Asset::register PHP Méthode

register() protected méthode

Register the asset.
protected register ( Asset $asset )
$asset Asset
    protected function register(Asset $asset)
    {
        // Avoid duplicate calls to each instance.
        if ($this->getArea() !== $asset->getArea()) {
            return;
        }
        // Register asset.
        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;
    }