-
Notifications
You must be signed in to change notification settings - Fork 195
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds ProcessTable class so that processes can be easily found by clas…
…s name and status. Adds commented debugging code to the background process. Removes empty setStatus function from ProcessAbstract.
- Loading branch information
1 parent
308e81a
commit 015fb17
Showing
3 changed files
with
38 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,9 +29,4 @@ final public function __destruct() | |
} | ||
|
||
abstract public function run($args); | ||
|
||
public function setStatus() | ||
{ | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
/** | ||
* @version $Id$ | ||
* @copyright Center for History and New Media, 2007-2009 | ||
* @license http://www.gnu.org/licenses/gpl-3.0.txt | ||
* @subpackage Models | ||
* @author CHNM | ||
**/ | ||
class ProcessTable extends Omeka_Db_Table | ||
{ | ||
protected $_target = 'Process'; | ||
|
||
public function findByClass($className) | ||
{ | ||
$select = $this->getSelect()->where("p.class = ?"); | ||
return $this->fetchObjects($select, array($className)); | ||
} | ||
|
||
public function findByStatus($status) | ||
{ | ||
$select = $this->getSelect()->where("p.status = ?"); | ||
return $this->fetchObjects($select, array($status)); | ||
} | ||
} |