X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;ds=sidebyside;f=includes%2Fdb%2FDatabaseUtility.php;h=7fcb68e61cca8f3f5578df24b4bf1496a7fb99f9;hb=2a197150f6da26486a6f5bd28d0328786bc23c22;hp=9a520ff98047958c5b358bab6b266c5ac7df942a;hpb=4f21e6be661f7305abc223bb31600970a3fb5326;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/db/DatabaseUtility.php b/includes/db/DatabaseUtility.php index 9a520ff980..7fcb68e61c 100644 --- a/includes/db/DatabaseUtility.php +++ b/includes/db/DatabaseUtility.php @@ -113,11 +113,11 @@ class ResultWrapper implements Iterator { } /** - * Fetch the next row from the given result object, in object form. - * Fields can be retrieved with $row->fieldname, with fields acting like - * member variables. + * Fetch the next row from the given result object, in object form. Fields can be retrieved with + * $row->fieldname, with fields acting like member variables. If no more rows are available, + * false is returned. * - * @return stdClass + * @return stdClass|bool * @throws DBUnexpectedError Thrown if the database returns an error */ function fetchObject() { @@ -125,10 +125,10 @@ class ResultWrapper implements Iterator { } /** - * Fetch the next row from the given result object, in associative array - * form. Fields are retrieved with $row['fieldname']. + * Fetch the next row from the given result object, in associative array form. Fields are + * retrieved with $row['fieldname']. If no more rows are available, false is returned. * - * @return array + * @return array|bool * @throws DBUnexpectedError Thrown if the database returns an error */ function fetchRow() { @@ -221,6 +221,9 @@ class FakeResultWrapper extends ResultWrapper { /** @var array|stdClass|bool */ protected $currentRow = null; + /** + * @param array $array + */ function __construct( $array ) { $this->result = $array; } @@ -318,6 +321,20 @@ class LikeMatch { interface DBMasterPos { /** * @return float UNIX timestamp + * @since 1.25 */ public function asOfTime(); + + /** + * @param DBMasterPos $pos + * @return bool Whether this position is at or higher than $pos + * @since 1.27 + */ + public function hasReached( DBMasterPos $pos ); + + /** + * @return string + * @since 1.27 + */ + public function __toString(); }