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 | |
| $eventsManager = new \Phalcon\Events\Manager(); | |
| $di = new \Phalcon\DI(); | |
| $connection = new \Phalcon\Db\Adapter\Pdo\Sqlite([ | |
| "dbname" => "sample.db" | |
| ]); |
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
| user nginx; | |
| worker_processes 1; | |
| #error_log /var/log/nginx/error.log; | |
| #error_log /var/log/nginx/error.log notice; | |
| #error_log /var/log/nginx/error.log info; | |
| #pid /var/run/nginx.pid; |
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 Phalcon\Mvc\Model\Transaction\Manager as TxManager; | |
| class TestTask extends \Phalcon\CLI\Task | |
| { | |
| public function doAction() | |
| { | |
| $config = $GLOBALS['config']; |
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 | |
| var_dump($s->put(100, 0, 60, array(1, 2, 3))); |
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 | |
| class MyValidator extends Phalcon\Validation\Validator | |
| { | |
| public function validate() | |
| { | |
| } | |
| } |
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 Phalcon\Validation\Validator\PresenceOf; | |
| use Phalcon\Validation\Validator\StringLength; | |
| $validation = new Phalcon\Validation(); | |
| $validation->add('name', new PresenceOf([ | |
| 'message' => 'The name is required' | |
| ]); |
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 | |
| $loader = new Phalcon\Loader(); | |
| $loader->registerNamespaces(array( | |
| 'Application\Backend\Controllers' => '../app/backend/controllers/', | |
| 'Application\Frontend\Controllers' => '../app/frontend/controllers/', | |
| ))->register(); | |
| $di = new \Phalcon\DI\FactoryDefault(); |
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 | |
| class Robots extends Phalcon\Mvc\Model | |
| { | |
| public function initialize() | |
| { | |
| $this->keepSnapshot(true); | |
| } | |
| } |
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 | |
| class RobotsController extends Phalcon\Mvc\Controller | |
| { | |
| public function index() | |
| { | |
| echo "Hello Index"; | |
| } | |
| public function show($id) |
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 | |
| class Category extends Phalcon\Mvc\Model | |
| { | |
| public $id; | |
| public $lft; | |
| public $rgt; |