X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=Civi%2FApi4%2FGeneric%2FResult.php;h=fa6561a3305b25e3b3cb29cdad388f4e27f029eb;hb=41de5d4a9d8bc932899308987824131a7b41a838;hp=ca10ef6f5d99797b83c479c1a01d61aba513c084;hpb=32815eac44c3a63051b4f3d1ec2c25b88f33c245;p=civicrm-core.git diff --git a/Civi/Api4/Generic/Result.php b/Civi/Api4/Generic/Result.php index ca10ef6f5d..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 { /** @@ -23,6 +31,10 @@ class Result extends \ArrayObject { * @var string */ public $action; + /** + * @var array + */ + public $debug; /** * Api version * @var int