Welcome Guest, Not a member yet? Register   Sign In
Not able to use Zend class
#4

[eluser]jkevinburton[/eluser]
it all depends the kind of help you need... if you need help setting up your Zend for CI.

this is what I did.

Step 01: Make the Zend Library Accessible
I put the "Zend" folder in the folder: /assets/classes
In your index.php:
$my_include_folder = realpath(dirname(__FILE__)).'/assets/classes';
set_include_path(get_include_path() . PATH_SEPARATOR . $my_include_folder);

Step 01: Call the Zend Framework:
In your controller or whereever you need it:
require_once('Zend/Loader.php');

Step 03: Use your selected Zend classes:
Zend_Loader::loadClass('Zend_Gdata_HttpClient');

I am using YouTube API for Zend, so I use:
Zend_Loader::loadClass('Zend_Gdata_YouTube')

and then I use the code:

$youtube = new Zend_Gdata_YouTube();
$query = $youtube->newVideoQuery();
$query->videoQuery = 'cats';
$query->startIndex = 10;
$query->maxResults = 20;
$query->orderBy = 'viewCount';

$videoFeed = $youtube->getVideoFeed($query);


So, thats pretty much it.... IMPORTANT step is setting the include path to the parent of the Zend folder....

Cheers!


Messages In This Thread
Not able to use Zend class - by El Forum - 11-12-2009, 03:02 AM
Not able to use Zend class - by El Forum - 11-18-2009, 09:44 AM
Not able to use Zend class - by El Forum - 11-18-2009, 12:05 PM
Not able to use Zend class - by El Forum - 11-18-2009, 12:13 PM
Not able to use Zend class - by El Forum - 11-18-2009, 12:27 PM
Not able to use Zend class - by El Forum - 11-18-2009, 02:14 PM
Not able to use Zend class - by El Forum - 11-20-2009, 05:14 PM



Theme © iAndrew 2016 - Forum software by © MyBB