Lines Matching refs:value

26      * An empty value erases the page.
157 * An empty value will erase the key.
158 * The $key parameter can be an array to add multiple keys. $value will
162 * @param mixed $key a key string or array of key=>value pairs
163 * @param mixed $value the value or list of values
169 public function addMetaKeys($page, $key, $value = null)
172 $key = [$key => $value];
173 } elseif (!is_null($value)) {
174 // $key is array, but $value is not null
175 trigger_error("array passed to addMetaKeys but value is not null", E_USER_WARNING);
190 $value = $key['title'];
191 if (is_array($value)) {
192 $value = $value[0];
194 $this->saveIndexKey('title', '', $pid, $value);
227 // test if value is already in the index
312 * Renames a meta value in the index. This doesn't change the meta value in the pages, it assumes that all pages
315 * @param string $key The metadata key of which a value shall be changed
316 * @param string $oldvalue The old value that shall be renamed
317 * @param string $newvalue The new value to which the old value shall be renamed, if exists values will be merged
318 * @return bool|string If renaming the value has been successful, false or error message on error.
333 // okay, now we have two entries for the same value. we need to merge them.
344 // remove old meta value
346 // add new meta value when not already present
606 * number of times that token appears on the page as value.
656 * comparison function. The function will be called with the $value being
662 * @param string $value search term to look for, must be a string or array of strings
664 * @return array lists with page names, keys are query values if $value is array
669 public function lookupKey($key, &$value, $func = null)
671 if (!is_array($value))
672 $value_array = [$value];
673 else $value_array =& $value;
675 // the matching ids for the provided value(s)
741 // parse the tuples of the form page_id*1:page2_id*1 and so on, return value
749 if (!is_array($value)) $result = $result[$value];
1102 * Retrieve or insert a value in the index.
1106 * @param string $value line to find in the index
1107 * @return int|bool line number of the value in the index or false if writing the index failed
1111 protected function addIndexKey($idx, $suffix, $value)
1114 $id = array_search($value, $index, true);
1117 $index[$id] = $value;