You are here

protected function Dbug::varIsGdResource in dBug for Drupal 2.0.x

Same name and namespace in other branches
  1. 8 src/Dbug.php \Drupal\dbug\Dbug::varIsGdResource()
  2. 1.0.x src/Dbug.php \Drupal\dbug\Dbug::varIsGdResource()

If variable is an image/gd resource type.

Parameters

mixed $var: The variable.

1 call to Dbug::varIsGdResource()
Dbug::varIsResource in src/Dbug.php
If variable is a resource type.

File

src/Dbug.php, line 540

Class

Dbug
Implementation of dBug for Drupal.

Namespace

Drupal\dbug

Code

protected function varIsGdResource($var) {
  $this
    ->makeTableHeader("resource", "gd", 2);
  $this
    ->makeTdHeader("resource", "Width");
  $this->output[] = imagesx($var) . $this
    ->closeTdRow();
  $this
    ->makeTdHeader("resource", "Height");
  $this->output[] = imagesy($var) . $this
    ->closeTdRow();
  $this
    ->makeTdHeader("resource", "Colors");
  $this->output[] = imagecolorstotal($var) . $this
    ->closeTdRow();
  $this->output[] = "</table>";
}