1: <?php
2:
3: namespace SMSApi\Api;
4:
5: 6: 7: 8:
9: class UserFactory extends ActionFactory {
10:
11: 12: 13:
14: public function actionList() {
15: $action = new \SMSApi\Api\Action\User\UserList();
16: $action->client( $this->client );
17: $action->proxy( $this->proxy );
18:
19: return $action;
20: }
21:
22: 23: 24: 25:
26: public function actionAdd( $username = null ) {
27: $action = new \SMSApi\Api\Action\User\Add();
28: $action->client( $this->client );
29: $action->proxy( $this->proxy );
30:
31: if ( !empty( $username ) ) {
32: $action->setUsername( $username );
33: }
34:
35: return $action;
36: }
37:
38: 39: 40: 41:
42: public function actionEdit( $username = null ) {
43: $action = new \SMSApi\Api\Action\User\Edit();
44: $action->client( $this->client );
45: $action->proxy( $this->proxy );
46:
47: if ( !empty( $username ) ) {
48: $action->filterByUsername( $username );
49: }
50:
51: return $action;
52: }
53:
54: 55: 56: 57:
58: public function actionGet( $username = null ) {
59: $action = new \SMSApi\Api\Action\User\Get();
60: $action->client( $this->client );
61: $action->proxy( $this->proxy );
62:
63: if ( !empty( $username ) ) {
64: $action->filterByUsername( $username );
65: }
66:
67: return $action;
68: }
69:
70: 71: 72:
73: public function actionGetPoints() {
74: $action = new \SMSApi\Api\Action\User\GetPoints();
75: $action->client( $this->client );
76: $action->proxy( $this->proxy );
77:
78: return $action;
79: }
80:
81: }
82: