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


PHP JTable::toXML方法代码示例

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


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

示例1: toXML

 /**
  * Converts record to XML
  *
  * @param     boolean    $mapKeysToText    Map foreign keys to text values
  * @return    string                       Record in XML format
  */
 public function toXML($mapKeysToText = false)
 {
     $db = JFactory::getDbo();
     if ($mapKeysToText) {
         $query = 'SELECT name' . ' FROM #__users' . ' WHERE id = ' . (int) $this->user_id;
         $db->setQuery($query);
         $this->user_name = $db->loadResult();
     }
     return parent::toXML($mapKeysToText);
 }
开发者ID:johngrange,项目名称:wookeyholeweb,代码行数:16,代码来源:userref.php

示例2: toXML

 /**
  * Converts record to XML
  *
  * @param   boolean  $mapKeysToText  Map foreign keys to text values
  *
  * @return  string  Record in XML format
  *
  * @since   11.1
  * @deprecated  12.1
  * @codeCoverageIgnore
  */
 public function toXML($mapKeysToText = false)
 {
     // Deprecation warning.
     JLog::add('JTableContent::toXML() is deprecated.', JLog::WARNING, 'deprecated');
     if ($mapKeysToText) {
         // Get the JDatabaseQuery object
         $query = $this->_db->getQuery(true);
         $query->select($this->_db->quoteName('name'));
         $query->from($this->_db->quoteName('#__categories'));
         $query->where($this->_db->quoteName('id') . ' = ' . (int) $this->catid);
         $this->_db->setQuery($query);
         $this->catid = $this->_db->loadResult();
         $query->clear();
         $query->select($this->_db->quoteName('name'));
         $query->from($this->_db->quoteName('#__users'));
         $query->where($this->_db->quoteName('id') . ' = ' . (int) $this->created_by);
         $this->_db->setQuery($query);
         $this->created_by = $this->_db->loadResult();
     }
     return parent::toXML($mapKeysToText);
 }
开发者ID:NavaINT1876,项目名称:ccustoms,代码行数:32,代码来源:content.php

示例3: toXML

 /**
  * Converts record to XML
  * @param boolean Map foreign keys to text values
  */
 function toXML($mapKeysToText = false)
 {
     $db =& JFactory::getDBO();
     if ($mapKeysToText) {
         $query = 'SELECT name' . ' FROM #__sections' . ' WHERE id = ' . (int) $this->sectionid;
         $db->setQuery($query);
         $this->sectionid = $db->loadResult();
         $query = 'SELECT name' . ' FROM #__categories' . ' WHERE id = ' . (int) $this->catid;
         $db->setQuery($query);
         $this->catid = $db->loadResult();
         $query = 'SELECT name' . ' FROM #__users' . ' WHERE id = ' . (int) $this->created_by;
         $db->setQuery($query);
         $this->created_by = $db->loadResult();
     }
     return parent::toXML($mapKeysToText);
 }
开发者ID:omarmm,项目名称:MangLuoiBDS,代码行数:20,代码来源:content.php


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