ultimix

- Main Page
- Data Structures
- Files
- Examples

- Data Structures
- Data Structure Index
- Data Fields

Public Member Functions | Data Fields
sape_site_api_1_0_0 Class Reference

## Public Member Functions
| __construct ()
| get_sites ()
| get_site_money_stats ($SiteId, $Year=false, $Month=false, $Day=false)
| get_site_pages ($SiteId)
| get_site_links ($SiteId, $Status=false)

## Data Fields
| $SapeCommonApi = false
| $SapeUtilities = false
| $Security = false

## Detailed Description

Class provides integration with the Sape system.

Author
  Dodonov A.A.

Definition at line 26 of file sape_site_api.php.

## Constructor & Destructor Documentation

__construct | ( |  | ) |

Constructor.

Exceptions

  Exception | An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 56 of file sape_site_api.php.

{
try
{
$this->SapeCommonApi = get_package( 'sape::sape_common_api' , 'last' , __FILE__ );
$this->SapeUtilities = get_package( 'sape::sape_utilities' , '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

get_site_links | ( |  | $SiteId,
|  |  | $Status = `false`
| ) |  |

Function returns a list of links.

Parameters

  $SiteId | - Site's id.
  $Status | - Status.

Returns
  A list of links.

Exceptions

  Exception | An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 279 of file sape_site_api.php.

{
try
{
$SiteId = $this->Security->get( $SiteId , 'string' );
$Parameters = array( new xmlrpcval( $SiteId , 'int' ) );
if( $Status !== false )
{
$Status = $this->Security->get( $Status , 'command' );
$Parameters [] = new xmlrpcval( $Status , 'string' );
}
$Response = $this->SapeUtilities->call_method(
$this->SapeCommonApi->Client , 'sape.get_site_links' , $Parameters , 'Can\'t get site links'
);
return( php_xmlrpc_decode( $Response->value() ) );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

get_site_money_stats | ( |  | $SiteId,
|  |  | $Year = `false`,
|  |  | $Month = `false`,
|  |  | $Day = `false`
| ) |  |

Function returns site money.

Parameters

  $SiteId | - Site's id.
  $Year | - Year.
  $Month | - Month.
  $Day | - Day.

Returns
  Site money.

Exceptions

  Exception | An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 192 of file sape_site_api.php.

{
try
{
$Parameters = $this->get_site_money_stats_parameters( $SiteId , $Year , $Month , $Day );
$Method = 'sape.get_site_money_stats';
$Response = $this->SapeUtilities->call_method(
$this->SapeCommonApi->Client , $Method , $Parameters , 'Can\'t get site money stats'
);
return( php_xmlrpc_decode( $Response->value() ) );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

get_site_pages | ( |  | $SiteId | ) |

Function returns a list of pages.

Parameters

  $SiteId | - Site's id.

Returns
  A list of pages.

Exceptions

  Exception | An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 233 of file sape_site_api.php.

{
try
{
$SiteId = $this->Security->get( $SiteId , 'integer' );
$Parameters = array( new xmlrpcval( $SiteId , 'int' ) );
$Response = $this->SapeUtilities->call_method(
$this->SapeCommonApi->Client , 'sape.get_site_pages' , $Parameters , 'Can\'t get site pages'
);
return( php_xmlrpc_decode( $Response->value() ) );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

get_sites | ( |  | ) |

Function returns a list of sites.

Returns
  A list of sites.

Exceptions

  Exception | An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 88 of file sape_site_api.php.

{
try
{
$Response = $this->SapeUtilities->call_method(
$this->SapeCommonApi->Client , 'sape.get_sites' , array() , 'Can\'t get sites'
);
return( php_xmlrpc_decode( $Response->value() ) );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

## Field Documentation

$SapeCommonApi = false

Cached packages.

Author
  Dodonov A.A.

Definition at line 38 of file sape_site_api.php.

$SapeUtilities = false

Definition at line 39 of file sape_site_api.php.

$Security = false

Definition at line 40 of file sape_site_api.php.

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

- packages/sape/packages/sape_site_api/sape_site_api.php