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


PHP CASHSystem::getMimeTypeFor方法代碼示例

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


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

示例1: ArrayIterator

     if (isset($cash_admin->page_data['metadata']['private'])) {
         if (count($cash_admin->page_data['metadata']['private'])) {
             $private_response = $cash_admin->requestAndStore(array('cash_request_type' => 'asset', 'cash_action' => 'getfulfillmentassets', 'asset_details' => $asset_response['payload'], 'type' => 'private'));
             if ($private_response['payload']) {
                 $cash_admin->page_data['private_files'] = new ArrayIterator($private_response['payload']);
             }
         }
     }
     $cash_admin->page_data['cover_url'] = ADMIN_WWW_BASE_PATH . '/assets/images/release.jpg';
     if (isset($cash_admin->page_data['metadata']['cover'])) {
         if ($cash_admin->page_data['metadata']['cover']) {
             // effectively non-zero
             $cover_response = $cash_admin->requestAndStore(array('cash_request_type' => 'asset', 'cash_action' => 'getasset', 'id' => $cash_admin->page_data['metadata']['cover']));
             if ($cover_response['payload']) {
                 $cover_asset = $cover_response['payload'];
                 if (strpos(CASHSystem::getMimeTypeFor($cover_asset['location']), 'image') !== false) {
                     $cover_url_response = $cash_admin->requestAndStore(array('cash_request_type' => 'asset', 'cash_action' => 'getasseturl', 'connection_id' => $cover_asset['connection_id'], 'user_id' => AdminHelper::getPersistentData('cash_effective_user'), 'asset_location' => $cover_asset['location'], 'inline' => true));
                     if ($cover_url_response['payload']) {
                         $cash_admin->page_data['cover_url'] = $cover_url_response['payload'];
                         $cash_admin->page_data['cover_asset_id'] = $cash_admin->page_data['metadata']['cover'];
                     }
                 }
             }
         }
     }
     // set the view
     $cash_admin->setPageContentTemplate('assets_details_release');
 } else {
     // default back to the most basic view:
     $cash_admin->page_data['form_state_action'] = 'doassetedit';
     $cash_admin->page_data['asset_button_text'] = 'Edit the asset';
開發者ID:JamesLinus,項目名稱:platform,代碼行數:31,代碼來源:assets_edit.php

示例2: makePublic

 public function makePublic($filename)
 {
     $content_type = CASHSystem::getMimeTypeFor($filename);
     if ($this->changeFileMIME($filename, $content_type, false)) {
         return 'https://s3.amazonaws.com/' . $this->getBucketName() . '/' . $filename;
     } else {
         return false;
     }
 }
開發者ID:JamesLinus,項目名稱:platform,代碼行數:9,代碼來源:S3Seed.php


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