YandexCampaignTable extends AdvEntity
Class YandexCampaignTable
Local mirror for Yandex.Direct campaigns
Fields:
- ID int mandatory
- ENGINE_ID int mandatory
- XML_ID string(255) mandatory
- LAST_UPDATE datetime optional
- SETTINGS string optional
Table of Contents
Constants
- CACHE_LIFETIME = 3600
- ENGINE = 'yandex_direct'
- MONEY_WARN_PLACE_INTERVAL_DEFAULT = 30
- MONEY_WARNING_VALUE_DEFAULT = 20
- STRATEGY_AVERAGE_CLICK_PRICE = 'AverageClickPrice'
- STRATEGY_WEEKLY_BUDGET = 'WeeklyBudget'
- STRATEGY_WEEKLY_PACKET_OF_CLICKS = 'WeeklyPacketOfClicks'
Properties
- $allowedMoneyWarningInterval : mixed
- $allowedWarnPlaceIntervalValues : mixed
- $strategyConfig : mixed
- $supportedStrategy : mixed
Methods
- createCollection() : EO_YandexCampaign_Collection
- createObject() : EO_YandexCampaign
- getById() : EO_YandexCampaign_Result
- getByPrimary() : EO_YandexCampaign_Result
- getEngine() : YandexDirect|null
- Returns link to transport engine object.
- getEntity() : EO_YandexCampaign_Entity
- getFilePath() : string
- Returns path to the file which contains definition of the class.
- getList() : EO_YandexCampaign_Result
- getTableName() : string
- Returns DB table name for entity
- onAfterDelete() : void
- Deletes all campaign banners.
- onBeforeAdd() : EventResult
- Makes fields validation and adds new Yandex.Direct campaign.
- onBeforeUpdate() : EventResult
- Makes fields validation and updates Yandex.Direct campaign.
- onDelete() : void
- Deletes Yandex.Direct campaign.
- query() : EO_YandexCampaign_Query
- wakeUpCollection() : EO_YandexCampaign_Collection
- wakeUpObject() : EO_YandexCampaign
Constants
CACHE_LIFETIME
public
mixed
CACHE_LIFETIME
= 3600
ENGINE
public
mixed
ENGINE
= 'yandex_direct'
MONEY_WARN_PLACE_INTERVAL_DEFAULT
public
mixed
MONEY_WARN_PLACE_INTERVAL_DEFAULT
= 30
MONEY_WARNING_VALUE_DEFAULT
public
mixed
MONEY_WARNING_VALUE_DEFAULT
= 20
STRATEGY_AVERAGE_CLICK_PRICE
public
mixed
STRATEGY_AVERAGE_CLICK_PRICE
= 'AverageClickPrice'
STRATEGY_WEEKLY_BUDGET
public
mixed
STRATEGY_WEEKLY_BUDGET
= 'WeeklyBudget'
STRATEGY_WEEKLY_PACKET_OF_CLICKS
public
mixed
STRATEGY_WEEKLY_PACKET_OF_CLICKS
= 'WeeklyPacketOfClicks'
Properties
$allowedMoneyWarningInterval
public
static mixed
$allowedMoneyWarningInterval
= array(1, 50)
$allowedWarnPlaceIntervalValues
public
static mixed
$allowedWarnPlaceIntervalValues
= array(15, 30, 60)
$strategyConfig
public
static mixed
$strategyConfig
= array(self::STRATEGY_WEEKLY_BUDGET => array('WeeklySumLimit' => array('type' => 'float', 'mandatory' => true), 'MaxPrice' => array('type' => 'float', 'mandatory' => false)), self::STRATEGY_WEEKLY_PACKET_OF_CLICKS => array('ClicksPerWeek' => array('type' => 'int', 'mandatory' => true), 'MaxPrice' => array('type' => 'float', 'mandatory' => false), 'AveragePrice' => array('type' => 'float', 'mandatory' => false)), self::STRATEGY_AVERAGE_CLICK_PRICE => array('AveragePrice' => array('type' => 'float', 'mandatory' => true), 'WeeklySumLimit' => array('type' => 'float', 'mandatory' => false)))
$supportedStrategy
public
static mixed
$supportedStrategy
= array("WEEKLY_BUDGET" => self::STRATEGY_WEEKLY_BUDGET, "WEEKLY_PACKET_OF_CLICKS" => self::STRATEGY_WEEKLY_PACKET_OF_CLICKS, "AVERAGE_CLICK_PRICE" => self::STRATEGY_AVERAGE_CLICK_PRICE)
Methods
createCollection()
public
static createCollection() : EO_YandexCampaign_Collection
Return values
EO_YandexCampaign_CollectioncreateObject()
public
static createObject([mixed $setDefaultValues = = 'true' ]) : EO_YandexCampaign
Parameters
- $setDefaultValues : mixed = = 'true'
Return values
EO_YandexCampaigngetById()
public
static getById(mixed $id) : EO_YandexCampaign_Result
Parameters
- $id : mixed
Return values
EO_YandexCampaign_ResultgetByPrimary()
public
static getByPrimary(mixed $primary[, array<string|int, mixed> $parameters = = '[]' ]) : EO_YandexCampaign_Result
Parameters
- $primary : mixed
- $parameters : array<string|int, mixed> = = '[]'
Return values
EO_YandexCampaign_ResultgetEngine()
Returns link to transport engine object.
public
static getEngine() : YandexDirect|null
Return values
YandexDirect|nullgetEntity()
public
static getEntity() : EO_YandexCampaign_Entity
Return values
EO_YandexCampaign_EntitygetFilePath()
Returns path to the file which contains definition of the class.
public
static getFilePath() : string
Return values
stringgetList()
public
static getList([array<string|int, mixed> $parameters = = '[]' ]) : EO_YandexCampaign_Result
Parameters
- $parameters : array<string|int, mixed> = = '[]'
Return values
EO_YandexCampaign_ResultgetTableName()
Returns DB table name for entity
public
static getTableName() : string
Return values
stringonAfterDelete()
Deletes all campaign banners.
public
static onAfterDelete(Event $event) : void
Parameters
- $event : Event
-
Event data.
Tags
onBeforeAdd()
Makes fields validation and adds new Yandex.Direct campaign.
public
static onBeforeAdd(Event $event) : EventResult
Parameters
- $event : Event
-
Event data.
Tags
Return values
EventResultonBeforeUpdate()
Makes fields validation and updates Yandex.Direct campaign.
public
static onBeforeUpdate(Event $event) : EventResult
Parameters
- $event : Event
-
Event data.
Tags
Return values
EventResultonDelete()
Deletes Yandex.Direct campaign.
public
static onDelete(Event $event) : void
Parameters
- $event : Event
-
Event data.
Tags
query()
public
static query() : EO_YandexCampaign_Query
Return values
EO_YandexCampaign_QuerywakeUpCollection()
public
static wakeUpCollection(mixed $rows) : EO_YandexCampaign_Collection
Parameters
- $rows : mixed
Return values
EO_YandexCampaign_CollectionwakeUpObject()
public
static wakeUpObject(mixed $row) : EO_YandexCampaign
Parameters
- $row : mixed