Index: trunk/phase3/includes/api/ApiMain.php |
— | — | @@ -481,6 +481,31 @@ |
482 | 482 | $vers[] = ApiFormatFeedWrapper :: getVersion(); // not accessible with format=xxx |
483 | 483 | return $vers; |
484 | 484 | } |
| 485 | + |
| 486 | + /** |
| 487 | + * Add or overwrite a module in this ApiMain instance. Intended for use by extending |
| 488 | + * classes who wish to add their own modules to their lexicon or override the |
| 489 | + * behavior of inherent ones. |
| 490 | + * |
| 491 | + * @access protected |
| 492 | + * @param $mdlName String The identifier for this module. |
| 493 | + * @param $mdlClass String The class where this module is implemented. |
| 494 | + */ |
| 495 | + protected function addModule( $mdlName, $mdlClass ) { |
| 496 | + $this->mModules[$mdlName] = $mdlClass; |
| 497 | + } |
| 498 | + |
| 499 | + /** |
| 500 | + * Add or overwrite an output format for this ApiMain. Intended for use by extending |
| 501 | + * classes who wish to add to or modify current formatters. |
| 502 | + * |
| 503 | + * @access protected |
| 504 | + * @param $fmtName The identifier for this format. |
| 505 | + * @param $fmtClass The class implementing this format. |
| 506 | + */ |
| 507 | + protected function addFormat( $fmtName, $fmtClass ) { |
| 508 | + $this->mFormats[$fmtName] = $fmtClass; |
| 509 | + } |
485 | 510 | } |
486 | 511 | |
487 | 512 | /** |