html — проблема с загрузкой PHP класса в одном проекте

Кто-то может помочь мне в вопросе обращения к файлам php внутри одного и того же проекта (вызов классов) с использованием «namespace», «use» (php v5.3 или выше) [My Screenshoot] [http://i.imgur.com/6GC4UUK.png?1]

Zoho\
CRM\
Common\
-HttpClientInterface.php
Config\
Entities\
Exception\
Request\
Wrapper\
index.php

Я читал об автозагрузке классов, но не очень хорошо понимаю

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;
}

Это мой файл класса:

<?php namespace Zoho\CRM\Common;

/**
* Common interface for Http clients
*
* @package Zoho\CRM\Common
* @version 1.0.0
*/
interface HttpClientInterface
{
/**
* Performs POST request.
*
* @param string $uri Direction to make the post
* @param string $postBody Post data
*/
public function post($uri, $postBody);
}

0

Решение

Задача ещё не решена.

Другие решения

Других решений пока нет …

По вопросам рекламы ammmcru@yandex.ru
Adblock
detector