kernel/lib/ObjectOperation.php
public static function objectToArray($mObject) : array
	{
		if ( is_object($mObject)) {
			
		    $mObject = (array) $mObject;
		}


		if (is_array($mObject)) {

			$aNew = array();

			foreach($mObject as $sKey => $mValues) {

				$sKey = preg_replace("/^\\0(.*)\\0/", "", $sKey);
				$aNew[$sKey] = self::objectToArray($mValues);
			}
		}
		else {

			$aNew = $mObject;
		}

		return $aNew;
	}
public static function objectToArray($mObject) : array
	{
		if ( is_object($mObject)) {
			
		    $mObject = (array) $mObject;
		}


		if (is_array($mObject)) {

			$aNew = array();

			foreach($mObject as $sKey => $mValues) {

				$sKey = preg_replace("/^\\0(.*)\\0/", "", $sKey);
				$aNew[$sKey] = self::objectToArray($mValues);
			}
		}
		else {

			$aNew = $mObject;
		}

		return $aNew;
	}
create an array with an object

@access public
@param $mObject
@return array