function cc::get_campaign in Constant Contact 6.3
Same name and namespace in other branches
- 6.2 class.cc.php \cc::get_campaign()
- 7.3 class.cc.php \cc::get_campaign()
* Gets an individual campaign * * @access public
File
- ./
class.cc.php, line 1274
Class
- cc
- @file
Code
function get_campaign($id) {
$xml = $this
->load_url("campaigns/{$id}");
if (!$xml) {
return false;
}
// parse into nicer array
$campaign = false;
$_campaign = isset($xml['entry']) ? $xml['entry'] : false;
// parse into nicer array
if (is_array($_campaign)) {
$id = $this
->get_id_from_link($_campaign['link_attr']['href']);
$campaign = $_campaign['content']['Campaign'];
$campaign['id'] = $id;
}
return $campaign;
}