ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
StringAsset.php
Go to the documentation of this file.
1<?php
2
3/*
4 * This file is part of the Assetic package, an OpenSky project.
5 *
6 * (c) 2010-2014 OpenSky Project Inc
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12namespace Assetic\Asset;
13
15
22{
23 private $string;
25
34 public function __construct($content, $filters = array(), $sourceRoot = null, $sourcePath = null)
35 {
36 $this->string = $content;
37
38 parent::__construct($filters, $sourceRoot, $sourcePath);
39 }
40
41 public function load(FilterInterface $additionalFilter = null)
42 {
43 $this->doLoad($this->string, $additionalFilter);
44 }
45
47 {
48 $this->lastModified = $lastModified;
49 }
50
51 public function getLastModified()
52 {
54 }
55}
A base abstract asset.
Definition: BaseAsset.php:26
doLoad($content, FilterInterface $additionalFilter=null)
Encapsulates asset loading logic.
Definition: BaseAsset.php:84
Represents a string asset.
Definition: StringAsset.php:22
setLastModified($lastModified)
Definition: StringAsset.php:46
load(FilterInterface $additionalFilter=null)
Loads the asset into memory and applies load filters.
Definition: StringAsset.php:41
__construct($content, $filters=array(), $sourceRoot=null, $sourcePath=null)
Constructor.
Definition: StringAsset.php:34
getLastModified()
Returns the time the current asset was last modified.
Definition: StringAsset.php:51
An exception for terminatinating execution or to throw for unit testing.
A filter manipulates an asset at load and dump.