陈德本 8 éve
szülő
commit
76a875a523
60 módosított fájl, 7324 hozzáadás és 49 törlés
  1. 1 0
      .idea/php.xml
  2. 1 0
      .idea/sphinx.iml
  3. 101 43
      .idea/workspace.xml
  4. 49 4
      App/Script/Controller/Server.php
  5. 2 1
      composer.json
  6. 42 1
      composer.lock
  7. 1 0
      vendor/composer/autoload_psr4.php
  8. 8 0
      vendor/composer/autoload_static.php
  9. 43 0
      vendor/composer/installed.json
  10. 22 0
      vendor/jamesryanbell/cloudflare/composer.json
  11. 2004 0
      vendor/jamesryanbell/cloudflare/composer.lock
  12. 252 0
      vendor/jamesryanbell/cloudflare/src/CloudFlare/Api.php
  13. 80 0
      vendor/jamesryanbell/cloudflare/src/CloudFlare/Certificates.php
  14. 7 0
      vendor/jamesryanbell/cloudflare/src/CloudFlare/Exception/AuthenticationException.php
  15. 7 0
      vendor/jamesryanbell/cloudflare/src/CloudFlare/Exception/UnauthorizedException.php
  16. 25 0
      vendor/jamesryanbell/cloudflare/src/CloudFlare/IPs.php
  17. 42 0
      vendor/jamesryanbell/cloudflare/src/CloudFlare/Organizations.php
  18. 103 0
      vendor/jamesryanbell/cloudflare/src/CloudFlare/Organizations/Firewall/AccessRules/Rules.php
  19. 87 0
      vendor/jamesryanbell/cloudflare/src/CloudFlare/Organizations/Invites.php
  20. 133 0
      vendor/jamesryanbell/cloudflare/src/CloudFlare/Organizations/LoadBalancers/Monitors.php
  21. 116 0
      vendor/jamesryanbell/cloudflare/src/CloudFlare/Organizations/LoadBalancers/Pools.php
  22. 69 0
      vendor/jamesryanbell/cloudflare/src/CloudFlare/Organizations/Members.php
  23. 105 0
      vendor/jamesryanbell/cloudflare/src/CloudFlare/Organizations/Railguns.php
  24. 40 0
      vendor/jamesryanbell/cloudflare/src/CloudFlare/Organizations/Roles.php
  25. 102 0
      vendor/jamesryanbell/cloudflare/src/CloudFlare/Organizations/VirtualDns.php
  26. 97 0
      vendor/jamesryanbell/cloudflare/src/CloudFlare/Railguns.php
  27. 145 0
      vendor/jamesryanbell/cloudflare/src/CloudFlare/User.php
  28. 51 0
      vendor/jamesryanbell/cloudflare/src/CloudFlare/User/Billing.php
  29. 76 0
      vendor/jamesryanbell/cloudflare/src/CloudFlare/User/Billing/Subscriptions/Apps.php
  30. 76 0
      vendor/jamesryanbell/cloudflare/src/CloudFlare/User/Billing/Subscriptions/Zones.php
  31. 98 0
      vendor/jamesryanbell/cloudflare/src/CloudFlare/User/Firewall/AccessRules.php
  32. 53 0
      vendor/jamesryanbell/cloudflare/src/CloudFlare/User/Invites.php
  33. 89 0
      vendor/jamesryanbell/cloudflare/src/CloudFlare/User/LoadBalancers/GlobalPolicies.php
  34. 87 0
      vendor/jamesryanbell/cloudflare/src/CloudFlare/User/LoadBalancers/Maps.php
  35. 127 0
      vendor/jamesryanbell/cloudflare/src/CloudFlare/User/LoadBalancers/Monitors.php
  36. 85 0
      vendor/jamesryanbell/cloudflare/src/CloudFlare/User/LoadBalancers/Notifiers.php
  37. 95 0
      vendor/jamesryanbell/cloudflare/src/CloudFlare/User/LoadBalancers/Origins.php
  38. 111 0
      vendor/jamesryanbell/cloudflare/src/CloudFlare/User/LoadBalancers/Pools.php
  39. 66 0
      vendor/jamesryanbell/cloudflare/src/CloudFlare/User/Organizations.php
  40. 96 0
      vendor/jamesryanbell/cloudflare/src/CloudFlare/User/VirtualDns.php
  41. 153 0
      vendor/jamesryanbell/cloudflare/src/CloudFlare/Zone.php
  42. 47 0
      vendor/jamesryanbell/cloudflare/src/CloudFlare/Zone/Aml.php
  43. 66 0
      vendor/jamesryanbell/cloudflare/src/CloudFlare/Zone/Analytics.php
  44. 52 0
      vendor/jamesryanbell/cloudflare/src/CloudFlare/Zone/Cache.php
  45. 58 0
      vendor/jamesryanbell/cloudflare/src/CloudFlare/Zone/CustomPages.php
  46. 125 0
      vendor/jamesryanbell/cloudflare/src/CloudFlare/Zone/CustomSSL.php
  47. 128 0
      vendor/jamesryanbell/cloudflare/src/CloudFlare/Zone/Dns.php
  48. 114 0
      vendor/jamesryanbell/cloudflare/src/CloudFlare/Zone/Firewall/AccessRules.php
  49. 95 0
      vendor/jamesryanbell/cloudflare/src/CloudFlare/Zone/KeylessSSL.php
  50. 132 0
      vendor/jamesryanbell/cloudflare/src/CloudFlare/Zone/LoadBalancers.php
  51. 139 0
      vendor/jamesryanbell/cloudflare/src/CloudFlare/Zone/Pagerules.php
  52. 51 0
      vendor/jamesryanbell/cloudflare/src/CloudFlare/Zone/Plan.php
  53. 69 0
      vendor/jamesryanbell/cloudflare/src/CloudFlare/Zone/Railgun.php
  54. 99 0
      vendor/jamesryanbell/cloudflare/src/CloudFlare/Zone/SSL.php
  55. 40 0
      vendor/jamesryanbell/cloudflare/src/CloudFlare/Zone/SSL/Analyze.php
  56. 29 0
      vendor/jamesryanbell/cloudflare/src/CloudFlare/Zone/SSL/CertificatePacks.php
  57. 894 0
      vendor/jamesryanbell/cloudflare/src/CloudFlare/Zone/Settings.php
  58. 75 0
      vendor/jamesryanbell/cloudflare/src/CloudFlare/Zone/WAF/Packages.php
  59. 81 0
      vendor/jamesryanbell/cloudflare/src/CloudFlare/Zone/WAF/Packages/Groups.php
  60. 83 0
      vendor/jamesryanbell/cloudflare/src/CloudFlare/Zone/WAF/Packages/Rules.php

+ 1 - 0
.idea/php.xml

@@ -37,6 +37,7 @@
       <path value="$PROJECT_DIR$/vendor/phpdocumentor/type-resolver" />
       <path value="$PROJECT_DIR$/vendor/phpdocumentor/reflection-common" />
       <path value="$PROJECT_DIR$/vendor/phpmailer/phpmailer" />
+      <path value="$PROJECT_DIR$/vendor/jamesryanbell/cloudflare" />
     </include_path>
   </component>
   <component name="PhpProjectSharedConfiguration" php_language_level="7" />

+ 1 - 0
.idea/sphinx.iml

@@ -7,6 +7,7 @@
       <excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/instantiator" />
       <excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/lexer" />
       <excludeFolder url="file://$MODULE_DIR$/vendor/eleirbag89/telegrambotphp" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/jamesryanbell/cloudflare" />
       <excludeFolder url="file://$MODULE_DIR$/vendor/myclabs/deep-copy" />
       <excludeFolder url="file://$MODULE_DIR$/vendor/phar-io/manifest" />
       <excludeFolder url="file://$MODULE_DIR$/vendor/phar-io/version" />

+ 101 - 43
.idea/workspace.xml

@@ -1,8 +1,16 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
   <component name="ChangeListManager">
-    <list default="true" id="d417c7e2-9370-4a4d-828f-09be06adcd69" name="Default" comment="telegram">
+    <list default="true" id="d417c7e2-9370-4a4d-828f-09be06adcd69" name="Default" comment="adm">
+      <change beforePath="$PROJECT_DIR$/.idea/php.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/php.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/.idea/sphinx.iml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/sphinx.iml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/App/Script/Controller/Server.php" beforeDir="false" afterPath="$PROJECT_DIR$/App/Script/Controller/Server.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/composer.json" beforeDir="false" afterPath="$PROJECT_DIR$/composer.json" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/composer.lock" beforeDir="false" afterPath="$PROJECT_DIR$/composer.lock" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/vendor/composer/autoload_psr4.php" beforeDir="false" afterPath="$PROJECT_DIR$/vendor/composer/autoload_psr4.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/vendor/composer/autoload_static.php" beforeDir="false" afterPath="$PROJECT_DIR$/vendor/composer/autoload_static.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/vendor/composer/installed.json" beforeDir="false" afterPath="$PROJECT_DIR$/vendor/composer/installed.json" afterDir="false" />
     </list>
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
     <option name="SHOW_DIALOG" value="false" />
@@ -25,25 +33,27 @@
       <usages-collector id="statistics.file.extensions.open">
         <counts>
           <entry key="json" value="4" />
-          <entry key="php" value="25" />
+          <entry key="php" value="27" />
         </counts>
       </usages-collector>
       <usages-collector id="statistics.file.types.open">
         <counts>
           <entry key="JSON" value="4" />
-          <entry key="PHP" value="25" />
+          <entry key="PHP" value="27" />
         </counts>
       </usages-collector>
       <usages-collector id="statistics.file.extensions.edit">
         <counts>
           <entry key="json" value="44" />
-          <entry key="php" value="582" />
+          <entry key="php" value="1254" />
+          <entry key="txt" value="3" />
         </counts>
       </usages-collector>
       <usages-collector id="statistics.file.types.edit">
         <counts>
           <entry key="JSON" value="44" />
-          <entry key="PHP" value="582" />
+          <entry key="PHP" value="1254" />
+          <entry key="PLAIN_TEXT" value="3" />
         </counts>
       </usages-collector>
       <usages-collector id="statistics.php.new.class">
@@ -64,20 +74,29 @@
       <file pinned="false" current-in-tab="true">
         <entry file="file://$PROJECT_DIR$/App/Script/Controller/Server.php">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="547">
-              <caret line="37" column="17" selection-start-line="37" selection-start-column="17" selection-end-line="37" selection-end-column="17" />
+            <state relative-caret-position="297">
+              <caret line="49" column="50" lean-forward="true" selection-start-line="49" selection-start-column="50" selection-end-line="49" selection-end-column="50" />
               <folding>
-                <element signature="e#136#170#0#PHP" expanded="true" />
+                <element signature="e#136#155#0#PHP" expanded="true" />
               </folding>
             </state>
           </provider>
         </entry>
       </file>
+      <file pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/vendor/jamesryanbell/cloudflare/src/CloudFlare/Zone/Dns.php">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="83">
+              <caret line="102" column="20" selection-start-line="102" selection-start-column="20" selection-end-line="102" selection-end-column="20" />
+            </state>
+          </provider>
+        </entry>
+      </file>
       <file pinned="false" current-in-tab="false">
         <entry file="file://$PROJECT_DIR$/App/Api/Controller/Ping.php">
           <provider selected="true" editor-type-id="text-editor">
             <state relative-caret-position="576">
-              <caret line="37" column="21" lean-forward="true" selection-start-line="37" selection-start-column="21" selection-end-line="37" selection-end-column="21" />
+              <caret line="37" column="21" selection-start-line="37" selection-start-column="21" selection-end-line="37" selection-end-column="21" />
               <folding>
                 <element signature="e#133#164#0#PHP" expanded="true" />
               </folding>
@@ -89,16 +108,7 @@
         <entry file="file://$PROJECT_DIR$/Config/PersonalityCollect.php">
           <provider selected="true" editor-type-id="text-editor">
             <state relative-caret-position="323">
-              <caret line="17" column="1" lean-forward="true" selection-start-line="17" selection-start-column="1" selection-end-line="17" selection-end-column="1" />
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/App/Api/Package/Database/Hash.php">
-          <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="38">
-              <caret line="2" column="25" selection-start-line="2" selection-start-column="25" selection-end-line="2" selection-end-column="25" />
+              <caret line="17" column="1" selection-start-line="17" selection-start-column="1" selection-end-line="17" selection-end-column="1" />
             </state>
           </provider>
         </entry>
@@ -134,7 +144,7 @@
         <entry file="file://$PROJECT_DIR$/composer.json">
           <provider selected="true" editor-type-id="text-editor">
             <state relative-caret-position="152">
-              <caret line="8" lean-forward="true" selection-start-line="8" selection-end-line="8" />
+              <caret line="9" selection-start-line="9" selection-end-line="9" />
             </state>
           </provider>
         </entry>
@@ -152,7 +162,7 @@
         <entry file="file://$PROJECT_DIR$/App/Api/Package/Database/Server.php">
           <provider selected="true" editor-type-id="text-editor">
             <state relative-caret-position="323">
-              <caret line="17" lean-forward="true" selection-start-line="17" selection-end-line="17" />
+              <caret line="17" selection-start-line="17" selection-end-line="17" />
             </state>
           </provider>
         </entry>
@@ -314,11 +324,14 @@
       <path value="$PROJECT_DIR$/vendor/phpdocumentor/type-resolver" />
       <path value="$PROJECT_DIR$/vendor/phpdocumentor/reflection-common" />
       <path value="$PROJECT_DIR$/vendor/phpmailer/phpmailer" />
+      <path value="$PROJECT_DIR$/vendor/jamesryanbell/cloudflare" />
     </include_path>
   </component>
-  <component name="ProjectFrameBounds" fullScreen="true">
+  <component name="ProjectFrameBounds">
+    <option name="x" value="22" />
+    <option name="y" value="35" />
     <option name="width" value="1440" />
-    <option name="height" value="900" />
+    <option name="height" value="825" />
   </component>
   <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
   <component name="ProjectView">
@@ -549,7 +562,7 @@
       <workItem from="1526268446293" duration="12711000" />
       <workItem from="1528527970342" duration="845000" />
       <workItem from="1529074202261" duration="35000" />
-      <workItem from="1535705721105" duration="5372000" />
+      <workItem from="1535705721105" duration="8950000" />
     </task>
     <task id="LOCAL-00001" summary="telegram">
       <created>1519284784104</created>
@@ -656,7 +669,28 @@
       <option name="project" value="LOCAL" />
       <updated>1535723650870</updated>
     </task>
-    <option name="localTasksCounter" value="16" />
+    <task id="LOCAL-00016" summary="telegram">
+      <created>1535724786818</created>
+      <option name="number" value="00016" />
+      <option name="presentableId" value="LOCAL-00016" />
+      <option name="project" value="LOCAL" />
+      <updated>1535724786819</updated>
+    </task>
+    <task id="LOCAL-00017" summary="telegram">
+      <created>1535724903832</created>
+      <option name="number" value="00017" />
+      <option name="presentableId" value="LOCAL-00017" />
+      <option name="project" value="LOCAL" />
+      <updated>1535724903832</updated>
+    </task>
+    <task id="LOCAL-00018" summary="telegram">
+      <created>1535725034676</created>
+      <option name="number" value="00018" />
+      <option name="presentableId" value="LOCAL-00018" />
+      <option name="project" value="LOCAL" />
+      <updated>1535725034676</updated>
+    </task>
+    <option name="localTasksCounter" value="19" />
     <servers />
   </component>
   <component name="TestHistory">
@@ -674,7 +708,7 @@
     </history-entry>
   </component>
   <component name="TimeTrackingManager">
-    <option name="totallyTimeSpent" value="157533000" />
+    <option name="totallyTimeSpent" value="161111000" />
   </component>
   <component name="TodoView">
     <todo-panel id="selected-file">
@@ -686,10 +720,10 @@
     </todo-panel>
   </component>
   <component name="ToolWindowManager">
-    <frame x="0" y="0" width="1440" height="900" extended-state="0" />
+    <frame x="22" y="35" width="1440" height="825" extended-state="0" />
     <editor active="true" />
     <layout>
-      <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.25035766" />
+      <window_info content_ui="combo" id="Project" order="0" weight="0.25035766" />
       <window_info id="Structure" order="1" weight="0.25" />
       <window_info id="Favorites" order="2" side_tool="true" />
       <window_info anchor="bottom" id="Database Changes" show_stripe_button="false" />
@@ -702,7 +736,7 @@
       <window_info anchor="bottom" id="TODO" order="6" sideWeight="0.49574015" weight="0.3292683" />
       <window_info anchor="bottom" id="Docker" order="7" />
       <window_info anchor="bottom" id="Version Control" order="8" />
-      <window_info anchor="bottom" id="Terminal" order="9" />
+      <window_info anchor="bottom" id="Terminal" order="9" weight="0.32957748" />
       <window_info anchor="bottom" id="Event Log" order="10" sideWeight="0.5042598" side_tool="true" weight="0.3292683" />
       <window_info anchor="bottom" id="Messages" order="11" />
       <window_info anchor="right" id="Commander" order="0" weight="0.4" />
@@ -712,6 +746,30 @@
       <window_info anchor="right" id="LuaJ" order="4" />
       <window_info anchor="right" id="Database" order="5" />
     </layout>
+    <layout-to-restore>
+      <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.25035766" />
+      <window_info id="Structure" order="1" weight="0.25" />
+      <window_info id="Favorites" order="2" side_tool="true" />
+      <window_info anchor="bottom" id="Database Changes" order="0" show_stripe_button="false" />
+      <window_info anchor="bottom" id="Message" order="1" />
+      <window_info anchor="bottom" id="Find" order="2" weight="0.3292683" />
+      <window_info anchor="bottom" id="Run" order="3" weight="0.35873982" />
+      <window_info anchor="bottom" id="Debug" order="4" weight="0.399361" />
+      <window_info anchor="bottom" id="Cvs" order="5" weight="0.25" />
+      <window_info anchor="bottom" id="Inspection" order="6" weight="0.4" />
+      <window_info anchor="bottom" id="TODO" order="7" sideWeight="0.49574015" weight="0.3292683" />
+      <window_info anchor="bottom" id="Docker" order="8" />
+      <window_info anchor="bottom" id="Version Control" order="9" />
+      <window_info active="true" anchor="bottom" id="Terminal" order="10" visible="true" weight="0.32957748" />
+      <window_info anchor="bottom" id="Event Log" order="11" sideWeight="0.5042598" side_tool="true" weight="0.3292683" />
+      <window_info anchor="bottom" id="Messages" order="12" />
+      <window_info anchor="right" id="Commander" order="0" weight="0.4" />
+      <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
+      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
+      <window_info anchor="right" id="1024 Tools" order="3" />
+      <window_info anchor="right" id="LuaJ" order="4" />
+      <window_info anchor="right" id="Database" order="5" />
+    </layout-to-restore>
   </component>
   <component name="TypeScriptGeneratedFilesManager">
     <option name="version" value="1" />
@@ -750,13 +808,6 @@
     </breakpoint-manager>
   </component>
   <component name="editorHistoryManager">
-    <entry file="file://$PROJECT_DIR$/Frame/Library/MySQL/Query.php">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="5206">
-          <caret line="274" column="20" selection-start-line="274" selection-start-column="20" selection-end-line="274" selection-end-column="20" />
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/index.php">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="38">
@@ -1013,7 +1064,7 @@
     <entry file="file://$PROJECT_DIR$/App/Api/Package/Database/Server.php">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="323">
-          <caret line="17" lean-forward="true" selection-start-line="17" selection-end-line="17" />
+          <caret line="17" selection-start-line="17" selection-end-line="17" />
         </state>
       </provider>
     </entry>
@@ -1068,33 +1119,40 @@
     <entry file="file://$PROJECT_DIR$/composer.json">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="152">
-          <caret line="8" lean-forward="true" selection-start-line="8" selection-end-line="8" />
+          <caret line="9" selection-start-line="9" selection-end-line="9" />
         </state>
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/Config/PersonalityCollect.php">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="323">
-          <caret line="17" column="1" lean-forward="true" selection-start-line="17" selection-start-column="1" selection-end-line="17" selection-end-column="1" />
+          <caret line="17" column="1" selection-start-line="17" selection-start-column="1" selection-end-line="17" selection-end-column="1" />
         </state>
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/App/Api/Controller/Ping.php">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="576">
-          <caret line="37" column="21" lean-forward="true" selection-start-line="37" selection-start-column="21" selection-end-line="37" selection-end-column="21" />
+          <caret line="37" column="21" selection-start-line="37" selection-start-column="21" selection-end-line="37" selection-end-column="21" />
           <folding>
             <element signature="e#133#164#0#PHP" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
+    <entry file="file://$PROJECT_DIR$/vendor/jamesryanbell/cloudflare/src/CloudFlare/Zone/Dns.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="83">
+          <caret line="102" column="20" selection-start-line="102" selection-start-column="20" selection-end-line="102" selection-end-column="20" />
+        </state>
+      </provider>
+    </entry>
     <entry file="file://$PROJECT_DIR$/App/Script/Controller/Server.php">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="547">
-          <caret line="37" column="17" selection-start-line="37" selection-start-column="17" selection-end-line="37" selection-end-column="17" />
+        <state relative-caret-position="297">
+          <caret line="49" column="50" lean-forward="true" selection-start-line="49" selection-start-column="50" selection-end-line="49" selection-end-column="50" />
           <folding>
-            <element signature="e#136#170#0#PHP" expanded="true" />
+            <element signature="e#136#155#0#PHP" expanded="true" />
           </folding>
         </state>
       </provider>

+ 49 - 4
App/Script/Controller/Server.php

@@ -9,6 +9,8 @@
 namespace PhpLife\App\Script\Controller;
 
 
+use Cloudflare\Api;
+use Cloudflare\Zone\Dns;
 use PhpLife\App\Script\Controller;
 use PhpLife\App\Api\Package\Database\Server as ServerTable;
 
@@ -20,22 +22,65 @@ class Server extends Controller
      */
     protected function main()
     {
-        $i = 0;
+        $recode_data=[];
+//        $i = 0;
+        $key="093fcd440ed453c2689c42150bdb7d5dbc4fb";
+        $zone_identifier="89a0fe0d09762c557fd0c7799efb1c9a";
+        $client = new Api('chendeben@qq.com', $key);
+        $dns = new Dns($client);
+//        $id=$dns->create($zone_identifier, "A", "test.97admin.com", "127.0.0.1");
+//        $id=$dns->update($zone_identifier, "23f0bb6a9eede8750153b1983af5dacc","A","test.97admin.com","127.0.0.2");
+
+//        print_r($id);
+//        $dns->update($zone_identifier, $identifier)
+
+//        die();
+
         while (true) {
             $data = ServerTable::select();
+
             foreach ($data as $val) {
                 $ip = $val['ip'];
                 $port = $val['port'];
                 $status = $this->check($ip, $port);
                 if ($status == 1) {
-                    echo $ip . "\t可用\r\n";
+                    echo date("Y-m-d H:i:s")."\t\t".$ip . "\t可用\r\n";
+
                 }
 //                if ($val['status'] != $status) {
                 ServerTable::update(['status' => $status, "last_check" => date("Y-m-d H:i:s")], ['id' => $val['id']]);
+                if ($status==1){
+                    if (!$recode_data[$val['domain']]){
+                        $recode=$dns->list_records($zone_identifier,null,$val['domain']);
+                        $recode=json_decode(json_encode($recode),true);
+                        if ($recode['result']){
+                            $result=$recode['result'][0];
+                            $recode_data[$val['domain']]=$result;
+                        }
+                    }
+                    $result=$recode_data[$val['domain']];
+//                    print_r($result);
+//                    die();
+                    if (!$result){
+                        echo date("Y-m-d H:i:s")."\t\t"."域名记录【".$val['domain']."】不存在,正在建立\r\n";
+                        $recode=$dns->create($zone_identifier, "A", $val['domain'], $val['ip']);
+                        $recode=json_decode(json_encode($recode),true);
+                        if ($recode['result']){
+                            $result=$recode['result'][0];
+                            $recode_data[$val['domain']]=$result;
+                            echo date("Y-m-d H:i:s")."\t\t"."域名记录【".$val['domain']."】新建成功\r\n";
+                        }
+
+                    }
+                    if ($result['content']!=$val['ip']){
+                        echo date("Y-m-d H:i:s")."\t\t"."域名记录【".$val['domain']."】与数据库不一致,正在更新\r\n";
+                        $dns->update($zone_identifier, $result['id'],"A",$val['domain'],$val['ip']);
+                    }
+                }
 //                }
             }
-            echo "第" . $i . "次执行完毕\r\n";
-            $i++;
+//            echo "第" . $i . "次执行完毕\r\n";
+//            $i++;
             sleep(60);
         }
 

+ 2 - 1
composer.json

@@ -3,6 +3,7 @@
         "eleirbag89/telegrambotphp": "^1.3",
         "phpunit/phpunit": "^6.2",
         "zircote/swagger-php": "*",
-        "phpmailer/phpmailer": "^6.0"
+        "phpmailer/phpmailer": "^6.0",
+        "jamesryanbell/cloudflare": "^1.11"
     }
 }

+ 42 - 1
composer.lock

@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
         "This file is @generated automatically"
     ],
-    "content-hash": "8cb8a1513f5054001bee06b535428b10",
+    "content-hash": "6e23894893e4d1f9a47cff03469ad9cf",
     "packages": [
         {
             "name": "doctrine/annotations",
@@ -219,6 +219,47 @@
             "description": "A very simple PHP Telegram Bot API",
             "time": "2017-12-27T13:46:04+00:00"
         },
+        {
+            "name": "jamesryanbell/cloudflare",
+            "version": "1.11.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/jamesryanbell/cloudflare.git",
+                "reference": "75e93bb822619d8ddb8b1843588caa2fad739491"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/jamesryanbell/cloudflare/zipball/75e93bb822619d8ddb8b1843588caa2fad739491",
+                "reference": "75e93bb822619d8ddb8b1843588caa2fad739491",
+                "shasum": ""
+            },
+            "require-dev": {
+                "phpunit/phpunit": "< 6",
+                "satooshi/php-coveralls": "dev-master"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "Cloudflare\\": "src/CloudFlare"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "James Bell",
+                    "email": "james@james-bell.co.uk"
+                }
+            ],
+            "description": "CloudFlare API - PHP",
+            "keywords": [
+                "api",
+                "cloudflare"
+            ],
+            "time": "2017-08-04T19:01:02+00:00"
+        },
         {
             "name": "myclabs/deep-copy",
             "version": "1.7.0",

+ 1 - 0
vendor/composer/autoload_psr4.php

@@ -14,4 +14,5 @@ return array(
     'Doctrine\\Instantiator\\' => array($vendorDir . '/doctrine/instantiator/src/Doctrine/Instantiator'),
     'Doctrine\\Common\\Annotations\\' => array($vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations'),
     'DeepCopy\\' => array($vendorDir . '/myclabs/deep-copy/src/DeepCopy'),
+    'Cloudflare\\' => array($vendorDir . '/jamesryanbell/cloudflare/src/CloudFlare'),
 );

+ 8 - 0
vendor/composer/autoload_static.php

@@ -37,6 +37,10 @@ class ComposerStaticInit94d738e06733adb5a3d0bba9fcfc1b17
             'Doctrine\\Common\\Annotations\\' => 28,
             'DeepCopy\\' => 9,
         ),
+        'C' => 
+        array (
+            'Cloudflare\\' => 11,
+        ),
     );
 
     public static $prefixDirsPsr4 = array (
@@ -74,6 +78,10 @@ class ComposerStaticInit94d738e06733adb5a3d0bba9fcfc1b17
         array (
             0 => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy',
         ),
+        'Cloudflare\\' => 
+        array (
+            0 => __DIR__ . '/..' . '/jamesryanbell/cloudflare/src/CloudFlare',
+        ),
     );
 
     public static $prefixesPsr0 = array (

+ 43 - 0
vendor/composer/installed.json

@@ -220,6 +220,49 @@
         ],
         "description": "A very simple PHP Telegram Bot API"
     },
