Version 1
[yaffs-website] / web / modules / contrib / devel / src / DevelDumperInterface.php
1 <?php
2
3 namespace Drupal\devel;
4
5 /**
6  * Base interface definition for DevelDumper plugins.
7  *
8  * @see \Drupal\devel\Annotation\DevelDumper
9  * @see \Drupal\devel\DevelDumperPluginManager
10  * @see \Drupal\devel\DevelDumperBase
11  * @see plugin_api
12  */
13 interface DevelDumperInterface {
14
15   /**
16    * Dumps information about a variable.
17    *
18    * @param mixed $input
19    *   The variable to dump.
20    * @param string $name
21    *   (optional) The label to output before variable, defaults to NULL.
22    */
23   public function dump($input, $name = NULL);
24
25   /**
26    * Returns a string representation of a variable.
27    *
28    * @param mixed $input
29    *   The variable to export.
30    * @param string $name
31    *   (optional) The label to output before variable, defaults to NULL.
32    *
33    * @return string
34    *   String representation of a variable.
35    */
36   public function export($input, $name = NULL);
37
38   /**
39    * Returns a string representation of a variable wrapped in a render array.
40    *
41    * @param mixed $input
42    *   The variable to export.
43    * @param string $name
44    *   (optional) The label to output before variable, defaults to NULL.
45    *
46    * @return array
47    *   String representation of a variable wrapped in a render array.
48    */
49   public function exportAsRenderable($input, $name = NULL);
50
51   /**
52    * Checks if requirements for this plugin are satisfied.
53    *
54    * @return bool
55    *   TRUE is requirements are satisfied, FALSE otherwise.
56    */
57   public static function checkRequirements();
58
59 }