phalcon:model 事件与事件管理器
事件与事件管理器(Events and Events Manager)¶
Models allow you to implement events that will be thrown when performing an insert/update/delete. They help define business rules for a certain model. The following are the events supported by Phalcon\Mvc\Model and their order of execution:
Operation | Name | Can stop operation? | Explanation |
---|---|---|---|
Inserting/Updating | beforeValidation | YES | Is executed before the fields are validated for not nulls/empty strings or foreign keys |
Inserting | beforeValidationOnCreate | YES | Is executed before the fields are validated for not nulls/empty strings or foreign keys when an insertion operation is being made |
Updating | beforeValidationOnUpdate | YES | Is executed before the fields are validated for not nulls/empty strings or foreign keys when an updating operation is being made |
Inserting/Updating | onValidationFails | YES (already stopped) | Is executed after an integrity validator fails |
Inserting | afterValidationOnCreate | YES | Is executed after the fields are validated for not nulls/empty strings or foreign keys when an insertion operation is being made |
Updating | afterValidationOnUpdate | YES | Is executed after the fields are validated for not nulls/empty strings or foreign keys when an updating operation is being made |
Inserting/Updating | afterValidation | YES | Is executed after the fields are validated for not nulls/empty strings or foreign keys |
Inserting/Updating | beforeSave | YES | Runs before the required operation over the database system |
Updating | beforeUpdate | YES | Runs before the required operation over the database system only when an updating operation is being made |
Inserting | beforeCreate | YES | Runs before the required operation over the database system only when an inserting operation is being made |
Updating | afterUpdate | NO | Runs after the required operation over the database system only when an updating operation is being made |
Inserting | afterCreate | NO | Runs after the required operation over the database system only when an inserting operation is being made |
Inserting/Updating | afterSave | NO | Runs after the required operation over the database system |
phalcon:model 事件与事件管理器相关推荐
- python kivy事件_python – Kivy:使用on_press事件更改屏幕管理器中的屏幕
实现此目的的一种简单方法是定义您自己的按钮子类: class ScreenButton(Button): screenmanager = ObjectProperty() def on_press(s ...
- django 1.8 官方文档翻译: 2-5-1 管理器 (初稿)
Django 文档协作翻译小组人手紧缺,有兴趣的朋友可以加入我们,完全公益性质. 交流群:467338606 网站:http://python.usyiyi.cn/django/index.html ...
- django 1.8 官方文档翻译: 2-5-1 管理器
管理器 class Manager 管理器是一个接口,数据库查询操作通过它提供给django的模型.django应用的每个模型至少拥有一个 管理器. 管理器类的工作方式在 执行查询文档中阐述,而这篇文 ...
- Java-GUI编程实战之管理系统 Day2【Swing(组件介绍、布局管理器、事件类及监听器类)、基础组件按钮和输入框的用法】
视频.课件.源码[链接:https://pan.baidu.com/s/13ffqGDzH-DZib6-MFViW3Q 提取码:zjxs] Java-GUI编程实战之管理系统 Day1[项目开发流程. ...
- [Unity] ACT 战斗系统学习 1:基于委托的事件管理器
我觉得看视频太慢了,还是看别人源码更快-- 1.664235822/DarkSouls-Demo Github 源码: https://github.com/664235822/DarkSouls-D ...
- [cocos2dx笔记010]用于UI的事件管理器
cocos2dx有一个编辑器:cocostudio.眼下来说,已经是比較好用了.仅仅要载入导出的资源.就能够用上了.省去手动搭建面的麻烦. 可是.非常多须要事件的地方,操作比較麻烦,所以这里提供一个事 ...
- Angular 4.x 事件管理器及自定义EventManagerPlugin
在 Angular 中如何为同一个表达式绑定多个事件呢?如果我们这样做可能会是这样的: <div><button (click, mouseover)="onClick() ...
- java/05/(Swing包)窗体,组件,布局管理器,面板,监听事件
java/05/Swing包(窗体) Swing特点: 原来的AWT组件来自java.awt包,当含有AWT组件的java应用程序在不同的平台上执行时,每个平台的GUI组件的显示会有所不同,但是在不同 ...
- [OHIF-Viewers]医疗数字阅片-医学影像-事件总线管理器
[OHIF-Viewers]医疗数字阅片-医学影像-事件总线管理器 添加按钮>调用命令>注册回调函数 App.js import React, { Component } from 're ...
最新文章
- 4.1 什么是人脸识别-深度学习第四课《卷积神经网络》-Stanford吴恩达教授
- MySQL在多表上创建视图
- IDEA 的文件夹的类型说明
- 泛型委托Action与ActionT
- 10种轻量级人脸检测算法大PK
- C++字符串与C字符串的相互转换问题
- 客户端地图拼图算法解析
- paip.输出内容替换在Apache 过滤器filter的设置
- 设置表格单元格的背景颜色
- C-V2X灵魂拷问:爆发 | 挑战 | 价值 | 盈利 | 竞合 | 引领
- Jquery Mobile dialog的生命周期 - 落叶潇潇雨 - 博客园
- 要只看每日减少的新增数量,别忘了疫情最开始的时候可能也只有几个人患病
- 4.卡尔曼滤波之卡尔曼滤波的基本方程
- MySQL基础(附练习题+答案)
- 光猫 DHCP服务器未响应,案例分享--光猫手工设置后死机的原因之一
- Pytorch安装(Anaconda配置虚拟环境)(cpu版)
- java-net-php-python-springtboot校园信息交流互助系统计算机毕业设计程序
- CHIL-SQL-JOIN
- js获取随机色,也可以 指定获取 深色 or 浅色。
- C# 内嵌 浏览器 CEF 、FireFox、Miniblink
热门文章
- 云服务器软件运行出错,云服务器程序运行中出现木马
- rhel6上使用udev配置oracle asm,在RHEL6上用UDEV配置ASM
- mysql 环形主从_【每日一博】MySQL 互为主从(环形结构)_MySQL
- 斐波那契数列-爬楼梯算法
- linux已使用线程,在Linux中使用线程
- java添加关闭窗口事件_Java开发网 - 如何给JInternalFrame类的窗口添加关闭事件?...
- android windowmanager 无法传递事件_面试常客:Intent 能传递多大 Size 的数据?| 附阿里的建议方案!...
- Android的清单文件添加百度地图SDK
- Windows 10 设定静态路由
- 现代ups电源及电路图集_不间断电源维修,服务靠谱