+    {
+        "name": "jamesryanbell/cloudflare",
+        "version": "1.11.1",
+        "version_normalized": "1.11.1.0",
+        "source": {
+            "type": "git",
+            "url": "https://github.com/jamesryanbell/cloudflare.git",
+            "reference": "75e93bb822619d8ddb8b1843588caa2fad739491"
+        },
+        "dist": {
+            "type": "zip",
+            "url": "https://api.github.com/repos/jamesryanbell/cloudflare/zipball/75e93bb822619d8ddb8b1843588caa2fad739491",
+            "reference": "75e93bb822619d8ddb8b1843588caa2fad739491",
+            "shasum": ""
+        },
+        "require-dev": {
+            "phpunit/phpunit": "< 6",
+            "satooshi/php-coveralls": "dev-master"
+        },
+        "time": "2017-08-04T19:01:02+00:00",
+        "type": "library",
+        "installation-source": "dist",
+        "autoload": {
+            "psr-4": {
+                "Cloudflare\\": "src/CloudFlare"
+            }
+        },
+        "notification-url": "https://packagist.org/downloads/",
+        "license": [
+            "MIT"
+        ],
+        "authors": [
+            {
+                "name": "James Bell",
+                "email": "james@james-bell.co.uk"
+            }
+        ],
+        "description": "CloudFlare API - PHP",
+        "keywords": [
+            "api",
+            "cloudflare"
+        ]
+    },
     {
         "name": "myclabs/deep-copy",
         "version": "1.7.0",

+ 22 - 0
vendor/jamesryanbell/cloudflare/composer.json

@@ -0,0 +1,22 @@
+{
+    "name": "jamesryanbell/cloudflare",
+    "description": "CloudFlare API - PHP",
+    "license": "MIT",
+    "keywords": ["cloudflare", "api"],
+    "authors": [
+        {
+            "name": "James Bell",
+            "email": "james@james-bell.co.uk"
+        }
+    ],
+    "require": {},
+    "require-dev": {
+        "phpunit/phpunit": "< 6",
+        "satooshi/php-coveralls": "dev-master"
+    },
+    "autoload": {
+        "psr-4": {
+            "Cloudflare\\": "src/CloudFlare"
+        }
+    }
+}

+ 2004 - 0
vendor/jamesryanbell/cloudflare/composer.lock

@@ -0,0 +1,2004 @@
+{
+    "_readme": [
+        "This file locks the dependencies of your project to a known state",
+        "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
+        "This file is @generated automatically"
+    ],
+    "content-hash": "12de1420a4cc5a01c04a6e40c8cc107d",
+    "packages": [],
+    "packages-dev": [
+        {
+            "name": "doctrine/instantiator",
+            "version": "1.0.5",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/doctrine/instantiator.git",
+                "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d",
+                "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3,<8.0-DEV"
+            },
+            "require-dev": {
+                "athletic/athletic": "~0.1.8",
+                "ext-pdo": "*",
+                "ext-phar": "*",
+                "phpunit/phpunit": "~4.0",
+                "squizlabs/php_codesniffer": "~2.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.0.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Marco Pivetta",
+                    "email": "ocramius@gmail.com",
+                    "homepage": "http://ocramius.github.com/"
+                }
+            ],
+            "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
+            "homepage": "https://github.com/doctrine/instantiator",
+            "keywords": [
+                "constructor",
+                "instantiate"
+            ],
+            "time": "2015-06-14T21:17:01+00:00"
+        },
+        {
+            "name": "guzzlehttp/guzzle",
+            "version": "6.2.3",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/guzzle/guzzle.git",
+                "reference": "8d6c6cc55186db87b7dc5009827429ba4e9dc006"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/guzzle/guzzle/zipball/8d6c6cc55186db87b7dc5009827429ba4e9dc006",
+                "reference": "8d6c6cc55186db87b7dc5009827429ba4e9dc006",
+                "shasum": ""
+            },
+            "require": {
+                "guzzlehttp/promises": "^1.0",
+                "guzzlehttp/psr7": "^1.4",
+                "php": ">=5.5"
+            },
+            "require-dev": {
+                "ext-curl": "*",
+                "phpunit/phpunit": "^4.0",
+                "psr/log": "^1.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "6.2-dev"
+                }
+            },
+            "autoload": {
+                "files": [
+                    "src/functions_include.php"
+                ],
+                "psr-4": {
+                    "GuzzleHttp\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Michael Dowling",
+                    "email": "mtdowling@gmail.com",
+                    "homepage": "https://github.com/mtdowling"
+                }
+            ],
+            "description": "Guzzle is a PHP HTTP client library",
+            "homepage": "http://guzzlephp.org/",
+            "keywords": [
+                "client",
+                "curl",
+                "framework",
+                "http",
+                "http client",
+                "rest",
+                "web service"
+            ],
+            "time": "2017-02-28T22:50:30+00:00"
+        },
+        {
+            "name": "guzzlehttp/promises",
+            "version": "v1.3.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/guzzle/promises.git",
+                "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646",
+                "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.5.0"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^4.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.4-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "GuzzleHttp\\Promise\\": "src/"
+                },
+                "files": [
+                    "src/functions_include.php"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Michael Dowling",
+                    "email": "mtdowling@gmail.com",
+                    "homepage": "https://github.com/mtdowling"
+                }
+            ],
+            "description": "Guzzle promises library",
+            "keywords": [
+                "promise"
+            ],
+            "time": "2016-12-20T10:07:11+00:00"
+        },
+        {
+            "name": "guzzlehttp/psr7",
+            "version": "1.4.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/guzzle/psr7.git",
+                "reference": "0d6c7ca039329247e4f0f8f8f6506810e8248855"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/guzzle/psr7/zipball/0d6c7ca039329247e4f0f8f8f6506810e8248855",
+                "reference": "0d6c7ca039329247e4f0f8f8f6506810e8248855",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.4.0",
+                "psr/http-message": "~1.0"
+            },
+            "provide": {
+                "psr/http-message-implementation": "1.0"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "~4.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.4-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "GuzzleHttp\\Psr7\\": "src/"
+                },
+                "files": [
+                    "src/functions_include.php"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Michael Dowling",
+                    "email": "mtdowling@gmail.com",
+                    "homepage": "https://github.com/mtdowling"
+                },
+                {
+                    "name": "Tobias Schultze",
+                    "homepage": "https://github.com/Tobion"
+                }
+            ],
+            "description": "PSR-7 message implementation that also provides common utility methods",
+            "keywords": [
+                "http",
+                "message",
+                "request",
+                "response",
+                "stream",
+                "uri",
+                "url"
+            ],
+            "time": "2017-02-27T10:51:17+00:00"
+        },
+        {
+            "name": "myclabs/deep-copy",
+            "version": "1.6.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/myclabs/DeepCopy.git",
+                "reference": "5a5a9fc8025a08d8919be87d6884d5a92520cefe"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/5a5a9fc8025a08d8919be87d6884d5a92520cefe",
+                "reference": "5a5a9fc8025a08d8919be87d6884d5a92520cefe",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.4.0"
+            },
+            "require-dev": {
+                "doctrine/collections": "1.*",
+                "phpunit/phpunit": "~4.1"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "DeepCopy\\": "src/DeepCopy/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "description": "Create deep copies (clones) of your objects",
+            "homepage": "https://github.com/myclabs/DeepCopy",
+            "keywords": [
+                "clone",
+                "copy",
+                "duplicate",
+                "object",
+                "object graph"
+            ],
+            "time": "2017-01-26T22:05:40+00:00"
+        },
+        {
+            "name": "phpdocumentor/reflection-common",
+            "version": "1.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/phpDocumentor/ReflectionCommon.git",
+                "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c",
+                "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.5"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^4.6"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.0.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "phpDocumentor\\Reflection\\": [
+                        "src"
+                    ]
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Jaap van Otterdijk",
+                    "email": "opensource@ijaap.nl"
+                }
+            ],
+            "description": "Common reflection classes used by phpdocumentor to reflect the code structure",
+            "homepage": "http://www.phpdoc.org",
+            "keywords": [
+                "FQSEN",
+                "phpDocumentor",
+                "phpdoc",
+                "reflection",
+                "static analysis"
+            ],
+            "time": "2015-12-27T11:43:31+00:00"
+        },
+        {
+            "name": "phpdocumentor/reflection-docblock",
+            "version": "3.1.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
+                "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/8331b5efe816ae05461b7ca1e721c01b46bafb3e",
+                "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.5",
+                "phpdocumentor/reflection-common": "^1.0@dev",
+                "phpdocumentor/type-resolver": "^0.2.0",
+                "webmozart/assert": "^1.0"
+            },
+            "require-dev": {
+                "mockery/mockery": "^0.9.4",
+                "phpunit/phpunit": "^4.4"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "phpDocumentor\\Reflection\\": [
+                        "src/"
+                    ]
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Mike van Riel",
+                    "email": "me@mikevanriel.com"
+                }
+            ],
+            "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
+            "time": "2016-09-30T07:12:33+00:00"
+        },
+        {
+            "name": "phpdocumentor/type-resolver",
+            "version": "0.2.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/phpDocumentor/TypeResolver.git",
+                "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb",
+                "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.5",
+                "phpdocumentor/reflection-common": "^1.0"
+            },
+            "require-dev": {
+                "mockery/mockery": "^0.9.4",
+                "phpunit/phpunit": "^5.2||^4.8.24"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.0.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "phpDocumentor\\Reflection\\": [
+                        "src/"
+                    ]
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Mike van Riel",
+                    "email": "me@mikevanriel.com"
+                }
+            ],
+            "time": "2016-11-25T06:54:22+00:00"
+        },
+        {
+            "name": "phpspec/prophecy",
+            "version": "v1.7.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/phpspec/prophecy.git",
+                "reference": "93d39f1f7f9326d746203c7c056f300f7f126073"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/phpspec/prophecy/zipball/93d39f1f7f9326d746203c7c056f300f7f126073",
+                "reference": "93d39f1f7f9326d746203c7c056f300f7f126073",
+                "shasum": ""
+            },
+            "require": {
+                "doctrine/instantiator": "^1.0.2",
+                "php": "^5.3|^7.0",
+                "phpdocumentor/reflection-docblock": "^2.0|^3.0.2",
+                "sebastian/comparator": "^1.1|^2.0",
+                "sebastian/recursion-context": "^1.0|^2.0|^3.0"
+            },
+            "require-dev": {
+                "phpspec/phpspec": "^2.5|^3.2",
+                "phpunit/phpunit": "^4.8 || ^5.6.5"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.6.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-0": {
+                    "Prophecy\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Konstantin Kudryashov",
+                    "email": "ever.zet@gmail.com",
+                    "homepage": "http://everzet.com"
+                },
+                {
+                    "name": "Marcello Duarte",
+                    "email": "marcello.duarte@gmail.com"
+                }
+            ],
+            "description": "Highly opinionated mocking framework for PHP 5.3+",
+            "homepage": "https://github.com/phpspec/prophecy",
+            "keywords": [
+                "Double",
+                "Dummy",
+                "fake",
+                "mock",
+                "spy",
+                "stub"
+            ],
+            "time": "2017-03-02T20:05:34+00:00"
+        },
+        {
+            "name": "phpunit/php-code-coverage",
+            "version": "4.0.7",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
+                "reference": "09e2277d14ea467e5a984010f501343ef29ffc69"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/09e2277d14ea467e5a984010f501343ef29ffc69",
+                "reference": "09e2277d14ea467e5a984010f501343ef29ffc69",
+                "shasum": ""
+            },
+            "require": {
+                "ext-dom": "*",
+                "ext-xmlwriter": "*",
+                "php": "^5.6 || ^7.0",
+                "phpunit/php-file-iterator": "^1.3",
+                "phpunit/php-text-template": "^1.2",
+                "phpunit/php-token-stream": "^1.4.2 || ^2.0",
+                "sebastian/code-unit-reverse-lookup": "^1.0",
+                "sebastian/environment": "^1.3.2 || ^2.0",
+                "sebastian/version": "^1.0 || ^2.0"
+            },
+            "require-dev": {
+                "ext-xdebug": "^2.1.4",
+                "phpunit/phpunit": "^5.7"
+            },
+            "suggest": {
+                "ext-xdebug": "^2.5.1"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "4.0.x-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sb@sebastian-bergmann.de",
+                    "role": "lead"
+                }
+            ],
+            "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
+            "homepage": "https://github.com/sebastianbergmann/php-code-coverage",
+            "keywords": [
+                "coverage",
+                "testing",
+                "xunit"
+            ],
+            "time": "2017-03-01T09:12:17+00:00"
+        },
+        {
+            "name": "phpunit/php-file-iterator",
+            "version": "1.4.2",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/php-file-iterator.git",
+                "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/3cc8f69b3028d0f96a9078e6295d86e9bf019be5",
+                "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.4.x-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sb@sebastian-bergmann.de",
+                    "role": "lead"
+                }
+            ],
+            "description": "FilterIterator implementation that filters files based on a list of suffixes.",
+            "homepage": "https://github.com/sebastianbergmann/php-file-iterator/",
+            "keywords": [
+                "filesystem",
+                "iterator"
+            ],
+            "time": "2016-10-03T07:40:28+00:00"
+        },
+        {
+            "name": "phpunit/php-text-template",
+            "version": "1.2.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/php-text-template.git",
+                "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
+                "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3"
+            },
+            "type": "library",
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de",
+                    "role": "lead"
+                }
+            ],
+            "description": "Simple template engine.",
+            "homepage": "https://github.com/sebastianbergmann/php-text-template/",
+            "keywords": [
+                "template"
+            ],
+            "time": "2015-06-21T13:50:34+00:00"
+        },
+        {
+            "name": "phpunit/php-timer",
+            "version": "1.0.9",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/php-timer.git",
+                "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f",
+                "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^5.3.3 || ^7.0"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.0-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sb@sebastian-bergmann.de",
+                    "role": "lead"
+                }
+            ],
+            "description": "Utility class for timing",
+            "homepage": "https://github.com/sebastianbergmann/php-timer/",
+            "keywords": [
+                "timer"
+            ],
+            "time": "2017-02-26T11:10:40+00:00"
+        },
+        {
+            "name": "phpunit/php-token-stream",
+            "version": "1.4.11",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/php-token-stream.git",
+                "reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/e03f8f67534427a787e21a385a67ec3ca6978ea7",
+                "reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7",
+                "shasum": ""
+            },
+            "require": {
+                "ext-tokenizer": "*",
+                "php": ">=5.3.3"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "~4.2"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.4-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                }
+            ],
+            "description": "Wrapper around PHP's tokenizer extension.",
+            "homepage": "https://github.com/sebastianbergmann/php-token-stream/",
+            "keywords": [
+                "tokenizer"
+            ],
+            "time": "2017-02-27T10:12:30+00:00"
+        },
+        {
+            "name": "phpunit/phpunit",
+            "version": "5.7.15",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/phpunit.git",
+                "reference": "b99112aecc01f62acf3d81a3f59646700a1849e5"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b99112aecc01f62acf3d81a3f59646700a1849e5",
+                "reference": "b99112aecc01f62acf3d81a3f59646700a1849e5",
+                "shasum": ""
+            },
+            "require": {
+                "ext-dom": "*",
+                "ext-json": "*",
+                "ext-libxml": "*",
+                "ext-mbstring": "*",
+                "ext-xml": "*",
+                "myclabs/deep-copy": "~1.3",
+                "php": "^5.6 || ^7.0",
+                "phpspec/prophecy": "^1.6.2",
+                "phpunit/php-code-coverage": "^4.0.4",
+                "phpunit/php-file-iterator": "~1.4",
+                "phpunit/php-text-template": "~1.2",
+                "phpunit/php-timer": "^1.0.6",
+                "phpunit/phpunit-mock-objects": "^3.2",
+                "sebastian/comparator": "^1.2.4",
+                "sebastian/diff": "~1.2",
+                "sebastian/environment": "^1.3.4 || ^2.0",
+                "sebastian/exporter": "~2.0",
+                "sebastian/global-state": "^1.1",
+                "sebastian/object-enumerator": "~2.0",
+                "sebastian/resource-operations": "~1.0",
+                "sebastian/version": "~1.0.3|~2.0",
+                "symfony/yaml": "~2.1|~3.0"
+            },
+            "conflict": {
+                "phpdocumentor/reflection-docblock": "3.0.2"
+            },
+            "require-dev": {
+                "ext-pdo": "*"
+            },
+            "suggest": {
+                "ext-xdebug": "*",
+                "phpunit/php-invoker": "~1.1"
+            },
+            "bin": [
+                "phpunit"
+            ],
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "5.7.x-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de",
+                    "role": "lead"
+                }
+            ],
+            "description": "The PHP Unit Testing framework.",
+            "homepage": "https://phpunit.de/",
+            "keywords": [
+                "phpunit",
+                "testing",
+                "xunit"
+            ],
+            "time": "2017-03-02T15:22:43+00:00"
+        },
+        {
+            "name": "phpunit/phpunit-mock-objects",
+            "version": "3.4.3",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
+                "reference": "3ab72b65b39b491e0c011e2e09bb2206c2aa8e24"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/3ab72b65b39b491e0c011e2e09bb2206c2aa8e24",
+                "reference": "3ab72b65b39b491e0c011e2e09bb2206c2aa8e24",
+                "shasum": ""
+            },
+            "require": {
+                "doctrine/instantiator": "^1.0.2",
+                "php": "^5.6 || ^7.0",
+                "phpunit/php-text-template": "^1.2",
+                "sebastian/exporter": "^1.2 || ^2.0"
+            },
+            "conflict": {
+                "phpunit/phpunit": "<5.4.0"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^5.4"
+            },
+            "suggest": {
+                "ext-soap": "*"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "3.2.x-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sb@sebastian-bergmann.de",
+                    "role": "lead"
+                }
+            ],
+            "description": "Mock Object library for PHPUnit",
+            "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/",
+            "keywords": [
+                "mock",
+                "xunit"
+            ],
+            "time": "2016-12-08T20:27:08+00:00"
+        },
+        {
+            "name": "psr/http-message",
+            "version": "1.0.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/php-fig/http-message.git",
+                "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363",
+                "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.0.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Psr\\Http\\Message\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "PHP-FIG",
+                    "homepage": "http://www.php-fig.org/"
+                }
+            ],
+            "description": "Common interface for HTTP messages",
+            "homepage": "https://github.com/php-fig/http-message",
+            "keywords": [
+                "http",
+                "http-message",
+                "psr",
+                "psr-7",
+                "request",
+                "response"
+            ],
+            "time": "2016-08-06T14:39:51+00:00"
+        },
+        {
+            "name": "psr/log",
+            "version": "1.0.2",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/php-fig/log.git",
+                "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
+                "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.0.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Psr\\Log\\": "Psr/Log/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "PHP-FIG",
+                    "homepage": "http://www.php-fig.org/"
+                }
+            ],
+            "description": "Common interface for logging libraries",
+            "homepage": "https://github.com/php-fig/log",
+            "keywords": [
+                "log",
+                "psr",
+                "psr-3"
+            ],
+            "time": "2016-10-10T12:19:37+00:00"
+        },
+        {
+            "name": "satooshi/php-coveralls",
+            "version": "dev-master",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/satooshi/php-coveralls.git",
+                "reference": "d5124af8bd6464144d550906cce46bd0df78f428"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/satooshi/php-coveralls/zipball/d5124af8bd6464144d550906cce46bd0df78f428",
+                "reference": "d5124af8bd6464144d550906cce46bd0df78f428",
+                "shasum": ""
+            },
+            "require": {
+                "ext-json": "*",
+                "ext-simplexml": "*",
+                "guzzlehttp/guzzle": "^6.0",
+                "php": "^5.5 || ^7.0",
+                "psr/log": "^1.0",
+                "symfony/config": "^2.1 || ^3.0",
+                "symfony/console": "^2.1 || ^3.0",
+                "symfony/stopwatch": "^2.0 || ^3.0",
+                "symfony/yaml": "^2.0 || ^3.0"
+            },
+            "suggest": {
+                "symfony/http-kernel": "Allows Symfony integration"
+            },
+            "bin": [
+                "bin/coveralls"
+            ],
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.0-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Satooshi\\": "src/Satooshi/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Kitamura Satoshi",
+                    "email": "with.no.parachute@gmail.com",
+                    "homepage": "https://www.facebook.com/satooshi.jp"
+                }
+            ],
+            "description": "PHP client library for Coveralls API",
+            "homepage": "https://github.com/satooshi/php-coveralls",
+            "keywords": [
+                "ci",
+                "coverage",
+                "github",
+                "test"
+            ],
+            "time": "2017-02-25 12:14:18"
+        },
+        {
+            "name": "sebastian/code-unit-reverse-lookup",
+            "version": "1.0.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
+                "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18",
+                "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^5.6 || ^7.0"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^5.7 || ^6.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.0.x-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                }
+            ],
+            "description": "Looks up which function or method a line of code belongs to",
+            "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
+            "time": "2017-03-04T06:30:41+00:00"
+        },
+        {
+            "name": "sebastian/comparator",
+            "version": "1.2.4",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/comparator.git",
+                "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be",
+                "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3",
+                "sebastian/diff": "~1.2",
+                "sebastian/exporter": "~1.2 || ~2.0"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "~4.4"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.2.x-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Jeff Welch",
+                    "email": "whatthejeff@gmail.com"
+                },
+                {
+                    "name": "Volker Dusch",
+                    "email": "github@wallbash.com"
+                },
+                {
+                    "name": "Bernhard Schussek",
+                    "email": "bschussek@2bepublished.at"
+                },
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                }
+            ],
+            "description": "Provides the functionality to compare PHP values for equality",
+            "homepage": "http://www.github.com/sebastianbergmann/comparator",
+            "keywords": [
+                "comparator",
+                "compare",
+                "equality"
+            ],
+            "time": "2017-01-29T09:50:25+00:00"
+        },
+        {
+            "name": "sebastian/diff",
+            "version": "1.4.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/diff.git",
+                "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e",
+                "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "~4.8"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.4-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Kore Nordmann",
+                    "email": "mail@kore-nordmann.de"
+                },
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                }
+            ],
+            "description": "Diff implementation",
+            "homepage": "https://github.com/sebastianbergmann/diff",
+            "keywords": [
+                "diff"
+            ],
+            "time": "2015-12-08T07:14:41+00:00"
+        },
+        {
+            "name": "sebastian/environment",
+            "version": "2.0.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/environment.git",
+                "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5795ffe5dc5b02460c3e34222fee8cbe245d8fac",
+                "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^5.6 || ^7.0"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^5.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.0.x-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                }
+            ],
+            "description": "Provides functionality to handle HHVM/PHP environments",
+            "homepage": "http://www.github.com/sebastianbergmann/environment",
+            "keywords": [
+                "Xdebug",
+                "environment",
+                "hhvm"
+            ],
+            "time": "2016-11-26T07:53:53+00:00"
+        },
+        {
+            "name": "sebastian/exporter",
+            "version": "2.0.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/exporter.git",
+                "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4",
+                "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3",
+                "sebastian/recursion-context": "~2.0"
+            },
+            "require-dev": {
+                "ext-mbstring": "*",
+                "phpunit/phpunit": "~4.4"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.0.x-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Jeff Welch",
+                    "email": "whatthejeff@gmail.com"
+                },
+                {
+                    "name": "Volker Dusch",
+                    "email": "github@wallbash.com"
+                },
+                {
+                    "name": "Bernhard Schussek",
+                    "email": "bschussek@2bepublished.at"
+                },
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                },
+                {
+                    "name": "Adam Harvey",
+                    "email": "aharvey@php.net"
+                }
+            ],
+            "description": "Provides the functionality to export PHP variables for visualization",
+            "homepage": "http://www.github.com/sebastianbergmann/exporter",
+            "keywords": [
+                "export",
+                "exporter"
+            ],
+            "time": "2016-11-19T08:54:04+00:00"
+        },
+        {
+            "name": "sebastian/global-state",
+            "version": "1.1.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/global-state.git",
+                "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4",
+                "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "~4.2"
+            },
+            "suggest": {
+                "ext-uopz": "*"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.0-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                }
+            ],
+            "description": "Snapshotting of global state",
+            "homepage": "http://www.github.com/sebastianbergmann/global-state",
+            "keywords": [
+                "global state"
+            ],
+            "time": "2015-10-12T03:26:01+00:00"
+        },
+        {
+            "name": "sebastian/object-enumerator",
+            "version": "2.0.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/object-enumerator.git",
+                "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/1311872ac850040a79c3c058bea3e22d0f09cbb7",
+                "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.6",
+                "sebastian/recursion-context": "~2.0"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "~5"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.0.x-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                }
+            ],
+            "description": "Traverses array structures and object graphs to enumerate all referenced objects",
+            "homepage": "https://github.com/sebastianbergmann/object-enumerator/",
+            "time": "2017-02-18T15:18:39+00:00"
+        },
+        {
+            "name": "sebastian/recursion-context",
+            "version": "2.0.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/recursion-context.git",
+                "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/2c3ba150cbec723aa057506e73a8d33bdb286c9a",
+                "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "~4.4"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.0.x-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Jeff Welch",
+                    "email": "whatthejeff@gmail.com"
+                },
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                },
+                {
+                    "name": "Adam Harvey",
+                    "email": "aharvey@php.net"
+                }
+            ],
+            "description": "Provides functionality to recursively process PHP variables",
+            "homepage": "http://www.github.com/sebastianbergmann/recursion-context",
+            "time": "2016-11-19T07:33:16+00:00"
+        },
+        {
+            "name": "sebastian/resource-operations",
+            "version": "1.0.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/resource-operations.git",
+                "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52",
+                "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.6.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.0.x-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                }
+            ],
+            "description": "Provides a list of PHP built-in functions that operate on resources",
+            "homepage": "https://www.github.com/sebastianbergmann/resource-operations",
+            "time": "2015-07-28T20:34:47+00:00"
+        },
+        {
+            "name": "sebastian/version",
+            "version": "2.0.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/version.git",
+                "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019",
+                "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.6"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.0.x-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de",
+                    "role": "lead"
+                }
+            ],
+            "description": "Library that helps with managing the version number of Git-hosted PHP projects",
+            "homepage": "https://github.com/sebastianbergmann/version",
+            "time": "2016-10-03T07:35:21+00:00"
+        },
+        {
+            "name": "symfony/config",
+            "version": "v3.2.6",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/config.git",
+                "reference": "741d6d4cd1414d67d48eb71aba6072b46ba740c2"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/config/zipball/741d6d4cd1414d67d48eb71aba6072b46ba740c2",
+                "reference": "741d6d4cd1414d67d48eb71aba6072b46ba740c2",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.5.9",
+                "symfony/filesystem": "~2.8|~3.0"
+            },
+            "require-dev": {
+                "symfony/yaml": "~3.0"
+            },
+            "suggest": {
+                "symfony/yaml": "To use the yaml reference dumper"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "3.2-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Symfony\\Component\\Config\\": ""
+                },
+                "exclude-from-classmap": [
+                    "/Tests/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Fabien Potencier",
+                    "email": "fabien@symfony.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony Config Component",
+            "homepage": "https://symfony.com",
+            "time": "2017-03-01T18:18:25+00:00"
+        },
+        {
+            "name": "symfony/console",
+            "version": "v3.2.6",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/console.git",
+                "reference": "28fb243a2b5727774ca309ec2d92da240f1af0dd"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/console/zipball/28fb243a2b5727774ca309ec2d92da240f1af0dd",
+                "reference": "28fb243a2b5727774ca309ec2d92da240f1af0dd",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.5.9",
+                "symfony/debug": "~2.8|~3.0",
+                "symfony/polyfill-mbstring": "~1.0"
+            },
+            "require-dev": {
+                "psr/log": "~1.0",
+                "symfony/event-dispatcher": "~2.8|~3.0",
+                "symfony/filesystem": "~2.8|~3.0",
+                "symfony/process": "~2.8|~3.0"
+            },
+            "suggest": {
+                "psr/log": "For using the console logger",
+                "symfony/event-dispatcher": "",
+                "symfony/filesystem": "",
+                "symfony/process": ""
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "3.2-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Symfony\\Component\\Console\\": ""
+                },
+                "exclude-from-classmap": [
+                    "/Tests/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Fabien Potencier",
+                    "email": "fabien@symfony.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony Console Component",
+            "homepage": "https://symfony.com",
+            "time": "2017-03-06T19:30:27+00:00"
+        },
+        {
+            "name": "symfony/debug",
+            "version": "v3.2.6",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/debug.git",
+                "reference": "b90c9f91ad8ac37d9f114e369042d3226b34dc1a"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/debug/zipball/b90c9f91ad8ac37d9f114e369042d3226b34dc1a",
+                "reference": "b90c9f91ad8ac37d9f114e369042d3226b34dc1a",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.5.9",
+                "psr/log": "~1.0"
+            },
+            "conflict": {
+                "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2"
+            },
+            "require-dev": {
+                "symfony/class-loader": "~2.8|~3.0",
+                "symfony/http-kernel": "~2.8|~3.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "3.2-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Symfony\\Component\\Debug\\": ""
+                },
+                "exclude-from-classmap": [
+                    "/Tests/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Fabien Potencier",
+                    "email": "fabien@symfony.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony Debug Component",
+            "homepage": "https://symfony.com",
+            "time": "2017-02-18T17:28:00+00:00"
+        },
+        {
+            "name": "symfony/filesystem",
+            "version": "v3.2.6",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/filesystem.git",
+                "reference": "bc0f17bed914df2cceb989972c3b996043c4da4a"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/filesystem/zipball/bc0f17bed914df2cceb989972c3b996043c4da4a",
+                "reference": "bc0f17bed914df2cceb989972c3b996043c4da4a",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.5.9"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "3.2-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Symfony\\Component\\Filesystem\\": ""
+                },
+                "exclude-from-classmap": [
+                    "/Tests/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Fabien Potencier",
+                    "email": "fabien@symfony.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony Filesystem Component",
+            "homepage": "https://symfony.com",
+            "time": "2017-03-06T19:30:27+00:00"
+        },
+        {
+            "name": "symfony/polyfill-mbstring",
+            "version": "v1.3.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/polyfill-mbstring.git",
+                "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/e79d363049d1c2128f133a2667e4f4190904f7f4",
+                "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3"
+            },
+            "suggest": {
+                "ext-mbstring": "For best performance"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.3-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Symfony\\Polyfill\\Mbstring\\": ""
+                },
+                "files": [
+                    "bootstrap.php"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Nicolas Grekas",
+                    "email": "p@tchwork.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony polyfill for the Mbstring extension",
+            "homepage": "https://symfony.com",
+            "keywords": [
+                "compatibility",
+                "mbstring",
+                "polyfill",
+                "portable",
+                "shim"
+            ],
+            "time": "2016-11-14T01:06:16+00:00"
+        },
+        {
+            "name": "symfony/stopwatch",
+            "version": "v3.2.6",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/stopwatch.git",
+                "reference": "c5ee0f8650c84b4d36a5f76b3b504233feaabf75"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/stopwatch/zipball/c5ee0f8650c84b4d36a5f76b3b504233feaabf75",
+                "reference": "c5ee0f8650c84b4d36a5f76b3b504233feaabf75",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.5.9"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "3.2-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Symfony\\Component\\Stopwatch\\": ""
+                },
+                "exclude-from-classmap": [
+                    "/Tests/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Fabien Potencier",
+                    "email": "fabien@symfony.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony Stopwatch Component",
+            "homepage": "https://symfony.com",
+            "time": "2017-02-18T17:28:00+00:00"
+        },
+        {
+            "name": "symfony/yaml",
+            "version": "v3.2.6",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/yaml.git",
+                "reference": "093e416ad096355149e265ea2e4cc1f9ee40ab1a"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/yaml/zipball/093e416ad096355149e265ea2e4cc1f9ee40ab1a",
+                "reference": "093e416ad096355149e265ea2e4cc1f9ee40ab1a",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.5.9"
+            },
+            "require-dev": {
+                "symfony/console": "~2.8|~3.0"
+            },
+            "suggest": {
+                "symfony/console": "For validating YAML files using the lint command"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "3.2-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Symfony\\Component\\Yaml\\": ""
+                },
+                "exclude-from-classmap": [
+                    "/Tests/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Fabien Potencier",
+                    "email": "fabien@symfony.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony Yaml Component",
+            "homepage": "https://symfony.com",
+            "time": "2017-03-07T16:47:02+00:00"
+        },
+        {
+            "name": "webmozart/assert",
+            "version": "1.2.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/webmozart/assert.git",
+                "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/webmozart/assert/zipball/2db61e59ff05fe5126d152bd0655c9ea113e550f",
+                "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^5.3.3 || ^7.0"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^4.6",
+                "sebastian/version": "^1.0.1"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.3-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Webmozart\\Assert\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Bernhard Schussek",
+                    "email": "bschussek@gmail.com"
+                }
+            ],
+            "description": "Assertions to validate method input/output with nice error messages.",
+            "keywords": [
+                "assert",
+                "check",
+                "validate"
+            ],
+            "time": "2016-11-23T20:04:58+00:00"
+        }
+    ],
+    "aliases": [],
+    "minimum-stability": "stable",
+    "stability-flags": {
+        "satooshi/php-coveralls": 20
+    },
+    "prefer-stable": false,
+    "prefer-lowest": false,
+    "platform": [],
+    "platform-dev": []
+}

