Skip to content

Commit

Permalink
Merge pull request #18 from nguyenanhung/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
nguyenanhung authored Nov 10, 2018
2 parents bbde729 + 6cbe839 commit 50fd96d
Show file tree
Hide file tree
Showing 5 changed files with 208 additions and 61 deletions.
4 changes: 2 additions & 2 deletions src/Interfaces/ProjectInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
*/
interface ProjectInterface
{
const VERSION = '0.1.3.12';
const LAST_MODIFIED = '2018-11-07';
const VERSION = '0.1.3.13';
const LAST_MODIFIED = '2018-11-10';
const MIN_PHP_VERSION = '5.3';
const GET = 'GET';
const HEAD = 'HEAD';
Expand Down
29 changes: 17 additions & 12 deletions src/Interfaces/SendRequestsInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*/

namespace nguyenanhung\MyRequests\Interfaces;

/**
* Interface SendRequestsInterface
*
Expand All @@ -25,7 +26,7 @@ interface SendRequestsInterface
*
* @param array $headers
*
* @return mixed
* @return $this
*/
public function setHeader($headers = []);

Expand All @@ -37,7 +38,7 @@ public function setHeader($headers = []);
*
* @param array $cookies
*
* @return mixed
* @return $this
*/
public function setCookie($cookies = []);

Expand All @@ -49,7 +50,7 @@ public function setCookie($cookies = []);
*
* @param array $options
*
* @return mixed
* @return $this
*/
public function setOptions($options = []);

Expand All @@ -61,7 +62,7 @@ public function setOptions($options = []);
*
* @param int $timeout
*
* @return mixed
* @return $this
*/
public function setTimeout($timeout = 60);

Expand All @@ -73,7 +74,7 @@ public function setTimeout($timeout = 60);
*
* @param string $userAgent
*
* @return mixed
* @return $this
*/
public function setUserAgent($userAgent = '');

Expand All @@ -85,7 +86,7 @@ public function setUserAgent($userAgent = '');
*
* @param string $referrer
*
* @return mixed
* @return $this
*/
public function setReferrer($referrer = '');

Expand All @@ -97,7 +98,7 @@ public function setReferrer($referrer = '');
*
* @param bool $isBody
*
* @return mixed
* @return $this
*/
public function setUserBody($isBody = FALSE);

Expand All @@ -109,7 +110,7 @@ public function setUserBody($isBody = FALSE);
*
* @param bool $isXml
*
* @return mixed
* @return $this
*/
public function setRequestIsXml($isXml = FALSE);

Expand All @@ -121,7 +122,7 @@ public function setRequestIsXml($isXml = FALSE);
*
* @param bool $isJson
*
* @return mixed
* @return $this
*/
public function setRequestIsJson($isJson = FALSE);

Expand All @@ -133,7 +134,7 @@ public function setRequestIsJson($isJson = FALSE);
*
* @param bool $isSSL
*
* @return mixed
* @return $this
*/
public function setRequestIsSSL($isSSL = FALSE);

Expand All @@ -145,7 +146,7 @@ public function setRequestIsSSL($isSSL = FALSE);
*
* @param bool $errorResponseIsData Array Data if Response is Null if Error
*
* @return mixed
* @return $this
*/
public function setErrorResponseIsData($errorResponseIsData = FALSE);

Expand All @@ -157,7 +158,7 @@ public function setErrorResponseIsData($errorResponseIsData = FALSE);
*
* @param bool $errorResponseIsNull TRUE if Response is Null if Error
*
* @return mixed
* @return $this
*/
public function setErrorResponseIsNull($errorResponseIsNull = FALSE);

Expand All @@ -169,6 +170,8 @@ public function setErrorResponseIsNull($errorResponseIsNull = FALSE);
*
* @param string $username Username to be Authentication
* @param string $password Password to be Authentication
*
* @return $this
*/
public function setBasicAuthentication($username = '', $password = '');

Expand All @@ -180,6 +183,8 @@ public function setBasicAuthentication($username = '', $password = '');
*
* @param string $username Username to be Authentication
* @param string $password Password to be Authentication
*
* @return $this
*/
public function setDigestAuthentication($username = '', $password = '');

Expand Down
27 changes: 25 additions & 2 deletions src/Interfaces/SoapRequestInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*/

namespace nguyenanhung\MyRequests\Interfaces;

/**
* Interface SoapRequestInterface
*
Expand Down Expand Up @@ -37,6 +38,8 @@ interface SoapRequestInterface
* @time : 10/7/18 02:26
*
* @param string $endpoint Link to Url Endpoint
*
* @return $this
*/
public function setEndpoint($endpoint = '');

Expand All @@ -47,6 +50,8 @@ public function setEndpoint($endpoint = '');
* @time : 10/7/18 02:26
*
* @param array $data Data to SOAP Request, call
*
* @return $this
*/
public function setData($data = []);

Expand All @@ -57,6 +62,8 @@ public function setData($data = []);
* @time : 10/7/18 02:36
*
* @param string $callFunction Require Set Function to call SOAP endpoint
*
* @return $this
*/
public function setCallFunction($callFunction = '');

Expand All @@ -71,6 +78,8 @@ public function setCallFunction($callFunction = '');
* @param string $fieldResult If input fieldResult, result return $response[$fieldResult] f
* from Response SOAP Service
* Return Error Code if not find $fieldResult from Response
*
* @return $this
*/
public function setFieldResult($fieldResult = '');

Expand All @@ -83,7 +92,7 @@ public function setFieldResult($fieldResult = '');
*
* @param string $responseIsJson
*
* @return mixed|void if set value = TRUE, response is Json string
* @return mixed|$this if set value = TRUE, response is Json string
* @see clientRequestWsdl() method
*/
public function setResponseIsJson($responseIsJson = '');
Expand All @@ -96,7 +105,21 @@ public function setResponseIsJson($responseIsJson = '');
*
* @return array|null|string Call to SOAP request and received Response from Server
* Return is Json String if set setResponseIsJson(true)
* Return Null if class nguyenanhung\MyNuSOAP\nusoap_client is unavailable, class is not exists
* Return Null if class nguyenanhung\MyNuSOAP\nusoap_client is unavailable, class is not
* exists
*/
public function clientRequestWsdl();

/**
* Function clientRequestSOAP
*
* @author: 713uk13m <dev@nguyenanhung.com>
* @time : 11/10/18 11:15
*
* @return array|null|string Call to SOAP request and received Response from Server
* Return is Json String if set setResponseIsJson(true)
* Return Null if class nguyenanhung\MyNuSOAP\nusoap_client is unavailable, class is not
* exists
*/
public function clientRequestSOAP();
}
Loading

0 comments on commit 50fd96d

Please sign in to comment.