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


PHP Manager::getFilesPath方法代碼示例

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


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

示例1: saveToCache

 public function saveToCache($inline = true, $name = '')
 {
     $this->name = $name ?: md5($this->value);
     $file = \Manager::getFilesPath($this->name);
     if (!file_exists($file)) {
         $this->saveTo($file);
     }
     $this->setPath($file, $inline);
 }
開發者ID:joshuacoddingyou,項目名稱:php,代碼行數:9,代碼來源:mfile.php

示例2: save

 public function save()
 {
     $file = \Manager::getFilesPath($this->data->id, true);
     if (!file_exists($file)) {
         $this->notfound($this->data->id . " : Not found!");
     } else {
         $this->renderDownload($file);
     }
 }
開發者ID:joshuacoddingyou,項目名稱:php,代碼行數:9,代碼來源:reportController.php

示例3: execute

 public function execute($data)
 {
     $id = uniqid(md5(uniqid("")));
     // generate a unique id to avoid name conflicts
     $fileOutput = $id . "." . $this->fileType;
     // the report generated file
     $pathOut = Manager::getFilesPath($fileOutput, true);
     $output = $this->exporter->execute($data, $pathOut);
     return $output ?: \Manager::getDownloadURL('report', basename($fileOutput), true);
 }
開發者ID:joshuacoddingyou,項目名稱:php,代碼行數:10,代碼來源:mexporter.php

示例4: executeDB

 function executeDB($db, $fileInput, $parameters = null, $fileType = 'PDF', $save = false)
 {
     $this->fileType = isset($fileType) ? strtoupper(trim($fileType)) : 'PDF';
     $id = uniqid(md5(uniqid("")));
     // generate a unique id to avoid name conflicts
     $this->fileOutput = $id . "." . strtolower($this->fileType);
     // the report generated file
     $pathOut = Manager::getFilesPath($this->fileOutput, true);
     $pathIn = $this->getInputPath($fileInput);
     return $this->fillDB($db, $pathIn, $pathOut, $fileType, $parameters, $classPath, $save);
 }
開發者ID:joshuacoddingyou,項目名稱:php,代碼行數:11,代碼來源:mjavajasperreport.php

示例5: execute

 public function execute()
 {
     $pdfCode = $this->getOutput();
     $fileName = uniqid(md5(uniqid(""))) . '.pdf';
     $this->fileOutput = Manager::getFilesPath($fileName, true);
     $fp = fopen($this->fileOutput, 'x');
     fwrite($fp, $pdfCode);
     fclose($fp);
     $output = \Manager::getDownloadURL('report', $fileName, true);
     return $output;
 }
開發者ID:joshuacoddingyou,項目名稱:php,代碼行數:11,代碼來源:mezpdfreport.php

示例6: createFilename

 /**
  * Gera um prefixo para servir como nome de arquivo
  * @return string
  */
 private static function createFilename()
 {
     $fileDir = \Manager::getFilesPath();
     $filename = uniqid(rand(), true);
     return "{$fileDir}/{$filename}";
 }
開發者ID:joshuacoddingyou,項目名稱:php,代碼行數:10,代碼來源:mcertificate.php

示例7: renderLot

 public function renderLot()
 {
     $grafico = new PHPlot(800, 600);
     $grafico->SetFileFormat("jpg");
     $grafico->SetIsInline(True);
     #Indicamos o títul do gráfico e o título dos dados no eixo X e Y do mesmo
     $grafico->SetTitle($this->data->titulo);
     $grafico->SetXTitle($this->data->eixoX);
     $grafico->SetYTitle($this->data->eixoY);
     #passamos o tipo de gráfico escolhido
     if (!$this->data->tipoLot) {
         $this->data->tipoLot = 'bars';
     }
     $grafico->SetPlotType($this->data->tipoLot);
     switch ($this->data->tipoLot) {
         case 'pie':
             $grafico->SetPieLabelType('index', 'custom', 'mycallback');
             $grafico->SetDataType('text-data-single');
             break;
         case 'stackedbars':
             $grafico->SetDataType('text-data-yx');
             break;
         case 'bubbles':
             $grafico->SetDataType('data-data-xyz');
             break;
     }
     $grafico->SetLegend($column_names);
     #Definimos os dados do gráfico
     switch ($this->data->tipoLot) {
         case 'pie':
             $dados = array(array($this->data->x1, $this->data->y11), array($this->data->x2, $this->data->y21), array($this->data->x3, $this->data->y31), array($this->data->x4, $this->data->y41));
             break;
         default:
             $dados = array(array($this->data->x1, $this->data->y11, $this->data->y12, $this->data->y13), array($this->data->x2, $this->data->y21, $this->data->y22, $this->data->y23), array($this->data->x3, $this->data->y31, $this->data->y32, $this->data->y33), array($this->data->x4, $this->data->y41, $this->data->y42, $this->data->y43));
             break;
     }
     $grafico->SetDataValues($dados);
     #Salvamos o gráfico
     $caminho = \Manager::getFilesPath();
     $fileName = uniqid() . '.jpg';
     $grafico->SetOutputFile($caminho . '/' . $fileName);
     $grafico->SetIsInline(True);
     $grafico->DrawGraph();
     #obtemos o endereco do grafico
     $this->data->locate = \Manager::getDownloadURL('files', basename($fileName), true);
 }
開發者ID:joshuacoddingyou,項目名稱:php,代碼行數:46,代碼來源:diversosController.php

示例8: asCSV

 public function asCSV($showColumnName = false)
 {
     $this->getResult();
     $result = $this->result;
     if ($showColumnName) {
         for ($i = 0; $i < $this->columnCount; $i++) {
             $columns[] = ucfirst($this->metadata['fieldname'][$i]);
         }
         array_unshift($result, $columns);
     }
     $id = uniqid(md5(uniqid("")));
     // generate a unique id to avoid name conflicts
     $fileCSV = \Manager::getFilesPath($id . '.csv', true);
     $csvDump = new \MCSVDump(\Manager::getOptions('csv'));
     $csvDump->save($result, basename($fileCSV));
     return $fileCSV;
 }
開發者ID:elymatos,項目名稱:expressive,代碼行數:17,代碼來源:MQuery.php

示例9: getCaptcha

 private function getCaptcha($name)
 {
     $font = Manager::getPublicPath('', '', 'fonts/ttf/arial.ttf');
     $path = Manager::getFilesPath();
     return new Zend\Captcha\Image(array('name' => $name, 'font' => $font, 'imgDir' => $path));
 }
開發者ID:joshuacoddingyou,項目名稱:php,代碼行數:6,代碼來源:zendController.php


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