optimaize/nameapi-client-php

Class 'ServiceFactory' not found

Opened this issue · 1 comments

i found: Class 'ServiceFactory' not found

my code:

require_once('org/nameapi/client/services/ServiceFactory.php');
use org\nameapi\ontology\input\context\Context;
use org\nameapi\ontology\input\context\Priority;
$context = Context::builder()
->place('US')
->priority(Priority::REALTIME())
->build();
$serviceFactory = new ServiceFactory('i put here my key prefix and suffix properly with hiphen',$context);

Adding this line before creating the $context fixed the issue for me:

use org\nameapi\client\services\ServiceFactory;