Sign in Registration
ruen

.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

Popular sections

Communication

Login to the web version
Android app:
Available on Google Play

Share this

Subscribe to

YouTube