Debugging used by Debug::show()

@return string HTML data representing this object
5621
public function debug()
    {
        $class = static::class;
        $val = "<h3>Database record: {$class}</h3>\n<ul>\n";
        if ($this->record) {
            foreach ($this->record as $fieldName => $fieldVal) {
                $val .= "\t<li>$fieldName: " . Debug::text($fieldVal) . "</li>\n";
            }
        }
        $val .= "</ul>\n";
        return $val;
    }
1140449
public static function display_debug($obj)
    {
        // prepare information of assigned variables
        $ptr = self::get_debug_vars($obj);
        if ($obj instanceof Smarty) {
            $smarty = clone $obj;
        } else {
            $smarty = clone $obj->smarty;
        }
        $_assigned_vars = $ptr->tpl_vars;
        ksort($_assigned_vars);
        $_config_vars = $ptr->config_vars;
        ksort($_config_vars);
        $smarty->registered_filters = array();
        $smarty->autoload_filters = array();
        $smarty->default_modifiers = array();
        $smarty->force_compile = false;
        $smarty->left_delimiter = '{';
        $smarty->right_delimiter = '}';
        $smarty->debugging = false;
        $smarty->force_compile = false;
        $_template = new Smarty_Internal_Template($smarty->debug_tpl, $smarty);
        $_template->caching = false;
        $_template->disableSecurity();
        $_template->cache_id = null;
        $_template->compile_id = null;
        if ($obj instanceof Smarty_Internal_Template) {
            $_template->assign('template_name', $obj->source->type . ':' . $obj->source->name);
        }
        if ($obj instanceof Smarty) {
            $_template->assign('template_data', self::$template_data);
        } else {
            $_template->assign('template_data', null);
        }
        $_template->assign('assigned_vars', $_assigned_vars);
        $_template->assign('config_vars', $_config_vars);
        $_template->assign('execution_time', microtime(true) - $smarty->start_time);
        echo $_template->fetch();
    }
1019617
public function show()
    {
        if (ob_get_level()) {
            ob_clean();
        }
        header("Content-type: " . $this->info['mime']);
        switch ($this->info['mime']) {
            case 'image/png':
                imagepng($this->image);
                break;

            case 'image/jpeg':
                imagejpeg($this->image);
                break;

            case 'image/bmp':
            case 'image/x-windows-bmp':
            case 'image/x-ms-bmp':
                BMP::image($this->image);
                break;

            case 'image/gif':
                imagegif($this->image);
                break;

            default:
                break;
        }

        return $this;
    }
324546
public function debug()
    {
        $query = $this->pdo->prepare(<<<SQL
SELECT *
FROM robotstxt__cache1
WHERE base = :base;
SQL
        );
        $query->bindValue('base', $this->base, \PDO::PARAM_STR);
        $query->execute();
        return $query->rowCount() > 0 ? $query->fetch(\PDO::FETCH_ASSOC) : [];
    }
1038200
public static function debug(array $args)
    {
        $label = '<div ondblclick="this.remove()" title="Double click to remove" style="cursor:pointer; position: relative; z-index: 999999; margin-top: 10px; box-shadow: 1px 1px 5px #ccc; font-family: Arial; background-color: rgba(255, 255, 0, 0.9); border: 1px dotted orange; padding: 5px 10px">';
        $label .= '<div style="border-bottom: 1px solid #eeeeee;  padding-bottom: 5px; margin-bottom: 5px; color: #666; font-size: 12px">Debug called from file: <strong>' . self::getCallingFileName(
            ) . '</strong> at line <strong>' . self::getCallingFileLine() . '</strong></div>';

        foreach ($args as $value) {
            if (is_bool($value)) {
                if (!$value) {
                    $value = '<span style="color: blue">FALSE</span>';
                } else {
                    $value = '<span style="color: blue">TRUE</span>';
                }
            }

            if (is_null($value)) {
                $value = '<span style="color: blue">NULL</span>';
            }

            if (is_string($value)) {
                if (!$value) {
                    $value = '<span style="color: blue">(empty string))</span>';
                }
            }

            $label .= '<pre>' . print_r($value, true) . '</pre>';
        }
        $label .= '</div>';

        return $label;
    }
