本文整理汇总了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);