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 NewsController extends \Phalcon\Mvc\Controller | |
| { | |
| public function indexAction() | |
| { | |
| } |
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 Account { | |
| public function save($data=null) | |
| { | |
| $entity = new Entity(); | |
| $entity->name = 'Account'; | |
| $this->entity = $entity; | |
| return parent::save($data); |
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 return Phalcon\Annotations\Reflection::__set_state(array( | |
| '_reflectionData' => | |
| array ( | |
| 'class' => | |
| array ( | |
| 0 => | |
| array ( | |
| 'type' => 300, | |
| 'name' => 'Simple', | |
| 'file' => '/home/gutierrezandresfelipe/cphalcon/unit-tests/annotations/TestClass.php', |
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 | |
| /** | |
| * TestClass | |
| * | |
| * This is a test class, it's useful to make tests | |
| * | |
| * @Simple | |
| * @SingleParam("Param") | |
| * @MultipleParams("First", Second, 1, 1.1, -10, false, true, null) |
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 | |
| $di = new Phalcon\DI(); | |
| $di['router'] = function(){ | |
| $router = new Phalcon\Mvc\Router(false); | |
| $router->add('/', array( | |
| 'module' => "frontend", |
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 CacheModel extends Phalcon\Mvc\Model | |
| { | |
| static protected $_cacheKey; | |
| static protected $_cacheLifetime = 3600; | |
| public static function getCacheKey($parameters) |
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; | |
| use Phalcon\Mvc\Model\Transaction\Failed as TxFailed; | |
| $di = new Phalcon\DI\FactoryDefault(); | |
| $eventsManager = $di['eventsManager']; | |
| $eventsManager->attach('db', function($event, $connection){ |
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; |
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 Robots extends Phalcon\Mvc\Model | |
| { | |
| public function initialize() | |
| { | |
| $this->keepSnapshot(true); | |
| } | |
| } |