1 <?php
 2 /**
 3  * Part of the Joomla Framework Data Package
 4  *
 5  * @copyright  Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
 6  * @license    GNU General Public License version 2 or later; see LICENSE
 7  */
 8 
 9 namespace Joomla\Data;
10 
11 /**
12  * An interface to define if an object is dumpable.
13  *
14  * @since  1.0
15  */
16 interface DumpableInterface
17 {
18     /**
19      * Dumps the object properties into a stdClass object, recursively if appropriate.
20      *
21      * @param   integer            $depth   The maximum depth of recursion.
22      *                                      For example, a depth of 0 will return a stdClass with all the properties in native
23      *                                      form. A depth of 1 will recurse into the first level of properties only.
24      * @param   \SplObjectStorage  $dumped  An array of already serialized objects that is used to avoid infinite loops.
25      *
26      * @return  \stdClass  The data properties as a simple PHP stdClass object.
27      *
28      * @since   1.0
29      */
30     public function dump($depth = 3, \SplObjectStorage $dumped = null);
31 }
32