Get a plan filter by name.

@param string $value

@return null if plan not found else \stdClass
964161
protected function getBillingPlanFilterByName($value)
    {
        $billingPlans = $this->getBillingPlans();

        foreach ($billingPlans as $billingPlan) {
            if ($billingPlan->name === $value) {
                return $billingPlan;
            }
        }

        return null;
    }
1247004
public function filter($value)
    {
        if ($value instanceof VisibilityInterface
            && !$this->builder->isVisibilityAllowed($value->getVisibility())
        ) {
            return null;
        }

        return $value;
    }
911565
public function search( $value )
	{
		if( $value == $this->value )
			return $this;
		else if( $value < $this->value )
		{
			if( $this->left )
				return $this->left->search( $value );
		}
		else if( $value > $this->value )
		{
			if( $this->right )
				return $this->right->search( $value );
		}
		return NULL;
	}
28057
private function filter(string $value) : string
    {
        foreach ($this->filters as $filter) {
            $value = $filter($value);
        }

        return $value;
    }
288669
public function filter($value)
    {
        /** @var InputFilterInterface $filter */
        foreach ($this->filters as $filter) {
            if (true === is_array($value)) {
                $values = array();
                foreach ($value as $child) {
                    if (null !== $filtered = $filter->filter($child)) {
                        $values[] = $filtered;
                    }
                }
                $value = $values;
            } else {
                $value = $filter->filter($value);
            }
        }

        return $value;
    }
321902
public function filter($value)
    {
        $isInternalAllowed = $this->builder->isVisibilityAllowed(Settings::VISIBILITY_INTERNAL);
        if ($isInternalAllowed) {
            $value->setDescription(preg_replace('/\{@internal\s(.+?)\}\}/', '$1', $value->getDescription()));

            return $value;
        }

        // remove inline @internal tags
        $value->setDescription(preg_replace('/\{@internal\s(.+?)\}\}/', '', $value->getDescription()));

        // if internal elements are not allowed; filter this element
        if ($value->getTags()->get('internal')) {
            return null;
        }

        return $value;
    }
25900
public function filter($value)
    {
        if (!is_scalar($value)) {
            return $value;
        }
        $value = (string) $value;

        if (null !== $this->getEncoding()) {
            return mb_strtolower($value, $this->options['encoding']);
        }

        return strtolower($value);
    }
625882
public function filter($value)
    {
        if (!is_string($value)) {
            return $value;
        }

        return json_decode($value, $this->assoc, $this->depth, $this->options);
    }
203296
public function filterValues($name, $value)
    {
        return $this->filter(function (EntityInterface $entity) use ($name, $value) {
            return $entity->getByName($name) === $value;
        });
    }
1154166
public function findByApiKey( $value )
    {

        $apiOptions = $this->__get('apiOptions');

        if( !isset( $apiOptions['findByKey'] ) ) {
            return $this->find( $value, true );
        }

        $property = $apiOptions['findByKey'];

        $filter = $this->getFindFilterFactory()
            ->get( $property, null, $value );

        return $this->findByFilterComponents(
            FindFilterComponentFactory::FIND_ONE,
            array( $property => $filter ),
            self::ALL
        );

    }
1355551
public function filter($value)
    {
        $filtered = parent::filter($value);
        return null === $filtered ? false : $filtered;
    }
1090130
public function filter($value)
    {
        if (!is_scalar($value) && !is_array($value)) {
            return $value;
        }

        if ($this->options['pattern'] === null) {
            throw new Exception\RuntimeException(sprintf(
                'Filter %s does not have a valid pattern set',
                get_class($this)
            ));
        }

        return preg_replace($this->options['pattern'], $this->options['replacement'], $value);
    }
738419
public function filter($value)
    {
        if (!is_scalar($value)) {
            return $value;
        }
        $value = (string) $value;

        return dirname($value);
    }
1255852
public function name(string $value = null)
    {
        if (null === $value) {
            return $this->name;
        }
        $this->name = $value;
        return $this;
    }
1343080
public function filter($value)
    {
        $filtered = null;
        if (!$this->validate($value, $filtered))
        {
            throw new \InvalidArgumentException(
                "Not a valid value for " . $this->__toString() . ": " . WF::str($value)
            );
        }

        return $filtered;
    }
187766
public function filter($value)
    {
        return is_array($value) ? array_map(array($this, __FUNCTION__), $value) : stripslashes($value);
    }
771525
public function getOptionByValue($value)
    {
        // walk all options
        foreach ($this->options as $option) {
            if ($option instanceof Option) {
                if ($option->getValue() == $value) {
                    return $option;
                }
            } else {
                if ($option instanceof Optgroup) {
                    $options = $option->getOptions();
                    foreach ($options as $option2) {
                        if ($option2->getValue() == $value) {
                            return $option2;
                        }
                    }
                }
            }
        }

        return null;
    }