diff --git a/module/VuFindHttp/Module.php b/module/VuFindHttp/Module.php index 472f3c95c77d2db8f8075e57039800d34e98fd78..dae3844389535a4f87705f0c0a96602cef9c3b64 100644 --- a/module/VuFindHttp/Module.php +++ b/module/VuFindHttp/Module.php @@ -20,8 +20,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * @category Proxy - * @package Service + * @category VuFind2 + * @package Http * @author David Maus <maus@hab.de> * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link https://github.com/dmj/vf2-proxy @@ -32,8 +32,8 @@ namespace VuFindHttp; /** * ZF2 module definition for the VF2 HTTP service. * - * @category Proxy - * @package Service + * @category VuFind2 + * @package Http * @author David Maus <maus@hab.de> * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link https://github.com/dmj/vf2-proxy diff --git a/module/VuFindHttp/src/VuFindHttp/HttpService.php b/module/VuFindHttp/src/VuFindHttp/HttpService.php index 27d408c6df56160063958373a3a9864323d9983c..49366ed05873a3386518166ba88c4eeeabba234e 100644 --- a/module/VuFindHttp/src/VuFindHttp/HttpService.php +++ b/module/VuFindHttp/src/VuFindHttp/HttpService.php @@ -20,8 +20,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * @category Http - * @package Service + * @category VuFind2 + * @package Http * @author David Maus <maus@hab.de> * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link https://github.com/dmj/vf2-HTTP @@ -32,8 +32,8 @@ namespace VuFindHttp; /** * VuFind HTTP service. * - * @category Http - * @package Service + * @category VuFind2 + * @package Http * @author David Maus <maus@hab.de> * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link https://github.com/dmj/vf2-search-subsystem @@ -119,7 +119,8 @@ class HttpService implements HttpServiceInterface $url .= '?' . $query; } } - $client = $this->createClient($url, \Zend\Http\Request::METHOD_GET, $timeout); + $client + = $this->createClient($url, \Zend\Http\Request::METHOD_GET, $timeout); return $this->send($client); } @@ -133,11 +134,15 @@ class HttpService implements HttpServiceInterface * * @return \Zend\Http\Response */ - public function post ($url, $body = null, $type = 'application/octet-stream', $timeout = null) - { - $client = $this->createClient($url, \Zend\Http\Request::METHOD_POST, $timeout); + public function post ($url, $body = null, $type = 'application/octet-stream', + $timeout = null + ) { + $client + = $this->createClient($url, \Zend\Http\Request::METHOD_POST, $timeout); $client->setRawBody($body); - $client->setHeaders(array('Content-Type' => $type, 'Content-Length' => strlen($body))); + $client->setHeaders( + array('Content-Type' => $type, 'Content-Length' => strlen($body)) + ); return $this->send($client); } @@ -163,8 +168,9 @@ class HttpService implements HttpServiceInterface * * @return void */ - public function setDefaultAdapter(\Zend\Http\Client\Adapter\AdapterInterface $adapter) - { + public function setDefaultAdapter( + \Zend\Http\Client\Adapter\AdapterInterface $adapter + ) { $this->defaultAdapter = $adapter; } @@ -177,8 +183,9 @@ class HttpService implements HttpServiceInterface * * @return \Zend\Http\Client */ - public function createClient ($url = null, $method = \Zend\Http\Request::METHOD_GET, $timeout = null) - { + public function createClient ($url = null, + $method = \Zend\Http\Request::METHOD_GET, $timeout = null + ) { $client = new \Zend\Http\Client(); $client->setMethod($method); if (null !== $this->defaultAdapter) { diff --git a/module/VuFindHttp/src/VuFindHttp/HttpServiceAwareInterface.php b/module/VuFindHttp/src/VuFindHttp/HttpServiceAwareInterface.php index 16153250787d9f2caa42e4c886644e2bf8a89747..8c7c323961a51e6855a16216cbf4f0e8ce09f4a7 100644 --- a/module/VuFindHttp/src/VuFindHttp/HttpServiceAwareInterface.php +++ b/module/VuFindHttp/src/VuFindHttp/HttpServiceAwareInterface.php @@ -20,8 +20,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * @category Http - * @package Service + * @category VuFind2 + * @package Http * @author David Maus <maus@hab.de> * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link https://github.com/dmj/vf2-proxy @@ -32,8 +32,8 @@ namespace VuFindHttp; /** * Marker interface for HTTP service aware classes. * - * @category Http - * @package Service + * @category VuFind2 + * @package Http * @author David Maus <maus@hab.de> * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link https://github.com/dmj/vf2-proxy diff --git a/module/VuFindHttp/src/VuFindHttp/HttpServiceInterface.php b/module/VuFindHttp/src/VuFindHttp/HttpServiceInterface.php index 456f59f938b39bb9267d9d5fd2a481f100783ae0..b6e25e94e294c76470afb8b2ce3d5d33067cd0a3 100644 --- a/module/VuFindHttp/src/VuFindHttp/HttpServiceInterface.php +++ b/module/VuFindHttp/src/VuFindHttp/HttpServiceInterface.php @@ -20,8 +20,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * @category Http - * @package Service + * @category VuFind2 + * @package Http * @author David Maus <maus@hab.de> * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link https://github.com/dmj/vf2-proxy @@ -32,8 +32,8 @@ namespace VuFindHttp; /** * VuFind HTTP service interface definition. * - * @category Http - * @package Service + * @category VuFind2 + * @package Http * @author David Maus <maus@hab.de> * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link https://github.com/dmj/vf2-proxy @@ -74,7 +74,9 @@ interface HttpServiceInterface * * @return \Zend\Http\Response */ - public function post ($url, $body = null, $type = 'application/octet-stream', $timeout = null); + public function post ($url, $body = null, $type = 'application/octet-stream', + $timeout = null + ); /** * Post form data. @@ -96,6 +98,8 @@ interface HttpServiceInterface * * @return \Zend\Http\Client */ - public function createClient ($url, $method = \Zend\Http\Request::METHOD_GET, $timeout = null); + public function createClient ($url, $method = \Zend\Http\Request::METHOD_GET, + $timeout = null + ); } \ No newline at end of file