Skip to content

Instantly share code, notes, and snippets.

$robots = $manager->executeQuery('SELECT * FROM Robots');
$this->assertInstanceOf('Phalcon\Mvc\Model\Resultset\Simple', $robots);
$this->assertEquals(count($robots), 3);
$this->assertInstanceOf('Robots', $robots[0]);
$robots = $manager->executeQuery('SELECT * FROM Robots ORDER BY 1');
$this->assertInstanceOf('Phalcon\Mvc\Model\Resultset\Simple', $robots);
$this->assertEquals(count($robots), 3);
$this->assertInstanceOf('Robots', $robots[0]);
$this->assertEquals($robots[0]->id, 1);
$status = $manager->executeQuery('UPDATE Subscriptores SET status = "Z" WHERE id > 100');
http {
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log /var/log/nginx/access.log main;
<?php
namespace Phacrm\Portal;
class Module
{
public function registerAutoloaders()
{
<?php
/**
CREATE TABLE robots (
code int,
le_name varchar(100),
);
*/
class Robots extends Phalcon\Mvc\Model {
<?php
$router = new Phalcon\Mvc\Router(false);
$router->add(
"/([a-z]{2})/([0-9]{1,})/:action/:params",
array(
"controller" => 'servers',
"domain" => 1,
"server" => 2,
<?php
//this is provided by phalcon
namespace Phalcon\Cache;
interface BackendInteface {
public function __construct($frontendObject, $backendOptions=array());
public function get($keyName, $lifetime=null);
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style>a {font\2D family\3A \20 Verdana}</style>
</head>
<body>
/**
* Initializes the view and Volt
*
* @param array $options
*/
protected function initView($options = array())
{
$config = $this->_di->get('config');
$di = $this->_di;