Sections

Class Phalcon\Filter\Exception

Исходный код на GitHub

Namespace Phalcon\Filter   Extends \Phalcon\Exception

Phalcon\Filter\Exception

Exceptions thrown in Phalcon\Filter will use this class

Class Phalcon\Filter

Исходный код на GitHub

Namespace Phalcon\Filter   Uses Closure, Phalcon\Filter\Exception, Phalcon\Filter\FilterInterface   Implements FilterInterface

Lazy loads, stores and exposes sanitizer objects

Константы

const FILTER_ABSINT = absint;
const FILTER_ALNUM = alnum;
const FILTER_ALPHA = alpha;
const FILTER_BOOL = bool;
const FILTER_EMAIL = email;
const FILTER_FLOAT = float;
const FILTER_INT = int;
const FILTER_LOWER = lower;
const FILTER_LOWERFIRST = lowerFirst;
const FILTER_REGEX = regex;
const FILTER_REMOVE = remove;
const FILTER_REPLACE = replace;
const FILTER_SPECIAL = special;
const FILTER_SPECIALFULL = specialFull;
const FILTER_STRING = string;
const FILTER_STRIPTAGS = striptags;
const FILTER_TRIM = trim;
const FILTER_UPPER = upper;
const FILTER_UPPERFIRST = upperFirst;
const FILTER_UPPERWORDS = upperWords;
const FILTER_URL = url;

Properties

/**
 * @var array
 */
protected mapper;

/**
 * @var array
 */
protected services;

Методы

public function __construct( array $mapper = [] ): void;

Key value pairs with name as the key and a callable as the value for the service object

public function get( string $name ): object;

Get a service. If it is not in the mapper array, create a new object, set it and then return it.

public function has( string $name ): bool;

Checks if a service exists in the map array

public function sanitize( mixed $value, mixed $sanitizers, bool $noRecursive = bool ): mixed;

Sanitizes a value with a specified single or set of sanitizers

public function set( string $name, callable $service ): void;

Set a new service to the mapper array

protected function init( array $mapper ): void;

Loads the objects in the internal mapper array

Class Phalcon\Filter\FilterFactory

Исходный код на GitHub

Namespace Phalcon\Filter   Uses Phalcon\Filter\Filter

This file is part of the Phalcon Framework.

(c) Phalcon Team [email protected]

For the full copyright and license information, please view the LICENSE.txt file that was distributed with this source code.

Методы

public function newInstance(): LocatorInterface;

Returns a Locator object with all the helpers defined in anonynous functions

protected function getAdapters(): array;

//

Interface Phalcon\Filter\FilterInterface

Исходный код на GitHub

Namespace Phalcon\Filter

Lazy loads, stores and exposes sanitizer objects

Методы

public function sanitize( mixed $value, mixed $sanitizers, bool $noRecursive = bool ): mixed;

Sanitizes a value with a specified single or set of sanitizers

Class Phalcon\Filter\Sanitize\AbsInt

Исходный код на GitHub

Namespace Phalcon\Filter\Sanitize

Phalcon\Filter\Sanitize\AbsInt

Sanitizes a value to absolute integer

Методы

public function __invoke( mixed $input );

@var mixed input The text to sanitize

Class Phalcon\Filter\Sanitize\Alnum

Исходный код на GitHub

Namespace Phalcon\Filter\Sanitize

Phalcon\Filter\Sanitize\Alnum

Sanitizes a value to an alphanumeric value

Методы

public function __invoke( mixed $input );

@var mixed input The text to sanitize

Class Phalcon\Filter\Sanitize\Alpha

Исходный код на GitHub

Namespace Phalcon\Filter\Sanitize

Phalcon\Filter\Sanitize\Alpha

Sanitizes a value to an alpha value

Методы

public function __invoke( mixed $input );

@var mixed input The text to sanitize

Class Phalcon\Filter\Sanitize\BoolVal

Исходный код на GitHub

Namespace Phalcon\Filter\Sanitize

Phalcon\Filter\Sanitize\BoolVal

Sanitizes a value to boolean

Методы

public function __invoke( mixed $input );

@var mixed input The text to sanitize

Class Phalcon\Filter\Sanitize\Email

Исходный код на GitHub

Namespace Phalcon\Filter\Sanitize

Phalcon\Filter\Sanitize\Email

Sanitizes an email string

Методы

public function __invoke( mixed $input );

@var mixed input The text to sanitize

Class Phalcon\Filter\Sanitize\FloatVal

Исходный код на GitHub

Namespace Phalcon\Filter\Sanitize

Phalcon\Filter\Sanitize\FloatVal

Sanitizes a value to float

Методы

public function __invoke( mixed $input );

@var mixed input The text to sanitize

Class Phalcon\Filter\Sanitize\IntVal

Исходный код на GitHub

Namespace Phalcon\Filter\Sanitize

Phalcon\Filter\Sanitize\IntVal

Sanitizes a value to integer

Методы

public function __invoke( mixed $input );

@var mixed input The text to sanitize

Class Phalcon\Filter\Sanitize\Lower

Исходный код на GitHub

Namespace Phalcon\Filter\Sanitize

Phalcon\Filter\Sanitize\Lower

Sanitizes a value to lowercase

Методы

public function __invoke( string $input );

@var mixed input The text to sanitize

Class Phalcon\Filter\Sanitize\LowerFirst

Исходный код на GitHub

Namespace Phalcon\Filter\Sanitize

Phalcon\Filter\Sanitize\LowerFirst

Sanitizes a value to lcfirst

Методы

public function __invoke( string $input );

@var mixed input The text to sanitize

Class Phalcon\Filter\Sanitize\Regex

Исходный код на GitHub

Namespace Phalcon\Filter\Sanitize

Phalcon\Filter\Sanitize\Regex

Sanitizes a value performing preg_replace

Методы

public function __invoke( mixed $input, mixed $pattern, mixed $replace );

@var mixed input The text to sanitize

Class Phalcon\Filter\Sanitize\Remove

Исходный код на GitHub

Namespace Phalcon\Filter\Sanitize

Phalcon\Filter\Sanitize\Remove

Sanitizes a value removing parts of a string

Методы

public function __invoke( mixed $input, mixed $replace );

@var mixed input The text to sanitize

Class Phalcon\Filter\Sanitize\Replace

Исходный код на GitHub

Namespace Phalcon\Filter\Sanitize

Phalcon\Filter\Sanitize\Replace

Sanitizes a value replacing parts of a string

Методы

public function __invoke( mixed $input, mixed $from, mixed $to );

@var mixed input The text to sanitize

Class Phalcon\Filter\Sanitize\Special

Исходный код на GitHub

Namespace Phalcon\Filter\Sanitize

Phalcon\Filter\Sanitize\Special

Sanitizes a value special characters

Методы

public function __invoke( mixed $input );

@var mixed input The text to sanitize

Class Phalcon\Filter\Sanitize\SpecialFull

Исходный код на GitHub

Namespace Phalcon\Filter\Sanitize

Phalcon\Filter\Sanitize\SpecialFull

Sanitizes a value special characters (htmlspecialchars() and ENT_QUOTES)

Методы

public function __invoke( mixed $input );

@var mixed input The text to sanitize

Class Phalcon\Filter\Sanitize\StringVal

Исходный код на GitHub

Namespace Phalcon\Filter\Sanitize

Phalcon\Filter\Sanitize\String

Sanitizes a value to string

Методы

public function __invoke( mixed $input );

@var mixed input The text to sanitize

Class Phalcon\Filter\Sanitize\Striptags

Исходный код на GitHub

Namespace Phalcon\Filter\Sanitize

Phalcon\Filter\Sanitize\Striptags

Sanitizes a value striptags

Методы

public function __invoke( string $input );

@var mixed input The text to sanitize

Class Phalcon\Filter\Sanitize\Trim

Исходный код на GitHub

Namespace Phalcon\Filter\Sanitize

Phalcon\Filter\Sanitize\Trim

Sanitizes a value removing leading and trailing spaces

Методы

public function __invoke( string $input );

@var mixed input The text to sanitize

Class Phalcon\Filter\Sanitize\Upper

Исходный код на GitHub

Namespace Phalcon\Filter\Sanitize

Phalcon\Filter\Sanitize\Upper

Sanitizes a value to uppercase

Методы

public function __invoke( string $input );

@var mixed input The text to sanitize

Class Phalcon\Filter\Sanitize\UpperFirst

Исходный код на GitHub

Namespace Phalcon\Filter\Sanitize

Phalcon\Filter\Sanitize\UpperFirst

Sanitizes a value to ucfirst

Методы

public function __invoke( string $input );

@var mixed input The text to sanitize

Class Phalcon\Filter\Sanitize\UpperWords

Исходный код на GitHub

Namespace Phalcon\Filter\Sanitize

Phalcon\Filter\Sanitize\UpperWords

Sanitizes a value to uppercase teh first character of each word

Методы

public function __invoke( string $input );

@var mixed input The text to sanitize

Class Phalcon\Filter\Sanitize\Url

Исходный код на GitHub

Namespace Phalcon\Filter\Sanitize

Phalcon\Filter\Sanitize\Url

Sanitizes a value url

Методы

public function __invoke( mixed $input );

@var mixed input The text to sanitize