db/SqlBuilder.php
/**
     * Retrieve select field names and where field names from object for SQL select, or
     * Retrieve where field names for SQL delete. rules:
     * for select fields: value===TRUE, if no select fields, use '*'
     * for where fields: has valid value
     * @param object $object
     */
Retrieve select field names and where field names from object for SQL select, or
Retrieve where field names for SQL delete. rules:
for select fields: value===TRUE, if no select fields, use '*'
for where fields: has valid value
@param object $object
Retrieve select field names and where field names from object for SQL select or Retrieve where field names for SQL delete . rules : for select fields : value === TRUE if no select fields use ' * ' for where fields : has valid value @param object $object
private function object2RdFields($object, $set_r_fields = FALSE) {
        if (! is_object($object)) {
            throw new \InvalidArgumentException('Invalid object for r_fields');
        }
        $this->withData($object);
        $all_vars = get_object_vars($object);
        if (! $all_vars) {
            throw new \InvalidArgumentException('Empty object for r_fields');
        }
        if ($set_r_fields) {
            $r_fields = array();
        }
        $where_fields = array();
        foreach ($all_vars as $field => $value) {
            if ($set_r_fields && $value === TRUE) {
                $r_fields[] = $field;
                continue;
            }
            if ($this->isFieldHasNoData($value, $field)) {
                continue;
            }
            $where_fields[] = $field;
        }
        if ($set_r_fields) {
            $this->_cru_fields = $r_fields ? $r_fields : '*';
        }
        $this->where(FALSE, $where_fields);
        return $this;
    }
private function object2RdFields ( $ object , $ set_r_fields = FALSE ) { if ( ! is_object ( $ object ) ) { throw new \ InvalidArgumentException ( 'Invalid object for r_fields' ) ; } $ this -> withData ( $ object ) ; $ all_vars = get_object_vars ( $ object ) ; if ( ! $ all_vars ) { throw new \ InvalidArgumentException ( 'Empty object for r_fields' ) ; } if ( $ set_r_fields ) { $ r_fields = array ( ) ; } $ where_fields = array ( ) ; foreach ( $ all_vars as $ field => $ value ) { if ( $ set_r_fields && $ value === TRUE ) { $ r_fields [ ] = $ field ; continue ; } if ( $ this -> isFieldHasNoData ( $ value , $ field ) ) { continue ; } $ where_fields [ ] = $ field ; } if ( $ set_r_fields ) { $ this -> _cru_fields = $ r_fields ? $ r_fields : '*' ; } $ this -> where ( FALSE , $ where_fields ) ; return $ this ; }
Retrieve select field names and where field names from object for SQL select, or
 Retrieve where field names for SQL delete.
Retrieve select field names and where field names from object for SQL select or Retrieve where field names for SQL delete .