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 
12 namespace Assetic\Asset;
13 
15 
21 class StringAsset extends BaseAsset
22 {
23  private $string;
24  private $lastModified;
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 
46  public function setLastModified($lastModified)
47  {
48  $this->lastModified = $lastModified;
49  }
50 
51  public function getLastModified()
52  {
53  return $this->lastModified;
54  }
55 }
A base abstract asset.
Definition: BaseAsset.php:25
getLastModified()
Returns the time the current asset was last modified.
Definition: StringAsset.php:51
doLoad($content, FilterInterface $additionalFilter=null)
Encapsulates asset loading logic.
Definition: BaseAsset.php:84
A filter manipulates an asset at load and dump.
Create styles array
The data for the language used.
Represents a string asset.
Definition: StringAsset.php:21
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