本文整理汇总了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';
示例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;
}
}