private function checkModel($row, $preSave = false) {
        if (!is_array($row) && !is_object($row))
                throw new Exception('Each element of param $where must be an object of, or one that extends, "DBScribe\Row", or an array of [column => value]: ' . print_r($row,
                    true));

        if (empty($this->columns)) return array();

        if (is_array($row)) {
            return $row;
        }
        elseif (is_object($row) && get_class($row) === 'DBScribe\Row' || in_array('DBScribe\Row',
                        class_parents($row))) {
            if ($preSave) $row->preSave();

            $this->rowModelInUse = $row;
            return $row->toArray(($this->current !== self::OP_SELECT));
        }
    }
private function checkModel($row, $preSave = false) {
        if (!is_array($row) && !is_object($row))
                throw new Exception('Each element of param $where must be an object of, or one that extends, "DBScribe\Row", or an array of [column => value]: ' . print_r($row,
                    true));

        if (empty($this->columns)) return array();

        if (is_array($row)) {
            return $row;
        }
        elseif (is_object($row) && get_class($row) === 'DBScribe\Row' || in_array('DBScribe\Row',
                        class_parents($row))) {
            if ($preSave) $row->preSave();

            $this->rowModelInUse = $row;
            return $row->toArray(($this->current !== self::OP_SELECT));
        }
    }
private function checkModel ( $ row , $ preSave = false ) { if ( ! is_array ( $ row ) && ! is_object ( $ row ) ) throw new Exception ( 'Each element of param $where must be an object of, or one that extends, "DBScribe\Row", or an array of [column => value]: ' . print_r ( $ row , true ) ) ; if ( empty ( $ this -> columns ) ) return array ( ) ; if ( is_array ( $ row ) ) { return $ row ; } elseif ( is_object ( $ row ) && get_class ( $ row ) === 'DBScribe\Row' || in_array ( 'DBScribe\Row' , class_parents ( $ row ) ) ) { if ( $ preSave ) $ row -> preSave ( ) ; $ this -> rowModelInUse = $ row ; return $ row -> toArray ( ( $ this -> current !== self :: OP_SELECT ) ) ; } }
Checks if the row is a valid \DBScribe\Row row
@param array|object $row
@param boolean $preSave Indicates whether to call the presave function of the row
@throws Exception
@return array|boolean
Checks if the row is a valid \ DBScribe \ Row row