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


PHP Debug::info方法代码示例

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


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

示例1: _execute

 protected function _execute($queries)
 {
     $result = true;
     foreach ($queries as $query) {
         if ($response = $this->_db->query($query)) {
             Debug::info("Applied: " . get_class($this));
         } else {
             Debug::error("Error: " . get_class($this));
             $result = false;
         }
     }
     return $result;
 }
开发者ID:nickbreslin,项目名称:Assembler,代码行数:13,代码来源:dbchange.php

示例2: previewSave

 /**
  * previewSave:
  * Sometimes during development we need to see the exact query that is generated.
  * This function uses debugging messages to show the query that would be generated
  * and executed by save(), but without actually executing it against the database.
  */
 function previewSave()
 {
     $keyName = static::$_keyField;
     $keyValue = addslashes($this->getKeyValue());
     if (!$this->recordExists()) {
         $fields = $this->getInsertFieldList();
         $values = $this->getInsertValueList();
         if (!empty(static::$_insertTimestampField)) {
             $fields .= ', `' . static::$_insertTimestampField . '`';
             $values .= ", NOW()";
         }
         Debug::info('[DB-PREVIEW] INSERT INTO `%s` (%s) VALUES (%s)', static::$_tableName, $fields, $values);
     } else {
         $fields = $this->getUpdateFieldList();
         if (!empty(static::$_updateTimestampField)) {
             if (!empty($fields)) {
                 $fields .= ', ';
             }
             $fields .= '`' . static::$_updateTimestampField . '` = NOW()';
         }
         Debug::info("[DB-PREVIEW] UPDATE `%s` SET %s WHERE `%s` = '%s'", static::$_tableName, $fields, $keyName, $keyValue);
     }
 }
开发者ID:briancline,项目名称:spire,代码行数:29,代码来源:model.php

示例3: session_start

<?php

session_start();
# Start benchmark
$benchmark_start = microtime(TRUE);
# We need the File library for autoloader
require_once CORE_PATH . '/libraries/File.php';
# Register class autoloader
spl_autoload_register(array('File', 'autoloader'));
# Load core configs
require CORE_PATH . "/config/config.php";
# Stop benchmark, get execution time
define('EXECUTION_TIME', number_format(microtime(TRUE) - $benchmark_start, 4));
# Optionally show debugging info if not in production. to enable add ?debug to URI
Debug::info();
开发者ID:rebekahheacock,项目名称:dwa15-archive,代码行数:15,代码来源:bootstrap.php

示例4: debug

 public function debug()
 {
     Debug::info($this->_mysql);
 }
开发者ID:nickbreslin,项目名称:Google-Spreadsheet-to-CSV,代码行数:4,代码来源:database.php

示例5: define

        $previous[] = $post['autor_link'];
        $blog_list .= "<li><a href='" . $post['autor_link'] . "'><img src='/gfx/feed-icon-10x10.png' " . "alt='RSS feed' /></a>" . "<a href='" . $post['blog_url'] . "'>" . $post['blog_title'] . "</a></li>\n";
        $fOutput->writeOpml(File::ReadAndParse('xml/opml_item.xml', $post));
    }
}
$fOutput->writeOpml(File::ReadAndParse('xml/opml_foot.xml'));
$blog_list .= "</ul>\n";
define('BLOG_LIST', $blog_list);
unset($blog_list);
# Other similar planets:
$planets = $Config->getPlanetas();
$planet_list = "<ul>\n";
foreach ($planets as $planet) {
    $planet_list .= "<li><a href='" . $planet['rss'] . "'><img src='/gfx/feed-icon-10x10.png' alt='Feed RSS' /></a>" . "<a href='" . $planet['url'] . "'>" . $planet['name'] . "</a></li>\n";
}
$planet_list .= "</ul>\n";
define('PLANET_LIST', $planet_list);
unset($planet_list);
# Sidebar generation:
$fOutput->write(File::ReadAndParse('html/sidebar.html'));
# Extended content initially hidden:
$fOutput->write('<script type="text/javascript">$(".content").hide();</script>');
# Statistics:
Debug::info("HTML: Statistics code");
$fOutput->write(File::ReadAndParse('html/stats.html'));
# Closure:
Debug::info("Closures");
$fOutput->write(File::ReadAndParse('html/footer.html'));
$fOutput->writeRss(File::Read('xml/rss20_foot.xml'));
Debug::info("EOF");
开发者ID:jorgefuertes,项目名称:qPlanet,代码行数:30,代码来源:planet.php

