phpcakephpcakephp-helper

cakePHP- PieChart Helper class


I am trying to make use of this Helper class, which was written for earlier version of cake.. It seems that it makes use of the vendor() method to use a third party class, but now that method is deprecated. I am trying to use the following in the helper class to include the third party class called eq_pie.class.php:

App::import('Vendor', 'eq_pie' );

I placed the third party class in the app/vendor folder(which im not sure if its correct) The helper class makes use of it like so

    //vendor('class_eq_pie'); Now commented out.. 

    $this->eq_pie = new eq_pie; //generates error

I get this error: Error: Class 'eq_pie' not found , which means that the third party class is not being included.

What am I missing here? Thanks in advance


Solution

  • Ok, Fellow cakePHP new users... make sure to follow your version's of cake conventions.. the problem was that my current version(2x) expects class names and their respective files to be camelCased rather than underscored..

    Fromeq_pie, I changed the class name to EqPieClass, and file toEqPieClass.php. Reference doc here : Class Conventions if you run into trouble. Best of luck