public function toArray()
        {
            $class = $this->get();
            $class = (array)$class;
            foreach ($class as $key => $value) {
                if (is_object($value)) {
                    $class[$key] = (new static($value))->toArray();
                }
            }
            return $class;
        }
public function toArray()
        {
            $class = $this->get();
            $class = (array)$class;
            foreach ($class as $key => $value) {
                if (is_object($value)) {
                    $class[$key] = (new static($value))->toArray();
                }
            }
            return $class;
        }
public function toArray ( ) { $ class = $ this -> get ( ) ; $ class = ( array ) $ class ; foreach ( $ class as $ key => $ value ) { if ( is_object ( $ value ) ) { $ class [ $ key ] = ( new static ( $ value ) ) -> toArray ( ) ; } } return $ class ; }
Recursively convert our object into an array.

@return array
Recursively convert our object into an array .