<?php
namespace SabaiApps\Framework\Criteria;

/**
 * Interface for visitor classes used in the criteria evaluation visitor pattern.
 * Defines methods for visiting different types of criteria.
 */
interface IVisitor {

	/**
	 * Visits a CompositeCriteria object.
	 *
	 * @param CompositeCriteria $criteria The composite criteria instance.
	 * @param mixed             $valuePassed Value to pass to the visitor.
	 * @return mixed
	 */
	public function visitCriteriaComposite( CompositeCriteria $criteria, &$valuePassed );

	/**
	 * Visits a CompositeNotCriteria object.
	 *
	 * @param CompositeNotCriteria $criteria The NOT composite criteria instance.
	 * @param mixed                $valuePassed Value to pass to the visitor.
	 * @return mixed
	 */
	public function visitCriteriaCompositeNot( CompositeNotCriteria $criteria, &$valuePassed );


	/**
	 * Visits a ContainsCriteria object.
	 *
	 * @param ContainsCriteria $criteria The contains criteria instance.
	 * @param mixed            $valuePassed Value to pass to the visitor.
	 * @return mixed
	 */
	public function visitCriteriaContains( ContainsCriteria $criteria, &$valuePassed );

	/**
	 * Visits an EmptyCriteria object.
	 *
	 * @param EmptyCriteria $criteria The empty criteria instance.
	 * @param mixed         $valuePassed Value to pass to the visitor.
	 * @return mixed
	 */
	public function visitCriteriaEmpty( EmptyCriteria $criteria, &$valuePassed );

	/**
	 * Visits a NotContainsCriteria object.
	 *
	 * @param ContainsCriteria $criteria The not contains criteria instance.
	 * @param mixed            $valuePassed Value to pass to the visitor.
	 * @return mixed
	 */
	public function visitCriteriaNotContains( ContainsCriteria $criteria, &$valuePassed );

	/**
	 * Visits a StartsWithCriteria object.
	 *
	 * @param StartsWithCriteria $criteria The starts with criteria instance.
	 * @param mixed              $valuePassed Value to pass to the visitor.
	 * @return mixed
	 */
	public function visitCriteriaStartsWith( StartsWithCriteria $criteria, &$valuePassed );

	/**
	 * Visits an EndsWithCriteria object.
	 *
	 * @param EndsWithCriteria $criteria The ends with criteria instance.
	 * @param mixed            $valuePassed Value to pass to the visitor.
	 * @return mixed
	 */
	public function visitCriteriaEndsWith( EndsWithCriteria $criteria, &$valuePassed );

	/**
	 * Visits an InCriteria object.
	 *
	 * @param InCriteria $criteria The in criteria instance.
	 * @param mixed      $valuePassed Value to pass to the visitor.
	 * @return mixed
	 */
	public function visitCriteriaIn( InCriteria $criteria, &$valuePassed );

	/**
	 * Visits a NotInCriteria object.
	 *
	 * @param NotInCriteria $criteria The not in criteria instance.
	 * @param mixed         $valuePassed Value to pass to the visitor.
	 * @return mixed
	 */
	public function visitCriteriaNotIn( NotInCriteria $criteria, &$valuePassed );

	/**
	 * Visits an IsNullCriteria object.
	 *
	 * @param IsNullCriteria $criteria The is null criteria instance.
	 * @param mixed          $valuePassed Value to pass to the visitor.
	 * @return mixed
	 */
	public function visitCriteriaIsNull( IsNullCriteria $criteria, &$valuePassed );

	/**
	 * Visits an IsNotNullCriteria object.
	 *
	 * @param IsNotNullCriteria $criteria The is not null criteria instance.
	 * @param mixed             $valuePassed Value to pass to the visitor.
	 * @return mixed
	 */
	public function visitCriteriaIsNotNull( IsNotNullCriteria $criteria, &$valuePassed );

	/**
	 * Visits an IsCriteria object.
	 *
	 * @param IsCriteria $criteria The is criteria instance.
	 * @param mixed      $valuePassed Value to pass to the visitor.
	 * @return mixed
	 */
	public function visitCriteriaIs( IsCriteria $criteria, &$valuePassed );

