Библиотека для cis, online, cms1
This commit is contained in:
commit
3c2e614d87
269 changed files with 39854 additions and 0 deletions
34
PHPTAL/StringSource.php
Normal file
34
PHPTAL/StringSource.php
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
require_once PHPTAL_DIR.'PHPTAL/Source.php';
|
||||
|
||||
/**
|
||||
* @package phptal
|
||||
*/
|
||||
class PHPTAL_StringSource implements PHPTAL_Source
|
||||
{
|
||||
public function __construct($data, $realpath)
|
||||
{
|
||||
$this->_data = $data;
|
||||
$this->_realpath = $realpath;
|
||||
}
|
||||
|
||||
public function getLastModifiedTime()
|
||||
{
|
||||
if (file_exists($this->_realpath))
|
||||
return @filemtime($this->_realpath);
|
||||
return 0;
|
||||
}
|
||||
|
||||
public function getData()
|
||||
{
|
||||
return $this->_data;
|
||||
}
|
||||
|
||||
public function getRealPath()
|
||||
{
|
||||
return $this->_realpath;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue