Overview

Namespaces

  • DocPlanner
    • SDK
      • Base
        • ServiceDescription
      • Core
      • Model
        • Doctor
        • Geo
        • User
        • Visit
  • PHP

Classes

  • Doctor
  • Geo
  • User
  • Visit
  • Overview
  • Namespace
  • Class
  • Tree
  1: <?php
  2: /**
  3:  * Author: Ɓukasz Barulski
  4:  * Date: 23.04.13 17:44
  5:  */
  6: namespace DocPlanner\SDK\Core;
  7: 
  8: use DocPlanner\SDK\Base\CoreBase;
  9: use DocPlanner\SDK\Base\Result;
 10: 
 11: /**
 12:  * Class Doctor
 13:  *
 14:  * @package DocPlanner\SDK\Core
 15:  */
 16: class Doctor extends CoreBase
 17: {
 18:     /**
 19:      * @param string|null $phrase
 20:      *
 21:      * @return Result|\DocPlanner\SDK\Model\Doctor\Categories[]|array
 22:      */
 23:     public function categories($phrase = null)
 24:     {
 25:         $this->parameter->add(['phrase' => $phrase]);
 26:         $result = $this->baseSDK->execute('doctor.categories', $this->parameter);
 27:         return $result;
 28:     }
 29: 
 30:     /**
 31:      * @param int $doctor_id
 32:      *
 33:      * @return Result|\DocPlanner\SDK\Model\Doctor\Calendars[]|array
 34:      */
 35:     public function calendars($doctor_id)
 36:     {
 37:         $this->parameter->add(['doctor_id' => $doctor_id]);
 38:         $result = $this->baseSDK->execute('doctor.calendars', $this->parameter);
 39:         return $result;
 40:     }
 41: 
 42:     /**
 43:      * @param null|string $phrase
 44:      * @param null|string $location
 45:      * @param null|int    $category_id
 46:      * @param null|string $mode
 47:      * @param null|float  $lat
 48:      * @param null|float  $lon
 49:      * @param null|int    $page
 50:      *
 51:      * @return Result|\DocPlanner\SDK\Model\Doctor\Search[]|array
 52:      */
 53:     public function search($phrase = null, $location = null, $category_id = null, $mode = null, $lat = null, $lon = null, $page = null)
 54:     {
 55:         $this->parameter->add([
 56:             'phrase'      => $phrase,
 57:             'location'    => $location,
 58:             'category_id' => $category_id,
 59:             'mode'        => $mode,
 60:             'lat'         => $lat,
 61:             'lon'         => $lon,
 62:             'page'        => $page
 63:         ]);
 64:         $result = $this->baseSDK->execute('doctor.search', $this->parameter);
 65:         return $result;
 66:     }
 67: 
 68:     /**
 69:      * @param int        $doctor_id
 70:      * @param null|float $lat
 71:      * @param null|float $lon
 72:      *
 73:      * @return \DocPlanner\SDK\Model\Doctor\Profile|array
 74:      */
 75:     public function profile($doctor_id, $lat = null, $lon = null)
 76:     {
 77:         $this->parameter->add(['doctor_id' => $doctor_id, 'lat' => $lat, 'lon' => $lon]);
 78:         $result = $this->baseSDK->execute('doctor.profile', $this->parameter);
 79:         return $result;
 80:     }
 81: 
 82:     /**
 83:      * @param int      $doctor_id
 84:      * @param null|int $page
 85:      *
 86:      * @return Result|\DocPlanner\SDK\Model\Doctor\Opinion[]|array
 87:      */
 88:     public function opinion($doctor_id, $page = null)
 89:     {
 90:         $this->parameter->add(['doctor_id' => $doctor_id, 'page' => $page]);
 91:         $result = $this->baseSDK->execute('doctor.opinion', $this->parameter);
 92:         return $result;
 93:     }
 94: 
 95:     /**
 96:      * @param int $doctor_id
 97:      *
 98:      * @return \DocPlanner\SDK\Model\Doctor\CanAddOpinion|array
 99:      */
100:     public function canAddOpinion($doctor_id)
101:     {
102:         $this->parameter->add(['doctor_id' => $doctor_id]);
103:         $result = $this->baseSDK->execute('doctor.canAddOpinion', $this->parameter);
104:         return $result;
105:     }
106: 
107:     /**
108:      * @param int    $doctor_id
109:      * @param string $comment
110:      * @param float  $rate
111:      * @param int    $duration
112:      * @param string $device
113:      *
114:      * @return \DocPlanner\SDK\Model\Doctor\AddOpinion|array
115:      */
116:     public function addOpinion($doctor_id, $comment, $rate, $duration, $device)
117:     {
118:         $this->parameter->add([
119:             'doctor_id' => $doctor_id,
120:             'comment'   => $comment,
121:             'rate'      => $rate,
122:             'duration'  => $duration,
123:             'device'    => $device
124:         ]);
125:         $result = $this->baseSDK->execute('doctor.addOpinion', $this->parameter);
126:         return $result;
127:     }
128: }
Docplanner API documentation generated by ApiGen 2.8.0