Merge pull request #15760 from colemanw/iconPicker
[civicrm-core.git] / Civi / Api4 / Generic / Result.php
index c32bfa57496f04bee41d823bf39c4038c8384168..fa6561a3305b25e3b3cb29cdad388f4e27f029eb 100644 (file)
@@ -13,6 +13,14 @@ namespace Civi\Api4\Generic;
 
 /**
  * Container for api results.
+ *
+ * The Result object has three functions:
+ *
+ *  1. Store the results of the API call (accessible via ArrayAccess).
+ *  2. Store metadata like the Entity & Action names.
+ *     - Note: some actions extend the Result object to store extra metadata.
+ *       For example, BasicReplaceAction returns ReplaceResult which includes the additional $deleted property to list any items deleted by the operation.
+ *  3. Provide convenience methods like `$result->first()` and `$result->indexBy($field)`.
  */
 class Result extends \ArrayObject {
   /**