src/DataStore/src/DataStore/Traits/AutoIdGeneratorTrait.php
protected function generateId()
    {
        trigger_error(AutoIdGeneratorTrait::class . ' trait is deprecated', E_USER_DEPRECATED);

        $tryCount = 0;

        do {
            $id = $this->idGenerator->generate();
            $tryCount++;

            if ($tryCount >= $this->getIdGenerateMaxTry()) {
                throw new DataStoreException("Can't generate id.");
            }
        } while ($this->has($id));

        return $id;
    }
protected function generateId()
    {
        trigger_error(AutoIdGeneratorTrait::class . ' trait is deprecated', E_USER_DEPRECATED);

        $tryCount = 0;

        do {
            $id = $this->idGenerator->generate();
            $tryCount++;

            if ($tryCount >= $this->getIdGenerateMaxTry()) {
                throw new DataStoreException("Can't generate id.");
            }
        } while ($this->has($id));

        return $id;
    }
protected function generateId ( ) { trigger_error ( AutoIdGeneratorTrait :: class . ' trait is deprecated' , E_USER_DEPRECATED ) ; $ tryCount = 0 ; do { $ id = $ this -> idGenerator -> generate ( ) ; $ tryCount ++ ; if ( $ tryCount >= $ this -> getIdGenerateMaxTry ( ) ) { throw new DataStoreException ( "Can't generate id." ) ; } } while ( $ this -> has ( $ id ) ) ; return $ id ; }
Generates an arbitrary length string of cryptographic random bytes

@return string
@throws DataStoreException
Generates an arbitrary length string of cryptographic random bytes