Events\EventInterface

Source on GitHub Methods abstract public getData () ... abstract public setData ([mixed $data]) ... abstract public getType () ... abstract public setType (mixed $type) ... abstract public stop () ... abstract public isStopped () ... abstract public isCancelable () ...

Filter\Exception

extends class Phalcon\Exception implements Throwable Source on GitHub Methods final private Exception __clone () inherited from Exception Clone the exception public __construct ([string $message], [int $code], [Exception $previous]) inherited from Exception Exception constructor public __wakeup () inherited from Exception ... final public string getMessage () inherited from Exception Gets the Exception message final public int getCode () inherited from Exception Gets the Exception code fin

Mvc\Model::create

public create ([mixed $data], [mixed $whiteList]) Inserts a model instance. If the instance already exists in the persistence it will throw an exception Returning true on success or false otherwise. //Creating a new robot $robot = new Robots(); $robot->type = 'mechanical'; $robot->name = 'Astro Boy'; $robot->year = 1952; $robot->create(); //Passing an array to create $robot = new Robots(); $robot->create(array( 'type' => 'mechanical', 'name' => 'Astro Boy', 'ye

FilterInterface::add

abstract public add (mixed $name, mixed $handler) ...

Flash\Direct

extends abstract class Phalcon\Flash implements Phalcon\Di\InjectionAwareInterface, Phalcon\FlashInterface Source on GitHub This is a variant of the Phalcon\Flash that immediately outputs any message passed to it Methods public message (mixed $type, mixed $message) Outputs a message public output ([mixed $remove]) Prints the messages accumulated in the flasher public __construct ([mixed $cssClasses]) inherited from Phalcon\Flash Phalcon\Flash constructor public getAutoescape () inherited from

Flash

implements Phalcon\Di\InjectionAwareInterface Source on GitHub Shows HTML notifications related to different circumstances. Classes can be stylized using CSS $flash->success("The record was successfully deleted"); $flash->error("Cannot open the file"); Methods public __construct ([mixed $cssClasses]) Phalcon\Flash constructor public getAutoescape () Returns the autoescape mode in generated html public setAutoescape (mixed $autoescape) Set the autoescape mode in generated html public get

Http\CookieInterface::getSecure

abstract public getSecure () ...

Cookies Management

Cookies are a very useful way to store small pieces of data on the client’s machine that can be retrieved even if the user closes his/her browser. Phalcon\Http\Response\Cookies acts as a global bag for cookies. Cookies are stored in this bag during the request execution and are sent automatically at the end of the request. Basic Usage You can set/get cookies by just accessing the ‘cookies’ service in any part of the application where services can be accessed: use Phalcon\Mvc\Controller; class

Installation on XAMPP

XAMPP is an easy to install Apache distribution containing MySQL, PHP and Perl. Once you download XAMPP, all you have to do is extract it and start using it. Below are detailed instructions on how to install Phalcon on XAMPP for Windows. Using the latest XAMPP version is highly recommended. Download the right version of Phalcon XAMPP is always releasing 32 bit versions of Apache and PHP. You will need to download the x86 version of Phalcon for Windows from the download section. After downloadin

Logger\Formatter\Json

extends abstract class Phalcon\Logger\Formatter implements Phalcon\Logger\FormatterInterface Source on GitHub Formats messages using JSON encoding Methods public string format (string $message, int $type, int $timestamp, [array $context]) Applies a format to a message before sent it to the internal log public getTypeString (mixed $type) inherited from Phalcon\Logger\Formatter Returns the string meaning of a logger constant public interpolate (string $message, [array $context]) inherited from P