示例6: getFolders

 public function getFolders($token)
 {
     $url = "https://docs.google.com/feeds/documents/private/full/-/folder?showfolders=true";
     $results = self::fetchXML($url, $token);
     Debug::info($results);
     if (!$results) {
         return array();
     }
     $return = array();
     foreach ($results as $result) {
         $data = array();
         $data['id'] = $result->{'id'};
         $data['title'] = $result->{'title'};
         //$data['due-date']      = $result->{'due-date'};
         //$data['space-id']    = $result->{'space-id'};
         Debug::info($data['title']);
         $return[] = $data;
     }
     return $return;
 }
开发者ID:nickbreslin,项目名称:Google-Spreadsheet-to-CSV,代码行数:20,代码来源:googledocs.php

示例7: __construct

 function __construct()
 {
     Debug::info("OBJECT: " . get_class($this));
     $this->_init();
 }
开发者ID:nickbreslin,项目名称:Assembler,代码行数:5,代码来源:base.php

示例8: redirect

 /**
  * Throws a redirection
  *
  * @param string $url URL to be redirected
  * @param integer $time The time before being redirected
  * @param integer $code Status code to be sent
  * @throws Exception if the URL is empty
  *
  * @return void
  */
 public function redirect($url, $time = 0, $code = self::FOUND)
 {
     if (empty($url)) {
         throw new Exception('Can\'t redirect to an empty url');
     }
     if (!$this->isRedirect($code)) {
         throw new Exception(sprintf('Bad HTTP status response (%1$s given)', $code));
     }
     if ($time === 0) {
         $header = 'Location';
         $value = $url;
     } else {
         $header = 'Refresh';
         $value = $time . ';url=' . $url;
     }
     Debug::info('Redirecting...');
     $this->_redirect = true;
     $this->status($code);
     $this->header($header, $value, true, $code);
     $this->sendHeaders();
 }
开发者ID:Taluu,项目名称:Tamed-Framework,代码行数:31,代码来源:Response.php

示例9: Dbupdate

} else {
    if ($collection = getParam("views")) {
        if (!strcmp($collection, "dbupdate")) {
            require_once ROOT_PATH . 'lib/core/dbupdate.php';
            require_once ROOT_PATH . 'lib/core/dbchange.php';
            $dbupdate = new Dbupdate();
            $dbupdate->run();
        } else {
            Debug::warning("Route: [views] : No Element");
        }
    } else {
        if ($collection = getParam("assembla")) {
            if (!strcmp($collection, "query")) {
                require_once ROOT_PATH . 'lib/core/curl.php';
                require_once ROOT_PATH . 'lib/rest/assembla.php';
                Debug::info(print_r($_POST, true));
                $status = getParam('status', 'open');
                $timeframe = getParam('timeframe', 'this-week');
                $group = getParam('group', 'both');
                $assembla = new Assembla();
                $result = $assembla->loadAllData($status, $timeframe, $group);
                $html = $assembla->view($result, $group);
                $response->setData($html);
            } else {
                Debug::warning("Route: [assembla] : No Element");
            }
        } else {
            Debug::warning("Route: No Collection");
        }
    }
}
开发者ID:nickbreslin,项目名称:Assembler,代码行数:31,代码来源:index.php

