本文整理匯總了PHP中Storage::search方法的典型用法代碼示例。如果您正苦於以下問題:PHP Storage::search方法的具體用法?PHP Storage::search怎麽用?PHP Storage::search使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Storage
的用法示例。
在下文中一共展示了Storage::search方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: swappAction
public function swappAction()
{
$associd = trim($this->_getParam('associationid'));
$is_archived = false;
$swapp_relations = new Default_Model_ContextScriptAssocs();
$swapp_relations->filter->id->numequals($associd);
if (count($swapp_relations->items) === 0) {
return $this->echo_file(null);
}
$swapp_relation = $swapp_relations->items[0];
$contextscripts = new Default_Model_ContextScripts();
$contextscripts->filter->id->numequals($swapp_relation->contextscriptid);
if (count($contextscripts->items) === 0) {
return $this->echo_file(null);
}
$cscript = $contextscripts->items[0];
$url = $cscript->url;
$cs_guid = $cscript->guid;
$group = 'cs/swapp';
$filename = basename($url);
$path = Storage::search($group, $cs_guid, $filename, false);
if (!$path) {
$path = Storage::searchArchive($group, $cs_guid, $filename);
if ($path) {
$is_archived = true;
}
}
$this->echo_file($path, $is_archived);
}
示例2: actionExport
public function actionExport()
{
$model = new Storage();
$model->unsetAttributes();
// clear any default values
if (isset($_POST['Storage'])) {
$model->attributes = $_POST['Storage'];
}
$exportType = $_POST['fileType'];
$this->widget('ext.heart.export.EHeartExport', array('title' => 'List of Storage', 'dataProvider' => $model->search(), 'filter' => $model, 'grid_mode' => 'export', 'exportType' => $exportType, 'columns' => array('storage_id', 'curDate', 'prod_id', 'curCount')));
}
示例3: Storage
<?php
require 'src/SharedMemory.php';
require 'src/Storage.php';
$store = new Storage(1048576);
$store[0] = 0;
$store[1] = 1;
$store[2] = 2;
$store[3] = 3;
$store[4] = 4;
$store[5] = 5;
$store[6] = 10;
//unset($store[0]);
//$store->destroy();
var_dump($store->search(0));
//var_dump($store);