Recess Developer Forums: Plugins & Extensibility - Recess Developer Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Plugins & Extensibility How to integrate vendor code with Recess?

#1 User is offline   Christine Fürst Icon

  • Group: Members
  • Posts: 6
  • Joined: 17-October 09
  • LocationRotterdam

Posted 04 December 2009 - 04:00 AM

HOI. recess developers,

Is there anyone who knows a guide for integration of vendor code (libraries) such as Zend or Swift mailer with Recess.

The book of recess chapter 14 does not tell yet.

http://www.recessfra.../html/ch14.html

I would like to know the most convenient way to do this.

Should I put Zend and Swift mailer into the plugins directory?

Let me know if you know.

Thanks a lot already.

I'm looking forward to your reply.

Cheers, Stinie
0

#2 User is offline   beline Icon

  • Group: Members
  • Posts: 36
  • Joined: 02-September 09
  • LocationMaine, USA

Posted 08 December 2009 - 01:55 PM

I have plugged PHPMailer 5.0.0 if your interested...
0

#3 User is offline   beline Icon

  • Group: Members
  • Posts: 36
  • Joined: 02-September 09
  • LocationMaine, USA

Posted 08 December 2009 - 02:35 PM

Here it is. PHPMailer plugged for Recess. To use it simply extract it and put the contents into the plug-ins folder (meaning, the folder thebeline), and include it in the application class. Here is an example:

<?php
Library::import('recess.framework.Application');
Library::import('thebeline.PHPMailer.PHPMailerPlugin');  // Here

class ExampleApplication extends Application {
    public function __construct() {
        
        $this->name = 'Example Application';
        
        $this->viewsDir = $_ENV['dir.apps'] . 'exampleapp/views/';
        
        $this->assetUrl = $_ENV['url.assetbase'] . 'apps/exampleapp/public/';
        
        $this->modelsPrefix = 'exampleapp.models.';
        
        $this->controllersPrefix = 'exampleapp.controllers.';
        
        $this->routingPrefix = 'exampleapp/';
        
        $this->plugins = array(new PHPMailerPlugin());  // And here
        
    }
}
?>


And use it just like you normally would.

Attached File(s)


0

#4 User is offline   Christine Fürst Icon

  • Group: Members
  • Posts: 6
  • Joined: 17-October 09
  • LocationRotterdam

Posted 20 December 2009 - 07:03 AM

View Postbeline, on 08 December 2009 - 07:55 PM, said:

I have plugged PHPMailer 5.0.0 if your interested...


HOI. Beline,

Thanks a lot. I'll have look at it right now.

:) Stinie
0

#5 User is offline   Christine Fürst Icon

  • Group: Members
  • Posts: 6
  • Joined: 17-October 09
  • LocationRotterdam

Posted 20 December 2009 - 09:31 AM

View Postbeline, on 08 December 2009 - 08:35 PM, said:

Here it is. PHPMailer plugged for Recess. To use it simply extract it and put the contents into the plug-ins folder (meaning, the folder thebeline), and include it in the application class. Here is an example:

<?php
Library::import('recess.framework.Application');
Library::import('thebeline.PHPMailer.PHPMailerPlugin');  // Here

class ExampleApplication extends Application {
    public function __construct() {
        
        $this->name = 'Example Application';
        
        $this->viewsDir = $_ENV['dir.apps'] . 'exampleapp/views/';
        
        $this->assetUrl = $_ENV['url.assetbase'] . 'apps/exampleapp/public/';
        
        $this->modelsPrefix = 'exampleapp.models.';
        
        $this->controllersPrefix = 'exampleapp.controllers.';
        
        $this->routingPrefix = 'exampleapp/';
        
        $this->plugins = array(new PHPMailerPlugin());  // And here
        
    }
}
?>


And use it just like you normally would.


HOI. beline,

Thanks al lot for sharing!

I'll use your plugin in the meantime.

I'll try to learn from it.


Cheers, Stinie
0

#6 User is offline   KevBurnsJr Icon

  • Icon
  • Group: Administrators
  • Posts: 64
  • Joined: 25-August 09
  • LocationSilicon Valley, CA

Posted 30 January 2010 - 03:53 PM

Hey beline, this is great.

You should throw it on github.

I've been using the naming convention recess-plugin_[plugin-name] for Recess plugin repositories.
Less Talk, More Code.
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users