ultimix

- Main Page
- Data Structures
- Files
- Examples

- Data Structures
- Data Structure Index
- Data Fields

Public Member Functions | Data Fields
ad_banner_algorithms_1_0_0 Class Reference

## Public Member Functions
| __construct ()
| select_for_campaign ($cid)
| select_for_creator ($uid, $Start=false, $Limit=false, $CampaignId=false)

## Data Fields
| $AdBannerAccess = false
| $Database = false
| $DatabaseAlgorithms = false
| $Security = false

## Detailed Description

Class provides routine for ad banners.

Author
  Dodonov A.A.

Definition at line 26 of file ad_banner_algorithms.php.

## Constructor & Destructor Documentation

__construct | ( |  | ) |

Constructor.

Author
  Dodonov A.A.

Definition at line 53 of file ad_banner_algorithms.php.

{
try
{
$this->AdBannerAccess = get_package( 'ad::ad_banner::ad_banner_access' , 'last' , __FILE__ );
$this->Database = get_package( 'database' , 'last' , __FILE__ );
$this->DatabaseAlgorithms = get_package( 'database::database_algorithms' , 'last' , __FILE__ );
$this->Security = get_package( 'security' , 'last' , __FILE__ );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

## Member Function Documentation

select_for_campaign | ( |  | $cid | ) |

Selecting records.

Parameters

  $cid | - id campaign.

Returns
  Array of objects.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 90 of file ad_banner_algorithms.php.

{
try
{
$cid = $this->Security->get( $cid , 'integer_list' );
return( $this->AdBannerAccess->unsafe_select( "campaign_id IN ( $cid )" ) );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

select_for_creator | ( |  | $uid,
|  |  | $Start = `false`,
|  |  | $Limit = `false`,
|  |  | $CampaignId = `false`
| ) |  |

Selecting records.

Parameters

  $uid | - id of the creator.
  $Start | - Query limitations.
  $Limit | - Query limitations.
  $CampaignId | - Campaign's id.

Returns
  Array of objects.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 186 of file ad_banner_algorithms.php.

{
try
{
$uid = $this->Security->get( $uid , 'integer_list' );
$Limitation = '';
if( $Start !== false && $Limit !== false )
{
$Start = $this->Security->get( $Start , 'integer' );
$Limit = $this->Security->get( $Limit , 'integer' );
$Limitation = " LIMIT $Start , $Limit";
}
$AddCondition = '';
if( $CampaignId !== false )
{
$AddCondition = " AND umx_ad_campaign.id = ".$this->Security->get( $CampaignId , 'integer' );
}
return( $this->fetch_records( $uid , $AddCondition , $Limitation ) );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

## Field Documentation

$AdBannerAccess = false

Cached objects.

Author
  Dodonov A.A.

Definition at line 38 of file ad_banner_algorithms.php.

$Database = false

Definition at line 39 of file ad_banner_algorithms.php.

$DatabaseAlgorithms = false

Definition at line 40 of file ad_banner_algorithms.php.

$Security = false

Definition at line 41 of file ad_banner_algorithms.php.

The documentation for this class was generated from the following file:

- packages/ad/packages/ad_banner/packages/ad_banner_algorithms/ad_banner_algorithms.php