$_token
+$_token : string+
+ + +
diff --git a/.gitignore b/.gitignore index 5490473..f6790eb 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,4 @@ *.log *.lock *.idea -vendor +/vendor diff --git a/composer.json b/composer.json index 5d43e7a..5da3697 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,9 @@ { "name": "mixpanel/mixpanel-php", "description": "The Official PHP library for Mixpanel", + "type": "library", + "minimum-stability": "stable", + "prefer-stable": true, "keywords": [ "mixpanel", "mixpanel php" @@ -17,13 +20,27 @@ } ], "require": { - "php": ">=5.0" + "ext-json": "*", + "ext-curl": "*", + "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "5.6.*", + "phpunit/phpunit": "^7.0", "phpdocumentor/phpdocumentor": "2.9.*" }, "autoload": { - "files": ["lib/Mixpanel.php"] + "psr-4": { + "Mixpanel\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "Mixpanel\\Test\\": "test/" + } + }, + "config": { + "allow-plugins": { + "symfony/flex": false + } } } diff --git a/docs/build/phpdoc-cache-03/phpdoc-cache-file_d24c245cf2947c71b8442fb733e9e019.dat b/docs/build/phpdoc-cache-03/phpdoc-cache-file_d24c245cf2947c71b8442fb733e9e019.dat new file mode 100644 index 0000000..ce66538 Binary files /dev/null and b/docs/build/phpdoc-cache-03/phpdoc-cache-file_d24c245cf2947c71b8442fb733e9e019.dat differ diff --git a/docs/build/phpdoc-cache-10/phpdoc-cache-file_a79b0901d71e0f647bbbe2e32a61b361.dat b/docs/build/phpdoc-cache-10/phpdoc-cache-file_a79b0901d71e0f647bbbe2e32a61b361.dat new file mode 100644 index 0000000..f3fba04 Binary files /dev/null and b/docs/build/phpdoc-cache-10/phpdoc-cache-file_a79b0901d71e0f647bbbe2e32a61b361.dat differ diff --git a/docs/build/phpdoc-cache-2e/phpdoc-cache-settings.dat b/docs/build/phpdoc-cache-2e/phpdoc-cache-settings.dat new file mode 100644 index 0000000..3a83f54 Binary files /dev/null and b/docs/build/phpdoc-cache-2e/phpdoc-cache-settings.dat differ diff --git a/docs/build/phpdoc-cache-4d/phpdoc-cache-file_6eb396ad4f17f85bdace747d12079c51.dat b/docs/build/phpdoc-cache-4d/phpdoc-cache-file_6eb396ad4f17f85bdace747d12079c51.dat new file mode 100644 index 0000000..97e1da7 Binary files /dev/null and b/docs/build/phpdoc-cache-4d/phpdoc-cache-file_6eb396ad4f17f85bdace747d12079c51.dat differ diff --git a/docs/build/phpdoc-cache-5c/phpdoc-cache-file_f12be636472228ca0dffbaa420e12b68.dat b/docs/build/phpdoc-cache-5c/phpdoc-cache-file_f12be636472228ca0dffbaa420e12b68.dat new file mode 100644 index 0000000..1beff46 Binary files /dev/null and b/docs/build/phpdoc-cache-5c/phpdoc-cache-file_f12be636472228ca0dffbaa420e12b68.dat differ diff --git a/docs/build/phpdoc-cache-6a/phpdoc-cache-file_34ad14a55f301b2c1b01737f818b9278.dat b/docs/build/phpdoc-cache-6a/phpdoc-cache-file_34ad14a55f301b2c1b01737f818b9278.dat new file mode 100644 index 0000000..9f996b9 Binary files /dev/null and b/docs/build/phpdoc-cache-6a/phpdoc-cache-file_34ad14a55f301b2c1b01737f818b9278.dat differ diff --git a/docs/build/phpdoc-cache-91/phpdoc-cache-file_3916995003afda92992b0b702e908de0.dat b/docs/build/phpdoc-cache-91/phpdoc-cache-file_3916995003afda92992b0b702e908de0.dat new file mode 100644 index 0000000..0c3dfa6 Binary files /dev/null and b/docs/build/phpdoc-cache-91/phpdoc-cache-file_3916995003afda92992b0b702e908de0.dat differ diff --git a/docs/build/phpdoc-cache-9f/phpdoc-cache-file_dcfc7f8ba41f2ed3e5967d030ded64d7.dat b/docs/build/phpdoc-cache-9f/phpdoc-cache-file_dcfc7f8ba41f2ed3e5967d030ded64d7.dat new file mode 100644 index 0000000..ad2be9e Binary files /dev/null and b/docs/build/phpdoc-cache-9f/phpdoc-cache-file_dcfc7f8ba41f2ed3e5967d030ded64d7.dat differ diff --git a/docs/build/phpdoc-cache-a3/phpdoc-cache-file_d289a5d50a11fdbea7ef5168efcddd00.dat b/docs/build/phpdoc-cache-a3/phpdoc-cache-file_d289a5d50a11fdbea7ef5168efcddd00.dat new file mode 100644 index 0000000..08785c4 Binary files /dev/null and b/docs/build/phpdoc-cache-a3/phpdoc-cache-file_d289a5d50a11fdbea7ef5168efcddd00.dat differ diff --git a/docs/build/phpdoc-cache-b7/phpdoc-cache-file_43ddd34d00b567ff639f5887b3b5e954.dat b/docs/build/phpdoc-cache-b7/phpdoc-cache-file_43ddd34d00b567ff639f5887b3b5e954.dat new file mode 100644 index 0000000..3f18dc5 Binary files /dev/null and b/docs/build/phpdoc-cache-b7/phpdoc-cache-file_43ddd34d00b567ff639f5887b3b5e954.dat differ diff --git a/docs/build/phpdoc-cache-db/phpdoc-cache-file_8254b68fa0f2b7492ef026441398c792.dat b/docs/build/phpdoc-cache-db/phpdoc-cache-file_8254b68fa0f2b7492ef026441398c792.dat new file mode 100644 index 0000000..7cfb1eb Binary files /dev/null and b/docs/build/phpdoc-cache-db/phpdoc-cache-file_8254b68fa0f2b7492ef026441398c792.dat differ diff --git a/docs/classes/Base_MixpanelBase.html b/docs/classes/Mixpanel.Base.Base.html similarity index 75% rename from docs/classes/Base_MixpanelBase.html rename to docs/classes/Mixpanel.Base.Base.html index 39bfb63..01a4266 100644 --- a/docs/classes/Base_MixpanelBase.html +++ b/docs/classes/Mixpanel.Base.Base.html @@ -24,7 +24,7 @@ + + + + + + + + + + + + + + +
+ + + +Provides an API to create/update group profiles on Mixpanel
+ + + +$_consumer : \Mixpanel\ConsumerStrategies\AbstractConsumer+
+ + +
set(string|integer $group_key, string|integer $group_id, array $props, boolean $ignore_time = false)+
Set properties on a group profile. If the group profile does not exist, it creates it with these properties.
+If it does exist, it sets the properties to these values, overwriting existing values.
+ +| string|integer | +$group_key | +the group_key used for groups in Project Settings |
+
| string|integer | +$group_id | +the group id used for the group profile |
+
| array | +$props | +associative array of properties to set on the group profile |
+
| boolean | +$ignore_time | +If the $ignore_time property is true, Mixpanel will not automatically update the "Last Seen" property of the group profile. Otherwise, Mixpanel will add a "Last Seen" property associated with the current time |
+
setOnce(string|integer $group_key, string|integer $group_id, array $props, boolean $ignore_time = false)+
Set properties on a group profile. If the Group profile does not exist, it creates it with these properties.
+If it does exist, it sets the properties to these values but WILL NOT overwrite existing values.
+ +| string|integer | +$group_key | +the group_key used for groups in Project Settings |
+
| string|integer | +$group_id | +the group id used for the group profile |
+
| array | +$props | +associative array of properties to set on the group profile |
+
| boolean | +$ignore_time | +If the $ignore_time property is true, Mixpanel will not automatically update the "Last Seen" property of the group profile. Otherwise, Mixpanel will add a "Last Seen" property associated with the current time |
+
remove(string|integer $group_key, string|integer $group_id, array $props, boolean $ignore_time = false)+
Unset properties on a group profile. If the group does not exist, it creates it with no properties.
+If it does exist, it unsets these properties. NOTE: In other libraries we use 'unset' which is +a reserved word in PHP.
+ +| string|integer | +$group_key | +the group_key used for groups in Project Settings |
+
| string|integer | +$group_id | +the group id used for the group profile |
+
| array | +$props | +associative array of properties to unset on the group profile |
+
| boolean | +$ignore_time | +If the $ignore_time property is true, Mixpanel will not automatically update the "Last Seen" property of the group profile. Otherwise, Mixpanel will add a "Last Seen" property associated with the current time |
+
union(string|integer $group_key, string|integer $group_id, string $prop, string|array $val, boolean $ignore_time = false)+
Adds $val to a list located at $prop. If the property does not exist, it will be created. If $val is a string +and the list is empty or does not exist, a new list with one value will be created.
+ + +| string|integer | +$group_key | +the group_key used for groups in Project Settings |
+
| string|integer | +$group_id | +the group id used for the group profile |
+
| string | +$prop | +the property that holds the list |
+
| string|array | +$val | +items to add to the list |
+
| boolean | +$ignore_time | +If the $ignore_time property is true, Mixpanel will not automatically update the "Last Seen" property of the group profile. Otherwise, Mixpanel will add a "Last Seen" property associated with the current time |
+
deleteGroup(string|integer $group_key, string|integer $group_id, boolean $ignore_time = false)+
Delete this group profile from Mixpanel
+ + +| string|integer | +$group_key | +the group_key used for groups in Project Settings |
+
| string|integer | +$group_id | +the group id used for the group profile |
+
| boolean | +$ignore_time | +If the $ignore_time property is true, Mixpanel will not automatically update the "Last Seen" property of the profile. Otherwise, Mixpanel will add a "Last Seen" property associated with the current time |
+
_getConsumer() : \Mixpanel\ConsumerStrategies\AbstractConsumer+
Given a strategy type, return a new PersistenceStrategy object
+ + + + +_constructPayload( $group_key, $group_id, $operation, $value, boolean $ignore_time = false) : array+
Internal method to prepare a message given the message data
+ + +| + | $group_key | ++ |
| + | $group_id | ++ |
| + | $operation | ++ |
| + | $value | ++ |
| boolean | +$ignore_time | +If the $ignore_time property is true, Mixpanel will not automatically update the "Last Seen" property of the group Profile. Otherwise, Mixpanel will add a "Last Seen" property associated with the current time |
+