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


PHP krumo函数代码示例

本文整理汇总了PHP中krumo函数的典型用法代码示例。如果您正苦于以下问题:PHP krumo函数的具体用法?PHP krumo怎么用?PHP krumo使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: myErrorHandler

function myErrorHandler($errno, $errstr, $errfile, $errline)
{
    //--------------------------------------
    //init var
    //--------------------------------------
    global $arr;
    $chk = array("bool" => false);
    $error = array();
    //--------------------------------------
    $error['type'] = getErrorType($errno);
    $error['message'] = $errstr;
    $error['file'] = $errfile;
    $error['line'] = $errline;
    //--------------------------------------
    if (strpos($_SERVER['SCRIPT_FILENAME'], $_ENV['werm_root']) !== false) {
        if ($errno == E_WARNING && basename($_SERVER['SCRIPT_FILENAME']) != "service.ignore.php") {
            krumo($error);
            die;
        } else {
            if ($errno == E_WARNING) {
                array_push($arr, $error);
                $chk["error"] = $error;
                $chk = json_encode($chk);
                die($chk);
                //array_push($arr, $string);
            } else {
                array_push($arr, $error);
            }
        }
    }
    //--------------------------------------
    return true;
}
开发者ID:awwthentic1234,项目名称:hey,代码行数:33,代码来源:catchError.php

示例2: __construct

 function __construct($filename)
 {
     $size = getimagesize($filename, $info);
     krumo($size);
     $this->hasmeta = isset($info["APP13"]);
     if ($this->hasmeta) {
         $this->meta = iptcparse($info["APP13"]);
     }
     $this->file = $filename;
 }
开发者ID:awwthentic1234,项目名称:hey,代码行数:10,代码来源:Metadata.php

示例3: dpr

 function dpr($input)
 {
     if (function_exists('krumo')) {
         krumo($input);
     } else {
         print '<br /><pre>';
         print_r($input);
         print '<br /></pre>';
     }
 }
开发者ID:nullvariable,项目名称:Raphael-Charts-for-WordPress,代码行数:10,代码来源:raphael-charts.php

示例4: d

/**
 * Alias of krumo::dump(). Formatted data dump. No output in production.
 * You need to download Krumo into "libs" first and declare it in "libraries.config.php"
 *
 * @param mixed $data,...
 */
function d($var)
{
    // Enable Krumo only when debug is present.
    if (\Sifo\Domains::getInstance()->getDebugMode()) {
        require_once ROOT_PATH . '/libs/' . \Sifo\Config::getInstance()->getLibrary('krumo') . '/class.krumo.php';
        krumo($var);
    } else {
        return false;
    }
}
开发者ID:ninodafonte,项目名称:SIFO,代码行数:16,代码来源:Krumo.php

示例5: debug_url

 function debug_url($return = FALSE)
 {
     if ($return) {
         return $this->build_url();
     }
     if (function_exists('dpm') && function_exists('krumo')) {
         dpm($this->build_url());
     } elseif (function_exists('krumo')) {
         krumo($this->build_url());
     } else {
         print '<pre>' . $this->build_url() . '</pre>';
     }
 }
开发者ID:gigikiri,项目名称:BingSearchAPI-1,代码行数:13,代码来源:class.BingSearch.php

