• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP JFolder类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: fetchElement

 function fetchElement($name, $value, &$node, $control_name)
 {
     // init vars
     $class = $node->attributes('class') ? 'class="' . $node->attributes('class') . '"' : 'class="inputbox"';
     $constraint = $node->attributes('constraint');
     // get renderer
     $this->renderer = new ItemRenderer();
     $this->renderer->addPath($this->_parent->layout_path);
     // if selectable types isn't specified, get all types
     if (empty($this->_parent->selectable_types)) {
         $this->_parent->selectable_types = array('');
         foreach (JFolder::folders($this->_parent->layout_path . '/' . $this->renderer->getFolder() . '/item') as $folder) {
             $this->_parent->selectable_types[] = $folder;
         }
     }
     // get layouts
     $layouts = array();
     foreach ($this->_parent->selectable_types as $type) {
         $layouts = array_merge($layouts, $this->_getLayouts($type, $constraint));
     }
     // create layout options
     $options = array(JHTML::_('select.option', '', JText::_('Item Name')));
     foreach ($layouts as $layout => $layout_name) {
         $text = $layout_name;
         $val = $layout;
         $options[] = JHTML::_('select.option', $val, JText::_($text));
     }
     return JHTML::_('select.genericlist', $options, $control_name . '[' . $name . ']', $class, 'value', 'text', $value, $control_name . $name);
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:29,代码来源:zoolayout.php


示例2: fetchElement

 function fetchElement($name, $value, &$node, $control_name)
 {
     jimport('joomla.filesystem.folder');
     $mainframe =& JFactory::getApplication();
     $fieldName = version_compare(JVERSION, '1.6.0', 'ge') ? $name : $control_name . '[' . $name . ']';
     if (version_compare(JVERSION, '1.6.0', 'ge')) {
         $pluginTemplatesPath = JPATH_SITE . DS . 'plugins' . DS . 'content' . DS . 'jw_ts' . DS . 'jw_ts' . DS . 'tmpl';
     } else {
         $pluginTemplatesPath = JPATH_SITE . DS . 'plugins' . DS . 'content' . DS . 'jw_ts' . DS . 'tmpl';
     }
     $pluginTemplatesFolders = JFolder::folders($pluginTemplatesPath);
     $db =& JFactory::getDBO();
     if (version_compare(JVERSION, '1.6.0', 'ge')) {
         $query = "SELECT template FROM #__template_styles WHERE client_id = 0 AND home = 1";
     } else {
         $query = "SELECT template FROM #__templates_menu WHERE client_id = 0 AND menuid = 0";
     }
     $db->setQuery($query);
     $template = $db->loadResult();
     $templatePath = JPATH_SITE . DS . 'templates' . DS . $template . DS . 'html' . DS . 'jw_ts';
     if (JFolder::exists($templatePath)) {
         $templateFolders = JFolder::folders($templatePath);
         $folders = @array_merge($templateFolders, $pluginTemplatesFolders);
         $folders = @array_unique($folders);
     } else {
         $folders = $pluginTemplatesFolders;
     }
     sort($folders);
     $options = array();
     foreach ($folders as $folder) {
         $options[] = JHTML::_('select.option', $folder, $folder);
     }
     return JHTML::_('select.genericlist', $options, $fieldName, 'class="inputbox"', 'value', 'text', $value);
 }
开发者ID:santas156,项目名称:joomleague-2-komplettpaket,代码行数:34,代码来源:template.php


示例3: fetchElement

 public function fetchElement($name, $value, &$node, $control_name)
 {
     jimport('joomla.filesystem.folder');
     $plgTemplatesPath = version_compare(JVERSION, '1.6', 'ge') ? JPATH_SITE . '/plugins/content/jw_allvideos/jw_allvideos/tmpl' : JPATH_SITE . '/plugins/content/jw_allvideos/tmpl';
     $plgTemplatesFolders = JFolder::folders($plgTemplatesPath);
     $db = JFactory::getDBO();
     if (version_compare(JVERSION, '1.6', 'ge')) {
         $query = "SELECT template FROM #__template_styles WHERE client_id = 0 AND home = 1";
     } else {
         $query = "SELECT template FROM #__templates_menu WHERE client_id = 0 AND menuid = 0";
     }
     $db->setQuery($query);
     $template = $db->loadResult();
     $templatePath = JPATH_SITE . '/templates/' . $template . '/html/jw_allvideos';
     if (JFolder::exists($templatePath)) {
         $templateFolders = JFolder::folders($templatePath);
         $folders = @array_merge($templateFolders, $plgTemplatesFolders);
         $folders = @array_unique($folders);
     } else {
         $folders = $plgTemplatesFolders;
     }
     sort($folders);
     $options = array();
     foreach ($folders as $folder) {
         $options[] = JHTML::_('select.option', $folder, $folder);
     }
     $fieldName = version_compare(JVERSION, '1.6', 'ge') ? $name : $control_name . '[' . $name . ']';
     return JHTML::_('select.genericlist', $options, $fieldName, '', 'value', 'text', $value);
 }
开发者ID:VierlingMt,项目名称:joomla-3.x,代码行数:29,代码来源:template.php


示例4: fetchElement

 function fetchElement($name, $value, &$node, $control_name)
 {
     jimport('joomla.filesystem.folder');
     // path to images directory
     $path = JPATH_ROOT . DS . $node->attributes('directory');
     $filter = $node->attributes('filter');
     $exclude = $node->attributes('exclude');
     $folders = JFolder::folders($path, $filter);
     $options = array();
     foreach ($folders as $folder) {
         if ($exclude) {
             if (preg_match(chr(1) . $exclude . chr(1), $folder)) {
                 continue;
             }
         }
         $options[] = JHTML::_('select.option', $folder, $folder);
     }
     if (!$node->attributes('hide_none')) {
         array_unshift($options, JHTML::_('select.option', '-1', '- ' . JText::_('Do not use') . ' -'));
     }
     if (!$node->attributes('hide_default')) {
         array_unshift($options, JHTML::_('select.option', '', '- ' . JText::_('Use default') . ' -'));
     }
     return JHTML::_('select.genericlist', $options, '' . $control_name . '[' . $name . ']', 'class="inputbox"', 'value', 'text', $value, $control_name . $name);
 }
开发者ID:jicheng17,项目名称:comanova,代码行数:25,代码来源:folderlist.php


示例5: postflight

 public function postflight($type, $parent)
 {
     // Clear Joomla system cache.
     /** @var JCache|JCacheController $cache */
     $cache = JFactory::getCache();
     $cache->clean('_system');
     // Clear Gantry5 cache.
     $path = JFactory::getConfig()->get('cache_path', JPATH_SITE . '/cache') . '/gantry5';
     if (is_dir($path)) {
         JFolder::delete($path);
     }
     // Make sure that PHP has the latest data of the files.
     clearstatcache();
     // Remove all compiled files from opcode cache.
     if (function_exists('opcache_reset')) {
         @opcache_reset();
     } elseif (function_exists('apc_clear_cache')) {
         @apc_clear_cache();
     }
     if ($type == 'uninstall') {
         return true;
     }
     /** @var JInstallerAdapter $parent */
     $manifest = $parent->getManifest();
     // Enable and lock extensions to prevent uninstalling them individually.
     $this->prepareExtensions($manifest, 1);
     // Make sure that all file formats used by Gantry 5 are editable from template manager.
     $this->adjustTemplateSettings();
     return true;
 }
开发者ID:legutierr,项目名称:gantry5,代码行数:30,代码来源:install.php


示例6: display

	function display ($tpl = null) {

		// Load the helper(s)


		jimport('joomla.filesystem.file');
		$config = JFactory::getConfig();
		$log_path = $config->get('log_path', VMPATH_ROOT . "/log");
		$layoutName = vRequest::getCmd('layout', 'default');
		VmConfig::loadJLang('com_virtuemart_log');

		if ($layoutName == 'edit') {
			$logFile = vRequest::getString('logfile', '');
			$this->SetViewTitle('LOG', $logFile);
			$fileContent = file_get_contents($log_path . DS . $logFile);
			$fileContentByLine = explode("\n", $fileContent);

			$this->assignRef('fileContentByLine', $fileContentByLine);
			JToolBarHelper::cancel();

		} else {
			if(!class_exists('JFolder')) require(VMPATH_LIBS.DS.'joomla'.DS.'filesystem'.DS.'folder.php');

			$logFiles = JFolder::files($log_path, $filter = '.', true, false, array('index.html'));

			$this->SetViewTitle('LOG');
			$this->assignRef('logFiles', $logFiles);
			$this->assignRef('path', $log_path);
		}

		parent::display($tpl);
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:32,代码来源:view.html.php


示例7: checkFolderExist

function checkFolderExist($folderLocation)
{
    if (JFolder::exists($folderLocation)) {
        return true;
    }
    return false;
}
开发者ID:SMARTRESPONSOR,项目名称:SMARTRESPONSOR,代码行数:7,代码来源:azrul.php


示例8: getRankspaths

 public function getRankspaths()
 {
     $template = KunenaFactory::getTemplate();
     $selected = $this->getRank();
     $rankpath = $template->getRankPath();
     $files1 = (array) JFolder::Files(JPATH_SITE . '/' . $rankpath, false, false, false, array('index.php', 'index.html'));
     $files1 = (array) array_flip($files1);
     foreach ($files1 as $key => &$path) {
         $path = $rankpath . $key;
     }
     $rankpath = 'media/kunena/ranks/';
     $files2 = (array) JFolder::Files(JPATH_SITE . '/' . $rankpath, false, false, false, array('index.php', 'index.html'));
     $files2 = (array) array_flip($files2);
     foreach ($files2 as $key => &$path) {
         $path = $rankpath . $key;
     }
     $rank_images = $files1 + $files2;
     ksort($rank_images);
     $rank_list = array();
     foreach ($rank_images as $file => $path) {
         $rank_list[] = JHtml::_('select.option', $path, $file);
     }
     $list = JHtml::_('select.genericlist', $rank_list, 'rank_image', 'class="inputbox" onchange="update_rank(this.options[selectedIndex].value);" onmousemove="update_rank(this.options[selectedIndex].value);"', 'value', 'text', isset($selected->rank_image) ? $rank_images[$selected->rank_image] : '');
     return $list;
 }
开发者ID:madcsaba,项目名称:li-de,代码行数:25,代码来源:rank.php


示例9: getStyles

 function getStyles()
 {
     jimport('joomla.filesystem.folder');
     jimport('joomla.filesystem.file');
     wfimport('admin.helpers.extension');
     $view = JRequest::getCmd('view', 'cpanel');
     $component = WFExtensionHelper::getComponent();
     $params = new WFParameter($component->params);
     $theme = $params->get('preferences.theme', 'jce');
     $site_path = JPATH_COMPONENT_SITE . DS . 'editor' . DS . 'libraries' . DS . 'css';
     $admin_path = JPATH_COMPONENT_ADMINISTRATOR . DS . 'media' . DS . 'css';
     // Load styles
     $styles = array();
     if (!JFolder::exists($site_path . DS . 'jquery' . DS . $theme)) {
         $theme = 'jce';
     }
     if (JFolder::exists($site_path . DS . 'jquery' . DS . $theme)) {
         $files = JFolder::files($site_path . DS . 'jquery' . DS . $theme, '\\.css');
         foreach ($files as $file) {
             $styles[] = 'components/com_jce/editor/libraries/css/jquery/' . $theme . '/' . $file;
         }
     }
     // admin global css
     $styles = array_merge($styles, array('administrator/components/com_jce/media/css/global.css'));
     if (JFile::exists($admin_path . DS . $view . '.css')) {
         $styles[] = 'administrator/components/com_jce/media/css/' . $view . '.css';
     }
     return $styles;
 }
开发者ID:omarmm,项目名称:MangLuoiBDS,代码行数:29,代码来源:system.php


示例10: getOptions

 protected function getOptions()
 {
     // if VM is not installed
     if (!JFolder::exists(JPATH_ROOT . '/administrator/components/com_virtuemart') or !class_exists('ShopFunctions')) {
         // add the root item
         $option = new stdClass();
         $option->text = JText::_('MOD_ACCORDEONCK_VIRTUEMART_NOTFOUND');
         $option->value = '0';
         $options[] = $option;
         // Merge any additional options in the XML definition.
         $options = array_merge(parent::getOptions(), $options);
         return $options;
     }
     VmConfig::loadConfig();
     $categorylist = ShopFunctions::categoryListTree();
     // $categorylist = 'testced';
     $categorylist = trim($categorylist, '</option>');
     $categorylist = explode("</option><option", $categorylist);
     // add the root item
     $option = new stdClass();
     $option->text = JText::_('MOD_ACCORDEONCK_VIRTUEMART_ROOTNODE');
     $option->value = '0';
     $options[] = $option;
     foreach ($categorylist as $cat) {
         $option = new stdClass();
         $text = explode(">", $cat);
         $option->text = trim($text[1]);
         $option->value = strval(trim(trim(trim($text[0]), '"'), 'value="'));
         $options[] = $option;
     }
     // Merge any additional options in the XML definition.
     $options = array_merge(parent::getOptions(), $options);
     return $options;
 }
开发者ID:bobozhangshao,项目名称:HeartCare,代码行数:34,代码来源:ckvmcategory.php


示例11: getItems

 public function getItems()
 {
     $searchpath = JPATH_ROOT . DIRECTORY_SEPARATOR . "components/com_content";
     $items[] = JFolder::files($searchpath);
     $items[] = JFolder::listFolderTree($searchpath, '');
     return $items;
 }
开发者ID:Caojunkai,项目名称:arcticfox,代码行数:7,代码来源:files.php


示例12: fetchElement

 /**
  * Fetch a filelist element
  *
  * @param   string       $name          Element name
  * @param   string       $value         Element value
  * @param   JXMLElement  &$node         JXMLElement node object containing the settings for the element
  * @param   string       $control_name  Control name
  *
  * @return  string
  */
 public function fetchElement($name, $value, &$node, $control_name)
 {
     jimport('joomla.filesystem.folder');
     jimport('joomla.filesystem.file');
     // path to images directory
     $path = JPATH_ROOT . '/' . (string) $node->attributes()->directory;
     $filter = (string) $node->attributes()->filter;
     $exclude = (string) $node->attributes()->exclude;
     $stripExt = (string) $node->attributes()->stripext;
     $files = JFolder::files($path, $filter);
     $options = array();
     if (!(string) $node->attributes()->hide_none) {
         $options[] = JHtml::_('select.option', '-1', JText::_('JOPTION_DO_NOT_USE'));
     }
     if (!(string) $node->attributes()->hide_default) {
         $options[] = JHtml::_('select.option', '', JText::_('JOPTION_USE_DEFAULT'));
     }
     if (is_array($files)) {
         foreach ($files as $file) {
             if ($exclude) {
                 if (preg_match(chr(1) . $exclude . chr(1), $file)) {
                     continue;
                 }
             }
             if ($stripExt) {
                 $file = JFile::stripExt($file);
             }
             $options[] = JHtml::_('select.option', $file, $file);
         }
     }
     return JHtml::_('select.genericlist', $options, $control_name . '[' . $name . ']', array('id' => 'param' . $name, 'list.attr' => 'class="inputbox"', 'list.select' => (string) $value));
 }
开发者ID:lyrasoft,项目名称:lyrasoft.github.io,代码行数:42,代码来源:filelist.php


示例13: _generateTree

 function _generateTree()
 {
     $path = JPATH_SITE . '/templates/' . $this->item->name;
     $folders = JFolder::listFolderTree($path, '.', 5);
     $i = 0;
     $path = array();
     $prev = 0;
     $tree = '';
     foreach ($folders as $k => $f) {
         $p = $f['parent'];
         if ($p > $prev) {
             $tree .= '<ul><li id="phtml_' . $f['id'] . '">' . '<a href="#">' . $f['name'] . '</a>';
             $path[$i++] = $prev;
         } else {
             if ($p < $prev) {
                 for ($j = $i - 1; $j >= 0; $j--) {
                     $tree .= '</li></ul>';
                     $last = $path[$j];
                     unset($path[$j]);
                     $i--;
                     if ($p == $last) {
                         break;
                     }
                 }
             }
             $tree .= '</li><li id="phtml_' . $f['id'] . '">' . '<a href="#">' . $f['name'] . '</a>';
         }
         $prev = $p;
         //$folders[$k]['files']	=	JFolder::files( $f['fullname'], '.', false, true );
     }
     $tree = '<ul><li id="phtml_0" class="jstree-open jstree-last">' . '<a href="#" class="jstree-clicked">' . './' . '</a><ul>' . substr($tree, 5) . '</li></ul></li></ul>';
     return $tree;
 }
开发者ID:hamby,项目名称:SEBLOD,代码行数:33,代码来源:view.html.php


示例14: getExtensionVersion

	public static function getExtensionVersion($c = 'phocadownload') {
		$folder = JPATH_ADMINISTRATOR .DS. 'components'.DS.'com_'.$c;
		if (JFolder::exists($folder)) {
			$xmlFilesInDir = JFolder::files($folder, '.xml$');
		} else {
			$folder = JPATH_SITE .DS. 'components'.DS.'com_'.$c;
			if (JFolder::exists($folder)) {
				$xmlFilesInDir = JFolder::files($folder, '.xml$');
			} else {
				$xmlFilesInDir = null;
			}
		}

		$xml_items = '';
		if (count($xmlFilesInDir))
		{
			foreach ($xmlFilesInDir as $xmlfile)
			{
				if ($data = JApplicationHelper::parseXMLInstallFile($folder.DS.$xmlfile)) {
					foreach($data as $key => $value) {
						$xml_items[$key] = $value;
					}
				}
			}
		}
		
		if (isset($xml_items['version']) && $xml_items['version'] != '' ) {
			return $xml_items['version'];
		} else {
			return '';
		}
	}
开发者ID:BillVGN,项目名称:PortalPRP,代码行数:32,代码来源:utils.php


示例15: Joom_AdminMigration

 /**
  * Constructor of class Joom_AdminMigration
  *
  * @return Joom_AdminMigration
  */
 function Joom_AdminMigration()
 {
     jimport('joomla.filesystem.file');
     require_once JPATH_COMPONENT . DS . 'adminclasses' . DS . 'admin.migration.class.php';
     $migration = Joom_mosGetParam('migration', '');
     $action = Joom_mosGetParam('migration_action', 'check');
     if ($migration != '') {
         if (JFile::exists(JPATH_COMPONENT . DS . 'adminclasses' . DS . 'admin.migrate' . $migration . '.class.php')) {
             require_once JPATH_COMPONENT . DS . 'adminclasses' . DS . 'admin.migrate' . $migration . '.class.php';
             $classname = 'Joom_Migrate_' . $migration;
             $migrateclass = new $classname($action);
         }
     }
     //check if not in running migration
     if ($action != 'start' && $action != 'continue') {
         //show migration manager
         require_once JPATH_COMPONENT . DS . 'includes' . DS . 'html' . DS . 'admin.migration.html.php';
         $files = JFolder::files(JPATH_COMPONENT . DS . 'adminclasses' . DS, '.php$');
         $other = array('admin.migration.class.php', 'admin.upload.class.php', 'admin.tabs.class.php');
         foreach ($files as $key => $file) {
             if (in_array($file, $other)) {
                 unset($files[$key]);
             }
         }
         $htmladminmigration = new HTML_Joom_AdminMigration($files);
     }
 }
开发者ID:planetangel,项目名称:Planet-Angel-Website,代码行数:32,代码来源:admin.migration.php


示例16: getOptions

 /**
  * Method to get the field options.
  *
  * @return  array  The field option objects.
  *
  * @since   1.6
  */
 protected function getOptions()
 {
     $lang = JFactory::getLanguage();
     $options = array();
     $type = $this->form->getValue('db_type');
     // Some database drivers share DDLs; point these drivers to the correct parent
     if ($type == 'mysqli') {
         $type = 'mysql';
     } elseif ($type == 'sqlsrv') {
         $type = 'sqlazure';
     }
     // Get a list of files in the search path with the given filter.
     $files = JFolder::files(JPATH_INSTALLATION . '/sql/' . $type, '^sample.*\\.sql$');
     // Add option to not install sample data.
     $options[] = JHtml::_('select.option', '', JHtml::_('tooltip', JText::_('INSTL_SITE_INSTALL_SAMPLE_NONE_DESC'), '', '', JText::_('INSTL_SITE_INSTALL_SAMPLE_NONE')));
     // Build the options list from the list of files.
     if (is_array($files)) {
         foreach ($files as $file) {
             $options[] = JHtml::_('select.option', $file, $lang->hasKey($key = 'INSTL_' . ($file = JFile::stripExt($file)) . '_SET') ? JHtml::_('tooltip', JText::_('INSTL_' . strtoupper($file = JFile::stripExt($file)) . '_SET_DESC'), '', '', JText::_('INSTL_' . ($file = JFile::stripExt($file)) . '_SET')) : $file);
         }
     }
     // Merge any additional options in the XML definition.
     $options = array_merge(parent::getOptions(), $options);
     return $options;
 }
开发者ID:shoffmann52,项目名称:install-from-web-server,代码行数:32,代码来源:sample.php


示例17: loadFromFile

 /**
  * Load properties from a given file properties
  * 
  * @param $file string The filename to scan
  * @param $contents boolean Load the contents
  * @param $loadId boolean Load id from database
  * @return boolean result
  */
 function loadFromFile($file, $contents = false, $loadId = false)
 {
     if (!JFile::exists($file) && !JFolder::exists($file . DS)) {
         return false;
     }
     $info = @stat($file);
     $this->scandate = $this->_db->getNullDate();
     $this->filename = basename($file);
     $this->fullpath = $file;
     $this->permission = fileperms($file) & 0777;
     $this->size = filesize($file);
     $ctime =& JFactory::getDate($info['ctime']);
     $mtime =& JFactory::getDate($info['mtime']);
     $this->ctime = $ctime->toMySQL();
     $this->mtime = $mtime->toMySQL();
     $this->uid = $info['uid'];
     $this->gid = $info['gid'];
     $this->type = '';
     if (is_file($file)) {
         $this->type = 'file';
         $this->hash_md = md5_file($file);
         if ($contents) {
             $f = new JD_File($file);
             $this->contents = $f->read();
         }
     } elseif (is_dir($file)) {
         $this->type = 'dir';
     }
     if ($loadId) {
         $this->_db->setQuery('SELECT id FROM #__jdefender_filesystem WHERE fullpath = ' . $this->fullpath . ' LIMIT 1');
         $this->id = $this->_db->loadResult();
     }
     return true;
 }
开发者ID:alphashuro,项目名称:audeprac,代码行数:42,代码来源:filesystem.php


示例18: getTemplates

 public function getTemplates()
 {
     $items = array();
     $tpl_path = COM_TZ_PORTFOLIO_PLUS_PATH_SITE . DIRECTORY_SEPARATOR . 'templates';
     if (!JFolder::exists($tpl_path)) {
         return false;
     }
     if ($folders = JFolder::folders($tpl_path)) {
         if (count($folders)) {
             foreach ($folders as $i => $folder) {
                 $xmlFile = $tpl_path . DIRECTORY_SEPARATOR . $folder . DIRECTORY_SEPARATOR . 'template.xml';
                 if (JFile::exists($xmlFile)) {
                     $installer = JInstaller::getInstance($tpl_path . DIRECTORY_SEPARATOR . $folder);
                     if ($manifest = $installer->isManifest($xmlFile)) {
                         $lang = JFactory::getLanguage();
                         $lang->load('tpl_' . (string) $manifest->name, $tpl_path . DIRECTORY_SEPARATOR . $folder);
                         $item = new stdClass();
                         $item->id = $i;
                         $item->name = (string) $manifest->name;
                         $item->type = (string) $manifest->type;
                         $item->version = (string) $manifest->version;
                         $item->creationDate = (string) $manifest->creationDate;
                         $item->author = (string) $manifest->author;
                         $item->authorEmail = (string) $manifest->authorEmail;
                         $item->description = JText::_((string) $manifest->description);
                         $items[] = $item;
                     }
                 }
             }
         }
     }
     return $items;
     //        var_dump(JFolder::folders($tpl_path)); die();
 }
开发者ID:templaza,项目名称:tz_portfolio_plus,代码行数:34,代码来源:templates.php


示例19: array

 public function &getAggregators()
 {
     static $aggregators;
     if (!isset($aggregators)) {
         $aggregators = array();
     }
     // get the aggregator format for this instance
     $format = $this->get('format');
     if (empty($aggregators[$format])) {
         jimport('joomla.filesystem.folder');
         // get a plugin instance
         $plugin = WFEditorPlugin::getInstance();
         $aggregators[$format] = array();
         $path = WF_EDITOR_EXTENSIONS . '/aggregator';
         $files = JFolder::files($path, '\\.php$', false, true);
         foreach ($files as $file) {
             require_once $file;
             $name = basename($file, '.php');
             $classname = 'WFAggregatorExtension_' . ucfirst($name);
             // only load if enabled
             if (class_exists($classname)) {
                 $aggregator = new $classname();
                 // check if enabled
                 if ($aggregator->isEnabled()) {
                     if ($aggregator->get('format') == $format) {
                         $aggregator->set('name', $name);
                         $aggregator->set('title', 'WF_AGGREGATOR_' . strtoupper($name) . '_TITLE');
                         $aggregators[$format][] = $aggregator;
                     }
                 }
             }
         }
     }
     return $aggregators[$format];
 }
开发者ID:DanyCan,项目名称:wisten.github.io,代码行数:35,代码来源:aggregator.php


示例20: compileLess

 public function compileLess($inputFile, $outputFile)
 {
     if (!class_exists('lessc')) {
         require_once KPATH_FRAMEWORK . '/external/lessc/lessc.php';
     }
     // Load the cache.
     $cacheDir = JPATH_CACHE . '/kunena';
     if (!is_dir($cacheDir)) {
         JFolder::create($cacheDir);
     }
     $cacheFile = "{$cacheDir}/kunena.bootstrap.{$inputFile}.cache";
     if (file_exists($cacheFile)) {
         $cache = unserialize(file_get_contents($cacheFile));
     } else {
         $cache = KPATH_MEDIA . '/less/bootstrap/' . $inputFile;
     }
     $outputFile = KPATH_MEDIA . '/css/joomla25/' . $outputFile;
     $less = new lessc();
     //$less->setVariables($this->style_variables);
     $newCache = $less->cachedCompile($cache);
     if (!is_array($cache) || $newCache['updated'] > $cache['updated'] || !is_file($outputFile)) {
         $cache = serialize($newCache);
         JFile::write($cacheFile, $cache);
         JFile::write($outputFile, $newCache['compiled']);
     }
 }
开发者ID:proyectoseb,项目名称:University,代码行数:26,代码来源:template.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP JForm类代码示例发布时间:2022-05-23
下一篇:
PHP JFilterOutput类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap