We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 here.

Fatal error: Class 'Vokuro\Amazon\SoapClient' not found in on line 236

Sorry for my english, I resolve this error as 'Vokuro \ Amazon \ SoapClient' not found in on line 236, apparently confused Phalcon SoapClient like a class project.

Because you missed the libraries that are not including in the Vokuro sample project.

You need to create a composer.json file in your root project likes this:


    "require": {
        "swiftmailer/swiftmailer" : "@stable",
        "elasticsearch/elasticsearch" : "~1.0",
        "aws/aws-sdk-php": "2.4.*@dev"

and add a file called composer.phar in the same place with composer.json

then you should run this command to automatically get the libraries that defined in your composer.json

php composer.phar install

For more infomation, please visit this link: https://getcomposer.org/doc/00-intro.md

edited Nov '14

I'm trying to get data with the following code, I am using this class https://github.com/Exeu/Amazon-ECS-PHP-Library/blob/master/lib/AmazonECS.class.php, works perfect've tried in localhost, but when I work with Phalcon not work, Phalcon SoapClient think is one of his classes but we know that is an extension for PHP that returns me the error 'Class 'Vokuro\Amazon\SoapClient' not found'. this is my code:

$amazonEcs = new Amazon\Amazon('XXXXXXXXXX', 'XXXXXXXXXXX','com', 'XXXXXXX');
$response = $amazonEcs->category('FashionWomen')->responseGroup('Large')->search("victoria's secret")

and have registered the class

        "Library\Amazon"         => "library/amazon/amazon.php",

edited Nov '14

The solution was to place the class in a folder off the application at the same height and the loader vendor so register

should be so lib/AmazonECS.class.php

in loader.php

$loader-> registerNamespaces (array ('AmazonECS' => "lib /")); 

and controller

use AmazonECS ;

and I can use it this way

$amazonEcs = new AmazonECS ('XXXXXXXX', 'XXXXXXXX', 'com', 'XXXXX');