	/**
	 * Visits an IsNotCriteria object.
	 *
	 * @param IsNotCriteria $criteria The is not criteria instance.
	 * @param mixed         $valuePassed Value to pass to the visitor.
	 * @return mixed
	 */
	public function visitCriteriaIsNot( IsNotCriteria $criteria, &$valuePassed );

	/**
	 * Visits an IsSmallerThanCriteria object.
	 *
	 * @param IsSmallerThanCriteria $criteria The is smaller than criteria instance.
	 * @param mixed                 $valuePassed Value to pass to the visitor.
	 * @return mixed
	 */
	public function visitCriteriaIsSmallerThan( IsSmallerThanCriteria $criteria, &$valuePassed );

	/**
	 * Visits an IsGreaterThanCriteria object.
	 *
	 * @param IsGreaterThanCriteria $criteria The is greater than criteria instance.
	 * @param mixed                 $valuePassed Value to pass to the visitor.
	 * @return mixed
	 */
	public function visitCriteriaIsGreaterThan( IsGreaterThanCriteria $criteria, &$valuePassed );

	/**
	 * Visits an IsOrSmallerThanCriteria object.
	 *
	 * @param IsOrSmallerThanCriteria $criteria The is or smaller than criteria instance.
	 * @param mixed                   $valuePassed Value to pass to the visitor.
	 * @return mixed
	 */
	public function visitCriteriaIsOrSmallerThan( IsOrSmallerThanCriteria $criteria, &$valuePassed );

	/**
	 * Visits an IsOrGreaterThanCriteria object.
	 *
	 * @param IsOrGreaterThanCriteria $criteria The is or greater than criteria instance.
	 * @param mixed                   $valuePassed Value to pass to the visitor.
	 * @return mixed
	 */
	public function visitCriteriaIsOrGreaterThan( IsOrGreaterThanCriteria $criteria, &$valuePassed );

	/**
	 * Visits an IsFieldCriteria object.
	 *
	 * @param IsFieldCriteria $criteria The is field criteria instance.
	 * @param mixed           $valuePassed Value to pass to the visitor.
	 * @return mixed
	 */
	public function visitCriteriaIsField( IsFieldCriteria $criteria, &$valuePassed );

	/**
	 * Visits an IsNotFieldCriteria object.
	 *
	 * @param IsNotFieldCriteria $criteria The is not field criteria instance.
	 * @param mixed              $valuePassed Value to pass to the visitor.
	 * @return mixed
	 */
	public function visitCriteriaIsNotField( IsNotFieldCriteria $criteria, &$valuePassed );

	/**
	 * Visits an IsSmallerThanFieldCriteria object.
	 *
	 * @param IsSmallerThanFieldCriteria $criteria The is smaller than field criteria instance.
	 * @param mixed                      $valuePassed Value to pass to the visitor.
	 * @return mixed
	 */
	public function visitCriteriaIsSmallerThanField( IsSmallerThanFieldCriteria $criteria, &$valuePassed );

	/**
	 * Visits an IsGreaterThanFieldCriteria object.
	 *
	 * @param IsGreaterThanFieldCriteria $criteria The is greater than field criteria instance.
	 * @param mixed                      $valuePassed Value to pass to the visitor.
	 * @return mixed
	 */
	public function visitCriteriaIsGreaterThanField( IsGreaterThanFieldCriteria $criteria, &$valuePassed );

	/**
	 * Visits an IsOrSmallerThanFieldCriteria object.
	 *
	 * @param IsOrSmallerThanFieldCriteria $criteria The is or smaller than field criteria instance.
	 * @param mixed                        $valuePassed Value to pass to the visitor.
	 * @return mixed
	 */
	public function visitCriteriaIsOrSmallerThanField( IsOrSmallerThanFieldCriteria $criteria, &$valuePassed );

	/**
	 * Visits an IsOrGreaterThanFieldCriteria object.
	 *
	 * @param IsOrGreaterThanFieldCriteria $criteria The is or greater than field criteria instance.
	 * @param mixed                        $valuePassed Value to pass to the visitor.
	 * @return mixed
	 */
	public function visitCriteriaIsOrGreaterThanField( IsOrGreaterThanFieldCriteria $criteria, &$valuePassed );
}
