Skip to content
This repository has been archived by the owner on Nov 2, 2022. It is now read-only.

Commit

Permalink
Merge pull request #26 from xGabryMC/master
Browse files Browse the repository at this point in the history
Added the $data argument to the create and update functions.
  • Loading branch information
jamesryanbell committed Jul 14, 2016
2 parents f359ec7 + 15830ce commit dc9cc85
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/CloudFlare/Zone/Dns.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,16 @@ class Dns extends Api
* @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
*/
public function create($zone_identifier, $type, $name, $content, $ttl = null, $proxied = null, $priority = null)
public function create($zone_identifier, $type, $name, $content, $ttl = null, $proxied = null, $priority = null, $data = null)
{
$data = array(
'type' => strtoupper($type),
'name' => $name,
'content' => $content,
'ttl' => $ttl,
'proxied' => $proxied,
'priority' => $priority
'priority' => $priority,
'data' => $data
);
return $this->post('zones/' . $zone_identifier . '/dns_records', $data);
}
Expand Down Expand Up @@ -97,14 +98,15 @@ public function details($zone_identifier, $identifier)
* @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
*/
public function update($zone_identifier, $identifier, $type = null, $name = null, $content = null, $ttl = null, $proxied = null)
public function update($zone_identifier, $identifier, $type = null, $name = null, $content = null, $ttl = null, $proxied = null, $data = null)
{
$data = array(
'type' => $type,
'name' => $name,
'content' => $content,
'ttl' => $ttl,
'proxied' => $proxied
'proxied' => $proxied,
'data' => $data
);
return $this->put('zones/' . $zone_identifier . '/dns_records/' . $identifier, $data);
}
Expand Down

0 comments on commit dc9cc85

Please sign in to comment.