[ Index ] |
|
Code source de SPIP Agora 1.4 |
1 <?php 2 /***************************************************** 3 * This file is part of Agora, web based content management system. 4 * 5 * Agora is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; version 2 of the License. 8 * 9 * Agora is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details (file "COPYING"). 13 * 14 * Copyright © Arnaud Martin, Antoine Pitrou et Philippe Rivière. 15 * List of authors detailed in "copyright_fr.html" file. 16 * E-mail : agora@sig.premier-ministre.gouv.fr 17 * Web site : http://www.agora.gouv.fr 18 *****************************************************/ 19 require_once dirname(__FILE__). "/AgoraCache.php"; 20 21 class groupe_mot_cache extends AgoraCache { 22 23 // {{{ properties 24 25 // {{{ constructor 26 27 /** 28 * groupe_mot_cache constructor. 29 * 30 * @access public 31 */ 32 33 function groupe_mot_cache ($cacheParams) { 34 $this->_objectMetier = &recuperer_instance_groupe_mot(true); 35 $this->_objectType = 'groupe_mot'; 36 37 $par = get_parent_class($this); 38 $res = $this->$par($cacheParams); 39 } 40 41 // }}} 42 43 // {{{ getGroupeId() 44 45 /** 46 * Returns the Group ID 47 * @return int 48 * @access public 49 */ 50 51 function getGroupeId () { 52 return $this->_objectMetier->_groupeId; 53 } 54 55 // }}} 56 57 // {{{ setGroupeId() 58 59 /** 60 * Sets the Groupe ID 61 * @param int 62 * @access public 63 */ 64 65 function setGroupeId ($groupeId) { 66 $this->_objectMetier->_groupeId = $groupeId; 67 } 68 69 // }}} 70 71 // {{{ getTitre() 72 73 /** 74 * Returns the group word title 75 * @return String 76 * @access public 77 */ 78 79 function getTitre () { 80 return $this->_objectMetier->_titre; 81 } 82 83 // }}} 84 85 // {{{ setTitre() 86 87 /** 88 * Sets the groupe word title 89 * @param String 90 * @access public 91 */ 92 93 function setTitre ($titre) { 94 $this->_objectMetier->_titre = $this->_objectMetier->corriger_caracteres($titre); 95 } 96 97 // }}} 98 99 // {{{ getUnSeul() 100 101 /** 102 * Returns the UnSeul 103 * @return String 104 * @access public 105 */ 106 107 function getUnSeul () { 108 return $this->_objectMetier->_unSeul; 109 } 110 111 // }}} 112 113 // {{{ setUnSeul() 114 115 /** 116 * Sets the UnSeul 117 * @param String 118 * @access public 119 */ 120 121 function setUnSeul ($unSeul) { 122 $this->_objectMetier->_unSeul = $this->_objectMetier->corriger_caracteres($unSeul); 123 } 124 125 // }}} 126 127 // {{{ getObligatoire() 128 129 /** 130 * Returns the obligatory 131 * @return String 132 * @access public 133 */ 134 135 function getObligatoire () { 136 return $this->_objectMetier->_obligatoire; 137 } 138 139 // }}} 140 141 // {{{ setObligatoire() 142 143 /** 144 * Sets the obligatory 145 * @param String 146 * @access public 147 */ 148 149 function setObligatoire ($obligatoire) { 150 $this->_objectMetier->_obligatoire = $this->_objectMetier->corriger_caracteres($obligatoire); 151 } 152 153 // }}} 154 155 // {{{ getCm() 156 157 /** 158 * Returns the cm 159 * @return String 160 * @access public 161 */ 162 163 function getCm () { 164 return $this->_objectMetier->_cm; 165 } 166 167 // }}} 168 169 // {{{ setCm() 170 171 /** 172 * Sets the cm 173 * @param String 174 * @access public 175 */ 176 177 function setCm ($cm) { 178 $this->_objectMetier->_cm = $this->_objectMetier->corriger_caracteres($cm); 179 } 180 181 // }}} 182 183 // {{{ getArticles() 184 185 /** 186 * Returns the articles 187 * @return String 188 * @access public 189 */ 190 191 function getArticles () { 192 return $this->_objectMetier->_articles; 193 } 194 195 // }}} 196 197 // {{{ setArticles() 198 199 /** 200 * Sets the articles 201 * @param String 202 * @access public 203 */ 204 205 function setArticles ($articles) { 206 $this->_objectMetier->_articles = $this->_objectMetier->corriger_caracteres($articles); 207 } 208 209 // }}} 210 211 // {{{ getBreves() 212 213 /** 214 * Returns the breves 215 * @return String 216 * @access public 217 */ 218 219 function getBreves () { 220 return $this->_objectMetier->_breves; 221 } 222 223 // }}} 224 225 // {{{ setBreves() 226 227 /** 228 * Sets the breves 229 * @param String 230 * @access public 231 */ 232 233 function setBreves ($breves) { 234 $this->_objectMetier->_breves = $this->_objectMetier->corriger_caracteres($breves); 235 } 236 237 // }}} 238 239 // {{{ getRubriques() 240 241 /** 242 * Returns the rubriques 243 * @return String 244 * @access public 245 */ 246 247 function getRubriques () { 248 return $this->_objectMetier->_rubriques; 249 } 250 251 // }}} 252 253 // {{{ setRubriques() 254 255 /** 256 * Sets the rubriques 257 * @param String 258 * @access public 259 */ 260 261 function setRubriques ($rubriques) { 262 $this->_objectMetier->_rubriques = $this->_objectMetier->corriger_caracteres($rubriques); 263 } 264 265 // }}} 266 267 // {{{ getSyndic() 268 269 /** 270 * Returns the syndic 271 * @return String 272 * @access public 273 */ 274 275 function getSyndic () { 276 return $this->_objectMetier->_syndic; 277 } 278 279 // }}} 280 281 // {{{ setSyndic() 282 283 /** 284 * Sets the syndic 285 * @param String 286 * @access public 287 */ 288 289 function setSyndic ($syndic) { 290 $this->_objectMetier->_syndic = $this->_objectMetier->corriger_caracteres($syndic); 291 } 292 293 // }}} 294 295 // {{{ getSyndic() 296 297 /** 298 * Returns the auteurs 299 * @return String 300 * @access public 301 */ 302 303 function getAuteurs () { 304 return $this->_objectMetier->_auteurs; 305 } 306 307 // }}} 308 309 // {{{ setAuteurs() 310 311 /** 312 * Sets the auteurs 313 * @param String 314 * @access public 315 */ 316 317 function setAuteurs ($auteurs) { 318 $this->_objectMetier->_auteurs = $this->_objectMetier->corriger_caracteres($auteurs); 319 $this->_objectMetier->setCm($this->_objectMetier->_auteurs); 320 } 321 322 // }}} 323 324 // {{{ getforum() 325 326 /** 327 * Returns the forum 328 * @return String 329 * @access public 330 */ 331 332 function getforum () { 333 return $this->_objectMetier->_forum; 334 } 335 336 // }}} 337 338 // {{{ setforum() 339 340 /** 341 * Sets the forum 342 * @param String 343 * @access public 344 */ 345 346 function setforum ($forum) { 347 $this->_objectMetier->_forum = $this->_objectMetier->corriger_caracteres($forum); 348 } 349 350 // }}} 351 352 // {{{ getMajDate() 353 354 /** 355 * Returns the word update date 356 * @return Date 357 * @access public 358 */ 359 360 function getMajDate () { 361 return $this->_objectMetier->_majDate; 362 } 363 364 // }}} 365 366 // {{{ setMajDate() 367 368 /** 369 * Sets the word update date 370 * @param Date 371 * @access public 372 */ 373 374 function setMajDate ($majDate) { 375 $this->_objectMetier->_majDate = $majDate; 376 } 377 378 // }}} 379 380 // {{{ getProfils() 381 382 /** 383 * Returns the profils 384 * @return int 385 * @access public 386 */ 387 388 function getProfils () { 389 return $this->_objectMetier->_profils; 390 } 391 392 // }}} 393 394 // {{{ setProfils() 395 396 /** 397 * Sets the profils 398 * @param int 399 * @access public 400 */ 401 402 function setProfils ($profils) { 403 $this->_objectMetier->_profils = $profils; 404 } 405 406 // }}} 407 408 // {{{ create() 409 410 function create () { 411 $this->flushBothCache(); 412 return $this->_objectMetier->create(); 413 } 414 415 // }}} 416 417 // {{{ update() 418 419 function update () { 420 $this->flushBothCache(); 421 return $this->_objectMetier->update(); 422 } 423 424 // }}} 425 426 // {{{ load() 427 428 function load ($idGroupe) { 429 return $this->_objectMetier->load($idGroupe); 430 } 431 432 // }}} 433 434 // {{{ delete() 435 436 function delete ($idGroupe) { 437 $this->flushBothCache(); 438 return $this->_objectMetier->delete($idGroupe); 439 } 440 441 // }}} 442 443 // {{{ _fetchData() 444 445 function _fetchData ($row) { 446 return $this->_objectMetier->_fetchData($row); 447 } 448 449 // }}} 450 451 // {{{ deleteForTitleAndNotGroupeId($titre, $id_groupe) 452 453 function deleteForTitleAndNotGroupeId ($titre, $id_groupe) { 454 $this->flushBothCache(); 455 return $this->_objectMetier->deleteForTitleAndNotGroupeId($titre, $id_groupe); 456 } 457 458 // }}} 459 460 // {{{ deleteMajDate($myDate) 461 462 /** 463 * This method is used to delete all word groups former to mydate 464 * @access public 465 */ 466 467 function deleteMajDate ($myDate) { 468 $this->flushBothCache(); 469 return $this->_objectMetier->deleteMajDate($myDate); 470 } 471 472 // }}} 473 474 // {{{ getAllGroupe() 475 476 /** 477 * Returns an array of Group. 478 * _GENERAL_ method 479 * 480 * @return Array of Group 481 * @param $seidObjet 482 * @access public 483 */ 484 485 function &getAllGroupe ($critere = 'id_groupe') { 486 $signature = $this->_cache->generateID('getAllGroupe' . $critere); 487 488 //$signature = 'getAllGroupe'.$critere; 489 if ($this->generalCacheExist($signature)) { 490 //echo 'LE CACHE EXISTE<br /><br />'; 491 return $this->loadGeneralCache($signature); 492 } 493 else { 494 //echo 'LE CACHE N\'EXISTE PAS<br /><br />'; 495 $result = $this->_objectMetier->getAllGroupe($critere); 496 497 if (!PEAR::isError($result)) { 498 $this->saveGeneralCache($signature, $result); 499 } 500 return $result; 501 } 502 503 // inutile dans cette methode 504 // if ($this->generalCacheExist(($signature)) $this->_objectMetier->getAllGroupe($critere); 505 506 } 507 508 // }}} 509 510 /** 511 * Returns an array of Group. 512 * 513 * 514 * @return Array of Group 515 * @param $seidObjet 516 * @access public 517 */ 518 519 function &getAllForTitre ($titre) { 520 return $this->_objectMetier->getAllForTitre($titre); 521 } 522 523 // }}} 524 525 // {{{ getAllForforumAndTableAndGroupId($forum, $table, $selectionner_groupe) 526 527 /** 528 * Returns an array of Group. 529 * 530 * 531 * @return Array of Group 532 * @param $forum 533 * @param $table 534 * @param $selectionner_groupe 535 * @access public 536 */ 537 538 function &getAllForforumAndTableAndGroupId ($forumValue, $table, $selectionner_groupe) { 539 return $this->_objectMetier->getAllForforumAndTableAndGroupId($forumValue, $table, $selectionner_groupe); 540 } 541 542 // }}} 543 544 // {{{ getAllForTableAndProfil($table, $tableValue, $connect_profil) 545 546 /** 547 * Returns an array of Group. 548 * 549 * 550 * @return Array of Group 551 * @param $table 552 * @param $tableValue 553 * @param $connect_profil 554 * @access public 555 */ 556 557 function &getAllForTableAndProfil ($table, $tableValue, $connect_profil) { 558 return $this->_objectMetier->getAllForTableAndProfil($table, $tableValue, $connect_profil); 559 } 560 561 // }}} 562 563 // {{{ getAllForTableAndStatutAndObligatoryAndIdGroupe($table, $tableValue, $connect_statut, $connect_statutValue, $obligatoire, $id_groupes_vus) 564 565 /** 566 * Returns an array of Group. 567 * 568 * 569 * @return Array of Group 570 * @param $table 571 * @param $tableValue 572 * @param $connect_statut 573 * @param $connect_statutValue 574 * @param $obligatoire 575 * @param $id_groupes_vu 576 * @access public 577 */ 578 579 function &getAllForTableAndStatutAndObligatoryAndIdGroupe ( 580 $table, $tableValue, $connect_profil, $obligatoire, $id_groupes_vus) { 581 return $this->_objectMetier->getAllForTableAndStatutAndObligatoryAndIdGroupe( 582 $table, $tableValue, $connect_profil, $obligatoire, $id_groupes_vus); 583 } 584 585 // }}} 586 587 // {{{ getAllForTableAndStatutAndUnSeulAndIdGroupe($table, $tableValue, $connect_statut, $connect_statutValue, $unSeul, $id_groupes_vus) 588 589 /** 590 * Returns an array of Group. 591 * 592 * 593 * @return Array of Group 594 * @param $table 595 * @param $tableValue 596 * @param $connect_statut 597 * @param $connect_statutValue 598 * @param $unSeul 599 * @param $id_groupes_vu 600 * @access public 601 */ 602 603 function &getAllForTableAndStatutAndUnSeulAndIdGroupe ($table, $tableValue, $connect_profil, $unSeul, 604 $id_groupes_vus) { 605 return $this->_objectMetier->getAllForTableAndStatutAndUnSeulAndIdGroupe( 606 $table, $tableValue, $connect_profil, $unSeul, $id_groupes_vus); 607 } 608 609 // }}} 610 611 // {{{ howManyInGroup 612 613 /** 614 * Returns the number of keywords for a given keyword group 615 * @return int number of keyword in group 616 * @access public 617 */ 618 619 function howManyInGroup () { 620 return $this->_objectMetier->howManyInGroup(); 621 } 622 623 // }}} 624 625 // {{{ function htmlSelect() 626 627 /** 628 * This method returns the html select box for the keyword trees within this group 629 * @param String selectName HTML NAME attribute of the SELECT tag 630 * @return String 631 * @access public 632 */ 633 634 function htmlSelect ($id_mot = 'root', $selectName = 'id_mot_subnode') { 635 return $this->_objectMetier->htmlSelect($id_mot, $selectName); 636 } 637 638 // }}} 639 640 // {{{ getMotArbre() 641 642 /** 643 * 644 * 645 * 646 * 647 */ 648 649 function &getMotArbre () { 650 return $this->_objectMetier->getMotArbre(); 651 } 652 653 // }}} 654 655 // {{{ _getRootIds() 656 657 /** 658 * This method returns all root keyword ids within this group 659 * @return array 660 * @access private 661 */ 662 function &_getRootIds () { 663 return $this->_objectMetier->_getRootIds(); 664 } 665 666 // }}} 667 668 // {{{ isManagedByProfil($profil) 669 670 function isManagedByProfil ($profil) { 671 return $this->_objectMetier->isManagedByProfil($profil); 672 } 673 674 // }}} 675 676 // {{{ getAllGroupeAffectedTo($type) 677 678 function getAllGroupeAffectedToPersonnalisation ($type, $groupeIds = '') { 679 return $this->_objectMetier->getAllGroupeAffectedToPersonnalisation($type, $groupeIds); 680 } 681 682 // }}} 683 684 } 685 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sat Feb 24 14:40:03 2007 | par Balluche grâce à PHPXref 0.7 |