Server IP : 192.64.118.117 / Your IP : 3.148.113.167 Web Server : LiteSpeed System : Linux premium56.web-hosting.com 4.18.0-513.24.1.lve.1.el8.x86_64 #1 SMP Thu May 9 15:10:09 UTC 2024 x86_64 User : thecgapy ( 1160) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/thecgapy/mobilecreationz.com/wp-content/plugins/googleanalytics/lib/ |
Upload File : |
<?php abstract class Ga_Lib_Api_Client { /** * Keeps error messages. * @var array */ protected $errors = array(); /** * Returns errors array. * @return array */ public function get_errors() { return $this->errors; } /** * Calls private API method from context client. * * @param $callback * @param $args * * @return Ga_Lib_Api_Response */ abstract function call_api_method( $callback, $args ); /** * Calls api methods. * * @param string $callback * @param mixed $args * * @return mixed */ public function call( $callback, $args = null ) { try { return $this->call_api_method( $callback, $args ); } catch ( Ga_Lib_Api_Client_Exception $e ) { $this->add_error( $e ); return new Ga_Lib_Api_Response( Ga_Lib_Api_Response::$empty_response ); } catch ( Ga_Lib_Api_Request_Exception $e ) { $this->add_error( $e ); return new Ga_Lib_Api_Response( Ga_Lib_Api_Response::$empty_response ); } catch ( Exception $e ) { $this->add_error( $e ); return new Ga_Lib_Api_Response( Ga_Lib_Api_Response::$empty_response ); } } /** * Prepares error data. * * @param Exception $e * */ protected function add_error( Exception $e ) { $this->errors[ $e->getCode() ] = array( 'class' => get_class( $e ), 'message' => $e->getMessage() ); } public function add_own_error( $code, $message, $class = '' ) { $this->errors[ $code ] = array( 'class' => $class, 'message' => $message ); } } class Ga_Lib_Api_Client_Exception extends Exception { }