当前位置: 首页>>代码示例>>PHP>>正文


PHP Picture::get方法代码示例

本文整理汇总了PHP中Picture::get方法的典型用法代码示例。如果您正苦于以下问题:PHP Picture::get方法的具体用法?PHP Picture::get怎么用?PHP Picture::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Picture的用法示例。


在下文中一共展示了Picture::get方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: display

 function display()
 {
     $p = new Picture();
     if (!$p->get($this->user->getLogin())) {
         $this->view->assign('getavatar', $this->call('ajaxGetAvatar'));
         $this->view->assign('form', $this->prepareForm(new \modl\Contact()));
     } else {
         $this->view->assign('getavatar', '');
     }
 }
开发者ID:christine-ho-dev,项目名称:movim,代码行数:10,代码来源:Avatar.php

示例2: getLogo

 public function getLogo()
 {
     $p = new \Picture();
     return $p->get($this->origin . $this->node, 120);
 }
开发者ID:Anon215,项目名称:movim,代码行数:5,代码来源:Postn.php

示例3: getPhoto

 public function getPhoto($size = 'l', $jid = false)
 {
     if ($size == 'email') {
         return BASE_URI . 'cache/' . strtolower($this->jid) . '_email.jpg';
     } else {
         $sizes = array('wall' => array(1920, 1080), 'xxl' => array(1280, 300), 'l' => array(210, false), 'm' => array(120, false), 's' => array(50, false), 'xs' => array(28, false), 'xxs' => array(24, false));
         $p = new \Picture();
         return $p->get($this->jid, $sizes[$size][0], $sizes[$size][1]);
     }
 }
开发者ID:sugaryog,项目名称:movim,代码行数:10,代码来源:Contact.php

示例4: prepareMessage

 function prepareMessage(&$message, $jid = null)
 {
     if ($jid != $message->jidto && $jid != $message->jidfrom && $jid != null) {
         return $this->_wrapper;
     }
     $message->jidto = echapJS($message->jidto);
     $message->jidfrom = echapJS($message->jidfrom);
     if (isset($message->html)) {
         $message->body = $message->html;
     } else {
         // We add some smileys...
         $message->convertEmojis();
         $message->addUrls();
         //    $message->body = prepareString(htmlentities($message->body , ENT_COMPAT,'UTF-8'));
     }
     if (isset($message->sticker)) {
         $p = new Picture();
         $sticker = $p->get($message->sticker, false, false, 'png');
         $stickerSize = $p->getSize();
         if ($sticker == false) {
             $r = new Request();
             $r->setTo($message->jidfrom)->setResource($message->resource)->setCid($message->sticker)->request();
         } else {
             $message->sticker = ['url' => $sticker, 'width' => $stickerSize['width'], 'height' => $stickerSize['height']];
         }
     }
     if (isset($message->picture)) {
         $message->sticker = ['url' => $message->picture, 'picture' => true];
     }
     $message->publishedPrepared = prepareDate(strtotime($message->published), true);
     if ($message->delivered) {
         $message->delivered = prepareDate(strtotime($message->delivered), true);
     }
     $date = substr($message->published, 0, 10);
     if ($message->type == 'groupchat') {
         $message->color = stringToColor($message->session . $message->resource . $message->jidfrom . $message->type);
         //fillup $wrapper
         if ($message->body != "") {
             if (!array_key_exists($date, $this->_wrapper)) {
                 $this->_wrapper[$date] = [$message];
             } else {
                 array_push($this->_wrapper[$date], $message);
             }
         }
     } else {
         $msgkey = $message->jidfrom . '>' . substr($message->published, 11, 5);
         //fillup $wrapper
         if (!array_key_exists($date, $this->_wrapper)) {
             $sticker = "";
             if (isset($message->sticker)) {
                 $sticker = "sticker";
             }
             $this->_wrapper[$date] = ['0' . $sticker . '<' . $msgkey => [$message]];
         } else {
             //date contains at least one speaker@time=>msg already
             end($this->_wrapper[$date]);
             $lastkey = key($this->_wrapper[$date]);
             if (substr($lastkey, strpos($lastkey, '<') + 1) == $msgkey && !isset($message->sticker) && strpos($lastkey, "sticker<") === false) {
                 // the previous msg was not a sticker
                 array_push($this->_wrapper[$date][$lastkey], $message);
             } else {
                 $sticker = "";
                 if (isset($message->sticker)) {
                     $sticker = "sticker";
                 }
                 $this->_wrapper[$date][count($this->_wrapper[$date]) . $sticker . '<' . $msgkey] = [$message];
             }
         }
     }
     return $this->_wrapper;
 }
开发者ID:Anon215,项目名称:movim,代码行数:71,代码来源:Chat.php

示例5: insert

 function insert(Picture $param)
 {
     $parametros = $param->get();
     return $this->db->insert($this->table, $parametros, false);
 }
开发者ID:developdms,项目名称:Practica-5,代码行数:5,代码来源:ManagerPicture.php

示例6: getPicture

 public function getPicture()
 {
     /*$result = Db::selectOne('SELECT src FROM photo WHERE user_id = :user_id', array('user_id' => $this->user_id));
     		return new Picture($result);*/
     return Picture::get($this->photo_id);
 }
开发者ID:vincenthib,项目名称:visiteztokyo,代码行数:6,代码来源:Comment.class.php

示例7: District

    $request = \Slim\Slim::getInstance()->request();
    $district = json_decode($request->getBody());
    $districtDAO = new District();
    $districtDAO->update($district);
    echo '{"result":"ok"}';
});
$app->delete('/district', function () {
    $request = \Slim\Slim::getInstance()->request();
    $district = json_decode($request->getBody());
    $districtDAO = new District();
    $districtDAO->delete($district);
    echo '{"result":"ok"}';
});
$app->get('/picture', function () {
    $pictureDAO = new Picture();
    $result = $pictureDAO->get();
    echo json_encode($result);
});
$app->put('/picture', function () {
    $request = \Slim\Slim::getInstance()->request();
    $picture = json_decode($request->getBody());
    $pictureDAO = new Picture();
    $pictureDAO->update($picture);
    echo '{"result":"ok"}';
});
$app->delete('/picture', function () {
    $request = \Slim\Slim::getInstance()->request();
    $picture = json_decode($request->getBody());
    $pictureDAO = new Picture();
    $pictureDAO->delete($picture);
    echo '{"result":"ok"}';
开发者ID:,项目名称:,代码行数:31,代码来源:


注:本文中的Picture::get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。