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


PHP xPDO::getDebug方法代码示例

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


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

示例1: uninstall

 /**
  * Uninstall vehicles in the package from the sponsor {@link xPDO} instance.
  *
  * @param array $options Uninstall options to be applied to the process.
  * @return boolean true if the vehicles were successfully uninstalled.
  */
 public function uninstall($options = array())
 {
     $processed = array();
     if (!is_array($options)) {
         $options = array(xPDOTransport::PACKAGE_ACTION => xPDOTransport::ACTION_UNINSTALL);
     } elseif (!isset($options[xPDOTransport::PACKAGE_ACTION])) {
         $options[xPDOTransport::PACKAGE_ACTION] = xPDOTransport::ACTION_UNINSTALL;
     }
     if (!empty($this->vehicles)) {
         $this->_preserved = $this->loadPreserved();
         $vehicleArray = array_reverse($this->vehicles, true);
         foreach ($vehicleArray as $vIndex => $vehicleMeta) {
             $vOptions = array_merge($options, $vehicleMeta);
             if ($this->xpdo->getDebug() === true) {
                 $this->xpdo->log(xPDO::LOG_LEVEL_DEBUG, "Removing Vehicle: " . print_r($vOptions, true));
             }
             if ($vehicle = $this->get($vehicleMeta['filename'], $vOptions)) {
                 $processed[$vehicleMeta['guid']] = $vehicle->uninstall($this, $vOptions);
             } else {
                 $this->xpdo->log(xPDO::LOG_LEVEL_ERROR, 'Could not load vehicle: ' . print_r($vOptions, true));
             }
         }
     } else {
         $this->xpdo->log(xPDO::LOG_LEVEL_WARN, 'No vehicles are defined in the transport package (' . $this->signature . ') for removal');
     }
     $uninstalled = array_search(false, $processed, true) === false;
     return $uninstalled;
 }
开发者ID:Kleist,项目名称:xPDO,代码行数:34,代码来源:xpdotransport.class.php

示例2: _getPHPType

 /**
  * Gets the php data type for the specified field.
  *
  * @access protected
  * @param string $key The field name to get the data type for.
  * @return string The PHP data type of the field.
  */
 protected function _getPHPType($key) {
     $type= 'string';
     if (isset ($this->_fieldMeta[$key]['phptype'])) {
         $type= strtolower($this->_fieldMeta[$key]['phptype']);
     } elseif ($this->xpdo->getDebug() === true) {
         $this->xpdo->log(xPDO::LOG_LEVEL_DEBUG, "xPDOObject::_getPHPType() -- No PHP type specified for field ({$key}), using `string`.");
     }
     return $type;
 }
开发者ID:ncrossland,项目名称:revolution,代码行数:16,代码来源:xpdoobject.class.php


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