src/FreeFW/Model/Query.php
public function addSimpleCondition(string $p_operator, string $p_left, $p_right = null)
    {
        /**
         * condition
         * @var \FreeFW\Model\Condition $condition
         */
        $condition = \FreeFW\DI\DI::get('FreeFW::Model::Condition');
        $left = null;
        if (strpos($p_left, '::Model::') !== false) {
            $left = new \FreeFW\Model\ConditionMember();
            $left->setField($p_left);
        } else {
            $left = new \FreeFW\Model\ConditionValue();
            $left->setField($p_left);
        }
        $right = null;
        if ($p_right !== null) {
            if (strpos($p_right, '::Model::') !== false) {
                $right = new \FreeFW\Model\ConditionMember();
                $right->setField($p_right);
            } else {
                $right = new \FreeFW\Model\ConditionValue();
                $right->setField($p_right);
            }
        }
        $condition
            ->setLeftMember($left)
            ->setOperator($p_operator)
        ;
        if ($right !== null) {
            $condition->setRightMember($right);
        }
        return $this->addCondition($condition);
    }
public function addSimpleCondition(string $p_operator, string $p_left, $p_right = null)
    {
        /**
         * condition
         * @var \FreeFW\Model\Condition $condition
         */
        $condition = \FreeFW\DI\DI::get('FreeFW::Model::Condition');
        $left = null;
        if (strpos($p_left, '::Model::') !== false) {
            $left = new \FreeFW\Model\ConditionMember();
            $left->setField($p_left);
        } else {
            $left = new \FreeFW\Model\ConditionValue();
            $left->setField($p_left);
        }
        $right = null;
        if ($p_right !== null) {
            if (strpos($p_right, '::Model::') !== false) {
                $right = new \FreeFW\Model\ConditionMember();
                $right->setField($p_right);
            } else {
                $right = new \FreeFW\Model\ConditionValue();
                $right->setField($p_right);
            }
        }
        $condition
            ->setLeftMember($left)
            ->setOperator($p_operator)
        ;
        if ($right !== null) {
            $condition->setRightMember($right);
        }
        return $this->addCondition($condition);
    }
public function addSimpleCondition ( string $ p_operator , string $ p_left , $ p_right = null ) { /**
         * condition
         * @var \FreeFW\Model\Condition $condition
         */ $ condition = \ FreeFW \ DI \ DI :: get ( 'FreeFW::Model::Condition' ) ; $ left = null ; if ( strpos ( $ p_left , '::Model::' ) !== false ) { $ left = new \ FreeFW \ Model \ ConditionMember ( ) ; $ left -> setField ( $ p_left ) ; } else { $ left = new \ FreeFW \ Model \ ConditionValue ( ) ; $ left -> setField ( $ p_left ) ; } $ right = null ; if ( $ p_right !== null ) { if ( strpos ( $ p_right , '::Model::' ) !== false ) { $ right = new \ FreeFW \ Model \ ConditionMember ( ) ; $ right -> setField ( $ p_right ) ; } else { $ right = new \ FreeFW \ Model \ ConditionValue ( ) ; $ right -> setField ( $ p_right ) ; } } $ condition -> setLeftMember ( $ left ) -> setOperator ( $ p_operator ) ; if ( $ right !== null ) { $ condition -> setRightMember ( $ right ) ; } return $ this -> addCondition ( $ condition ) ; }
Add simple condition

@param string $p_operator
@param string $p_left
@param mixed  $p_right

@return \FreeFW\Model\Query
Add simple condition