CakePHP
  • Documentation
    • Book
    • API
    • Videos
    • Logos & Trademarks
  • Business Solutions
  • Swag
  • Road Trip
  • Team
  • Community
    • Community
    • Team
    • Issues (Github)
    • YouTube Channel
    • Get Involved
    • Bakery
    • Featured Resources
    • Newsletter
    • Certification
    • My CakePHP
    • CakeFest
    • Facebook
    • Twitter
    • Help & Support
    • Forum
    • Stack Overflow
    • IRC
    • Slack
    • Paid Support
CakePHP

C CakePHP 3.0 Red Velvet API

  • Overview
  • Tree
  • Deprecated
  • Version:
    • 3.0
      • 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

  • Cake
    • Auth
    • Cache
      • Engine
    • Collection
      • Iterator
    • Console
      • Exception
    • Controller
      • Component
      • Exception
    • Core
      • Configure
        • Engine
      • Exception
    • Database
      • Driver
      • Exception
      • Expression
      • Schema
      • Statement
      • Type
    • Datasource
      • Exception
    • Error
    • Event
    • Filesystem
    • Form
    • I18n
      • Formatter
      • Parser
    • Log
      • Engine
    • Network
      • Email
      • Exception
      • Http
        • Adapter
        • Auth
        • FormData
      • Session
    • ORM
      • Association
      • Behavior
        • Translate
      • Exception
      • Rule
    • Routing
      • Exception
      • Filter
      • Route
    • Shell
      • Task
    • TestSuite
      • Fixture
      • Stub
    • Utility
      • Exception
    • Validation
    • View
      • Exception
      • Form
      • Helper
      • Widget
  • None

Classes

  • ExistsIn
  • IsUnique

Class IsUnique

Checks that a list of fields from an entity are unique in the table

Namespace: Cake\ORM\Rule
Location: ORM/Rule/IsUnique.php

Properties summary

  • $_fields protected
    array
    The list of fields to check

Method Summary

  • __construct() public
    Constructor.
  • __invoke() public
    Performs the uniqueness check
  • _alias() protected
    Add a model alias to all the keys in a set of conditions.

Method Detail

__construct() public ¶

__construct( array $fields )

Constructor.

Parameters
array $fields
The list of fields to check uniqueness for

__invoke() public ¶

__invoke( Cake\Datasource\EntityInterface $entity , array $options )

Performs the uniqueness check

Parameters
Cake\Datasource\EntityInterface $entity
The entity from where to extract the fields
array $options

Options passed to the check, where the repository key is required.

Returns
boolean

_alias() protected ¶

_alias( string $alias , array $conditions )

Add a model alias to all the keys in a set of conditions.

Parameters
string $alias
The alias to add.
array $conditions
The conditions to alias.
Returns
array

Properties detail

$_fields ¶

protected array

The list of fields to check

Follow @CakePHP
#IRC
OpenHub
Rackspace
  • Business Solutions
  • Showcase
  • Documentation
  • Book
  • API
  • Videos
  • Logos & Trademarks
  • Community
  • Team
  • Issues (Github)
  • YouTube Channel
  • Get Involved
  • Bakery
  • Featured Resources
  • Newsletter
  • Certification
  • My CakePHP
  • CakeFest
  • Facebook
  • Twitter
  • Help & Support
  • Forum
  • Stack Overflow
  • IRC
  • Slack
  • Paid Support

Generated using CakePHP API Docs