/** * Check to be sure we have the HTML purifier library * @param \Foundation\Form\Element $e * @param mixed $ruleSet */ public function __construct(\Foundation\Form\Element $e, $ruleSet = null) { parent::__construct($e, $ruleSet); if (!class_exists('HTMLPurifier')) { throw new \Foundation\Exception('HTML Purifier is required for the SafeHTML filter and it is not included'); } }
/** * Prepare component configuration * * @return void */ public function prepare() { parent::prepare(); $this->applyFilter(); $jsConfig = $this->getConfiguration($this); $this->getContext()->addComponentDefinition($this->getComponentName(), $jsConfig); }
/** * {@inheritDoc} */ protected function combine($previous, $current, $separator) { if (is_array($current)) { $current = implode($separator, array_filter($current)); } return parent::combine($previous, $current, $separator); }
/** * {@inheritdoc} */ public function getOutputResponse($output) { if (null !== $this->outputCallback) { return call_user_func($this->outputCallback, $output, $this); } return parent::getOutputResponse($output); }
/** * Constructor * Ensure a valid PKI object is passed * @param \Foundation\Form\Element $e * @param \Foundation\PKI $pki */ public function __construct(\Foundation\Form\Element $e, $pki) { if (!$pki instanceof \Foundation\PKI) { throw new \Foundation\Exception('Invalid PKI class passed to Encrypt filter'); } parent::__construct($e, $pki); }
function setOption($name, $value) { parent::setOption($name, $value); // reset the obfuscator in case the options are changed during the usage $this->obfuscator = null; return $this; }
/** * {@inheritdoc} */ public function toArray() { $array = parent::toArray(); $baseName = $this->_getBaseName(); if (isset($array[$baseName]['query'])) { $array[$baseName]['query'] = $array[$baseName]['query']['query']; } return $array; }
/** * @see \Elastica\Param::toArray() * * @return array */ public function toArray() { $data = parent::toArray(); $name = $this->_getBaseName(); $filterData = $data[$name]; if (empty($filterData)) { $filterData = $this->_filters; } else { $filterData['filters'] = $this->_filters; } $data[$name] = $filterData; return $this->_convertArrayable($data); }
/** * Converts object to an array. * * @see \Elastica\Filter\AbstractFilter::toArray() * * @return array data array */ public function toArray() { $this->setParam($this->_field, $this->_prefix); return parent::toArray(); }
/** * @param string $platform * @param bool $negateFilter */ public function __construct($platform, $negateFilter = false) { parent::__construct('Plattform'); $this->filterValues['FilterValue'] = $negateFilter ? 'not_' . $platform : $platform; }
public function __construct() { parent::__construct('RangeID'); }
/** * Overrides the parent to handle floats in locales where the decimal separator is a comma instead of a dot * * @param mixed $value * @param string $operator * * @return string */ public function search($value, $operator = '=') { $value = $this->sanitiseValue($value); return parent::search($value, $operator); }
/** * Returns a string representation of the filter. * * @return string */ public function toString() { return '(!' . $this->filter->toString() . ')'; }
/** * @param string $flagId */ public function __construct($flagId) { parent::__construct('UserDefinedFlag'); $this->filterValues['FilterValue'] = $flagId; }
/** * @param int $orderId */ public function __construct($orderId) { parent::__construct('OrderID'); $this->filterValues['FilterValue'] = strval($orderId); }
/** * Converts object to array * * @see \Elastica\Filter\AbstractFilter::toArray() * @return array Filter array */ public function toArray() { $this->setParams(array_merge($this->getParams(), $this->_fields)); return parent::toArray(); }
/** * Register the filter function with the dump manager * @param BackupDumper $dumper * @static */ function register(&$dumper) { $dumper->registerFilter('googlecoop', 'GoogleCoopFilter'); parent::register($dumper); }
/** * @inheritdoc */ protected function getMappingValidate() : array { return array_merge(parent::getMappingValidate(), [self::UPDATED_BEFORE => [$this, 'validateTimestamp'], self::UPDATED_AFTER => [$this, 'validateTimestamp']]); }
function __construct($param) { parent::__construct($param); $this->_operator = $this->parseOperatorFromParam($this->_param); $this->_value = $this->parseValueFromParam($this->_param); }
/** * @param string $email */ public function __construct($email) { parent::__construct('AfterbuyUserEmail'); $this->filterValues['FilterValue'] = $email; }
/** * Converts object to array * * @see \Elastica\Filter\AbstractFilter::toArray() * @return array Filter array */ public function toArray() { $this->setParams($this->_fields); return parent::toArray(); }
/** * @param string $filterValue */ public function __construct($filterValue) { parent::__construct('DefaultFilter'); $this->filterValues['FilterValue'] = $filterValue; }
/** * @param int $userId */ public function __construct($userId) { parent::__construct('AfterbuyUserID'); $this->filterValues['FilterValue'] = strval($userId); }
/** * @param int $shopId */ public function __construct($shopId) { parent::__construct('ShopId'); $this->filterValues['FilterValue'] = strval($shopId); }
/** * Prepare component configuration * * @return void */ public function prepare() { $this->applyFilter(); parent::prepare(); }
/** * Constructor * * @param \JDatabaseDriver $db The database object * @param object $field The field informations as taken from the db */ public function __construct($db, $field) { parent::__construct($db, $field); $this->null_value = ''; }
/** * Set filter * * @param \Elastica\Filter\AbstractFilter $filter * @return \Elastica\Filter\BoolNot */ public function setFilter(AbstractFilter $filter) { return $this->setParam('filter', $filter->toArray()); }
/** * Converts object to an array. * * @see \Elastica\Filter\AbstractFilter::toArray() * * @return array data array */ public function toArray() { if (count($this->_options) > 0) { $options = array('value' => $this->_regexp); $options = array_merge($options, $this->_options); $this->setParam($this->_field, $options); } else { $this->setParam($this->_field, $this->_regexp); } return parent::toArray(); }
/** * AbstractFilter constructor. * * @param bool $break If true break after the filter if value is unique. * @param int $start Start value. */ public function __construct($break = true, $start = 2) { parent::__construct($break, static::COMBINE_APPEND); $this->start = (int) $start; }
/** * Set the filter to be applied to docs in indices which do not match those specified in the "indices" parameter * @param AbstractFilter $filter * @return Indices */ public function setNoMatchFilter(AbstractFilter $filter) { return $this->setParam('no_match_filter', $filter->toArray()); }