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


PHP Zend_Debug::Dump方法代码示例

本文整理汇总了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);
     }
 }
开发者ID:psonify,项目名称:magento-plugin,代码行数:39,代码来源:Wrapper.php

示例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();
 }
开发者ID:sdgdsffdsfff,项目名称:auth-center,代码行数:34,代码来源:Error.php

示例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);
     }
 }
开发者ID:sdis62,项目名称:toolbox,代码行数:11,代码来源:UUID.php

示例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);
 }
开发者ID:netvlies,项目名称:zf,代码行数:10,代码来源:DebugTest.php

示例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);
 }
开发者ID:vinnivinsachi,项目名称:Vincent-DR,代码行数:10,代码来源:TestController.php

示例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));
 }
开发者ID:sdis62,项目名称:toolbox,代码行数:6,代码来源:LibraryTest.php

示例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());
开发者ID:Bobtnt,项目名称:PCG,代码行数:30,代码来源:index.php


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