Changed the comment about returning ExternalStore subclasses, as neither ExternalStoreDB or ExternalStoreHttp subclass ExternalStore
Remove trailing whitespace
Change-Id: I90b61f93a99d5088edfadf83c846ec5fa7e40c2e
*/
class ExternalStore {
var $mParams;
*/
class ExternalStore {
var $mParams;
+
+ /**
+ * @param $params array
+ */
function __construct( $params = array() ) {
$this->mParams = $params;
}
function __construct( $params = array() ) {
$this->mParams = $params;
}
/**
* Fetch data from given URL
*
/**
* Fetch data from given URL
*
*
* @param $proto String: type of external storage, should be a value in $wgExternalStores
* @param $params Array: associative array of parameters for the ExternalStore object.
*
* @param $proto String: type of external storage, should be a value in $wgExternalStores
* @param $params Array: associative array of parameters for the ExternalStore object.
- * @return ExternalStore subclass or false on error
+ * @return ExternalStore|bool ExternalStore class or false on error
*/
static function getStoreObject( $proto, $params = array() ) {
global $wgExternalStores;
*/
static function getStoreObject( $proto, $params = array() ) {
global $wgExternalStores;
return $store->store( $params, $data );
}
}
return $store->store( $params, $data );
}
}
/**
* Like insert() above, but does more of the work for us.
* This function does not need a url param, it builds it by
/**
* Like insert() above, but does more of the work for us.
* This function does not need a url param, it builds it by
*
* @param $data String
* @param $storageParams Array: associative array of parameters for the ExternalStore object.
*
* @param $data String
* @param $storageParams Array: associative array of parameters for the ExternalStore object.
+ * @throws DBConnectionError|DBQueryError|MWException
* @return string The URL of the stored data item, or false on error
*/
public static function insertToDefault( $data, $storageParams = array() ) {
* @return string The URL of the stored data item, or false on error
*/
public static function insertToDefault( $data, $storageParams = array() ) {
throw new MWException( "Unable to store text to external storage" );
}
}
throw new MWException( "Unable to store text to external storage" );
}
}
/**
* @param $data
* @param $wiki
/**
* @param $data
* @param $wiki
*/
class ExternalStoreDB {
*/
class ExternalStoreDB {
+ /**
+ * @param $params array
+ */
function __construct( $params = array() ) {
$this->mParams = $params;
}
function __construct( $params = array() ) {
$this->mParams = $params;
}
*
* @param $cluster String: the cluster name
* @param $data String: the data item
*
* @param $cluster String: the cluster name
* @param $data String: the data item
* @return string URL
*/
function store( $cluster, $data ) {
* @return string URL
*/
function store( $cluster, $data ) {