Commit 0c63d9e2 authored by Dries's avatar Dries

- Patch #349504 by keith.smith: clean up sentence spacing in code comments.

parent ee700371
...@@ -8,7 +8,7 @@ the Free Software Foundation. ...@@ -8,7 +8,7 @@ the Free Software Foundation.
This program is distributed in the hope that it will be useful, but This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details. for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
......
...@@ -315,8 +315,8 @@ function timer_stop($name) { ...@@ -315,8 +315,8 @@ function timer_stop($name) {
* 13. $confdir/default * 13. $confdir/default
* *
* If a file named sites.php is present in the $confdir, it will be loaded * If a file named sites.php is present in the $confdir, it will be loaded
* prior to scanning for directories. It should define an associative array * prior to scanning for directories. It should define an associative array
* named $sites, which maps domains to directories. It should be in the form * named $sites, which maps domains to directories. It should be in the form
* of: * of:
* *
* $sites = array( * $sites = array(
...@@ -334,7 +334,7 @@ function timer_stop($name) { ...@@ -334,7 +334,7 @@ function timer_stop($name) {
* "example.com" in the sites directory whenever a request comes from * "example.com" in the sites directory whenever a request comes from
* "example.com", "devexample.com", or "localhost/example". That is useful * "example.com", "devexample.com", or "localhost/example". That is useful
* on development servers, where the domain name may not be the same as the * on development servers, where the domain name may not be the same as the
* domain of the live server. Since Drupal stores file paths into the database * domain of the live server. Since Drupal stores file paths into the database
* (files, system table, etc.) this will ensure the paths are correct while * (files, system table, etc.) this will ensure the paths are correct while
* accessed on development servers. * accessed on development servers.
* *
...@@ -409,7 +409,7 @@ function drupal_initialize_variables() { ...@@ -409,7 +409,7 @@ function drupal_initialize_variables() {
* Validate that $_SERVER['HTTP_HOST'] is safe. * Validate that $_SERVER['HTTP_HOST'] is safe.
* *
* As $_SERVER['HTTP_HOST'] is user input, ensure it only contains characters * As $_SERVER['HTTP_HOST'] is user input, ensure it only contains characters
* allowed in hostnames. See RFC 952 (and RFC 2181). $_SERVER['HTTP_HOST'] is * allowed in hostnames. See RFC 952 (and RFC 2181). $_SERVER['HTTP_HOST'] is
* lowercased. * lowercased.
* *
* @return * @return
...@@ -548,7 +548,7 @@ function drupal_get_filename($type, $name, $filename = NULL) { ...@@ -548,7 +548,7 @@ function drupal_get_filename($type, $name, $filename = NULL) {
// nothing // nothing
} }
// Verify that we have an active database connection, before querying // Verify that we have an active database connection, before querying
// the database. This is required because this function is called both // the database. This is required because this function is called both
// before we have a database connection (i.e. during installation) and // before we have a database connection (i.e. during installation) and
// when a database connection fails. // when a database connection fails.
elseif (db_is_active() && (($file = db_query("SELECT filename FROM {system} WHERE name = :name AND type = :type", array(':name' => $name, ':type' => $type))->fetchField()) && file_exists($file))) { elseif (db_is_active() && (($file = db_query("SELECT filename FROM {system} WHERE name = :name AND type = :type", array(':name' => $name, ':type' => $type))->fetchField()) && file_exists($file))) {
...@@ -708,7 +708,7 @@ function drupal_load($type, $name) { ...@@ -708,7 +708,7 @@ function drupal_load($type, $name) {
* Set HTTP headers in preparation for a page response. * Set HTTP headers in preparation for a page response.
* *
* Authenticated users are always given a 'no-cache' header, and will * Authenticated users are always given a 'no-cache' header, and will
* fetch a fresh page on every request. This prevents authenticated * fetch a fresh page on every request. This prevents authenticated
* users seeing locally cached pages that show them as logged out. * users seeing locally cached pages that show them as logged out.
* *
* @see page_set_cache() * @see page_set_cache()
...@@ -724,7 +724,7 @@ function drupal_page_header() { ...@@ -724,7 +724,7 @@ function drupal_page_header() {
* Set HTTP headers in preparation for a cached page response. * Set HTTP headers in preparation for a cached page response.
* *
* The general approach here is that anonymous users can keep a local * The general approach here is that anonymous users can keep a local
* cache of the page, but must revalidate it on every request. Then, * cache of the page, but must revalidate it on every request. Then,
* they are given a '304 Not Modified' response as long as they stay * they are given a '304 Not Modified' response as long as they stay
* logged out and the page has not been modified. * logged out and the page has not been modified.
* *
...@@ -887,8 +887,8 @@ function watchdog($type, $message, $variables = array(), $severity = WATCHDOG_NO ...@@ -887,8 +887,8 @@ function watchdog($type, $message, $variables = array(), $severity = WATCHDOG_NO
static $in_error_state = FALSE; static $in_error_state = FALSE;
// It is possible that the error handling will itself trigger an error. In that case, we could // It is possible that the error handling will itself trigger an error. In that case, we could
// end up in an infinite loop. To avoid that, we implement a simple static semaphore. // end up in an infinite loop. To avoid that, we implement a simple static semaphore.
if (!$in_error_state) { if (!$in_error_state) {
$in_error_state = TRUE; $in_error_state = TRUE;
...@@ -1064,7 +1064,7 @@ function drupal_bootstrap($phase = NULL) { ...@@ -1064,7 +1064,7 @@ function drupal_bootstrap($phase = NULL) {
} }
/** /**
* Return the current bootstrap phase for this Drupal process. The * Return the current bootstrap phase for this Drupal process. The
* current phase is the one most recently completed by * current phase is the one most recently completed by
* drupal_bootstrap(). * drupal_bootstrap().
* *
...@@ -1101,7 +1101,7 @@ function _drupal_bootstrap($phase) { ...@@ -1101,7 +1101,7 @@ function _drupal_bootstrap($phase) {
break; break;
case DRUPAL_BOOTSTRAP_DATABASE: case DRUPAL_BOOTSTRAP_DATABASE:
// Initialize the database system. Note that the connection // Initialize the database system. Note that the connection
// won't be initialized until it is actually requested. // won't be initialized until it is actually requested.
require_once DRUPAL_ROOT . '/includes/database/database.inc'; require_once DRUPAL_ROOT . '/includes/database/database.inc';
// Register autoload functions so that we can access classes and interfaces. // Register autoload functions so that we can access classes and interfaces.
...@@ -1268,7 +1268,7 @@ function language_default($property = NULL) { ...@@ -1268,7 +1268,7 @@ function language_default($property = NULL) {
/** /**
* If Drupal is behind a reverse proxy, we use the X-Forwarded-For header * If Drupal is behind a reverse proxy, we use the X-Forwarded-For header
* instead of $_SERVER['REMOTE_ADDR'], which would be the IP address of * instead of $_SERVER['REMOTE_ADDR'], which would be the IP address of
* the proxy server, and not the client's. If Drupal is run in a cluster * the proxy server, and not the client's. If Drupal is run in a cluster
* we use the X-Cluster-Client-Ip header instead. * we use the X-Cluster-Client-Ip header instead.
* *
* @param $reset * @param $reset
...@@ -1344,7 +1344,7 @@ function drupal_get_schema($table = NULL, $rebuild = FALSE) { ...@@ -1344,7 +1344,7 @@ function drupal_get_schema($table = NULL, $rebuild = FALSE) {
// was last called with, which is not always what you want. // was last called with, which is not always what you want.
// module_load_all_includes() calls module_list(), but if this function // module_load_all_includes() calls module_list(), but if this function
// is called very early in the bootstrap process then it will be // is called very early in the bootstrap process then it will be
// uninitialized and therefore return no modules. Instead, we have to // uninitialized and therefore return no modules. Instead, we have to
// "prime" module_list() here to to values we want, specifically // "prime" module_list() here to to values we want, specifically
// "yes rebuild the list and don't limit to bootstrap". // "yes rebuild the list and don't limit to bootstrap".
// TODO: Remove this call after http://drupal.org/node/222109 is fixed. // TODO: Remove this call after http://drupal.org/node/222109 is fixed.
......
...@@ -1532,7 +1532,7 @@ function format_date($timestamp, $type = 'medium', $format = '', $timezone = NUL ...@@ -1532,7 +1532,7 @@ function format_date($timestamp, $type = 'medium', $format = '', $timezone = NUL
* *
* @param $path * @param $path
* The Drupal path being linked to, such as "admin/content/node", or an * The Drupal path being linked to, such as "admin/content/node", or an
* existing URL like "http://drupal.org/". The special path * existing URL like "http://drupal.org/". The special path
* '<front>' may also be given and will generate the site's base URL. * '<front>' may also be given and will generate the site's base URL.
* @param $options * @param $options
* An associative array of additional options, with the following keys: * An associative array of additional options, with the following keys:
...@@ -2777,7 +2777,7 @@ function drupal_random_bytes($count) { ...@@ -2777,7 +2777,7 @@ function drupal_random_bytes($count) {
// Note that it may be important that our $random_state is passed // Note that it may be important that our $random_state is passed
// through md5() prior to being rolled into $output, that the two md5() // through md5() prior to being rolled into $output, that the two md5()
// invocations are different, and that the extra input into the first one - // invocations are different, and that the extra input into the first one -
// the microtime() - is prepended rather than appended. This is to avoid // the microtime() - is prepended rather than appended. This is to avoid
// directly leaking $random_state via the $output stream, which could // directly leaking $random_state via the $output stream, which could
// allow for trivial prediction of further "random" numbers. // allow for trivial prediction of further "random" numbers.
while (strlen($output) < $count) { while (strlen($output) < $count) {
...@@ -3045,7 +3045,7 @@ function drupal_system_listing($mask, $directory, $key = 'name', $min_depth = 1) ...@@ -3045,7 +3045,7 @@ function drupal_system_listing($mask, $directory, $key = 'name', $min_depth = 1)
$searchdir[] = 'sites/all/' . $directory; $searchdir[] = 'sites/all/' . $directory;
// The 'profiles' directory contains pristine collections of modules and // The 'profiles' directory contains pristine collections of modules and
// themes as organized by a distribution. It is pristine in the same way // themes as organized by a distribution. It is pristine in the same way
// that /modules is pristine for core; users should avoid changing anything // that /modules is pristine for core; users should avoid changing anything
// there in favor of sites/all or sites/<domain> directories. // there in favor of sites/all or sites/<domain> directories.
if (file_exists("profiles/$profile/$directory")) { if (file_exists("profiles/$profile/$directory")) {
......
This diff is collapsed.
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
* *
* We log queries in a separate object rather than in the connection object * We log queries in a separate object rather than in the connection object
* because we want to be able to see all queries sent to a given database, not * because we want to be able to see all queries sent to a given database, not
* database target. If we logged the queries in each connection object we * database target. If we logged the queries in each connection object we
* would not be able to track what queries went to which target. * would not be able to track what queries went to which target.
* *
* Every connection has one and only one logging object on it for all targets * Every connection has one and only one logging object on it for all targets
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
class DatabaseLog { class DatabaseLog {
/** /**
* Cache of logged queries. This will only be used if the query logger is enabled. * Cache of logged queries. This will only be used if the query logger is enabled.
* *
* The structure for the logging array is as follows: * The structure for the logging array is as follows:
* *
...@@ -58,7 +58,7 @@ public function __construct($key = 'default') { ...@@ -58,7 +58,7 @@ public function __construct($key = 'default') {
* If the specified logging key is already running this method does nothing. * If the specified logging key is already running this method does nothing.
* *
* @param $logging_key * @param $logging_key
* The identification key for this log request. By specifying different * The identification key for this log request. By specifying different
* logging keys we are able to start and stop multiple logging runs * logging keys we are able to start and stop multiple logging runs
* simultaneously without them colliding. * simultaneously without them colliding.
*/ */
...@@ -83,7 +83,7 @@ public function get($logging_key) { ...@@ -83,7 +83,7 @@ public function get($logging_key) {
/** /**
* Empty the query log for the specified logging key. * Empty the query log for the specified logging key.
* *
* This method does not stop logging, it simply clears the log. To stop * This method does not stop logging, it simply clears the log. To stop
* logging, use the end() method. * logging, use the end() method.
* *
* @param $logging_key * @param $logging_key
...@@ -129,14 +129,14 @@ public function log(DatabaseStatementInterface $statement, $args, $time) { ...@@ -129,14 +129,14 @@ public function log(DatabaseStatementInterface $statement, $args, $time) {
* Determine the routine that called this query. * Determine the routine that called this query.
* *
* We define "the routine that called this query" as the first entry in * We define "the routine that called this query" as the first entry in
* the call stack that is not inside includes/database. That makes the * the call stack that is not inside includes/database. That makes the
* climbing logic very simple, and handles the variable stack depth caused * climbing logic very simple, and handles the variable stack depth caused
* by the query builders. * by the query builders.
* *
* @link http://www.php.net/debug_backtrace * @link http://www.php.net/debug_backtrace
* @return * @return
* This method returns a stack trace entry similar to that generated by * This method returns a stack trace entry similar to that generated by
* debug_backtrace(). However, it flattens the trace entry and the trace * debug_backtrace(). However, it flattens the trace entry and the trace
* entry before it so that we get the function and args of the function that * entry before it so that we get the function and args of the function that
* called into the database system, not the function and args of the * called into the database system, not the function and args of the
* database call itself. * database call itself.
......
...@@ -66,7 +66,7 @@ public function __toString() { ...@@ -66,7 +66,7 @@ public function __toString() {
} }
} }
else { else {
// If there are no values, then this is a default-only query. We still need to handle that. // If there are no values, then this is a default-only query. We still need to handle that.
$placeholders = array_fill(0, count($this->defaultFields), 'default'); $placeholders = array_fill(0, count($this->defaultFields), 'default');
$values[] = '(' . implode(', ', $placeholders) .')'; $values[] = '(' . implode(', ', $placeholders) .')';
} }
...@@ -95,7 +95,7 @@ public function execute() { ...@@ -95,7 +95,7 @@ public function execute() {
$max_placeholder = 0; $max_placeholder = 0;
$values = array(); $values = array();
// We assume that the order here is the same as in __toString(). If that's // We assume that the order here is the same as in __toString(). If that's
// not the case, then we have serious problems. // not the case, then we have serious problems.
foreach ($insert_fields as $value) { foreach ($insert_fields as $value) {
$values[':db_insert_placeholder_' . $max_placeholder++] = $value; $values[':db_insert_placeholder_' . $max_placeholder++] = $value;
......
...@@ -136,7 +136,7 @@ protected function processField($field) { ...@@ -136,7 +136,7 @@ protected function processField($field) {
} }
public function getFieldTypeMap() { public function getFieldTypeMap() {
// Put :normal last so it gets preserved by array_flip. This makes // Put :normal last so it gets preserved by array_flip. This makes
// it much easier for modules (such as schema.module) to map // it much easier for modules (such as schema.module) to map
// database types back into schema types. // database types back into schema types.
static $map = array( static $map = array(
......
...@@ -91,7 +91,7 @@ public function databaseType() { ...@@ -91,7 +91,7 @@ public function databaseType() {
public function mapConditionOperator($operator) { public function mapConditionOperator($operator) {
static $specials = array( static $specials = array(
// In PostgreSQL, 'LIKE' is case-sensitive. For case-insensitive LIKE // In PostgreSQL, 'LIKE' is case-sensitive. For case-insensitive LIKE
// statements, we need to use ILIKE instead. // statements, we need to use ILIKE instead.
'LIKE' => array('operator' => 'ILIKE'), 'LIKE' => array('operator' => 'ILIKE'),
); );
......
...@@ -96,7 +96,7 @@ public function __toString() { ...@@ -96,7 +96,7 @@ public function __toString() {
} }
} }
else { else {
// If there are no values, then this is a default-only query. We still need to handle that. // If there are no values, then this is a default-only query. We still need to handle that.
$placeholders = array_fill(0, count($this->defaultFields), 'default'); $placeholders = array_fill(0, count($this->defaultFields), 'default');
$values[] = '(' . implode(', ', $placeholders) .')'; $values[] = '(' . implode(', ', $placeholders) .')';
} }
......
...@@ -137,7 +137,7 @@ protected function processField($field) { ...@@ -137,7 +137,7 @@ protected function processField($field) {
* to the engine-specific data type. * to the engine-specific data type.
*/ */
function getFieldTypeMap() { function getFieldTypeMap() {
// Put :normal last so it gets preserved by array_flip. This makes // Put :normal last so it gets preserved by array_flip. This makes
// it much easier for modules (such as schema.module) to map // it much easier for modules (such as schema.module) to map
// database types back into schema types. // database types back into schema types.
$map = array( $map = array(
...@@ -235,7 +235,7 @@ public function dropTable(&$ret, $table) { ...@@ -235,7 +235,7 @@ public function dropTable(&$ret, $table) {
* @param $keys_new * @param $keys_new
* Optional keys and indexes specification to be created on the * Optional keys and indexes specification to be created on the
* table along with adding the field. The format is the same as a * table along with adding the field. The format is the same as a
* table specification but without the 'fields' element. If you are * table specification but without the 'fields' element. If you are
* adding a type 'serial' field, you MUST specify at least one key * adding a type 'serial' field, you MUST specify at least one key
* or index including it in this array. @see db_change_field for more * or index including it in this array. @see db_change_field for more
* explanation why. * explanation why.
...@@ -424,7 +424,7 @@ public function dropIndex(&$ret, $table, $name) { ...@@ -424,7 +424,7 @@ public function dropIndex(&$ret, $table, $name) {
* ); * );
* @endcode * @endcode
* and you want to change foo.bar to be type serial, leaving it as the * and you want to change foo.bar to be type serial, leaving it as the
* primary key. The correct sequence is: * primary key. The correct sequence is:
* @code * @code
* db_drop_primary_key($ret, 'foo'); * db_drop_primary_key($ret, 'foo');
* db_change_field($ret, 'foo', 'bar', 'bar', * db_change_field($ret, 'foo', 'bar', 'bar',
...@@ -439,10 +439,10 @@ public function dropIndex(&$ret, $table, $name) { ...@@ -439,10 +439,10 @@ public function dropIndex(&$ret, $table, $name) {
* sequences (from serial-type fields) that use the changed field to be dropped. * sequences (from serial-type fields) that use the changed field to be dropped.
* *
* On MySQL, all type 'serial' fields must be part of at least one key * On MySQL, all type 'serial' fields must be part of at least one key
* or index as soon as they are created. You cannot use * or index as soon as they are created. You cannot use
* db_add_{primary_key,unique_key,index}() for this purpose because * db_add_{primary_key,unique_key,index}() for this purpose because
* the ALTER TABLE command will fail to add the column without a key * the ALTER TABLE command will fail to add the column without a key
* or index specification. The solution is to use the optional * or index specification. The solution is to use the optional
* $new_keys argument to create the key or index at the same time as * $new_keys argument to create the key or index at the same time as
* field. * field.
* *
......
...@@ -13,21 +13,21 @@ interface QueryConditionInterface { ...@@ -13,21 +13,21 @@ interface QueryConditionInterface {
/** /**
* Helper function to build most common conditional clauses. * Helper function to build most common conditional clauses.
* *
* This method can take a variable number of parameters. If called with two * This method can take a variable number of parameters. If called with two
* parameters, they are taken as $field and $value with $operator having a value * parameters, they are taken as $field and $value with $operator having a value
* of =. * of =.
* *
* @param $field * @param $field
* The name of the field to check. * The name of the field to check.
* @param $value * @param $value
* The value to test the field against. In most cases, this is a scalar. For more * The value to test the field against. In most cases, this is a scalar. For more
* complex options, it is an array. The meaning of each element in the array is * complex options, it is an array. The meaning of each element in the array is
* dependent on the $operator. * dependent on the $operator.
* @param $operator * @param $operator
* The comparison operator, such as =, <, or >=. It also accepts more complex * The comparison operator, such as =, <, or >=. It also accepts more complex
* options such as IN, LIKE, or BETWEEN. * options such as IN, LIKE, or BETWEEN.
* @param $num_args * @param $num_args
* For internal use only. This argument is used to track the recursive calls when * For internal use only. This argument is used to track the recursive calls when
* processing complex conditions. * processing complex conditions.
* @return * @return
* The called object. * The called object.
...@@ -38,7 +38,7 @@ public function condition($field, $value = NULL, $operator = NULL); ...@@ -38,7 +38,7 @@ public function condition($field, $value = NULL, $operator = NULL);
* Add an arbitrary WHERE clause to the query. * Add an arbitrary WHERE clause to the query.
* *
* @param $snippet * @param $snippet
* A portion of a WHERE clause as a prepared statement. It must use named placeholders, * A portion of a WHERE clause as a prepared statement. It must use named placeholders,
* not ? placeholders. * not ? placeholders.
* @param $args * @param $args
* An associative array of arguments. * An associative array of arguments.
...@@ -50,7 +50,7 @@ public function where($snippet, $args = array()); ...@@ -50,7 +50,7 @@ public function where($snippet, $args = array());
/** /**
* Gets a complete list of all conditions in this conditional clause. * Gets a complete list of all conditions in this conditional clause.
* *
* This method returns by reference. That allows alter hooks to access the * This method returns by reference. That allows alter hooks to access the
* data structure directly and manipulate it before it gets compiled. * data structure directly and manipulate it before it gets compiled.
* *
* The data structure that is returned is an indexed array of entries, where * The data structure that is returned is an indexed array of entries, where
...@@ -100,10 +100,10 @@ interface QueryAlterableInterface { ...@@ -100,10 +100,10 @@ interface QueryAlterableInterface {
/** /**
* Adds a tag to a query. * Adds a tag to a query.
* *
* Tags are strings that identify a query. A query may have any number of * Tags are strings that identify a query. A query may have any number of
* tags. Tags are used to mark a query so that alter hooks may decide if they * tags. Tags are used to mark a query so that alter hooks may decide if they
* wish to take action. Tags should be all lower-case and contain only letters, * wish to take action. Tags should be all lower-case and contain only letters,
* numbers, and underscore, and start with a letter. That is, they should * numbers, and underscore, and start with a letter. That is, they should
* follow the same rules as PHP identifiers in general. * follow the same rules as PHP identifiers in general.
* *
* @param $tag * @param $tag
...@@ -146,14 +146,14 @@ public function hasAnyTag(); ...@@ -146,14 +146,14 @@ public function hasAnyTag();
* Adds additional metadata to the query. * Adds additional metadata to the query.
* *
* Often, a query may need to provide additional contextual data to alter * Often, a query may need to provide additional contextual data to alter
* hooks. Alter hooks may then use that information to decide if and how * hooks. Alter hooks may then use that information to decide if and how
* to take action. * to take action.
* *
* @param $key * @param $key
* The unique identifier for this piece of metadata. Must be a string that * The unique identifier for this piece of metadata. Must be a string that
* follows the same rules as any other PHP identifier. * follows the same rules as any other PHP identifier.
* @param $object * @param $object
* The additional data to add to the query. May be any valid PHP variable. * The additional data to add to the query. May be any valid PHP variable.
* *
*/ */
public function addMetaData($key, $object); public function addMetaData($key, $object);
...@@ -219,7 +219,7 @@ class InsertQuery extends Query { ...@@ -219,7 +219,7 @@ class InsertQuery extends Query {
protected $table; protected $table;
/** /**
* Whether or not this query is "delay-safe". Different database drivers * Whether or not this query is "delay-safe". Different database drivers
* may or may not implement this feature in their own ways. * may or may not implement this feature in their own ways.
* *
* @var boolean * @var boolean
...@@ -243,10 +243,10 @@ class InsertQuery extends Query { ...@@ -243,10 +243,10 @@ class InsertQuery extends Query {
/** /**
* A nested array of values to insert. * A nested array of values to insert.
* *
* $insertValues itself is an array of arrays. Each sub-array is an array of * $insertValues itself is an array of arrays. Each sub-array is an array of
* field names to values to insert. Whether multiple insert sets * field names to values to insert. Whether multiple insert sets
* will be run in a single query or multiple queries is left to individual drivers * will be run in a single query or multiple queries is left to individual drivers
* to implement in whatever manner is most efficient. The order of values in each * to implement in whatever manner is most efficient. The order of values in each
* sub-array must match the order of fields in $insertFields. * sub-array must match the order of fields in $insertFields.
* *
* @var string * @var string
...@@ -263,18 +263,18 @@ public function __construct($connection, $table, array $options = array()) { ...@@ -263,18 +263,18 @@ public function __construct($connection, $table, array $options = array()) {
/** /**
* Add a set of field->value pairs to be inserted. * Add a set of field->value pairs to be inserted.
* *
* This method may only be called once. Calling it a second time will be * This method may only be called once. Calling it a second time will be
* ignored. To queue up multiple sets of values to be inserted at once, * ignored. To queue up multiple sets of values to be inserted at once,
* use the values() method. * use the values() method.
* *
* @param $fields * @param $fields
* An array of fields on which to insert. This array may be indexed or * An array of fields on which to insert. This array may be indexed or
* associative. If indexed, the array is taken to be the list of fields. * associative. If indexed, the array is taken to be the list of fields.
* If associative, the keys of the array are taken to be the fields and * If associative, the keys of the array are taken to be the fields and
* the values are taken to be corresponding values to insert. If a * the values are taken to be corresponding values to insert. If a
* $values argument is provided, $fields must be indexed. * $values argument is provided, $fields must be indexed.
* @param $values * @param $values
* An array of fields to insert into the database. The values must be * An array of fields to insert into the database. The values must be
* specified in the same order as the $fields array. * specified in the same order as the $fields array.
* @return * @return
* The called object. * The called object.
...@@ -300,7 +300,7 @@ public function fields(array $fields, array $values = array()) { ...@@ -300,7 +300,7 @@ public function fields(array $fields, array $values = array()) {
* Add another set of values to the query to be inserted. * Add another set of values to the query to be inserted.
* *
* If $values is a numeric array, it will be assumed to be in the same * If $values is a numeric array, it will be assumed to be in the same
* order as the original fields() call. If it is associative, it may be * order as the original fields() call. If it is associative, it may be
* in any order as long as the keys of the array match the names of the * in any order as long as the keys of the array match the names of the
* fields. * fields.
* *
...@@ -329,7 +329,7 @@ public function values(array $values) { ...@@ -329,7 +329,7 @@ public function values(array $values) {
* *
* If you want to force a given field to use the database-defined default, * If you want to force a given field to use the database-defined default,
* not NULL or undefined, use this method to instruct the database to use * not NULL or undefined, use this method to instruct the database to use
* default values explicitly. In most cases this will not be necessary * default values explicitly. In most cases this will not be necessary
* unless you are inserting a row that is all default values, as you cannot * unless you are inserting a row that is all default values, as you cannot
* specify no values in an INSERT query. * specify no values in an INSERT query.
* *
...@@ -351,17 +351,17 @@ public function useDefaults(array $fields) { ...@@ -351,17 +351,17 @@ public function useDefaults(array $fields) {
* Flag this query as being delay-safe or not. * Flag this query as being delay-safe or not.
* *
* If this method is never called, it is assumed that the query must be * If this method is never called, it is assumed that the query must be
* executed immediately. If delay is set to TRUE, then the query will be * executed immediately. If delay is set to TRUE, then the query will be
* flagged to run "delayed" or "low priority" on databases that support such * flagged to run "delayed" or "low priority" on databases that support such
* capabilities. In that case, the database will return immediately and the * capabilities. In that case, the database will return immediately and the
* query will be run at some point in the future. That makes it useful for * query will be run at some point in the future. That makes it useful for
* logging-style queries. * logging-style queries.
* *
* If the database does not support delayed INSERT queries, this method * If the database does not support delayed INSERT queries, this method
* has no effect. * has no effect.
* *
* Note that for a delayed query there is no serial ID returned, as it won't * Note that for a delayed query there is no serial ID returned, as it won't
* be created until later when the query runs. It should therefore not be * be created until later when the query runs. It should therefore not be
* used if