public function toArray($recursive = false) {
        $return = get_object_vars($this);
        if ($recursive) {
            foreach ($return as $ppt => &$val) {
                if ($ppt === 'integerkeys')
                    continue;
                if (is_object($val) && method_exists($val, 'toArray')) {
                    $val = $val->toArray(true);
                }
            }
        }
        unset($return['integerKeys']);
        return $return;
    }
public function toArray($recursive = false) {
        $return = get_object_vars($this);
        if ($recursive) {
            foreach ($return as $ppt => &$val) {
                if ($ppt === 'integerkeys')
                    continue;
                if (is_object($val) && method_exists($val, 'toArray')) {
                    $val = $val->toArray(true);
                }
            }
        }
        unset($return['integerKeys']);
        return $return;
    }
public function toArray ( $ recursive = false ) { $ return = get_object_vars ( $ this ) ; if ( $ recursive ) { foreach ( $ return as $ ppt => & $ val ) { if ( $ ppt === 'integerkeys' ) continue ; if ( is_object ( $ val ) && method_exists ( $ val , 'toArray' ) ) { $ val = $ val -> toArray ( true ) ; } } } unset ( $ return [ 'integerKeys' ] ) ; return $ return ; }
Returns array of properties
@param $recursive
@return array
Returns array of properties