本文整理汇总了PHP中Zend_Debug::Dump方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Debug::Dump方法的具体用法?PHP Zend_Debug::Dump怎么用?PHP Zend_Debug::Dump使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Debug
的用法示例。
在下文中一共展示了Zend_Debug::Dump方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: callApi
/**
* CallApi
*
* @param endPoint $endPoint partial end point url
* @param params $params to be passed to api
* @return array response from api or general error form this class
*/
public function callApi($endPoint, array $params)
{
/* check if end point is available prior to make request */
if (!in_array($endPoint, $this->endPoints)) {
if (Mage::getSingleton("core/session")->getPsonifyDebug() == 'true') {
echo "<br/><h1>End Point</h1><br/>";
echo $endPoint;
echo "<br/><h1>Sent Params</h1><br/>";
Zend_Debug::dump($params);
echo "<br/><h1>Received Result</h1><br/>";
Zend_Debug::Dump($this->getValidationErrorResponse('End point is not valid'));
}
return $this->getValidationErrorResponse('End point is not valid');
} else {
$params["token"] = isset($params["token"]) ? $params["token"] : $params["data"]["token"];
/* initializing curl */
$ch = curl_init();
$curlConfig = array(CURLOPT_URL => $this->apiUrl . '/' . $endPoint, CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_POSTFIELDS => json_encode($params));
curl_setopt_array($ch, $curlConfig);
$result = curl_exec($ch);
if (Mage::getSingleton("core/session")->getPsonifyDebug() == 'true') {
echo "<br/><h1>End Point</h1><br/>";
echo $endPoint;
echo "<br/><h1>Sent Params</h1><br/>";
Zend_Debug::dump($params);
echo "<br/><h1>Recieved Result</h1><br/>";
Zend_Debug::Dump($result);
}
curl_close($ch);
return json_decode($result);
}
}
示例2: errorAction
public function errorAction()
{
$errors = $this->_getParam('error_handler');
if (!$this->_config->environment->production) {
echo "<br /><br />";
Zend_Debug::Dump($errors);
}
$exceptionClass = get_class($errors->exception);
Zend_Registry::get('logger')->log("Exception {$exceptionClass}\nMessage: " . $errors->exception->getMessage() . "\nStack: \n" . print_r($errors->exception->getTraceAsString(), true), Zend_Log::ERR);
switch ($exceptionClass) {
case 'Monkeys_BadUrlException':
$this->getResponse()->setRawHeader('HTTP/1.1 404 Not Found');
$this->view->message = $this->_getTranslationForException($exceptionClass);
break;
case 'Monkeys_AccessDeniedException':
$this->getResponse()->setRawHeader('HTTP/1.1 401 Unauthorized');
$this->view->message = $this->_getTranslationForException($exceptionClass);
break;
default:
$this->view->message = get_class($errors->exception) . '<br />' . $errors->exception->getMessage();
if (!$this->_config->environment->production) {
$this->view->trace = $errors->exception->getTraceAsString();
} else {
if ($this->_config->email->adminemail) {
$mail = self::getMail($errors->exception, $this->user, $errors);
$mail->send();
$this->view->message .= "<br />\n";
$this->view->message .= 'The system administrator has been notified.';
}
}
break;
}
$this->getResponse()->clearBody();
}
示例3: convertToDatabaseValue
/**
* {@inheritdoc}
*/
public function convertToDatabaseValue($value, Doctrine\DBAL\Platforms\AbstractPlatform $platform)
{
if ($value !== null) {
Zend_Debug::Dump(pack('H*', str_replace('-', '', $value)));
return pack('H*', str_replace('-', '', $value));
// return "0x" . str_replace('-', '', $value);
}
}
示例4: testDebugDumpLabel
public function testDebugDumpLabel()
{
Zend_Debug::setSapi('cli');
$data = 'string';
$label = 'LABEL';
$result = Zend_Debug::Dump($data, $label, false);
$result = str_replace(array(PHP_EOL, "\n"), '_', $result);
$expected = "_{$label} _string(6) \"string\"__";
$this->assertEquals($expected, $result);
}
示例5: testingvariablesAction
public function testingvariablesAction()
{
$product = new Application_Model_Products_Product();
$productMapper = new $product->_mapperClass();
$product = $productMapper->find(24);
$product->_colors = 'blah';
$product->_images = array('blah');
echo $product->_colors;
Zend_Debug::Dump($product);
}
示例6: testServices
public function testServices()
{
$service = new SDIS62_Service_Module_Generic("http://apps.sdis62.local/admin/api/user");
Zend_Debug::Dump($service->isAuthorized("9", "4eed9098bb09144dd00f431cc3c512031585bb9c"));
// Zend_Debug::Dump($service->getMessagesByFeed("admin", null, 20, 1));
}
示例7: unset
unset($bug);
$bug = new bug($newbugid);
Zend_Debug::Dump($bug->reportedBy->getId());
echo '<hr>';
$group = new groups(1);
echo $group->users->count();
//Zend_Debug::Dump($group->users);
echo '<hr>';
$u = new user(1);
echo $u->groups_collection->count();
echo '<hr>';
$g = new groups();
$g->save();
$gid = $g->getId();
$g->setName('My new Group ' . $g->getId())->save();
Zend_Debug::Dump($g->getName());
$uc = new user_collection();
$uc->select("SELECT * FROM user");
$i = 0;
foreach ($uc as $u) {
if ($i == 1) {
$u->remove();
}
$i++;
}
$g->user_collection = $uc;
$g->save();
unset($g);
$gg = new groups($gid);
Zend_Debug::Dump($gg->user_collection->count());