Answer the question
In order to leave comments, you need to log in
How to use namespace inside a method?
There is a class
class className extends abstractClass
{
protected function _methodName()
{
include_once (IA_INCLUDES . 'utils' . IA_DS . 'twitteroauth-master/autoload.php');
use Abraham\TwitterOAuth\TwitterOAuth;
$connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, OAUTH_TOKEN, OAUTH_SECRET);
}
}
Answer the question
In order to leave comments, you need to log in
Do not use at all, move use outside the class, where it should be .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question