public function get($strict=FALSE)
    {
      $data = array();

      if ($strict && !$this->dispatched)
        foreach ($this->data as $d)
          if ($d->dispatched)
            throw new \CatapultApiException("One of the packets was already dispatched");

      elseif ($strict && $this->dispatched)
        throw new \CatapultApiException("This packet collection was already dispatched");

      foreach ($this->data as $d)
        $data[] = $d->get();

      /* lowercase a state */			
      if (array_key_exists("state", $data))	
        $data['state'] = strtolower($data['state']);

      $this->dispatched = true;

      return $data;
    }
public function get($strict=FALSE)
    {
      $data = array();

      if ($strict && !$this->dispatched)
        foreach ($this->data as $d)
          if ($d->dispatched)
            throw new \CatapultApiException("One of the packets was already dispatched");

      elseif ($strict && $this->dispatched)
        throw new \CatapultApiException("This packet collection was already dispatched");

      foreach ($this->data as $d)
        $data[] = $d->get();

      /* lowercase a state */			
      if (array_key_exists("state", $data))	
        $data['state'] = strtolower($data['state']);

      $this->dispatched = true;

      return $data;
    }
public function get ( $ strict = FALSE ) { $ data = array ( ) ; if ( $ strict && ! $ this -> dispatched ) foreach ( $ this -> data as $ d ) if ( $ d -> dispatched ) throw new \ CatapultApiException ( "One of the packets was already dispatched" ) ; elseif ( $ strict && $ this -> dispatched ) throw new \ CatapultApiException ( "This packet collection was already dispatched" ) ; foreach ( $ this -> data as $ d ) $ data [ ] = $ d -> get ( ) ; /* lowercase a state */ if ( array_key_exists ( "state" , $ data ) ) $ data [ 'state' ] = strtolower ( $ data [ 'state' ] ) ; $ this -> dispatched = true ; return $ data ; }
same as datapacket
traverse through all
packets and make sure
none have been fetched
already

@param strict: check for initial dispatch or not
@return multidimensional array
same as datapacket traverse through all packets and make sure none have been fetched already