00001 <?php
00002
00015
00016
00017 define('AD_TYPE_CONTENT', 1);
00018 define('AD_TYPE_SIDEBAR', 2);
00019 define('AD_TYPE_MASTHEAD', 3);
00020
00021 class Ad extends DataObject {
00022 var $openAdsConnection;
00023
00028 function Ad(&$openAdsConnection) {
00029 $this->openAdsConnection =& $openAdsConnection;
00030 }
00031
00036 function getAdId() {
00037 return $this->getData('adId');
00038 }
00039
00044 function setAdId($adId) {
00045 $this->setData('adId', $adId);
00046 }
00047
00052 function getName() {
00053 return $this->getData('name');
00054 }
00055
00060 function setName($name) {
00061 $this->setData('name', $name);
00062 }
00063
00068 function getHtml() {
00069 return $this->openAdsConnection->getAdHtml($this->getAdId());
00070 }
00071 }
00072
00073 ?>