r108989 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108988‎ | r108989 | r108990 >
Date:16:13, 15 January 2012
Author:jeroendedauw
Status:ok (Comments)
Tags:
Comment:
added some docs
Modified paths:
  • /trunk/phase3/includes/logging/LogEntry.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/logging/LogEntry.php
@@ -313,6 +313,14 @@
314314 protected $comment = ''; ///!< @var string
315315 protected $deleted; ///!< @var int
316316
 317+ /**
 318+ * Constructor.
 319+ *
 320+ * @since 1.19
 321+ *
 322+ * @param string $type
 323+ * @param string $subtype
 324+ */
317325 public function __construct( $type, $subtype ) {
318326 $this->type = $type;
319327 $this->subtype = $subtype;
@@ -329,28 +337,66 @@
330338 * '4:color' => 'blue',
331339 * 'animal' => 'dog'
332340 * );
 341+ *
 342+ * @since 1.19
 343+ *
333344 * @param $parameters Associative array
334345 */
335346 public function setParameters( $parameters ) {
336347 $this->parameters = $parameters;
337348 }
338349
 350+ /**
 351+ * Set the user that performed the action being logged.
 352+ *
 353+ * @since 1.19
 354+ *
 355+ * @param User $performer
 356+ */
339357 public function setPerformer( User $performer ) {
340358 $this->performer = $performer;
341359 }
342360
 361+ /**
 362+ * Set the title of the object changed.
 363+ *
 364+ * @since 1.19
 365+ *
 366+ * @param Title $target
 367+ */
343368 public function setTarget( Title $target ) {
344369 $this->target = $target;
345370 }
346371
 372+ /**
 373+ * Set the timestamp of when the logged action took place.
 374+ *
 375+ * @since 1.19
 376+ *
 377+ * @param string $timestamp
 378+ */
347379 public function setTimestamp( $timestamp ) {
348380 $this->timestamp = $timestamp;
349381 }
350382
 383+ /**
 384+ * Set a comment associated with the action being logged.
 385+ *
 386+ * @since 1.19
 387+ *
 388+ * @param string $comment
 389+ */
351390 public function setComment( $comment ) {
352391 $this->comment = $comment;
353392 }
354393
 394+ /**
 395+ * TODO: document
 396+ *
 397+ * @since 1.19
 398+ *
 399+ * @param integer $deleted
 400+ */
355401 public function setDeleted( $deleted ) {
356402 $this->deleted = $deleted;
357403 }

Comments

#Comment by Nikerabbit (talk | contribs)   07:06, 16 January 2012

The whole file is new in 1.19.

#Comment by Jeroen De Dauw (talk | contribs)   13:26, 16 January 2012

Sure. And in an ideal world you could assume that people would add @since tags when adding in stuff later on, but since most people don't care to do this, you cannot assume that if some method does not have a since tag, it was added in the same version as the class.

Status & tagging log