クッキーを取得します。

@param	string		$name				クッキー名
@param	callable	$callback_filter	値に対してかけるフィルタ
499948
public static function GetCookie ($name, $callback_filter = null) {
		if (is_callable($callback_filter)) {
			return $callback_filter(...($_COOKIE[$name] ?? []));
		}
		return $_COOKIE[$name] ?? null;
	}
761690
public static function LasyClassVarAccessCallback ($name, $call_back) {
		if (!static::HasClassVar($name)) {
			static::$_ApplicationVariableTrait_Data[$name] = $call_back();
			static::$_ApplicationVariableTrait_ConstList[implode('=>', Arrays::AdjustArray($name))] = false;
		}
		return static::$_ApplicationVariableTrait_Data[$name];
	}
947883
private function wrap_current_filter_callbacks( $current_filter ) {

		$callbacks = self::get_filter_callbacks( $current_filter );
		if ( false === $callbacks ) {
			return;
		}
		$this->previous_filter           = $current_filter;
		$this->previous_filter_callbacks = $callbacks;

		foreach ( $callbacks as $priority => $priority_callbacks ) {
			foreach ( $priority_callbacks as $i => $the_ ) {
				$callbacks[ $priority ][ $i ] = array(
					'function'      => function() use ( $the_, $i ) {
						if ( ! isset( $this->loggers[ $i ] ) ) {
							$this->loggers[ $i ] = new Logger(
								array(
									'callback' => $the_['function'],
								)
							);
						}
						$this->loggers[ $i ]->start();
						$value = call_user_func_array( $the_['function'], func_get_args() );
						$this->loggers[ $i ]->stop();
						return $value;
					},
					'accepted_args' => $the_['accepted_args'],
				);
			}
		}
		self::set_filter_callbacks( $current_filter, $callbacks );
	}
444528
public static function add_filter($rule, $callback)
    {
        $method = 'filter_'.$rule;

        if (method_exists(__CLASS__, $method) || isset(self::$filter_methods[$rule])) {
            throw new Exception("Filter rule '$rule' already exists.");
        }

        self::$filter_methods[$rule] = $callback;

        return true;
    }
1232615
public function register_block($name, $callback, $cacheable = true, $cache_attrs = null)
    {
        if (isset($this->plugins[$name]) && $this->plugins[$name][0] !== self::SMARTY_BLOCK) {
            throw new Exception('Multiple plugins of different types can not share the same name');
        }
        $this->plugins[$name] = array(
            'type'     => self::SMARTY_BLOCK,
            'callback' => $callback
        );
    }
644078
public function apply($filter, Closure $callback = null)
    {
        // If the supplied filter is an array then we'll treat it as an array of filters that are
        // to be applied to the resource.
        if (is_array($filter))
        {
            return $this->applyFromArray($filter);
        }

        $filter = $this->factory->get('filter')->make($filter)->setResource($this);

        is_callable($callback) and call_user_func($callback, $filter);

        return $this->filters[$filter->getFilter()] = $filter;
    }
1295105
public function addFilterCallback($callback, $flags = null)
    {
        $flags = (int) $flags;

        if ($flags & self::FILTER_REPLACE_ENTRY) {
            $this->filterEntryCallbacks = [];
        }

        if ($flags & self::FILTER_REPLACE_EXIT) {
            $this->filterExitCallbacks = [];
        }

        // Called when entry records came
        if (($flags & self::FILTER_ENTRY) || !($flags & self::FILTER_EXIT)) {
            if ($flags & self::FILTER_APPEND_ENTRY) {
                $this->filterEntryCallbacks[] = $callback;

            } else {
                \array_unshift($this->filterEntryCallbacks, $callback);
            }
        }

        // Called when exit records came
        if ($flags & self::FILTER_EXIT) {
            if ($flags & self::FILTER_APPEND_EXIT) {
                $this->filterExitCallbacks[] = $callback;

            } else {
                \array_unshift($this->filterExitCallbacks, $callback);
            }
        }
    }
