* @file
* @ingroup Database
*/
+use Wikimedia\Rdbms\Blob;
/**
* The oci8 extension is fairly weak and doesn't support oci_num_rows, among
list( $startOpts, $useIndex, $tailOpts, $ignoreIndex ) =
$this->makeSelectOptions( $selectOptions );
if ( is_array( $srcTable ) ) {
- $srcTable = implode( ',', array_map( [ &$this, 'tableName' ], $srcTable ) );
+ $srcTable = implode( ',', array_map( [ $this, 'tableName' ], $srcTable ) );
} else {
$srcTable = $this->tableName( $srcTable );
}
*
* @param array|string $table
* @param string $field
- * @return ORAField|ORAResult
+ * @return ORAField|ORAResult|false
*/
private function fieldInfoMulti( $table, $field ) {
$field = strtoupper( $field );
if ( is_array( $table ) ) {
- $table = array_map( [ &$this, 'tableNameInternal' ], $table );
+ $table = array_map( [ $this, 'tableNameInternal' ], $table );
$tableWhere = 'IN (';
foreach ( $table as &$singleTable ) {
$singleTable = $this->removeIdentifierQuotes( $singleTable );
}
}
- /**
- * defines must comply with ^define\s*([^\s=]*)\s*=\s?'\{\$([^\}]*)\}';
- *
- * @param resource $fp
- * @param bool|string $lineCallback
- * @param bool|callable $resultCallback
- * @param string $fname
- * @param bool|callable $inputCallback
- * @return bool|string
- */
- function sourceStream( $fp, $lineCallback = false, $resultCallback = false,
- $fname = __METHOD__, $inputCallback = false ) {
+ function sourceStream(
+ $fp,
+ callable $lineCallback = null,
+ callable $resultCallback = null,
+ $fname = __METHOD__, callable $inputCallback = null
+ ) {
$cmd = '';
$done = false;
$dollarquote = false;
$replacements = [];
-
+ // Defines must comply with ^define\s*([^\s=]*)\s*=\s?'\{\$([^\}]*)\}';
while ( !feof( $fp ) ) {
if ( $lineCallback ) {
call_user_func( $lineCallback );