[limb-issues] Created: (DBAL-8) Refactor lmbTemplateQuery class, make hints registering procedure more logical
Pavel Shevaev (JIRA)
jira at limb-project.com
Thu Dec 21 00:41:04 MSK 2006
Refactor lmbTemplateQuery class, make hints registering procedure more logical
------------------------------------------------------------------------------
Key: DBAL-8
URL: http://jira.limb-project.com/browse/DBAL-8
Project: DBAL
Issue Type: Improvement
Reporter: Pavel Shevaev
Priority: Minor
Currently all hints must be declared in both places, in template using %foo% notation and in class itself using protected method _declareHints(). I think it makes sense to simplify these procedure and make it more logical, the plan is as follows:
1) all template hint hooks methods must be named, say, like __foo(), which means this method is responsible for filling 'foo' placeholder
2) once the template is filled with real values lmbTemplateQuery should find all "__*" alike methods, invoke them, extract the placeholder name and replace this placeholder with returned value from each method
In this case, say, lmbDeleteQuery should look like:
class lmbDeleteQuery extends lmbCriteriaQuery
{
protected $_table;
function __construct($table, $conn)
{
$this->_table = $table;
parent :: __construct("DELETE FROM %table% %where%", $conn);
}
protected function __table()
{
return $this->_conn->quoteIdentifier($this->_table);
}
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.limb-project.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the limb-issues
mailing list