Overview

Namespaces

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

Classes

  • SMSApi\Proxy\Http\AbstractHttp
  • SMSApi\Proxy\Http\Curl
  • SMSApi\Proxy\Http\Native
  • Overview
  • Namespace
  • Class
 1: <?php
 2: //sms
 3: namespace SMSApi\Api;
 4: 
 5: /**
 6:  * Class SmsFactory
 7:  * @package SMSApi\Api
 8:  */
 9: class SmsFactory extends ActionFactory {
10: 
11:     /**
12:      * @return Action\Sms\Send
13:      */
14:     public function actionSend() {
15:         $action = new \SMSApi\Api\Action\Sms\Send();
16:         $action->client( $this->client );
17:         $action->proxy( $this->proxy );
18: 
19:         return $action;
20:     }
21: 
22:     /**
23:      * @param null $id
24:      * @return Action\Sms\Get
25:      * @throws \SMSApi\Exception\ActionException
26:      */
27:     public function actionGet( $id = null ) {
28:         $action = new \SMSApi\Api\Action\Sms\Get();
29:         $action->client( $this->client );
30:         $action->proxy( $this->proxy );
31: 
32:         if ( !empty( $id ) && is_string( $id ) ) {
33:             $action->filterById( $id );
34:         } else if ( !empty( $id ) && is_array( $id ) ) {
35:             $action->filterByIds( $id );
36:         }
37: 
38:         return $action;
39:     }
40: 
41:     /**
42:      * @param null $id
43:      * @return Action\Sms\Delete
44:      * @throws \SMSApi\Exception\ActionException
45:      */
46:     public function actionDelete( $id = null ) {
47:         $action = new \SMSApi\Api\Action\Sms\Delete();
48:         $action->client( $this->client );
49:         $action->proxy( $this->proxy );
50: 
51:         if ( !empty( $id ) && is_string( $id ) ) {
52:             $action->filterById( $id );
53:         }
54: 
55:         return $action;
56:     }
57: 
58: }
59: 
SMSAPI Api Client API documentation generated by ApiGen