toArray() public method

returns the Object as associated array
public toArray ( ) : array
return array
Example #1
0
 /**
  * returns the Object as associated array
  * @return array
  */
 public function toArray()
 {
     if ($this->rootElement instanceof CanConvertToArray) {
         return array('currentTime' => $this->request_time, 'cachedUntil' => $this->cached_until, 'result' => $this->rootElement->toArray());
     } else {
         return array();
     }
 }