当前位置: 首页>>代码示例>>PHP>>正文


PHP N2Filesystem::existsFile方法代码示例

本文整理汇总了PHP中N2Filesystem::existsFile方法的典型用法代码示例。如果您正苦于以下问题:PHP N2Filesystem::existsFile方法的具体用法?PHP N2Filesystem::existsFile怎么用?PHP N2Filesystem::existsFile使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在N2Filesystem的用法示例。


在下文中一共展示了N2Filesystem::existsFile方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: isCached

 private function isCached($fileName)
 {
     if (N2Filesystem::existsFile($this->getStorageFilePath($fileName))) {
         return true;
     }
     return false;
 }
开发者ID:RenatoToasa,项目名称:Pagina-Web,代码行数:7,代码来源:image.php

示例2: renderInline

 public function renderInline($fileName, $params = array(), $path = null, $absolutePathInFilename = false)
 {
     if ($absolutePathInFilename) {
         $path = "";
     } elseif (is_null($path)) {
         $path = $this->appType->path . NDS . "inline" . NDS;
     }
     if (!strpos($fileName, ".php")) {
         $fileName = $fileName . ".php";
     }
     /**
      * Hack for something
      *
      * @todo write an example, maybe a bug
      */
     /*
     if (strlen($path) < 3 && $path != '') {
         $path = "";
     }
     */
     if (!N2Filesystem::existsFile($path . $fileName)) {
         throw new N2ViewException("View file ({$fileName}) not found in {$path}");
     }
     extract($params);
     /** @noinspection PhpIncludeInspection */
     include $path . $fileName;
 }
开发者ID:vicpril,项目名称:rep_bidqa,代码行数:27,代码来源:view.php

示例3: isCached

 private function isCached($file)
 {
     if (N2Filesystem::existsFile($file)) {
         return true;
     }
     return false;
 }
开发者ID:RenatoToasa,项目名称:Pagina-Web,代码行数:7,代码来源:combine.php

示例4: makeCache

 public function makeCache($fileName, $hash, $callable)
 {
     $variations = 1;
     if (N2Filesystem::existsFile($this->getManifestFilePath('variations'))) {
         $variations = intval(N2Filesystem::readFile($this->getManifestFilePath('variations')));
     }
     return parent::makeCache($fileName . mt_rand(1, $variations), $hash, $callable);
 }
开发者ID:RenatoToasa,项目名称:Pagina-Web,代码行数:8,代码来源:slider.php

示例5: clean

 public function clean($fileName)
 {
     if (N2Filesystem::existsFile($this->getManifestFilePath($fileName))) {
         unlink($this->getManifestFilePath($fileName));
     }
     if (N2Filesystem::existsFile($this->getStorageFilePath($fileName))) {
         unlink($this->getStorageFilePath($fileName));
     }
 }
开发者ID:RenatoToasa,项目名称:Pagina-Web,代码行数:9,代码来源:manifest.php

示例6: loadXMLFile

 function loadXMLFile($file)
 {
     if (!N2Filesystem::existsFile($file)) {
         echo "xml file not found ('{$file}')! <br /><strong>" . __FILE__ . ":" . __LINE__ . "</strong>";
         n2_exit(true);
         //throw new Exception("xml file not found ('{$file}')! <br /><strong>" . __FILE__ . ":" . __LINE__."</strong>");
     }
     // @fix Warning: simplexml_load_file(): I/O warning : failed to load external entity
     $this->_xml = simplexml_load_string(file_get_contents($file));
     $this->_xmlfile = $file;
     $this->xmlFolder = dirname($file);
 }
开发者ID:vicpril,项目名称:rep_bidqa,代码行数:12,代码来源:form.php

示例7: render

 public function render($params = array(), $layoutName = false)
 {
     $controller = strtolower($this->appType->controllerName);
     $path = $this->appType->path . NDS . "views" . NDS . $controller . NDS;
     $call = false;
     if (N2Filesystem::existsFile($path . NDS . "_view.php")) {
         require_once $path . NDS . "_view.php";
         $call = array("class" => "N2{$this->appType->app->name}{$this->appType->type}{$controller}View", "method" => $this->appType->actionName);
         $this->viewObject = $this->preCall($call, $this->appType);
     }
     if ($layoutName) {
         $this->renderLayout($layoutName, $params);
     }
 }
开发者ID:MBerguer,项目名称:wp-demo,代码行数:14,代码来源:layout.php

示例8: editForm

 /**
  * @param array $data
  */
 private function editForm($data = array())
 {
     $this->simpleEditForm($data);
     $slidersModel = new N2SmartsliderSlidersModel();
     $slider = $slidersModel->get(N2Request::getInt('sliderid', 0));
     $slidersSliderXml = call_user_func(array('N2SSPluginType' . $slider['type'], "getPath")) . '/slide.xml';
     if ((!isset($data['static-slide']) || $data['static-slide'] != 1) && N2Filesystem::existsFile($slidersSliderXml)) {
         $form = new N2Form();
         $form->loadArray($data);
         $form->loadXMLFile($slidersSliderXml);
         echo $form->render('slide');
     }
     if (isset($data['generator_id']) && $data['generator_id'] > 0) {
         $form = new N2Form();
         $form->loadArray($data);
         $form->loadXMLFile(dirname(__FILE__) . '/forms/slide_generator.xml');
         echo $form->render('slide');
     }
     N2JS::addFirstCode("new NextendForm('smartslider-form','', {});");
 }
开发者ID:MBerguer,项目名称:wp-demo,代码行数:23,代码来源:Slides.php


注:本文中的N2Filesystem::existsFile方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。