yf_db_utils_helper_foreign_key class| File | plugins/db/classes/db/yf_db_utils_helper_foreign_key.class.php |
|---|---|
| Use | _class('db_utils_helper_foreign_key', 'classes/db/') |
| Property | Default | Description |
|---|---|---|
| None declared in this class. | ||
public function add(array $fields, $ref_table, array $ref_fields, $extra = [], &$error = false)
$fields array$ref_fields array public function add(array $fields, $ref_table, array $ref_fields, $extra = [], &$error = false)
{
return $this->utils->add_foreign_key($this->db_name . '.' . $this->table, $this->foreign_key, $fields, $ref_table, $ref_fields, $extra, $error);
}
public function drop($extra = [], &$error = false)
public function drop($extra = [], &$error = false)
{
return $this->utils->drop_foreign_key($this->db_name . '.' . $this->table, $this->foreign_key, $extra, $error);
}
public function exists($extra = [], &$error = false)
public function exists($extra = [], &$error = false)
{
return $this->utils->foreign_key_exists($this->db_name . '.' . $this->table, $this->foreign_key, $error, $extra);
}
public function info($extra = [], &$error = false)
public function info($extra = [], &$error = false)
{
return $this->utils->foreign_key_info($this->db_name . '.' . $this->table, $this->foreign_key, $error);
}
public function update(array $fields, $ref_table, array $ref_fields, $extra = [], &$error = false)
$fields array$ref_fields array public function update(array $fields, $ref_table, array $ref_fields, $extra = [], &$error = false)
{
return $this->utils->update_foreign_key($this->db_name . '.' . $this->table, $this->foreign_key, $fields, $ref_table, $ref_fields, $extra, $error);
}
_ hooks and helpers; not routable as page actionspublic function __call($name, $args)
Catch missing method call.
public function __call($name, $args)
{
return main()->extend_call($this, $name, $args);
}
public function __clone()
We cleanup object properties when cloning.
public function __clone()
{
foreach ((array) get_object_vars($this) as $k => $v) {
$this->$k = null;
}
}
public function _setup($params)
public function _setup($params)
{
foreach ($params as $k => $v) {
$this->$k = $v;
}
return $this;
}