function getStatement($cKey, $sqlCallback, $types, $params) {
		// Lazily prepare and cache the statement.
		if (!$this->stmtCache[$cKey]) {
			if (!($stmt = $this->mysqli->prepare( $sqlCallback instanceof \Closure ? $sqlCallback() : $sqlCallback ))) { throw new \Exception("Statement Error: {$this->mysqli->error}", $this->mysqli->errno); }
			$reflectMethod = new \ReflectionMethod('mysqli_stmt', 'bind_param');
			$args[] = $types;
			foreach (array_keys((array)$params) as $name) { $args[] = &$this->paramCache[$cKey][$name]; }
			if (!($reflectMethod->invokeArgs($stmt, $args))) { throw new \Exception("Bind Param Error: {$stmt->error}", $stmt->errno); }
			$this->stmtCache[$cKey] = $stmt;
		}
		foreach ((array)$params as $name=>$value) { $this->paramCache[$cKey][$name] = $value; }
		return $this->stmtCache[$cKey];
	}
function getStatement($cKey, $sqlCallback, $types, $params) {
		// Lazily prepare and cache the statement.
		if (!$this->stmtCache[$cKey]) {
			if (!($stmt = $this->mysqli->prepare( $sqlCallback instanceof \Closure ? $sqlCallback() : $sqlCallback ))) { throw new \Exception("Statement Error: {$this->mysqli->error}", $this->mysqli->errno); }
			$reflectMethod = new \ReflectionMethod('mysqli_stmt', 'bind_param');
			$args[] = $types;
			foreach (array_keys((array)$params) as $name) { $args[] = &$this->paramCache[$cKey][$name]; }
			if (!($reflectMethod->invokeArgs($stmt, $args))) { throw new \Exception("Bind Param Error: {$stmt->error}", $stmt->errno); }
			$this->stmtCache[$cKey] = $stmt;
		}
		foreach ((array)$params as $name=>$value) { $this->paramCache[$cKey][$name] = $value; }
		return $this->stmtCache[$cKey];
	}
function getStatement ( $ cKey , $ sqlCallback , $ types , $ params ) { // Lazily prepare and cache the statement. if ( ! $ this -> stmtCache [ $ cKey ] ) { if ( ! ( $ stmt = $ this -> mysqli -> prepare ( $ sqlCallback instanceof \ Closure ? $ sqlCallback ( ) : $ sqlCallback ) ) ) { throw new \ Exception ( "Statement Error: {$this->mysqli->error}" , $ this -> mysqli -> errno ) ; } $ reflectMethod = new \ ReflectionMethod ( 'mysqli_stmt' , 'bind_param' ) ; $ args [ ] = $ types ; foreach ( array_keys ( ( array ) $ params ) as $ name ) { $ args [ ] = & $ this -> paramCache [ $ cKey ] [ $ name ] ; } if ( ! ( $ reflectMethod -> invokeArgs ( $ stmt , $ args ) ) ) { throw new \ Exception ( "Bind Param Error: {$stmt->error}" , $ stmt -> errno ) ; } $ this -> stmtCache [ $ cKey ] = $ stmt ; } foreach ( ( array ) $ params as $ name => $ value ) { $ this -> paramCache [ $ cKey ] [ $ name ] = $ value ; } return $ this -> stmtCache [ $ cKey ] ; }
array and returns the statement ready to execute.
array and returns the statement ready to execute .