9

Click here to load reader

Codeigniter : Using Third Party Components - Zend Framework Components

Embed Size (px)

DESCRIPTION

Codeigniter : Using Third Party Components - Zend Framework Components

Citation preview

Page 1: Codeigniter : Using Third Party Components - Zend Framework Components

CodeIgniterUsing Third Party Components : Zend Framework Components

Abdul Malik Ikhsanhttp://slideshare.net/samsonasik/presentations

Page 2: Codeigniter : Using Third Party Components - Zend Framework Components

Why Integrate with other(s) ?

Because No ‘body’ who is perfect, supporting each other is the game called life ( Kamen Rider Skull )( Kamen Rider Skull )

Page 3: Codeigniter : Using Third Party Components - Zend Framework Components

Why Zend Framework ( ZF ) ?

Component Based Framework Easy to Integrate

Page 4: Codeigniter : Using Third Party Components - Zend Framework Components

Preparing…

Copy Zend Library in CodeIgniter third_party folder ( You can create other or rename if necessary )

Add a library to load ZF Component in Add a library to load ZF Component in one package

Page 5: Codeigniter : Using Third Party Components - Zend Framework Components

Like this…

Page 6: Codeigniter : Using Third Party Components - Zend Framework Components

The Zf Loader Library<?php

class Zf {public function __construct(){

set_include_path(implode(PATH_SEPARATOR,PATH_SEPARATOR,array(realpath( APPPATH.'third_party/zf' ),get_include_path()))

);

require_once 'Zend/Loader/Autoloader.php';$autoloader = Zend_Loader_Autoloader::getInstance();

}}/* End of file zf.php *//* Location:./application/third_party/zf/libraries/zf.php */

Page 7: Codeigniter : Using Third Party Components - Zend Framework Components

Testing Time…

$this->load->add_package_path(APPPATH.'third_party/zf');$this->load->library('zf');$arraydebug = array($arraydebug = array(

'nama' =>'samsonasik' ,'ciriciri' => 'ganteng‘

);

//use the zf library ;)Zend_Debug::Dump($arraydebug);

Page 8: Codeigniter : Using Third Party Components - Zend Framework Components

Thank You ;)Thank You ;)

Page 9: Codeigniter : Using Third Party Components - Zend Framework Components

This presentation contained copyrighted material licensed under various creative commons licenses unless otherwise noted:

Photos http://theglobalstream.ibitlive.eu/blog/wp-

content/uploads/2010/09/zend-framework-cube.png

ReferencesReferences CodeIgniter User Guide http://www.beyondcoding.com/2008/02/21/using-

zend-framework-with-codeigniter/ http://samsonasik.wordpress.com/2011/02/03/cod

eigniter-2-0-and-zend-framework-integration/