示例6: availableKitchens

 public function availableKitchens($userID)
 {
     /*
      * Returns an array of IDs of kitchens that the user has access to.
      */
     $query = $this->em->createQuery('SELECT K.id
       FROM AppBundle:Kitchen K
       INNER JOIN AppBundle:KitchenUser KU WITH KU.kitchenID=K.id
       WHERE KU.userID=:userID')->setParameters(['userID' => $userID]);
     $kitchens = $query->getResult();
     require_once 'krumo/class.krumo.php';
     krumo($kitchens);
     exit;
     return $kitchens;
 }
开发者ID:rasben,项目名称:kitchentory-backend-api,代码行数:15,代码来源:UserHelper.php

示例7: testFormSubmit

 public function testFormSubmit()
 {
     $new_field = magic_form_field_text::factory($this->input_default_name, $this->input_default_label);
     $this->magic_form->add_field($new_field);
     $this->magic_form->add_field(magic_form_field_submit::factory('submit', 'Submit'));
     // This is our submit handler.
     $this->magic_form->submit(function (magic_form $form) {
         require_once drupal_get_path("module", "devel") . "/krumo/class.krumo.php";
         krumo($form->get_fields());
         drupal_set_message("Submit happened in form {$form->magic_form_id} / {$form->form_id}");
     });
     $html = $this->magic_form->__toString();
     //Get HTML Dom
     $dom = str_get_html($html);
     $form = $dom->find("//form")[0];
     //Find Submit Button
     $test_submit_button = $form->find("button[name=submit]")[0];
     //Check Submit Button
     $this->assertEquals("submit", $test_submit_button->attr['id'], "Check ID Submit");
     $this->assertEquals("submit", $test_submit_button->attr['name'], "Check Name Submit");
 }
开发者ID:matthewbaggett,项目名称:drupal_magic_forms,代码行数:21,代码来源:FormTest.php

示例8: codiad_CFG

 public function codiad_CFG($hash)
 {
     $dir_relative = GlobalMas::$filesPath_relative . $hash . "/";
     $dir = GlobalMas::$filesPath_absolute . $hash . "/";
     //-----------------------------------------------------
     if (!file_exists($dir . "codiad")) {
         Archive::extract(GlobalMas::$filesPath_absolute . "/codiad.zip", $dir);
         //-----------------------------------------------------
         $config_contents = FileFolder::file_get_contents($dir . "codiad/config.php");
         $config_contents = str_replace("{BASE_PATH}", $dir . "codiad", $config_contents);
         $config_contents = str_replace("{BASE_URL}", GenFun::get_full_url($dir . "codiad"), $config_contents);
         FileFolder::file_put_contents($dir . "codiad/config.php", $config_contents);
         //---------------------------------------------------------
         exec("ln -s " . $dir . "compile " . $dir . "codiad/workspace/compile" . " 2>&1", $output);
         exec("ln -s " . $dir . " " . $dir . "codiad/workspace/root" . " 2>&1", $output);
         //---------------------------------------------------------
         if (strpos(join($output), "Errno::") !== false) {
             krumo($output);
             die;
         }
     }
 }
开发者ID:awwthentic1234,项目名称:hey,代码行数:22,代码来源:BannerHub.php

示例9: insertHistory

 function insertHistory($aData)
 {
     $this->setAppUid($aData['APP_UID']);
     $this->setDelIndex($aData['DEL_INDEX']);
     $this->setProUid($aData['PRO_UID']);
     $this->setTasUid($aData['TAS_UID']);
     $this->setDynUid($aData['CURRENT_DYNAFORM']);
     $this->setUsrUid($aData['USER_UID']);
     $this->setAppStatus($aData['APP_STATUS']);
     $this->setHistoryDate($aData['APP_UPDATE_DATE']);
     $this->setHistoryData($aData['APP_DATA']);
     if ($this->validate()) {
         $res = $this->save();
     } else {
         // Something went wrong. We can now get the validationFailures and handle them.
         $msg = '';
         $validationFailuresArray = $this->getValidationFailures();
         foreach ($validationFailuresArray as $objValidationFailure) {
             $msg .= $objValidationFailure->getMessage() . "<br/>";
         }
         krumo($msg);
         //return array ( 'codError' => -100, 'rowsAffected' => 0, 'message' => $msg );
     }
 }
开发者ID:nshong,项目名称:processmaker,代码行数:24,代码来源:AppHistory.php

示例10: getNextAssignedUser

 function getNextAssignedUser($tasInfo)
 {
     $oUser = new Users();
     $nextAssignedTask = $tasInfo['NEXT_TASK'];
     $lastAssigned = $tasInfo['NEXT_TASK']['TAS_LAST_ASSIGNED'];
     $sTasUid = $tasInfo['NEXT_TASK']['TAS_UID'];
     // to do: we can increase the LOCATION by COUNTRY, STATE and LOCATION
     /* Verify if the next Task is set with the option "TAS_ASSIGN_LOCATION == TRUE" */
     $assignLocation = '';
     if ($tasInfo['NEXT_TASK']['TAS_ASSIGN_LOCATION'] == 'TRUE') {
         $oUser->load($tasInfo['USER_UID']);
         krumo($oUser->getUsrLocation());
         //to do: assign for location
         //$assignLocation = " AND USR_LOCATION = " . $oUser->Fields['USR_LOCATION'];
     }
     /* End - Verify if the next Task is set with the option "TAS_ASSIGN_LOCATION == TRUE" */
     $uidUser = '';
     switch ($nextAssignedTask['TAS_ASSIGN_TYPE']) {
         case 'BALANCED':
             $users = $this->getAllUsersFromAnyTask($sTasUid);
             if (is_array($users) && count($users) > 0) {
                 //to do apply any filter like LOCATION assignment
                 $uidUser = $users[0];
                 $i = count($users) - 1;
                 while ($i > 0) {
                     if ($lastAssigned < $users[$i]) {
                         $uidUser = $users[$i];
                     }
                     $i--;
                 }
             } else {
                 throw new Exception(G::LoadTranslation('ID_NO_USERS'));
             }
             $userFields = $this->getUsersFullNameFromArray($uidUser);
             break;
         case 'STATIC_MI':
         case 'CANCEL_MI':
         case 'MANUAL':
             $users = $this->getAllUsersFromAnyTask($sTasUid);
             $userFields = $this->getUsersFullNameFromArray($users);
             break;
         case 'EVALUATE':
             $AppFields = $this->case->loadCase($tasInfo['APP_UID']);
             $variable = str_replace('@@', '', $nextAssignedTask['TAS_ASSIGN_VARIABLE']);
             if (isset($AppFields['APP_DATA'][$variable])) {
                 if ($AppFields['APP_DATA'][$variable] != '') {
                     $value = $AppFields['APP_DATA'][$variable];
                     $userFields = $this->getUsersFullNameFromArray($value);
                     if (is_null($userFields)) {
                         throw new Exception("Task doesn't have a valid user in variable {$variable}.");
                     }
                 } else {
                     throw new Exception("Task doesn't have a valid user in variable {$variable}.");
                 }
             } else {
                 throw new Exception("Task doesn't have a valid user in variable {$variable} or this variable doesn't exist.");
             }
             break;
         case 'REPORT_TO':
             //default error user when the reportsTo is not assigned to that user
             //look for USR_REPORTS_TO to this user
             $userFields['USR_UID'] = '';
             $userFields['USR_FULLNAME'] = 'Current user does not have a valid Reports To user';
             $userFields['USR_USERNAME'] = 'Current user does not have a valid Reports To user';
             $userFields['USR_FIRSTNAME'] = '';
             $userFields['USR_LASTNAME'] = '';
             $userFields['USR_EMAIL'] = '';
             //get the report_to user & its full info
             $useruid = $this->getDenpendentUser($tasInfo['USER_UID']);
             if (isset($useruid) && $useruid != '') {
                 $userFields = $this->getUsersFullNameFromArray($useruid);
             }
             // if there is no report_to user info, throw an exception indicating this
             if (!isset($userFields) || $userFields['USR_UID'] == '') {
                 throw new Exception(G::LoadTranslation('ID_MSJ_REPORSTO'));
                 // "The current user does not have a valid Reports To user.  Please contact administrator.") ) ;
             }
             break;
         case 'SELF_SERVICE':
             //look for USR_REPORTS_TO to this user
             $userFields['USR_UID'] = '';
             $userFields['USR_FULLNAME'] = '<b>' . G::LoadTranslation('ID_UNASSIGNED') . '</b>';
             $userFields['USR_USERNAME'] = '<b>' . G::LoadTranslation('ID_UNASSIGNED') . '</b>';
             $userFields['USR_FIRSTNAME'] = '';
             $userFields['USR_LASTNAME'] = '';
             $userFields['USR_EMAIL'] = '';
             break;
         default:
             throw new Exception('Invalid Task Assignment method for Next Task ');
     }
     return $userFields;
 }
开发者ID:nshong,项目名称:processmaker,代码行数:92,代码来源:class.derivation.php

示例11: krumo

<?php

krumo($collection);
开发者ID:beltofte,项目名称:ding,代码行数:3,代码来源:ting_collection.tpl.php

示例12: jasperReports

<?php

G::LoadClass('jasperReports');
$oJasper = new jasperReports('192.168.0.51', 8080, 'jasperadmin', 'jasperadmin');
$response = $oJasper->ws_list("/");
if (is_object($response) && get_class($response) == 'SOAP_Fault') {
    $errorMessage = $response->getFault()->faultstring;
} else {
    $folders = $oJasper->getResourceDescriptors($response);
}
//$result = $oJasper->ws_put();
krumo($response);
//execute a report
$currentUri = "/reports/samples/Employees";
$result = $oJasper->ws_get($currentUri);
$folders = $oJasper->getResourceDescriptors($result);
if (count($folders) != 1 || $folders[0]['type'] != 'reportUnit') {
    echo "<H1>Invalid RU ({$currentUri})</H1>";
    echo "<pre>{$result}</pre>";
    exit;
}
$reportUnit = $folders[0];
// 2. Prepare the parameters array looking in the $_GET for params
// starting with PARAM_ ...
//
$report_params = array();
$moveToPage = "jasper?uri={$currentUri}";
foreach (array_keys($_GET) as $param_name) {
    if (strncmp("PARAM_", $param_name, 6) == 0) {
        $report_params[substr($param_name, 6)] = $_GET[$param_name];
    }
开发者ID:nshong,项目名称:processmaker,代码行数:31,代码来源:jasper.php

示例13: pm_copy

 /**
  * This function creates a directory
  *
  *
  * @name pm_copy
  *
  * @param string $source
  * @param string $target
  * @return void
  */
 public function pm_copy($source, $target)
 {
     if (!is_dir(dirname($target))) {
         G::mk_dir(dirname($target));
     }
     if (!copy($source, $target)) {
         krumo($source);
         krumo($target);
     }
 }
开发者ID:bqevin,项目名称:processmaker,代码行数:20,代码来源:class.system.php

示例14: Account_v0

//------------------------------------------------------------------------
//php imports
//------------------------------------------------------------------------
//------------------------------------------------------------------------
require_once 'Import.php';
require_once Import::$uber_src_path . "server/werm/services/Account_v0.php";
require_once Import::$uber_src_path . "server/kaloyan/class.krumo.php";
//------------------------------------------------------------------------
Trace::$html = true;
//------------------------------------------------------------------------
$account = new Account_v0();
Trace::register($account, "account");
$account->tblName = Accounts_const::TBL;
$chk = $account->confirm($_GET['hash'], Accounts_const::TBL);
$chk['output'] = Trace::$output;
krumo($chk);
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html> 
<!--===================================================================-->
<!--===================================================================-->
<!--header-->
<!--===================================================================-->
<!--===================================================================-->
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
   <title>Confirmation</title>
   <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;"> 
</head>
开发者ID:awwthentic1234,项目名称:hey,代码行数:31,代码来源:confirmation.php

示例15: rating_bar

function rating_bar($id, $units = '', $static = '')
{
    global $vbulletin;
    $rating_unitwidth = 30;
    require_once './global.php';
    include_once './includes/krumo/class.krumo.php';
    //set some variables
    $userid = $vbulletin->userinfo['userid'];
    if (!$units) {
        $units = 10;
    }
    if (!$static) {
        $static = FALSE;
    }
    // get votes, values, ips for the current rating bar
    $query = $vbulletin->db->query_read("SELECT total_votes, total_value, userids FROM " . TABLE_PREFIX . "goldbrick_rating WHERE id='{$id}' ") or die(" Error: " . mysql_error());
    // insert the id in the DB if it doesn't exist already
    // see: http://www.masugadesign.com/the-lab/scripts/unobtrusive-ajax-star-rating-bar/#comment-121
    if (mysql_num_rows($query) == 0) {
        $sql = "INSERT INTO " . TABLE_PREFIX . "goldbrick_rating (`id`,`total_votes`, `total_value`, `userids`) VALUES ('{$id}', '0', '0', '')";
        $result = $vbulletin->db->query_read($sql);
    }
    $numbers = $vbulletin->db->fetch_array($query);
    if ($numbers['total_votes'] < 1) {
        $count = 0;
    } else {
        $count = $numbers['total_votes'];
        //how many votes total
    }
    $current_rating = $numbers['total_value'];
    //total number of rating added together and stored
    $tense = $count == 1 ? "vote" : "votes";
    //plural form votes/vote
    // determine whether the user has voted, so we know how to draw the ul/li
    $voted = mysql_num_rows($vbulletin->db->query_read("SELECT userids FROM " . TABLE_PREFIX . "goldbrick_rating WHERE userids={$userid} AND id={$id}"));
    // now draw the rating bar
    $rating_width = @number_format($current_rating / $count, 2) * $rating_unitwidth;
    $rating1 = @number_format($current_rating / $count, 1);
    $rating2 = @number_format($current_rating / $count, 2);
    krumo(array_keys(get_defined_vars()), $id, $units, $static, $vbulletin, $userid, $query, $numbers, $sql, $result, $rating1, $tense, $current_rating, $voted);
    if ($static == 'static') {
        $static_rater = array();
        $static_rater[] .= "\n" . '<div class="ratingblock">';
        $static_rater[] .= '<div id="unit_long' . $id . '">';
        $static_rater[] .= '<ul id="unit_ul' . $id . '" class="unit-rating" style="width:' . $rating_unitwidth * $units . 'px;">';
        $static_rater[] .= '<li class="current-rating" style="width:' . $rating_width . 'px;">Currently ' . $rating2 . '/' . $units . '</li>';
        $static_rater[] .= '</ul>';
        $static_rater[] .= '<p class="static">' . $id . '. Rating: <strong> ' . $rating1 . '</strong>/' . $units . ' (' . $count . ' ' . $tense . ' cast) <em>This is \'static\'.</em></p>';
        $static_rater[] .= '</div>';
        $static_rater[] .= '</div>' . "\n\n";
        return join("\n", $static_rater);
    } else {
        $rater = '';
        $rater .= '<div class="ratingblock">';
        $rater .= '<div id="unit_long' . $id . '">';
        $rater .= '  <ul id="unit_ul' . $id . '" class="unit-rating" style="width:' . $rating_unitwidth * $units . 'px;">';
        $rater .= '     <li class="current-rating" style="width:' . $rating_width . 'px;">Currently ' . $rating2 . '/' . $units . '</li>';
        for ($ncount = 1; $ncount <= $units; $ncount++) {
            // loop from 1 to the number of units
            if (!$voted) {
                // if the user hasn't yet voted, draw the voting stars
                $rater .= '<li><a href="goldbrick/db.php?j=' . $ncount . '&amp;q=' . $id . '&amp;t=' . $userid . '&amp;c=' . $units . '" title="' . $ncount . ' out of ' . $units . '" class="r' . $ncount . '-unit rater" rel="nofollow">' . $ncount . '</a></li>';
            }
        }
        $ncount = 0;
        // resets the count
        $rater .= '  </ul>';
        $rater .= '  <p';
        if ($voted) {
            $rater .= ' class="voted"';
        }
        $rater .= '>' . $id . ' Rating: <strong> ' . $rating1 . '</strong>/' . $units . ' (' . $count . ' ' . $tense . ' cast)';
        $rater .= '  </p>';
        $rater .= '</div>';
        $rater .= '</div>';
        return $rater;
    }
}
开发者ID:holandacz,项目名称:nb4,代码行数:78,代码来源:_drawrating.php


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