-1

Someone could help me on the issue of referencing php files within the same project (calling classes) using "namespace","use" ( php v5.3 or higher) [My Screenshoot][https://i.stack.imgur.com/GpqTn.png

Fatal error: Class 'Zoho\CRM\Common\HttpClientInterface' not found in C:\root\zohocrm-master\src\Zoho\CRM\index.php on line 73

  <?php namespace Zoho\CRM;

    use Zoho\CRM\Common\HttpClientInterface;
    use Zoho\CRM\Common\FactoryInterface;
    use Zoho\CRM\Request\HttpClient;
    use Zoho\CRM\Request\Factory;
    use Zoho\CRM\Wrapper\Element;    
                    .
                    .
                    .

public function __construct($authtoken, HttpClientInterface $client =null , FactoryInterface $factory = null )
        {
            $this->authtoken = $authtoken;
            // Only XML format is supported for the time being
            $this->format = 'xml'; 


             $this->client = new HttpClientInterface();
            $this->factory = $factory ;
            $this->module = "Leads";
            return $this;
        }
  • Unfortunately, your download link is broken. Please add the relevant pieces of code here and let us know what you have already tried. – Chris Sep 12 '14 at 23:06

1 Answers1

0

Robinson, you are calling the class "Zoho\CRM\Common**HttpClientInterface**" from this position: "C:\root\zohocrm-master\src\Zoho\CRM**index.php**".

This means the way you are trying to use the namespace is not correct.

Remember, if you do:

use App\namespace\class_name

It means your class "class_name" has to be in a folder like this: App/namespace/. So define very well the path to your class when you are calling use.

ZooBoole
  • 31
  • 7