1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-12 00:54:11 +02:00

DibiConnection::sql() renamed to verb translate()

This commit is contained in:
David Grudl
2010-08-04 12:10:29 +02:00
parent 746a553419
commit 5cce595518
3 changed files with 15 additions and 4 deletions

View File

@@ -260,7 +260,7 @@ class DibiConnection extends DibiObject
* @return string
* @throws DibiException
*/
final public function sql($args)
final public function translate($args)
{
$this->connected || $this->connect();
$args = func_get_args();
@@ -269,6 +269,17 @@ class DibiConnection extends DibiObject
/** @deprecated */
function sql($args)
{
trigger_error(__METHOD__ . '() is deprecated; use translate() instead.', E_USER_NOTICE);
$this->connected || $this->connect();
$args = func_get_args();
return $this->translator->translate($args);
}
/**
* Generates and prints SQL query.
* @param array|mixed one or more arguments