当前位置: 首页>>代码示例>>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;未经允许,请勿转载。