CakePHP
  • Documentation
    • Book
    • API
    • Videos
    • Reporting Security Issues
    • Privacy Policy
    • Logos & Trademarks
  • Business Solutions
  • Swag
  • Road Trip
  • Team
  • Community
    • Community
    • Get Involved
    • Issues (Github)
    • Bakery
    • Featured Resources
    • Training
    • Meetups
    • My CakePHP
    • CakeFest
    • Newsletter
    • Linkedin
    • YouTube
    • Facebook
    • Twitter
    • Mastodon
    • Help & Support
    • Forum
    • Stack Overflow
    • IRC
    • Slack
    • Paid Support
CakePHP

C CakePHP 5.0 Chiffon API

  • Project:
    • CakePHP
      • CakePHP
      • Authentication
      • Authorization
      • Chronos
      • Elastic Search
      • Queue
  • Version:
    • 5.0
      • 5.2
      • 5.1
      • 5.0
      • 4.6
      • 4.5
      • 4.4
      • 4.3
      • 4.2
      • 4.1
      • 4.0
      • 3.10
      • 3.9
      • 3.8
      • 3.7
      • 3.6
      • 3.5
      • 3.4
      • 3.3
      • 3.2
      • 3.1
      • 3.0
      • 2.10
      • 2.9
      • 2.8
      • 2.7
      • 2.6
      • 2.5
      • 2.4
      • 2.3
      • 2.2
      • 2.1
      • 2.0
      • 1.3
      • 1.2

Namespaces

  • Global
  • Cake
    • Cache
    • Collection
    • Command
    • Console
    • Controller
    • Core
    • Database
    • Datasource
      • Exception
      • Locator
      • Paging
    • Error
    • Event
    • Form
    • Http
    • I18n
    • Log
    • Mailer
    • Network
    • ORM
    • Routing
    • TestSuite
    • Utility
    • Validation
    • View

Interface InvalidPropertyInterface

Describes the methods that any class representing a data storage should comply with.

Namespace: Cake\Datasource

Method Summary

  • getInvalid() public

    Get a list of invalid fields and their data for errors upon validation/patching

  • getInvalidField() public

    Get a single value of an invalid field. Returns null if not set.

  • setInvalid() public

    Set fields as invalid and not patchable into the entity.

  • setInvalidField() public

    Sets a field as invalid and not patchable into the entity.

Method Detail

getInvalid() ¶ public

getInvalid(): array

Get a list of invalid fields and their data for errors upon validation/patching

Returns
array

getInvalidField() ¶ public

getInvalidField(string $field): mixed|null

Get a single value of an invalid field. Returns null if not set.

Parameters
string $field

The name of the field.

Returns
mixed|null

setInvalid() ¶ public

setInvalid(array<string, mixed> $fields, bool $overwrite = false): $this

Set fields as invalid and not patchable into the entity.

This is useful for batch operations when one needs to get the original value for an error message after patching. This value could not be patched into the entity and is simply copied into the _invalid property for debugging purposes or to be able to log it away.

Parameters
array<string, mixed> $fields

The values to set.

bool $overwrite optional

Whether to overwrite pre-existing values for $field.

Returns
$this

setInvalidField() ¶ public

setInvalidField(string $field, mixed $value): $this

Sets a field as invalid and not patchable into the entity.

Parameters
string $field

The value to set.

mixed $value

The invalid value to be set for $field.

Returns
$this
OpenHub
Pingping
Linode
  • Business Solutions
  • Showcase
  • Documentation
  • Book
  • API
  • Videos
  • Reporting Security Issues
  • Privacy Policy
  • Logos & Trademarks
  • Community
  • Get Involved
  • Issues (Github)
  • Bakery
  • Featured Resources
  • Training
  • Meetups
  • My CakePHP
  • CakeFest
  • Newsletter
  • Linkedin
  • YouTube
  • Facebook
  • Twitter
  • Mastodon
  • Help & Support
  • Forum
  • Stack Overflow
  • IRC
  • Slack
  • Paid Support

Generated using CakePHP API Docs