Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactored application to follow current suggested directory structur…
…e and best practices
- Loading branch information
1 parent
9ecd189
commit f26e5d4
Showing
42 changed files
with
171 additions
and
197 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,9 @@ | ||
[production] | ||
showExceptions = false | ||
db.adapter = "pdo_sqlite" | ||
db.params.dbname = APPLICATION_PATH "/../data/db/bugs.db" | ||
|
||
[development : production] | ||
showExceptions = true | ||
|
||
[test : production] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
class Bugapp_Helper_GetModel extends Zend_Controller_Action_Helper_Abstract | ||
{ | ||
/** | ||
* @var Zend_Loader_PluginLoader | ||
*/ | ||
protected $_loader; | ||
|
||
/** | ||
* Initialize plugin loader for models | ||
* | ||
* @return void | ||
*/ | ||
public function __construct() | ||
{ | ||
$this->_loader = new Zend_Loader_PluginLoader(array( | ||
'Bugapp' => APPLICATION_PATH . '/models', | ||
)); | ||
} | ||
|
||
/** | ||
* Load a model class and return an object instance | ||
* | ||
* @param string $model | ||
* @return object | ||
*/ | ||
public function getModel($model) | ||
{ | ||
$class = $this->_loader->load($model); | ||
return new $class; | ||
} | ||
|
||
/** | ||
* Proxy to getModel() | ||
* | ||
* @param string $model | ||
* @return object | ||
*/ | ||
public function direct($model) | ||
{ | ||
return $this->getModel($model); | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
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
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
4 changes: 2 additions & 2 deletions
4
application/models/Table/IssueType.php → application/models/DbTable/IssueType.php
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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
<?php | ||
require_once dirname(__FILE__) . '/Bug.php'; | ||
|
||
class Model_Table_IssueType extends Zend_Db_Table | ||
class Bugapp_DbTable_IssueType extends Zend_Db_Table | ||
{ | ||
protected $_name = 'issue_type'; | ||
protected $_primary = 'id'; | ||
|
||
protected $_dependentTables = array( | ||
'Model_Table_Bug', | ||
'Bugapp_DbTable_Bug', | ||
); | ||
} |
4 changes: 2 additions & 2 deletions
4
application/models/Table/PriorityType.php → application/models/DbTable/PriorityType.php
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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
<?php | ||
require_once dirname(__FILE__) . '/Bug.php'; | ||
|
||
class Model_Table_PriorityType extends Zend_Db_Table | ||
class Bugapp_DbTable_PriorityType extends Zend_Db_Table | ||
{ | ||
protected $_name = 'priority_type'; | ||
protected $_primary = 'id'; | ||
|
||
protected $_dependentTables = array( | ||
'Model_Table_Bug', | ||
'Bugapp_DbTable_Bug', | ||
); | ||
} |
4 changes: 2 additions & 2 deletions
4
application/models/Table/RelationType.php → application/models/DbTable/RelationType.php
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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
<?php | ||
require_once dirname(__FILE__) . '/BugRelation.php'; | ||
|
||
class Model_Table_RelationType extends Zend_Db_Table | ||
class Bugapp_DbTable_RelationType extends Zend_Db_Table | ||
{ | ||
protected $_name = 'relation_type'; | ||
protected $_primary = 'id'; | ||
|
||
protected $_dependentTables = array( | ||
'Model_Table_BugRelation', | ||
'Bugapp_DbTable_BugRelation', | ||
); | ||
} |
4 changes: 2 additions & 2 deletions
4
application/models/Table/ResolutionType.php → ...ication/models/DbTable/ResolutionType.php
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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
<?php | ||
require_once dirname(__FILE__) . '/Bug.php'; | ||
|
||
class Model_Table_ResolutionType extends Zend_Db_Table | ||
class Bugapp_DbTable_ResolutionType extends Zend_Db_Table | ||
{ | ||
protected $_name = 'resolution_type'; | ||
protected $_primary = 'id'; | ||
|
||
protected $_dependentTables = array( | ||
'Model_Table_Bug', | ||
'Bugapp_DbTable_Bug', | ||
); | ||
} |
Oops, something went wrong.