public function toObject(bool $recursive = false) : \stdClass
    {
        $o = new \stdClass();
        if (!$recursive) {
            foreach ($this->explorableIndex as $property) {
                $o->{$property} = $this->{$property};
            }
        } else {
            foreach ($this->explorableIndex as $property) {
                $value = $this->{$property};
                $o->{$property} = !($value instanceof Explorable) ? $value : $value->toObject(true);
            }
        }
        return $o;
    }
public function toObject(bool $recursive = false) : \stdClass
    {
        $o = new \stdClass();
        if (!$recursive) {
            foreach ($this->explorableIndex as $property) {
                $o->{$property} = $this->{$property};
            }
        } else {
            foreach ($this->explorableIndex as $property) {
                $value = $this->{$property};
                $o->{$property} = !($value instanceof Explorable) ? $value : $value->toObject(true);
            }
        }
        return $o;
    }
public function toObject ( bool $ recursive = false ) : \ stdClass { $ o = new \ stdClass ( ) ; if ( ! $ recursive ) { foreach ( $ this -> explorableIndex as $ property ) { $ o -> { $ property } = $ this -> { $ property } ; } } else { foreach ( $ this -> explorableIndex as $ property ) { $ value = $ this -> { $ property } ; $ o -> { $ property } = ! ( $ value instanceof Explorable ) ? $ value : $ value -> toObject ( true ) ; } } return $ o ; }
Dumps publicly readable properties to standard object.

@param bool $recursive

@return \stdClass
Dumps publicly readable properties to standard object .