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
Page 1 of 1
Plugins & Extensibility How to integrate vendor code with Recess?
#3
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:
And use it just like you normally would.
<?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)
-
PHPMailer.zip (30.53K)
Number of downloads: 18
#5
Posted 20 December 2009 - 09:31 AM
beline, 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:
And use it just like you normally would.
<?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
Page 1 of 1

Sign In
Register
Help


MultiQuote