Class Phalcon\Db\Reference

implements Phalcon\Db\ReferenceInterface

Allows to define reference constraints on tables

  1. <?php
  2. $reference = new \Phalcon\Db\Reference("field_fk", array(
  3. 'referencedSchema' => "invoicing",
  4. 'referencedTable' => "products",
  5. 'columns' => array("product_type", "product_code"),
  6. 'referencedColumns' => array("type", "code")
  7. ));

Methods

public getName ()

Constraint name

public getSchemaName ()

public getReferencedSchema ()

public getReferencedTable ()

Referenced Table

public getColumns ()

Local reference columns

public getReferencedColumns ()

Referenced Columns

public getOnDelete ()

ON DELETE

public getOnUpdate ()

ON UPDATE

public __construct (unknown $name, unknown $definition)

Phalcon\Db\Reference constructor

public static Phalcon\Db\Reference __set_state (unknown $data)

Restore a Phalcon\Db\Reference object from export