659264
public function addFilter($name, $callable) {
        $filter = new RouteFilter($name, $callable);
        $this->getRoutesMatcher()->getFiltersMatcher()
            ->addFilter($filter);

        return $this;
    }
16539
public function addTwigFilter($name, callable $filter, array $options = [])
    {
        $twigFilter = new \Twig_SimpleFilter($name, $filter, $options);

        $this->twig->addFilter($twigFilter);
    }
1030890
private static function get_filter_callbacks( $filter ) {
		global $wp_filter;

		if ( ! isset( $wp_filter[ $filter ] ) ) {
			return false;
		}

		if ( is_a( $wp_filter[ $filter ], 'WP_Hook' ) ) {
			$callbacks = $wp_filter[ $filter ]->callbacks;
		} else {
			$callbacks = $wp_filter[ $filter ];
		}
		if ( is_array( $callbacks ) ) {
			return $callbacks;
		}
		return false;
	}
623779
public static function addFilter(array $filters, array $filterArray, string $key, string $name): array
    {
        if (isset($filterArray[$name][$key])) {
            unset($filterArray[$name][$key]);
        }
        if (sizeof($filterArray[$name]) > 0) {
            $filters['filter']['bool']['must'][] = $filterArray;
        }

        return $filters;
    }
452801
public function addRuleCallback($name, Callable $callback)
    {
        if (!is_string($name)) {
            throw new \InvalidArgumentException('Rule must be a string');
        }

        $rule = $this->createRuleCallback($name, $callback);
        $this->addRule($rule);
    }
849223
public function addFilter( $filter, $callback, $priority = 10 )
    {
        if ( !isset( $this->filters[ $filter ] ) )
        {
            $this->filters[ $filter ] = array();
        }

        $this->filters[ $filter ][] = array(
            'priority' => $priority,
            'callback' => $callback,
        );

        if ( 1 < count( $this->filters[ $filter ] ) )
        {
            usort( $this->filters[ $filter ], array( $this, '_sortByPriority' ) );
        }

        if ( $this->debug )
        {
            echo PHP_EOL . '+FILTER: ' . $filter . ' -> '
                    . $this->_serializeCallback( $callback )
                    . ' + Priority: ' . $priority . PHP_EOL;
        }
    }
831263
public static function addFilter($filter, $callback = null)
    {
        if (is_array($filter)) {
            $filters = $filter;
            foreach ($filters as $key => $filter) {
                if (is_numeric($key)) {
                    $key = $filter;
                }
                self::addFilter($key, $filter);
            }

            return true;
        } elseif (is_string($filter) && class_exists($filter, false) && is_subclass_of($filter, 'FilterCollection')) {
            foreach (get_class_methods($filter) as $f) {
                if (is_callable(array($filter, $f))) {
                    self::$filters[$f] = array($filter, $f);
                }
            }

            return true;
        }
        if (is_null($callback)) {
            $callback = $filter;
        }

        if (!is_callable($callback)) {
            return false;
        }
        self::$filters[$filter] = $callback;
    }
693382
def filter(name, callable=nil, &block)
      if block_given?
        transforms[name.to_sym] = block
      else
        transforms[name.to_sym] = callable
      end
    end
685124
public function resolve($filter_name)
    {
        foreach ($this->filters as $filter) {
            if ($filter->getName() === $filter_name) {
                return $filter;
            }
        }

        return false;
    }
1320749
public static function RecursiveFilter ($array, $call_back = null) {
		if (!is_callable($call_back)) {
			foreach ($array as $idx => $element) {
				if (is_array($element)) {
					$array[$idx] =  static::RecursiveFilter($element, $call_back);
					if (empty($array[$idx])) {
						unset($array[$idx]);
					}
				}
				if ($element === null) {
					unset($array[$idx]);
				}
			}
		} else {
			foreach ($array as $idx => $element) {
				if (is_array($element)) {
					$array[$idx] =  static::RecursiveFilter($element, $call_back);
					if (empty($array[$idx])) {
						unset($array[$idx]);
					}
				}
				if ($call_back($element, $idx)) {
					unset($array[$idx]);
				}
			}
		}
		return $array;
	}