src/Genesis/API/Request.php
protected function verifyConditionalFields()
    {
        if (isset($this->requiredFieldsOR)) {
            $fields = $this->requiredFieldsOR->getArrayCopy();

            $status = false;

            foreach ($fields as $fieldName) {
                if (isset($this->$fieldName) && !empty($this->$fieldName)) {
                    $status = true;
                }
            }

            if (!$status) {
                throw new \Genesis\Exceptions\ErrorParameter(implode($fields));
            }
        }
    }
protected function verifyConditionalFields()
    {
        if (isset($this->requiredFieldsOR)) {
            $fields = $this->requiredFieldsOR->getArrayCopy();

            $status = false;

            foreach ($fields as $fieldName) {
                if (isset($this->$fieldName) && !empty($this->$fieldName)) {
                    $status = true;
                }
            }

            if (!$status) {
                throw new \Genesis\Exceptions\ErrorParameter(implode($fields));
            }
        }
    }
protected function verifyConditionalFields ( ) { if ( isset ( $ this -> requiredFieldsOR ) ) { $ fields = $ this -> requiredFieldsOR -> getArrayCopy ( ) ; $ status = false ; foreach ( $ fields as $ fieldName ) { if ( isset ( $ this -> $ fieldName ) && ! empty ( $ this -> $ fieldName ) ) { $ status = true ; } } if ( ! $ status ) { throw new \ Genesis \ Exceptions \ ErrorParameter ( implode ( $ fields ) ) ; } } }
Verify conditional requirement, where either one of the fields are populated

@throws \Genesis\Exceptions\ErrorParameter
Verify conditional requirement where either one of the fields are populated