1154730
public function debug()
	{
	    $errorToreturn = '';
		if($this->_debug && $this->hasError() ){
			$message = $this->getMessage();
			$trace = $this->getTrace();
			$critical = $this->getCritical();

			for($i= 0, $count = sizeOf($message); $i<$count;$i++ ) {

				if($critical[$i]){
                    echo '<strong style="color:red">';
				} else  {
					continue;
				}

				CheckoutApi_Utility_Utilities::dump($message[$i] .'==> { ');
				
				foreach($trace[$i] as $errorIndex => $errors) {
                    echo   "<pre>";
                    echo    $errorIndex ."=>  "; print_r($errors);

                    echo   "</pre>";
				}
				
				if($critical[$i])	{
                    echo   '</strong>';
				}
				
				CheckoutApi_Utility_Utilities::dump('} ');
				
			}
			
		}
		return $errorToreturn;
	}
34328
public function output()
    {
        if ( $this->session->has('flashMessages') ) {
            $flashMessages = $this->session->get('flashMessages');
            $this->session->set('flashMessages', []);
            $html = null;
            foreach ($flashMessages as $message) {
                $html .= "<div class='". $message['type'] . "'>" . $message['message'] . "</div>";
            }
            return $html;
        }
    }
80537
protected function _getErrorData()
    {
        $data = [];

        $viewVars = $this->controller->viewVars;
        if (!empty($viewVars['_serialize'])) {
            foreach ($viewVars['_serialize'] as $v) {
                $data[$v] = $viewVars[$v];
            }
        }

        if (!empty($viewVars['error']) && Configure::read('debug')) {
            $data['exception'] = [
                'class' => get_class($viewVars['error']),
                'code' => $viewVars['error']->getCode(),
                'message' => $viewVars['error']->getMessage(),
            ];

            if (!isset($data['trace'])) {
                $data['trace'] = Debugger::formatTrace($viewVars['error']->getTrace(), [
                    'format' => 'array',
                    'args' => false
                ]);
            }
        }

        return $data;
    }
791247
public function show(){
	        $output = "";
	        
	        //It prepares graph name
            $output .= "<br>================================<br>";
            $output .= "Graph Name: ".$this->name."<br>";
            $output .= "================================";
	        
	        //It prepares vertex set
	        $output .= "<br>V = { ";
	        foreach($this->vertexSet as $vertex){
	            $output .= $vertex->getId().", ";
	        }
	        $output = substr($output, 0, -2);
	        $output .= " }";
	        
	        //It prepares edge set
	        $output .= "<br>E = {";
	        foreach($this->edgeSet as $edge){
	            $output .= $edge->show() .", ";
	        }
	        $output = substr($output, 0, -2);
	        $output .= " }<br>";
	        $output .= "================================<br>";
	        
	        echo $output;   //It shows on browser
	    }
615335
public function dump() : string
    {
        $html  = '<p><i>You have made ' . self::$numQueries . ' database queries.</i></p><pre>';
        
        foreach (self::$queries as $key => $val) {
            $params = empty(self::$params[$key])
                ? null
                : htmlentities(print_r(self::$params[$key], 1), null, 'UTF-8') . '<br/><br/>';
            $html .= htmlentities($val, null, 'UTF-8') . '<br/><br/>' . $params;
        }
        
        return $html . '</pre>';
    }