+ 252 - 0
vendor/jamesryanbell/cloudflare/src/CloudFlare/Api.php

@@ -0,0 +1,252 @@
+<?php
+
+namespace Cloudflare;
+
+use Cloudflare\Exception\AuthenticationException;
+use Cloudflare\Exception\UnauthorizedException;
+
+/**
+ * CloudFlare API wrapper
+ *
+ * A work in progress library for the Cloudflare API. The documentation for the API can be found at https://www.cloudflare.com/docs/.
+ *
+ * @author James Bell <james@james-bell.co.uk>
+ *
+ * @version 1
+ */
+class Api
+{
+    /**
+     * Holds the provided email address for API authentication
+     *
+     * @var string
+     */
+    public $email;
+
+    /**
+     * Holds the provided auth_key for API authentication
+     *
+     * @var string
+     */
+    public $auth_key;
+
+    /**
+     * Holds the curl options
+     *
+     * @var array
+     */
+    public $curl_options;
+
+    /**
+     * Make a new instance of the API client
+     * This can be done via providing the email address and api key as seperate parameters
+     * or by passing in an already instantiated object from which the details will be extracted
+     */
+    public function __construct()
+    {
+        $num_args = func_num_args();
+        if ($num_args === 1) {
+            $parameters = func_get_args();
+            $client = $parameters[0];
+            $this->email = $client->email;
+            $this->auth_key = $client->auth_key;
+            $this->curl_options = $client->curl_options;
+        } elseif ($num_args === 2) {
+            $parameters = func_get_args();
+            $this->email = $parameters[0];
+            $this->auth_key = $parameters[1];
+        }
+    }
+
+    /**
+     * Setter to allow the setting of the email address
+     *
+     * @param string $email The email address associated with the Cloudflare account
+     */
+    public function setEmail($email)
+    {
+        $this->email = $email;
+    }
+
+    /**
+     * Setter to allow the setting of the Authentication Key
+     *
+     * @param string $token Authentication key, this can be retrieve from the 'My Account' section of the Cloudflare account
+     */
+    public function setAuthKey($token)
+    {
+        $this->auth_key = $token;
+    }
+
+    /**
+     * Setter to allow the adding / changing of the Curl options that will be used within the HTTP requests
+     *
+     * @param int   $key   The CURLOPT_XXX option to set e.g. CURLOPT_TIMEOUT
+     * @param mixed $value The value to be set on option e.g. 10
+     */
+    public function setCurlOption($key, $value)
+    {
+        $this->curl_options[$key] = $value;
+    }
+
+    /**
+     * API call method for sending requests using GET
+     *
+     * @param string $path Path of the endpoint
+     * @param array  $data Data to be sent along with the request
+     *
+     * @return mixed
+     */
+    public function get($path, array $data = [])
+    {
+        return $this->request($path, $data, 'get');
+    }
+
+    /**
+     * API call method for sending requests using POST
+     *
+     * @param string $path Path of the endpoint
+     * @param array  $data Data to be sent along with the request
+     *
+     * @return mixed
+     */
+    public function post($path, array $data = [])
+    {
+        return $this->request($path, $data, 'post');
+    }
+
+    /**
+     * API call method for sending requests using PUT
+     *
+     * @param string $path Path of the endpoint
+     * @param array  $data Data to be sent along with the request
+     *
+     * @return mixed
+     */
+    public function put($path, array $data = [])
+    {
+        return $this->request($path, $data, 'put');
+    }
+
+    /**
+     * API call method for sending requests using DELETE
+     *
+     * @param string $path Path of the endpoint
+     * @param array  $data Data to be sent along with the request
+     *
+     * @return mixed
+     */
+    public function delete($path, array $data = [])
+    {
+        return $this->request($path, $data, 'delete');
+    }
+
+    /**
+     * API call method for sending requests using PATCH
+     *
+     * @param string $path Path of the endpoint
+     * @param array  $data Data to be sent along with the request
+     *
+     * @return mixed
+     */
+    public function patch($path, array $data = [])
+    {
+        return $this->request($path, $data, 'patch');
+    }
+
+    /**
+     * @codeCoverageIgnore
+     *
+     * API call method for sending requests using GET, POST, PUT, DELETE OR PATCH
+     *
+     * @param string $path   Path of the endpoint
+     * @param array  $data   Data to be sent along with the request
+     * @param string $method Type of method that should be used ('GET', 'POST', 'PUT', 'DELETE', 'PATCH')
+     *
+     * @return mixed
+     */
+    protected function request($path, array $data = [], $method = 'get')
+    {
+        if (!isset($this->email, $this->auth_key) || false === filter_var($this->email, FILTER_VALIDATE_EMAIL)) {
+            throw new AuthenticationException('Authentication information must be provided');
+        }
+
+        //Removes null entries
+        $data = array_filter($data, function ($val) {
+            return !is_null($val);
+        });
+
+        $url = 'https://api.cloudflare.com/client/v4/'.$path;
+
+        $default_curl_options = [
+            CURLOPT_VERBOSE        => false,
+            CURLOPT_FORBID_REUSE   => true,
+            CURLOPT_RETURNTRANSFER => 1,
+            CURLOPT_HEADER         => false,
+            CURLOPT_TIMEOUT        => 30,
+            CURLOPT_SSL_VERIFYPEER => true,
+        ];
+
+        $curl_options = $default_curl_options;
+        if (isset($this->curl_options) && is_array($this->curl_options)) {
+            $curl_options = array_replace($default_curl_options, $this->curl_options);
+        }
+
+        $user_agent = __FILE__;
+        $headers = [
+            "X-Auth-Email: {$this->email}",
+            "X-Auth-Key: {$this->auth_key}",
+            "User-Agent: {$user_agent}",
+            'Content-type: application/json',
+        ];
+
+        $ch = curl_init();
+        curl_setopt_array($ch, $curl_options);
+
+        $json_data = json_encode($data);
+
+        if ($method === 'post') {
+            curl_setopt($ch, CURLOPT_POST, true);
+            curl_setopt($ch, CURLOPT_POSTFIELDS, $json_data);
+        } elseif ($method === 'put') {
+            curl_setopt($ch, CURLOPT_POSTFIELDS, $json_data);
+            curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
+        } elseif ($method === 'delete') {
+            curl_setopt($ch, CURLOPT_POSTFIELDS, $json_data);
+            curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
+        } elseif ($method === 'patch') {
+            curl_setopt($ch, CURLOPT_POSTFIELDS, $json_data);
+            curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PATCH');
+        } else {
+            $url .= '?'.http_build_query($data);
+        }
+
+        curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
+        curl_setopt($ch, CURLOPT_URL, $url);
+
+        $http_result = curl_exec($ch);
+        $error = curl_error($ch);
+        $information = curl_getinfo($ch);
+        $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
+
+        if (in_array($http_code, [401, 403])) {
+            throw new UnauthorizedException('You do not have permission to perform this request');
+        }
+
+        $response = json_decode($http_result);
+        if (!$response) {
+            $response = new \stdClass();
+            $response->success = false;
+        }
+
+        curl_close($ch);
+        if ($response->success !== true) {
+            $response->error = $error;
+            $response->http_code = $http_code;
+            $response->method = $method;
+            $response->information = $information;
+        }
+
+        return $response;
+    }
+}

+ 80 - 0
vendor/jamesryanbell/cloudflare/src/CloudFlare/Certificates.php

@@ -0,0 +1,80 @@
+<?php
+
+namespace Cloudflare;
+
+/**
+ * CloudFlare API wrapper
+ *
+ * CloudFlare CA
+ * API to create CloudFlare-issued SSL certificates that can be installed on your origin server.
+ * Use your Certificates API Key as your User Service Key when calling these endpoints
+ * (see the section on request headers for details)
+ *
+ * @author James Bell <james@james-bell.co.uk>
+ *
+ * @version 1
+ */
+class Certificates extends Api
+{
+    /**
+     * List Certificates
+     * List all existing CloudFlare-issued Certificates for a given zone. Use your Certificates API Key as your
+     * User Service Key when calling this endpoint
+     */
+    public function certificates($page = null, $per_page = null, $direction = null)
+    {
+        $data = [
+            'page'      => $page,
+            'per_page'  => $per_page,
+            'direction' => $direction,
+        ];
+
+        return $this->get('certificates', $data);
+    }
+
+    /**
+     * Create Certificate
+     * Create a CloudFlare-signed certificate. Use your Certificates API Key as your User Service Key when
+     * calling this endpoint
+     *
+     * @param array    $hostnames          Array of hostnames or wildcard names (e.g., *.example.com) bound to the certificate
+     * @param string   $request_type       Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), or "keyless-certificate" (for Keyless SSL servers)
+     * @param string   $csr                The Certificate Signing Request (CSR). Must be newline-encoded.
+     * @param int|null $requested_validity The number of days for which the certificate should be valid
+     */
+    public function create($hostnames, $request_type, $csr, $requested_validity = null)
+    {
+        $data = [
+            'hostnames'          => $hostnames,
+            'request_type'       => $request_type,
+            'csr'                => $csr,
+            'requested_validity' => $requested_validity,
+        ];
+
+        return $this->post('certificates', $data);
+    }
+
+    /**
+     * Certificate Details
+     * Get an existing certificate by its serial number. Use your Certificates API Key as your User Service Key
+     * when calling this endpoint
+     *
+     * @param string $identifier API item identifier tag
+     */
+    public function details($identifier)
+    {
+        return $this->get('certificates/'.$identifier);
+    }
+
+    /**
+     * Revoke certificate
+     * Revoke a created certificate for a zone. Use your Certificates API Key as your User Service Key when
+     * calling this endpoint
+     *
+     * @param string $identifier API item identifier tag
+     */
+    public function revoke($identifier)
+    {
+        return $this->delete('certificates/'.$identifier);
+    }
+}

+ 7 - 0
vendor/jamesryanbell/cloudflare/src/CloudFlare/Exception/AuthenticationException.php

@@ -0,0 +1,7 @@
+<?php
+
+namespace Cloudflare\Exception;
+
+class AuthenticationException extends \RuntimeException
+{
+}

+ 7 - 0
vendor/jamesryanbell/cloudflare/src/CloudFlare/Exception/UnauthorizedException.php

@@ -0,0 +1,7 @@
+<?php
+
+namespace Cloudflare\Exception;
+
+class UnauthorizedException extends \RuntimeException
+{
+}

+ 25 - 0
vendor/jamesryanbell/cloudflare/src/CloudFlare/IPs.php

@@ -0,0 +1,25 @@
+<?php
+
+namespace Cloudflare;
+
+/**
+ * CloudFlare API wrapper
+ *
+ * CloudFlare IPs
+ * CloudFlare IP space
+ *
+ * @author James Bell <james@james-bell.co.uk>
+ *
+ * @version 1
+ */
+class IPs extends Api
+{
+    /**
+     * CloudFlare IPs
+     * Get CloudFlare IPs
+     */
+    public function ips()
+    {
+        return $this->get('/ips');
+    }
+}

+ 42 - 0
vendor/jamesryanbell/cloudflare/src/CloudFlare/Organizations.php

@@ -0,0 +1,42 @@
+<?php
+
+namespace Cloudflare;
+
+/**
+ * CloudFlare API wrapper
+ *
+ * Organizations
+ *
+ * @author James Bell <james@james-bell.co.uk>
+ *
+ * @version 1
+ */
+class Organizations extends Api
+{
+    /**
+     * Organization details (permission needed: #organization:read)
+     * Get information about a specific organization that you are a member of
+     *
+     * @param string $identifier
+     */
+    public function organization($identifier)
+    {
+        return $this->get('/organizations/'.$identifier);
+    }
+
+    /**
+     * Update organization (permission needed: #organization:edit)
+     * Update an existing Organization
+     *
+     * @param string|null $identifier
+     * @param string|null $name       Organization Name
+     */
+    public function update($identifier = null, $name = null)
+    {
+        $data = [
+            'name' => $name,
+        ];
+
+        return $this->get('/organizations/'.$identifier, $data);
+    }
+}

+ 103 - 0
vendor/jamesryanbell/cloudflare/src/CloudFlare/Organizations/Firewall/AccessRules/Rules.php

@@ -0,0 +1,103 @@
+<?php
+
+namespace Cloudflare\Organizations\Firewall\AccessRules;
+
+use Cloudflare\Api;
+use Cloudflare\Organizations;
+use Cloudflare\Organizations\Firewall;
+
+/**
+ * CloudFlare API wrapper
+ *
+ * Organization-level Firewall access rule
+ *
+ * @author James Bell <james@james-bell.co.uk>
+ *
+ * @version 1
+ */
+class Rules extends Api
+{
+    /**
+     * List access rules (permission needed: #organization:read)
+     * Search, sort, and filter IP/country access rules
+     *
+     * @param string      $organization_id
+     * @param string|null $mode                 The action to apply to a matched request
+     * @param string|null $configuration_target The rule configuration target
+     * @param string|null $configuration_value  Search by IP, range, or country code
+     * @param int|null    $page                 Page number of paginated results
+     * @param int|null    $per_page             Number of rules per page
+     * @param string|null $order                Field to order rules by
+     * @param string|null $direction            Direction to order rules
+     * @param string|null $match                Whether to match all search requirements or at least one (any)
+     */
+    public function rules($organization_id, $mode = null, $configuration_target = null, $configuration_value = null, $page = null, $per_page = null, $order = null, $direction = null, $match = null)
+    {
+        $data = [
+            'mode'                 => $mode,
+            'configuration_target' => $configuration_target,
+            'configuration_value'  => $configuration_value,
+            'page'                 => $page,
+            'per_page'             => $per_page,
+            'order'                => $order,
+            'direction'            => $direction,
+            'match'                => $match,
+        ];
+
+        return $this->get('organizations/'.$organization_id.'/firewall/access_rules/rules', $data);
+    }
+
+    /**
+     * Create access rule (permission needed: #organization:edit)
+     * Make a new IP, IP range, or country access rule for all zones owned by the organization.
+     * Note: If you would like to create an access rule that applies to a specific zone only, use the zone firewall endpoints.
+     *
+     * @param string      $organization_id
+     * @param string      $mode            The action to apply to a matched request
+     * @param object      $configuration   Rule configuration
+     * @param string|null $notes           A personal note about the rule. Typically used as a reminder or explanation for the rule.
+     */
+    public function create($organization_id, $mode, $configuration, $notes = null)
+    {
+        $data = [
+            'mode'          => $mode,
+            'configuration' => $configuration,
+            'notes'         => $notes,
+        ];
+
+        return $this->post('organizations/'.$organization_id.'/firewall/access_rules/rules', $data);
+    }
+
+    /**
+     * Update access rule (permission needed: #organization:edit)
+     * Update rule state and/or configuration. This will be applied across all zones owned by the organization.
+     *
+     * @param string      $organization_id
+     * @param string      $identifier
+     * @param string|null $mode            The action to apply to a matched request
+     * @param object|null $configuration   Rule configuration
+     * @param string|null $notes           A personal note about the rule. Typically used as a reminder or explanation for the rule.
+     */
+    public function update($organization_id, $identifier, $mode = null, $configuration = null, $notes = null)
+    {
+        $data = [
+            'mode'          => $mode,
+            'configuration' => $configuration,
+            'notes'         => $notes,
+        ];
+
+        return $this->patch('organizations/'.$organization_id.'/firewall/access_rules/rules/'.$identifier, $data);
+    }
+
+    /**
+     * Delete access rule (permission needed: #organization:edit)
+     * Remove an access rule so it is no longer evaluated during requests. This will apply to all zones owned by the organization
+     *
+     * @param string $organization_id
+     * @param string $identifier
+     */
+    public function delete_rule($organization_id, $identifier)
+    {
+        return $this->delete('organizations/'.$organization_id.'/firewall/access_rules/rules/'.$identifier);
+    }
+}

+ 87 - 0
vendor/jamesryanbell/cloudflare/src/CloudFlare/Organizations/Invites.php

@@ -0,0 +1,87 @@
+<?php
+
+namespace Cloudflare\Organizations;
+
+use Cloudflare\Api;
+
+/**
+ * CloudFlare API wrapper
+ *
+ * Organization Invites
+ *
+ * @author James Bell <james@james-bell.co.uk>
+ *
+ * @version 1
+ */
+class Invites extends Api
+{
+    /**
+     * Create invitation (permission needed: #organization:read)
+     * Invite a User to become a Member of an Organization
+     *
+     * @param string $organization_identifier
+     * @param string $invited_member_email    Email address of the user to be added to the Organization
+     * @param array  $roles                   Array of Roles associated with the invited user
+     */
+    public function create($organization_identifier, $invited_member_email, array $roles)
+    {
+        $data = [
+            'invited_member_email' => $invited_member_email,
+            'roles'                => $roles,
+        ];
+
+        return $this->post('/organizations/'.$organization_identifier.'/members', $data);
+    }
+
+    /**
+     * List invitations (permission needed: #organization:read)
+     * List all invitations associated with an organization
+     *
+     * @param string $organization_identifier
+     */
+    public function invitations($organization_identifier)
+    {
+        return $this->get('/organizations/'.$organization_identifier.'/invites');
+    }
+
+    /**
+     * Invitation details (permission needed: #organization:read)
+     * Get the details of an invitation
+     *
+     * @param string $organization_identifier
+     * @param string $identifier
+     */
+    public function details($organization_identifier, $identifier)
+    {
+        return $this->get('/organizations/'.$organization_identifier.'/invites/'.$identifier);
+    }
+
+    /**
+     * Update invitation roles (permission needed: #organization:edit)
+     * Change the Roles of a Pending Invite
+     *
+     * @param string     $organization_identifier
+     * @param string     $identifier
+     * @param array|null $roles                   Array of Roles associated with the invited user
+     */
+    public function update($organization_identifier, $identifier, array $roles = null)
+    {
+        $data = [
+            'roles' => $roles,
+        ];
+
+        return $this->patch('/organizations/'.$organization_identifier.'/invites/'.$identifier, $data);
+    }
+
+    /**
+     * Cancel Invitation (permission needed: #organization:edit)
+     * Cancel an existing invitation
+     *
+     * @param string $organization_identifier
+     * @param string $identifier
+     */
+    public function delete_invitation($organization_identifier, $identifier)
+    {
+        return $this->delete('/organizations/'.$organization_identifier.'/invites/'.$identifier);
+    }
+}

+ 133 - 0
vendor/jamesryanbell/cloudflare/src/CloudFlare/Organizations/LoadBalancers/Monitors.php

@@ -0,0 +1,133 @@
+<?php
+
+namespace Cloudflare\Organizations\LoadBalancers;
+
+use Cloudflare\Api;
+use Cloudflare\Organizations;
+
+/**
+ * CloudFlare API wrapper
+ *
+ * CTM Monitors
+ * Cloud Traffic Manager Monitor
+ *
+ * @author James Bell <james@james-bell.co.uk>
+ *
+ * @version 1
+ */
+class Monitors extends Api
+{
+    /**
+     * List monitors
+     * List configured monitors for a user
+     *
+     * @param string $organization_identifier
+     */
+    public function monitors($organization_identifier)
+    {
+        return $this->get('/organizations/'.$organization_identifier.'/load_balancers/monitors');
+    }
+
+    /**
+     * Create a monitor
+     * Create a configured monitor
+     *
+     * @param string      $organization_identifier
+     * @param string      $expected_body           A case-insensitive substring to match in the body of the probe
+     *                                             response to declare an origin as up
+     * @param string      $expected_codes          The expected HTTP response code or code range for the probe
+     * @param string|null $method                  The HTTP method to use for the health check.
+     * @param int|null    $timeout                 The timeout (in seconds) before marking the health check as failed
+     * @param string|null $path                    The endpoint path to health check against.
+     * @param int|null    $interval                The interval between each health check. Shorter intervals may improve failover
+     *                                             time, but will increase load on the origins as we check from multiple locations.
+     * @param int|null    $retries                 The number of retries to attempt in case of a timeout before marking the origin
+     *                                             as unhealthy. Retries are attempted immediately.
+     * @param array|null  $header                  The HTTP request headers to send in the health check. It is recommended you set
+     *                                             a Host header by default. The User-Agent header cannot be overridden.
+     * @param int|null    $type                    The protocol to use for the healthcheck. Currently supported protocols are
+     *                                             'HTTP' and 'HTTPS'.
+     * @param string|null $description             Object description
+     */
+    public function create($organization_identifier, $expected_body, $expected_codes, $method = null, $timeout = null, $path = null, $interval = null, $retries = null, $header = null, $type = null, $description = null)
+    {
+        $data = [
+            'expected_body'  => $expected_body,
+            'expected_codes' => $expected_codes,
+            'method'         => $method,
+            'timeout'        => $timeout,
+            'path'           => $path,
+            'interval'       => $interval,
+            'retries'        => $retries,
+            'header'         => $header,
+            'type'           => $type,
+            'description'    => $description,
+        ];
+
+        return $this->post('/organizations/'.$organization_identifier.'/load_balancers/monitors', $data);
+    }
+
+    /**
+     * Monitor details
+     * List a single configured CTM monitor for a user
+     *
+     * @param string $organization_identifier
+     * @param string $identifier
+     */
+    public function details($organization_identifier, $identifier)
+    {
+        return $this->get('/organizations/'.$organization_identifier.'/load_balancers/monitors/'.$identifier);
+    }
+
+    /**
+     * Modify a monitor
+     * Modify a configured monitor
+     *
+     * @param string      $organization_identifier
+     * @param string      $identifier
+     * @param string      $expected_body           A case-insensitive substring to match in the body of the probe
+     *                                             response to declare an origin as up
+     * @param string      $expected_codes          The expected HTTP response code or code range for the probe
+     * @param string|null $method                  The HTTP method to use for the health check.
+     * @param int|null    $timeout                 The timeout (in seconds) before marking the health check as failed
+     * @param string|null $path                    The endpoint path to health check against.
+     * @param int|null    $interval                The interval between each health check. Shorter intervals may improve failover
+     *                                             time, but will increase load on the origins as we check from multiple locations.
+     * @param int|null    $retries                 The number of retries to attempt in case of a timeout before marking the origin
+     *                                             as unhealthy. Retries are attempted immediately.
+     * @param array|null  $header                  The HTTP request headers to send in the health check. It is recommended you set
+     *                                             a Host header by default. The User-Agent header cannot be overridden.
+     * @param int|null    $type                    The protocol to use for the healthcheck. Currently supported protocols are
+     *                                             'HTTP' and 'HTTPS'.
+     * @param string|null $description             Object description
+     */
+    public function update($organization_identifier, $identifier, $expected_body, $expected_codes, $method = null, $timeout = null, $path = null, $interval = null, $retries = null, $header = null, $type = null, $description = null)
+    {
+        $data = [
+            'expected_body'  => $expected_body,
+            'expected_codes' => $expected_codes,
+            'method'         => $method,
+            'timeout'        => $timeout,
+            'path'           => $path,
+            'interval'       => $interval,
+            'retries'        => $retries,
+            'header'         => $header,
+            'type'           => $type,
+            'description'    => $description,
+        ];
+
+        return $this->patch('/organizations/'.$organization_identifier.'/load_balancers/monitors/'.$identifier, $data);
+    }
+
+    /**
+     * Delete a monitor
+     * Delete a configured monitor
+     *
+     * @param string $organization_identifier
+     * @param string $identifier
+     */
+    public function delete_monitor($organization_identifier, $identifier)
+    {
+        return $this->delete('/organizations/'.$organization_identifier.'/load_balancers/monitors/'.$identifier);
+    }
+}

+ 116 - 0
vendor/jamesryanbell/cloudflare/src/CloudFlare/Organizations/LoadBalancers/Pools.php

@@ -0,0 +1,116 @@
+<?php
+
+namespace Cloudflare\Organizations\LoadBalancers;
+
+use Cloudflare\Api;
+use Cloudflare\Organizations;
+
+/**
+ * CloudFlare API wrapper
+ *
+ * CTM Pool
+ * User-level Cloud Traffic Manager Pool
+ *
+ * @author James Bell <james@james-bell.co.uk>
+ *
+ * @version 1
+ */
+class Pools extends Api
+{
+    /**
+     * List pools
+     * List configured pools
+     *
+     * @param string $organization_identifier
+     */
+    public function pools($organization_identifier)
+    {
+        return $this->get('/organizations/'.$organization_identifier.'/load_balancers/pools');
+    }
+
+    /**
+     * Create a pool
+     * Create a new pool
+     *
+     * @param string      $organization_identifier
+     * @param string      $name                    Object name
+     * @param array       $origins                 A list of origins contained in the pool.
+     *                                             Traffic destined to the pool is balanced across all
+     *                                             available origins contained in the pool (as long as the pool
+     *                                             is considered available).
+     * @param string|null $description             Object description
+     * @param bool|null   $enabled                 Whether this pool is enabled or not.
+     * @param string|null $monitor                 ID of the monitor object to use for monitoring the health
+     *                                             status of origins inside this pool.
+     * @param string|null $notification_email      ID of the notifier object to use for notifications relating
+     *                                             to the health status of origins inside this pool.
+     */
+    public function create($organization_identifier, $name, $origins, $description = null, $enabled = null, $monitor = null, $notification_email = null)
+    {
+        $data = [
+            'name'               => $name,
+            'origins'            => $origins,
+            'description'        => $description,
+            'enabled'            => $enabled,
+            'monitor'            => $monitor,
+            'notification_email' => $notification_email,
+        ];
+
+        return $this->post('/organizations/'.$organization_identifier.'/load_balancers/pools', $data);
+    }
+
+    /**
+     * Pool details
+     * Fetch a single configured pool
+     *
+     * @param string $organization_identifier
+     * @param string $identifier
+     */
+    public function details($organization_identifier, $identifier)
+    {
+        return $this->get('/organizations/'.$organization_identifier.'/load_balancers/pools/'.$identifier);
+    }
+
+    /**
+     * Modify a pool
+     * Modify a configured pool
+     *
+     * @param string      $organization_identifier
+     * @param string      $identifier
+     * @param string      $name                    Object name
+     * @param array       $origins                 A list of origins contained in the pool.
+     *                                             Traffic destined to the pool is balanced across all
+     *                                             available origins contained in the pool (as long as the pool
+     *                                             is considered available).
+     * @param string|null $description             Object description
+     * @param bool|null   $enabled                 Whether this pool is enabled or not.
+     * @param string|null $monitor                 ID of the monitor object to use for monitoring the health
+     *                                             status of origins inside this pool.
+     * @param string|null $notification_email      ID of the notifier object to use for notifications relating
+     *                                             to the health status of origins inside this pool.
+     */
+    public function update($organization_identifier, $identifier, $name, $origins, $description = null, $enabled = null, $monitor = null, $notification_email = null)
+    {
+        $data = [
+            'name'               => $name,
+            'origins'            => $origins,
+            'description'        => $description,
+            'enabled'            => $enabled,
+            'monitor'            => $monitor,
+            'notification_email' => $notification_email,
+        ];
+
+        return $this->patch('/organizations/'.$organization_identifier.'/load_balancers/pools/'.$identifier, $data);
+    }
+
+    /**
+     * Delete a pool
+     * Delete a configured pool
+     *
+     * @param string $identifier
+     */
+    public function delete_pool($organization_identifier, $identifier)
+    {
+        return $this->delete('/organizations/'.$organization_identifier.'/load_balancers/pools/'.$identifier);
+    }
+}

+ 69 - 0
vendor/jamesryanbell/cloudflare/src/CloudFlare/Organizations/Members.php

