This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| define('ZF2_PATH', realpath(__DIR__ . '/../vendor/ZendFramework/library')); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| In Controller : $this->getServiceLocator() | |
| In Controller Plugin : $this->getController()->getServiceLocator() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use Zend\Mail\Message; | |
| use Zend\Mail\Transport\Smtp as SmtpTransport; | |
| use Zend\Mime\Message as MimeMessage; | |
| use Zend\Mime\Part as MimePart; | |
| use Zend\Mail\Transport\SmtpOptions; | |
| ////////// | |
| $message = new Message(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Join Table scenario Proposal | |
| ---------------------------- | |
| We have two table named *Album* and *Track* that joined at some function at *Album* table model or *Track* table model. | |
| We can't make a standarditation of where join should comes, because the answer is 'depend' of the case. | |
| so, we need a better scenario that unique, simple, and standardize at this project. | |
| 1. create an Album class model | |
| class Album | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace MyFunnyValentine; | |
| // Detect if the currently matched route belongs to this module. | |
| // The assumption is that the controller name includes the module namespace. | |
| class Module | |
| { | |
| public function onBootstrap($e) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| use Zend\Db\Sql\Select; | |
| // basic table | |
| $select0 = new Select; | |
| $select0->from('foo'); | |
| // 'SELECT "foo".* FROM "foo"'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace SampleModule\Form; | |
| use Zend\Form\Form; | |
| class SampleForm extends Form | |
| { | |
| public function __construct($name = null) | |
| { | |
| parent::__construct('Sample Form'); |