787782
private function debugData() {

		$state           = new \stdClass;
		$state->names    = isset( $_REQUEST['geot_state'] ) ? [ filter_var( $_REQUEST['geot_state'], FILTER_SANITIZE_FULL_SPECIAL_CHARS ) ] : '';
		$state->iso_code = isset( $_REQUEST['geot_state_code'] ) ? filter_var( $_REQUEST['geot_state_code'], FILTER_SANITIZE_FULL_SPECIAL_CHARS ) : '';

		$country = new \stdClass;

		$country->names = [ filter_var( $_REQUEST['geot_debug'], FILTER_SANITIZE_FULL_SPECIAL_CHARS ) ];
		$continent      = new \stdClass;

		$continent->names  = isset( $_REQUEST['geot_continent'] ) ? [ filter_var( $_REQUEST['geot_continent'], FILTER_SANITIZE_FULL_SPECIAL_CHARS ) ] : '';
		$country->iso_code = isset( $_REQUEST['geot_debug_iso'] ) ? filter_var( $_REQUEST['geot_debug_iso'], FILTER_SANITIZE_FULL_SPECIAL_CHARS ) : '';
		$city              = new \stdClass;

		$city->names = isset( $_REQUEST['geot_city'] ) ? [ filter_var( $_REQUEST['geot_city'], FILTER_SANITIZE_FULL_SPECIAL_CHARS ) ] : '';
		$city->zip   = isset( $_REQUEST['geot_zip'] ) ? filter_var( $_REQUEST['geot_zip'], FILTER_SANITIZE_FULL_SPECIAL_CHARS ) : '';

		$geolocation                  = new \stdClass();
		$geolocation->accuracy_radius = '';
		$geolocation->longitude       = '';
		$geolocation->latitude        = '';
		$geolocation->time_zone       = '';

		$this->user_data[ $this->cache_key ] = new GeotRecord( (object) [
			'country'     => $country,
			'city'        => $city,
			'state'       => $state,
			'continent'   => $continent,
			'geolocation' => $geolocation,
		] );

		return $this->user_data[ $this->cache_key ];
	}
812028
public function ___debugInfo()
    {
        return array(
            'name'  => isset($this->propertyNode) ? $this->propertyNode->name->toString() : 'unknown',
            'class' => $this->className
        );
    }
444334
public function debugf()
    {
        $args = func_get_args();
        $format = array_shift($args);
        $this->debug(vsprintf($format, $args));
    }
68259
public function render() {
		$output = null;

		$this->attributes['class'][] = implode( ' ', $this->classes );
		$note                      = $this->get_data();
		$output .= '<div ' . $this->build_attributes() . '>';
		$output .= '<p>';
		$output .= $note[ $this->slug ];
		$output .= '</p>';
		$output .= $this->dismiss();
		$output .= '</div>';

		return $output;

	}
939583
public function debug()
    {
        Debug::show($this->javascript);
        Debug::show($this->css);
        Debug::show($this->customCSS);
        Debug::show($this->customScript);
        Debug::show($this->customHeadTags);
        Debug::show($this->combinedFiles);
    }
170436
public function display()
    {
        if (!$this->visible || count($this->view->model) < 2) {
            return;
        }

        parent::display();

        $this->createEmbeddedWidgets();

        $columns = $this->view->getVisibleColumns();

        $tr_tag = new SwatHtmlTag('tr');
        $tr_tag->id = $this->id;
        $tr_tag->class = $this->getCSSClassString();
        $tr_tag->open();

        // find checkbox column position
        $position = 0;
        foreach ($columns as $column) {
            if ($column === $this->column) {
                break;
            } else {
                $position++;
            }
        }

        if ($position > 0) {
            $td_before_tag = new SwatHtmlTag('td');
            $td_before_tag->setContent('&nbsp;', 'text/xml');
            if ($position > 1) {
                $td_before_tag->colspan = $position;
            }

            $td_before_tag->display();
        }

        $td_tag = new SwatHtmlTag('td');
        if (count($columns) - $position > 1) {
            $td_tag->colspan = count($columns) - $position;
        }

        $td_tag->open();
        if ($this->title !== null) {
            $this->check_all->title = $this->title;
            $this->check_all->content_type = $this->content_type;
        }

        $this->check_all->extended_count = $this->extended_count;
        $this->check_all->visible_count = $this->visible_count;
        $this->check_all->unit = $this->unit;
        $this->check_all->tab_index = $this->tab_index;
        $this->check_all->display();

        $td_tag->close();

        $tr_tag->close();
    }
1016148
public function debug() {
        echo "filePath    = " . $this->filePath . PHP_EOL;
        echo "startMarker = " . $this->startMarker . PHP_EOL;
        echo "endMarker   = " . $this->endMarker . PHP_EOL;
        echo "startIndex  = " . $this->startIndex . PHP_EOL;
        echo "endIndex    = " . $this->endIndex . PHP_EOL;
        echo "numLines    = " . $this->numLines . PHP_EOL;
        echo "Start       = " . print_r($this->beforeLines, true);
        echo "Auto      = " . print_r($this->autoLines, true);
        echo "End         = " . print_r($this->afterLines, true);
        return $this;
    }