| Server IP : 43.130.17.34 / Your IP : 216.73.217.6 Web Server : nginx/1.28.0 System : Linux VM-4-12-opencloudos 6.6.92-34.1.oc9.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jun 25 21:32:13 CST 2025 x86_64 User : www ( 1000) PHP Version : 8.0.26 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /www/wwwroot/yespkg.com/wp-content/plugins/admin-columns-pro.5.1.3/classes/Search/ |
Upload File : |
<?php
namespace ACP\Search;
use AC\Config;
use LogicException;
final class Operators extends Config {
const EQ = '=';
const NEQ = '!=';
const GT = '>';
const GTE = '>=';
const LT = '<';
const LTE = '<=';
const CONTAINS = 'CONTAINS';
const NOT_CONTAINS = 'NOT CONTAINS';
const BEGINS_WITH = 'BEGINS WITH';
const ENDS_WITH = 'ENDS WITH';
const IN = 'IN';
const NOT_IN = 'NOT IN';
const BETWEEN = 'BETWEEN';
const IS_EMPTY = 'IS EMPTY';
const NOT_IS_EMPTY = 'NOT IS EMPTY';
const TODAY = 'TODAY';
const PAST = 'PAST';
const FUTURE = 'FUTURE';
const LT_DAYS_AGO = 'LT_DAYS_AGO';
const GT_DAYS_AGO = 'GT_DAYS_AGO';
const WITHIN_DAYS = 'WITHIN_DAYS';
/**
* @param array $operators
* @param bool $order
*/
public function __construct( array $operators, $order = true ) {
if ( $order ) {
$operators = array_intersect( $this->get_operators(), $operators );
}
parent::__construct( $operators );
}
/**
* @return array
*/
protected function get_operators() {
return [
self::EQ,
self::NEQ,
self::GT,
self::GTE,
self::LT,
self::LTE,
self::CONTAINS,
self::NOT_CONTAINS,
self::BEGINS_WITH,
self::ENDS_WITH,
self::IN,
self::NOT_IN,
self::BETWEEN,
self::IS_EMPTY,
self::NOT_IS_EMPTY,
self::TODAY,
self::PAST,
self::FUTURE,
self::LT_DAYS_AGO,
self::GT_DAYS_AGO,
self::WITHIN_DAYS,
];
}
/**
* @inheritDoc
*/
protected function validate_config() {
$operators = $this->get_operators();
foreach ( $this as $operator ) {
if ( ! in_array( $operator, $operators ) ) {
throw new LogicException( 'Invalid operator found.' );
}
}
}
}