本文整理汇总了PHP中Picture::get_simple_pic方法的典型用法代码示例。如果您正苦于以下问题:PHP Picture::get_simple_pic方法的具体用法?PHP Picture::get_simple_pic怎么用?PHP Picture::get_simple_pic使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Picture
的用法示例。
在下文中一共展示了Picture::get_simple_pic方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: intval
/**
* 构造函数
* @param int $pic_id 图片ID
* @param int|bool $page 当前页面数
* @param array $info 图片的相关信息
* @throws \Exception
*/
function __construct($pic_id, $page = false, $info = NULL)
{
parent::__construct("pictures_has_comments", "pictures_id", intval($pic_id), "pictures");
$this->page = intval($page);
$this->action_method = "post_picture";
$this->router = lib()->using('router');
if ($info === NULL) {
lib()->load('Picture');
$pic = new Picture();
$this->picture_info = $pic->get_simple_pic($pic_id);
} else {
$this->picture_info = $info;
}
if (!isset($this->picture_info['pic_id'])) {
throw new \Exception("Picture comment load error.");
}
}
示例2: lib
/**
* @param $pid
* @param $uid
*/
function __construct($pid, $uid)
{
lib()->load('Picture');
$pic = new Picture();
$info = $pic->get_simple_pic($pid);
if (!isset($info['pic_status'])) {
$this->throwMsg(-2);
}
if ($info['pic_status'] < 0) {
$this->throwMsg(-1);
}
$this->pid = +$pid;
User::getUser($uid);
$this->s_uid = +$uid;
$this->info[] = ['id' => $info['pic_id'], 'name' => $info['pic_name'], 'desc' => $info['pic_description'], 'thumbnail' => $info['pic_thumbnails_path'], 'display' => $info['pic_display_path'], 'pic_path' => $info['pic_path']];
$this->server = $info['server_name'];
$this->o_uid = +$info['user_id'];
$this->status = true;
}