Prev | Current Page 24 | Next

Rob Allen, Nick Lo, and Steven Brown

"Zend Framework in Action"

Within the world of email, this means that the component allows for sending email using SMTP or
via the standard PHP mail() command. Additional transports can be easily slotted into the system by writing a
new class that implements Zend_Email_Transport_Interface. When sending email, a simple object-oriented
interface is used:
$mail = new Zend_Mail();
$mail->setBodyText('My first email!')
->setBodyHtml('My first email!')
->setFrom('rob@akrabat.com', 'Rob Allen')
->addTo('somebody@example.com', 'Some Recipient')
->setSubject('Hello from Zend Framework in Action!')
->send();
This snippet also shows a fluent interface where each member function returns an object to itself so that
they can be chained together to make the code more readable.
1.4 Zend Framework design philosophy
The Zend Framework has a number of published goals that make up the design philosophy of the framework.
If these goals do not mesh with what your view on developing PHP applications then the Zend Framework is
unlikely to be a good fit for your way of doing things. Let??™s look at what makes the Zend Framework unique.
1.4.1 Provide high quality components
All code within the Zend Framework library will be of high quality. This means that it will be written using
PHP5??™s features and will not generate any messages from the PHP parser (i.


Pages:
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
wyciągarki wróżby miłosne cukiernia-stykowscy.pl salon kosmetyczny kraków pompy ciepła