Version 1
[yaffs-website] / web / modules / contrib / devel / src / Plugin / Devel / Dumper / FirePhp.php
diff --git a/web/modules/contrib/devel/src/Plugin/Devel/Dumper/FirePhp.php b/web/modules/contrib/devel/src/Plugin/Devel/Dumper/FirePhp.php
new file mode 100644 (file)
index 0000000..9140d00
--- /dev/null
@@ -0,0 +1,41 @@
+<?php
+
+namespace Drupal\devel\Plugin\Devel\Dumper;
+
+use Drupal\devel\DevelDumperBase;
+
+/**
+ * Provides a FirePhp dumper plugin.
+ *
+ * @DevelDumper(
+ *   id = "firephp",
+ *   label = @Translation("FirePhp"),
+ *   description = @Translation("Wrapper for <a href='http://www.firephp.org'>FirePhp</a> debugging tool.")
+ * )
+ */
+class FirePhp extends DevelDumperBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function dump($input, $name = NULL) {
+    $fb = new \FB();
+    $fb->dump($name, $input);
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function export($input, $name = NULL) {
+    $this->dump($input);
+    return $this->t('Dump was redirected to the console.');
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public static function checkRequirements() {
+    return class_exists('FirePHP', TRUE);
+  }
+
+}