evseevnn-zz / php-cassandra-binary

PHP library for Cassandra database via a binary protocol.
http://evseevnn.github.io/php-cassandra-binary/
MIT License
69 stars 33 forks source link

Attempted to load class "Database" from namespace #69

Closed LeoLR closed 9 years ago

LeoLR commented 9 years ago

Hi,

I try to use the php cassandra binary, but i've some problems... I'm new on symfony and when i write :

$nodes = ['127.0.0.1']; $database = new evseevnn\Cassandra\Database($nodes, 'keyspace');

I've this error:

Attempted to load class "Database" from namespace "Projet\HomepageBundle\Controller\evseevnn\Cassandra". Did you forget a "use" statement for "evseevnn\Cassandra\Database"

If anyone have a idea?

Thanks!

TomK commented 9 years ago

Try putting a backslash before the fully qualified namespace:

$nodes = ['127.0.0.1'];
$database = new \evseevnn\Cassandra\Database($nodes, 'keyspace');
LeoLR commented 9 years ago

Thank you, that work's!

TomK commented 9 years ago

@LeoLR no problem, happy to help