PHP Classes

Using with composer example missing

Recommend this page to a friend!

      PHP HTTP protocol client  >  All threads  >  Using with composer example missing  >  (Un) Subscribe thread alerts  
Subject:Using with composer example missing
Summary:I am trying to goes speedy, but I stopped soon
Messages:3
Author:Daniele Cruciani
Date:2014-08-29 15:50:32
 

  1. Using with composer example missing   Reply   Report abuse  
Picture of Daniele Cruciani Daniele Cruciani - 2014-08-29 15:50:32
I did

require 'vendor/autoload.php';

$http = new phpclasses\http_client();

no.

new http_client();

no.

new ...

well, it would be great to have an example

  2. Re: Using with composer example missing   Reply   Report abuse  
Picture of Daniele Cruciani Daniele Cruciani - 2014-08-29 15:56:09 - In reply to message 1 from Daniele Cruciani
new http_client(); actually worked
no namespace, i do not like it, but ok.


  3. Re: Using with composer example missing   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2014-08-30 03:24:43 - In reply to message 1 from Daniele Cruciani
Yes, that class does not require namespaces because it is meant to work with PHP versions before namespaces where supported.