@@ -18,7 +18,7 @@ composer require rancoud/session
1818By default session is in read only (option read_and_close = 1).
1919You can specify it using ` Session::setReadWrite() ` or ` Session::setReadOnly() `
2020
21- Session::start() is not needed, but:
21+ Session::start() is not needed, but:
2222* Session will automatically start in read only when using ` get, has, hasKeyAndValue, getAll `
2323* Session will automatically start in write mode when using ` set, remove, getAndRemove, keepFlash, gc, regenerate `
2424
@@ -98,86 +98,88 @@ $value = Session::get('key');
9898```
9999
100100## Session
101- ### Static General Commands
102- * start([ options: array = [ ]] ): void
103- * regenerate(): bool
104- * destroy(): bool
105- * commit(): void
106- * rollback(): bool
107- * unsaved(): bool
108- * hasStarted(): bool
109- * getId(): string
110- * setId(id: string): string
111- * gc(): void
112- * setReadOnly(): void
113- * setReadWrite(): void
101+ ### Static General Commands
102+ * start([ options: array = [ ]] ): void
103+ * regenerate(): bool
104+ * destroy(): bool
105+ * commit(): void
106+ * rollback(): bool
107+ * unsaved(): bool
108+ * hasStarted(): bool
109+ * getId(): string
110+ * setId(id: string): string
111+ * gc(): void
112+ * setReadOnly(): void
113+ * setReadWrite(): void
114114* isReadOnly(): bool
115115
116116### Static Variables $_ SESSION access
117- * set(key: string, value: mixed): void
118- * get(key: string): mixed
119- * getAll(): array
120- * getAndRemove(key: string): mixed
121- * has(key: string): bool
122- * hasKeyAndValue(key: string, value: mixed): bool
123- * remove(key: string): void
117+ * set(key: string, value: mixed): void
118+ * get(key: string): mixed
119+ * getAll(): array
120+ * getAndRemove(key: string): mixed
121+ * has(key: string): bool
122+ * hasKeyAndValue(key: string, value: mixed): bool
123+ * remove(key: string): void
124124
125125### Static Variables flash access
126126Flash data are store in a separate variable.
127127They will dissapear at the end of the script execution or after ` commit() ` ` unsaved() ` .
128128You can use keepFlash for saving it in $_ SESSION.
129- When flash data is restore, it will be delete in $_ SESSION.
129+ When flash data is restore, it will be delete in $_ SESSION.
130130
131- * setFlash(key: string, value: mixed): void
132- * getFlash(key: string): mixed
133- * getAllFlash(): array
134- * hasFlash(key: string): bool
135- * hasFlashKeyAndValue(key: string, value: mixed): bool
136- * keepFlash([ keys: array = [ ]] ): void
131+ * setFlash(key: string, value: mixed): void
132+ * getFlash(key: string): mixed
133+ * getAllFlash(): array
134+ * hasFlash(key: string): bool
135+ * hasFlashKeyAndValue(key: string, value: mixed): bool
136+ * keepFlash([ keys: array = [ ]] ): void
137137
138- ### Static Options
139- * setOption(key: string, value): void
140- * setOptions(options: array): void
141- * getOption(key: string): mixed
138+ ### Static Options
139+ * setOption(key: string, value): void
140+ * setOptions(options: array): void
141+ * getOption(key: string): mixed
142142
143143### Static Driver
144- * getDriver(): \SessionHandlerInterface
144+ * getDriver(): \SessionHandlerInterface
145145
146146#### Static PHP Session Default Driver
147- * useDefaultDriver(): void
148- * useDefaultEncryptionDriver(key: string, [ method: string|null = null] ): void
149- * setLengthSessionID(length: int): void
150- * getLengthSessionID(): int
147+ * useDefaultDriver(): void
148+ * useDefaultEncryptionDriver(key: string, [ method: string|null = null] ): void
149+ * setLengthSessionID(length: int): void
150+ * getLengthSessionID(): int
151151
152152#### Static File Driver
153- * useFileDriver(): void
154- * useFileEncryptionDriver(key: string, [ method: string|null = null] ): void
155- * setPrefixForFile(prefix: string): void
153+ * useFileDriver(): void
154+ * useFileEncryptionDriver(key: string, [ method: string|null = null] ): void
155+ * setPrefixForFile(prefix: string): void
156156* setLengthSessionID(length: int): void
157157* getLengthSessionID(): int
158158
159159#### Static Database Driver
160- * useNewDatabaseDriver(configuration: \Rancoud\Database\Configurator|array): void
161- * useCurrentDatabaseDriver(databaseInstance: \Rancoud\Database\Database): void
162- * useNewDatabaseEncryptionDriver(configuration: \Rancoud\Database\Configurator|array, key: string, [ method: string = null] ): void
163- * useCurrentDatabaseEncryptionDriver(databaseInstance: \Rancoud\Database\Database, key: string, [ method: string = null] ): void
164- * setUserIdForDatabase(userId: int): void
160+ * useNewDatabaseDriver(configuration: \Rancoud\Database\Configurator|array): void
161+ * useCurrentDatabaseDriver(databaseInstance: \Rancoud\Database\Database): void
162+ * useNewDatabaseEncryptionDriver(configuration: \Rancoud\Database\Configurator|array, key: string, [ method: string = null] ): void
163+ * useCurrentDatabaseEncryptionDriver(databaseInstance: \Rancoud\Database\Database, key: string, [ method: string = null] ): void
164+ * setUserIdForDatabase(userId: int): void
165165* setLengthSessionID(length: int): void
166166* getLengthSessionID(): int
167+ * deleteUserSessions(int $userID): void
168+ * deleteAnonymousSessions(): int
167169
168170#### Static Redis Driver
169- * useNewRedisDriver(configuration: array|string): void
170- * useCurrentRedisDriver(redisInstance: \Predis\Client): void
171- * useNewRedisEncryptionDriver(configuration: array|string, key: string, [ method: string = null] ): void
172- * useCurrentRedisEncryptionDriver(redisInstance: \Predis\Client, key: string, [ method: string = null] ): void
171+ * useNewRedisDriver(configuration: array|string): void
172+ * useCurrentRedisDriver(redisInstance: \Predis\Client): void
173+ * useNewRedisEncryptionDriver(configuration: array|string, key: string, [ method: string = null] ): void
174+ * useCurrentRedisEncryptionDriver(redisInstance: \Predis\Client, key: string, [ method: string = null] ): void
173175* setLengthSessionID(length: int): void
174- * getLengthSessionID(): int
176+ * getLengthSessionID(): int
175177
176178#### Static Custom Driver
177- * useCustomDriver(customDriver: \SessionHandlerInterface): void
179+ * useCustomDriver(customDriver: \SessionHandlerInterface): void
178180
179181## Session options
180- List of session options you can change:
182+ List of session options you can change:
181183* save_path
182184* name
183185* save_handler
0 commit comments