本文整理汇总了PHP中FirePHP::log方法的典型用法代码示例。如果您正苦于以下问题:PHP FirePHP::log方法的具体用法?PHP FirePHP::log怎么用?PHP FirePHP::log使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FirePHP
的用法示例。
在下文中一共展示了FirePHP::log方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: checkVariables
/**
* Тестирование правил для Variables
*
* @return bool
*/
private function checkVariables($rules)
{
// Получаем список переменных страницы
$variables = array();
$url = parse_url($this->page_url);
if (is_array($url) && !empty($url['query'])) {
parse_str($url['query'], $variables);
}
if ($this->firephp) {
$this->firephp->log($variables, 'Page Variables');
$this->firephp->log($rules['rules'], 'Veriables Rules');
}
// Группируем правила по названиям переменных
$var_rules = array();
foreach ($rules['rules'] as $rule) {
if (!isset($var_rules[$rule['name']])) {
$var_rules[$rule['name']] = array();
}
array_push($var_rules[$rule['name']], $rule);
}
// Проверяем правила для каждой переменой
foreach ($var_rules as $name => $value) {
if (isset($variables[$name]) && !$this->compareRules($variables[$name], $value)) {
return false;
}
}
//return $this->compareRules($this->page_url, $rules['rules']);
return true;
}
示例2: debug
/**
*
* @param int|string|array|object $pmVar
* - Valor a ser impresso
* @param boolean $pbForceDebug
* - Se true força a impressão mesmo que no config o debug esteja
* desabilitado
* @param string $psType
* - força o tipo de saída de impressão
*/
public static function debug($pmVar, $pbForceDebug = false, $psType = null)
{
$laConfig = Config::getAppOptions();
$laDebug = $laConfig['log']['debug']['PHP'];
if (Util::toBoolean($laDebug['enable']) || $pbForceDebug) {
$lsType = $laDebug['output'];
if ($psType != null) {
$lsType = $psType;
}
switch ($lsType) {
case "DISPLAY":
echo '<pre style="margin:50px;"><code><fieldset><legend>Onion Debug:</legend>';
self::displayDebug($pmVar);
echo '</fieldset></code></pre>';
break;
case "FIREBUG":
$loLogger = new FirePHP();
$loLogger->log($pmVar);
break;
case "COMMENT":
echo "<!--";
self::displayDebug($pmVar);
echo "-->";
break;
case "BUFFER":
$loBuffer = Session::getRegister("DEBUG");
$loBuffer[] = Json::encode($pmVar);
break;
}
}
}
示例3: showLoadedExtensions
/**
* Shows loaded extensions
*/
protected function showLoadedExtensions()
{
$extensions = get_loaded_extensions();
natcasesort($extensions);
$this->openCat("Loaded Extensions");
$this->firePhp->log(count($extensions) . " extensions");
foreach ($extensions as $k => $v) {
$this->firePhp->log($v);
}
$this->closeCat();
}
示例4: log
/**
* log to console directly with this method passing only the first required parameter and to change
* the log type the third parameter according to allowed log types. pass a lable for second parameter
* to describe the message send to console.
*
* @error 10908
* @param null|mixed $mixed expects the message of any type to send to console
* @param null|string $label expects the optional label to describe the first parameter
* @param string $type expects the log type - see log type array
* @param array $options expects optional parameters
* @return void
* @throws Xapp_Error
*/
public function log($mixed = null, $label = null, $type = 'info', array $options = array())
{
$type = strtolower((string) $type);
if (array_key_exists($type, self::$_typeMap)) {
if ($type === 'ini') {
$this->ini($mixed, $label, $options);
}
if ($label !== null) {
$label = trim(trim($label), ':') . ':';
}
switch ($this->_driver) {
case 'chromephp':
switch ($type) {
case $type === 'ungroup' || $mixed === null:
$this->console->groupEnd();
break;
case 'group':
$this->console->group($mixed);
break;
case 'trace':
$this->console->log((string) $label, $mixed, 'info');
break;
default:
$this->console->log((string) $label, $mixed, self::$_typeMap[$type]);
}
break;
case 'firephp':
switch ($type) {
case $type === 'ungroup' || $mixed === null:
$this->console->groupEnd();
break;
case 'group':
$this->console->group($mixed, $options);
break;
case 'trace':
$this->console->trace($label);
break;
default:
$this->console->{$type}($mixed, (string) $label, $options);
}
break;
}
} else {
throw new Xapp_Error(xapp_sprintf(_("xapp console log type: %s not supported"), $type), 1090801);
}
}
示例5: checkProtections
/**
* Тест на протекшены
*
* @return boolean
*/
protected function checkProtections()
{
// Проверяем цепочку протекшенов
$check = $this->protections->isValid();
if (!$check) {
// Получаем cause
$this->cause = $this->protections->getCause();
// Получаем статус
$this->result = $this->protections->getStatus();
if ($this->firephp) {
$this->firephp->log($this->cause, 'Cause');
$this->firephp->log($this->result, 'Status');
}
}
return $check;
}
示例6: FirePHP
if (count($taxonBreedingUses) > 0) {
$cwrConcept->setTaxonBreedingUses($taxonBreedingUses);
}
/* * ** STORAGE BEHAVIOR *** */
$storageBehaviorDAO = DAOFactory::getDAOFactory()->getStorageBehaviorDAO();
$storageBehavior = $storageBehaviorDAO->getStorageBehavior($cwrConcept->getTaxon()->getGenus());
if ($storageBehavior != null) {
$cwrConcept->setStorageBehavior($storageBehavior);
}
/* * ** HERBARIA *** */
$herbariumDAO = DAOFactory::getDAOFactory()->getHerbariumDAO();
$herbaria = $herbariumDAO->getHerbariaData($cwrConcept->getTaxon()->getID());
if (count($herbaria) > 0) {
$cwrConcept->getTaxon()->setHerbaria($herbaria);
}
}
$firephp = new FirePHP(true);
//TODO - Remove this variable when the development of this page finalize.
$firephp->log($cwrConcept, 'CWR:');
// Only for test
$smarty->assign("taxon", $cwrConcept->getTaxon());
$smarty->assign("mainTaxon", $mainTaxon);
$smarty->assign("cwr", $cwrConcept);
}
// display TPL
$smarty->display("cwr-details.tpl");
// display sidebar
//get_sidebar();
//
// display footer
get_footer();
示例7: debug
/**
* Debug if debug enabled
*
* @param string $msg
* @param string $label
*/
protected function debug($msg, $label = null)
{
if ($this->firePhp) {
$this->firePhp->log($msg, $label);
}
}
示例8: outputBrowser
static function outputBrowser($type, $data)
{
// Browser Extensions
if (CONSOLE_FIREPHP) {
try {
//if (!in_array($type, array("log", "info", "warn", "error"))) { $type = "log"; }
//FirePHP::{$type}($data);
switch ($type) {
case "log":
FirePHP::log($data);
break;
case "info":
FirePHP::info($data);
break;
case "warn":
FirePHP::warn($data);
break;
case "error":
FirePHP::error($data);
break;
default:
FirePHP::log($data);
break;
}
} catch (Exception $e) {
}
}
if (CONSOLE_CHROMELOGGER) {
try {
//if (!in_array($type, array("log", "info", "warn", "error", "group", , "groupCollapsed", "groupEnd"))) { $type = "log"; }
//ChromePhp::{$type}($data);
switch ($type) {
case "log":
ChromePhp::log($data);
break;
case "info":
ChromePhp::info($data);
break;
case "warn":
ChromePhp::warn($data);
break;
case "error":
ChromePhp::error($data);
break;
case "group":
ChromePhp::group($data);
break;
case "groupCollapsed":
ChromePhp::groupCollapsed($data);
break;
case "groupEnd":
ChromePhp::groupEnd($data);
break;
default:
ChromePhp::log($data);
break;
}
} catch (Exception $e) {
}
}
}
示例9: FirePHP
array_push($priority_genera, 'Medicago');
array_push($priority_genera, 'Musa');
array_push($priority_genera, 'Ochthochloa');
array_push($priority_genera, 'Oryza');
array_push($priority_genera, 'Pennisetum');
array_push($priority_genera, 'Phaseolus');
array_push($priority_genera, 'Pisum');
array_push($priority_genera, 'Secale');
array_push($priority_genera, 'Solanum');
array_push($priority_genera, 'Sorghum');
array_push($priority_genera, 'Tornabenea');
array_push($priority_genera, 'Triticum');
array_push($priority_genera, 'Vavilovia');
array_push($priority_genera, 'Vicia');
array_push($priority_genera, 'Vigna');
$smarty->assign("priority_genera", $priority_genera);
$smarty->assign("countries", $countries);
$smarty->assign("regions", $regions);
$smarty->assign("breedingUses", $breedingUses);
$smarty->assign("concept_types", $concept_types);
$firephp = new FirePHP(true);
//TODO - Remove this variable when the development of this page finalize.
$firephp->log($breedingUses, 'USES:');
// Only for test
//$query = "SELECT DISTINCT Util_Type from Utilisation ORDER BY Util_Type ASC;";
//$uses = $db->getall($query);
//$smarty->assign("uses", $uses);
// display TPL
$smarty->display("search.tpl");
//get_sidebar();
get_footer();
示例10: log
public function log($Object, $Label = null, $Options = array())
{
parent::log($Object, $Label, $Options);
return $this;
}
示例11: FirePHP
require_once WORKSPACE_DIR . 'core/dao/factories/DAOFactory.php';
$firephp = new FirePHP(true);
//TODO - Remove this variable when the development of this page finalize.
if (isset($_GET['id']) && $_GET['id'] != '') {
$cropID = $_GET['id'];
// Search for this gene pool. Unique ids only
$cropID = array_unique($cropID);
$cropID = array_values($cropID);
$genePoolConceptDAO = DAOFactory::getDAOFactory()->getGenePoolConceptDAO();
$genePools = array();
$taxa = array();
$crop_taxa = array();
$taxons = array();
foreach ($cropID as $cropid) {
$genePoolConcept = $genePoolConceptDAO->getGenePoolConcept($cropid);
$firephp->log($genePoolConcept);
if ($genePoolConcept != null) {
/* * ** MAIN SYNONYMS *** */
$taxonDAO = DAOFactory::getDAOFactory()->getTaxonDAO();
$synonyms = $taxonDAO->getSysnonyms($cropid);
if (count($synonyms) > 0) {
$genePoolConcept->getMainCrop()->getTaxon()->setSynonyms($synonyms);
}
/* * ** CLASSIFICATION REFERENCES *** */
$classificationReferenceDAO = DAOFactory::getDAOFactory()->getClassificationReferenceDAO();
$classificationReferences = $classificationReferenceDAO->getClassificationReferences($cropid);
if (count($classificationReferences) > 0) {
$genePoolConcept->getMainCrop()->getTaxon()->setClassificationReferences($classificationReferences);
}
/* * ** TAXON GROUP CONCEPT *** */
/* The taxon group concept can be extracted using the method getTaxonOrdereByConceptLevels()