Tag Archives: pear

PEAR in lithium PHP

Googling for PEAR and Lithium PHP will inevitably lead you to their docs. This pretty much describes all you have to do. Just keep in mind a few things:

  1. You don’t have to use the above method. It’s only if you’d like to use the “use” keyword to load the classes. You can still easily import the files via include or require.
  2. To refer to a class you have to use the \. e.g. $cmonth = new \Calendar_Month_Weekdays($year, $month);
  3. Don’t forget to put PEAR in the libraries folder of your lithium installation. Don’t blindly follow the doc. Mine was in /usr/share/pear/ (on arch linux)