public function getEvents($limit = null)
    {
        $select = $this->getConnection()->select()->from($this->getMainTable());

        if ($limit !== null) {
            $select->limit($limit);
        }

        $eventData = $this->getConnection()->fetchAll($select);

        foreach ($eventData as &$currentEvent) {
            $currentEvent = array_merge($currentEvent, $this->jsonSerializer->unserialize($currentEvent['data']));
            unset($currentEvent['data']);
        }

        return $eventData;
    }
public function getEvents($limit = null)
    {
        $select = $this->getConnection()->select()->from($this->getMainTable());

        if ($limit !== null) {
            $select->limit($limit);
        }

        $eventData = $this->getConnection()->fetchAll($select);

        foreach ($eventData as &$currentEvent) {
            $currentEvent = array_merge($currentEvent, $this->jsonSerializer->unserialize($currentEvent['data']));
            unset($currentEvent['data']);
        }

        return $eventData;
    }
public function getEvents ( $ limit = null ) { $ select = $ this -> getConnection ( ) -> select ( ) -> from ( $ this -> getMainTable ( ) ) ; if ( $ limit !== null ) { $ select -> limit ( $ limit ) ; } $ eventData = $ this -> getConnection ( ) -> fetchAll ( $ select ) ; foreach ( $ eventData as & $ currentEvent ) { $ currentEvent = array_merge ( $ currentEvent , $ this -> jsonSerializer -> unserialize ( $ currentEvent [ 'data' ] ) ) ; unset ( $ currentEvent [ 'data' ] ) ; } return $ eventData ; }
Get event from the queue.

@param integer $limit Max number of events to be retrieved.

@return array
Get event from the queue .