CodeIgniter Forums
Using Zend Framework with CodeIgniter - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Using Zend Framework with CodeIgniter (/showthread.php?tid=6265)



Using Zend Framework with CodeIgniter - El Forum - 02-20-2008

[eluser]fredwu[/eluser]
Hey guys,

Recently I've started working with both CI and Zend Framework. I've actually come across this tutorial a couple of months ago.

However, I really don't think implementing it using hooks is really necessary. Therefore I wrote a simpler tutorial on how to use the two frameworks together.

Tutorial link: http://thislab.com/2008/02/21/using-zend-framework-with-codeigniter/

Please let me know what you think? Is it really necessary to use hooks?


Using Zend Framework with CodeIgniter - El Forum - 02-20-2008

[eluser]John Fuller[/eluser]
Depends on what you want to use. Some libraries (Zend Date for instance) can just be dropped right into the libraries folder and used just like any other library. Doing this (using just one library and leaving the rest behind) requires changing all the paths and copying over all the dependent files though because the default structure assumes you are using the entire Zend library. This is easy with an editor which can do a search and replace across multiple files/directories.


Using Zend Framework with CodeIgniter - El Forum - 02-20-2008

[eluser]fredwu[/eluser]
[quote author="John Fuller" date="1203560408"]Doing this (using just one library and leaving the rest behind) requires changing all the paths and copying over all the dependent files though because the default structure assumes you are using the entire Zend library.[/quote]

I don't quite get this part: why is using one library file requires copying over all the dependent files? By default all the library does is to make sure the include path is set correctly so that when loading ZF classes, it knows where to look for them. There is no file copying involved during the library initialization stage.

Or am I missing something here? I haven't looked into ZF too deeply yet so I might have misunderstood how ZF works internally.


Using Zend Framework with CodeIgniter - El Forum - 02-20-2008

[eluser]John Fuller[/eluser]
I am not sure I totally understand your question. Download the library and take a look at Zend Date to see what I am referring to. I used that component as an example because it is really simple.

You don't have to do what I did. Sometimes I just one to use one component from Zend and toss the rest so I don't have a bunch of extra files I am not using lying around. Each component has multiple files and common dependencies which are interconnected using includes.

Otherwise, if you follow the docs of the framework you are actually supposed to put the path of the Zend library in your environment path so the server checks that path automatically when running scripts.


Using Zend Framework with CodeIgniter - El Forum - 04-27-2008

[eluser]jbads[/eluser]
Hi Canglan, thanks for posting this tutorial. I am having trouble loading the zend framework. I have followed your technique as best I could , however

When I add this code to my controller is this:
if($this->load->library('zend'))
{
echo 'error';
}

$this->load->view('viewfile');
I get a page with an asterix and an output buffering error. My log file shows this error

ERROR etc. Severity: Warning --> fopen(Zend/Validate/Hostname/Com.php)

If I remove the load library code the page displays fine.

Have you encountered anything like this before while trying to use CI and Zend together?

Thanks, Jake


Using Zend Framework with CodeIgniter - El Forum - 01-17-2010

[eluser]Unknown[/eluser]
http://thislab.com/2008/02/21/using-zend-framework-with-codeigniter/ is not working. I have problem using GDATA with Ci. Please help


Using Zend Framework with CodeIgniter - El Forum - 01-18-2010

[eluser]maria clara[/eluser]
[quote author="fredwu" date="1203559402"]Hey guys,

Therefore I wrote a simpler tutorial on how to use the two frameworks together.

Tutorial link: http://thislab.com/2008/02/21/using-zend-framework-with-codeigniter/

[/quote]

hi, your link seems to be broken...page not found in my browser..


Using Zend Framework with CodeIgniter - El Forum - 01-30-2010

[eluser]cereal[/eluser]
They moved the blog, here's the new link: http://www.beyondcoding.com/2008/02/21/using-zend-framework-with-codeigniter/

Anyway there is another way to implement it:

- http://www.okadadesign.no/blog/?p=410

I'm trying it now, seems good to me Smile


Using Zend Framework with CodeIgniter - El Forum - 01-31-2010

[eluser]Unknown[/eluser]
great tutorial. i will try it. thanks bro.