示例10: loadAllData

 public function loadAllData($status, $timeframe, $group)
 {
     Debug::info($status . ":" . $timeframe . ":" . $group);
     //	Debug::info($timeframe);
     $spaces = $this->getSpaces();
     $projects = array();
     $users = array();
     $tickets = array();
     $milestones = array();
     $validMilestones = array();
     $spaceholder = "";
     $projectTickets = array();
     foreach ($spaces as $space) {
         if ($status == "all") {
             $projectTickets = $this->getAllTickets($space['id']);
         } else {
             if ($status == "open") {
                 $projectTickets = $this->getOpenTickets($space['id']);
             } else {
                 if ($status == "closed") {
                     $projectTickets = $this->getClosedTickets($space['id']);
                 }
             }
         }
         $milestones = array_merge($milestones, $this->getMilestones($space['id']));
         $users = array_merge($users, $this->getUsers($space['id']));
         $tickets = array_merge($tickets, $projectTickets);
         $project['name'] = str_replace('"', "'", $space['name']);
         $project['space'] = $space['space'];
         $project['tickets'] = array();
         $project['users'] = $users;
         $projects[(string) $space['id']] = $project;
         $spaceholder = (string) $space['id'];
     }
     // Timeframe
     if ($timeframe != "all-time") {
         $adjust = $timeframe == "next-week" ? "+1 week" : "";
         foreach ($milestones as $milestone) {
             //$dt = new DateTime($milestone['due-date']);
             //$ts = $dt->getTimestamp();
             $ts = strtotime($milestone['due-date']);
             if (strtotime("last sunday {$adjust}") < $ts && strtotime("next sunday {$adjust}") > $ts) {
                 $validMilestones[] = (int) $milestone['id'];
             }
         }
     } else {
         foreach ($milestones as $milestone) {
             $validMilestones[] = (int) $milestone['id'];
         }
         //Debug::info($validMilestones);
     }
     foreach ($projects as &$project) {
         foreach ($users as $user) {
             $project['tickets'][(string) $user['id']] = array();
         }
         $project['tickets']['unassigned'] = array();
     }
     foreach ($tickets as $ticket) {
         $tid = $group != 'user' ? (string) $ticket['space-id'] : $spaceholder;
         if ($timeframe != "all-time") {
             if ($ticket['milestone-id'] == "") {
                 continue;
             }
             if (!in_array($ticket['milestone-id'], $validMilestones)) {
                 continue;
             }
         }
         $id = $ticket['assigned-to-id'];
         $claimed = false;
         foreach ($users as $user) {
             if (!strcmp($id, $user['id'])) {
                 $claimed = true;
                 $projects[$tid]['tickets'][(string) $user['id']][] = $ticket;
                 break;
             }
         }
         if (!$claimed) {
             $projects[$tid]['tickets']['unassigned'][] = $ticket;
         }
     }
     // Project
     // User
     // User Tickets
     // Title
     // Priority
     //Debug::info($projects);
     return $projects;
 }
开发者ID:nickbreslin,项目名称:Assembler,代码行数:88,代码来源:assembla.php

示例11: schemaTableExists

 private function schemaTableExists()
 {
     global $config;
     $query = "SELECT table_name\n        FROM information_schema.tables\n        WHERE table_schema = '" . $config['database.name'] . "'\n        AND table_name = 'schema_versions_applied'";
     $result = $this->_db->query($query);
     if ($result) {
         Debug::info("Schema_Versions_Applied table found.");
         return true;
     }
     Debug::error("Schema_Versions_Applied table not found.");
     $query = "\n\t\t\tCREATE TABLE `schema_versions_applied` (\n            `change_id` int(11) NOT NULL AUTO_INCREMENT,\n            `change_filename` varchar(255) NOT NULL,\n            `applied` int(11) NOT NULL,\n            PRIMARY KEY (`change_id`),\n            UNIQUE KEY (`change_filename`)\n            ) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;";
     $result = $this->_db->query($query);
     if ($result) {
         Debug::info("Schema_Versions_Applied table created.");
         return true;
     }
     return false;
 }
开发者ID:nickbreslin,项目名称:Assembler,代码行数:18,代码来源:dbupdate.php