@@ -0,0 +1,69 @@
+<?php
+
+namespace Cloudflare\Organizations;
+
+use Cloudflare\Api;
+
+/**
+ * CloudFlare API wrapper
+ *
+ * Organization Members
+ *
+ * @author James Bell <james@james-bell.co.uk>
+ *
+ * @version 1
+ */
+class Members extends Api
+{
+    /**
+     * List members (permission needed: #organization:read)
+     * List all members of a organization
+     *
+     * @param string $organization_identifier
+     */
+    public function members($organization_identifier)
+    {
+        return $this->get('/organizations/'.$organization_identifier.'/members');
+    }
+
+    /**
+     * Member details (permission needed: #organization:read)
+     * Get information about a specific member of an organization
+     *
+     * @param string $organization_identifier
+     * @param string $identifier
+     */
+    public function details($organization_identifier, $identifier)
+    {
+        return $this->get('/organizations/'.$organization_identifier.'/members/'.$identifier);
+    }
+
+    /**
+     * Update member roles (permission needed: #organization:edit)
+     * Change the Roles of an Organization's Member
+     *
+     * @param string     $organization_identifier
+     * @param string     $identifier
+     * @param array|null $roles                   Array of Roles associated with this Member
+     */
+    public function update($organization_identifier, $identifier, array $roles = null)
+    {
+        $data = [
+            'roles' => $roles,
+        ];
+
+        return $this->patch('/organizations/'.$organization_identifier.'/members/'.$identifier, $data);
+    }
+
+    /**
+     * Remove member (permission needed: #organization:edit)
+     * Remove a member from an organization
+     *
+     * @param string $organization_identifier
+     * @param string $identifier
+     */
+    public function delete_member($organization_identifier, $identifier)
+    {
+        return $this->delete('/organizations/'.$organization_identifier.'/members/'.$identifier);
+    }
+}

+ 105 - 0
vendor/jamesryanbell/cloudflare/src/CloudFlare/Organizations/Railguns.php

@@ -0,0 +1,105 @@
+<?php
+
+namespace Cloudflare\Organizations;
+
+use Cloudflare\Api;
+
+/**
+ * CloudFlare API wrapper
+ *
+ * Organization Railgun
+ * CloudFlare Railgun for Organizations
+ *
+ * @author James Bell <james@james-bell.co.uk>
+ *
+ * @version 1
+ */
+class Railguns extends Api
+{
+    /**
+     * Create Railgun (permission needed: #organization:edit)
+     *
+     * @param string $organization_identifier Organization identifier tag
+     * @param string $name                    Readable identifier of the railgun
+     */
+    public function create($organization_identifier, $name)
+    {
+        $data = [
+            'name' => $name,
+        ];
+
+        return $this->post('/organizations/'.$organization_identifier.'/railguns', $data);
+    }
+
+    /**
+     * List Railguns (permission needed: #organization:read)
+     * List, search, sort and filter your Railguns
+     *
+     * @param string      $organization_identifier Organization identifier tag
+     * @param int|null    $page                    Page number of paginated results
+     * @param int|null    $per_page                Number of items per page
+     * @param string|null $direction               Direction to order Railguns (asc, desc)
+     */
+    public function railguns($organization_identifier, $page = null, $per_page = null, $direction = null)
+    {
+        $data = [
+            'page'      => $page,
+            'per_page'  => $per_page,
+            'direction' => $direction,
+        ];
+
+        return $this->get('/organizations/'.$organization_identifier.'/railguns', $data);
+    }
+
+    /**
+     * Railgun details (permission needed: #organization:read)
+     *
+     * @param string $organization_identifier Organization identifier tag
+     * @param string $identifier              API item identifier tag
+     */
+    public function details($organization_identifier, $identifier)
+    {
+        return $this->get('/organizations/'.$organization_identifier.'/railguns/'.$identifier);
+    }
+
+    /**
+     * Get zones connected to a Railgun (permission needed: #organization:read)
+     * The zones that are currently using this Railgun
+     *
+     * @param string $organization_identifier Organization identifier tag
+     * @param string $identifier              API item identifier tag
+     */
+    public function zones($organization_identifier, $identifier)
+    {
+        return $this->get('/organizations/'.$organization_identifier.'/railguns/'.$identifier.'/zones');
+    }
+
+    /**
+     * Enable or disable a Railgun (permission needed: #organization:edit)
+     * Enable or disable a Railgun for all zones connected to it
+     *
+     * @param string    $organization_identifier Organization identifier tag
+     * @param string    $identifier              API item identifier tag
+     * @param bool|null $enabled                 Flag to determine if the Railgun is accepting connections
+     */
+    public function enabled($organization_identifier, $identifier, $enabled = null)
+    {
+        $data = [
+            'enabled' => $enabled,
+        ];
+
+        return $this->patch('/organizations/'.$organization_identifier.'/railguns/'.$identifier, $data);
+    }
+
+    /**
+     * Delete Railgun (permission needed: #organization:edit)
+     * Disable and delete a Railgun. This will immediately disable the Railgun for any connected zones
+     *
+     * @param string $organization_identifier Organization identifier tag
+     * @param string $identifier              API item identifier tag
+     */
+    public function delete_railgun($organization_identifier, $identifier)
+    {
+        return $this->delete('/organizations/'.$organization_identifier.'/railguns/'.$identifier);
+    }
+}

+ 40 - 0
vendor/jamesryanbell/cloudflare/src/CloudFlare/Organizations/Roles.php

@@ -0,0 +1,40 @@
+<?php
+
+namespace Cloudflare\Organizations;
+
+use Cloudflare\Api;
+
+/**
+ * CloudFlare API wrapper
+ *
+ * Organization Roles
+ *
+ * @author James Bell <james@james-bell.co.uk>
+ *
+ * @version 1
+ */
+class Roles extends Api
+{
+    /**
+     * List roles (permission needed: #organization:read)
+     * Get all available roles for an organization
+     *
+     * @param string $organization_identifier
+     */
+    public function roles($organization_identifier)
+    {
+        return $this->get('/organizations/'.$organization_identifier.'/roles');
+    }
+
+    /**
+     * Role details (permission needed: #organization:read)
+     * Get information about a specific role for an organization
+     *
+     * @param string $organization_identifier
+     * @param string $identifier
+     */
+    public function details($organization_identifier, $identifier)
+    {
+        return $this->get('/organizations/'.$organization_identifier.'/roles/'.$identifier);
+    }
+}

+ 102 - 0
vendor/jamesryanbell/cloudflare/src/CloudFlare/Organizations/VirtualDns.php

@@ -0,0 +1,102 @@
+<?php
+
+namespace Cloudflare\Organizations;
+
+use Cloudflare\Api;
+
+/**
+ * CloudFlare API wrapper
+ *
+ * Virtual DNS (Organizations)
+ * Organizations-level Virtual DNS Management
+ *
+ * @author James Bell <james@james-bell.co.uk>
+ *
+ * @version 1
+ */
+class Virtual_Dns extends Api
+{
+    /**
+     * Get Virtual DNS Clusters (permission needed: #dns_records:read)
+     * List configured Virtual DNS clusters for an organization
+     *
+     * @param string $organization_identifier organization_identifier tag
+     */
+    public function clusters($organization_identifier)
+    {
+        return $this->get('/organizations/'.$organization_identifier.'/virtual_dns');
+    }
+
+    /**
+     * Create a Virtual DNS Cluster (permission needed: #dns_records:edit)
+     * Create a configured Virtual DNS Cluster
+     *
+     * @param string    $organization_identifier organization_identifier tag
+     * @param string    $name                    Virtual DNS Cluster Name
+     * @param array     $origin_ips
+     * @param int|null  $minimum_cache_ttl       Minimum DNS Cache TTL
+     * @param int|null  $maximum_cache_ttl       Maximum DNS Cache TTL
+     * @param bool|null $deprecate_any_request   Deprecate the response to ANY requests
+     */
+    public function create($organization_identifier, $name, $origin_ips, $minimum_cache_ttl = null, $maximum_cache_ttl = null, $deprecate_any_request = null)
+    {
+        $data = [
+            'name'                  => $name,
+            'origin_ips'            => $origin_ips,
+            'minimum_cache_ttl'     => $minimum_cache_ttl,
+            'maximum_cache_ttl'     => $maximum_cache_ttl,
+            'deprecate_any_request' => $deprecate_any_request,
+        ];
+
+        return $this->post('/organizations/'.$organization_identifier.'/virtual_dns', $data);
+    }
+
+    /**
+     * Get a Virtual DNS Cluster (permission needed: #dns_records:read)
+     * List a single configured Virtual DNS clusters for an organization
+     *
+     * @param string $organization_identifier organization_identifier tag
+     * @param string $identifier              identifier tag
+     */
+    public function cluster($organization_identifier, $identifier)
+    {
+        return $this->get('/organizations/'.$organization_identifier.'/virtual_dns/'.$identifier);
+    }
+
+    /**
+     * Modify a Virtual DNS Cluster
+     * Modify a Virtual DNS Cluster configuration (permission needed: #dns_records:edit)
+     *
+     * @param string $organization_identifier organization_identifier tag
+     * @param string $identifier              identifier tag
+     * @param string $name                    Virtual DNS Cluster Name
+     * @param array  $origin_ips
+     * @param int    $minimum_cache_ttl       Minimum DNS Cache TTL
+     * @param int    $maximum_cache_ttl       Maximum DNS Cache TTL
+     * @param bool   $deprecate_any_request   Deprecate the response to ANY requests
+     */
+    public function modify($organization_identifier, $identifier, $name, $origin_ips, $minimum_cache_ttl, $maximum_cache_ttl, $deprecate_any_request)
+    {
+        $data = [
+            'name'                  => $name,
+            'origin_ips'            => $origin_ips,
+            'minimum_cache_ttl'     => $minimum_cache_ttl,
+            'maximum_cache_ttl'     => $maximum_cache_ttl,
+            'deprecate_any_request' => $deprecate_any_request,
+        ];
+
+        return $this->patch('/organizations/'.$organization_identifier.'/virtual_dns/'.$identifier, $data);
+    }
+
+    /**
+     * Delete a Virtual DNS Cluster (permission needed: #dns_records:edit)
+     * Delete a configured Virtual DNS cluster
+     *
+     * @param string $organization_identifier organization_identifier tag
+     * @param string $identifier              identifier tag
+     */
+    public function delete_cluster($organization_identifier, $identifier)
+    {
+        return $this->delete('/organizations/'.$organization_identifier.'/virtual_dns/'.$identifier);
+    }
+}

+ 97 - 0
vendor/jamesryanbell/cloudflare/src/CloudFlare/Railguns.php

@@ -0,0 +1,97 @@
+<?php
+
+namespace Cloudflare;
+
+/**
+ * CloudFlare API wrapper
+ *
+ * Railguns
+ * CloudFlare Railgun
+ *
+ * @author James Bell <james@james-bell.co.uk>
+ *
+ * @version 1
+ */
+class Railguns extends Api
+{
+    /**
+     * Create Railgun (permission needed: #railgun:edit)
+     *
+     * @param string $name Readable identifier of the railgun
+     */
+    public function create($name)
+    {
+        $data = [
+            'name' => $name,
+        ];
+
+        return $this->post('railguns', $data);
+    }
+
+    /**
+     * List Railguns (permission needed: #railgun:read)
+     * List, search, sort and filter your Railguns
+     *
+     * @param int|null    $page      Page number of paginated results
+     * @param int|null    $per_page  Number of items per page
+     * @param string|null $direction Direction to order Railguns (asc, desc)
+     */
+    public function railguns($page = null, $per_page = null, $direction = null)
+    {
+        $data = [
+            'page'      => $page,
+            'per_page'  => $per_page,
+            'direction' => $direction,
+        ];
+
+        return $this->get('railguns', $data);
+    }
+
+    /**
+     * Railgun details (permission needed: #railgun:read)
+     *
+     * @param string $identifier API item identifier tag
+     */
+    public function details($identifier)
+    {
+        return $this->get('railguns/'.$identifier);
+    }
+
+    /**
+     * Get zones connected to a Railgun (permission needed: #railgun:read)
+     * The zones that are currently using this Railgun
+     *
+     * @param string $identifier API item identifier tag
+     */
+    public function zones($identifier)
+    {
+        return $this->get('railguns/'.$identifier.'/zones');
+    }
+
+    /**
+     * Enable or disable a Railgun (permission needed: #railgun:edit)
+     * Enable or disable a Railgun for all zones connected to it
+     *
+     * @param string    $identifier API item identifier tag
+     * @param bool|null $enabled    Flag to determine if the Railgun is accepting connections
+     */
+    public function enabled($identifier, $enabled = null)
+    {
+        $data = [
+            'enabled' => $enabled,
+        ];
+
+        return $this->patch('railguns/'.$identifier, $data);
+    }
+
+    /**
+     * Delete Railgun (permission needed: #railgun:edit)
+     * Disable and delete a Railgun. This will immediately disable the Railgun for any connected zones
+     *
+     * @param string $identifier API item identifier tag
+     */
+    public function delete_railgun($identifier)
+    {
+        return $this->delete('railguns/'.$identifier);
+    }
+}

+ 145 - 0
vendor/jamesryanbell/cloudflare/src/CloudFlare/User.php

@@ -0,0 +1,145 @@
+<?php
+
+namespace Cloudflare;
+
+/**
+ * CloudFlare API wrapper
+ *
+ * User
+ * The currently logged in/authenticated User
+ *
+ * @author James Bell <james@james-bell.co.uk>
+ *
+ * @version 1
+ */
+class User extends Api
+{
+    /**
+     * User details
+     */
+    public function user()
+    {
+        return $this->get('user');
+    }
+
+    /**
+     * Update user
+     * Update part of your user details
+     *
+     * @param string|null $first_name User's first name
+     * @param string|null $last_name  User's last name
+     * @param string|null $telephone  User's telephone number
+     * @param string|null $country    The country in which the user lives. (Full list is here: http://en.wikipedia.org/wiki/List_of_country_calling_codes)
+     * @param string|null $zipcode    The zipcode or postal code where the user lives.
+     */
+    public function update($first_name = null, $last_name = null, $telephone = null, $country = null, $zipcode = null)
+    {
+        $data = [
+            'first_name' => $first_name,
+            'last_name'  => $last_name,
+            'telephone'  => $telephone,
+            'country'    => $country,
+            'zipcode'    => $zipcode,
+        ];
+
+        return $this->patch('user', $data);
+    }
+
+    /**
+     * Change your email address. Note: You must provide your current password.
+     *
+     * @param string $email         Your contact email address
+     * @param string $confirm_email Your contact email address, repeated
+     * @param string $password      Your current password
+     */
+    public function change_email($email, $confirm_email, $password)
+    {
+        $data = [
+            'email'         => $email,
+            'confirm_email' => $confirm_email,
+            'password'      => $password,
+        ];
+
+        return $this->put('user/email', $data);
+    }
+
+    /**
+     * Change your password
+     *
+     * @param string $old_password         Your current password
+     * @param string $new_password         Your new password
+     * @param string $new_password_confirm Your new password, repeated
+     */
+    public function change_password($old_password, $new_password, $new_password_confirm)
+    {
+        $data = [
+            'old_password'         => $old_password,
+            'new_password'         => $new_password,
+            'new_password_confirm' => $new_password_confirm,
+        ];
+
+        return $this->put('user/password', $data);
+    }
+
+    /**
+     * Change your username. Note: You must provide your current password.
+     *
+     * @param string $username A username used to access other cloudflare services, like support
+     * @param string $password Your current password
+     */
+    public function change_username($username, $password)
+    {
+        $data = [
+            'username' => $username,
+            'password' => $password,
+        ];
+
+        return $this->put('user/username', $data);
+    }
+
+    /**
+     * Begin setting up CloudFlare two-factor authentication with a given telephone number
+     *
+     * @param int    $country_code        The country code of your mobile phone number
+     * @param string $mobile_phone_number Your mobile phone number
+     * @param string $current_password    Your current CloudFlare password
+     */
+    public function initialize_two_factor_authentication($country_code, $mobile_phone_number, $current_password)
+    {
+        $data = [
+            'country_code'        => $country_code,
+            'mobile_phone_number' => $mobile_phone_number,
+            'current_password'    => $current_password,
+        ];
+
+        return $this->post('/user/two_factor_authentication', $data);
+    }
+
+    /**
+     * Finish setting up CloudFlare two-factor authentication with a given telephone number
+     *
+     * @param int $auth_token The token provided by the two-factor authenticator
+     */
+    public function finalize_two_factor_authentication($auth_token)
+    {
+        $data = [
+            'auth_token' => $auth_token,
+        ];
+
+        return $this->put('user/two_factor_authentication', $data);
+    }
+
+    /**
+     * Disable two-factor authentication for your CloudFlare user account
+     *
+     * @param int The token provided by the two-factor authenticator
+     */
+    public function disable_two_factor_authentication($auth_token)
+    {
+        $data = [
+            'auth_token' => $auth_token,
+        ];
+
+        return $this->delete('user/two_factor_authentication', $data);
+    }
+}

+ 51 - 0
vendor/jamesryanbell/cloudflare/src/CloudFlare/User/Billing.php

@@ -0,0 +1,51 @@
+<?php
+
+namespace Cloudflare\User;
+
+use Cloudflare\Api;
+
+/**
+ * CloudFlare API wrapper
+ *
+ * Billing
+ *
+ * @author James Bell <james@james-bell.co.uk>
+ *
+ * @version 1
+ */
+class Billing extends Api
+{
+    /**
+     * Billing Profile (permission needed: #billing:read)
+     * Access your billing profile object
+     */
+    public function billing()
+    {
+        return $this->get('/user/billing/profile');
+    }
+
+    /**
+     * Billing History (permission needed: #billing:read)
+     * Access your billing profile object
+     *
+     * @param int|null    $page       Page number of paginated results
+     * @param int|null    $per_page   Number of items per page
+     * @param string|null $order      Field to order billing history by
+     * @param string|null $type       The billing item type
+     * @param string|null $occured_at When the billing item was created
+     * @param string|null $action     The billing item action
+     */
+    public function history($page = null, $per_page = null, $order = null, $type = null, $occured_at = null, $action = null)
+    {
+        $data = [
+            'page'       => $page,
+            'per_page'   => $per_page,
+            'order'      => $order,
+            'type'       => $type,
+            'occured_at' => $occured_at,
+            'action'     => $action,
+        ];
+
+        return $this->get('/user/billing/history', $data);
+    }
+}

+ 76 - 0
vendor/jamesryanbell/cloudflare/src/CloudFlare/User/Billing/Subscriptions/Apps.php

@@ -0,0 +1,76 @@
+<?php
+
+namespace Cloudflare\User\Billing\Subscriptions;
+
+use Cloudflare\Api;
+use Cloudflare\User;
+
+/**
+ * CloudFlare API wrapper
+ *
+ * Billing
+ * App Subscription
+ *
+ * @author James Bell <james@james-bell.co.uk>
+ *
+ * @version 1
+ */
+class Apps extends Api
+{
+    /**
+     * List (permission needed: #billing:read)
+     * List all of your app subscriptions
+     */
+    public function list_apps()
+    {
+        return $this->get('/user/billing/subscriptions/apps');
+    }
+
+    /**
+     * Search, sort, and paginate (permission needed: #billing:read)
+     * Search, sort, and paginate your subscriptions
+     *
+     * @param int|null    $page         Page number of paginated results
+     * @param int|null    $per_page     Number of items per page
+     * @param string|null $order        Field to order subscriptions by
+     * @param string|null $status       The state of the subscription
+     * @param string|null $price        The price of the subscription that will be billed, in US dollars
+     * @param string|null $activated_on When the subscription was activated
+     * @param string|null $expires_on   When the subscription will expire
+     * @param string|null $expired_on   When the subscription expired
+     * @param string|null $cancelled_on When the subscription was cancelled
+     * @param string|null $renewed_on   When the subscription was renewed
+     * @param string|null $direction    Direction to order subscriptions
+     * @param string|null $match        Whether to match all search requirements or at least one (any)
+     */
+    public function search_sort_paginate($page = null, $per_page = null, $order = null, $status = null, $price = null, $activated_on = null, $expires_on = null, $expired_on = null, $cancelled_on = null, $renewed_on = null, $direction = null, $match = null)
+    {
+        $data = [
+            'page'         => $page,
+            'per_page'     => $per_page,
+            'order'        => $order,
+            'status'       => $status,
+            'price'        => $price,
+            'activated_on' => $activated_on,
+            'expires_on'   => $expires_on,
+            'expired_on'   => $expired_on,
+            'cancelled_on' => $cancelled_on,
+            'renewed_on'   => $renewed_on,
+            'direction'    => $direction,
+            'match'        => $match,
+        ];
+
+        return $this->get('/user/billing/subscriptions/apps', $data);
+    }
+
+    /**
+     * Info (permission needed: #billing:read)
+     * Billing subscription details
+     *
+     * @param string $identifier
+     */
+    public function info($identifier)
+    {
+        return $this->get('/user/billing/subscriptions/apps/'.$identifier);
+    }
+}

+ 76 - 0
vendor/jamesryanbell/cloudflare/src/CloudFlare/User/Billing/Subscriptions/Zones.php

@@ -0,0 +1,76 @@
+<?php
+
+namespace Cloudflare\User\Billing\Subscriptions;
+
+use Cloudflare\Api;
+use Cloudflare\User;
+
+/**
+ * CloudFlare API wrapper
+ *
+ * Billing
+ * Zone Subscription
+ *
+ * @author James Bell <james@james-bell.co.uk>
+ *
+ * @version 1
+ */
+class Zones extends Api
+{
+    /**
+     * List (permission needed: #billing:read)
+     * List all of your zone plan subscriptions
+     */
+    public function list_zones()
+    {
+        return $this->get('/user/billing/subscriptions/zones');
+    }
+
+    /**
+     * Search, sort, and paginate (permission needed: #billing:read)
+     * Search, sort, and paginate your subscriptions
+     *
+     * @param int|null    $page         Page number of paginated results
+     * @param int|null    $per_page     Number of items per page
+     * @param string|null $order        Field to order subscriptions by
+     * @param string|null $status       The state of the subscription
+     * @param string|null $price        The price of the subscription that will be billed, in US dollars
+     * @param string|null $activated_on When the subscription was activated
+     * @param string|null $expires_on   When the subscription will expire
+     * @param string|null $expired_on   When the subscription expired
+     * @param string|null $cancelled_on When the subscription was cancelled
+     * @param string|null $renewed_on   When the subscription was renewed
+     * @param string|null $direction    Direction to order subscriptions
+     * @param string|null $match        Whether to match all search requirements or at least one (any)
+     */
+    public function search_sort_paginate($page = null, $per_page = null, $order = null, $status = null, $price = null, $activated_on = null, $expires_on = null, $expired_on = null, $cancelled_on = null, $renewed_on = null, $direction = null, $match = null)
+    {
+        $data = [
+            'page'         => $page,
+            'per_page'     => $per_page,
+            'order'        => $order,
+            'status'       => $status,
+            'price'        => $price,
+            'activated_on' => $activated_on,
+            'expires_on'   => $expires_on,
+            'expired_on'   => $expired_on,
+            'cancelled_on' => $cancelled_on,
+            'renewed_on'   => $renewed_on,
+            'direction'    => $direction,
+            'match'        => $match,
+        ];
+
+        return $this->get('/user/billing/subscriptions/zones', $data);
+    }
+
+    /**
+     * Info (permission needed: #billing:read)
+     * Billing subscription details
+     *
+     * @param string $identifier API item identifier tag
+     */
+    public function info($identifier)
+    {
+        return $this->get('/user/billing/subscriptions/zones/'.$identifier);
+    }
+}

+ 98 - 0
vendor/jamesryanbell/cloudflare/src/CloudFlare/User/Firewall/AccessRules.php

@@ -0,0 +1,98 @@
+<?php
+
+namespace Cloudflare\User\Firewall;
+
+use Cloudflare\Api;
+use Cloudflare\User;
+
+/**
+ * CloudFlare API wrapper
+ *
+ * User-level Firewall access rule
+ *
+ * @author James Bell <james@james-bell.co.uk>
+ *
+ * @version 1
+ */
+class AccessRules extends Api
+{
+    /**
+     * List access rules (permission needed: #billing:read)
+     * Search, sort, and filter IP/country access rules
+     *
+     * @param string|null $mode                 The action to apply to a matched request
+     * @param string|null $configuration_target The rule configuration target
+     * @param string|null $configuration_value  Search by IP, range, or country code
+     * @param int|null    $page                 Page number of paginated results
+     * @param int|null    $per_page             Number of items per page
+     * @param string|null $order                Field to order rules by
+     * @param string|null $direction            Direction to order rules
+     * @param string|null $match                Whether to match all search requirements or at least one (any)
+     */
+    public function rules($mode = null, $configuration_target = null, $configuration_value = null, $page = null, $per_page = null, $order = null, $direction = null, $match = null)
+    {
+        $data = [
+            'mode'                 => $mode,
+            'configuration_target' => $configuration_target,
+            'configuration_value'  => $configuration_value,
+            'page'                 => $page,
+            'per_page'             => $per_page,
+            'order'                => $order,
+            'direction'            => $direction,
+            'match'                => $match,
+        ];
+
+        return $this->get('/user/firewall/access_rules/rules', $data);
+    }
+
+    /**
+     * Create access rule (permission needed: #billing:edit)
+     * Make a new IP, IP range, or country access rule for all zones owned by the user.
+     * Note: If you would like to create an access rule that applies to a specific zone only, use the zone firewall endpoints.
+     *
+     * @param string      $mode          The action to apply to a matched request
+     * @param object      $configuration Rule configuration
+     * @param string|null $notes         A personal note about the rule. Typically used as a reminder or explanation for the rule.
+     */
+    public function create($mode, $configuration, $notes = null)
+    {
+        $data = [
+            'mode'          => $mode,
+            'configuration' => $configuration,
+            'notes'         => $notes,
+        ];
+
+        return $this->post('/user/firewall/access_rules/rules', $data);
+    }
+
+    /**
+     * Update access rule (permission needed: #billing:edit)
+     * Update rule state and/or configuration. This will be applied across all zones owned by the user.
+     *
+     * @param string      $identifier
+     * @param string|null $mode          The action to apply to a matched request
+     * @param object|null $configuration Rule configuration
+     * @param string|null $notes         A personal note about the rule. Typically used as a reminder or explanation for the rule.
+     */
+    public function update($identifier, $mode = null, $configuration = null, $notes = null)
+    {
+        $data = [
+            'mode'          => $mode,
+            'configuration' => $configuration,
+            'notes'         => $notes,
+        ];
+
+        return $this->patch('/user/firewall/access_rules/rules/'.$identifier, $data);
+    }
+
+    /**
+     * Delete access rule (permission needed: #billing:edit)
+     * Remove an access rule so it is no longer evaluated during requests. This will apply to all zones owned by the user
+     *
+     * @param string $identifier
+     */
+    public function delete_rule($identifier)
+    {
+        return $this->delete('/user/firewall/access_rules/rules/'.$identifier);
+    }
+}

+ 53 - 0
vendor/jamesryanbell/cloudflare/src/CloudFlare/User/Invites.php

@@ -0,0 +1,53 @@
+<?php
+
+namespace Cloudflare\User;
+
+use Cloudflare\Api;
+
+/**
+ * CloudFlare API wrapper
+ *
+ * Invites
+ *
+ * @author James Bell <james@james-bell.co.uk>
+ *
+ * @version 1
+ */
+class Invites extends Api
+{
+    /**
+     * List invitations (permission needed: #invites:read)
+     * List all invitations associated with my user
+     */
+    public function invites()
+    {
+        return $this->get('/user/invites');
+    }
+
+    /**
+     * Invitation details (permission needed: #invites:read)
+     * Get the details of an invitation
+     *
+     * @param string $identifier
+     */
+    public function details($identifier)
+    {
+        return $this->get('/user/invites/'.$identifier);
+    }
+
+    /**
+     * Respond to Invitation (permission needed: #invites:edit)
+     * Respond to an invitation
+     *
+     * @param string $identifier
+     * @param string $status     Status of your response to the invitation (rejected or accepted)
+     */
+    public function respond($identifier, $status)
+    {
+        $data = [
+            'status' => $status,
+        ];
+
+        return $this->patch('/user/invites/'.$identifier, $data);
+    }
+}

+ 89 - 0
vendor/jamesryanbell/cloudflare/src/CloudFlare/User/LoadBalancers/GlobalPolicies.php

@@ -0,0 +1,89 @@
+<?php
+
+namespace Cloudflare\User\LoadBalancers;
+
+use Cloudflare\Api;
+use Cloudflare\User;
+
+/**
+ * CloudFlare API wrapper
+ *
+ * CTM Global Policy
+ * User-level Cloud Traffic Manager Global Policy
+ *
+ * @author James Bell <james@james-bell.co.uk>
+ *
+ * @version 1
+ */
+class GlobalPolicies extends Api
+{
+    /**
+     * List global policies
+     * List configured global policies
+     */
+    public function global_policies()
+    {
+        return $this->get('/user/load_balancers/global_policies');
+    }
+
+    /**
+     * Create a global policy
+     * Create a new global policy
+     *
+     * @param string      $fallback_pool    ID for a fallback pool to use when all pools are down.
+     * @param string      $location_mapping ID of the location map object.
+     * @param string|null $description      Object description.
+     */
+    public function create($fallback_pool, $location_mapping, $description = null)
+    {
+        $data = [
+            'fallback_pool'    => $fallback_pool,
+            'location_mapping' => $location_mapping,
+            'description'      => $description,
+        ];
+
+        return $this->post('/user/load_balancers/global_policies', $data);
+    }
+
+    /**
+     * Global policy details
+     * Fetch a single configured global policy
+     *
+     * @param string $identifier
+     */
+    public function details($identifier)
+    {
+        return $this->get('/user/load_balancers/global_policies/'.$identifier);
+    }
+
+    /**
+     * Modify a global policy
+     * Modify a configured global policy
+     *
+     * @param string      $identifier
+     * @param string|null $fallback_pool    ID for a fallback pool to use when all pools are down.
+     * @param string|null $location_mapping ID of the location map object.
+     * @param string|null $description      Object description.
+     */
+    public function update($identifier, $fallback_pool = null, $location_mapping = null, $description = null)
+    {
+        $data = [
+            'fallback_pool'    => $fallback_pool,
+            'location_mapping' => $location_mapping,
+            'description'      => $description,
+        ];
+
+        return $this->patch('/user/load_balancers/global_policies/'.$identifier, $data);
+    }
+
+    /**
+     * Delete a global policy
+     * Delete a configured global policy
+     *
+     * @param string $identifier
+     */
+    public function delete_global_policy($identifier)
+    {
+        return $this->delete('/user/load_balancers/global_policies/'.$identifier);
+    }
+}

