protected function objectToArray($object)
  {
    $out = array();
    foreach ($object as $key => $value)
    {
      switch (true)
      {
        case is_object($value):
          $out[$key] = $this->objectToArray($value);
        break;

        case is_array($value):
          $out[$key] = $this->objectToArray($value);
        break;

        default:
          $out[$key] = $value;
        break;
      }
    }

    return $out;
  }
protected function objectToArray($object)
  {
    $out = array();
    foreach ($object as $key => $value)
    {
      switch (true)
      {
        case is_object($value):
          $out[$key] = $this->objectToArray($value);
        break;

        case is_array($value):
          $out[$key] = $this->objectToArray($value);
        break;

        default:
          $out[$key] = $value;
        break;
      }
    }

    return $out;
  }
protected function objectToArray ( $ object ) { $ out = array ( ) ; foreach ( $ object as $ key => $ value ) { switch ( true ) { case is_object ( $ value ) : $ out [ $ key ] = $ this -> objectToArray ( $ value ) ; break ; case is_array ( $ value ) : $ out [ $ key ] = $ this -> objectToArray ( $ value ) ; break ; default : $ out [ $ key ] = $ value ; break ; } } return $ out ; }
Transforms the responseobject to an array

@param object $object

@return array An arrayrepresentation of the given object
Transforms the responseobject to an array