protected function getKeyValuePersistence()
    {
        $persistenceName = $this->getOption('kv-persistence');
        /** @var \common_persistence_Manager $persistenceManager */
        $persistenceManager = $this->getServiceLocator()->get(\common_persistence_Manager::SERVICE_ID);
        $persistence = $persistenceManager->getPersistenceById($persistenceName);
        if (!$persistence instanceof \common_persistence_KeyValuePersistence) {
            throw new \common_Exception('Given persistence is not a key value');
        }
        return $persistence;
    }
protected function getKeyValuePersistence()
    {
        $persistenceName = $this->getOption('kv-persistence');
        /** @var \common_persistence_Manager $persistenceManager */
        $persistenceManager = $this->getServiceLocator()->get(\common_persistence_Manager::SERVICE_ID);
        $persistence = $persistenceManager->getPersistenceById($persistenceName);
        if (!$persistence instanceof \common_persistence_KeyValuePersistence) {
            throw new \common_Exception('Given persistence is not a key value');
        }
        return $persistence;
    }
protected function getKeyValuePersistence ( ) { $ persistenceName = $ this -> getOption ( 'kv-persistence' ) ; /** @var \common_persistence_Manager $persistenceManager */ $ persistenceManager = $ this -> getServiceLocator ( ) -> get ( \ common_persistence_Manager :: SERVICE_ID ) ; $ persistence = $ persistenceManager -> getPersistenceById ( $ persistenceName ) ; if ( ! $ persistence instanceof \ common_persistence_KeyValuePersistence ) { throw new \ common_Exception ( 'Given persistence is not a key value' ) ; } return $ persistence ; }
Create the persistence from option and validate as KeyValue persistence

@return \common_persistence_KeyValuePersistence
@throws \common_Exception
Create the persistence from option and validate as KeyValue persistence