當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Art::reset方法代碼示例

本文整理匯總了PHP中Art::reset方法的典型用法代碼示例。如果您正苦於以下問題:PHP Art::reset方法的具體用法?PHP Art::reset怎麽用?PHP Art::reset使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Art的用法示例。


在下文中一共展示了Art::reset方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: delete_avatar

 public function delete_avatar()
 {
     $art = new Art($this->id, 'user');
     $art->reset();
 }
開發者ID:bl00m,項目名稱:ampache,代碼行數:5,代碼來源:user.class.php

示例2: Art

}
$burl = '';
if (isset($_GET['burl'])) {
    $burl = base64_decode($_GET['burl']);
}
$item = new $object_type($object_id);
// If not a content manager user then kick em out
if (!Access::check('interface', 50) && (!Access::check('interface', 25) || $item->get_user_owner() != $GLOBALS['user']->id)) {
    UI::access_denied();
    exit;
}
/* Switch on Action */
switch ($_REQUEST['action']) {
    case 'clear_art':
        $art = new Art($object_id, $object_type);
        $art->reset();
        show_confirmation(T_('Art Cleared'), T_('Art information has been removed from the database'), $burl);
        break;
        // Upload art
    // Upload art
    case 'upload_art':
        // we didn't find anything
        if (empty($_FILES['file']['tmp_name'])) {
            show_confirmation(T_('Art Not Located'), T_('Art could not be located at this time. This may be due to write access error, or the file is not received correctly.'), $burl);
            break;
        }
        // Pull the image information
        $data = array('file' => $_FILES['file']['tmp_name']);
        $image_data = Art::get_from_source($data, $object_type);
        // If we got something back insert it
        if ($image_data) {
開發者ID:nioc,項目名稱:ampache,代碼行數:31,代碼來源:arts.php

示例3: get_artist_info

 /**
  * get_artist_info
  * Returns artist information
  */
 public static function get_artist_info($artist_id, $fullname = '')
 {
     $artist = null;
     if ($artist_id) {
         $artist = new Artist($artist_id);
         $artist->format();
         $fullname = $artist->f_full_name;
         // Data newer than 6 months, use it
         if ($artist->last_update + 15768000 > time()) {
             $results = array();
             $results['summary'] = $artist->summary;
             $results['placeformed'] = $artist->placeformed;
             $results['yearformed'] = $artist->yearformed;
             $results['largephoto'] = Art::url($artist->id, 'artist');
             $results['megaphoto'] = $results['largephoto'];
             return $results;
         }
     }
     $query = 'artist=' . rawurlencode($fullname);
     $xml = self::get_lastfm_results('artist.getinfo', $query);
     $results = array();
     $results['summary'] = strip_tags(preg_replace("#<a href=([^<]*)Last\\.fm</a>.#", "", (string) $xml->artist->bio->summary));
     $results['placeformed'] = (string) $xml->artist->bio->placeformed;
     $results['yearformed'] = (string) $xml->artist->bio->yearformed;
     $results['largephoto'] = $xml->artist->image[2];
     $results['megaphoto'] = $xml->artist->image[4];
     if ($artist) {
         if (!empty($results['summary']) || !empty($results['megaphoto'])) {
             $artist->update_artist_info($results['summary'], $results['placeformed'], $results['yearformed']);
             $image = Art::get_from_source(array('url' => $results['megaphoto']), 'artist');
             $rurl = pathinfo($results['megaphoto']);
             $mime = 'image/' . $rurl['extension'];
             $art = new Art($artist->id, 'artist');
             $art->reset();
             $art->insert($image, $mime);
             $results['largephoto'] = Art::url($artist->id, 'artist');
             $results['megaphoto'] = $results['largephoto'];
         }
     }
     return $results;
 }
開發者ID:axelsimon,項目名稱:ampache,代碼行數:45,代碼來源:recommendation.class.php


注:本文中的Art::reset方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。