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
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 )
{
}
}
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 )
{
}
}
| 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 )
{
}
}
| get_site_pages |
( |
|
$SiteId | ) |
|
Function returns a list of pages.
- Parameters
-
- 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 )
{
}
}
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 )
{
}
}
Field Documentation
The documentation for this class was generated from the following file: