Escaper::escapeHtml

public escapeHtml (mixed $text) Escapes a HTML string. Internally uses htmlspecialchars

Escaper::escapeCss

public escapeCss (mixed $css) Escape CSS strings by replacing non-alphanumeric chars by their hexadecimal escaped representation

Escaper::detectEncoding

final public detectEncoding (mixed $str) Detect the character encoding of a string to be handled by an encoder Special-handling for chr(172) and chr(128) to chr(159) which fail to be detected by mb_detect_encoding()

Escaper

implements Phalcon\EscaperInterface Source on GitHub Escapes different kinds of text securing them. By using this component you may prevent XSS attacks. This component only works with UTF-8. The PREG extension needs to be compiled with UTF-8 support. $escaper = new \Phalcon\Escaper(); $escaped = $escaper->escapeCss("font-family: <Verdana>"); echo $escaped; // font\2D family\3A \20 \3C Verdana\3E Methods public setEncoding (mixed $encoding) Sets the encoding to be used by the escaper $

Encryption/Decryption

Phalcon provides encryption facilities via the Phalcon\Crypt component. This class offers simple object-oriented wrappers to the openssl PHP’s encryption library. By default, this component provides secure encryption using AES-256-CFB. You must use a key length corresponding to the current algorithm. For the algorithm used by default it is 32 bytes. Basic Usage This component is designed to provide a very simple usage: use Phalcon\Crypt; // Create an instance $crypt = new Crypt(); $key = "

Di\Service\Builder::build

public mixed build (Phalcon\DiInterface $dependencyInjector, array $definition, [array $parameters]) Builds a service using a complex service definition

Di\Service\Builder

Source on GitHub This class builds instances based on complex definitions Methods private mixed _buildParameter (Phalcon\DiInterface $dependencyInjector, int $position, array $argument) Resolves a constructor/call parameter private _buildParameters (Phalcon\DiInterface $dependencyInjector, array $arguments) Resolves an array of parameters public mixed build (Phalcon\DiInterface $dependencyInjector, array $definition, [array $parameters]) Builds a service using a complex service definition

Di\ServiceInterface::__set_state

abstract public static __set_state (array $attributes) ...

Di\ServiceInterface::setShared

abstract public setShared (mixed $shared) ...

Di\ServiceInterface::setParameter

abstract public setParameter (mixed $position, array $parameter) ...