- md5
- e7ae03b9fa21d9e4ad03a36b8ae865a2
- sha1
- 65f7c5114068f8c2966797ef07b54d378831700b
- sha256
- bf00b1fcd7d8df61720899724422a227aacfe492910b984271dfce82cf109903
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
<?php
/**
* Joomla! Content Management System
*
* @copyright (C) 2019 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\CMS\WebAsset;
\defined('JPATH_PLATFORM') or die;
/**
* Web Asset Item interface
*
* Asset Item are "read only" object, all properties must be set through class constructor.
* Only properties allowed to be edited is an attributes and an options.
* Changing an uri or a dependencies are not allowed, prefer to create a new asset instance.
*
* @since 4.0.0
*/
interface WebAssetItemInterface
{
/**
* Return Asset name
*
* @return string
*
* @since 4.0.0
*/
public function getName(): string;
/**
* Return Asset version
*
* @return string
*
* @since 4.0.0
*/
public function getVersion(): string;
/**
* Return dependencies list
*
* @return array
*
* @since 4.0.0
*/
public function getDependencies(): array;
/**
* Get the URI of the asset
*
* @param boolean $resolvePath Whether need to search for a real paths
*
* @return string
*
* @since 4.0.0
*/
public function getUri($resolvePath = true): string;
/**
* Get the option
*
* @param string $key An option key
* @param string $default A default value
*
* @return mixed
*
* @since 4.0.0
*/
public function getOption(string $key, $default = null);
/**
* Set the option
*
* @param string $key An option key
* @param string $value An option value
*
* @return self
*
* @since 4.0.0
*/
public function setOption(string $key, $value = null): WebAssetItemInterface;
/**
* Get all options of the asset
*
* @return array
*
* @since 4.0.0
*/
public function getOptions(): array;
/**
* Get the attribute
*
* @param string $key An attributes key
* @param string $default A default value
*
* @return mixed
*
* @since 4.0.0
*/
public function getAttribute(string $key, $default = null);
/**
* Set the attribute
*
* @param string $key An attribute key
* @param string $value An attribute value
*
* @return self
*
* @since 4.0.0
*/
public function setAttribute(string $key, $value = null): WebAssetItemInterface;
/**
* Get all attributes
*
* @return array
*
* @since 4.0.0
*/
public function getAttributes(): array;
}
The same content is in 51 releases, Joomla 4.0.0-beta6 to 4.2.0-beta2. See them all, or every version of this file.