33 $this->supportedValues = $supported;
34 $this->defaultValue = reset( $supported );
55 foreach ( $weights as $name => &$weight ) {
56 if ( $name ===
'*' || $name ===
'*/*' ) {
58 } elseif ( substr( $name, -2 ) ===
'/*' ) {
67 $weights = array_filter( $weights );
70 $preferences = array_reverse( array_keys( $weights ) );
90 foreach ( $preferences as
$value ) {
91 foreach ( $this->supportedValues as $supported ) {
119 if ( strcasecmp( $accepted, $supported ) === 0 ) {
124 if ( $accepted ===
'*' || $accepted ===
'*/*' ) {
129 if ( substr( $accepted, -2 ) ===
'/*'
130 && strncasecmp( $accepted, $supported, strlen( $accepted ) - 2 ) === 0
The wiki should then use memcached to cache various data To use multiple just add more items to the array To increase the weight of a make its entry a array("192.168.0.1:11211", 2))