Lines Matching defs:id

219                     $id = array_search($val, $metawords, true);
220 if ($id === false) {
222 $id = count($metawords);
223 $metawords[$id] = $val;
224 $metaidx[$id] = '';
228 if (isset($val_idx[$id]) && $val_idx[$id] <= 0) {
229 $val_idx[$id] = 0;
231 $val_idx[$id] = 1;
240 foreach ($val_idx as $id => $action) {
242 $metaidx[$id] = $this->updateTuple($metaidx[$id], $pid, 0);
244 unset($val_idx[$id]);
246 $metaidx[$id] = $this->updateTuple($metaidx[$id], $pid, 1);
280 $id = array_search($oldpage, $pages, true);
281 if ($id === false) {
296 $pages[$id] = $newpage;
340 [$id, $count] = explode('*', $part);
341 $newindexline = $this->updateTuple($newindexline, $id, $count);
343 $keyline = explode(':', $pagekeys[$id]);
350 $pagekeys[$id] = implode(':', $keyline);
440 foreach ($val_idx as $id) {
441 if ($id === '') continue;
442 $meta_idx[$id] = $this->updateTuple($meta_idx[$id], $pid, 0);
547 * @return bool|int The page id on success, false on error
573 * @return bool|int The page id on success, false on error
588 * Get the page id of a numeric PID
590 * @param int $pid The PID to get the page id for
591 * @return string The page id
762 * @param array $result Set to word => array("length*id" ...)
763 * @return array Set to length => array(id ...)
1037 * @param int $id the line number
1042 protected function getIndexKey($idx, $suffix, $id)
1051 if (++$ln == $id) break;
1062 * @param int $id the line number
1068 protected function saveIndexKey($idx, $suffix, $id, $line)
1080 fwrite($fh, (++$ln == $id) ? $line : $curline);
1082 if ($id > $ln) {
1083 while ($id > ++$ln)
1090 while ($id > ++$ln)
1114 $id = array_search($value, $index, true);
1115 if ($id === false) {
1116 $id = count($index);
1117 $index[$id] = $value;
1123 return $id;
1180 * @param string|int $id
1184 protected function updateTuple($line, $id, $count)
1187 $line = preg_replace('/(^|:)' . preg_quote($id, '/') . '\*\d*/', '', $line);
1192 return "$id*$count:" . $line;
1194 return "$id*$count";