Documentation is available at InvalidCompHandler.inc
- <?php
- /**
- * Implements the InvalidComp handler
- *
- * This file is part of CompInaBox.
- * @copyright CompInaBox Copyright 2001-2005. Eric D. Nielsen, All rights reserverd.
- * @license http://opensource.org/licenses/gpl-license.php GNU Public License
- *
- * @author Eric D. Nielsen <nielsene@alum.mit.edu>
- * @package InputControllers
- * @subpackage Handlers
- */
- /**
- * Implements the InvalidComp handler
- *
- * @package InputControllers
- * @subpackage Handlers
- */
- class InvalidCompHandler {
- var $_status;
- function InvalidCompHandler($thresh="") {
- $this->_status=$thresh;
- }
- function canHandle(&$context, $request) {
- $centralDB =& $context->getCentralDB();
- $pb =& $context->getCorePhraseBook();
- if (""==$this->_status)
- $query = $pb->getQuery("Comp Exists?",
- array("CompName"=>$request->getCompUnix()));
- else
- $query = $pb->getQuery("Hosted Comp Exists?",
- array("CompName"=>$request->getCompUnix(),
- "StatusThreshold"=>$this->_status));
- $qr =& $centralDB->query($query);
- return $qr->numrows()==0;
- }
- function execute(&$context, $request) {
- return "InvalidCompName";
- }
- }
- ?>
Documentation generated on Tue, 25 Apr 2006 13:03:50 -0400 by phpDocumentor 1.3.0RC3