+ 87 - 0
vendor/jamesryanbell/cloudflare/src/CloudFlare/User/LoadBalancers/Maps.php

@@ -0,0 +1,87 @@
+<?php
+
+namespace Cloudflare\User\LoadBalancers;
+
+use Cloudflare\Api;
+use Cloudflare\User;
+
+/**
+ * CloudFlare API wrapper
+ *
+ * CTM Map
+ * User-level Cloud Traffic Manager Map
+ *
+ * @author James Bell <james@james-bell.co.uk>
+ *
+ * @version 1
+ */
+class Maps extends Api
+{
+    /**
+     * List maps
+     * List configured maps
+     */
+    public function maps()
+    {
+        return $this->get('/user/load_balancers/maps');
+    }
+
+    /**
+     * Create a map
+     * Create a new map
+     *
+     * @param array       $global_pools Sorted list of pool IDs that will be utilized
+     *                                  if a CF PoP cannot be assigned to a configured region.
+     * @param string|null $description  Object description.
+     */
+    public function create($global_pools, $description = null)
+    {
+        $data = [
+            'global_pools' => $global_pools,
+            'description'  => $description,
+        ];
+
+        return $this->post('/user/load_balancers/maps', $data);
+    }
+
+    /**
+     * Map details
+     * Fetch a single configured map
+     *
+     * @param string $identifier
+     */
+    public function details($identifier)
+    {
+        return $this->get('/user/load_balancers/maps/'.$identifier);
+    }
+
+    /**
+     * Modify a map
+     * Modify a configured map
+     *
+     * @param string      $identifier
+     * @param array       $global_pools Sorted list of pool IDs that will be utilized
+     *                                  if a CF PoP cannot be assigned to a configured region.
+     * @param string|null $description  Object description.
+     */
+    public function update($identifier, $global_pools = null, $description = null)
+    {
+        $data = [
+            'global_pools' => $global_pools,
+            'description'  => $description,
+        ];
+
+        return $this->patch('/user/load_balancers/maps/'.$identifier, $data);
+    }
+
+    /**
+     * Delete a map
+     * Delete a configured map
+     *
+     * @param string $identifier
+     */
+    public function delete_map($identifier)
+    {
+        return $this->delete('/user/load_balancers/maps/'.$identifier);
+    }
+}

+ 127 - 0
vendor/jamesryanbell/cloudflare/src/CloudFlare/User/LoadBalancers/Monitors.php

@@ -0,0 +1,127 @@
+<?php
+
+namespace Cloudflare\User\LoadBalancers;
+
+use Cloudflare\Api;
+use Cloudflare\User;
+
+/**
+ * CloudFlare API wrapper
+ *
+ * CTM Monitors
+ * Cloud Traffic Manager Monitor
+ *
+ * @author James Bell <james@james-bell.co.uk>
+ *
+ * @version 1
+ */
+class Monitors extends Api
+{
+    /**
+     * List monitors
+     * List configured monitors for a user
+     */
+    public function monitors()
+    {
+        return $this->get('/user/load_balancers/monitors');
+    }
+
+    /**
+     * Create a monitor
+     * Create a configured monitor
+     *
+     * @param string      $expected_body  A case-insensitive substring to match in the body of the probe
+     *                                    response to declare an origin as up
+     * @param string      $expected_codes The expected HTTP response code or code range for the probe
+     * @param string|null $method         The HTTP method to use for the health check.
+     * @param int|null    $timeout        The timeout (in seconds) before marking the health check as failed
+     * @param string|null $path           The endpoint path to health check against.
+     * @param int|null    $interval       The interval between each health check. Shorter intervals may improve failover
+     *                                    time, but will increase load on the origins as we check from multiple locations.
+     * @param int|null    $retries        The number of retries to attempt in case of a timeout before marking the origin
+     *                                    as unhealthy. Retries are attempted immediately.
+     * @param array|null  $header         The HTTP request headers to send in the health check. It is recommended you set
+     *                                    a Host header by default. The User-Agent header cannot be overridden.
+     * @param int|null    $type           The protocol to use for the healthcheck. Currently supported protocols are
+     *                                    'HTTP' and 'HTTPS'.
+     * @param string|null $description    Object description
+     */
+    public function create($expected_body, $expected_codes, $method = null, $timeout = null, $path = null, $interval = null, $retries = null, $header = null, $type = null, $description = null)
+    {
+        $data = [
+            'expected_body'  => $expected_body,
+            'expected_codes' => $expected_codes,
+            'method'         => $method,
+            'timeout'        => $timeout,
+            'path'           => $path,
+            'interval'       => $interval,
+            'retries'        => $retries,
+            'header'         => $header,
+            'type'           => $type,
+            'description'    => $description,
+        ];
+
+        return $this->post('/user/load_balancers/monitors', $data);
+    }
+
+    /**
+     * Monitor details
+     * List a single configured CTM monitor for a user
+     *
+     * @param string $identifier
+     */
+    public function details($identifier)
+    {
+        return $this->get('/user/load_balancers/monitors/'.$identifier);
+    }
+
+    /**
+     * Modify a monitor
+     * Modify a configured monitor
+     *
+     * @param string      $identifier
+     * @param string      $expected_body  A case-insensitive substring to match in the body of the probe
+     *                                    response to declare an origin as up
+     * @param string      $expected_codes The expected HTTP response code or code range for the probe
+     * @param string|null $method         The HTTP method to use for the health check.
+     * @param int|null    $timeout        The timeout (in seconds) before marking the health check as failed
+     * @param string|null $path           The endpoint path to health check against.
+     * @param int|null    $interval       The interval between each health check. Shorter intervals may improve failover
+     *                                    time, but will increase load on the origins as we check from multiple locations.
+     * @param int|null    $retries        The number of retries to attempt in case of a timeout before marking the origin
+     *                                    as unhealthy. Retries are attempted immediately.
+     * @param array|null  $header         The HTTP request headers to send in the health check. It is recommended you set
+     *                                    a Host header by default. The User-Agent header cannot be overridden.
+     * @param int|null    $type           The protocol to use for the healthcheck. Currently supported protocols are
+     *                                    'HTTP' and 'HTTPS'.
+     * @param string|null $description    Object description
+     */
+    public function update($identifier, $expected_body, $expected_codes, $method = null, $timeout = null, $path = null, $interval = null, $retries = null, $header = null, $type = null, $description = null)
+    {
+        $data = [
+            'expected_body'  => $expected_body,
+            'expected_codes' => $expected_codes,
+            'method'         => $method,
+            'timeout'        => $timeout,
+            'path'           => $path,
+            'interval'       => $interval,
+            'retries'        => $retries,
+            'header'         => $header,
+            'type'           => $type,
+            'description'    => $description,
+        ];
+
+        return $this->patch('/user/load_balancers/monitors/'.$identifier, $data);
+    }
+
+    /**
+     * Delete a monitor
+     * Delete a configured monitor
+     *
+     * @param string $identifier
+     */
+    public function delete_monitor($identifier)
+    {
+        return $this->delete('/user/load_balancers/monitors/'.$identifier);
+    }
+}

+ 85 - 0
vendor/jamesryanbell/cloudflare/src/CloudFlare/User/LoadBalancers/Notifiers.php

@@ -0,0 +1,85 @@
+<?php
+
+namespace Cloudflare\User\LoadBalancers;
+
+use Cloudflare\Api;
+use Cloudflare\User;
+
+/**
+ * CloudFlare API wrapper
+ *
+ * CTM Notifiers
+ * User-level Cloud Traffic Manager Notifier
+ *
+ * @author James Bell <james@james-bell.co.uk>
+ *
+ * @version 1
+ */
+class Notifiers extends Api
+{
+    /**
+     * List notifiers
+     * List configured notifiers for a user
+     */
+    public function notifiers()
+    {
+        return $this->get('/user/load_balancers/notifiers');
+    }
+
+    /**
+     * Create a notifier
+     * Create a configured notifier
+     *
+     * @param string      $address Notifier address
+     * @param string|null $type    Notifier type
+     */
+    public function create($address, $type = null)
+    {
+        $data = [
+            'address' => $address,
+            'type'    => $type,
+        ];
+
+        return $this->post('/user/load_balancers/notifiers', $data);
+    }
+
+    /**
+     * Notifier details
+     * Fetch a single configured CTM notifier for a user
+     *
+     * @param string $identifier
+     */
+    public function details($identifier)
+    {
+        return $this->get('/user/load_balancers/notifiers/'.$identifier);
+    }
+
+    /**
+     * Modify a notifier
+     * Modify a configured notifier
+     *
+     * @param string      $identifier
+     * @param string|null $address    Notifier address
+     * @param string|null $type       Notifier type
+     */
+    public function update($identifier, $address = null, $type = null)
+    {
+        $data = [
+            'address' => $address,
+            'type'    => $type,
+        ];
+
+        return $this->patch('/user/load_balancers/notifiers/'.$identifier, $data);
+    }
+
+    /**
+     * Delete a notifier
+     * Delete a configured notifier
+     *
+     * @param string $identifier
+     */
+    public function delete_notifier($identifier)
+    {
+        return $this->delete('/user/load_balancers/notifiers/'.$identifier);
+    }
+}

+ 95 - 0
vendor/jamesryanbell/cloudflare/src/CloudFlare/User/LoadBalancers/Origins.php

@@ -0,0 +1,95 @@
+<?php
+
+namespace Cloudflare\User\LoadBalancers;
+
+use Cloudflare\Api;
+use Cloudflare\User;
+
+/**
+ * CloudFlare API wrapper
+ *
+ * CTM Origin
+ * User-level Cloud Traffic Manager Origin
+ *
+ * @author James Bell <james@james-bell.co.uk>
+ *
+ * @version 1
+ */
+class Origins extends Api
+{
+    /**
+     * List origins
+     * List configured origins for a user
+     */
+    public function origins()
+    {
+        return $this->get('/user/load_balancers/origins');
+    }
+
+    /**
+     * Create a origin
+     * Create a new origin
+     *
+     * @param string      $name     Object name
+     * @param string      $address  Origin server IPv4 or IPv6 address
+     * @param bool|null   $enabled  Whether this origin is enabled or not
+     * @param string|null $notifier The ID of the notifier object to use for
+     *                              notifications relating to the health status of this origin.
+     */
+    public function create($name, $address, $enabled = null, $notifier = null)
+    {
+        $data = [
+            'name'     => $name,
+            'address'  => $address,
+            'enabled'  => $enabled,
+            'notifier' => $notifier,
+        ];
+
+        return $this->post('/user/load_balancers/origins', $data);
+    }
+
+    /**
+     * Origin details
+     * Fetch a single configured CTM origin for a user
+     *
+     * @param string $identifier
+     */
+    public function details($identifier)
+    {
+        return $this->get('/user/load_balancers/origins/'.$identifier);
+    }
+
+    /**
+     * Modify an origin
+     * Modify a configured origin
+     *
+     * @param string      $identifier
+     * @param string|null $name       Object name
+     * @param string|null $address    Origin server IPv4 or IPv6 address
+     * @param bool|null   $enabled    Whether this origin is enabled or not
+     * @param string|null $notifier   The ID of the notifier object to use for
+     *                                notifications relating to the health status of this origin.
+     */
+    public function update($identifier, $name = null, $address = null, $enabled = null, $notifier = null)
+    {
+        $data = [
+            'name'     => $name,
+            'address'  => $address,
+            'enabled'  => $enabled,
+            'notifier' => $notifier,
+        ];
+
+        return $this->patch('/user/load_balancers/origins/'.$identifier, $data);
+    }
+
+    /**
+     * Delete an origin
+     * Delete a configured origin
+     *
+     * @param string $identifier
+     */
+    public function delete_origin($identifier)
+    {
+        return $this->delete('/user/load_balancers/origins/'.$identifier);
+    }
+}

+ 111 - 0
vendor/jamesryanbell/cloudflare/src/CloudFlare/User/LoadBalancers/Pools.php

@@ -0,0 +1,111 @@
+<?php
+
+namespace Cloudflare\User\LoadBalancers;
+
+use Cloudflare\Api;
+use Cloudflare\User;
+
+/**
+ * CloudFlare API wrapper
+ *
+ * CTM Pool
+ * User-level Cloud Traffic Manager Pool
+ *
+ * @author James Bell <james@james-bell.co.uk>
+ *
+ * @version 1
+ */
+class Pools extends Api
+{
+    /**
+     * List pools
+     * List configured pools
+     */
+    public function pools()
+    {
+        return $this->get('/user/load_balancers/pools');
+    }
+
+    /**
+     * Create a pool
+     * Create a new pool
+     *
+     * @param string      $name               Object name
+     * @param array       $origins            A list of origins contained in the pool.
+     *                                        Traffic destined to the pool is balanced across all
+     *                                        available origins contained in the pool (as long as the pool
+     *                                        is considered available).
+     * @param string|null $description        Object description
+     * @param bool|null   $enabled            Whether this pool is enabled or not.
+     * @param string|null $monitor            ID of the monitor object to use for monitoring the health
+     *                                        status of origins inside this pool.
+     * @param string|null $notification_email ID of the notifier object to use for notifications relating
+     *                                        to the health status of origins inside this pool.
+     */
+    public function create($name, $origins, $description = null, $enabled = null, $monitor = null, $notification_email = null)
+    {
+        $data = [
+            'name'               => $name,
+            'origins'            => $origins,
+            'description'        => $description,
+            'enabled'            => $enabled,
+            'monitor'            => $monitor,
+            'notification_email' => $notification_email,
+        ];
+
+        return $this->post('/user/load_balancers/pools', $data);
+    }
+
+    /**
+     * Pool details
+     * Fetch a single configured pool
+     *
+     * @param string $identifier
+     */
+    public function details($identifier)
+    {
+        return $this->get('/user/load_balancers/pools/'.$identifier);
+    }
+
+    /**
+     * Modify a pool
+     * Modify a configured pool
+     *
+     * @param string      $identifier
+     * @param string      $name               Object name
+     * @param array       $origins            A list of origins contained in the pool.
+     *                                        Traffic destined to the pool is balanced across all
+     *                                        available origins contained in the pool (as long as the pool
+     *                                        is considered available).
+     * @param string|null $description        Object description
+     * @param bool|null   $enabled            Whether this pool is enabled or not.
+     * @param string|null $monitor            ID of the monitor object to use for monitoring the health
+     *                                        status of origins inside this pool.
+     * @param string|null $notification_email ID of the notifier object to use for notifications relating
+     *                                        to the health status of origins inside this pool.
+     */
+    public function update($identifier, $name, $origins, $description = null, $enabled = null, $monitor = null, $notification_email = null)
+    {
+        $data = [
+            'name'               => $name,
+            'origins'            => $origins,
+            'description'        => $description,
+            'enabled'            => $enabled,
+            'monitor'            => $monitor,
+            'notification_email' => $notification_email,
+        ];
+
+        return $this->patch('/user/load_balancers/pools/'.$identifier, $data);
+    }
+
+    /**
+     * Delete a pool
+     * Delete a configured pool
+     *
+     * @param string $identifier
+     */
+    public function delete_pool($identifier)
+    {
+        return $this->delete('/user/load_balancers/pools/'.$identifier);
+    }
+}

+ 66 - 0
vendor/jamesryanbell/cloudflare/src/CloudFlare/User/Organizations.php

@@ -0,0 +1,66 @@
+<?php
+
+namespace Cloudflare\User;
+
+use Cloudflare\Api;
+
+/**
+ * CloudFlare API wrapper
+ *
+ * Organizations
+ *
+ * @author James Bell <james@james-bell.co.uk>
+ *
+ * @version 1
+ */
+class Organizations extends Api
+{
+    /**
+     * List organizations (permission needed: #organizations:read)
+     * List organizations the user is associated with
+     *
+     * @param string|null $status    Whether or not the user is a member of the organization or has an inivitation pending
+     * @param string|null $name      Organization Name
+     * @param int|null    $page      Page number of paginated results
+     * @param int|null    $per_page  Number of organizations per page
+     * @param string|null $order     Field to order organizations by
+     * @param string|null $direction Direction to order organizations
+     * @param string|null $match     Whether to match all search requirements or at least one (any)
+     */
+    public function organizations($status = null, $name = null, $page = null, $per_page = null, $order = null, $direction = null, $match = null)
+    {
+        $data = [
+            'status'    => $status,
+            'name'      => $name,
+            'page'      => $page,
+            'per_page'  => $per_page,
+            'order'     => $order,
+            'direction' => $direction,
+            'match'     => $match,
+        ];
+
+        return $this->get('/user/organizations', $data);
+    }
+
+    /**
+     * Organization details (permission needed: #organizations:read)
+     * Get a specific organization the user is associated with
+     *
+     * @param string $identifier
+     */
+    public function details($identifier)
+    {
+        return $this->get('/user/organizations/'.$identifier);
+    }
+
+    /**
+     * Leave organization (permission needed: #organizations:edit)
+     * Remove association to an organization
+     *
+     * @param string $identifier
+     */
+    public function leave($identifier)
+    {
+        return $this->delete('/user/organizations/'.$identifier);
+    }
+}

+ 96 - 0
vendor/jamesryanbell/cloudflare/src/CloudFlare/User/VirtualDns.php

@@ -0,0 +1,96 @@
+<?php
+
+namespace Cloudflare\User;
+
+use Cloudflare\Api;
+
+/**
+ * CloudFlare API wrapper
+ *
+ * Virtual DNS (Users)
+ * User-level Virtual DNS Management
+ *
+ * @author James Bell <james@james-bell.co.uk>
+ *
+ * @version 1
+ */
+class Virtual_Dns extends Api
+{
+    /**
+     * Get Virtual DNS Clusters (permission needed: #dns_records:read)
+     * List configured Virtual DNS clusters for a user
+     */
+    public function clusters()
+    {
+        return $this->get('/user/virtual_dns');
+    }
+
+    /**
+     * Create a Virtual DNS Cluster (permission needed: #dns_records:edit)
+     * Create a configured Virtual DNS Cluster
+     *
+     * @param string    $name                  Virtual DNS Cluster Name
+     * @param array     $origin_ips
+     * @param int|null  $minimum_cache_ttl     Minimum DNS Cache TTL
+     * @param int|null  $maximum_cache_ttl     Maximum DNS Cache TTL
+     * @param bool|null $deprecate_any_request Deprecate the response to ANY requests
+     */
+    public function create($name, $origin_ips, $minimum_cache_ttl = null, $maximum_cache_ttl = null, $deprecate_any_request = null)
+    {
+        $data = [
+            'name'                  => $name,
+            'origin_ips'            => $origin_ips,
+            'minimum_cache_ttl'     => $minimum_cache_ttl,
+            'maximum_cache_ttl'     => $maximum_cache_ttl,
+            'deprecate_any_request' => $deprecate_any_request,
+        ];
+
+        return $this->post('/user/virtual_dns', $data);
+    }
+
+    /**
+     * Get a Virtual DNS Cluster (permission needed: #dns_records:read)
+     * List a single configured Virtual DNS clusters for a user
+     *
+     * @param string $identifier Identifier tag
+     */
+    public function cluster($identifier)
+    {
+        return $this->get('/user/virtual_dns/'.$identifier);
+    }
+
+    /**
+     * Modify a Virtual DNS Cluster
+     * Modify a Virtual DNS Cluster configuration (permission needed: #dns_records:edit)
+     *
+     * @param string $identifier            Identifier tag
+     * @param string $name                  Virtual DNS Cluster Name
+     * @param array  $origin_ips
+     * @param int    $minimum_cache_ttl     Minimum DNS Cache TTL
+     * @param int    $maximum_cache_ttl     Maximum DNS Cache TTL
+     * @param bool   $deprecate_any_request Deprecate the response to ANY requests
+     */
+    public function modify($identifier, $name, $origin_ips, $minimum_cache_ttl, $maximum_cache_ttl, $deprecate_any_request)
+    {
+        $data = [
+            'name'                  => $name,
+            'origin_ips'            => $origin_ips,
+            'minimum_cache_ttl'     => $minimum_cache_ttl,
+            'maximum_cache_ttl'     => $maximum_cache_ttl,
+            'deprecate_any_request' => $deprecate_any_request,
+        ];
+
+        return $this->patch('/user/virtual_dns/'.$identifier, $data);
+    }
+
+    /**
+     * Delete a Virtual DNS Cluster (permission needed: #dns_records:edit)
+     * Delete a configured Virtual DNS cluster
+     *
+     * @param string $identifier Identifier tag
+     */
+    public function delete_cluster($identifier)
+    {
+        return $this->delete('/user/virtual_dns/'.$identifier);
+    }
+}

+ 153 - 0
vendor/jamesryanbell/cloudflare/src/CloudFlare/Zone.php

@@ -0,0 +1,153 @@
+<?php
+
+namespace Cloudflare;
+
+/**
+ * CloudFlare API wrapper
+ *
+ * Zone
+ * A Zone is a domain name along with its subdomains and other identities
+ *
+ * @author James Bell <james@james-bell.co.uk>
+ *
+ * @version 1
+ */
+class Zone extends Api
+{
+    /**
+     * Create a zone (permission needed: #zone:edit)
+     *
+     * @param string    $name         The domain name
+     * @param bool|null $jump_start   Automatically attempt to fetch existing DNS records
+     * @param int|null  $organization To create a zone owned by an organization, specify the organization parameter. Organization objects can be found in the User or User's Organizations endpoints. You must pass at least the ID of the organization.
+     */
+    public function create($name, $jump_start = null, $organization = null)
+    {
+        $data = [
+            'name'         => $name,
+            'jump_start'   => $jump_start,
+            'organization' => $organization,
+        ];
+
+        return $this->post('zones', $data);
+    }
+
+    /**
+     * Initiate another zone activation check (permission needed: #zone:edit)
+     *
+     * @param string $identifier API item identifier tag
+     */
+    public function activation_check($identifier)
+    {
+        return $this->put('zones/'.$identifier.'/activation_check');
+    }
+
+    /**
+     * List zones (permission needed: #zone:read)
+     * List, search, sort, and filter your zones
+     *
+     * @param string|null $name      A domain name
+     * @param string|null $status    Status of the zone (active, pending, initializing, moved, deleted)
+     * @param int|null    $page      Page number of paginated results
+     * @param int|null    $per_page  Number of zones per page
+     * @param string|null $order     Field to order zones by (name, status, email)
+     * @param string|null $direction Direction to order zones (asc, desc)
+     * @param string|null $match     Whether to match all search requirements or at least one (any) (any, all)
+     */
+    public function zones($name = null, $status = null, $page = null, $per_page = null, $order = null, $direction = null, $match = null)
+    {
+        $data = [
+            'name'      => $name,
+            'status'    => $status,
+            'page'      => $page,
+            'per_page'  => $per_page,
+            'order'     => $order,
+            'direction' => $direction,
+            'match'     => $match,
+        ];
+
+        return $this->get('zones', $data);
+    }
+
+    /**
+     * Zone details (permission needed: #zone:read)
+     *
+     * @param string $zone_identifier API item identifier tag
+     */
+    public function zone($zone_identifier)
+    {
+        return $this->get('zones/'.$zone_identifier);
+    }
+
+    /**
+     * Edit Vanity Name Servers (permission needed: #zone:edit)
+     *
+     * @param string $zone_identifier     API item identifier tag
+     * @param array  $vanity_name_servers An array of domains used for custom name servers. This is only available for Business
+     *                                    and Enterprise plans.
+     */
+    public function edit_vanity_name_servers($zone_identifier, $vanity_name_servers)
+    {
+        $data = [
+            'vanity_name_servers' => $vanity_name_servers,
+        ];
+
+        return $this->patch('zones/'.$zone_identifier, $data);
+    }
+
+    /**
+     * Edit the desired plan for the zone (permission needed: #zone:edit)
+     *
+     * @param string $zone_identifier API item identifier tag
+     * @param object $plan            The desired plan for the zone. Changing this value will create/cancel associated
+     *                                subscriptions. To view available plans for this zone, see Zone Plans
+     */
+    public function edit_plan($zone_identifier, $plan)
+    {
+        $data = [
+            'plan' => $plan,
+        ];
+
+        return $this->patch('zones/'.$zone_identifier, $data);
+    }
+
+    /**
+     * Pause all CloudFlare features (permission needed: #zone:edit)
+     * This will pause all features and settings for the zone. DNS will still resolve
+     *
+     * @param string $zone_identifier API item identifier tag
+     */
+    public function pause($zone_identifier)
+    {
+        $data = [
+            'paused' => true,
+        ];
+
+        return $this->patch('zones/'.$zone_identifier, $data);
+    }
+
+    /**
+     * Re-enable all CloudFlare features (permission needed: #zone:edit)
+     * This will restore all features and settings for the zone
+     *
+     * @param string $zone_identifier API item identifier tag
+     */
+    public function unpause($zone_identifier)
+    {
+        $data = [
+            'paused' => false,
+        ];
+
+        return $this->patch('zones/'.$zone_identifier, $data);
+    }
+
+    /**
+     * Delete a zone (permission needed: #zone:edit)
+     *
+     * @param string $zone_identifier API item identifier tag
+     */
+    public function delete_zone($zone_identifier)
+    {
+        return $this->delete('zones/'.$zone_identifier);
+    }
+}

+ 47 - 0
vendor/jamesryanbell/cloudflare/src/CloudFlare/Zone/Aml.php

@@ -0,0 +1,47 @@
+<?php
+
+namespace Cloudflare\Zone;
+
+use Cloudflare\Api;
+
+/**
+ * CloudFlare API wrapper
+ *
+ * Accelerated Mobile Links
+ *
+ * @author James Bell <james@james-bell.co.uk>
+ *
+ * @version 1
+ */
+class Aml extends Api
+{
+    /**
+     * Get AML Settings (permission needed: #zone_settings:edit)
+     * Fetch AML configuration for a zone
+     *
+     * @param string $zone_identifier
+     */
+    public function viewer($zone_identifier)
+    {
+        return $this->get('zones/'.$zone_identifier.'/amp/viewer');
+    }
+
+    /**
+     * Update AML Settings (permission needed: #zone_settings:edit)
+     * Update AML configuration for a zone
+     *
+     * @param bool|null   $enabled            Enable Accelerated Mobile Links on mobile browsers.
+     * @param array|null  $subdomains         Your contact email address, repeated
+     * @param string|null $prepend_links_with Your current password
+     */
+    public function change_email($enabled = null, $subdomains = null, $prepend_links_with = null)
+    {
+        $data = [
+            'enabled'            => $enabled,
+            'subdomains'         => $subdomains,
+            'prepend_links_with' => $prepend_links_with,
+        ];
+
+        return $this->put('zones/'.$zone_identifier.'/amp/viewer', $data);
+    }
+}

+ 66 - 0
vendor/jamesryanbell/cloudflare/src/CloudFlare/Zone/Analytics.php

@@ -0,0 +1,66 @@
+<?php
+
+namespace Cloudflare\Zone;
+
+use Cloudflare\Api;
+
+/**
+ * CloudFlare API wrapper
+ *
+ * Analytics
+ * CloudFlare Analytics
+ *
+ * @author James Bell <james@james-bell.co.uk>
+ *
+ * @version 1
+ */
+class Analytics extends Api
+{
+    /**
+     * Dashboard (permission needed: #analytics:read)
+     * The dashboard view provides both totals and timeseries data for the given zone and time period across the entire CloudFlare network.
+     *
+     * @param string          $zone_identifier
+     * @param string|int|null $since           The (inclusive) beginning of the requested time frame. This value can be a negative integer representing the number of minutes in the past relative to time the request is made,
+     *                                         or can be an absolute timestamp that conforms to RFC 3339. At this point in time, it cannot exceed a time in the past greater than one year.
+     * @param string|int|null $until           The (exclusive) end of the requested time frame. This value can be a negative integer representing the number of minutes in the past relative to time the request is made,
+     *                                         or can be an absolute timestamp that conforms to RFC 3339. If omitted, the time of the request is used.
+     * @param bool            $continuous      When set to true, the range returned by the response acts like a sliding window to provide a contiguous time-window.
+     *                                         Analytics data is processed and aggregated asynchronously and can sometimes lead to recent data points being incomplete if this value is set to false.
+     *                                         If a start date provided is earlier than a date for which data is available, the API will return 0's for those dates until the first available date with data
+     */
+    public function dashboard($zone_identifier, $since = null, $until = null, $continuous = null)
+    {
+        $data = [
+            'since'      => $since,
+            'until'      => $until,
+            'continuous' => $continuous,
+        ];
+
+        return $this->get('zones/'.$zone_identifier.'/analytics/dashboard', $data);
+    }
+
+    /**
+     * Analytics by Co-locations (permission needed: #analytics:read)
+     * This view provides a breakdown of analytics data by datacenter. Note: This is available to Enterprise customers only.
+     *
+     * @param string          $zone_identifier
+     * @param string|int|null $since           The (inclusive) beginning of the requested time frame. This value can be a negative integer representing the number of minutes in the past relative to time the request is made,
+     *                                         or can be an absolute timestamp that conforms to RFC 3339. At this point in time, it cannot exceed a time in the past greater than one year.
+     * @param string|int|null $until           The (exclusive) end of the requested time frame. This value can be a negative integer representing the number of minutes in the past relative to time the request is made,
+     *                                         or can be an absolute timestamp that conforms to RFC 3339. If omitted, the time of the request is used.
+     * @param bool            $continuous      When set to true, the range returned by the response acts like a sliding window to provide a contiguous time-window.
+     *                                         Analytics data is processed and aggregated asynchronously and can sometimes lead to recent data points being incomplete if this value is set to false.
+     *                                         If a start date provided is earlier than a date for which data is available, the API will return 0's for those dates until the first available date with data
+     */
+    public function colos($zone_identifier, $since = null, $until = null, $continuous = null)
+    {
+        $data = [
+            'since'      => $since,
+            'until'      => $until,
+            'continuous' => $continuous,
+        ];
+
+        return $this->get('zones/'.$zone_identifier.'/analytics/colos', $data);
+    }
+}

