Return an instance of the group store implementation.

@return IEntityGroupStore
@exception GroupsException
489910
public IEntityGroupStore newInstance() throws GroupsException {
        try {
            return new RDBMEntityGroupStore();
        } catch (Exception ex) {
            log.error("ReferenceEntityGroupStoreFactory.newInstance(): " + ex);
            throw new GroupsException(ex);
        }
    }
429026
protected function getGroup()
    {
        $table = ORM::getTable($this->getTable()->getPlugin(), 'Group');
        try
        {
            return $table->find($this->getPdoValue('groupId'));
        }
        catch (DomainException $e)
        {
            return new Gallery_NullObject();
        }
    }
923726
public function store()
    {
        $args = func_get_args();
        list($key, $groupKey) = $this->getKeys($args);

        $this->engine->setGroupKey($groupKey);

        $expires = 3600; // default
        $ttl = null;
        if ($groupKey instanceof Group\Key) {
            $value = $args[2];

            if (array_key_exists(3, $args)) {
                $expires = $args[3];
            }

            if (array_key_exists(4, $args)) {
                $ttl = $args[4];
            }
        } else {
            $value = $args[1];

            if (array_key_exists(2, $args)) {
                $expires = $args[2];
            }

            if (array_key_exists(3, $args)) {
                $ttl = $args[3];
            }
        }

        return $this->engine->store($key, $value, $expires, $ttl);
    }
1014410
public function getGroup()
    {
        /** @var Request $request */
        $request = $this->container->get('request');

        $groupInfo = $request->getSession()->get(CustomerGroup::getModuleCode());

        return $groupInfo;
    }
510941
@Override
    public Iterator findEntitiesForGroup(IEntityGroup group) throws GroupsException {
        Collection entities = new ArrayList();
        Connection conn = null;
        String groupID = group.getLocalKey();
        Class cls = group.getLeafType();

        try {
            conn = RDBMServices.getConnection();
            Statement stmnt = conn.createStatement();
            try {

                String query =
                        "SELECT "
                                + MEMBER_MEMBER_KEY_COLUMN
                                + " FROM "
                                + MEMBER_TABLE
                                + " WHERE "
                                + MEMBER_GROUP_ID_COLUMN
                                + " = '"
                                + groupID
                                + "' AND "
                                + MEMBER_IS_GROUP_COLUMN
                                + " = '"
                                + MEMBER_IS_ENTITY
                                + "'";

                ResultSet rs = stmnt.executeQuery(query);
                try {
                    while (rs.next()) {
                        String key = rs.getString(1);
                        IEntity e = newEntity(cls, key);
                        entities.add(e);
                    }
                } finally {
                    rs.close();
                }
            } finally {
                stmnt.close();
            }
        } catch (SQLException sqle) {
            LOG.error("Problem retrieving Entities for Group: " + group, sqle);
            throw new GroupsException("Problem retrieving Entities for Group", sqle);
        } finally {
            RDBMServices.releaseConnection(conn);
        }

        return entities.iterator();
    }
1192409
public static function load() : JobStore
    {
        if (is_null(self::$instance)) {
            self::$instance = new JobStore(Connection::get());
        }

        return self::$instance;
    }
293343
private function createDefaultLockStore()
    {
        try {
            $lockPath = Path::create(
                [
                    \sys_get_temp_dir(),
                    '.crunz',
                ]
            );

            $store = new FlockStore($lockPath->toString());
        } catch (InvalidArgumentException $exception) {
            // Fallback to system temp dir
            $lockPath = Path::create([\sys_get_temp_dir()]);
            $store = new FlockStore($lockPath->toString());
        }

        return $store;
    }
839272
public Store getStore(StoreConfiguration storeConfiguration, List<Class<?>> types) {
        StoreKey key = StoreKey.builder().uri(storeConfiguration.getUri().normalize()).username(storeConfiguration.getUsername()).build();
        Store store = storesByKey.get(key);
        if (store == null) {
            store = StoreFactory.getStore(storeConfiguration);
            store.start(types);
            storesByKey.put(key, store);
            keysByStore.put(store, key);
        }
        return store;
    }
258531
public function store()
    {
        $request = $this->makeRequest('store');
        $model = $this->service->create($request);

        if(is_a($model, \Exception::class)) {

            return $this->getErrorResource($model);

        } else {

            return $this->maybeMakeResource('single', $model, 201);
        }

    }
120953
protected function getStore()
    {
        $store = $this->getSessionContainer();

        if ( empty( $store['stack'] ) )
        {
            $store['stack'] = array();
        }

        if ( empty( $store['steps'] ) )
        {
            $store['steps'] = array();
        }

        return $store;
    }
1152051
public function getCacheStore(): ?Store
    {
        if (!$this->hasCacheStore()) {
            $this->setCacheStore($this->getDefaultCacheStore());
        }
        return $this->cacheStore;
    }
1349236
public function getUserGroupManager()
    {
        if ($this->userGroupManager != null) {
            return $this->userGroupManager;
        }

        $this->userGroupManager = new UserGroupManager($this->options, $this->getUserService(), $this->getContentService(), $this->getContentTypeService());

        if ($this->logger) {
            $this->userGroupManager->setLogger($this->logger);
        }

        return $this->userGroupManager;
    }
378259
public static function getInstance()
    {
        if (is_null(self::$instance)) {
            throw new \RuntimeException('You must first create the singleton instance with createInstance().');
        }
        self::$instance->setGlobalsFromSugar();
        self::$instance->chdirToSugarDir();

        return self::$instance;
    }
751330
private IEntityGroup instanceFromResultSet(ResultSet rs) throws SQLException, GroupsException {
        IEntityGroup eg = null;

        String key = rs.getString(1);
        String creatorID = rs.getString(2);
        Integer entityTypeID = rs.getInt(3);
        Class entityType = EntityTypesLocator.getEntityTypes().getEntityTypeFromID(entityTypeID);
        String groupName = rs.getString(4);
        String description = rs.getString(5);

        if (key != null) {
            eg = newInstance(key, entityType, creatorID, groupName, description);
        }

        return eg;
    }
412225
protected static function storage()
    {
        if (self::$storage) {
            return self::$storage;
        }
        $className = self::getStorageClassName();
        if (!class_exists($className)) {
            throw new LaravelSmsException("Generate storage failed, the class [$className] does not exists.");
        }
        $store = new $className();
        if (!($store instanceof Storage)) {
            throw new LaravelSmsException("Generate storage failed, the class [$className] does not implement the interface [Toplan\\Sms\\Storage].");
        }

        return self::$storage = $store;
    }
4288
public static function getInstance()
    {
        $fileManager    = new FileManager();
        $serviceManager = ZendFramework2Environnement::getDependence($fileManager);
        $entityManager  = $serviceManager->get('doctrine.entitymanager.orm_default');

        if (($entityManager instanceof EntityManager) === false) {
            throw new \Exception(
                sprintf(
                    'Service manager return instanceof "%s" instead of "%s"',
                    is_object($entityManager) === true ? get_class($entityManager) : gettype($entityManager),
                    'Doctrine\ORM\EntityManager'
                )
            );
        }

        return new Doctrine2MetaDataDAO($entityManager);
    }
511466
protected function getStore()
    {
        if (!$this->store) {
            $this->store = $this->getServiceName();
        }

        $storeService = $this->pack->getPackName().'.store.'.$this->store;

        if (!$this->app[$storeService]) {
            throw new \Exception('O store '.$storeService.' não foi registrado na aplicação!');
        }

        return $this->app[$storeService];
    }