An asset collection.
@author Kris Wallsmith <kris.wallsmith@gmail.com>
Expanded class hierarchy of AssetCollectionInterface
All classes that implement AssetCollectionInterface
interface AssetCollectionInterface extends AssetInterface, \Traversable {
/**
* Returns all child assets.
*
* @return array An array of AssetInterface objects
*/
public function all();
/**
* Adds an asset to the current collection.
*
* @param AssetInterface $asset An asset
*/
public function add(AssetInterface $asset);
/**
* Removes a leaf.
*
* @param AssetInterface $leaf The leaf to remove
* @param Boolean $graceful Whether the failure should return false or throw an exception
*
* @return Boolean Whether the asset has been found
*
* @throws \InvalidArgumentException If the asset cannot be found
*/
public function removeLeaf(AssetInterface $leaf, $graceful = false);
/**
* Replaces an existing leaf with a new one.
*
* @param AssetInterface $needle The current asset to replace
* @param AssetInterface $replacement The new asset
* @param Boolean $graceful Whether the failure should return false or throw an exception
*
* @return Boolean Whether the asset has been found
*
* @throws \InvalidArgumentException If the asset cannot be found
*/
public function replaceLeaf(AssetInterface $needle, AssetInterface $replacement, $graceful = false);
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AssetCollectionInterface:: |
public | function | Adds an asset to the current collection. | 1 |
AssetCollectionInterface:: |
public | function | Returns all child assets. | 1 |
AssetCollectionInterface:: |
public | function | Removes a leaf. | 1 |
AssetCollectionInterface:: |
public | function | Replaces an existing leaf with a new one. | 1 |
AssetInterface:: |
public | function | Clears all filters from the current asset. | 4 |
AssetInterface:: |
public | function | Applies dump filters and returns the asset as a string. | 4 |
AssetInterface:: |
public | function | Ensures the current asset includes the supplied filter. | 4 |
AssetInterface:: |
public | function | Returns the loaded content of the current asset. | 4 |
AssetInterface:: |
public | function | Returns an array of filters currently applied. | 4 |
AssetInterface:: |
public | function | Returns the time the current asset was last modified. | 6 |
AssetInterface:: |
public | function | Returns the relative path for the source asset. | 4 |
AssetInterface:: |
public | function | Returns an absolute path or URL to the source asset's root directory. | 4 |
AssetInterface:: |
public | function | Returns the URL for the current asset. | 4 |
AssetInterface:: |
public | function | Returns the current values for this asset. | 4 |
AssetInterface:: |
public | function | Returns an array of variable names for this asset. | 4 |
AssetInterface:: |
public | function | Loads the asset into memory and applies load filters. | 6 |
AssetInterface:: |
public | function | Sets the content of the current asset. | 4 |
AssetInterface:: |
public | function | Sets the URL for the current asset. | 4 |
AssetInterface:: |
public | function | Sets the values for the asset's variables. | 4 |