Yii Framework Forum: Errore Con Namespaces E Funzione Use - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Errore Con Namespaces E Funzione Use

#1 User is offline   andreapavan 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 7
  • Joined: 30-June 13

Posted 12 September 2013 - 04:15 PM

Hi guys,
i'm using ApaiIO library to read Amazon URL.

I followed the instructions to install e setup the composer.json, and all works perfectly on a external file (in my root dir on server). Now i need to import the library into my controller to use the funztions over there.
I setup my controller class with the same parameters but don't work. Namespaces incorrect?

This is my function into my controller:

protected function getAmazonPrice($url, $product_id) {		
		require_once "vendor/autoload.php";
		use ApaiIO\Configuration\GenericConfiguration;
		use ApaiIO\Operations\Search;
		use ApaiIO\ApaiIO;
		use ApaiIO\Operations\Lookup;
		$conf = new GenericConfiguration();

                ...

                return $price;
	}


Anyone can help me?
Thanks in advance
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users