當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。