REST::__construct PHP Method

__construct() public method

包体格式,可填值:json 、xml
public __construct ( $ServerIP, $ServerPort, $SoftVersion, $BodyType = 'xml' )
    public function __construct($ServerIP, $ServerPort, $SoftVersion, $BodyType = 'xml')
    {
        $this->Batch = date('YmdHis');
        $this->ServerIP = $ServerIP;
        $this->ServerPort = $ServerPort;
        $this->SoftVersion = $SoftVersion;
        if (in_array($BodyType, ['xml', 'json'])) {
            $this->BodyType = $BodyType;
        }
    }

Usage Example

Example #1
0
 public function __construct()
 {
     parent::__construct();
     // Init parent contructor
     include_once '../database.php';
     $this->db = $db;
 }
All Usage Examples Of REST::__construct