Hello I'm working with cakephp and vogoo (a Recommendation Engine).
I'm trying to include the file vogoo.php into a Service controller for
service managing, also I tested if import worked properly so I
included a functionality of vogoo

function addRating(){
                App::import("Vendor", "Vogoo", 
array("file"=>"vogoo/vogoo.php"));
               $vogoo->set_rating(1, 3, 0.8); //This adds ratings to a
vogoo table in mysql, it's just a test to see if
                                                          //it worked
properly
}

But cake keeps telling me:" Undefined variable: vogoo". So then, I
tried testing if the import worked correctly.


function addRating(){
                //test to see if the import worked
               if(App::import("Vendor", "Vogoo", array("file"=>"vogoo/
vogoo.php"))){echo "It works"};

}

And it worked,

I checked vogoo.php and noticed that inside it instances an object
called vogoo ($vogoo = new vogoo_class($vg_dbhost,$vg_dbuser,
$vg_dbpasswd,$vg_dbname);)

So my doubts are: If vogoo.php instances an object called vogoo ¿why
can't I use it in my controller?, or am I calling it the wrong way?

Finally to make vogoo work on a common php file without cake it's used
this way

<?php
include('vogoo/vogoo.php');
$vogoo->set_rating(1, 3, 0.8);
?>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to