Overview

Namespaces

  • SMSApi
    • Api
      • Action
        • Mms
        • Phonebook
        • Sender
        • Sms
        • User
        • Vms
      • Response
    • Exception
    • Proxy
      • Http

Classes

  • ContactAdd
  • ContactDelete
  • ContactEdit
  • ContactGet
  • ContactList
  • GroupAdd
  • GroupDelete
  • GroupEdit
  • GroupGet
  • GroupList
  • Overview
  • Namespace
  • Class
  • Tree
 1: <?php
 2: 
 3: namespace SMSApi\Api\Action\Phonebook;
 4: 
 5: use SMSApi\Api\Action\AbstractAction;
 6: use SMSApi\Proxy\Uri;
 7: 
 8: /**
 9:  * Class ContactGet
10:  * @package SMSApi\Api\Action\Phonebook
11:  */
12: class ContactGet extends AbstractAction {
13: 
14:     /**
15:      * @param $data
16:      * @return \SMSApi\Api\Response\ContactResponse
17:      */
18:     protected function response( $data ) {
19: 
20:         return new \SMSApi\Api\Response\ContactResponse( $data );
21:     }
22: 
23:     /**
24:      * @return Uri
25:      */
26:     public function uri() {
27: 
28:         $query = "";
29: 
30:         $query .= $this->paramsLoginToQuery();
31: 
32:         $query .= $this->paramsOther();
33: 
34:         return new Uri( $this->proxy->getProtocol(), $this->proxy->getHost(), $this->proxy->getPort(), "/api/phonebook.do", $query );
35:     }
36: 
37:     /**
38:      * @deprecated since v1.0.0
39:      */
40:     public function setContact( $number ) {
41:         return $this->filterByPhoneNumber( $number );
42:     }
43: 
44:     /**
45:      * Set filter by contact phone number.
46:      *
47:      * @param string|int $number phone number
48:      * @return $this
49:      */
50:     public function filterByPhoneNumber( $number ) {
51:         $this->params[ "get_contact" ] = $number;
52:         return $this;
53:     }
54: 
55: }
SMSAPI api client API documentation generated by ApiGen 2.8.0