I'm trying to call the class 'evseevnn \ Cassandra \ Database' for that namespace without success. For this I rely on a similar case with the same architecture where I do.
The architecture is as follows,
myproject\
|
application\
|
core\
controller.php
----------
----------
|
vendor\
|
evseevnn\
|
cassandra\
|
src\
Database.php
This is the code snippet from controller.php,
use \evseevnn\Cassandra\Database as Database;
//require '../vendor/src/evseevnn/cassandra/Database.php';
class Controller
{
public $db = null;
public $model = null;
function __construct()
{
$this->openDatabaseConnection();
......
}
private function openDatabaseConnection()
{
$nodes = [
DB_HOST
];
$this->db = new Database($nodes, DB_DEFAULT_KEYSPACE);
$this->db->connect();
}
.......
.......
}
and for the file Database.php it would be as follows,
namespace evseevnn\Cassandra;
use ......
use ......
class Database {
......
......
}
Why, in the case of the same architecture and deployed in the same WAMP server, in one case it works and in the other does not?