diff options
author | Yaco <franco@reevo.org> | 2020-06-04 11:01:00 -0300 |
---|---|---|
committer | Yaco <franco@reevo.org> | 2020-06-04 11:01:00 -0300 |
commit | fc7369835258467bf97eb64f184b93691f9a9fd5 (patch) | |
tree | daabd60089d2dd76d9f5fb416b005fbe159c799d /www/crm/wp-content/plugins/civicrm/civicrm/ext/api4/Civi/Api4/Generic/DAOEntity.php |
first commit
Diffstat (limited to 'www/crm/wp-content/plugins/civicrm/civicrm/ext/api4/Civi/Api4/Generic/DAOEntity.php')
-rw-r--r-- | www/crm/wp-content/plugins/civicrm/civicrm/ext/api4/Civi/Api4/Generic/DAOEntity.php | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/www/crm/wp-content/plugins/civicrm/civicrm/ext/api4/Civi/Api4/Generic/DAOEntity.php b/www/crm/wp-content/plugins/civicrm/civicrm/ext/api4/Civi/Api4/Generic/DAOEntity.php new file mode 100644 index 00000000..1ad175da --- /dev/null +++ b/www/crm/wp-content/plugins/civicrm/civicrm/ext/api4/Civi/Api4/Generic/DAOEntity.php @@ -0,0 +1,52 @@ +<?php + +namespace Civi\Api4\Generic; + +/** + * Base class for DAO-based entities. + */ +abstract class DAOEntity extends AbstractEntity { + + /** + * @return DAOGetAction + */ + public static function get() { + return new DAOGetAction(static::class, __FUNCTION__); + } + + /** + * @return DAOGetFieldsAction + */ + public static function getFields() { + return new DAOGetFieldsAction(static::class, __FUNCTION__); + } + + /** + * @return DAOCreateAction + */ + public static function create() { + return new DAOCreateAction(static::class, __FUNCTION__); + } + + /** + * @return DAOUpdateAction + */ + public static function update() { + return new DAOUpdateAction(static::class, __FUNCTION__); + } + + /** + * @return DAODeleteAction + */ + public static function delete() { + return new DAODeleteAction(static::class, __FUNCTION__); + } + + /** + * @return BasicReplaceAction + */ + public static function replace() { + return new BasicReplaceAction(static::class, __FUNCTION__); + } + +} |