00001 <?PHP
00002
00006 class MysqlSystemVariables
00007 {
00008
00013 public function __construct(Database $DB)
00014 {
00015 $DB->Query("SHOW VARIABLES");
00016 while (FALSE !== ($Row = $DB->FetchRow()))
00017 {
00018 $this->Variables[$Row["Variable_name"]] = $Row["Value"];
00019 }
00020 }
00021
00027 public function Get($Variable)
00028 {
00029 return (isset($this->Variables[$Variable]))
00030 ? $this->Variables[$Variable] : NULL;
00031 }
00032
00038 public function GetStopWords()
00039 {
00040 # default stop word list for MySQL 5
00041 static $DefaultList = array(
00042 "a's",
00043 "able",
00044 "about",
00045 "above",
00046 "according",
00047 "accordingly",
00048 "across",
00049 "actually",
00050 "after",
00051 "afterwards",
00052 "again",
00053 "against",
00054 "ain't",
00055 "all",
00056 "allow",
00057 "allows",
00058 "almost",
00059 "alone",
00060 "along",
00061 "already",
00062 "also",
00063 "although",
00064 "always",
00065 "am",
00066 "among",
00067 "amongst",
00068 "an",
00069 "and",
00070 "another",
00071 "any",
00072 "anybody",
00073 "anyhow",
00074 "anyone",
00075 "anything",
00076 "anyway",
00077 "anyways",
00078 "anywhere",
00079 "apart",
00080 "appear",
00081 "appreciate",
00082 "appropriate",
00083 "are",
00084 "aren't",
00085 "around",
00086 "as",
00087 "aside",
00088 "ask",
00089 "asking",
00090 "associated",
00091 "at",
00092 "available",
00093 "away",
00094 "awfully",
00095 "be",
00096 "became",
00097 "because",
00098 "become",
00099 "becomes",
00100 "becoming",
00101 "been",
00102 "before",
00103 "beforehand",
00104 "behind",
00105 "being",
00106 "believe",
00107 "below",
00108 "beside",
00109 "besides",
00110 "best",
00111 "better",
00112 "between",
00113 "beyond",
00114 "both",
00115 "brief",
00116 "but",
00117 "by",
00118 "c'mon",
00119 "c's",
00120 "came",
00121 "can",
00122 "can't",
00123 "cannot",
00124 "cant",
00125 "cause",
00126 "causes",
00127 "certain",
00128 "certainly",
00129 "changes",
00130 "clearly",
00131 "co",
00132 "com",
00133 "come",
00134 "comes",
00135 "concerning",
00136 "consequently",
00137 "consider",
00138 "considering",
00139 "contain",
00140 "containing",
00141 "contains",
00142 "corresponding",
00143 "could",
00144 "couldn't",
00145 "course",
00146 "currently",
00147 "definitely",
00148 "described",
00149 "despite",
00150 "did",
00151 "didn't",
00152 "different",
00153 "do",
00154 "does",
00155 "doesn't",
00156 "doing",
00157 "don't",
00158 "done",
00159 "down",
00160 "downwards",
00161 "during",
00162 "each",
00163 "edu",
00164 "eg",
00165 "eight",
00166 "either",
00167 "else",
00168 "elsewhere",
00169 "enough",
00170 "entirely",
00171 "especially",
00172 "et",
00173 "etc",
00174 "even",
00175 "ever",
00176 "every",
00177 "everybody",
00178 "everyone",
00179 "everything",
00180 "everywhere",
00181 "ex",
00182 "exactly",
00183 "example",
00184 "except",
00185 "far",
00186 "few",
00187 "fifth",
00188 "first",
00189 "five",
00190 "followed",
00191 "following",
00192 "follows",
00193 "for",
00194 "former",
00195 "formerly",
00196 "forth",
00197 "four",
00198 "from",
00199 "further",
00200 "furthermore",
00201 "get",
00202 "gets",
00203 "getting",
00204 "given",
00205 "gives",
00206 "go",
00207 "goes",
00208 "going",
00209 "gone",
00210 "got",
00211 "gotten",
00212 "greetings",
00213 "had",
00214 "hadn't",
00215 "happens",
00216 "hardly",
00217 "has",
00218 "hasn't",
00219 "have",
00220 "haven't",
00221 "having",
00222 "he",
00223 "he's",
00224 "hello",
00225 "help",
00226 "hence",
00227 "her",
00228 "here",
00229 "here's",
00230 "hereafter",
00231 "hereby",
00232 "herein",
00233 "hereupon",
00234 "hers",
00235 "herself",
00236 "hi",
00237 "him",
00238 "himself",
00239 "his",
00240 "hither",
00241 "hopefully",
00242 "how",
00243 "howbeit",
00244 "however",
00245 "i'd",
00246 "i'll",
00247 "i'm",
00248 "i've",
00249 "ie",
00250 "if",
00251 "ignored",
00252 "immediate",
00253 "in",
00254 "inasmuch",
00255 "inc",
00256 "indeed",
00257 "indicate",
00258 "indicated",
00259 "indicates",
00260 "inner",
00261 "insofar",
00262 "instead",
00263 "into",
00264 "inward",
00265 "is",
00266 "isn't",
00267 "it",
00268 "it'd",
00269 "it'll",
00270 "it's",
00271 "its",
00272 "itself",
00273 "just",
00274 "keep",
00275 "keeps",
00276 "kept",
00277 "know",
00278 "knows",
00279 "known",
00280 "last",
00281 "lately",
00282 "later",
00283 "latter",
00284 "latterly",
00285 "least",
00286 "less",
00287 "lest",
00288 "let",
00289 "let's",
00290 "like",
00291 "liked",
00292 "likely",
00293 "little",
00294 "look",
00295 "looking",
00296 "looks",
00297 "ltd",
00298 "mainly",
00299 "many",
00300 "may",
00301 "maybe",
00302 "me",
00303 "mean",
00304 "meanwhile",
00305 "merely",
00306 "might",
00307 "more",
00308 "moreover",
00309 "most",
00310 "mostly",
00311 "much",
00312 "must",
00313 "my",
00314 "myself",
00315 "name",
00316 "namely",
00317 "nd",
00318 "near",
00319 "nearly",
00320 "necessary",
00321 "need",
00322 "needs",
00323 "neither",
00324 "never",
00325 "nevertheless",
00326 "new",
00327 "next",
00328 "nine",
00329 "no",
00330 "nobody",
00331 "non",
00332 "none",
00333 "noone",
00334 "nor",
00335 "normally",
00336 "not",
00337 "nothing",
00338 "novel",
00339 "now",
00340 "nowhere",
00341 "obviously",
00342 "of",
00343 "off",
00344 "often",
00345 "oh",
00346 "ok",
00347 "okay",
00348 "old",
00349 "on",
00350 "once",
00351 "one",
00352 "ones",
00353 "only",
00354 "onto",
00355 "or",
00356 "other",
00357 "others",
00358 "otherwise",
00359 "ought",
00360 "our",
00361 "ours",
00362 "ourselves",
00363 "out",
00364 "outside",
00365 "over",
00366 "overall",
00367 "own",
00368 "particular",
00369 "particularly",
00370 "per",
00371 "perhaps",
00372 "placed",
00373 "please",
00374 "plus",
00375 "possible",
00376 "presumably",
00377 "probably",
00378 "provides",
00379 "que",
00380 "quite",
00381 "qv",
00382 "rather",
00383 "rd",
00384 "re",
00385 "really",
00386 "reasonably",
00387 "regarding",
00388 "regardless",
00389 "regards",
00390 "relatively",
00391 "respectively",
00392 "right",
00393 "said",
00394 "same",
00395 "saw",
00396 "say",
00397 "saying",
00398 "says",
00399 "second",
00400 "secondly",
00401 "see",
00402 "seeing",
00403 "seem",
00404 "seemed",
00405 "seeming",
00406 "seems",
00407 "seen",
00408 "self",
00409 "selves",
00410 "sensible",
00411 "sent",
00412 "serious",
00413 "seriously",
00414 "seven",
00415 "several",
00416 "shall",
00417 "she",
00418 "should",
00419 "shouldn't",
00420 "since",
00421 "six",
00422 "so",
00423 "some",
00424 "somebody",
00425 "somehow",
00426 "someone",
00427 "something",
00428 "sometime",
00429 "sometimes",
00430 "somewhat",
00431 "somewhere",
00432 "soon",
00433 "sorry",
00434 "specified",
00435 "specify",
00436 "specifying",
00437 "still",
00438 "sub",
00439 "such",
00440 "sup",
00441 "sure",
00442 "t's",
00443 "take",
00444 "taken",
00445 "tell",
00446 "tends",
00447 "th",
00448 "than",
00449 "thank",
00450 "thanks",
00451 "thanx",
00452 "that",
00453 "that's",
00454 "thats",
00455 "the",
00456 "their",
00457 "theirs",
00458 "them",
00459 "themselves",
00460 "then",
00461 "thence",
00462 "there",
00463 "there's",
00464 "thereafter",
00465 "thereby",
00466 "therefore",
00467 "therein",
00468 "theres",
00469 "thereupon",
00470 "these",
00471 "they",
00472 "they'd",
00473 "they'll",
00474 "they're",
00475 "they've",
00476 "think",
00477 "third",
00478 "this",
00479 "thorough",
00480 "thoroughly",
00481 "those",
00482 "though",
00483 "three",
00484 "through",
00485 "throughout",
00486 "thru",
00487 "thus",
00488 "to",
00489 "together",
00490 "too",
00491 "took",
00492 "toward",
00493 "towards",
00494 "tried",
00495 "tries",
00496 "truly",
00497 "try",
00498 "trying",
00499 "twice",
00500 "two",
00501 "un",
00502 "under",
00503 "unfortunately",
00504 "unless",
00505 "unlikely",
00506 "until",
00507 "unto",
00508 "up",
00509 "upon",
00510 "us",
00511 "use",
00512 "used",
00513 "useful",
00514 "uses",
00515 "using",
00516 "usually",
00517 "value",
00518 "various",
00519 "very",
00520 "via",
00521 "viz",
00522 "vs",
00523 "want",
00524 "wants",
00525 "was",
00526 "wasn't",
00527 "way",
00528 "we",
00529 "we'd",
00530 "we'll",
00531 "we're",
00532 "we've",
00533 "welcome",
00534 "well",
00535 "went",
00536 "were",
00537 "weren't",
00538 "what",
00539 "what's",
00540 "whatever",
00541 "when",
00542 "whence",
00543 "whenever",
00544 "where",
00545 "where's",
00546 "whereafter",
00547 "whereas",
00548 "whereby",
00549 "wherein",
00550 "whereupon",
00551 "wherever",
00552 "whether",
00553 "which",
00554 "while",
00555 "whither",
00556 "who",
00557 "who's",
00558 "whoever",
00559 "whole",
00560 "whom",
00561 "whose",
00562 "why",
00563 "will",
00564 "willing",
00565 "wish",
00566 "with",
00567 "within",
00568 "without",
00569 "won't",
00570 "wonder",
00571 "would",
00572 "would",
00573 "wouldn't",
00574 "yes",
00575 "yet",
00576 "you",
00577 "you'd",
00578 "you'll",
00579 "you're",
00580 "you've",
00581 "your",
00582 "yours",
00583 "yourself",
00584 "yourselves",
00585 "zero");
00586
00587 # actual list
00588 if (is_readable($this->Get("ft_stopword_file")))
00589 {
00590 static $ActualList;
00591 if (!isset($ActualList))
00592 {
00593 $ActualList = explode("\n",
00594 file_get_contents($this->Get("ft_stopword_file")));
00595 }
00596 return $ActualList;
00597 }
00598
00599 # fall back to default list
00600 else
00601 {
00602 return $DefaultList;
00603 }
00604 }
00605
00606 private $Variables;
00607
00608 }