Dispatching Controllers

Phalcon\Mvc\Dispatcher is the component responsible for instantiating controllers and executing the required actions on them in an MVC application. Understanding its operation and capabilities helps us get more out of the services provided by the framework. The Dispatch Loop This is an important process that has much to do with the MVC flow itself, especially with the controller part. The work occurs within the controller dispatcher. The controller files are read, loaded, and instantiated. Then

Mvc\Model\MetaData\Session::MODELS_NON_PRIMARY_KEY

integer MODELS_NON_PRIMARY_KEY

Logger\Adapter\File::__wakeup

public __wakeup () Opens the internal file handler after unserialization

Mvc\UrlInterface::path

abstract public path ([mixed $path]) ...

Cache\BackendInterface::save

abstract public save ([mixed $keyName], [mixed $content], [mixed $lifetime], [mixed $stopBuffer]) ...

Db\Adapter::fetchColumn

public string | ** fetchColumn (string $sqlQuery, [array $placeholders], [int | string $column]) Returns the n’th field of first row in a SQL query result //Getting count of robots $robotsCount = $connection->fetchColumn("SELECT count(*) FROM robots"); print_r($robotsCount); //Getting name of last edited robot $robot = $connection->fetchColumn("SELECT id, name FROM robots order by modified desc", 1); print_r($robot);

Logger\Formatter\Syslog::format

public array format (string $message, int $type, int $timestamp, [array $context]) Applies a format to a message before sent it to the internal log

Filtering and Sanitizing

Sanitizing user input is a critical part of software development. Trusting or neglecting to sanitize user input could lead to unauthorized access to the content of your application, mainly user data, or even the server your application is hosted on. Full image (from xkcd) The Phalcon\Filter component provides a set of commonly used filters and data sanitizing helpers. It provides object-oriented wrappers around the PHP filter extension. Types of Built-in Filters The following are the built-in

DispatcherInterface::getActionName

abstract public getActionName () ...

Logger\Formatter\Firephp::setShowBacktrace

public setShowBacktrace ([mixed $isShow]) Returns the string meaning of a logger constant