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


PHP VarDumper::dump方法代码示例

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


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

示例1: myVarDump

function myVarDump($param)
{
    echo '<pre>';
    \yii\helpers\VarDumper::dump($param);
    echo '</pre>';
    die;
}
开发者ID:buuug7,项目名称:game4039,代码行数:7,代码来源:shortcuts.php

示例2: dump

 /**
  * @inheritdoc
  */
 public static function dump($var, $exit = 1, $depth = 10, $highlight = true)
 {
     parent::dump($var, $depth, $highlight);
     if ($exit) {
         exit;
     }
 }
开发者ID:tolik505,项目名称:bl,代码行数:10,代码来源:Dump.php

示例3: actionCookie

 public function actionCookie()
 {
     //        Yii::$app->response->format = Response::FORMAT_RAW;
     //        $headers = Yii::$app->response->headers;
     //        $headers->add('Content-type', 'image/gif');
     //        $headers->add('Content-Length', '42');
     //        $headers->add('Cache-Control', 'private, no-cache, no-cache=Set-Cookie, proxy-revalidate');
     //        $headers->add('Expires', 'Wed, 11 Jan 2000 12:59:00 GMT');
     //        $headers->add('Last-Modified', 'Wed, 11 Jan 2006 12:59:00 GMT');
     //        $headers->add('Pragma', 'no-cache');
     //        echo sprintf('%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%', 71, 73, 70, 56, 57, 97, 1, 0, 1, 0, 128, 255, 0, 192, 192, 192, 0, 0, 0, 33, 249, 4, 1, 0, 0, 0, 0, 44, 0, 0, 0, 0, 1, 0, 1, 0, 0, 2, 2, 68, 1, 0, 59);
     $clientCookie = new ClientCookie();
     if ($clientCookie->cookie_id === null) {
         $cookie = new Cookie();
         $cookie->last_activity = $cookie->create_time = date('Y-m-d H:i:s');
         $cookie->save();
         $clientCookie->cookie_id = $cookie->id;
     } else {
         $cookie = Cookie::findOne(['id' => $clientCookie->cookie_id]);
         if ($cookie !== null) {
             $cookie->last_activity = date('Y-m-d H:i:s');
             $cookie->save();
         }
     }
     //        $clientCookie->updateCategory(3, [
     //            'value' => 1
     //        ]);
     $clientCookie->save();
     echo "<pre>";
     VarDumper::dump($clientCookie);
     echo "</pre>";
 }
开发者ID:piotrmus,项目名称:Targematic,代码行数:32,代码来源:TrackingController.php

示例4: testDumpObject

 public function testDumpObject()
 {
     $obj = new \StdClass();
     ob_start();
     VarDumper::dump($obj);
     $this->assertEquals("stdClass#1\n(\n)", ob_get_contents());
     ob_end_clean();
 }
开发者ID:rajanishtimes,项目名称:basicyii,代码行数:8,代码来源:VarDumperTest.php

示例5: resetPassword

 /**
  * Resets password.
  *
  * @return boolean if password was reset.
  */
 public function resetPassword()
 {
     $user = $this->_user;
     VarDumper::dump($user);
     $user->setPassword($this->password);
     $user->removePasswordResetToken();
     return $user->save(false);
 }
开发者ID:efabrikov,项目名称:chomu,代码行数:13,代码来源:ResetPasswordForm.php

示例6: yii

 public function yii($v, $stop = false, $depth = 100)
 {
     echo '<pre style="' . $this->getStyle() . '">';
     YiiVarDumper::dump($v, $depth, true);
     echo '</pre>';
     if ($stop) {
         exit;
     }
 }
开发者ID:Zhanat87,项目名称:alina.test,代码行数:9,代码来源:Debugger.php

示例7: D

function D($object, $exit = false)
{
    VarDumper::dump($object, 20, 1);
    echo '<br />';
    if ($exit) {
        exit;
    }
    return null;
}
开发者ID:ewwgit,项目名称:eptri,代码行数:9,代码来源:Paypalnew.php

示例8: kepco_suc_detail

 public function kepco_suc_detail($job)
 {
     echo $job->workload(), PHP_EOL;
     $workload = Json::decode($job->workload());
     $httpClient = new \GuzzleHttp\Client(['base_uri' => 'http://203.248.44.161', 'cookies' => true, 'headers' => ['User-Agent' => 'Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko', 'Content-Type' => 'application/json', 'X-Requested-With' => 'XMLHttpRequest', 'Accept-Language' => 'ko', 'Accept-Encoding' => 'gzip, deflate', 'DNT' => '1', 'Pragma' => 'no-cache', 'Connection' => 'Keep-Alive', 'Accept' => '*/*', 'Referer' => 'http://203.248.44.161/mdi.do?theme=default', 'X-CSRF-TOKEN' => $this->csrf_token, 'Cookie' => $this->cookie]]);
     $response = $httpClient->request('POST', '/router', ['json' => [['action' => 'smartsuit.ui.etnajs.pro.rfx.sp.OpenInfoDataDetailController', 'method' => 'findOpenInfoDataAttendGrid', 'tid' => 118, 'type' => 'rpc', 'data' => [$workload['id']]], ['action' => 'smartsuit.ui.etnajs.pro.rfx.sp.OpenInfoDataDetailController', 'method' => 'findProposalEvalOpenYn', 'tid' => 119, 'type' => 'rpc', 'data' => [$workload['id']]]]]);
     $body = $response->getBody();
     $json = Json::decode($body);
     VarDumper::dump($json);
 }
