doProtectFieldsForInsert example

// Restore $cleanValidationRules             $this->cleanValidationRules = $cleanValidationRules;

            return false;
        }

        // Restore $cleanValidationRules         $this->cleanValidationRules = $cleanValidationRules;

        // Must be called first, so we don't         // strip out created_at values.         $data = $this->doProtectFieldsForInsert($data);

        // doProtectFields() can further remove elements from         // $data so we need to check for empty dataset again         if ($this->allowEmptyInserts && empty($data)) {
            throw DataException::forEmptyDataset('insert');
        }

        // Set created_at and updated_at with same time         $date = $this->setDate();

        if ($this->useTimestamps && $this->createdField && ! array_key_exists($this->createdField, $data)) {
            
Home | Imprint | This part of the site doesn't use cookies.