public function get($id = false)
    {
        if (!$id) {
            if (is_array($this->data)) {
                return $this->data[0];
            } elseif (isset($this->items) && $this->items !== false) {
                return $this->items[0];
            } else {
                return $this->data;
            }
        } else {
            return $this->data[$id];
        }
    }
public function get($id = false)
    {
        if (!$id) {
            if (is_array($this->data)) {
                return $this->data[0];
            } elseif (isset($this->items) && $this->items !== false) {
                return $this->items[0];
            } else {
                return $this->data;
            }
        } else {
            return $this->data[$id];
        }
    }
public function get ( $ id = false ) { if ( ! $ id ) { if ( is_array ( $ this -> data ) ) { return $ this -> data [ 0 ] ; } elseif ( isset ( $ this -> items ) && $ this -> items !== false ) { return $ this -> items [ 0 ] ; } else { return $ this -> data ; } } else { return $ this -> data [ $ id ] ; } }
This method will return one element if id is not specified or element of array otherwise.

@param bool|int $id

@return mixed
This method will return one element if id is not specified or element of array otherwise .