+ 52 - 0
vendor/jamesryanbell/cloudflare/src/CloudFlare/Zone/Cache.php

@@ -0,0 +1,52 @@
+<?php
+
+namespace Cloudflare\Zone;
+
+use Cloudflare\Api;
+
+/**
+ * CloudFlare API wrapper
+ *
+ * Cache
+ *
+ * @author James Bell <james@james-bell.co.uk>
+ *
+ * @version 1
+ */
+class Cache extends Api
+{
+    /**
+     * Purge all files (permission needed: #zone:edit)
+     * Remove ALL files from CloudFlare's cache
+     *
+     * @param string    $identifier       API item identifier tag
+     * @param bool|null $purge_everything A flag that indicates all resources in CloudFlare's cache should be removed.
+     *                                    Note: This may have dramatic affects on your origin server load after performing this action. (true)
+     */
+    public function purge($identifier, $purge_everything = null)
+    {
+        $data = [
+            'purge_everything' => $purge_everything,
+        ];
+
+        return $this->delete('zones/'.$identifier.'/purge_cache', $data);
+    }
+
+    /**
+     * Purge individual files (permission needed: #zone:edit)
+     * Remove one or more files from CloudFlare's cache
+     *
+     * @param string     $identifier API item identifier tag
+     * @param array|null $files      An array of URLs that should be removed from cache
+     * @param array|null $tags       Any assets served with a Cache-Tag header that matches one of the provided values will be purged from the CloudFlare cache
+     */
+    public function purge_files($identifier, array $files = null, array $tags = null)
+    {
+        $data = [
+            'files' => $files,
+            'tags'  => $tags,
+        ];
+
+        return $this->delete('zones/'.$identifier.'/purge_cache', $data);
+    }
+}

+ 58 - 0
vendor/jamesryanbell/cloudflare/src/CloudFlare/Zone/CustomPages.php

@@ -0,0 +1,58 @@
+<?php
+
+namespace Cloudflare\Zone;
+
+use Cloudflare\Api;
+
+/**
+ * CloudFlare API wrapper
+ *
+ * Custom Pages for a Zone
+ *
+ * @author James Bell <james@james-bell.co.uk>
+ *
+ * @version 1
+ */
+class CustomPages extends Api
+{
+    /**
+     * Available Custom Pages (permission needed: #zone_settings:read)
+     *
+     * @param string $zone_identifier API item identifier tag
+     */
+    public function custom_pages($zone_identifier)
+    {
+        return $this->get('zones/'.$zone_identifier.'/custom_pages');
+    }
+
+    /**
+     * Custom Page details (permission needed: #zone_settings:read)
+     * Details about a specific Custom page details
+     *
+     * @param string $zone_identifier API item identifier tag
+     * @param string $identifier
+     */
+    public function details($zone_identifier, $identifier)
+    {
+        return $this->get('zones/'.$zone_identifier.'/custom_pages/'.$identifier);
+    }
+
+    /**
+     * Update Custom page URL (permission needed: #zone_settings:edit)
+     * Update Custom page URL
+     *
+     * @param string $zone_identifier API item identifier tag
+     * @param string $identifier
+     * @param string $url             A URL that is associated with the Custom Page.
+     * @param string $state           The Custom Page state
+     */
+    public function update($zone_identifier, $identifier, $url, $state)
+    {
+        $data = [
+            'url'   => $url,
+            'state' => $state,
+        ];
+
+        return $this->patch('zones/'.$zone_identifier.'/custom_pages/'.$identifier, $data);
+    }
+}

+ 125 - 0
vendor/jamesryanbell/cloudflare/src/CloudFlare/Zone/CustomSSL.php

@@ -0,0 +1,125 @@
+<?php
+
+namespace Cloudflare\Zone;
+
+use Cloudflare\Api;
+
+/**
+ * CloudFlare API wrapper
+ *
+ * Custom SSL for a Zone
+ *
+ * @author James Bell <james@james-bell.co.uk>
+ *
+ * @version 1
+ */
+class CustomSSL extends Api
+{
+    /**
+     * List SSL configurations (permission needed: #ssl:edit)
+     * List, search, sort, and filter all of your custom SSL certificates
+     *
+     * @param string      $zone_identifier API item identifier tag
+     * @param string|null $status          Status of the zone's custom SSL
+     * @param int|null    $page            Page number of paginated results
+     * @param int|null    $per_page        Number of zones per page
+     * @param string|null $order           Field to order certificates by (status, issuer, priority, expires_on)
+     * @param string|null $direction       Direction to order domains (asc, desc)
+     * @param string|null $match           Whether to match all search requirements or at least one (any) (any, all)
+     */
+    public function list_certificates($zone_identifier, $status = null, $page = null, $per_page = null, $order = null, $direction = null, $match = null)
+    {
+        $data = [
+            'status'    => $status,
+            'page'      => $page,
+            'per_page'  => $per_page,
+            'order'     => $order,
+            'direction' => $direction,
+            'match'     => $match,
+        ];
+
+        return $this->get('zones/'.$zone_identifier.'/custom_certificates', $data);
+    }
+
+    /**
+     * Create SSL configuration (permission needed: #ssl:edit)
+     * Upload a new SSL certificate for a zone
+     *
+     * @param string      $zone_identifier API item identifier tag
+     * @param string      $certificate     The zone's private key
+     * @param string      $private_key     The zone's SSL certificate or certificate and the intermediate(s)
+     * @param string|null $bundle_method   A ubiquitous bundle is a bundle that has a higher probability of being verified everywhere,
+     *                                     even by clients using outdated or unusual trust stores. An optimal bundle is a bundle with the shortest chain and newest
+     *                                     intermediates. A forced method attempt to use the certificate/chain as defined by the input "ubiquitous"
+     */
+    public function create($zone_identifier, $certificate, $private_key, $bundle_method = null)
+    {
+        $data = [
+            'certificate'   => $certificate,
+            'private_key'   => $private_key,
+            'bundle_method' => $bundle_method,
+        ];
+
+        return $this->post('zones/'.$zone_identifier.'/custom_certificates', $data);
+    }
+
+    /**
+     * SSL configuration details (permission needed: #ssl:read)
+     *
+     * @param string $zone_identifier API item identifier tag
+     * @param string $identifier
+     */
+    public function details($zone_identifier, $identifier)
+    {
+        return $this->get('zones/'.$zone_identifier.'/custom_certificates/'.$identifier);
+    }
+
+    /**
+     * Create a Keyless SSL configuration (permission needed: #ssl:edit)
+     *
+     * @param string      $zone_identifier API item identifier tag
+     * @param string      $identifier
+     * @param string      $private_key     The zone's SSL certificate or certificate and the intermediate(s)
+     * @param string      $certificate     The zone's private key
+     * @param string|null $bundle_method   A ubiquitous bundle is a bundle that has a higher probability of being verified everywhere,
+     *                                     even by clients using outdated or unusual trust stores. An optimal bundle is a bundle with the shortest chain and newest
+     *                                     intermediates. A forced method attempt to use the certificate/chain as defined by the input "ubiquitous"
+     */
+    public function update($zone_identifier, $identifier, $private_key, $certificate, $bundle_method = null)
+    {
+        $data = [
+            'certificate'   => $certificate,
+            'private_key'   => $private_key,
+            'bundle_method' => $bundle_method,
+        ];
+
+        return $this->patch('zones/'.$zone_identifier.'/custom_certificates/'.$identifier, $data);
+    }
+
+    /**
+     * Re-prioritize SSL certificates (permission needed: #ssl:edit)
+     * If a zone has multiple SSL certificates, you can set the order in which they should be used during a request.
+     *
+     * @param string $zone_identifier API item identifier tag
+     * @param array  $certificates    Array of ordered certificates.
+     */
+    public function prioritize($zone_identifier, array $certificates)
+    {
+        $data = [
+            'certificates' => $certificates,
+        ];
+
+        return $this->put('zones/'.$zone_identifier.'/custom_certificates/prioritize', $data);
+    }
+
+    /**
+     * Delete an SSL certificate (permission needed: #ssl:edit)
+     *
+     * @param string $zone_identifier API item identifier tag
+     * @param string $identifier
+     */
+    public function delete_ssl($zone_identifier, $identifier)
+    {
+        return $this->delete('zones/'.$zone_identifier.'/custom_certificates/'.$identifier);
+    }
+}

+ 128 - 0
vendor/jamesryanbell/cloudflare/src/CloudFlare/Zone/Dns.php

@@ -0,0 +1,128 @@
+<?php
+
+namespace Cloudflare\Zone;
+
+use Cloudflare\Api;
+
+/**
+ * CloudFlare API wrapper
+ *
+ * DNS Record
+ * CloudFlare DNS records
+ *
+ * @author James Bell <james@james-bell.co.uk>
+ *
+ * @version 1
+ */
+class Dns extends Api
+{
+    /**
+     * Create DNS record (permission needed: #dns_records:edit)
+     * Create a new DNS record for a zone. See the record object definitions for required attributes for each record type
+     *
+     * @param string     $zone_identifier
+     * @param string     $type            DNS record type (A, AAAA, CNAME, TXT, SRV, LOC, MX, NS, SPF)
+     * @param string     $name            DNS record name
+     * @param string     $content         DNS record content
+     * @param int|null   $ttl             Time to live for DNS record. Value of 1 is 'automatic'
+     * @param bool|null  $proxied         Whether to proxy the domain through CloudFlare or not
+     * @param int|null   $priority        MX record priority value
+     * @param array|null $data            Additional data required for SRV record
+     */
+    public function create($zone_identifier, $type, $name, $content, $ttl = null, $proxied = null, $priority = null, $data = null)
+    {
+        $data = [
+            'type'     => strtoupper($type),
+            'name'     => $name,
+            'content'  => $content,
+            'ttl'      => $ttl,
+            'proxied'  => $proxied,
+            'priority' => $priority,
+            'data'     => $data,
+        ];
+
+        return $this->post('zones/'.$zone_identifier.'/dns_records', $data);
+    }
+
+    /**
+     * List DNS Records (permission needed: #dns_records:read)
+     * List, search, sort, and filter a zones' DNS records.
+     *
+     * @param string      $zone_identifier
+     * @param string|null $type                      DNS record type (A, AAAA, CNAME, TXT, SRV, LOC, MX, NS, SPF)
+     * @param string|null $name                      DNS record name
+     * @param string|null $content                   DNS record content
+     * @param string|null $vanity_name_server_record Flag for records that were created for the vanity name server feature (true, false)
+     * @param int|null    $page                      Page number of paginated results
+     * @param int|null    $per_page                  Number of DNS records per page
+     * @param string|null $order                     Field to order records by (type, name, content, ttl, proxied)
+     * @param string|null $direction                 Direction to order domains (asc, desc)
+     * @param string|null $match                     Whether to match all search requirements or at least one (any) (any, all)
+     */
+    public function list_records($zone_identifier, $type = null, $name = null, $content = null, $vanity_name_server_record = null, $page = null, $per_page = null, $order = null, $direction = null, $match = null)
+    {
+        $data = [
+            'type'                      => $type,
+            'name'                      => $name,
+            'content'                   => $content,
+            'vanity_name_server_record' => $vanity_name_server_record,
+            'page'                      => $page,
+            'per_page'                  => $per_page,
+            'order'                     => $order,
+            'direction'                 => $direction,
+            'match'                     => $match,
+        ];
+
+        return $this->get('zones/'.$zone_identifier.'/dns_records', $data);
+    }
+
+    /**
+     * DNS record details (permission needed: #dns_records:read)
+     *
+     * @param string $zone_identifier
+     * @param string $identifier      API item identifier tag
+     */
+    public function details($zone_identifier, $identifier)
+    {
+        return $this->get('zones/'.$zone_identifier.'/dns_records/'.$identifier);
+    }
+
+    /**
+     * Update DNS record (permission needed: #dns_records:edit)
+     *
+     * @param string      $zone_identifier
+     * @param string      $identifier      API item identifier tag
+     * @param string|null $type            DNS record type (A, AAAA, CNAME, TXT, SRV, LOC, MX, NS, SPF)
+     * @param string|null $name            DNS record name
+     * @param string|null $content         DNS record content
+     * @param string|null $ttl             Time to live for DNS record. Value of 1 is 'automatic'
+     * @param bool|null   $proxied         Whether to proxy the domain through CloudFlare or not
+     * @param array|null  $data            Additional data required for SRV record
+     * @param int|null    $priority        MX record priority value
+     */
+    public function update($zone_identifier, $identifier, $type = null, $name = null, $content = null, $ttl = null, $proxied = null, $data = null, $priority = null)
+    {
+        $data = [
+            'type'     => $type,
+            'name'     => $name,
+            'content'  => $content,
+            'ttl'      => $ttl,
+            'proxied'  => $proxied,
+            'priority' => $priority,
+            'data'     => $data,
+        ];
+
+        return $this->put('zones/'.$zone_identifier.'/dns_records/'.$identifier, $data);
+    }
+
+    /**
+     * Update DNS record (permission needed: #dns_records:edit)
+     *
+     * @param string $zone_identifier
+     * @param string $identifier      API item identifier tag
+     */
+    public function delete_record($zone_identifier, $identifier)
+    {
+        return $this->delete('zones/'.$zone_identifier.'/dns_records/'.$identifier);
+    }
+}

+ 114 - 0
vendor/jamesryanbell/cloudflare/src/CloudFlare/Zone/Firewall/AccessRules.php

@@ -0,0 +1,114 @@
+<?php
+
+namespace Cloudflare\Zone\Firewall;
+
+use Cloudflare\Api;
+use Cloudflare\Zone;
+
+/**
+ * CloudFlare API wrapper
+ *
+ * Firewall access rules for a Zone
+ *
+ * @author James Bell <james@james-bell.co.uk>
+ *
+ * @version 1
+ */
+class AccessRules extends Api
+{
+    /**
+     * List access rules (permission needed: #zone:read)
+     * Search, sort, and filter IP/country access rule
+     *
+     * @param string      $zone_id
+     * @param string|null $scope_type           The scope of the rules
+     * @param string|null $mode                 The action to apply to a matched request
+     * @param string|null $configuration_target The rule configuration target
+     * @param string|null $configuration_value  Search by IP, range, or country code
+     * @param int|null    $page                 Page number of paginated results
+     * @param int|null    $per_page             Number of rules per page
+     * @param string|null $order                Field to order rules by
+     * @param string|null $direction            Direction to order rules
+     * @param string|null $match                Whether to match all search requirements or at least one (any)
+     * @param string|null $notes                Search in the access rules by notes.
+     */
+    public function rules($zone_id, $scope_type = null, $mode = null, $configuration_target = null, $configuration_value = null, $page = null, $per_page = null, $order = null, $direction = null, $match = null, $notes = null)
+    {
+        $data = [
+            'scope_type'           => $scope_type,
+            'mode'                 => $mode,
+            'configuration_target' => $configuration_target,
+            'configuration_value'  => $configuration_value,
+            'page'                 => $page,
+            'per_page'             => $per_page,
+            'order'                => $order,
+            'direction'            => $direction,
+            'match'                => $match,
+            'notes'                => $notes,
+        ];
+
+        return $this->get('/zones/'.$zone_id.'/firewall/access_rules/rules', $data);
+    }
+
+    /**
+     * Create access rule (permission needed: #zone:edit)
+     * Make a new IP, IP range, or country access rule for the zone.
+     * Note: If you would like to create an access rule that applies across all of your owned zones, use the user or organization firewall endpoints as appropriate.
+     *
+     * @param string      $zone_id
+     * @param string      $mode          The action to apply to a matched request
+     * @param object      $configuration Rule configuration
+     * @param string|null $notes         A personal note about the rule. Typically used as a reminder or explanation for the rule.
+     */
+    public function create($zone_id, $mode, $configuration, $notes = null)
+    {
+        $data = [
+            'mode'          => $mode,
+            'configuration' => $configuration,
+            'notes'         => $notes,
+        ];
+
+        return $this->post('/zones/'.$zone_id.'/firewall/access_rules/rules', $data);
+    }
+
+    /**
+     * Update access rule (permission needed: #zone:edit)
+     * Update rule state and/or configuration for the zone.
+     * Note: you can only edit rules in the 'zone' group via this endpoint. Use the appropriate owner rules endpoint if trying to manage owner-level rules
+     *
+     * @param string      $zone_id
+     * @param string      $identifier
+     * @param string|null $mode       The action to apply to a matched request
+     * @param string|null $notes      A personal note about the rule. Typically used as a reminder or explanation for the rule.
+     */
+    public function update($zone_id, $identifier, $mode = null, $notes = null)
+    {
+        $data = [
+            'mode'  => $mode,
+            'notes' => $notes,
+        ];
+
+        return $this->patch('/zones/'.$zone_id.'/firewall/access_rules/rules/'.$identifier, $data);
+    }
+
+    /**
+     * Delete access rule (permission needed: #zone:edit)
+     * Remove an access rule so it is no longer evaluated during requests.
+     * Optionally, specify how to delete rules that match the mode and configuration across all other zones that this zone owner manages.
+     * 'none' is the default, and will only delete this rule.
+     * 'basic' will delete rules that match the same mode and configuration.
+     * 'aggressive' will delete rules that match the same configuration.
+     *
+     * @param string      $zone_id
+     * @param string      $identifier
+     * @param string|null $cascade    The level to attempt to delete rules defined on other zones that are similar to this rule
+     */
+    public function delete_rule($zone_id, $identifier, $cascade = null)
+    {
+        $data = [
+            'cascade' => $cascade,
+        ];
+
+        return $this->delete('/zones/'.$zone_id.'/firewall/access_rules/rules/'.$identifier, $data);
+    }
+}

+ 95 - 0
vendor/jamesryanbell/cloudflare/src/CloudFlare/Zone/KeylessSSL.php

@@ -0,0 +1,95 @@
+<?php
+
+namespace Cloudflare\Zone;
+
+use Cloudflare\Api;
+
+/**
+ * CloudFlare API wrapper
+ *
+ * Keyless SSL for a Zone
+ *
+ * @author James Bell <james@james-bell.co.uk>
+ *
+ * @version 1
+ */
+class KeylessSSL extends Api
+{
+    /**
+     * Create a Keyless SSL configuration (permission needed: #ssl:edit)
+     *
+     * @param string      $zone_identifier API item identifier tag
+     * @param string      $host            The keyless SSL host
+     * @param int         $port            The keyless SSL port used to commmunicate between CloudFlare and the client's Keyless SSL server
+     * @param string      $name            The keyless SSL name
+     * @param string      $certificate     The zone's SSL certificate or SSL certificate and intermediate(s)
+     * @param string|null $bundle_method   A ubiquitous bundle is a bundle that has a higher probability of being verified everywhere, even by clients using outdated or unusual trust stores.
+     *                                     An optimal bundle is a bundle with the shortest chain and newest intermediates. A forced method attempt to use the certificate/chain as defined by the input
+     */
+    public function create($zone_identifier, $host, $port, $name, $certificate, $bundle_method = null)
+    {
+        $data = [
+            'host'          => $host,
+            'port'          => $port,
+            'name'          => $name,
+            'certificate'   => $certificate,
+            'bundle_method' => $bundle_method,
+        ];
+
+        return $this->post('zones/'.$zone_identifier.'/keyless_certificates', $data);
+    }
+
+    /**
+     * List Keyless SSLs (permission needed: #ssl:read)
+     *
+     * @param string $zone_identifier API item identifier tag
+     */
+    public function certificates($zone_identifier)
+    {
+        return $this->get('zones/'.$zone_identifier.'/keyless_certificates');
+    }
+
+    /**
+     * Keyless SSL details (permission needed: #ssl:read)
+     *
+     * @param string $zone_identifier API item identifier tag
+     * @param string $identifier
+     */
+    public function details($zone_identifier, $identifier)
+    {
+        return $this->get('zones/'.$zone_identifier.'/keyless_certificates/'.$identifier);
+    }
+
+    /**
+     * Update SSL configuration (permission needed: #ssl:edit)
+     *
+     * @param string    $zone_identifier API item identifier tag
+     * @param string    $identifier
+     * @param string    $host            The keyless SSL hostname
+     * @param string    $name            The keyless SSL name
+     * @param int       $port            The keyless SSL port used to commmunicate between CloudFlare and the client's Keyless SSL server
+     * @param bool|null $enabled         Whether or not the Keyless SSL is on or off
+     */
+    public function update($zone_identifier, $identifier, $host, $name, $port, $enabled = null)
+    {
+        $data = [
+            'host'    => $host,
+            'port'    => $port,
+            'name'    => $name,
+            'enabled' => $enabled,
+        ];
+
+        return $this->patch('zones/'.$zone_identifier.'/keyless_certificates/'.$identifier, $data);
+    }
+
+    /**
+     * Delete an SSL certificate (permission needed: #ssl:edit)
+     *
+     * @param string $zone_identifier API item identifier tag
+     * @param string $identifier
+     */
+    public function delete_ssl($zone_identifier, $identifier)
+    {
+        return $this->delete('zones/'.$zone_identifier.'/keyless_certificates/'.$identifier);
+    }
+}

+ 132 - 0
vendor/jamesryanbell/cloudflare/src/CloudFlare/Zone/LoadBalancers.php

@@ -0,0 +1,132 @@
+<?php
+
+namespace Cloudflare\Zone;
+
+use Cloudflare\Api;
+
+/**
+ * CloudFlare API wrapper
+ *
+ * CTM Load Balancer
+ * User-level Cloud Traffic Manager Load Balancer
+ *
+ * @author James Bell <james@james-bell.co.uk>
+ *
+ * @version 1
+ */
+class LoadBalancers extends Api
+{
+    /**
+     * List load balancers
+     * List configured load balancers
+     *
+     * @param string $zone_identifier
+     */
+    public function load_balancers($zone_identifier)
+    {
+        return $this->get('/zones/'.$zone_identifier.'/load_balancers');
+    }
+
+    /**
+     * Create a load balancer
+     * Create a new load balancer
+     *
+     * @param string      $zone_identifier
+     * @param string      $name            The DNS hostname to associate with your Load Balancer. If this hostname already
+     *                                     exists as a DNS record in Cloudflare's DNS, the Load Balancer will take
+     *                                     precedence and the DNS record will not be used.
+     * @param string      $fallback_pool   The pool ID to use when all other pools are detected as unhealthy.
+     * @param array       $default_pools   A list of pool IDs ordered by their failover priority. Pools defined here are
+     *                                     used by default, or when region_pools are not configured for a given region.
+     * @param string|null $description     Object description.
+     * @param int|null    $ttl             Time to live (TTL) of the DNS entry for the IP address returned by this load
+     *                                     balancer. This only applies to gray-clouded (unproxied) load balancers.
+     * @param object|null $region_pools    A mapping of region/country codes to a list of pool IDs (ordered by their
+     *                                     failover priority) for the given region. Any regions not explicitly defined
+     *                                     will fall back to using default_pools.
+     * @param int|null    $pop_pools       (Enterprise only): A mapping of Cloudflare PoP identifiers to a list of pool IDs
+     *                                     (ordered by their failover priority) for the PoP (datacenter). Any PoPs not
+     *                                     explicitly defined will fall back to using default_pools.
+     *                                     balancer. This only applies to gray-clouded (unproxied) load balancers.
+     * @param bool|null   $proxied         Whether the hostname should be gray clouded (false) or orange clouded (true).
+     */
+    public function create($zone_identifier, $name, $fallback_pool, $default_pools, $description = null, $ttl = null, $region_pools = null, $pop_pools = null, $proxied = null)
+    {
+        $data = [
+            'name'          => $name,
+            'fallback_pool' => $fallback_pool,
+            'default_pools' => $default_pools,
+            'description'   => $description,
+            'ttl'           => $ttl,
+            'region_pools'  => $region_pools,
+            'pop_pools'     => $pop_pools,
+            'proxied'       => $proxied,
+        ];
+
+        return $this->post('/zones/'.$zone_identifier.'/load_balancers', $data);
+    }
+
+    /**
+     * Load balancer details
+     * Fetch a single configured load balancer
+     *
+     * @param string $zone_identifier
+     * @param string $identifier
+     */
+    public function details($zone_identifier, $identifier)
+    {
+        return $this->get('/zones/'.$zone_identifier.'/load_balancers/'.$identifier);
+    }
+
+    /**
+     * Modify a load balancer
+     * Modify a configured load balancer
+     *
+     * @param string      $zone_identifier
+     * @param string      $identifier
+     * @param string      $name            The DNS hostname to associate with your Load Balancer. If this hostname already
+     *                                     exists as a DNS record in Cloudflare's DNS, the Load Balancer will take
+     *                                     precedence and the DNS record will not be used.
+     * @param string      $fallback_pool   The pool ID to use when all other pools are detected as unhealthy.
+     * @param array       $default_pools   A list of pool IDs ordered by their failover priority. Pools defined here are
+     *                                     used by default, or when region_pools are not configured for a given region.
+     * @param string|null $description     Object description.
+     * @param int|null    $ttl             Time to live (TTL) of the DNS entry for the IP address returned by this load
+     *                                     balancer. This only applies to gray-clouded (unproxied) load balancers.
+     * @param object|null $region_pools    A mapping of region/country codes to a list of pool IDs (ordered by their
+     *                                     failover priority) for the given region. Any regions not explicitly defined
+     *                                     will fall back to using default_pools.
+     * @param int|null    $pop_pools       (Enterprise only): A mapping of Cloudflare PoP identifiers to a list of pool IDs
+     *                                     (ordered by their failover priority) for the PoP (datacenter). Any PoPs not
+     *                                     explicitly defined will fall back to using default_pools.
+     *                                     balancer. This only applies to gray-clouded (unproxied) load balancers.
+     * @param bool|null   $proxied         Whether the hostname should be gray clouded (false) or orange clouded (true).
+     */
+    public function update($zone_identifier, $identifier, $name, $fallback_pool, $default_pools, $description = null, $ttl = null, $region_pools = null, $pop_pools = null, $proxied = null)
+    {
+        $data = [
+            'name'          => $name,
+            'fallback_pool' => $fallback_pool,
+            'default_pools' => $default_pools,
+            'description'   => $description,
+            'ttl'           => $ttl,
+            'region_pools'  => $region_pools,
+            'pop_pools'     => $pop_pools,
+            'proxied'       => $proxied,
+        ];
+
+        return $this->patch('/zones/'.$zone_identifier.'/load_balancers/'.$identifier, $data);
+    }
+
+    /**
+     * Delete a load balancer
+     * Delete a configured load balancer
+     *
+     * @param string $zone_identifier
+     * @param string $identifier
+     */
+    public function delete_load_balancer($zone_identifier, $identifier)
+    {
+        return $this->delete('/zones/'.$zone_identifier.'/load_balancers/'.$identifier);
+    }
+}

+ 139 - 0
vendor/jamesryanbell/cloudflare/src/CloudFlare/Zone/Pagerules.php

