X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=Civi%2FApi4%2FGeneric%2FResult.php;h=fa6561a3305b25e3b3cb29cdad388f4e27f029eb;hb=41de5d4a9d8bc932899308987824131a7b41a838;hp=c32bfa57496f04bee41d823bf39c4038c8384168;hpb=c82fb90aaeaa5ce7f8429344502dec09500a2994;p=civicrm-core.git diff --git a/Civi/Api4/Generic/Result.php b/Civi/Api4/Generic/Result.php index c32bfa5749..fa6561a330 100644 --- a/Civi/Api4/Generic/Result.php +++ b/Civi/Api4/Generic/Result.php @@ -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 { /**