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


PHP NextendFilesystem::getBasePath方法代码示例

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


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

示例1: render

 static function render($slider, $id, $params)
 {
     $html = '';
     $shadowcss = $params->get('shadowcss', false);
     if ($shadowcss && $shadowcss != -1) {
         $displayclass = self::getDisplayClass($params->get('widgetshadowdisplay', '0|*|always|*|0|*|0'), false);
         list($style, $data) = self::getPosition($params->get('shadowposition', ''));
         $width = NextendParse::parse($params->get('shadowwidth', 'width'));
         if (is_numeric($width) || $width == 'auto' || substr($width, -1) == '%') {
             $style .= 'width:' . $width . ';';
         } else {
             $data .= 'data-sswidth="' . $width . '" ';
         }
         $css = NextendCss::getInstance();
         $css->addCssFile(NextendFilesystem::translateToMediaPath(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'shadow' . DIRECTORY_SEPARATOR . 'style.css'));
         $info = pathinfo($shadowcss);
         $class = 'nextend-shadow nextend-shadow-' . basename($shadowcss, '.' . $info['extension']);
         $html .= '<div class="' . $displayclass . $class . '" style="line-height:0;' . $style . '" ' . $data . '><img src="' . (nextendIsWordpress() ? plugins_url('shadow/shadow/' . $info['basename'], __FILE__) : NextendUri::pathToUri(NextendFilesystem::getBasePath() . $shadowcss)) . '"/></div>';
     }
     return $html;
 }
开发者ID:pguilford,项目名称:vcomcc,代码行数:21,代码来源:shadow.php

示例2: subform

 function subform()
 {
     $response = array();
     if (!isset($_POST['data'])) {
         echo json_encode(array('error' => 'Post not OK!'));
         exit;
     }
     if (get_magic_quotes_gpc() || nextendIsWordPress()) {
         $_POST['data'] = stripslashes($_POST['data']);
     }
     $data = json_decode($_POST['data'], true);
     $configurationXmlFile = rtrim(NextendFilesystem::getBasePath(), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . $data['xml'];
     if (NextendFilesystem::fileexists($configurationXmlFile)) {
         nextendimport('nextend.css.css');
         nextendimport('nextend.javascript.javascript');
         $css = NextendCSS::getInstance();
         $js = NextendJavascript::getInstance();
         $js->loadLibrary('dojo');
         nextendimport('nextend.form.form');
         $form = new NextendForm();
         $form->loadArray($data['orig']);
         $form->loadArray(array($data['name'] => $data['value']));
         $form->loadXMLFile($configurationXmlFile);
         ob_start();
         $subform = $form->getSubform($data['tab'], $data['name']);
         $subform->initAjax($data['control_name']);
         echo $subform->renderForm();
         echo "<style>";
         echo $css->generateAjaxCSS($data['loadedCSS']);
         echo "</style>";
         $scripts = $js->generateAjaxJs($data['loadedJSS']);
         $html = ob_get_clean();
         $response = array('html' => $html, 'scripts' => $scripts);
     } else {
         $response = array('error' => 'Configuration file not found');
     }
     echo json_encode($response);
     exit;
 }
开发者ID:01J,项目名称:bealtine,代码行数:39,代码来源:ajax.php

示例3: pathToUri

 static function pathToUri($path)
 {
     $i = NextendUri::getInstance();
     return $i->_baseuri . str_replace(array(NextendFilesystem::getBasePath(), DIRECTORY_SEPARATOR), array('', '/'), str_replace('/', DIRECTORY_SEPARATOR, $path));
 }
开发者ID:01J,项目名称:bealtine,代码行数:5,代码来源:uri.php

示例4: addJsLibraryFile

 function addJsLibraryFile($file)
 {
     $file = NextendFilesystem::getBasePath() . NextendFilesystem::getLibraryPath() . 'javascript/modernizr/' . $file;
     $this->addJsFile($file);
 }
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:5,代码来源:modernizr.php

示例5: removeJsLibraryFile

 function removeJsLibraryFile($file)
 {
     $file = NextendFilesystem::getBasePath() . NextendFilesystem::getLibraryPath() . 'javascript/jquery/1.9.1/' . $file;
     $this->removeJsFile($file);
 }
开发者ID:pguilford,项目名称:vcomcc,代码行数:5,代码来源:jquery.php

示例6: resizeImage

 function resizeImage($image, $w, $h)
 {
     $w = intval($w);
     $h = intval($h);
     $cachefile = $this->_folder . 'resize' . md5($image) . $w . '_' . $h . '.' . $this->_filetype;
     if (!NextendFilesystem::existsFile($cachefile)) {
         if ($image && $w >= 1 && $h >= 1) {
             if (strpos($image, 'http') === 0) {
                 //url
             } else {
                 if (!NextendFilesystem::existsFile($image)) {
                     $image = NextendFilesystem::getBasePath() . $image;
                 }
             }
             if (is_readable($image)) {
                 $orig = null;
                 switch (exif_imagetype($image)) {
                     case IMAGETYPE_JPEG:
                         $orig = imagecreatefromjpeg($image);
                         break;
                     case IMAGETYPE_PNG:
                         $orig = imagecreatefrompng($image);
                         break;
                 }
                 if ($orig) {
                     $this->createIm($w, $h);
                     $ow = imagesx($orig);
                     $oh = imagesy($orig);
                     $ratioX = $ow / $w;
                     $ratioY = $oh / $h;
                     if ($ratioX > $ratioY) {
                         $ow = $ratioY * $w;
                     } else {
                         $oh = $ratioX * $h;
                     }
                     imagecopyresampled($this->_im, $orig, 0, 0, 0, 0, $w, $h, $ow, $oh);
                     $this->saveIm($cachefile);
                     imagedestroy($orig);
                     return NextendFilesystem::pathToAbsoluteURL($cachefile);
                 }
             } else {
                 return $image;
             }
         } else {
             return $image;
         }
     }
     return NextendFilesystem::pathToAbsoluteURL($cachefile);
 }
开发者ID:Gordondalos,项目名称:smart-event,代码行数:49,代码来源:image.php

示例7: lessColorizeimage

 function lessColorizeimage(&$arg)
 {
     if (isset($arg[2])) {
         $arg =& $arg[2];
         if (isset($arg[0])) {
             $colorize = $this->getFromEscapedArgs($arg[0]);
         }
         if (isset($arg[1])) {
             $image = $this->getFromEscapedArgs($arg[1]);
             if ($image == '-1') {
                 return 'none';
             }
         }
         if (isset($arg[2])) {
             $color = $this->getFromEscapedArgs($arg[2]);
         }
         $url = '';
         if ($colorize == 0) {
             $url = NextendFilesystem::pathToAbsoluteURL(NextendFilesystem::getBasePath() . $image);
         } else {
             if (realpath($image) !== false) {
                 $image = realpath($image);
             } else {
                 $image = NextendFilesystem::getBasePath() . $image;
             }
             $url = $this->colorizeImage($image, $color, '548722');
         }
         return $this->url($url);
     }
 }
开发者ID:01J,项目名称:bealtine,代码行数:30,代码来源:image.php


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