Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / modules / contrib / devel / src / DevelDumperManagerInterface.php
1 <?php
2
3 namespace Drupal\devel;
4
5 /**
6  * Interface DevelDumperManagerInterface
7  */
8 interface DevelDumperManagerInterface {
9
10   /**
11    * Dumps information about a variable.
12    *
13    * @param mixed $input
14    *   The variable to dump.
15    * @param string $name
16    *   (optional) The label to output before variable, defaults to NULL.
17    * @param string $plugin_id
18    *   (optional) The plugin ID, defaults to NULL.
19    */
20   public function dump($input, $name = NULL, $plugin_id = NULL);
21
22   /**
23    * Returns a string representation of a variable.
24    *
25    * @param mixed $input
26    *   The variable to dump.
27    * @param string $name
28    *   (optional) The label to output before variable, defaults to NULL.
29    * @param string $plugin_id
30    *   (optional) The plugin ID, defaults to NULL.
31    *
32    * @return string
33    *   String representation of a variable.
34    */
35   public function export($input, $name = NULL, $plugin_id = NULL);
36
37   /**
38    * Sets a message with a string representation of a variable.
39    *
40    * @param mixed $input
41    *   The variable to dump.
42    * @param string $name
43    *   (optional) The label to output before variable, defaults to NULL.
44    * @param string $type
45    *   (optional) The message's type. Defaults to 'status'.
46    * @param string $plugin_id
47    *   (optional) The plugin ID, defaults to NULL.
48    */
49   public function message($input, $name = NULL, $type = 'status', $plugin_id = NULL);
50
51   /**
52    * Logs a variable to a drupal_debug.txt in the site's temp directory.
53    *
54    * @param mixed $input
55    *   The variable to log to the drupal_debug.txt log file.
56    * @param string $name
57    *   (optional) If set, a label to output before $data in the log file.
58    * @param string $plugin_id
59    *   (optional) The plugin ID, defaults to NULL.
60    *
61    * @return void|false
62    *   Empty if successful, FALSE if the log file could not be written.
63    *
64    * @see dd()
65    * @see http://drupal.org/node/314112
66    */
67   public function debug($input, $name = NULL, $plugin_id = NULL);
68
69   /**
70    * Wrapper for ::dump() and ::export().
71    *
72    * @param mixed $input
73    *   The variable to dump.
74    * @param string $name
75    *   (optional) The label to output before variable, defaults to NULL.
76    * @param bool $export
77    *   (optional) Whether return string representation of a variable.
78    * @param string $plugin_id
79    *   (optional) The plugin ID, defaults to NULL.
80    *
81    * @return string|null
82    *   String representation of a variable if $export is set to TRUE,
83    *   NULL otherwise.
84    */
85   public function dumpOrExport($input, $name = NULL, $export = TRUE, $plugin_id = NULL);
86
87   /**
88    * Returns a render array representation of a variable.
89    *
90    * @param mixed $input
91    *   The variable to export.
92    * @param string $name
93    *   (optional) The label to output before variable, defaults to NULL.
94    * @param string $plugin_id
95    *   (optional) The plugin ID, defaults to NULL.
96    *
97    * @return array
98    *   String representation of a variable wrapped in a render array.
99    */
100   public function exportAsRenderable($input, $name = NULL, $plugin_id = NULL);
101
102 }