60 $this->SapeUtilities =
get_package(
'sape::sape_utilities' ,
'last' , __FILE__ );
61 $this->Security =
get_package(
'security' ,
'last' , __FILE__ );
89 $this->Client = $this->Client->get_xml_rpc_client(
'api.sape.ru' ,
'/xmlrpc/' );
119 function login( $Login , $PasswordHash )
123 $Login = $this->Security->get( $Login ,
'string' );
124 $PasswordHash = $this->Security->get( $PasswordHash ,
'string' );
127 new xmlrpcval( $Login ,
'string' ) ,
new xmlrpcval( $PasswordHash ,
'string' ) ,
128 new xmlrpcval(
true ,
'boolean' )
131 $Response = $this->SapeUtilities->call_method(
132 $this->Client ,
'sape.login' , $Parameters ,
'Can\'t login to Sape'
135 $Cookies = $Response->cookies();
137 $this->Client->setcookie(
'SAPE' , $Cookies[
'SAPE' ][
'value' ] , $Cookies[
'SAPE' ][
'path' ] );
139 catch( Exception $e )