*/ abstract class AbstractLog extends ConfigurableService { const OPTION_STORAGE = 'storage'; /** * @param Event $event */ abstract public function log(Event $event); /** * @param array $filters * @param array $options * @return array */ public function search(array $filters = [], array $options = []) { return $this->getStorage()->search($filters, $options); } public function delete(array $filters){ return $this->getStorage()->delete($filters); } /** * Count records in log which are meet the search criteria * @param array $filters * @param array $options * @return integer */ public function count(array $filters = [], array $options = []) { return $this->getStorage()->count($filters, $options); } /** * @return StorageInterface */ protected function getStorage() { $storage = $this->getOption(self::OPTION_STORAGE); return $storage; } }