开发者ID:didwjdgks,项目名称:kepco,代码行数:10,代码来源:SucController.php

示例9: d

/**
 * Debug function
 * d($var);
 * @param $var
 * @param null $caller
 */
function d($var, $caller = null)
{
    if (!isset($caller)) {
        $tmp_var = debug_backtrace(1);
        $caller = array_shift($tmp_var);
    }
    echo '<code>File: ' . $caller['file'] . ' / Line: ' . $caller['line'] . '</code>';
    echo '<pre>';
    VarDumper::dump($var, 10, true);
    echo '</pre>';
}
开发者ID:baranov-nt,项目名称:some-2,代码行数:17,代码来源:functions.php

示例10: dd

/**
 * Dump and die - Dump as many variables as you want. Infinite parameters.
*/
function dd()
{
    $args = func_get_args();
    foreach ($args as $k => $arg) {
        echo '<fieldset class="debug">
        <legend>' . ($k + 1) . '</legend>';
        VarDumper::dump($arg, 10, true);
        echo '</fieldset>';
    }
    die;
}
开发者ID:ahb360,项目名称:cms,代码行数:14,代码来源:globals.php

示例11: dump

 /**
  * var_dump() wrapper with autoexit
  *
  * @param $var
  * @param bool $isExit
  * @param bool $asString
  * @param int $depth
  * @return string
  */
 public static function dump($var, $isExit = true, $asString = false, $depth = 3)
 {
     if ($asString) {
         return VarDumper::dumpAsString($var, $depth, true);
     } else {
         VarDumper::dump($var, $depth, true);
     }
     if ($isExit) {
         exit;
     }
 }
开发者ID:albertborsos,项目名称:yii2-lib,代码行数:20,代码来源:S.php

示例12: actionAddExam

 public function actionAddExam()
 {
     $model = new \common\models\ExamForm();
     if ($model->load(\Yii::$app->request->post()) && $model->validate()) {
         \yii\helpers\VarDumper::dump(\Yii::$app->request->post(), 10, true);
         die;
         $model->addExam();
         \Yii::$app->session->setFlash('success', 'Exam Added Successfully');
         return $this->redirect(['/exam']);
     }
     return $this->render('add-exam', ['model' => $model]);
 }
开发者ID:rubedkhan2149,项目名称:2149,代码行数:12,代码来源:ExamController.php

示例13: actionTimeouts

 /**
  * Manage the timeouts of the StateMachines
  */
 public function actionTimeouts()
 {
     /** @var SmTimeout[] $timeouts */
     $timeouts = SmTimeout::find()->andWhere(['<=', 'expires_at', new Expression('NOW()')])->all();
     foreach ($timeouts as $timeout) {
         $context = $timeout->transition();
         if ($context->hasException()) {
             // Handle timeout transition failure
             VarDumper::dump($context->getFirstException(), 10);
         }
     }
 }
开发者ID:ptheofan,项目名称:yii2-statemachine,代码行数:15,代码来源:StateMachineController.php

示例14: actionCommit

 public function actionCommit()
 {
     if ($transaction = Transaction::getFromSession()) {
         \yii\helpers\VarDumper::dump($transaction, 11, 1);
         $transaction->setOrgId($this->organization->id);
         if ($transaction->commit()) {
             return $this->render('transaction_success', []);
         } else {
             return $this->render('transaction_error', []);
         }
     }
     return $this->redirect('/transactions');
 }
开发者ID:aversilov,项目名称:prexr,代码行数:13,代码来源:TransactionsController.php

示例15: dump

 /**
  * 打印输出
  * @param type $var
  * @param type $depth
  * @param type $highlight
  * @param type $isDie
  */
 public static function dump($var, $depth = 10, $highlight = true, $isDie = true)
 {
     if ($highlight) {
         parent::dump($var, $depth, $highlight);
     } else {
         echo '<pre>';
         parent::dump($var, $depth, $highlight);
         echo '</pre>';
     }
     if ($isDie === true) {
         die;
     }
 }
开发者ID:liuwz465501235,项目名称:lscms,代码行数:20,代码来源:VarDumper.php


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