Just My Random Stuff Just some hopefully useful, yet random posts from my own experiences, that nobody ever told me about before.

7Apr/105

WP-ZFF Zend Framework Full

I needed to include Zend Framework in a special WordPress plugin I made for someone, so I figured I would make a plugin to include Zend Framework Zend and ZendX libraries for WordPress Plugins.  Once I get the WordPress guys to approve the plugin and I will update this post with the download links, support links, etc.

Here's an example of how to use it, once it is installed and activated.

function plugin_function() {
    $channel = new Zend_Feed_Rss('http://rss.example.com/channelName');
    echo $channel->title();
    echo  $channel->category['domain'];
    foreach ($channel as $item) {
        echo $item->title() . "\n";
    }
}

That's all you have to do instantiate the class.

Download the plugin

Updates

  • Apr 28, 2010
    • Zend Framework releases V. 1.10-4,
    • Updated the way the autoloader loads to make it more compatible
    • See changelog

  • Pingback: Tweets that mention WP-ZFF Zend Framework Full | Just My Random Stuff -- Topsy.com

  • http://pixopoint.com/ Ryan

    Nifty. Any idea how much of a performance hit this will have over just loading WP on it's own?

  • http://passavanti.name GottaLoveIt

    Even if you load and activate the plugin, yet do not call any of the classes in any of your plugins, nothing except for the Zend Autoloader actually loads. It does not load the whole framework. The autoloader only loads what is needed when you call a class in your plugin. Even when you do call a class, it still only loads what is needed, and not the full framework. Performance hit should be almost negligible. I am using it for a Twitter Oauth and to respond to WP front end AJAX with json.

  • http://passavanti.name GottaLoveIt

    Even if you load and activate the plugin, yet do not call any of the classes in any of your plugins, nothing except for the Zend Autoloader actually loads. It does not load the whole framework. The autoloader only loads what is needed when you call a class in your plugin. Even when you do call a class, it still only loads what is needed, and not the full framework. Performance hit should be almost negligible. I am using it for a Twitter Oauth and to respond to WP front end AJAX with json.

  • Pingback: Plugin Wordpress pour Google Reader « Mimiz Blog

  • Pingback: Wordpress Plugin For Google Reader « Mimiz Blog

  • Pingback: wp-popular.com » Blog Archive » WP-ZFF Zend Framework Full | Just My Random Stuff

  • Zaguerinho

    Any general samples or tutorial on how to use MVC and Zend with WordPress, I would like to override the whole User system of wordpress with my own Zend_auth based user systems, would somethign like that make sense?

    Regards

    Zag

  • http://passavanti.name GottaLoveIt

    Sorry for delay in responding. I don’t think its possible to use Zend Framework as MVC with WordPress because MVC looks for the controllers to run things, aka the frontController.

    Well, this is not what this plugin does. This plugin takes the Zend Framework and utilizes it in a non MVC setup. I did add in the autoloader so you can call classes by name without having to require the class file first.

    Essentially its the same thing, as your auth system, based on Zend_Auth, would in my opinion, be class as a WordPress Plugin (call it WP_Zend_Auth) that extends the Zend_Auth. WP_Zend_Auth then would call the add_actions and such inside it to hook into wordpress. Since it extends Zend_Auth , you already have access then to all Zend_Auth methods.

    Hope that makes sense.

  • Pingback: Android Best Seller

  • Pingback: Scrapeboard