本文整理汇总了PHP中FileModel::getFiles方法的典型用法代码示例。如果您正苦于以下问题:PHP FileModel::getFiles方法的具体用法?PHP FileModel::getFiles怎么用?PHP FileModel::getFiles使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FileModel
的用法示例。
在下文中一共展示了FileModel::getFiles方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderDefault
public function renderDefault($url)
{
$res = dibi::query('
SELECT
workId,
url as file,
title,
text,', Model::sqlCategory() . ' as category,
authorUrl,
CONCAT_WS(" ", name, surname) as authorName,
year,', Model::sqlWorkClassName() . 'as workClass,', 'award,
type,
pages,
words,
characters,
[read],
added,
edited
FROM [works]
join [authors] on author = authorId
WHERE `url`=%s', $url)->fetchAll();
//$res[0]['award'] = ($res[0]['award'] != 99) ? $res[0]['award'] . ". místo" : "nominaci";
//2010-08-19 22:43:25
$res[0]['added'] = preg_replace('/(\\d{4})-(\\d{2})-(\\d{2}) (\\d{2}):(\\d{2}):(\\d{2})/', '$3.$2.$1 $4:$5', $res[0]['added']);
$res[0]['edited'] = preg_replace('/(\\d{4})-(\\d{2})-(\\d{2}) (\\d{2}):(\\d{2}):(\\d{2})/', '$3.$2.$1 $4:$5', $res[0]['edited']);
$this->template->data = $res[0];
$this->template->files = FileModel::getFiles($res[0]['workId']);
Model::increaseRead($res[0]['workId']);
}
示例2: getUserFiles
public static function getUserFiles()
{
if (!($fileInfo = FileModel::getFiles(Session::get('user_id')))) {
return array('error_message' => Message::get('DB_ERROR'));
}
return $fileInfo;
}
示例3: __toString
public function __toString()
{
$template = $this->getTemplate();
$template->setFile($this->file);
$this->template->form = $this['form'];
$this->template->schoolYear = Model::getSchoolYear();
if ($this->setId != '') {
$this->template->files = FileModel::getFiles($this->setId);
$this->template->loadLoader = TRUE;
}
$s = $template->__toString(TRUE);
return mb_convert_encoding($s, 'HTML-ENTITIES', 'UTF-8');
}