From f956b50f652fe83f61bdbcace817d46c55a1bb67 Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Fri, 26 Mar 2004 21:16:50 +0000 Subject: [PATCH] Change to studlyCaps convention # Hopefully discussed enough this time --- NEWS | 1 + ext/sqlite/sqlite.c | 48 ++++++++++++++--------------- ext/sqlite/tests/sqlite_oo_002.phpt | 2 +- ext/sqlite/tests/sqlite_oo_003.phpt | 6 ++-- ext/sqlite/tests/sqlite_oo_008.phpt | 2 +- ext/sqlite/tests/sqlite_oo_009.phpt | 4 +-- ext/sqlite/tests/sqlite_oo_010.phpt | 2 +- ext/sqlite/tests/sqlite_oo_011.phpt | 2 +- ext/sqlite/tests/sqlite_oo_012.phpt | 10 +++--- ext/sqlite/tests/sqlite_oo_013.phpt | 2 +- ext/sqlite/tests/sqlite_oo_014.phpt | 20 ++++++------ ext/sqlite/tests/sqlite_oo_015.phpt | 2 +- ext/sqlite/tests/sqlite_oo_016.phpt | 6 ++-- ext/sqlite/tests/sqlite_oo_020.phpt | 2 +- ext/sqlite/tests/sqlite_oo_021.phpt | 16 +++++----- ext/sqlite/tests/sqlite_oo_024.phpt | 4 +-- ext/sqlite/tests/sqlite_oo_025.phpt | 4 +-- ext/sqlite/tests/sqlite_oo_026.phpt | 4 +-- ext/sqlite/tests/sqlite_oo_028.phpt | 2 +- ext/sqlite/tests/sqlite_oo_029.phpt | 10 +++--- ext/sqlite/tests/sqlite_oo_030.phpt | 14 ++++----- ext/sqlite/tests/sqlite_oo_031.phpt | 6 ++-- 22 files changed, 85 insertions(+), 84 deletions(-) diff --git a/NEWS b/NEWS index 9e11a10c6ef..a76eb2ad4bb 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ????? 2004, PHP 5 Release Candidate 2 +- Changed sqlite to use studlyCaps convention for its OO API. (Marcus) - Force destructors to have empty signatures. (Marcus) - Stopped file uploads from throwing E_WARNINGs and E_NOTICEs which can not be hidden from within scripts (and a result value in the $_FILES global can be diff --git a/ext/sqlite/sqlite.c b/ext/sqlite/sqlite.c index 545a919dc5f..cb5b8da51b4 100644 --- a/ext/sqlite/sqlite.c +++ b/ext/sqlite/sqlite.c @@ -189,32 +189,32 @@ function_entry sqlite_functions[] = { }; function_entry sqlite_funcs_db[] = { - PHP_ME_MAPPING(sqlite_db, sqlite_open, NULL) + PHP_ME_MAPPING(__construct, sqlite_open, NULL) /* PHP_ME_MAPPING(close, sqlite_close, NULL)*/ PHP_ME_MAPPING(query, sqlite_query, NULL) - PHP_ME_MAPPING(array_query, sqlite_array_query, NULL) - PHP_ME_MAPPING(single_query, sqlite_single_query, NULL) - PHP_ME_MAPPING(unbuffered_query, sqlite_unbuffered_query, NULL) - PHP_ME_MAPPING(last_insert_rowid, sqlite_last_insert_rowid, NULL) + PHP_ME_MAPPING(arrayQuery, sqlite_array_query, NULL) + PHP_ME_MAPPING(singleQuery, sqlite_single_query, NULL) + PHP_ME_MAPPING(unbufferedQuery, sqlite_unbuffered_query, NULL) + PHP_ME_MAPPING(lastInsertRowid, sqlite_last_insert_rowid, NULL) PHP_ME_MAPPING(changes, sqlite_changes, NULL) - PHP_ME_MAPPING(create_aggregate, sqlite_create_aggregate, NULL) - PHP_ME_MAPPING(create_function, sqlite_create_function, NULL) - PHP_ME_MAPPING(busy_timeout, sqlite_busy_timeout, NULL) - PHP_ME_MAPPING(last_error, sqlite_last_error, NULL) - PHP_ME_MAPPING(fetch_column_types, sqlite_fetch_column_types, NULL) + PHP_ME_MAPPING(createAggregate, sqlite_create_aggregate, NULL) + PHP_ME_MAPPING(createFunction, sqlite_create_function, NULL) + PHP_ME_MAPPING(busyTimeout, sqlite_busy_timeout, NULL) + PHP_ME_MAPPING(lastError, sqlite_last_error, NULL) + PHP_ME_MAPPING(fetchColumnTypes, sqlite_fetch_column_types, NULL) /* PHP_ME_MAPPING(error_string, sqlite_error_string, NULL) static */ /* PHP_ME_MAPPING(escape_string, sqlite_escape_string, NULL) static */ {NULL, NULL, NULL} }; function_entry sqlite_funcs_query[] = { - PHP_ME_MAPPING(fetch_array, sqlite_fetch_array, NULL) - PHP_ME_MAPPING(fetch_object, sqlite_fetch_object, NULL) - PHP_ME_MAPPING(fetch_single, sqlite_fetch_single, NULL) - PHP_ME_MAPPING(fetch_all, sqlite_fetch_all, NULL) + PHP_ME_MAPPING(fetch, sqlite_fetch_array, NULL) + PHP_ME_MAPPING(fetchObject, sqlite_fetch_object, NULL) + PHP_ME_MAPPING(fetchSingle, sqlite_fetch_single, NULL) + PHP_ME_MAPPING(fetchAll, sqlite_fetch_all, NULL) PHP_ME_MAPPING(column, sqlite_column, NULL) - PHP_ME_MAPPING(num_fields, sqlite_num_fields, NULL) - PHP_ME_MAPPING(field_name, sqlite_field_name, NULL) + PHP_ME_MAPPING(numFields, sqlite_num_fields, NULL) + PHP_ME_MAPPING(fieldName, sqlite_field_name, NULL) /* spl_forward */ PHP_ME_MAPPING(current, sqlite_current, NULL) PHP_ME_MAPPING(next, sqlite_next, NULL) @@ -223,20 +223,20 @@ function_entry sqlite_funcs_query[] = { PHP_ME_MAPPING(rewind, sqlite_rewind, NULL) /* additional */ PHP_ME_MAPPING(prev, sqlite_prev, NULL) - PHP_ME_MAPPING(hasprev, sqlite_has_prev, NULL) - PHP_ME_MAPPING(num_rows, sqlite_num_rows, NULL) + PHP_ME_MAPPING(hasPrev, sqlite_has_prev, NULL) + PHP_ME_MAPPING(numRows, sqlite_num_rows, NULL) PHP_ME_MAPPING(seek, sqlite_seek, NULL) {NULL, NULL, NULL} }; function_entry sqlite_funcs_ub_query[] = { - PHP_ME_MAPPING(fetch_array, sqlite_fetch_array, NULL) - PHP_ME_MAPPING(fetch_object, sqlite_fetch_object, NULL) - PHP_ME_MAPPING(fetch_single, sqlite_fetch_single, NULL) - PHP_ME_MAPPING(fetch_all, sqlite_fetch_all, NULL) + PHP_ME_MAPPING(fetch, sqlite_fetch_array, NULL) + PHP_ME_MAPPING(fetchObject, sqlite_fetch_object, NULL) + PHP_ME_MAPPING(fetchSingle, sqlite_fetch_single, NULL) + PHP_ME_MAPPING(fetchAll, sqlite_fetch_all, NULL) PHP_ME_MAPPING(column, sqlite_column, NULL) - PHP_ME_MAPPING(num_fields, sqlite_num_fields, NULL) - PHP_ME_MAPPING(field_name, sqlite_field_name, NULL) + PHP_ME_MAPPING(numFields, sqlite_num_fields, NULL) + PHP_ME_MAPPING(fieldName, sqlite_field_name, NULL) /* spl_forward */ PHP_ME_MAPPING(current, sqlite_current, NULL) PHP_ME_MAPPING(next, sqlite_next, NULL) diff --git a/ext/sqlite/tests/sqlite_oo_002.phpt b/ext/sqlite/tests/sqlite_oo_002.phpt index d3289b4d873..2db67bf5269 100755 --- a/ext/sqlite/tests/sqlite_oo_002.phpt +++ b/ext/sqlite/tests/sqlite_oo_002.phpt @@ -14,7 +14,7 @@ var_dump($db->query("CREATE TABLE foo(c1 date, c2 time, c3 varchar(64))")); var_dump($db->query("INSERT INTO foo VALUES ('2002-01-02', '12:49:00', NULL)")); $r = $db->query("SELECT * from foo"); var_dump($r); -var_dump($r->fetch_array()); +var_dump($r->fetch()); ?> --EXPECTF-- object(sqlite_db)#%d (0) { diff --git a/ext/sqlite/tests/sqlite_oo_003.phpt b/ext/sqlite/tests/sqlite_oo_003.phpt index 29c5d99d730..f9ca65c6112 100755 --- a/ext/sqlite/tests/sqlite_oo_003.phpt +++ b/ext/sqlite/tests/sqlite_oo_003.phpt @@ -12,11 +12,11 @@ include "blankdb_oo.inc"; $db->query("CREATE TABLE foo(c1 date, c2 time, c3 varchar(64))"); $db->query("INSERT INTO foo VALUES ('2002-01-02', '12:49:00', NULL)"); $r = $db->query("SELECT * from foo"); -var_dump($r->fetch_array(SQLITE_BOTH)); +var_dump($r->fetch(SQLITE_BOTH)); $r = $db->query("SELECT * from foo"); -var_dump($r->fetch_array(SQLITE_NUM)); +var_dump($r->fetch(SQLITE_NUM)); $r = $db->query("SELECT * from foo"); -var_dump($r->fetch_array(SQLITE_ASSOC)); +var_dump($r->fetch(SQLITE_ASSOC)); ?> --EXPECT-- array(6) { diff --git a/ext/sqlite/tests/sqlite_oo_008.phpt b/ext/sqlite/tests/sqlite_oo_008.phpt index 4340fb6e3a6..8e99a1deaf3 100755 --- a/ext/sqlite/tests/sqlite_oo_008.phpt +++ b/ext/sqlite/tests/sqlite_oo_008.phpt @@ -22,7 +22,7 @@ foreach ($data as $str) { } $r = $db->query("SELECT a from strings"); -while ($row = $r->fetch_array(SQLITE_NUM)) { +while ($row = $r->fetch(SQLITE_NUM)) { var_dump($row); } echo "DONE!\n"; diff --git a/ext/sqlite/tests/sqlite_oo_009.phpt b/ext/sqlite/tests/sqlite_oo_009.phpt index 184804cfc95..c2a55556c1b 100755 --- a/ext/sqlite/tests/sqlite_oo_009.phpt +++ b/ext/sqlite/tests/sqlite_oo_009.phpt @@ -21,8 +21,8 @@ foreach ($data as $str) { $db->query("INSERT INTO strings VALUES('$str')"); } -$r = $db->unbuffered_query("SELECT a from strings"); -while ($row = $r->fetch_array(SQLITE_NUM)) { +$r = $db->unbufferedQuery("SELECT a from strings"); +while ($row = $r->fetch(SQLITE_NUM)) { var_dump($row); } echo "DONE!\n"; diff --git a/ext/sqlite/tests/sqlite_oo_010.phpt b/ext/sqlite/tests/sqlite_oo_010.phpt index bb1fc638ebd..8d6f3c0a992 100755 --- a/ext/sqlite/tests/sqlite_oo_010.phpt +++ b/ext/sqlite/tests/sqlite_oo_010.phpt @@ -21,7 +21,7 @@ foreach ($data as $str) { $db->query("INSERT INTO strings VALUES('$str')"); } -$r = $db->unbuffered_query("SELECT a from strings", SQLITE_NUM); +$r = $db->unbufferedQuery("SELECT a from strings", SQLITE_NUM); while ($row = $r->valid()) { var_dump($r->current()); $r->next(); diff --git a/ext/sqlite/tests/sqlite_oo_011.phpt b/ext/sqlite/tests/sqlite_oo_011.phpt index ae6c445a4f0..4b5a37044c1 100755 --- a/ext/sqlite/tests/sqlite_oo_011.phpt +++ b/ext/sqlite/tests/sqlite_oo_011.phpt @@ -14,7 +14,7 @@ $db->query("CREATE TABLE bar (c1 char, c2 char, c3 char)"); $db->query("INSERT INTO foo VALUES ('1', '2', '3')"); $db->query("INSERT INTO bar VALUES ('4', '5', '6')"); $r = $db->query("SELECT * from foo, bar", SQLITE_ASSOC); -var_dump($r->fetch_array()); +var_dump($r->fetch()); ?> --EXPECT-- array(6) { diff --git a/ext/sqlite/tests/sqlite_oo_012.phpt b/ext/sqlite/tests/sqlite_oo_012.phpt index b1a26440c81..408feb9d174 100755 --- a/ext/sqlite/tests/sqlite_oo_012.phpt +++ b/ext/sqlite/tests/sqlite_oo_012.phpt @@ -13,13 +13,13 @@ $db->query("CREATE TABLE strings(foo VARCHAR, bar VARCHAR, baz VARCHAR)"); echo "Buffered\n"; $r = $db->query("SELECT * from strings"); -for($i=0; $i<$r->num_fields(); $i++) { - var_dump($r->field_name($i)); +for($i=0; $i<$r->numFields(); $i++) { + var_dump($r->fieldName($i)); } echo "Unbuffered\n"; -$r = $db->unbuffered_query("SELECT * from strings"); -for($i=0; $i<$r->num_fields(); $i++) { - var_dump($r->field_name($i)); +$r = $db->unbufferedQuery("SELECT * from strings"); +for($i=0; $i<$r->numFields(); $i++) { + var_dump($r->fieldName($i)); } echo "DONE!\n"; ?> diff --git a/ext/sqlite/tests/sqlite_oo_013.phpt b/ext/sqlite/tests/sqlite_oo_013.phpt index 022e6f8083a..0c19505f233 100755 --- a/ext/sqlite/tests/sqlite_oo_013.phpt +++ b/ext/sqlite/tests/sqlite_oo_013.phpt @@ -31,7 +31,7 @@ while ($r->valid()) { $r->next(); } echo "====UNBUFFERED====\n"; -$r = $db->unbuffered_query("SELECT a, b from strings"); +$r = $db->unbufferedQuery("SELECT a, b from strings"); while ($r->valid()) { var_dump($r->column(0)); var_dump($r->column('b')); diff --git a/ext/sqlite/tests/sqlite_oo_014.phpt b/ext/sqlite/tests/sqlite_oo_014.phpt index 918dfee3e0e..e650b714324 100755 --- a/ext/sqlite/tests/sqlite_oo_014.phpt +++ b/ext/sqlite/tests/sqlite_oo_014.phpt @@ -22,20 +22,20 @@ foreach ($data as $str) { } echo "unbuffered twice\n"; -$r = $db->unbuffered_query("SELECT a from strings", SQLITE_NUM); -var_dump($r->fetch_all()); -var_dump($r->fetch_all()); +$r = $db->unbufferedQuery("SELECT a from strings", SQLITE_NUM); +var_dump($r->fetchAll()); +var_dump($r->fetchAll()); echo "unbuffered with fetch_array\n"; -$r = $db->unbuffered_query("SELECT a from strings", SQLITE_NUM); -var_dump($r->fetch_array()); -var_dump($r->fetch_all()); +$r = $db->unbufferedQuery("SELECT a from strings", SQLITE_NUM); +var_dump($r->fetch()); +var_dump($r->fetchAll()); echo "buffered\n"; $r = $db->query("SELECT a from strings", SQLITE_NUM); -var_dump($r->fetch_all()); -var_dump($r->fetch_array()); -var_dump($r->fetch_all()); +var_dump($r->fetchAll()); +var_dump($r->fetch()); +var_dump($r->fetchAll()); echo "DONE!\n"; ?> @@ -59,7 +59,7 @@ array(3) { } } -Notice: sqlite_ub_query::fetch_all(): One or more rowsets were already returned in %ssqlite_oo_014.php on line %d +Notice: sqlite_ub_query::fetchAll(): One or more rowsets were already returned in %ssqlite_oo_014.php on line %d array(0) { } unbuffered with fetch_array diff --git a/ext/sqlite/tests/sqlite_oo_015.phpt b/ext/sqlite/tests/sqlite_oo_015.phpt index 5fc90e2c8c5..893e6f14abf 100755 --- a/ext/sqlite/tests/sqlite_oo_015.phpt +++ b/ext/sqlite/tests/sqlite_oo_015.phpt @@ -21,7 +21,7 @@ foreach ($data as $str) { $db->query("INSERT INTO strings VALUES('$str')"); } -$res = $db->array_query("SELECT a from strings", SQLITE_NUM); +$res = $db->arrayQuery("SELECT a from strings", SQLITE_NUM); var_dump($res); echo "DONE!\n"; diff --git a/ext/sqlite/tests/sqlite_oo_016.phpt b/ext/sqlite/tests/sqlite_oo_016.phpt index ac3dac31ca1..d831b48326d 100755 --- a/ext/sqlite/tests/sqlite_oo_016.phpt +++ b/ext/sqlite/tests/sqlite_oo_016.phpt @@ -23,12 +23,12 @@ foreach ($data as $str) { echo "====BUFFERED====\n"; $r = $db->query("SELECT a, b from strings"); while ($r->valid()) { - var_dump($r->fetch_single()); + var_dump($r->fetchSingle()); } echo "====UNBUFFERED====\n"; -$r = $db->unbuffered_query("SELECT a, b from strings"); +$r = $db->unbufferedQuery("SELECT a, b from strings"); while ($r->valid()) { - var_dump($r->fetch_single()); + var_dump($r->fetchSingle()); } echo "DONE!\n"; ?> diff --git a/ext/sqlite/tests/sqlite_oo_020.phpt b/ext/sqlite/tests/sqlite_oo_020.phpt index ffe5e0258a6..fc288b65b6c 100755 --- a/ext/sqlite/tests/sqlite_oo_020.phpt +++ b/ext/sqlite/tests/sqlite_oo_020.phpt @@ -39,7 +39,7 @@ foreach ($data as $str) { $db->query("INSERT INTO strings VALUES('${str[0]}','${str[1]}')"); } -$r = $db->unbuffered_query("SELECT a, b from strings"); +$r = $db->unbufferedQuery("SELECT a, b from strings"); while ($r->valid()) { var_dump($r->current(SQLITE_NUM)); $r->next(); diff --git a/ext/sqlite/tests/sqlite_oo_021.phpt b/ext/sqlite/tests/sqlite_oo_021.phpt index 22ae724b892..339e460e215 100755 --- a/ext/sqlite/tests/sqlite_oo_021.phpt +++ b/ext/sqlite/tests/sqlite_oo_021.phpt @@ -13,13 +13,13 @@ for ($i = 0; $i < 10; $i++) { } $db->query("INSERT INTO test_db (data) VALUES(NULL)"); -var_dump($db->single_query("SELECT id FROM test_db WHERE id=5")); -var_dump($db->single_query("SELECT * FROM test_db WHERE id=4")); -var_dump($db->single_query("SELECT data FROM test_db WHERE id=6")); -var_dump($db->single_query("SELECT * FROM test_db WHERE id < 5")); -var_dump($db->single_query("SELECT * FROM test db WHERE id < 4")); -var_dump($db->single_query("SELECT * FROM test_db WHERE id=999999")); -var_dump($db->single_query("SELECT id FROM test_db WHERE id=5", FALSE)); +var_dump($db->singleQuery("SELECT id FROM test_db WHERE id=5")); +var_dump($db->singleQuery("SELECT * FROM test_db WHERE id=4")); +var_dump($db->singleQuery("SELECT data FROM test_db WHERE id=6")); +var_dump($db->singleQuery("SELECT * FROM test_db WHERE id < 5")); +var_dump($db->singleQuery("SELECT * FROM test db WHERE id < 4")); +var_dump($db->singleQuery("SELECT * FROM test_db WHERE id=999999")); +var_dump($db->singleQuery("SELECT id FROM test_db WHERE id=5", FALSE)); echo "DONE!\n"; ?> @@ -38,7 +38,7 @@ array(4) { string(1) "4" } -Warning: sqlite_db::single_query(): no such table: test in %s on line %d +Warning: sqlite_db::singleQuery(): no such table: test in %s on line %d bool(false) NULL array(1) { diff --git a/ext/sqlite/tests/sqlite_oo_024.phpt b/ext/sqlite/tests/sqlite_oo_024.phpt index 457d8a502c8..f974ad8a8d0 100755 --- a/ext/sqlite/tests/sqlite_oo_024.phpt +++ b/ext/sqlite/tests/sqlite_oo_024.phpt @@ -30,13 +30,13 @@ foreach ($data as $str) { echo "====class24====\n"; $res = $db->query("SELECT a FROM strings", SQLITE_ASSOC); while ($res->valid()) { - var_dump($res->fetch_object('class24')); + var_dump($res->fetchObject('class24')); } echo "====stdclass====\n"; $res = $db->query("SELECT a FROM strings", SQLITE_ASSOC); while ($res->valid()) { - var_dump($res->fetch_object()); + var_dump($res->fetchObject()); } echo "====DONE!====\n"; diff --git a/ext/sqlite/tests/sqlite_oo_025.phpt b/ext/sqlite/tests/sqlite_oo_025.phpt index b5680a78cd3..3cb42d76474 100755 --- a/ext/sqlite/tests/sqlite_oo_025.phpt +++ b/ext/sqlite/tests/sqlite_oo_025.phpt @@ -23,7 +23,7 @@ foreach ($data as $str) { } echo "====UNBUFFERED====\n"; -$r = $db->unbuffered_query("SELECT a from strings", SQLITE_NUM); +$r = $db->unbufferedQuery("SELECT a from strings", SQLITE_NUM); //var_dump(class_implements($r)); foreach($r as $row) { var_dump($row); @@ -33,7 +33,7 @@ foreach($r as $row) { var_dump($row); } echo "====DIRECT====\n"; -foreach($db->unbuffered_query("SELECT a from strings", SQLITE_NUM) as $row) { +foreach($db->unbufferedQuery("SELECT a from strings", SQLITE_NUM) as $row) { var_dump($row); } echo "====BUFFERED====\n"; diff --git a/ext/sqlite/tests/sqlite_oo_026.phpt b/ext/sqlite/tests/sqlite_oo_026.phpt index ae0df40d3dd..4beacbb8880 100755 --- a/ext/sqlite/tests/sqlite_oo_026.phpt +++ b/ext/sqlite/tests/sqlite_oo_026.phpt @@ -23,13 +23,13 @@ foreach ($data as $str) { } echo "====FOREACH====\n"; -$r = $db->unbuffered_query("SELECT a from strings", SQLITE_NUM); +$r = $db->unbufferedQuery("SELECT a from strings", SQLITE_NUM); foreach($r as $idx => $row) { var_dump($row[0]); var_dump($row[0]); } echo "====FOR====\n"; -$r = $db->unbuffered_query("SELECT a from strings", SQLITE_NUM); +$r = $db->unbufferedQuery("SELECT a from strings", SQLITE_NUM); for(;$r->valid(); $r->next()) { $v = $r->column(0); var_dump($v); diff --git a/ext/sqlite/tests/sqlite_oo_028.phpt b/ext/sqlite/tests/sqlite_oo_028.phpt index be59496ce1f..fe7f8c6f681 100755 --- a/ext/sqlite/tests/sqlite_oo_028.phpt +++ b/ext/sqlite/tests/sqlite_oo_028.phpt @@ -10,7 +10,7 @@ include "blankdb_oo.inc"; $db->query("CREATE TABLE strings(a, b INTEGER, c VARCHAR(10), d)"); $db->query("INSERT INTO strings VALUES('1', '2', '3', 'abc')"); -var_dump($db->fetch_column_types("strings")); +var_dump($db->fetchColumnTypes("strings")); ?> --EXPECT-- array(4) { diff --git a/ext/sqlite/tests/sqlite_oo_029.phpt b/ext/sqlite/tests/sqlite_oo_029.phpt index e86efc9187c..4b2b1992b8e 100755 --- a/ext/sqlite/tests/sqlite_oo_029.phpt +++ b/ext/sqlite/tests/sqlite_oo_029.phpt @@ -13,14 +13,14 @@ $db->query("INSERT INTO strings VALUES('foo', 'foo')"); class sqlite_help { - function sqlite_help($db){ + function __construct($db){ $this->db = $db; - $this->db->create_function('link_keywords', array(&$this, 'linkers'), 1); + $this->db->createFunction('link_keywords', array(&$this, 'linkers'), 1); } - function get_single($key) + function getSingle($key) { - return $this->db->single_query('SELECT link_keywords(var) FROM strings WHERE key=\''.$key.'\'', 1); + return $this->db->singleQuery('SELECT link_keywords(var) FROM strings WHERE key=\''.$key.'\'', 1); } function linkers($str) @@ -41,7 +41,7 @@ class sqlite_help } $obj = new sqlite_help($db); -echo $obj->get_single('foo')."\n"; +echo $obj->getSingle('foo')."\n"; $obj->free(); unset($obj); diff --git a/ext/sqlite/tests/sqlite_oo_030.phpt b/ext/sqlite/tests/sqlite_oo_030.phpt index cd31db76ff9..2155115974d 100755 --- a/ext/sqlite/tests/sqlite_oo_030.phpt +++ b/ext/sqlite/tests/sqlite_oo_030.phpt @@ -21,13 +21,13 @@ function baz($param = NULL) { return $param; } -var_dump($db->single_query("select php('baz')", 1)); -var_dump($db->single_query("select php('baz', 1)", 1)); -var_dump($db->single_query("select php('baz', \"PHP\")", 1)); -var_dump($db->single_query("select php('foo::bar')", 1)); -var_dump($db->single_query("select php('foo::bar', 1)", 1)); -var_dump($db->single_query("select php('foo::bar', \"PHP\")", 1)); -var_dump($db->single_query("select php('foo::bar(\"PHP\")')", 1)); +var_dump($db->singleQuery("select php('baz')", 1)); +var_dump($db->singleQuery("select php('baz', 1)", 1)); +var_dump($db->singleQuery("select php('baz', \"PHP\")", 1)); +var_dump($db->singleQuery("select php('foo::bar')", 1)); +var_dump($db->singleQuery("select php('foo::bar', 1)", 1)); +var_dump($db->singleQuery("select php('foo::bar', \"PHP\")", 1)); +var_dump($db->singleQuery("select php('foo::bar(\"PHP\")')", 1)); ?> ===DONE=== diff --git a/ext/sqlite/tests/sqlite_oo_031.phpt b/ext/sqlite/tests/sqlite_oo_031.phpt index 6a340c011db..f0ed40a425a 100755 --- a/ext/sqlite/tests/sqlite_oo_031.phpt +++ b/ext/sqlite/tests/sqlite_oo_031.phpt @@ -60,7 +60,7 @@ class SqliteNestedset implements RecursiveIterator { $this->db = $db; $this->id_l = $id_l; - $this->id_r = $this->db->single_query('SELECT id_r FROM menu WHERE id_l='.$id_l, 1); + $this->id_r = $this->db->singleQuery('SELECT id_r FROM menu WHERE id_l='.$id_l, 1); $this->id = $id_l; } @@ -93,8 +93,8 @@ class SqliteNestedset implements RecursiveIterator protected function fetch() { - $res = $this->db->unbuffered_query('SELECT * FROM menu WHERE id_l='.$this->id); - $this->entry = $res->fetch_object('SqliteNestedsetElement', array(&$this->db)); + $res = $this->db->unbufferedQuery('SELECT * FROM menu WHERE id_l='.$this->id); + $this->entry = $res->fetchObject('SqliteNestedsetElement', array(&$this->db)); unset($res); }