[ Index ] |
PHP Cross Reference of YOURLS |
[Source view] [Print] [Project Stats]
YOURLS Options
File Size: | 254 lines (8 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
Options:: (6 methods):
__construct()
get_all_options()
get()
update()
add()
delete()
__construct(YDB $ydb) X-Ref |
Hold a copy of the all mighty $ydb global |
get_all_options() X-Ref |
Read all options from DB at once, return bool since: 1.7.3 return: bool True on success, false on failure (eg table missing or empty) |
get($name, $default) X-Ref |
Get option value from DB (or from cache if available). Return value or $default if not found since: 1.7.3 return: mixed Value set for the option param: string $name Option name param: string $default Value to return if option doesn't exist |
update($name, $newvalue) X-Ref |
Update (add if doesn't exist) an option to DB since: 1.7.3 return: bool False if value was not updated, true otherwise. param: string $name Option name. Expected to not be SQL-escaped. param: mixed $newvalue Option value. |
add($name, $value) X-Ref |
Add an option to the DB since: 1.7.3 return: bool False if option was not added (eg already exists), true otherwise. param: string $name Name of option to add. Expected to not be SQL-escaped. param: mixed $value Option value. Must be serializable if non-scalar. Expected to not be SQL-escaped. |
delete($name) X-Ref |
Delete option from DB since: 1.7.3 return: bool False if option was not deleted (eg not found), true otherwise. param: string $name Option name to delete. Expected to not be SQL-escaped. |
Generated: Tue Jan 21 05:10:11 2025 | Cross-referenced by PHPXref 0.7.1 |