.service
Table of contents
Files with the service extension are used for service purposes - to describe addresses in the system, api, database tables, and more. Almost every entity should have such files. An example of the exemplary contents of the entity.service file (where entity is the name of the entity):
namespace modules\entity;
class Service {
public $routes = [
// Your routes are here
];
public $api = [
// Your api methods here
];
public $schema = [
// Your database schema is here
];
function get_routes() {
return $this->routes;
}
function get_api() {
return $this->api;
}
function get_schema() {
return $this->schema;
}
install() {
// Actions during install
}
function uninstall() {
// Actions during uninstall
}
enable() {
// Actions during enable
}
disable() {
// Actions during disable
}
}
Оставить заявку
Latest articles
- 03.04.24IT / Уроки PHP Уроки простыми словами. Урок 3. Все операторы PHP с примерами, с выводом работы кода на экран.
- 02.04.24IT / Уроки PHP Уроки простыми словами. Урок 2. Типы данных в PHP с примерами.
- 02.04.24IT / Уроки PHP Уроки простыми словами. Урок 1. Коротко о языке веб-программирования PHP. Основы синтаксиса.
- 09.11.23IT / Database Errors when migrating from MySQL 5.6 to 5.7 and how to fix them - database dump import failed with an error or INSERT does not work. Disabling STRICT_TRANS_TABLES strict mode or using IGNORE
- 08.07.22IT / Misc Convert office files DOC, DOCX, DOCM, RTF to DOCX, DOCM, DOC, RTF, PDF, HTML, XML, TXT formats without loss and markup changes