本文整理汇总了PHP中file_info::get_timecreated方法的典型用法代码示例。如果您正苦于以下问题:PHP file_info::get_timecreated方法的具体用法?PHP file_info::get_timecreated怎么用?PHP file_info::get_timecreated使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类file_info
的用法示例。
在下文中一共展示了file_info::get_timecreated方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_node
/**
* Converts file_info object to element of repository return list
*
* @param file_info $fileinfo
* @return array
*/
private function get_node(file_info $fileinfo)
{
global $OUTPUT;
$encodedpath = base64_encode(json_encode($fileinfo->get_params()));
$node = array('title' => $fileinfo->get_visible_name(), 'datemodified' => $fileinfo->get_timemodified(), 'datecreated' => $fileinfo->get_timecreated());
if ($fileinfo->is_directory()) {
$node['path'] = $encodedpath;
$node['thumbnail'] = $OUTPUT->pix_url(file_folder_icon(90))->out(false);
$node['children'] = array();
} else {
$node['size'] = $fileinfo->get_filesize();
$node['author'] = $fileinfo->get_author();
$node['license'] = $fileinfo->get_license();
$node['isref'] = $fileinfo->is_external_file();
if ($fileinfo->get_status() == 666) {
$node['originalmissing'] = true;
}
$node['source'] = $encodedpath;
$node['thumbnail'] = $OUTPUT->pix_url(file_file_icon($fileinfo, 90))->out(false);
$node['icon'] = $OUTPUT->pix_url(file_file_icon($fileinfo, 24))->out(false);
if ($imageinfo = $fileinfo->get_imageinfo()) {
// what a beautiful picture, isn't it
$fileurl = new moodle_url($fileinfo->get_url());
$node['realthumbnail'] = $fileurl->out(false, array('preview' => 'thumb', 'oid' => $fileinfo->get_timemodified()));
$node['realicon'] = $fileurl->out(false, array('preview' => 'tinyicon', 'oid' => $fileinfo->get_timemodified()));
$node['image_width'] = $imageinfo['width'];
$node['image_height'] = $imageinfo['height'];
}
}
return $node;
}