Class AdWordObject

Description

AdWords Lib Object Class

Base class for all AdWords data types.

  • copyright: Mirchev Ideas Ltd. © 2003, 2004, 2005

Located in /classes/AdWordObject.inc


	
			
Direct descendents
Class Description
 class AdWordAdGroup AdWords Lib AdGroup Class
 class AdWordAddress AdWords Lib Address Class
 class AdWordComplexObject AdWords Lib AdWordComplexObject Class
 class AdWordCoverageType AdWords Lib CoverageType Class
 class AdWordCircle AdWords Lib AdWordCircle Class
 class AdWordCreditCard AdWords Lib CreditCard Class
 class AdWordCriterion AdWords Lib AdWordCriterion Class
 class AdWordEmailPromotionsPreferences AdWords Lib EmailPromotionsPreferences Class
 class AdWordLanguageTarget AdWords Lib AdWordLanguageTarget Class
 class AdWordReportJob AdWords Lib AdWordReportJob Class
 class AdWordStatsRecord AdWords Lib AdWordStatsRecord Class
 class AdWordKeywordVariation AdWords Lib KeywordVariation Class
 class AdWordNetworkTarget AdWords Lib AdWordNetworkTarget Class
 class AdWordSeedKeyword AdWords Lib SeedKeyword Class
 class AdWordSiteKeyword AdWords Lib SiteKeyword Class
 class AdWordApiError AdWords Lib ApiError Class
 class AdWordClientUsageRecord AdWords Lib ClientUsageRecord Class
 class AdWordSchedulingInterval AdWords Lib AdWordSchedulingInterval Class
 class AdWordBusiness AdWords Lib Business Class
 class AdWordBudgetOptimizerSettings AdWords Lib BudgetOptimizerSettings Class
 class AdWordImage AdWords Lib Image Class
 class AdWordVideo AdWords Lib Video Class
 class AdWordCountryTargets AdWords Lib AdWordCountryTargets Class
 class AdWordKeywordTrafficRequest AdWords Lib AdWordKeywordTrafficRequest Class
 class AdWordSiteSuggestion AdWords Lib AdWordSiteSuggestion Class
 class AdWordCityTargets AdWords Lib AdWordCityTargets Class
 class AdWordMetroTargets AdWords Lib AdWordMetroTargets Class
 class AdWordRegionTargets AdWords Lib AdWordRegionTargets Class
 class AdWordDemographicsTarget AdWords Lib AdWordDemographicsTarget Class
 class AdWordKeywordEstimate AdWords Lib AdWordKeywordEstimate Class
 class AdWordKeywordRequest AdWords Lib AdWordKeywordRequest Class
Method Summary
 AdWordObject AdWordObject ([array $row = array()])
 mixed get (string $field)
 array getRow ()
 string getXML ()
 bool isEmpty ()
 void remove (string $field)
 void set (string $field, mixed $value)
 void setRow (array $array)
Methods

AdWordObject Constructor. It takes one optional parameter - array to set all AdWords data type fields

  • access: public
AdWordObject AdWordObject ([array $row = array()])
  • array $row: array with all AdWords data type fields

Returns the value of a field

Example:

  1.  <?php
  2.  $obj new AdWordObject(array($field => $value));
  3.  $value $obj->get($field);
  4.  ?>

  • return: the value of the field or NULL if there is no field with such name
  • access: public
mixed get (string $field)
  • string $field: field name

Returns all AdWords data type fields

Example:

  1.  <?php
  2.  $obj new AdWordObject(array($field => $value));
  3.  $array $obj->getRow()// returns array($field => $value)
  4.  ?>

  • return: which holds the data for an AdWords data type
  • access: public
array getRow ()

Returns the AdWords data type in XML format If the object is empty returns empty string

Example:

  1.  <?php
  2.  $obj new AdWordObject(array($field => $value));
  3.  $xml $obj->getXML()// returns string '<field>value</field>'
  4.  ?>

  • return: the AdWords data type in XML format
  • access: public
string getXML ()

Redefined in descendants as:

Checks if the object is empty An object is empty if it doesn't have any fields

Example:

  1.  <?php
  2.  $obj new AdWordObject();
  3.  $bool $obj->isEmpty()// $bool = true;
  4.  $obj->set($field$value);
  5.  $bool $obj->isEmpty()// $bool = false;
  6.  ?>

  • return: true if the object is empty, false otherwise
  • access: public
bool isEmpty ()

Removes a field from this object

  • access: public
void remove (string $field)
  • string $field: field name

Sets the value a field

Example:

  1.  <?php
  2.  $obj new AdWordObject();
  3.  $obj->set($field$value);
  4.  ?>

  • access: public
void set (string $field, mixed $value)
  • string $field: the name of the field
  • mixed $value: value of the field

Redefined in descendants as:

Sets all AdWords data type fields.

If the input parameter is not an array the object will be emptied.

Example:

  1.  <?php
  2.  $obj new AdWordObject();
  3.  $obj->setRow($array)// $array is an array which holds the data we want to set.
  4.  ?>

  • access: public
void setRow (array $array)
  • array $array: which holds the needed information for a definite AdWords data type

Redefined in descendants as:

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