@@ -0,0 +1,139 @@
+<?php
+
+namespace Cloudflare\Zone;
+
+use Cloudflare\Api;
+
+/**
+ * CloudFlare API wrapper
+ *
+ * Page rules for a Zone
+ * A rule describing target patterns for requests and actions to perform on matching requests
+ *
+ * @author James Bell <james@james-bell.co.uk>
+ *
+ * @version 1
+ */
+class Pagerules extends Api
+{
+    /**
+     * Create a page rule [BETA] (permission needed: #zone:edit)
+     *
+     * @param string      $zone_identifier API item identifier tag
+     * @param array       $targets         Targets to evaluate on a request
+     * @param array       $actions         The set of actions to perform if the targets of this rule match the request.
+     *                                     Actions can redirect the url to another url or override settings (but not both)
+     * @param int|null    $priority        A number that indicates the preference for a page rule over another. In the case where
+     *                                     you may have a catch-all page rule (e.g., #1: '/images/') but want a rule that is more
+     *                                     specific to take precedence (e.g., #2: '/images/special/'), you'll want to specify a
+     *                                     higher priority on the latter (#2) so it will override the first.
+     * @param string|null $status          Status of the page rule
+     */
+    public function create($zone_identifier, $targets, $actions, $priority = null, $status = 'active')
+    {
+        $data = [
+            'targets'  => $targets,
+            'actions'  => $actions,
+            'priority' => $priority,
+            'status'   => $status,
+        ];
+
+        return $this->post('zones/'.$zone_identifier.'/pagerules', $data);
+    }
+
+    /**
+     * List page rules [BETA] (permission needed: #zone:read)
+     *
+     * @param string      $zone_identifier API item identifier tag
+     * @param string|null $status          Status of the page rule
+     * @param string|null $order           Field to order page rules by (status, priority)
+     * @param string|null $direction       Direction to order page rules (asc, desc)
+     * @param string|null $match           Whether to match all search requirements or at least one (any) (any, all)
+     */
+    public function list_pagerules($zone_identifier, $status = null, $order = null, $direction = null, $match = null)
+    {
+        $data = [
+            'status'    => $status,
+            'order'     => $order,
+            'direction' => $direction,
+            'match'     => $match,
+        ];
+
+        return $this->get('zones/'.$zone_identifier.'/pagerules', $data);
+    }
+
+    /**
+     * Page rule details [BETA] (permission needed: #zone:read)
+     *
+     * @param string $zone_identifier API item identifier tag
+     * @param string $identifier
+     */
+    public function details($zone_identifier, $identifier)
+    {
+        return $this->get('zones/'.$zone_identifier.'/pagerules/'.$identifier);
+    }
+
+    /**
+     * Change a page rule [BETA] (permission needed: #zone:edit)
+     *
+     * @param string      $zone_identifier API item identifier tag
+     * @param string      $identifier
+     * @param array|null  $targets         Targets to evaluate on a request
+     * @param array|null  $actions         The set of actions to perform if the targets of this rule match the request.
+     *                                     Actions can redirect the url to another url or override settings (but not both)
+     * @param int|null    $priority        A number that indicates the preference for a page rule over another. In the case where
+     *                                     you may have a catch-all page rule (e.g., #1: '/images/') but want a rule that is more
+     *                                     specific to take precedence (e.g., #2: '/images/special/'), you'll want to specify a
+     *                                     higher priority on the latter (#2) so it will override the first.
+     * @param string|null $status          Status of the page rule
+     */
+    public function change($zone_identifier, $identifier, $targets = null, $actions = null, $priority = null, $status = null)
+    {
+        $data = [
+            'targets'  => $targets,
+            'actions'  => $actions,
+            'priority' => $priority,
+            'status'   => $status,
+        ];
+
+        return $this->patch('zones/'.$zone_identifier.'/pagerules/'.$identifier, $data);
+    }
+
+    /**
+     * Update a page rule [BETA] (permission needed: #zone:edit)
+     * Replace a page rule. The final rule will exactly match the data passed with this request.
+     *
+     * @param string      $zone_identifier API item identifier tag
+     * @param string      $identifier
+     * @param array       $targets         Targets to evaluate on a request
+     * @param array       $actions         The set of actions to perform if the targets of this rule match the request.
+     *                                     Actions can redirect the url to another url or override settings (but not both)
+     * @param int|null    $priority        A number that indicates the preference for a page rule over another. In the case where
+     *                                     you may have a catch-all page rule (e.g., #1: '/images/') but want a rule that is more
+     *                                     specific to take precedence (e.g., #2: '/images/special/'), you'll want to specify a
+     *                                     higher priority on the latter (#2) so it will override the first.
+     * @param string|null $status          Status of the page rule
+     */
+    public function update($zone_identifier, $identifier, $targets, $actions, $priority = null, $status = null)
+    {
+        $data = [
+            'targets'  => $targets,
+            'actions'  => $actions,
+            'priority' => $priority,
+            'status'   => $status,
+        ];
+
+        return $this->put('zones/'.$zone_identifier.'/pagerules/'.$identifier, $data);
+    }
+
+    /**
+     * Delete a page rule [BETA] (permission needed: #zone:edit)
+     *
+     * @param string $zone_identifier API item identifier tag
+     * @param string $identifier
+     */
+    public function delete_pagerule($zone_identifier, $identifier)
+    {
+        return $this->delete('zones/'.$zone_identifier.'/pagerules/'.$identifier);
+    }
+}

+ 51 - 0
vendor/jamesryanbell/cloudflare/src/CloudFlare/Zone/Plan.php

@@ -0,0 +1,51 @@
+<?php
+
+namespace Cloudflare\Zone;
+
+use Cloudflare\Api;
+
+/**
+ * CloudFlare API wrapper
+ *
+ * Zone Plan
+ *
+ * @author James Bell <james@james-bell.co.uk>
+ *
+ * @version 1
+ */
+class Plan extends Api
+{
+    /**
+     * Available plans (permission needed: #billing:read)
+     * List all plans the zone can subscribe to.
+     *
+     * @param string $zone_identifier
+     */
+    public function available($zone_identifier)
+    {
+        return $this->get('zones/'.$zone_identifier.'/available_rate_plans');
+    }
+
+    /**
+     * Available plans (permission needed: #billing:read)
+     *
+     * @param string $zone_identifier
+     * @param string $identifier      API item identifier tag
+     */
+    public function details($zone_identifier, $identifier)
+    {
+        return $this->get('zones/'.$zone_identifier.'/plans/'.$identifier);
+    }
+
+    /**
+     * Change plan (permission needed: #billing:edit)
+     * Change the plan level for the zone. This will cancel any previous subscriptions and subscribe the zone to the new plan.
+     *
+     * @param string $zone_identifier
+     * @param string $identifier      API item identifier tag
+     */
+    public function change($zone_identifier, $identifier)
+    {
+        return $this->put('zones/'.$zone_identifier.'/plans/'.$identifier.'/subscribe');
+    }
+}

+ 69 - 0
vendor/jamesryanbell/cloudflare/src/CloudFlare/Zone/Railgun.php

@@ -0,0 +1,69 @@
+<?php
+
+namespace Cloudflare\Zone;
+
+use Cloudflare\Api;
+
+/**
+ * CloudFlare API wrapper
+ *
+ * Railguns for a Zone
+ *
+ * @author James Bell <james@james-bell.co.uk>
+ *
+ * @version 1
+ */
+class Railgun extends Api
+{
+    /**
+     * Get available Railguns (permission needed: #zone_settings:read)
+     * A list of available Railguns the zone can use
+     *
+     * @param string $zone_identifier API item identifier tag
+     */
+    public function railguns($zone_identifier)
+    {
+        return $this->get('zones/'.$zone_identifier.'/railguns');
+    }
+
+    /**
+     * Get Railgun details (permission needed: #zone_settings:read)
+     * Details about a specific Railgun
+     *
+     * @param string $zone_identifier API item identifier tag
+     * @param string $identifier
+     */
+    public function details($zone_identifier, $identifier)
+    {
+        return $this->get('zones/'.$zone_identifier.'/railguns/'.$identifier);
+    }
+
+    /**
+     * Test Railgun connection (permission needed: #zone_settings:read)
+     * Test Railgun connection to the Zone
+     *
+     * @param string $zone_identifier API item identifier tag
+     * @param string $identifier
+     */
+    public function diagnose($zone_identifier, $identifier)
+    {
+        return $this->get('zones/'.$zone_identifier.'/railguns/'.$identifier.'/diagnose');
+    }
+
+    /**
+     * Connect or disconnect a Railgun (permission needed: #zone_settings:edit)
+     * Connect or disconnect a Railgun
+     *
+     * @param string $zone_identifier
+     * @param string $identifier      API item identifier tag
+     * @param bool   $connected       A flag indicating whether the given zone is connected to the Railgun [valid values: (true,false)]
+     */
+    public function connected($zone_identifier, $identifier, $connected)
+    {
+        $data = [
+            'connected' => $connected,
+        ];
+
+        return $this->get('zones/'.$zone_identifier.'/railguns/'.$identifier, $data);
+    }
+}

+ 99 - 0
vendor/jamesryanbell/cloudflare/src/CloudFlare/Zone/SSL.php

@@ -0,0 +1,99 @@
+<?php
+
+namespace Cloudflare\Zone;
+
+use Cloudflare\Api;
+
+/**
+ * CloudFlare API wrapper
+ *
+ * Custom SSL for a Zone
+ *
+ * @author James Bell <james@james-bell.co.uk>
+ *
+ * @version 1
+ */
+class SSL extends Api
+{
+    /**
+     * List SSL configurations (permission needed: #ssl:read)
+     *
+     * @param string $zone_identifier API item identifier tag
+     */
+    public function certificates($zone_identifier)
+    {
+        return $this->get('zones/'.$zone_identifier.'/custom_certificates');
+    }
+
+    /**
+     * List SSL configuration details (permission needed: #ssl:read)
+     *
+     * @param string $zone_identifier API item identifier tag
+     * @param string $identifier
+     */
+    public function details($zone_identifier, $identifier)
+    {
+        return $this->get('zones/'.$zone_identifier.'/custom_certificates/'.$identifier);
+    }
+
+    /**
+     * Create SSL configuration (permission needed: #ssl:edit)
+     *
+     * @param string $zone_identifier API item identifier tag
+     * @param string $certificate     The zone's SSL certificate or certificate and the intermediate(s)
+     * @param string $private_key     The zone's private key
+     */
+    public function create($zone_identifier, $certificate, $private_key)
+    {
+        $data = [
+            'certificate' => $certificate,
+            'private_key' => $private_key,
+        ];
+
+        return $this->post('zones/'.$zone_identifier.'/custom_certificates', $data);
+    }
+
+    /**
+     * Update SSL configuration (permission needed: #ssl:edit)
+     *
+     * @param string $zone_identifier API item identifier tag
+     * @param string $identifier
+     * @param string $certificate     The zone's SSL certificate or certificate and the intermediate(s)
+     * @param string $private_key     The zone's private key
+     */
+    public function update($zone_identifier, $identifier, $certificate, $private_key)
+    {
+        $data = [
+            'certificate' => $certificate,
+            'private_key' => $private_key,
+        ];
+
+        return $this->patch('zones/'.$zone_identifier.'/custom_certificates/'.$identifier, $data);
+    }
+
+    /**
+     * Re-prioritize SSL certificates (permission needed: #ssl:edit)
+     *
+     * @param string $zone_identifier API item identifier tag
+     * @param array  $certificates    Array of ordered certificates
+     */
+    public function prioritize($zone_identifier, array $certificates)
+    {
+        $data = [
+            'certificates' => $certificates,
+        ];
+
+        return $this->patch('zones/'.$zone_identifier.'/custom_certificates/prioritize', $data);
+    }
+
+    /**
+     * Delete an SSL certificate (permission needed: #ssl:edit)
+     *
+     * @param string $zone_identifier API item identifier tag
+     * @param string $identifier
+     */
+    public function delete_ssl($zone_identifier, $identifier)
+    {
+        return $this->delete('zones/'.$zone_identifier.'/custom_certificates/'.$identifier);
+    }
+}

+ 40 - 0
vendor/jamesryanbell/cloudflare/src/CloudFlare/Zone/SSL/Analyze.php

@@ -0,0 +1,40 @@
+<?php
+
+namespace Cloudflare\Zone\SSL;
+
+use Cloudflare\Api;
+use Cloudflare\Zone;
+
+/**
+ * CloudFlare API wrapper
+ *
+ * Analyze Certificate
+ *
+ * @author James Bell <james@james-bell.co.uk>
+ *
+ * @version 1
+ */
+class Analyze extends Api
+{
+    /**
+     * Analyze Certificate (permission needed: #ssl:read)
+     * Returns the set of hostnames, the signature algorithm, and the expiration date of the certificate.
+     *
+     * @param string      $identifier
+     * @param string      $certificate   The zone's SSL certificate or certificate and the intermediate(s)
+     * @param string|null $bundle_method A ubiquitous bundle is a bundle that has a higher probability of
+     *                                   being verified everywhere, even by clients using outdated or unusual
+     *                                   trust stores. An optimal bundle is a bundle with the shortest chain and
+     *                                   newest intermediates. A forced method attempt to use the certificate/chain
+     *                                   as defined by the input
+     */
+    public function analyze($identifier, $certificate, $bundle_method = null)
+    {
+        $data = [
+            'certificate'   => $certificate,
+            'bundle_method' => $bundle_method,
+        ];
+
+        return $this->post('/zones/'.$identifier.'/ssl/analyze', $data);
+    }
+}

+ 29 - 0
vendor/jamesryanbell/cloudflare/src/CloudFlare/Zone/SSL/CertificatePacks.php

@@ -0,0 +1,29 @@
+<?php
+
+namespace Cloudflare\Zone\SSL;
+
+use Cloudflare\Api;
+use Cloudflare\Zone;
+
+/**
+ * CloudFlare API wrapper
+ *
+ * Certificate Packs
+ *
+ * @author James Bell <james@james-bell.co.uk>
+ *
+ * @version 1
+ */
+class CertificatePacks extends Api
+{
+    /**
+     * List all certificate packs (permission needed: #ssl:read)
+     * For a given zone, list all certificate packs
+     *
+     * @param string $identifier
+     */
+    public function certificate_packs($identifier)
+    {
+        return $this->get('/zones/'.$identifier.'/ssl/certificate_packs');
+    }
+}

+ 894 - 0
vendor/jamesryanbell/cloudflare/src/CloudFlare/Zone/Settings.php

