本文整理汇总了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;
}
示例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;
}