public function setupServiceManager($configPath)
    {
        try {
            $this->getServiceManager();
        } catch (InvalidServiceManagerException $e) {
            if (! \helpers_File::emptyDirectory($configPath, true)) {
                throw new \common_exception_Error('Unable to empty ' . $configPath . ' folder.');
            }
            $driver = new ServiceConfigDriver();
            $configService = $driver->connect('config', array(
                'dir' => $configPath,
                'humanReadable' => true
            ));

            $this->setServiceManager(new ServiceManager($configService));
        }

        return $this->getServiceManager();
    }
public function setupServiceManager($configPath)
    {
        try {
            $this->getServiceManager();
        } catch (InvalidServiceManagerException $e) {
            if (! \helpers_File::emptyDirectory($configPath, true)) {
                throw new \common_exception_Error('Unable to empty ' . $configPath . ' folder.');
            }
            $driver = new ServiceConfigDriver();
            $configService = $driver->connect('config', array(
                'dir' => $configPath,
                'humanReadable' => true
            ));

            $this->setServiceManager(new ServiceManager($configService));
        }

        return $this->getServiceManager();
    }
public function setupServiceManager ( $ configPath ) { try { $ this -> getServiceManager ( ) ; } catch ( InvalidServiceManagerException $ e ) { if ( ! \ helpers_File :: emptyDirectory ( $ configPath , true ) ) { throw new \ common_exception_Error ( 'Unable to empty ' . $ configPath . ' folder.' ) ; } $ driver = new ServiceConfigDriver ( ) ; $ configService = $ driver -> connect ( 'config' , array ( 'dir' => $ configPath , 'humanReadable' => true ) ) ; $ this -> setServiceManager ( new ServiceManager ( $ configService ) ) ; } return $ this -> getServiceManager ( ) ; }
Setup the service manager with configuration driver associated to config path

@param $configPath
@return ServiceManager
@throws \common_exception_Error
@throws InvalidServiceManagerException
Setup the service manager with configuration driver associated to config path