@@ -0,0 +1,894 @@
+<?php
+
+namespace Cloudflare\Zone;
+
+use Cloudflare\Api;
+
+/**
+ * CloudFlare API wrapper
+ *
+ * Zone Settings
+ *
+ * @author James Bell <james@james-bell.co.uk>
+ *
+ * @version 1
+ */
+class Settings extends Api
+{
+    /**
+     * Zone settings (permission needed: #zone_settings:read)
+     * Available settings for your user in relation to a zone
+     *
+     * @param string $zone_identifier API item identifier tag
+     */
+    public function settings($zone_identifier)
+    {
+        return $this->get('zones/'.$zone_identifier.'/settings');
+    }
+
+    /**
+     * Advanced DDOS setting (permission needed: #zone_settings:read)
+     * Advanced protection from Distributed Denial of Service (DDoS) attacks on your website.
+     * This is an uneditable value that is 'on' in the case of Business and Enterprise zones
+     *
+     * @param string $zone_identifier API item identifier tag
+     */
+    public function advanced_ddos($zone_identifier)
+    {
+        return $this->get('zones/'.$zone_identifier.'/settings/advanced_ddos');
+    }
+
+    /**
+     * Get Automatic HTTPS Rewrites setting (permission needed: #zone_settings:edit)
+     * Enable the Automatic HTTPS Rewrites feature for this zone.
+     *
+     * @param string $zone_identifier API item identifier tag
+     */
+    public function automatic_https_rewrites($zone_identifier)
+    {
+        return $this->get('zones/'.$zone_identifier.'/settings/automatic_https_rewrites');
+    }
+
+    /**
+     * Get Always Online setting (permission needed: #zone_settings:read)
+     * When enabled, Always Online will serve pages from our cache if your server is offline
+     * (https://support.cloudflare.com/hc/en-us/articles/200168006)
+     *
+     * @param string $zone_identifier API item identifier tag
+     */
+    public function always_online($zone_identifier)
+    {
+        return $this->get('zones/'.$zone_identifier.'/settings/always_online');
+    }
+
+    /**
+     * Get Always Use HTTPS setting permission needed: #zone_settings:read
+     *
+     * Reply to all requests for URLs that use "http" with a 301 redirect to the equivalent "https" URL. If you only want to redirect for a subset of requests, consider creating an "Always use HTTPS" page rule.
+     *
+     * @link https://api.cloudflare.com/#zone-settings-get-always-use-https-setting
+     *
+     * @param string $zone_identifier API item identifier tag
+     *
+     * @return \stdClass | false
+     */
+    public function always_use_https($zone_identifier)
+    {
+        return $this->get('zones/' . $zone_identifier . '/settings/always_use_https');
+    }
+
+    /**
+     * Get Browser Cache TTL setting (permission needed: #zone_settings:read)
+     * Browser Cache TTL (in seconds) specifies how long CloudFlare-cached resources will remain on your visitors' computers.
+     * CloudFlare will honor any larger times specified by your server.
+     * (https://support.cloudflare.com/hc/en-us/articles/200168276)
+     *
+     * @param string $zone_identifier API item identifier tag
+     */
+    public function browser_cache_ttl($zone_identifier)
+    {
+        return $this->get('zones/'.$zone_identifier.'/settings/browser_cache_ttl');
+    }
+
+    /**
+     * Get Browser Check setting (permission needed: #zone_settings:read)
+     * Browser Integrity Check is similar to Bad Behavior and looks for common HTTP headers abused most commonly by spammers and denies access to your page.
+     * It will also challenge visitors that do not have a user agent or a non standard user agent (also commonly used by abuse bots, crawlers or visitors).
+     * (https://support.cloudflare.com/hc/en-us/articles/200170086)
+     *
+     * @param string $zone_identifier API item identifier tag
+     */
+    public function browser_check($zone_identifier)
+    {
+        return $this->get('zones/'.$zone_identifier.'/settings/browser_check');
+    }
+
+    /**
+     * Get Cache Level setting (permission needed: #zone_settings:read)
+     * Cache Level functions based off the setting level. The basic setting will cache most static resources (i.e., css, images, and JavaScript).
+     * The simplified setting will ignore the query string when delivering a cached resource. The aggressive setting will cache all static resources, including ones with a query string.
+     * (https://support.cloudflare.com/hc/en-us/articles/200168256)
+     *
+     * @param string $zone_identifier API item identifier tag
+     */
+    public function cache_level($zone_identifier)
+    {
+        return $this->get('zones/'.$zone_identifier.'/settings/cache_level');
+    }
+
+    /**
+     * Get Challenge TTL setting (permission needed: #zone_settings:read)
+     * Specify how long a visitor is allowed access to your site after successfully completing a challenge (such as a CAPTCHA). After the TTL has expired the visitor will have to complete a new challenge.
+     * We recommend a 15 - 45 minute setting and will attempt to honor any setting above 45 minutes.
+     * (https://support.cloudflare.com/hc/en-us/articles/200170136)
+     *
+     * @param string $zone_identifier API item identifier tag
+     */
+    public function challenge_ttl($zone_identifier)
+    {
+        return $this->get('zones/'.$zone_identifier.'/settings/challenge_ttl');
+    }
+
+    /**
+     * Get Development Mode setting (permission needed: #zone_settings:read)
+     * Development Mode temporarily allows you to enter development mode for your websites if you need to make changes to your site.
+     * This will bypass CloudFlare's accelerated cache and slow down your site, but is useful if you are making changes to cacheable content (like images, css, or JavaScript) and would like to see those changes right away.
+     * Once entered, development mode will last for 3 hours and then automatically toggle off.
+     *
+     * @param string $zone_identifier API item identifier tag
+     */
+    public function development_mode($zone_identifier)
+    {
+        return $this->get('zones/'.$zone_identifier.'/settings/development_mode');
+    }
+
+    /**
+     * Get Email Obfuscation setting (permission needed: #zone_settings:read)
+     * Encrypt email adresses on your web page from bots, while keeping them visible to humans.
+     * (https://support.cloudflare.com/hc/en-us/articles/200170016)
+     *
+     * @param string $zone_identifier API item identifier tag
+     */
+    public function email_obfuscation($zone_identifier)
+    {
+        return $this->get('zones/'.$zone_identifier.'/settings/email_obfuscation');
+    }
+
+    /**
+     * Get Hotlink Protection setting (permission needed: #zone_settings:read)
+     * When enabled, the Hotlink Protection option ensures that other sites cannot suck up your bandwidth by building pages that use images hosted on your site.
+     * Anytime a request for an image on your site hits CloudFlare, we check to ensure that it's not another site requesting them.
+     * People will still be able to download and view images from your page, but other sites won't be able to steal them for use on their own pages.
+     * (https://support.cloudflare.com/hc/en-us/articles/200170026)
+     *
+     * @param string $zone_identifier API item identifier tag
+     */
+    public function hotlink_protection($zone_identifier)
+    {
+        return $this->get('zones/'.$zone_identifier.'/settings/hotlink_protection');
+    }
+
+    /**
+     * Get IP Geolocation setting (permission needed: #zone_settings:read)
+     * Enable IP Geolocation to have CloudFlare geolocate visitors to your website and pass the country code to you.
+     * (https://support.cloudflare.com/hc/en-us/articles/200168236)
+     *
+     * @param string $zone_identifier API item identifier tag
+     */
+    public function ip_geolocation($zone_identifier)
+    {
+        return $this->get('zones/'.$zone_identifier.'/settings/ip_geolocation');
+    }
+
+    /**
+     * Get IP IPv6 setting (permission needed: #zone_settings:read)
+     * Enable IPv6 on all subdomains that are CloudFlare enabled.
+     * (https://support.cloudflare.com/hc/en-us/articles/200168586)
+     *
+     * @param string $zone_identifier API item identifier tag
+     */
+    public function ipv6($zone_identifier)
+    {
+        return $this->get('zones/'.$zone_identifier.'/settings/ipv6');
+    }
+
+    /**
+     * Get IP Minify setting (permission needed: #zone_settings:read)
+     * Automatically minify certain assets for your website (https://support.cloudflare.com/hc/en-us/articles/200168196).
+     *
+     * @param string $zone_identifier API item identifier tag
+     */
+    public function minify($zone_identifier)
+    {
+        return $this->get('zones/'.$zone_identifier.'/settings/minify');
+    }
+
+    /**
+     * Get Mobile Redirect setting (permission needed: #zone_settings:read)
+     * Automatically redirect visitors on mobile devices to a mobile-optimized subdomain (https://support.cloudflare.com/hc/en-us/articles/200168336).
+     *
+     * @param string $zone_identifier API item identifier tag
+     */
+    public function mobile_redirect($zone_identifier)
+    {
+        return $this->get('zones/'.$zone_identifier.'/settings/mobile_redirect');
+    }
+
+    /**
+     * Get Mirage setting (permission needed: #zone_settings:read)
+     * Automatically optimize image loading for website visitors on mobile devices (http://blog.cloudflare.com/mirage2-solving-mobile-speed).
+     *
+     * @param string $zone_identifier API item identifier tag
+     */
+    public function mirage($zone_identifier)
+    {
+        return $this->get('zones/'.$zone_identifier.'/settings/mirage');
+    }
+
+    /**
+     * Get Enable Error Pages On setting (permission needed: #zone_settings:read)
+     * CloudFlare will proxy customer error pages on any 502,504 errors on origin server instead of showing a default CloudFlare error page.
+     * This does not apply to 522 errors and is limited to Enterprise Zones.
+     *
+     * @param string $zone_identifier API item identifier tag
+     */
+    public function origin_error_page_pass_thru($zone_identifier)
+    {
+        return $this->get('zones/'.$zone_identifier.'/settings/origin_error_page_pass_thru');
+    }
+
+    /**
+     * Get Polish setting (permission needed: #zone_settings:read)
+     * Strips metadata and compresses your images for faster page load times. Basic (Lossless): Reduce the size of PNG, JPEG, and GIF files - no impact on visual quality.
+     * Basic + JPEG (Lossy): Further reduce the size of JPEG files for faster image loading.
+     * Larger JPEGs are converted to progressive images, loading a lower-resolution image first and ending in a higher-resolution version. Not recommended for hi-res photography sites.
+     *
+     * @param string $zone_identifier API item identifier tag
+     */
+    public function polish($zone_identifier)
+    {
+        return $this->get('zones/'.$zone_identifier.'/settings/polish');
+    }
+
+    /**
+     * Get Prefetch Preload setting (permission needed: #zone_settings:read)
+     * CloudFlare will prefetch any URLs that are included in the response headers. This is limited to Enterprise Zones.
+     *
+     * @param string $zone_identifier API item identifier tag
+     */
+    public function prefetch_preload($zone_identifier)
+    {
+        return $this->get('zones/'.$zone_identifier.'/settings/prefetch_preload');
+    }
+
+    /**
+     * Get Response Buffering setting (permission needed: #zone_settings:read)
+     * Enables or disables buffering of responses from the proxied server. CloudFlare may buffer the whole payload to deliver it at once to the client versus allowing it to be delivered in chunks.
+     * By default, the proxied server streams directly and is not buffered by CloudFlare. This is limited to Enterprise Zones.
+     *
+     * @param string $zone_identifier API item identifier tag
+     */
+    public function response_buffering($zone_identifier)
+    {
+        return $this->get('zones/'.$zone_identifier.'/settings/response_buffering');
+    }
+
+    /**
+     * Get Rocket Loader setting (permission needed: #zone_settings:read)
+     * Rocket Loader is a general-purpose asynchronous JavaScript loader coupled with a lightweight virtual browser which can safely run any JavaScript code after window.onload.
+     * Turning on Rocket Loader will immediately improve a web page's window.onload time (assuming there is JavaScript on the page), which can have a positive impact on your Google search ranking.
+     * Automatic Mode: Rocket Loader will automatically run on the JavaScript resources on your site, with no configuration required after turning on automatic mode. Manual Mode: In order to have Rocket Loader execute for a particular script, you must add the following attribute to the script tag: "data-cfasync='true'".
+     * As your page passes through CloudFlare, we'll enable Rocket Loader for that particular script. All other JavaScript will continue to execute without CloudFlare touching the script. (https://support.cloudflare.com/hc/en-us/articles/200168056)
+     *
+     * @param string $zone_identifier API item identifier tag
+     */
+    public function rocket_loader($zone_identifier)
+    {
+        return $this->get('zones/'.$zone_identifier.'/settings/rocket_loader');
+    }
+
+    /**
+     * Get Security Header (HSTS) setting (permission needed: #zone_settings:read)
+     * CloudFlare security header for a zone.
+     *
+     * @param string $zone_identifier API item identifier tag
+     */
+    public function security_header($zone_identifier)
+    {
+        return $this->get('zones/'.$zone_identifier.'/settings/security_header');
+    }
+
+    /**
+     * Get Security Level setting (permission needed: #zone_settings:read)
+     * Choose the appropriate security profile for your website, which will automatically adjust each of the security settings. If you choose to customize an individual security setting, the profile will become Custom.
+     * (https://support.cloudflare.com/hc/en-us/articles/200170056)
+     *
+     * @param string $zone_identifier API item identifier tag
+     */
+    public function security_level($zone_identifier)
+    {
+        return $this->get('zones/'.$zone_identifier.'/settings/security_level');
+    }
+
+    /**
+     * Get Server Side Exclude setting (permission needed: #zone_settings:read)
+     * If there is sensitive content on your website that you want visible to real visitors, but that you want to hide from suspicious visitors, all you have to do is wrap the content with CloudFlare SSE tags. Wrap any content that you want to be excluded from suspicious visitors in the following SSE tags: .
+     * For example: Bad visitors won't see my phone number, 555-555-5555 . Note: SSE only will work with HTML. If you have HTML minification enabled, you won't see the SSE tags in your HTML source when it's served through CloudFlare.
+     * SSE will still function in this case, as CloudFlare's HTML minification and SSE functionality occur on-the-fly as the resource moves through our network to the visitor's computer.
+     * (https://support.cloudflare.com/hc/en-us/articles/200170036)
+     *
+     * @param string $zone_identifier API item identifier tag
+     */
+    public function server_side_exclude($zone_identifier)
+    {
+        return $this->get('zones/'.$zone_identifier.'/settings/server_side_exclude');
+    }
+
+    /**
+     * Get Enable Query String Sort setting (permission needed: #zone_settings:read)
+     * CloudFlare will treat files with the same query strings as the same file in cache, regardless of the order of the query strings. This is limited to Enterprise Zones.
+     *
+     * @param string $zone_identifier API item identifier tag
+     */
+    public function sort_query_string_for_cache($zone_identifier)
+    {
+        return $this->get('zones/'.$zone_identifier.'/settings/sort_query_string_for_cache');
+    }
+
+    /**
+     * Get SSL setting (permission needed: #zone_settings:read)
+     * SSL encrypts your visitor's connection and safeguards credit card numbers and other personal data to and from your website. SSL can take up to 5 minutes to fully activate. Requires CloudFlare active on your root domain or www domain.
+     * Off: no SSL between the visitor and CloudFlare, and no SSL between CloudFlare and your web server (all HTTP traffic).
+     * Flexible: SSL between the visitor and CloudFlare -- visitor sees HTTPS on your site, but no SSL between CloudFlare and your web server. You don't need to have an SSL cert on your web server, but your vistors will still see the site as being HTTPS enabled.
+     * Full: SSL between the visitor and CloudFlare -- visitor sees HTTPS on your site, and SSL between CloudFlare and your web server. You'll need to have your own SSL cert or self-signed cert at the very least.
+     * Full (Strict): SSL between the visitor and CloudFlare -- visitor sees HTTPS on your site, and SSL between CloudFlare and your web server. You'll need to have a valid SSL certificate installed on your web server. This certificate must be signed by a certificate authority, have an expiration date in the future, and respond for the request domain name (hostname).
+     * (https://support.cloudflare.com/hc/en-us/articles/200170416)
+     *
+     * @param string $zone_identifier API item identifier tag
+     */
+    public function ssl($zone_identifier)
+    {
+        return $this->get('zones/'.$zone_identifier.'/settings/ssl');
+    }
+
+    /**
+     * Get Zone Enable TLS 1.2 setting (permission needed: #zone_settings:read)
+     * Enable Crypto TLS 1.2 feature for this zone and prevent use of previous versions. This is limited to Enterprise or Business Zones.
+     *
+     * @param string $zone_identifier API item identifier tag
+     */
+    public function tls_1_2_only($zone_identifier)
+    {
+        return $this->get('zones/'.$zone_identifier.'/settings/tls_1_2_only');
+    }
+
+    /**
+     * Get TLS Client Auth setting (permission needed: #zone_settings:read)
+     * TLS Client Auth requires CloudFlare to connect to your origin server using a client certificate (Enterprise Only)
+     *
+     * @param string $zone_identifier API item identifier tag
+     */
+    public function tls_client_auth($zone_identifier)
+    {
+        return $this->get('zones/'.$zone_identifier.'/settings/tls_client_auth');
+    }
+
+    /**
+     * Get True Client IP setting (permission needed: #zone_settings:edit)
+     * Allows customer to continue to use True Client IP (Akamai feature) in the headers we send to the origin. This is limited to Enterprise Zones.
+     *
+     * @param string $zone_identifier API item identifier tag
+     */
+    public function true_client_ip_header($zone_identifier)
+    {
+        return $this->get('zones/'.$zone_identifier.'/settings/true_client_ip_header');
+    }
+
+    /**
+     * Get Web Application Firewall (WAF) setting (permission needed: #zone_settings:read)
+     * The WAF examines HTTP requests to your website. It inspects both GET and POST requests and applies rules to help filter out illegitimate traffic from legitimate website visitors. The CloudFlare WAF inspects website addresses or URLs to detect anything out of the ordinary. If the CloudFlare WAF determines suspicious user behavior, then the WAF will ‘challenge’ the web visitor with a page that asks them to submit a CAPTCHA successfully to continue their action. If the challenge is failed, the action will be stopped. What this means is that CloudFlare’s WAF will block any traffic identified as illegitimate before it reaches your origin web server.
+     * (https://support.cloudflare.com/hc/en-us/articles/200172016)
+     *
+     * @param string $zone_identifier API item identifier tag
+     */
+    public function waf($zone_identifier)
+    {
+        return $this->get('zones/'.$zone_identifier.'/settings/waf');
+    }
+
+    /**
+     * Get Web Application Firewall (WAF) setting (permission needed: #zone_settings:edit)
+     * Edit settings for a zone
+     *
+     * @param string $zone_identifier API item identifier tag
+     * @param array  $items           One or more zone setting objects. Must contain an ID and a value.
+     */
+    public function edit($zone_identifier, array $items)
+    {
+        $data = [
+            'items' => $items,
+        ];
+
+        return $this->patch('zones/'.$zone_identifier.'/settings', $data);
+    }
+
+    /**
+     * Change Automatic HTTPS Rewrites setting (permission needed: #zone_settings:edit)
+     * Enable the Automatic HTTPS Rewrites feature for this zone.
+     *
+     * @param string      $zone_identifier API item identifier tag
+     * @param string|null $value           Value of the zone setting (default: off)
+     */
+    public function change_automatic_https_rewrites($zone_identifier, $value = null)
+    {
+        $data = [
+            'value' => $value,
+        ];
+
+        return $this->patch('zones/'.$zone_identifier.'/settings/automatic_https_rewrites', $data);
+    }
+
+    /**
+     * Change Always Online setting (permission needed: #zone_settings:edit)
+     * When enabled, Always Online will serve pages from our cache if your server is offline (https://support.cloudflare.com/hc/en-us/articles/200168006)
+     *
+     * @param string      $zone_identifier API item identifier tag
+     * @param string|null $value           Value of the zone setting (default: on)
+     */
+    public function change_always_on($zone_identifier, $value = null)
+    {
+        $data = [
+            'value' => $value,
+        ];
+
+        return $this->patch('zones/'.$zone_identifier.'/settings/always_online', $data);
+    }
+
+    /**
+     * Change Always Use HTTPS setting (permission needed: #zone_settings:edit)
+     *
+     * Reply to all requests for URLs that use "http" with a 301 redirect to the equivalent "https" URL. If you only want to redirect for a subset of requests, consider creating an "Always use HTTPS" page rule.
+     *
+     * @link https://api.cloudflare.com/#zone-settings-change-always-use-https-setting
+     *
+     * @param string      $zone_identifier API item identifier tag
+     * @param string|null $value           Value of the zone setting (default: off)
+     *
+     * @return \stdClass | false
+     */
+    public function change_always_use_https($zone_identifier, $value = null)
+    {
+        $data = array(
+            'value' => $value
+        );
+        return $this->patch('zones/' . $zone_identifier . '/settings/always_use_https', $data);
+    }
+
+    /**
+     * Change Browser Cache TTL setting (permission needed: #zone_settings:edit)
+     * Browser Cache TTL (in seconds) specifies how long CloudFlare-cached resources will remain on your visitors' computers. CloudFlare will honor any larger times specified by your server.
+     * (https://support.cloudflare.com/hc/en-us/articles/200168276)
+     *
+     * @param string   $zone_identifier API item identifier tag
+     * @param int|null $value           Value of the zone setting (default: 14400)
+     */
+    public function change_browser_cache_ttl($zone_identifier, $value = null)
+    {
+        $data = [
+            'value' => $value,
+        ];
+
+        return $this->patch('zones/'.$zone_identifier.'/settings/browser_cache_ttl', $data);
+    }
+
+    /**
+     * Change Browser Check setting (permission needed: #zone_settings:edit)
+     * Browser Integrity Check is similar to Bad Behavior and looks for common HTTP headers abused most commonly by spammers and denies access to your page.
+     * It will also challenge visitors that do not have a user agent or a non standard user agent (also commonly used by abuse bots, crawlers or visitors).
+     * (https://support.cloudflare.com/hc/en-us/articles/200170086)
+     *
+     * @param string      $zone_identifier API item identifier tag
+     * @param string|null $value           Value of the zone setting (default: on)
+     */
+    public function change_browser_check($zone_identifier, $value = null)
+    {
+        $data = [
+            'value' => $value,
+        ];
+
+        return $this->patch('zones/'.$zone_identifier.'/settings/browser_check', $data);
+    }
+
+    /**
+     * Change Cache Level setting (permission needed: #zone_settings:edit)
+     * Cache Level functions based off the setting level. The basic setting will cache most static resources (i.e., css, images, and JavaScript).
+     * The simplified setting will ignore the query string when delivering a cached resource. The aggressive setting will cache all static resources, including ones with a query string.
+     * (https://support.cloudflare.com/hc/en-us/articles/200168256)
+     *
+     * @param string      $zone_identifier API item identifier tag
+     * @param string|null $value           Value of the zone setting (default: on)
+     */
+    public function change_cache_level($zone_identifier, $value = null)
+    {
+        $data = [
+            'value' => $value,
+        ];
+
+        return $this->patch('zones/'.$zone_identifier.'/settings/cache_level', $data);
+    }
+
+    /**
+     * Change Challenge TTL setting (permission needed: #zone_settings:edit)
+     * Specify how long a visitor is allowed access to your site after successfully completing a challenge (such as a CAPTCHA). After the TTL has expired the visitor will have to complete a new challenge.
+     * We recommend a 15 - 45 minute setting and will attempt to honor any setting above 45 minutes.
+     * (https://support.cloudflare.com/hc/en-us/articles/200170136)
+     *
+     * @param string   $zone_identifier API item identifier tag
+     * @param int|null $value           Value of the zone setting (default: on)
+     */
+    public function change_challenge_ttl($zone_identifier, $value = null)
+    {
+        $data = [
+            'value' => $value,
+        ];
+
+        return $this->patch('zones/'.$zone_identifier.'/settings/challenge_ttl', $data);
+    }
+
+    /**
+     * Change Development Mode setting (permission needed: #zone_settings:edit)
+     * Development Mode temporarily allows you to enter development mode for your websites if you need to make changes to your site.
+     * This will bypass CloudFlare's accelerated cache and slow down your site, but is useful if you are making changes to cacheable content (like images, css, or JavaScript) and would like to see those changes right away. Once entered, development mode will last for 3 hours and then automatically toggle off.
+     *
+     * @param string      $zone_identifier API item identifier tag
+     * @param string|null $value           Value of the zone setting (default: on)
+     */
+    public function change_development_mode($zone_identifier, $value = null)
+    {
+        $data = [
+            'value' => $value,
+        ];
+
+        return $this->patch('zones/'.$zone_identifier.'/settings/development_mode', $data);
+    }
+
+    /**
+     * Change Enable Error Pages On setting (permission needed: #zone_settings:edit)
+     * CloudFlare will proxy customer error pages on any 502,504 errors on origin server instead of showing a default CloudFlare error page. This does not apply to 522 errors and is limited to Enterprise Zones.
+     *
+     * @param string      $zone_identifier API item identifier tag
+     * @param string|null $value           Value of the zone setting (default: on)
+     */
+    public function change_origin_error_page_pass_thru($zone_identifier, $value = null)
+    {
+        $data = [
+            'value' => $value,
+        ];
+
+        return $this->patch('zones/'.$zone_identifier.'/settings/origin_error_page_pass_thru', $data);
+    }
+
+    /**
+     * Change Enable Query String Sort setting (permission needed: #zone_settings:edit)
+     * CloudFlare will treat files with the same query strings as the same file in cache, regardless of the order of the query strings. This is limited to Enterprise Zones.
+     *
+     * @param string      $zone_identifier API item identifier tag
+     * @param string|null $value           Value of the zone setting (default: on)
+     */
+    public function change_sort_query_string_for_cache($zone_identifier, $value = null)
+    {
+        $data = [
+            'value' => $value,
+        ];
+
+        return $this->patch('zones/'.$zone_identifier.'/settings/sort_query_string_for_cache', $data);
+    }
+
+    /**
+     * Change Hotlink Protection setting (permission needed: #zone_settings:edit)
+     * When enabled, the Hotlink Protection option ensures that other sites cannot suck up your bandwidth by building pages that use images hosted on your site. Anytime a request for an image on your site hits CloudFlare, we check to ensure that it's not another site requesting them.
+     * People will still be able to download and view images from your page, but other sites won't be able to steal them for use on their own pages.
+     * (https://support.cloudflare.com/hc/en-us/articles/200170026)
+     *
+     * @param string      $zone_identifier API item identifier tag
+     * @param string|null $value           Value of the zone setting (default: on)
+     */
+    public function change_hotlink_protection($zone_identifier, $value = null)
+    {
+        $data = [
+            'value' => $value,
+        ];
+
+        return $this->patch('zones/'.$zone_identifier.'/settings/hotlink_protection', $data);
+    }
+
+    /**
+     * Change IP Geolocation setting (permission needed: #zone_settings:edit)
+     * Enable IP Geolocation to have CloudFlare geolocate visitors to your website and pass the country code to you. (https://support.cloudflare.com/hc/en-us/articles/200168236)
+     *
+     * @param string      $zone_identifier API item identifier tag
+     * @param string|null $value           Value of the zone setting (default: on)
+     */
+    public function change_ip_geolocation($zone_identifier, $value = null)
+    {
+        $data = [
+            'value' => $value,
+        ];
+
+        return $this->patch('zones/'.$zone_identifier.'/settings/ip_geolocation', $data);
+    }
+
+    /**
+     * Change IPv6 setting (permission needed: #zone_settings:edit)
+     * Enable IPv6 on all subdomains that are CloudFlare enabled. (https://support.cloudflare.com/hc/en-us/articles/200168586)
+     *
+     * @param string      $zone_identifier API item identifier tag
+     * @param string|null $value           Value of the zone setting (default: on)
+     */
+    public function change_ipv6($zone_identifier, $value = null)
+    {
+        $data = [
+            'value' => $value,
+        ];
+
+        return $this->patch('zones/'.$zone_identifier.'/settings/ipv6', $data);
+    }
+
+    /**
+     * Change Minify setting (permission needed: #zone_settings:edit)
+     * Automatically minify certain assets for your website (https://support.cloudflare.com/hc/en-us/articles/200168196).
+     *
+     * @param string      $zone_identifier API item identifier tag
+     * @param string|null $value           Value of the zone setting
+     */
+    public function change_minify($zone_identifier, $value)
+    {
+        $data = [
+            'value' => $value,
+        ];
+
+        return $this->patch('zones/'.$zone_identifier.'/settings/minify', $data);
+    }
+
+    /**
+     * Change Mobile Redirect setting (permission needed: #zone_settings:edit)
+     * Automatically redirect visitors on mobile devices to a mobile-optimized subdomain (https://support.cloudflare.com/hc/en-us/articles/200168336).
+     *
+     * @param string      $zone_identifier API item identifier tag
+     * @param string|null $value           Value of the zone setting (default: on)
+     */
+    public function change_mobile_redirect($zone_identifier, $value)
+    {
+        $data = [
+            'value' => $value,
+        ];
+
+        return $this->patch('zones/'.$zone_identifier.'/settings/mobile_redirect', $data);
+    }
+
+    /**
+     * Change Mirage setting (permission needed: #zone_settings:edit)
+     * Automatically optimize image loading for website visitors on mobile devices (http://blog.cloudflare.com/mirage2-solving-mobile-speed).
+     *
+     * @param string      $zone_identifier API item identifier tag
+     * @param string|null $value           Value of the zone setting (default: off)
+     */
+    public function change_mirage($zone_identifier, $value = null)
+    {
+        $data = [
+            'value' => $value,
+        ];
+
+        return $this->patch('zones/'.$zone_identifier.'/settings/mirage', $data);
+    }
+
+    /**
+     * Change Polish setting (permission needed: #zone_settings:edit)
+     * Strips metadata and compresses your images for faster page load times. Basic (Lossless): Reduce the size of PNG, JPEG, and GIF files - no impact on visual quality. Basic + JPEG (Lossy): Further reduce the size of JPEG files for faster image loading.
+     * Larger JPEGs are converted to progressive images, loading a lower-resolution image first and ending in a higher-resolution version. Not recommended for hi-res photography sites.
+     *
+     * @param string      $zone_identifier API item identifier tag
+     * @param string|null $value           Value of the zone setting (default: off)
+     */
+    public function change_polish($zone_identifier, $value = null)
+    {
+        $data = [
+            'value' => $value,
+        ];
+
+        return $this->patch('zones/'.$zone_identifier.'/settings/polish', $data);
+    }
+
+    /**
+     * Change Prefetch Preload setting (permission needed: #zone_settings:edit)
+     * CloudFlare will prefetch any URLs that are included in the response headers. This is limited to Enterprise Zones.
+     *
+     * @param string      $zone_identifier API item identifier tag
+     * @param string|null $value           Value of the zone setting (default: off)
+     */
+    public function change_prefetch_preload($zone_identifier, $value = null)
+    {
+        $data = [
+            'value' => $value,
+        ];
+
+        return $this->patch('zones/'.$zone_identifier.'/settings/prefetch_preload', $data);
+    }
+
+    /**
+     * Change Response Buffering setting (permission needed: #zone_settings:edit)
+     * Enables or disables buffering of responses from the proxied server. CloudFlare may buffer the whole payload to deliver it at once to the client versus allowing it to be delivered in chunks.
+     * By default, the proxied server streams directly and is not buffered by CloudFlare. This is limited to Enterprise Zones.
+     *
+     * @param string      $zone_identifier API item identifier tag
+     * @param string|null $value           Value of the zone setting (default: off)
+     */
+    public function change_response_buffering($zone_identifier, $value = null)
+    {
+        $data = [
+            'value' => $value,
+        ];
+
+        return $this->patch('zones/'.$zone_identifier.'/settings/response_buffering', $data);
+    }
+
+    /**
+     * Change Rocket Loader setting (permission needed: #zone_settings:edit)
+     * Rocket Loader is a general-purpose asynchronous JavaScript loader coupled with a lightweight virtual browser which can safely run any JavaScript code after window.onload. Turning on Rocket Loader will immediately improve a web page's window.onload time (assuming there is JavaScript on the page), which can have a positive impact on your Google search ranking.
+     * Automatic Mode: Rocket Loader will automatically run on the JavaScript resources on your site, with no configuration required after turning on automatic mode.
+     * Manual Mode: In order to have Rocket Loader execute for a particular script, you must add the following attribute to the script tag: "data-cfasync='true'". As your page passes through CloudFlare, we'll enable Rocket Loader for that particular script.
+     * All other JavaScript will continue to execute without CloudFlare touching the script. (https://support.cloudflare.com/hc/en-us/articles/200168056)
+     *
+     * @param string      $zone_identifier API item identifier tag
+     * @param string|null $value           Value of the zone setting (default: off)
+     */
+    public function change_rocket_loader($zone_identifier, $value = null)
+    {
+        $data = [
+            'value' => $value,
+        ];
+
+        return $this->patch('zones/'.$zone_identifier.'/settings/rocket_loader', $data);
+    }
+
+    /**
+     * Change Security Header (HSTS) setting (permission needed: #zone_settings:edit)
+     * CloudFlare security header for a zone.
+     *
+     * @param string      $zone_identifier API item identifier tag
+     * @param string|null $value           Value of the zone setting (default: off)
+     */
+    public function change_security_header($zone_identifier, $value)
+    {
+        $data = [
+            'value' => $value,
+        ];
+
+        return $this->patch('zones/'.$zone_identifier.'/settings/security_header', $data);
+    }
+
+    /**
+     * Change Security Level setting (permission needed: #zone_settings:edit)
+     * Choose the appropriate security profile for your website, which will automatically adjust each of the security settings. If you choose to customize an individual security setting, the profile will become Custom.
+     * (https://support.cloudflare.com/hc/en-us/articles/200170056)
+     *
+     * @param string      $zone_identifier API item identifier tag
+     * @param string|null $value           Value of the zone setting (default: medium)
+     */
+    public function change_security_level($zone_identifier, $value = null)
+    {
+        $data = [
+            'value' => $value,
+        ];
+
+        return $this->patch('zones/'.$zone_identifier.'/settings/security_level', $data);
+    }
+
+    /**
+     * Change Server Side Exclude setting (permission needed: #zone_settings:edit)
+     * If there is sensitive content on your website that you want visible to real visitors, but that you want to hide from suspicious visitors, all you have to do is wrap the content with CloudFlare SSE tags.
+     * Wrap any content that you want to be excluded from suspicious visitors in the following SSE tags: . For example: Bad visitors won't see my phone number, 555-555-5555 . Note: SSE only will work with HTML.
+     * If you have HTML minification enabled, you won't see the SSE tags in your HTML source when it's served through CloudFlare. SSE will still function in this case, as CloudFlare's HTML minification and SSE functionality occur on-the-fly as the resource moves through our network to the visitor's computer.
+     * (https://support.cloudflare.com/hc/en-us/articles/200170036)
+     *
+     * @param string      $zone_identifier API item identifier tag
+     * @param string|null $value           Value of the zone setting (default: on)
+     */
+    public function change_server_side_exclude($zone_identifier, $value = null)
+    {
+        $data = [
+            'value' => $value,
+        ];
+
+        return $this->patch('zones/'.$zone_identifier.'/settings/server_side_exclude', $data);
+    }
+
+    /**
+     * Change SSL setting (permission needed: #zone_settings:edit)
+     * SSL encrypts your visitor's connection and safeguards credit card numbers and other personal data to and from your website. SSL can take up to 5 minutes to fully activate.
+     * Requires CloudFlare active on your root domain or www domain.
+     * Off: no SSL between the visitor and CloudFlare, and no SSL between CloudFlare and your web server (all HTTP traffic).
+     * Flexible: SSL between the visitor and CloudFlare -- visitor sees HTTPS on your site, but no SSL between CloudFlare and your web server. You don't need to have an SSL cert on your web server, but your vistors will still see the site as being HTTPS enabled.
+     * Full: SSL between the visitor and CloudFlare -- visitor sees HTTPS on your site, and SSL between CloudFlare and your web server. You'll need to have your own SSL cert or self-signed cert at the very least.
+     * Full (Strict): SSL between the visitor and CloudFlare -- visitor sees HTTPS on your site, and SSL between CloudFlare and your web server. You'll need to have a valid SSL certificate installed on your web server. This certificate must be signed by a certificate authority, have an expiration date in the future, and respond for the request domain name (hostname).
+     * (https://support.cloudflare.com/hc/en-us/articles/200170416)
+     *
+     * @param string      $zone_identifier API item identifier tag
+     * @param string|null $value           Value of the zone setting (default: off)
+     */
+    public function change_ssl($zone_identifier, $value = null)
+    {
+        $data = [
+            'value' => $value,
+        ];
+
+        return $this->patch('zones/'.$zone_identifier.'/settings/ssl', $data);
+    }
+
+    /**
+     * Change TLS Client Auth setting (permission needed: #zone_settings:edit)
+     * TLS Client Auth requires CloudFlare to connect to your origin server using a client certificate (Enterprise Only)
+     *
+     * @param string      $zone_identifier API item identifier tag
+     * @param string|null $value           Value of the zone setting (default: off)
+     */
+    public function change_tls_client_auth($zone_identifier, $value = null)
+    {
+        $data = [
+            'value' => $value,
+        ];
+
+        return $this->patch('zones/'.$zone_identifier.'/settings/tls_client_auth', $data);
+    }
+
+    /**
+     * Change True Client IP setting (permission needed: #zone_settings:edit)
+     * Allows customer to continue to use True Client IP (Akamai feature) in the headers we send to the origin. This is limited to Enterprise Zones.
+     *
+     * @param string      $zone_identifier API item identifier tag
+     * @param string|null $value           Value of the zone setting (default: off)
+     */
+    public function change_true_client_ip_header($zone_identifier, $value = null)
+    {
+        $data = [
+            'value' => $value,
+        ];
+
+        return $this->patch('zones/'.$zone_identifier.'/settings/true_client_ip_header', $data);
+    }
+
+    /**
+     * Change TLS 1.2 setting (permission needed: #zone_settings:edit)
+     * Enable Crypto TLS 1.2 feature for this zone and prevent use of previous versions. This is limited to Enterprise or Business Zones.
+     *
+     * @param string      $zone_identifier API item identifier tag
+     * @param string|null $value           Value of the zone setting (default: off)
+     */
+    public function change_tls_1_2_only($zone_identifier, $value = null)
+    {
+        $data = [
+            'value' => $value,
+        ];
+
+        return $this->patch('zones/'.$zone_identifier.'/settings/true_client_ip_header', $data);
+    }
+
+    /**
+     * Change Web Application Firewall (WAF) (permission needed: #zone_settings:edit)
+     * The WAF examines HTTP requests to your website. It inspects both GET and POST requests and applies rules to help filter out illegitimate traffic from legitimate website visitors.
+     * The CloudFlare WAF inspects website addresses or URLs to detect anything out of the ordinary. If the CloudFlare WAF determines suspicious user behavior, then the WAF will "challenge" the web visitor with a page that asks them to submit a CAPTCHA successfully to continue their action.
+     * If the challenge is failed, the action will be stopped. What this means is that CloudFlare’s WAF will block any traffic identified as illegitimate before it reaches your origin web server.
+     * (https://support.cloudflare.com/hc/en-us/articles/200172016)
+     *
+     * @param string      $zone_identifier API item identifier tag
+     * @param string|null $value           Value of the zone setting (default: off)
+     */
+    public function change_waf($zone_identifier, $value = null)
+    {
+        $data = [
+            'value' => $value,
+        ];
+
+        return $this->patch('zones/'.$zone_identifier.'/settings/waf', $data);
+    }
+}

+ 75 - 0
vendor/jamesryanbell/cloudflare/src/CloudFlare/Zone/WAF/Packages.php

@@ -0,0 +1,75 @@
+<?php
+
+namespace Cloudflare\Zone\WAF;
+
+use Cloudflare\Api;
+use Cloudflare\Zone;
+
+/**
+ * CloudFlare API wrapper
+ *
+ * WAF Rule Packages properties
+ *
+ * @author James Bell <james@james-bell.co.uk>
+ *
+ * @version 1
+ */
+class Packages extends Api
+{
+    /**
+     * List firewall packages (permission needed: #zone:read)
+     * Retrieve firewall packages for a zone
+     *
+     * @param string      $zone_identifier
+     * @param string|null $name            Name of the firewall package
+     * @param int|null    $page            Page number of paginated results
+     * @param int|null    $per_page        Number of packages per page
+     * @param string|null $order           Field to order packages by
+     * @param string|null $direction       Direction to order packages
+     * @param string|null $match           Whether to match all search requirements or at least one (any)
+     */
+    public function rules($zone_identifier, $name = null, $page = null, $per_page = null, $order = null, $direction = null, $match = null)
+    {
+        $data = [
+            'name'      => $name,
+            'page'      => $page,
+            'per_page'  => $per_page,
+            'order'     => $order,
+            'direction' => $direction,
+            'match'     => $match,
+        ];
+
+        return $this->get('/zones/'.$zone_identifier.'/firewall/waf/packages', $data);
+    }
+
+    /**
+     * Firewall package info (permission needed: #zone:read)
+     * Get information about a single firewall package
+     *
+     * @param string $zone_identifier
+     * @param string $identifier
+     */
+    public function info($zone_identifier, $identifier)
+    {
+        return $this->get('/zones/'.$zone_identifier.'/firewall/waf/packages/'.$identifier);
+    }
+
+    /**
+     * Change anomaly-detection web application firewall package settings (permission needed: #zone:edit)
+     * Change the sensitivity and action for an anomaly detection type WAF rule package
+     *
+     * @param string      $zone_identifier
+     * @param string      $identifier
+     * @param string|null $sensitivity     The sensitivity of the firewall package.
+     * @param string|null $action_mode     The default action that will be taken for rules under the firewall package.
+     */
+    public function update($zone_identifier, $identifier, $sensitivity = null, $action_mode = null)
+    {
+        $data = [
+            'sensitivity' => $sensitivity,
+            'action_mode' => $action_mode,
+        ];
+
+        return $this->patch('/zones/'.$zone_identifier.'/firewall/waf/packages/'.$identifier, $data);
+    }
+}

+ 81 - 0
vendor/jamesryanbell/cloudflare/src/CloudFlare/Zone/WAF/Packages/Groups.php

@@ -0,0 +1,81 @@
+<?php
+
+namespace Cloudflare\Zone\WAF\Packages;
+
+use Cloudflare\Api;
+use Cloudflare\Zone;
+use Cloudflare\Zone\WAF;
+
+/**
+ * CloudFlare API wrapper
+ *
+ * WAF Rule Groups properties
+ *
+ * @author James Bell <james@james-bell.co.uk>
+ *
+ * @version 1
+ */
+class Groups extends Api
+{
+    /**
+     * List rule groups (permission needed: #zone:read)
+     * Search, list, and sort rule groups contained within a package
+     *
+     * @param string      $zone_identifier
+     * @param string      $package_identifier
+     * @param string|null $name               Name of the firewall rule group
+     * @param string|null $mode               Whether or not the rules contained within this group are configurable/usable
+     * @param int|null    $rules_count        How many rules are contained within this group
+     * @param int|null    $page               Page number of paginated results
+     * @param int|null    $per_page           Number of groups per page
+     * @param string|null $order              Field to order groups by
+     * @param string|null $direction          Direction to order groups
+     * @param string|null $match              Whether to match all search requirements or at least one (any)
+     */
+    public function groups($zone_identifier, $package_identifier, $name = null, $mode = null, $rules_count = null, $page = null, $per_page = null, $order = null, $direction = null, $match = null)
+    {
+        $data = [
+            'name'        => $name,
+            'mode'        => $mode,
+            'rules_count' => $rules_count,
+            'page'        => $page,
+            'per_page'    => $per_page,
+            'order'       => $order,
+            'direction'   => $direction,
+            'match'       => $match,
+        ];
+
+        return $this->get('/zones/'.$zone_identifier.'/firewall/waf/packages/'.$package_identifier.'/groups', $data);
+    }
+
+    /**
+     * Rule group info (permission needed: #zone:read)
+     * Get a single rule group
+     *
+     * @param string $zone_identifier
+     * @param string $package_identifier
+     * @param string $identifier
+     */
+    public function info($zone_identifier, $package_identifier, $identifier)
+    {
+        return $this->get('/zones/'.$zone_identifier.'/firewall/waf/packages/'.$package_identifier.'/groups/'.$identifier);
+    }
+
+    /**
+     * Update Rule group (permission needed: #zone:edit)
+     * Update the state of a rule group
+     *
+     * @param string      $zone_identifier
+     * @param string      $package_identifier
+     * @param string      $identifier
+     * @param string|null $mode               Whether or not the rules contained within this group are configurable/usable
+     */
+    public function update($zone_identifier, $package_identifier, $identifier, $mode = null)
+    {
+        $data = [
+            'mode' => $mode,
+        ];
+
+        return $this->patch('/zones/'.$zone_identifier.'/firewall/waf/packages/'.$package_identifier.'/groups/'.$identifier, $data);
+    }
+}

+ 83 - 0
vendor/jamesryanbell/cloudflare/src/CloudFlare/Zone/WAF/Packages/Rules.php

@@ -0,0 +1,83 @@
+<?php
+
+namespace Cloudflare\Zone\WAF\Packages;
+
+use Cloudflare\Api;
+use Cloudflare\Zone;
+use Cloudflare\Zone\WAF;
+
+/**
+ * CloudFlare API wrapper
+ *
+ * WAF Rules properties
+ *
+ * @author James Bell <james@james-bell.co.uk>
+ *
+ * @version 1
+ */
+class Rules extends Api
+{
+    /**
+     * List rule (permission needed: #zone:read)
+     * Search, list, and filter rules within a package
+     *
+     * @param string      $zone_id
+     * @param string      $package_id
+     * @param string|null $description Public description of the rule
+     * @param object|null $mode        The rule mode
+     * @param int|null    $priority    The order in which the individual rule is executed within the related group
+     * @param string|null $group_id    WAF group identifier tag
+     * @param int|null    $page        Page number of paginated results
+     * @param int|null    $per_page    Number of rules per page
+     * @param string|null $order       Field to order rules by
+     * @param string|null $direction   Direction to order rules
+     * @param string|null $match       Whether to match all search requirements or at least one (any)
+     */
+    public function rules($zone_id, $package_id, $description = null, $mode = null, $priority = null, $group_id = null, $page = null, $per_page = null, $order = null, $direction = null, $match = null)
+    {
+        $data = [
+            'description' => $description,
+            'mode'        => $mode,
+            'priority'    => $priority,
+            'group_id'    => $group_id,
+            'page'        => $page,
+            'per_page'    => $per_page,
+            'order'       => $order,
+            'direction'   => $direction,
+            'match'       => $match,
+        ];
+
+        return $this->get('/zones/'.$zone_id.'/firewall/waf/packages/'.$package_id.'/rules', $data);
+    }
+
+    /**
+     * Rule info (permission needed: #zone:read)
+     * Individual information about a rule
+     *
+     * @param string $zone_id
+     * @param string $package_id
+     * @param string $identifier
+     */
+    public function info($zone_id, $package_id, $identifier)
+    {
+        return $this->get('/zones/'.$zone_id.'/firewall/waf/packages/'.$package_id.'/rules/'.$identifier);
+    }
+
+    /**
+     * Update Rule group (permission needed: #zone:edit)
+     * Update the state of a rule group
+     *
+     * @param string      $zone_id
+     * @param string      $package_id
+     * @param string      $identifier
+     * @param string|null $mode       The mode to use when the rule is triggered. Value is restricted based on the allowed_modes of the rule
+     */
+    public function update($zone_id, $package_id, $identifier, $mode = null)
+    {
+        $data = [
+            'mode' => $mode,
+        ];
+
+        return $this->patch('/zones/'.$zone_id.'/firewall/waf/packages/'.$package_id.'/rules/'.$identifier, $data);
+    }
+}