[ Index ] |
PHP Cross Reference of BuddyPress |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * BackPress Options API. 4 * 5 * This is in place for the multiple projects that use BackPress to have options 6 * and transients but not rely on the WordPress options API. 7 * 8 * @since r132 9 */ 10 11 /** 12 * Interface for BP_Options; 13 * 14 * A BP_Options class must be implemented by the host application for 15 * BackPress to operate. This interface supplies a boilerplate for that 16 * class but can only be implemented in PHP 5 environments. 17 * 18 * @since r132 19 * @package BackPress 20 */ 21 interface BP_Options_Interface 22 { 23 /** 24 * Retrieve the prefix to be appended to the beginning of the option key. 25 * 26 * @since r132 27 */ 28 function prefix(); 29 30 /** 31 * Retrieve the value of the option. 32 * 33 * Here is a minimum set of values required (from bbPress) 34 * - application_id : An id for the application, use this when running multiple applications from the same code 35 * - application_uri : The base URI of the application 36 * - cron_uri : The URI that processes cron jobs 37 * - wp_http_version : This is the version sent when making remote HTTP requests 38 * - hash_function_name : The function used to create unique hashes ( see wp_hash() ) 39 * - language_locale : The current locale 40 * - language_directory : The directory containing language (po, mo) files 41 * - charset : The charset to use when appropriate (usually UTF-8) 42 * - gmt_offset : The GMT offset as a positive or negative float 43 * - timezone_string : The timezone in Zoneinfo format 44 * 45 * @since r132 46 * 47 * @param string $option Option name. 48 */ 49 function get( $option ); 50 51 /** 52 * Adds an option with given value. 53 * 54 * @since r132 55 * 56 * @param string $option Option name. 57 * @param mixed $value Option value. 58 */ 59 function add( $option, $value ); 60 61 /** 62 * Updates an existing option with a given value. 63 * 64 * @since r132 65 * 66 * @param string $option Option name. 67 * @param mixed $value Option value. 68 */ 69 function update( $option, $value ); 70 71 /** 72 * Deletes an existing option. 73 * 74 * @since r132 75 * 76 * @param string $option Option name. 77 */ 78 function delete( $option ); 79 } // END interface BP_Options_Interface 80 81 /** 82 * Interface for BP_Transients; 83 * 84 * A BP_Transients class must be implemented by the host application for 85 * BackPress to operate. This interface supplies a boilerplate for that 86 * class but can only be implemented in PHP 5 environments. 87 * 88 * @since r205 89 * @package BackPress 90 */ 91 interface BP_Transients_Interface 92 { 93 /** 94 * Retrieve the prefix to be appended to the beginning of the transient key. 95 * 96 * @since r205 97 */ 98 function prefix(); 99 100 /** 101 * Retrieve the value of the transient. 102 * 103 * @since r205 104 * 105 * @param string $transient Transient name. 106 */ 107 function get( $transient ); 108 109 /** 110 * Sets the value of a transient with a given value. 111 * 112 * @since r205 113 * 114 * @param string $transient Transient name. 115 * @param mixed $value Transient value. 116 * @param integer $expiration The time in seconds the transient will be held for. Default is 0, meaning it is held indefinitely. 117 */ 118 function set( $transient, $value, $expiration = 0 ); 119 120 /** 121 * Deletes an existing transient. 122 * 123 * @since r205 124 * 125 * @param string $transient Transient name. 126 */ 127 function delete( $transient ); 128 } // END Interface BP_Transients
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri Nov 22 01:00:56 2024 | Cross-referenced by PHPXref 0.7.1 |