public function toArray()
    {
        $ary = [];

        foreach ($this as $key => $value) {
            $ary[$key] = $value;
        }

        return $ary;
    }
public function toArray()
    {
        $ary = [];

        foreach ($this as $key => $value) {
            $ary[$key] = $value;
        }

        return $ary;
    }
public function toArray ( ) { $ ary = [ ] ; foreach ( $ this as $ key => $ value ) { $ ary [ $ key ] = $ value ; } return $ ary ; }
Converts the object to an array

@return array
Converts the object to an array