示例12: getPosts

 /**
  *
  * Get posts from feeds:
  * @param array $feeds Array with the feeds.
  * @return array Array with the posts.
  */
 public function getPosts($feeds)
 {
     $posts = array();
     foreach ($feeds as $name => $feed) {
         Debug::info("Getting posts from " . $feed['url']);
         $rss = new SimplePie($feed['url']);
         $rss->handle_content_type();
         $rss->force_feed(true);
         $counter = 1;
         foreach ($rss->get_items() as $item) {
             Debug::info("  post {$counter} of " . MAXPOSTS . ".");
             if (!is_object($item)) {
                 Debug::error("Parsing item (" . $item . ").");
             } else {
                 if (strstr($item->get_title(), "[minipost]")) {
                     Debug::say("Minipost...passing.");
                 } else {
                     $counter++;
                     $timestamp = strtotime($item->get_date());
                     # Post:
                     $posts[$timestamp]['id'] = "p" . $timestamp . "-" . $counter;
                     $posts[$timestamp]['pubdate'] = $item->get_date('r');
                     $posts[$timestamp]['date'] = $item->get_local_date();
                     $posts[$timestamp]['time'] = $item->get_local_date("%T");
                     $posts[$timestamp]['permalink'] = $item->get_permalink();
                     $posts[$timestamp]['title'] = $item->get_title();
                     $posts[$timestamp]['description'] = $item->get_description();
                     $posts[$timestamp]['content'] = $item->get_content();
                     if ($posts[$timestamp]['description'] == $posts[$timestamp]['content'] and strlen($posts[$timestamp]['content']) < 400) {
                         $posts[$timestamp]['description'] = Html::Cut(Html::BurnerClean($item->get_description()));
                         $posts[$timestamp]['content'] = "";
                         $posts[$timestamp]['toggle'] = "";
                     } else {
                         $posts[$timestamp]['description'] = Html::Cut(Html::BurnerClean($item->get_description()));
                         $posts[$timestamp]['content'] = Html::Clean($item->get_content());
                         $posts[$timestamp]['toggle'] = "<a onclick='ToggleContent(\"" . $posts[$timestamp]['id'] . "\"); return false;' href=\"#\">&dArr; Read more</a>";
                     }
                     // Microblogging posts have same description as title
                     if (FALSE !== strpos($posts[$timestamp]['title'], $posts[$timestamp]['description'])) {
                         $posts[$timestamp]['description'] = "";
                         $posts[$timestamp]['content'] = "";
                         $posts[$timestamp]['toggle'] = "";
                     }
                     # Rss:
                     $posts[$timestamp]['description_rss'] = $posts[$timestamp]['description'];
                     $posts[$timestamp]['content_rss'] = $posts[$timestamp]['content'];
                     # author:
                     if (method_exists($item, 'get_author') and is_object($item->get_author())) {
                         # The feed ones:
                         $posts[$timestamp]['author'] = $item->get_author()->get_name();
                         $posts[$timestamp]['author_link'] = $item->get_author()->get_link();
                     } else {
                         Debug::say("No author data feed " . $name);
                         $posts[$timestamp]['author'] = $name;
                         $posts[$timestamp]['author_link'] = $rss->get_permalink();
                     }
                     # Si han quedado vacíos pese a todo:
                     if (empty($posts[$timestamp]['author'])) {
                         $posts[$timestamp]['author'] = $name;
                     }
                     if (empty($posts[$timestamp]['author_link'])) {
                         $posts[$timestamp]['author_link'] = $feed['url'];
                     }
                     $posts[$timestamp]['author_email'] = $feed['email'];
                     # Gravatar:
                     if (strlen($feed['avatar'])) {
                         $posts[$timestamp]['author_avatar'] = "http://www.gravatar.com/avatar.php?gravatar_id=" . md5($feed['avatar']) . "&amp;size=40&amp;default=" . urlencode(DEFAULT_AVATAR);
                     } else {
                         if (strlen($feed['avatar_url'])) {
                             $posts[$timestamp]['author_avatar'] = $feed['avatar_url'];
                         }
                     }
                     # Blog:
                     $posts[$timestamp]['blog_title'] = $rss->get_title();
                     $posts[$timestamp]['blog_url'] = $rss->get_permalink();
                     $posts[$timestamp]['blog_desc'] = $rss->get_description();
                     # Logo:
                     $posts[$timestamp]['logo_url'] = $rss->get_image_url();
                     $posts[$timestamp]['logo_link'] = $rss->get_image_link();
                     $posts[$timestamp]['logo_title'] = $rss->get_image_title();
                 }
             }
             if ($counter > MAXPOSTS) {
                 break;
             }
         }
     }
     krsort($posts);
     #Debug::dump($posts);
     return $posts;
 }
开发者ID:jorgefuertes,项目名称:qPlanet,代码行数:97,代码来源:Rss.class.php


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