Class AdWordGeoTarget

Description

AdWords Lib AdWordGeoTarget Class

Manages GeoTarget data type.

Located in /classes/AdWordGeoTarget.inc

AdWordObject
   |
   --AdWordComplexObject
      |
      --AdWordGeoTarget
Method Summary
 void addCity (string $name)
 void addCountry (string $name)
 void addMetro (string $name)
 void addProximity (string $name)
 void addRegion (string $name)
 string getXML ([$geoTypes $targetType = ''])
 void removeCity (string $name)
 void removeCountry (string $name)
 void removeMetro (string $name)
 void removeRegion (string $name)
Methods

Adds a Country to this GeoTarget

Example:

  1.  <?php
  2.  $obj new AdWordGeoTarget();
  3.  $obj->addCountry('US');
  4.  ?>

void addCountry (string $name)
  • string $name: the country code

Adds a Metro to this GeoTarget

Example:

  1.  <?php
  2.  $obj new AdWordGeoTarget();
  3.  $obj->addMetro($metro)//where $metro is a string with your metro area
  4.  ?>

void addMetro (string $name)
  • string $name: the metro

Adds a Proximity Target to this GeoTarget

Example:

  1.  <?php
  2.  $obj new AdWordGeoTarget();
  3.  $obj->addProximity($proximityObj);
  4.  ?>

void addProximity (string $name)
  • string $name: the region code

Adds a Region to this GeoTarget

Example:

  1.  <?php
  2.  $obj new AdWordGeoTarget();
  3.  $obj->addRegion('US-AK');
  4.  ?>

void addRegion (string $name)
  • string $name: the region code

Returns this GeoTarget data type in XML format

Example:

  1.  <?php
  2.  $obj new AdWordGeoTarget();
  3.  $xml $obj->getXML();
  4.  ?>

  • return: the GeoTarget data type in XML format
  • access: public
string getXML ([$geoTypes $targetType = ''])
  • $geoTypes $targetType: allows only given types of geoTargeting to be returned (for example only countries)

Redefinition of:
AdWordComplexObject::getXML()

Removes a Country from this GeoTarget

Example:

  1.  <?php
  2.  $obj new AdWordGeoTarget();
  3.  $obj->addCountry('US');
  4.  $obj->removeCountry('US');
  5.  ?>

void removeCountry (string $name)
  • string $name: the country code

Removes a Metro from this GeoTarget

Example:

  1.  <?php
  2.  $obj new AdWordGeoTarget();
  3.  $obj->addMetro($metro)//where $metro is a string with your metro area
  4.  $obj->removeMetro($metro);
  5.  ?>

void removeMetro (string $name)
  • string $name: the metro

Removes a Region from this GeoTarget

Example:

  1.  <?php
  2.  $obj new AdWordGeoTarget();
  3.  $obj->addRegion('US-AK');
  4.  $obj->removeRegion('US-AK');
  5.  ?>

void removeRegion (string $name)
  • string $name: the region code

Inherited Methods

Inherited From AdWordComplexObject

 AdWordComplexObject::getXML()
 AdWordComplexObject::set()
 AdWordComplexObject::setRow()

Inherited From AdWordObject

 AdWordObject::AdWordObject()
 AdWordObject::get()
 AdWordObject::getRow()
 AdWordObject::getXML()
 AdWordObject::isEmpty()
 AdWordObject::remove()
 AdWordObject::set()
 AdWordObject::setRow()

Documentation generated on Mon, 10 Sep 2007 15:07:20 +0300 by phpDocumentor 1.3.2