├── .circleci └── config.yml ├── .docker ├── 000-default.conf ├── Dockerfile ├── Dockerfile-7.4 ├── Dockerfile-7.4-xdebug ├── Dockerfile-min ├── build.sh ├── docker-compose.yml ├── mpm_prefork.conf ├── mysql.cnf └── php.ini ├── .github ├── .gitkeep ├── CONTRIBUTING.md ├── FUNDING.yml └── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── .gitignore ├── .gitmodules ├── .travis.yml ├── .travis ├── init-php.sh ├── init-php7.sh ├── travis-ci-apache └── www.conf ├── CHANGELOG.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── VERSION ├── autocomplete ├── autocomplete.php ├── config ├── .gitkeep ├── config-example_mysql.json ├── config-example_sqlsrv.json ├── return_types.json ├── routing │ └── .gitkeep ├── schema.json └── widget_types.json ├── ecs.php ├── eq.lib.php ├── equal.run ├── lib └── equal │ ├── access │ └── AccessController.class.php │ ├── auth │ ├── AuthenticationManager.class.php │ └── JWT.class.php │ ├── cron │ └── Scheduler.class.php │ ├── data │ ├── DataFormatter.class.php │ ├── DataGenerator.class.php │ ├── DataValidator.class.php │ └── adapt │ │ ├── AdapterProvider.class.php │ │ ├── DataAdapter.class.php │ │ ├── DataAdapterJson.class.php │ │ ├── DataAdapterProvider.class.php │ │ ├── DataAdapterProviderJson.class.php │ │ ├── DataAdapterProviderSql.class.php │ │ ├── DataAdapterProviderSqlMySql.class.php │ │ ├── DataAdapterProviderSqlSqlSrv.class.php │ │ ├── DataAdapterProviderSqlSqlite.class.php │ │ ├── DataAdapterProviderTxt.class.php │ │ ├── DataAdapterSql.class.php │ │ ├── DataAdapterTxt.class.php │ │ └── adapters │ │ ├── DataAdapterDefault.class.php │ │ ├── json │ │ ├── DataAdapterJsonArray.class.php │ │ ├── DataAdapterJsonBinary.class.php │ │ ├── DataAdapterJsonBoolean.class.php │ │ ├── DataAdapterJsonDate.class.php │ │ ├── DataAdapterJsonDateMonth.class.php │ │ ├── DataAdapterJsonDateTime.class.php │ │ ├── DataAdapterJsonDateYear.class.php │ │ ├── DataAdapterJsonInteger.class.php │ │ ├── DataAdapterJsonReal.class.php │ │ ├── DataAdapterJsonText.class.php │ │ └── DataAdapterJsonTime.class.php │ │ ├── sql │ │ ├── DataAdapterSqlArray.class.php │ │ ├── DataAdapterSqlBinary.class.php │ │ ├── DataAdapterSqlBoolean.class.php │ │ ├── DataAdapterSqlDate.class.php │ │ ├── DataAdapterSqlDateTime.class.php │ │ ├── DataAdapterSqlInteger.class.php │ │ ├── DataAdapterSqlReal.class.php │ │ ├── DataAdapterSqlText.class.php │ │ ├── DataAdapterSqlTime.class.php │ │ ├── mysql │ │ │ ├── DataAdapterSqlArrayMySql.class.php │ │ │ ├── DataAdapterSqlBinaryMySql.class.php │ │ │ ├── DataAdapterSqlBooleanMySql.class.php │ │ │ ├── DataAdapterSqlDateMySql.class.php │ │ │ ├── DataAdapterSqlDateTimeMySql.class.php │ │ │ ├── DataAdapterSqlIntegerMySql.class.php │ │ │ ├── DataAdapterSqlRealMySql.class.php │ │ │ ├── DataAdapterSqlTextMySql.class.php │ │ │ └── DataAdapterSqlTimeMySql.class.php │ │ ├── sqlite │ │ │ ├── DataAdapterSqlArraySqlite.class.php │ │ │ ├── DataAdapterSqlBinarySqlite.class.php │ │ │ ├── DataAdapterSqlBooleanSqlite.class.php │ │ │ ├── DataAdapterSqlDateSqlite.class.php │ │ │ ├── DataAdapterSqlDateTimeSqlite.class.php │ │ │ ├── DataAdapterSqlIntegerSqlite.class.php │ │ │ ├── DataAdapterSqlRealSqlite.class.php │ │ │ ├── DataAdapterSqlTextSqlite.class.php │ │ │ └── DataAdapterSqlTimeSqlite.class.php │ │ └── sqlsrv │ │ │ ├── DataAdapterSqlArraySqlSrv.class.php │ │ │ ├── DataAdapterSqlBinarySqlSrv.class.php │ │ │ ├── DataAdapterSqlBooleanSqlSrv.class.php │ │ │ ├── DataAdapterSqlDateSqlSrv.class.php │ │ │ ├── DataAdapterSqlDateTimeSqlSrv.class.php │ │ │ ├── DataAdapterSqlIntegerSqlSrv.class.php │ │ │ ├── DataAdapterSqlRealSqlSrv.class.php │ │ │ ├── DataAdapterSqlTextSqlSrv.class.php │ │ │ └── DataAdapterSqlTimeSqlSrv.class.php │ │ └── txt │ │ ├── DataAdapterTxtArray.class.php │ │ ├── DataAdapterTxtBinary.class.php │ │ ├── DataAdapterTxtBoolean.class.php │ │ ├── DataAdapterTxtDate.class.php │ │ ├── DataAdapterTxtDateMonth.class.php │ │ ├── DataAdapterTxtDateTime.class.php │ │ ├── DataAdapterTxtDateYear.class.php │ │ ├── DataAdapterTxtInteger.class.php │ │ ├── DataAdapterTxtReal.class.php │ │ ├── DataAdapterTxtText.class.php │ │ └── DataAdapterTxtTime.class.php │ ├── db │ ├── DBConnection.class.php │ ├── DBConnector.class.php │ ├── DBManipulator.class.php │ ├── DBManipulatorMySQL.class.php │ ├── DBManipulatorSQLite.class.php │ └── DBManipulatorSqlSrv.class.php │ ├── dispatch │ └── Dispatcher.class.php │ ├── email │ ├── Email.class.php │ └── EmailAttachment.class.php │ ├── error │ └── Reporter.class.php │ ├── fs │ └── FSManipulator.class.php │ ├── html │ ├── HTMLToText.class.php │ ├── HtmlTemplate.class.php │ └── HtmlWrapper.class.php │ ├── http │ ├── HttpHeaders.class.php │ ├── HttpHeadersHelper.class.php │ ├── HttpMessage.class.php │ ├── HttpRequest.class.php │ ├── HttpResponse.class.php │ ├── HttpUri.class.php │ ├── HttpUriHelper.class.php │ └── MobileDetect.class.php │ ├── locale │ └── Locale.class.php │ ├── log │ └── Logger.class.php │ ├── organic │ ├── Factory.class.php │ ├── Service.class.php │ └── Singleton.class.php │ ├── orm │ ├── Collection.class.php │ ├── Collections.class.php │ ├── DateReference.class.php │ ├── Domain.class.php │ ├── Entity.class.php │ ├── Field.class.php │ ├── Model.class.php │ ├── ModelFactory.class.php │ ├── ObjectManager.class.php │ ├── Operation.class.php │ ├── Package.class.php │ ├── UsageFactory.class.php │ └── usages │ │ ├── Usage.class.php │ │ ├── UsageAmount.class.php │ │ ├── UsageArray.class.php │ │ ├── UsageBinary.class.php │ │ ├── UsageCountry.class.php │ │ ├── UsageCurrency.class.php │ │ ├── UsageDate.class.php │ │ ├── UsageEmail.class.php │ │ ├── UsageLanguage.class.php │ │ ├── UsageNumber.class.php │ │ ├── UsagePassword.class.php │ │ ├── UsagePhone.class.php │ │ ├── UsageText.class.php │ │ ├── UsageTime.php │ │ └── UsageUri.class.php │ ├── php │ └── Context.class.php │ ├── route │ └── Router.class.php │ ├── services │ └── Container.class.php │ ├── test │ └── Tester.class.php │ └── text │ └── TextTransformer.class.php ├── log └── log2json.sh ├── packages ├── core │ ├── actions │ │ ├── alert │ │ │ ├── bulk-dismiss.php │ │ │ ├── delete.php │ │ │ └── dismiss.php │ │ ├── config │ │ │ ├── create-controller.php │ │ │ ├── create-model.php │ │ │ ├── create-package.php │ │ │ ├── create-route.php │ │ │ ├── create-view.php │ │ │ ├── create-workflow.php │ │ │ ├── delete-controller.php │ │ │ ├── delete-model.php │ │ │ ├── delete-package.php │ │ │ ├── delete-view.php │ │ │ ├── delete-workflow.php │ │ │ ├── generate.php │ │ │ ├── update-controller.php │ │ │ ├── update-init-data.php │ │ │ ├── update-model.php │ │ │ ├── update-package.php │ │ │ ├── update-translation.php │ │ │ ├── update-uml.php │ │ │ ├── update-view.php │ │ │ └── update-workflow.php │ │ ├── cron │ │ │ └── run.php │ │ ├── decrypt.php │ │ ├── encrypt.php │ │ ├── export.php │ │ ├── group │ │ │ ├── add-user.php │ │ │ ├── grant.php │ │ │ └── revoke.php │ │ ├── init │ │ │ ├── anonymize.php │ │ │ ├── composer.php │ │ │ ├── db.php │ │ │ ├── fs.php │ │ │ ├── import.php │ │ │ ├── package.php │ │ │ └── seed.php │ │ ├── logs │ │ │ └── prune.php │ │ ├── model │ │ │ ├── anonymize.php │ │ │ ├── archive.php │ │ │ ├── clone.php │ │ │ ├── correct.php │ │ │ ├── create.php │ │ │ ├── delete.php │ │ │ ├── generate.php │ │ │ ├── import-csv-file.php │ │ │ ├── import-json-file.php │ │ │ ├── import-json.php │ │ │ ├── import-mapped.php │ │ │ ├── import-old.php │ │ │ ├── import.php │ │ │ ├── onchange.php │ │ │ ├── transition.php │ │ │ └── update.php │ │ ├── spool │ │ │ └── run.php │ │ ├── test │ │ │ ├── config.php │ │ │ ├── db-access.php │ │ │ ├── db-connectivity.php │ │ │ ├── email.php │ │ │ ├── fs-consistency.php │ │ │ ├── package-consistency.php │ │ │ ├── package.php │ │ │ ├── php-extensions.php │ │ │ └── smtp-connectivity.php │ │ └── user │ │ │ ├── confirm.php │ │ │ ├── create.php │ │ │ ├── grant.php │ │ │ ├── oauth.php │ │ │ ├── pass-recover.php │ │ │ ├── pass-update.php │ │ │ ├── revoke.php │ │ │ ├── signin.php │ │ │ ├── signout.php │ │ │ ├── signup.php │ │ │ └── update.php │ ├── apps │ │ ├── app │ │ │ ├── manifest.json │ │ │ ├── version │ │ │ └── web.app │ │ ├── apps.php │ │ ├── apps │ │ │ ├── manifest.json │ │ │ ├── version │ │ │ └── web.app │ │ ├── auth.php │ │ ├── auth │ │ │ ├── manifest.json │ │ │ ├── version │ │ │ └── web.app │ │ ├── console.php │ │ ├── discord.php │ │ ├── noop.php │ │ ├── sandbox │ │ │ ├── .gitignore │ │ │ ├── manifest.json │ │ │ └── web.app │ │ ├── settings │ │ │ ├── manifest.json │ │ │ ├── version │ │ │ └── web.app │ │ ├── welcome.php │ │ ├── welcome │ │ │ └── web.app │ │ └── workbench │ │ │ ├── manifest.json │ │ │ ├── version │ │ │ └── web.app │ ├── classes │ │ ├── Assignment.class.php │ │ ├── Group.class.php │ │ ├── Lang.class.php │ │ ├── Log.class.php │ │ ├── Mail.class.php │ │ ├── Meta.class.php │ │ ├── Permission.class.php │ │ ├── Task.class.php │ │ ├── TaskLog.class.php │ │ ├── Translation.class.php │ │ ├── User.class.php │ │ ├── Version.class.php │ │ ├── alert │ │ │ ├── Message.class.php │ │ │ └── MessageModel.class.php │ │ ├── import │ │ │ ├── ColumnMapping.class.php │ │ │ ├── DataTransformer.class.php │ │ │ ├── DataTransformerMapValue.class.php │ │ │ └── EntityMapping.class.php │ │ ├── notification │ │ │ └── Notification.class.php │ │ ├── pipeline │ │ │ ├── Node.class.php │ │ │ ├── NodeLink.class.php │ │ │ ├── Parameter.class.php │ │ │ ├── Pipeline.class.php │ │ │ ├── PipelineExecution.class.php │ │ │ └── PipelineNodeExecution.class.php │ │ ├── security │ │ │ ├── SecurityPolicy.class.php │ │ │ ├── SecurityPolicyRule.class.php │ │ │ └── SecurityPolicyRuleValue.class.php │ │ ├── setting │ │ │ ├── Setting.class.php │ │ │ ├── SettingChoice.class.php │ │ │ ├── SettingSection.class.php │ │ │ ├── SettingSequence.class.php │ │ │ └── SettingValue.class.php │ │ └── test │ │ │ ├── Test.class.php │ │ │ └── Test1.class.php │ ├── data │ │ ├── appinfo.php │ │ ├── check-pipeline.php │ │ ├── config │ │ │ ├── apis.php │ │ │ ├── classes.php │ │ │ ├── constant.php │ │ │ ├── controllers.php │ │ │ ├── domain-operators.php │ │ │ ├── email-signature.php │ │ │ ├── health-check.php │ │ │ ├── i18n-menu.php │ │ │ ├── i18n.php │ │ │ ├── init-data.php │ │ │ ├── live │ │ │ │ ├── apps.php │ │ │ │ ├── packages.php │ │ │ │ └── routes.php │ │ │ ├── menus.php │ │ │ ├── namespaces.php │ │ │ ├── packages.php │ │ │ ├── routes.php │ │ │ ├── settings.php │ │ │ ├── translation.php │ │ │ ├── translations.php │ │ │ ├── types.php │ │ │ ├── uml.php │ │ │ ├── umls.php │ │ │ ├── usage.php │ │ │ ├── usages.php │ │ │ ├── views.php │ │ │ └── widget-types.php │ │ ├── envinfo.php │ │ ├── installed-apps.php │ │ ├── installed-packages.php │ │ ├── model │ │ │ ├── actions.php │ │ │ ├── chart.php │ │ │ ├── collect.php │ │ │ ├── export-chart-xls.php │ │ │ ├── export-pdf.php │ │ │ ├── export-xls.php │ │ │ ├── export.php │ │ │ ├── menu.php │ │ │ ├── policies.php │ │ │ ├── read.php │ │ │ ├── roles.php │ │ │ ├── schema.php │ │ │ ├── search.php │ │ │ ├── view-help.php │ │ │ ├── view.php │ │ │ └── workflow.php │ │ ├── packageinfo.php │ │ ├── phpinfo.php │ │ ├── pipeline │ │ │ ├── test-divide.php │ │ │ ├── test-sum-list.php │ │ │ └── test-sum.php │ │ ├── run-pipeline.php │ │ ├── setting │ │ │ └── timezones.php │ │ ├── translation.php │ │ ├── user │ │ │ ├── groups.php │ │ │ └── rights.php │ │ ├── userinfo.php │ │ └── utils │ │ │ ├── git-revision.php │ │ │ ├── sql-schema.php │ │ │ └── sqldesigner │ │ │ └── schema.php │ ├── i18n │ │ ├── en │ │ │ ├── Model.json │ │ │ ├── Permission.json │ │ │ ├── User.json │ │ │ ├── mail_test.html │ │ │ ├── mail_user_confirm.html │ │ │ ├── mail_user_pass_recover.html │ │ │ └── setting │ │ │ │ ├── Setting.json │ │ │ │ ├── SettingChoice.json │ │ │ │ └── SettingValue.json │ │ ├── es │ │ │ ├── Assignment.json │ │ │ ├── Group.json │ │ │ ├── Lang.json │ │ │ ├── Log.json │ │ │ ├── Mail.json │ │ │ ├── Permission.json │ │ │ ├── Task.json │ │ │ ├── TaskLog.json │ │ │ ├── User.json │ │ │ ├── Version.json │ │ │ ├── alert │ │ │ │ ├── Message.json │ │ │ │ └── MessageModel.json │ │ │ └── setting │ │ │ │ ├── Setting.json │ │ │ │ ├── SettingChoice.json │ │ │ │ └── SettingValue.json │ │ └── fr │ │ │ ├── Mail.json │ │ │ ├── Model.json │ │ │ ├── User.json │ │ │ ├── alert │ │ │ ├── Message.json │ │ │ └── MessageModel.json │ │ │ ├── locale.json │ │ │ ├── mail_test.html │ │ │ ├── mail_user_confirm.html │ │ │ ├── mail_user_pass_recover.html │ │ │ ├── model │ │ │ └── chart.json │ │ │ └── setting │ │ │ ├── Setting.json │ │ │ ├── SettingChoice.json │ │ │ └── SettingValue.json │ ├── init │ │ ├── assets │ │ │ ├── i18n │ │ │ │ ├── en.json │ │ │ │ └── fr.json │ │ │ └── img │ │ │ │ ├── equal_logo.png │ │ │ │ ├── equal_presentation.gif │ │ │ │ ├── equal_summary.png │ │ │ │ └── equal_symbol.png │ │ ├── data │ │ │ ├── core_Group.json │ │ │ ├── core_Lang.json │ │ │ ├── core_Meta.json │ │ │ ├── core_Permission.json │ │ │ ├── core_User.json │ │ │ └── core_setting.json │ │ ├── demo │ │ │ ├── core_security_SecurityPolicy.json │ │ │ ├── core_security_SecurityPolicyRule.json │ │ │ └── core_security_SecurityPolicyRuleValue.json │ │ └── routes │ │ │ └── 99-default.json │ ├── manifest.json │ ├── tests │ │ ├── access.php │ │ ├── adapters.php │ │ ├── auth.php │ │ ├── collections.php │ │ ├── computed.php │ │ ├── cron.php │ │ ├── demo.php │ │ ├── fields.php │ │ ├── http.php │ │ ├── orm.php │ │ ├── schema.php │ │ └── validation.php │ ├── uml │ │ └── overview.erd.json │ └── views │ │ ├── Assignment.form.default.json │ │ ├── Assignment.list.default.json │ │ ├── Group.form.default.json │ │ ├── Group.list.default.json │ │ ├── Group.list.selection.json │ │ ├── Lang.form.default.json │ │ ├── Lang.list.default.json │ │ ├── Log.form.default.json │ │ ├── Log.list.default.json │ │ ├── Mail.form.default.json │ │ ├── Mail.list.default.json │ │ ├── Meta.form.default.json │ │ ├── Meta.list.default.json │ │ ├── Permission.form.default.json │ │ ├── Permission.list.default.json │ │ ├── Task.form.default.json │ │ ├── Task.list.default.json │ │ ├── TaskLog.form.default.json │ │ ├── TaskLog.list.default.json │ │ ├── Translation.form.default.html │ │ ├── Translation.list.default.html │ │ ├── User.form.default.json │ │ ├── User.list.default.json │ │ ├── alert │ │ ├── Message.form.default.json │ │ ├── Message.list.dashboard.json │ │ ├── Message.list.default.json │ │ ├── MessageModel.form.default.json │ │ └── MessageModel.list.default.json │ │ ├── import │ │ ├── ColumnMapping.form.default.json │ │ ├── ColumnMapping.list.default.json │ │ ├── DataTransformer.form.default.json │ │ ├── DataTransformer.list.default.json │ │ ├── DataTransformerMapValue.form.default.json │ │ ├── DataTransformerMapValue.list.default.json │ │ ├── EntityMapping.form.default.json │ │ └── EntityMapping.list.default.json │ │ ├── menu.sandbox.left.json │ │ ├── menu.settings.left.json │ │ ├── menu.workbench.left.json │ │ ├── model │ │ └── chart.search.default.json │ │ ├── notification │ │ ├── Notification.form.default.json │ │ └── Notification.list.default.json │ │ ├── security │ │ ├── SecurityPolicy.form.default.json │ │ ├── SecurityPolicy.list.default.json │ │ ├── SecurityPolicyRule.form.default.json │ │ ├── SecurityPolicyRule.list.default.json │ │ ├── SecurityPolicyRuleValue.form.default.json │ │ └── SecurityPolicyRuleValue.list.default.json │ │ └── setting │ │ ├── Setting.form.default.json │ │ ├── Setting.list.default.json │ │ ├── SettingChoice.form.default.json │ │ ├── SettingChoice.list.default.json │ │ ├── SettingSection.form.default.json │ │ ├── SettingSection.list.default.json │ │ ├── SettingSequence.form.default.json │ │ ├── SettingSequence.list.default.json │ │ ├── SettingValue.form.default.json │ │ └── SettingValue.list.default.json └── demo │ ├── classes │ ├── Example.class.php │ ├── Foo.class.php │ └── User.class.php │ ├── data │ ├── announce.php │ ├── books │ │ └── suggestions.php │ ├── cities.php │ ├── first.php │ ├── hello.php │ ├── image.php │ ├── listen.php │ ├── reuse.php │ └── simple.php │ ├── manifest.json │ └── views │ ├── User.list.default.json │ └── menu.app.left.json ├── public ├── .htaccess ├── assets │ ├── css │ │ ├── .gitkeep │ │ ├── bootstrap.css │ │ ├── font-awesome.css │ │ ├── jquery-ui.min.css │ │ └── select.min.css │ ├── env │ │ ├── .gitkeep │ │ └── default.json │ ├── fonts │ │ ├── .gitkeep │ │ ├── FontAwesome.otf │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.svg │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ └── fontawesome-webfont.woff2 │ ├── i18n │ │ └── .gitkeep │ ├── img │ │ ├── .gitkeep │ │ ├── avatar.png │ │ ├── brand │ │ │ └── logo.svg │ │ ├── equal_logo.png │ │ ├── equal_presentation.gif │ │ ├── equal_summary.png │ │ ├── equal_symbol.png │ │ ├── logo.svg │ │ └── low_resolution.png │ └── js │ │ ├── .kitkeep │ │ └── equal.bundle.js ├── console.php ├── favicon.ico ├── index.php ├── robots.txt └── welcome │ └── index.html └── run.php /.docker/000-default.conf: -------------------------------------------------------------------------------- 1 | 2 | ServerAdmin webmaster@localhost 3 | DocumentRoot /var/www/html/public 4 | ErrorLog ${APACHE_LOG_DIR}/error.log 5 | CustomLog ${APACHE_LOG_DIR}/access.log combined 6 | -------------------------------------------------------------------------------- /.docker/Dockerfile-min: -------------------------------------------------------------------------------- 1 | FROM php:8.3-fpm-alpine as base 2 | LABEL Description="Alpine with PHP-FPM for eQual" \ 3 | Maintainer="Cedric Francoys " \ 4 | License="Apache License 2.0" \ 5 | Version="2.0" 6 | 7 | RUN apk add --no-cache \ 8 | bash \ 9 | libxml2-dev \ 10 | icu-dev \ 11 | oniguruma-dev \ 12 | nginx \ 13 | && docker-php-ext-configure intl \ 14 | && docker-php-ext-install dom mbstring intl mysqli \ 15 | && docker-php-ext-enable mbstring \ 16 | && rm -rf /var/lib/apt/lists/* /usr/local/lib/php/extensions/no-debug-non-zts-*/.build 17 | 18 | RUN echo "PS1='[\u@\h \W]\$ '" >> /root/.bashrc \ 19 | && ln -sf /bin/bash /bin/sh 20 | 21 | RUN apk add --no-cache bash-completion \ 22 | && mkdir -p /etc/bash_completion.d 23 | 24 | RUN echo "source /usr/share/bash-completion/bash_completion" >> /root/.bashrc 25 | 26 | RUN curl -L https://github.com/equalframework/equal/archive/refs/tags/v2.0.0-rc1.tar.gz | tar xz -C /var/www/html --strip-components=1 27 | 28 | RUN mkdir -p /var/www/html/config \ 29 | && echo '{\"DB_DBMS\": \"SQLITE\"}' > /var/www/html/config/config.json 30 | 31 | RUN cp /var/www/html/autocomplete /etc/bash_completion.d/ 32 | 33 | COPY ./nginx.conf /etc/nginx/nginx.conf 34 | COPY ./default.conf /etc/nginx/conf.d/default.conf 35 | 36 | RUN mkdir -p /run/nginx && chown -R nginx:nginx /run/nginx 37 | 38 | WORKDIR /var/www/html 39 | VOLUME /var/www/html 40 | CMD ["php-fpm"] -------------------------------------------------------------------------------- /.docker/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | docker build -t equalframework/equal . -------------------------------------------------------------------------------- /.docker/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | services: 3 | equal_srv: 4 | image: equalframework/equal 5 | container_name: equal.local 6 | restart: always 7 | ports: 8 | - 80:80 9 | volumes: 10 | - /var/www/html 11 | extra_hosts: 12 | - "equal.local:127.0.0.1" 13 | hostname: equal.local 14 | domainname: local 15 | environment: 16 | - EQ_DB_HOST=equal_db 17 | - EQ_DB_USER=root 18 | - EQ_DB_PASS=test 19 | - EQ_DB_NAME=equal 20 | links: 21 | - equal_db 22 | equal_db: 23 | image: mysql:5.7 24 | restart: always 25 | ports: 26 | - 3306:3306 27 | environment: 28 | - MYSQL_DATABASE=equal 29 | - MYSQL_ROOT_PASSWORD=test -------------------------------------------------------------------------------- /.docker/mpm_prefork.conf: -------------------------------------------------------------------------------- 1 | # prefork MPM 2 | # StartServers: number of server processes to start 3 | # MinSpareServers: minimum number of server processes which are kept spare 4 | # MaxSpareServers: maximum number of server processes which are kept spare 5 | # MaxRequestWorkers: maximum number of server processes allowed to start 6 | # MaxConnectionsPerChild: maximum number of requests a server process serves 7 | # Typical shared server config (low RAM) 8 | 9 | StartServers 1 10 | MinSpareServers 1 11 | MaxSpareServers 5 12 | MaxRequestWorkers 64 13 | MaxConnectionsPerChild 0 14 | 15 | # Typical dedicated server config 16 | # 17 | # StartServers 5 18 | # MinSpareServers 5 19 | # MaxSpareServers 10 20 | # MaxRequestWorkers 128 21 | # MaxConnectionsPerChild 0 22 | # -------------------------------------------------------------------------------- /.docker/mysql.cnf: -------------------------------------------------------------------------------- 1 | [mysqld] 2 | max_allowed_packet=512M 3 | max_connections = 200 4 | connect_timeout = 60 5 | wait_timeout = 3600 6 | interactive_timeout = 3600 7 | lock_wait_timeout = 3600 -------------------------------------------------------------------------------- /.docker/php.ini: -------------------------------------------------------------------------------- 1 | upload_max_filesize = 64M 2 | post_max_size = 64M 3 | max_execution_time = 300 4 | memory_limit = 256M 5 | zend_extension=xdebug 6 | ; uncomment to disable opcache 7 | ; opcache.enable=0 8 | -------------------------------------------------------------------------------- /.github/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/equalframework/equal/25cd74e7030fe81a126c37287cf93b6202ced774/.github/.gitkeep -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: [equalframework] -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: "[BUG] - unexpected behavior" 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Additional context** 32 | Add any other context about the problem here. 33 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: "[FEATURE] - wanted new feature" 5 | labels: feature 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. 12 | Ex. I'm always frustrated when [...] 13 | 14 | **Describe the solution you'd like** 15 | A clear and concise description of what you want to happen. 16 | 17 | **Describe alternatives you've considered** 18 | A clear and concise description of any alternative solutions or features you've considered. 19 | 20 | **Additional context** 21 | Add any other context or screenshots about the feature request here. 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /vendor/ 2 | /tests/ 3 | /log/* 4 | !/log/.gitkeep 5 | /cache/* 6 | !/cache/.gitkeep 7 | /spool/* 8 | !/spool/.gitkeep 9 | /bin/* 10 | !/bin/.gitkeep 11 | /config/config.json 12 | /config/routing/* 13 | !/config/routing/.gitkeep 14 | /public/* 15 | !/public/index.php 16 | !/public/console.php 17 | !/public/assets 18 | composer.json 19 | composer.phar 20 | composer.lock 21 | .vscode 22 | .idea 23 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "doc"] 2 | path = doc 3 | url = https://github.com/equalframework/equal-doc.git 4 | [submodule "packages/core/apps/workbench/source"] 5 | path = packages/core/apps/workbench/source 6 | url = https://github.com/equalframework/apps-core-workbench.git 7 | [submodule "packages/core/apps/welcome/source"] 8 | path = packages/core/apps/welcome/source 9 | url = https://github.com/equalframework/apps-core-welcome.git 10 | [submodule "packages/core/apps/apps/source"] 11 | path = packages/core/apps/apps/source 12 | url = https://github.com/equalframework/apps-core-apps.git 13 | [submodule "packages/core/apps/settings/source"] 14 | path = packages/core/apps/settings/source 15 | url = https://github.com/equalframework/apps-core-settings.git 16 | [submodule "packages/core/apps/auth/source"] 17 | path = packages/core/apps/auth/source 18 | url = https://github.com/equalframework/apps-core-auth.git 19 | [submodule "packages/core/apps/app/source"] 20 | path = packages/core/apps/app/source 21 | url = https://github.com/equalframework/apps-core-app.git 22 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | dist: xenial 2 | language: php 3 | php: 4 | # - '5.6' 5 | # - '7.1' 6 | # - '7.2' 7 | - '7.3' 8 | - '7.4' 9 | - '8.0' 10 | - '8.1' 11 | 12 | services: 13 | # make the `mysql` binary available 14 | - mysql 15 | 16 | env: 17 | # make environment variables available 18 | # bash: `$SITE_FOLDER` 19 | # PHP : `getenv('SITE_FOLDER');` 20 | global: 21 | - DB_NAME="equal" 22 | 23 | before_script: 24 | # travis DB user is `root`, password is empty and host is `127.0.0.1` 25 | # - mysql -e "create database IF NOT EXISTS $DB_NAME;" -uroot 26 | - mysql -u root -e "SET PASSWORD FOR 'root'@'localhost' = PASSWORD('test');" 27 | # install apache2 28 | - chmod +x .travis/*.sh 29 | - .travis/init-php7.sh 30 | 31 | 32 | 33 | script: 34 | # check that mandatory directories are present and have correct access rights set 35 | - php run.php --do=test_fs-consistency 36 | # check ability to connect to the dbms service 37 | - php run.php --do=test_db-connectivity 38 | # create an empty database 39 | - php run.php --do=init_db 40 | # initialise database with demo data 41 | - php run.php --do=init_package --package=core --import=true 42 | # run test units 43 | - php run.php --do=test_package --package=core -------------------------------------------------------------------------------- /.travis/init-php.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # install apache2 3 | sudo apt-get update 4 | sudo apt-get install apache2 libapache2-mod-fastcgi 5 | # enable php-fpm 6 | sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf 7 | sudo a2enmod rewrite actions alias 8 | echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini 9 | sudo sed -i -e "s,www-data,travis,g" /etc/apache2/envvars 10 | sudo chown -R travis:travis /var/lib/apache2/fastcgi 11 | ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm 12 | # configure apache virtual hosts 13 | sudo cp -f .travis/travis-ci-apache /etc/apache2/sites-available/000-default.conf 14 | sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/000-default.conf 15 | sudo service apache2 restart -------------------------------------------------------------------------------- /.travis/init-php7.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # install apache2 3 | sudo apt-get update 4 | sudo apt-get install apache2 libapache2-mod-fastcgi 5 | # enable php-fpm 6 | sudo cp .travis/www.conf ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/ 7 | sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf 8 | sudo a2enmod rewrite actions alias proxy_fcgi 9 | sudo sed -i -e "s,www-data,travis,g" /etc/apache2/envvars 10 | sudo chown -R travis:travis /var/lib/apache2/fastcgi 11 | ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm 12 | # configure apache virtual hosts 13 | sudo cp -f .travis/travis-ci-apache7.3 /etc/apache2/sites-available/000-default.conf 14 | sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/000-default.conf 15 | sudo service apache2 restart -------------------------------------------------------------------------------- /.travis/travis-ci-apache: -------------------------------------------------------------------------------- 1 | 2 | # [...] 3 | ServerName localhost 4 | DocumentRoot %TRAVIS_BUILD_DIR%/public 5 | 6 | 7 | Options Indexes Includes FollowSymLinks ExecCGI 8 | AllowOverride All 9 | Require all granted 10 | 11 | 12 | # Wire up Apache to use Travis CI's php-fpm. 13 | 14 | AddHandler php5-fcgi .php 15 | Action php5-fcgi /php5-fcgi 16 | Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi 17 | FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -pass-header Authorization 18 | 19 | # ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ 20 | 21 | 22 | Require all granted 23 | 24 | 25 | 26 | ErrorLog "%TRAVIS_BUILD_DIR%/apache-error.log" 27 | CustomLog "%TRAVIS_BUILD_DIR%/apache-access.log" combined 28 | 29 | # [...] 30 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 6 | 7 | ## [Unreleased] 8 | ### Added 9 | - Describe new features added here. 10 | 11 | ### Changed 12 | - Describe changes or improvements to existing features here. 13 | 14 | ### Fixed 15 | - List any bug fixes or issue resolutions here. 16 | 17 | ### Removed 18 | - List any deprecated or removed features here. 19 | 20 | ## [1.0.0] - YYYY-MM-DD 21 | ### Added 22 | - Initial release of the project. 23 | - Define the initial set of features. 24 | 25 | --- 26 | 27 | ## Version history 28 | 29 | - `Unreleased`: Lists the changes currently in progress before the next stable release. 30 | - `1.0.0`: First stable public release. 31 | -------------------------------------------------------------------------------- /VERSION: -------------------------------------------------------------------------------- 1 | 2.0 2 | -------------------------------------------------------------------------------- /autocomplete: -------------------------------------------------------------------------------- 1 | # Part of eQual. See LICENSE file for full copyright and licensing details. 2 | 3 | # Bash autocompletion bootstrap for eQual. 4 | # This script uses the operation invocation logic and the controllers announcements 5 | # to provide interactive help while composing CLI commands. 6 | # To install this script, copy it to /etc/bash_completion.d/ 7 | # and activate with `source /etc/bash_completion.d/autocomplete` 8 | 9 | _equal_completion() 10 | { 11 | script='/var/www/html/autocomplete.php' 12 | if [[ "$OSTYPE" =~ ^msys ]]; then 13 | alias php='php.exe' 14 | script='autocomplete.php' 15 | fi 16 | local cur 17 | COMPREPLY=() 18 | cur=${COMP_WORDS[*]} 19 | COMPREPLY=( $(php $script "$cur") ) 20 | return 0 21 | } 22 | complete -o nospace -F _equal_completion "equal.run" 23 | -------------------------------------------------------------------------------- /config/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/equalframework/equal/25cd74e7030fe81a126c37287cf93b6202ced774/config/.gitkeep -------------------------------------------------------------------------------- /config/config-example_mysql.json: -------------------------------------------------------------------------------- 1 | { 2 | "FILE_STORAGE_MODE":"DB", 3 | "DEFAULT_RIGHTS": "EQ_R_CREATE | EQ_R_READ | EQ_R_DELETE | EQ_R_WRITE", 4 | "DEBUG_MODE": "EQ_MODE_API | EQ_MODE_PHP | EQ_MODE_ORM | EQ_MODE_SQL", 5 | "DEBUG_LEVEL": "E_ALL | E_ALL", 6 | "DEFAULT_LANG": "en", 7 | "DB_REPLICATION": "NO", 8 | "DB_DBMS": "MYSQL", 9 | "DB_HOST": "127.0.0.1", 10 | "DB_PORT": "3306", 11 | "DB_USER": "root", 12 | "DB_PASSWORD": "test", 13 | "DB_NAME": "equal", 14 | "DEFAULT_PACKAGE": "core", 15 | "UPLOAD_MAX_FILE_SIZE": "64MB", 16 | "L10N_TIMEZONE": "Europe/Brussels", 17 | "L10N_LOCALE": "fr", 18 | "LOGGING_ENABLED": true, 19 | "DRAFT_VALIDITY": 0, 20 | "VERSIONING_ENABLED": true, 21 | "AUTH_SECRET_KEY": "my_secret_key", 22 | "AUTH_ACCESS_TOKEN_VALIDITY": "1h", 23 | "AUTH_TOKEN_HTTPS": false, 24 | "REST_API_URL": "http://equal.local/", 25 | "BACKEND_URL": "http://equal.local" 26 | } -------------------------------------------------------------------------------- /config/config-example_sqlsrv.json: -------------------------------------------------------------------------------- 1 | { 2 | "CIPHER_KEY": "xxxxxxxxxxxxxxxxxxxxxxxx", 3 | "FILE_STORAGE_MODE":"DB", 4 | "DEFAULT_RIGHTS": "EQ_R_CREATE | EQ_R_READ | EQ_R_DELETE | EQ_R_WRITE", 5 | "DEBUG_MODE": "EQ_MODE_PHP | EQ_MODE_ORM | EQ_MODE_SQL", 6 | "DEBUG_LEVEL": "E_ALL | E_ALL", 7 | "DEFAULT_LANG": "en", 8 | "DB_REPLICATION": "NO", 9 | "DB_DBMS": "SQLSRV", 10 | "DB_CHARSET": "UTF-8", 11 | "DB_COLLATION": "LATIN1_GENERAL_100_CS_AS_SC", 12 | "DB_HOST": "127.0.0.1", 13 | "DB_PORT": "1433", 14 | "DB_USER": "sa", 15 | "DB_PASSWORD": "test", 16 | "DB_NAME": "equal", 17 | "LOGGING_ENABLED": true, 18 | "DRAFT_VALIDITY": 0, 19 | "VERSIONING_ENABLED": true, 20 | "AUTH_SECRET_KEY": "my_secret_key", 21 | "AUTH_ACCESS_TOKEN_VALIDITY": "1d", 22 | "AUTH_TOKEN_HTTPS": false, 23 | "REST_API_URL": "http://equal.local/", 24 | "BACKEND_URL": "http://equal.local" 25 | } -------------------------------------------------------------------------------- /config/return_types.json: -------------------------------------------------------------------------------- 1 | { 2 | "types" : { 3 | "text" : { 4 | "qty" : ["one","many"] 5 | }, 6 | "entity" : { 7 | "qty" : ["one","many"], 8 | "entity" : [] 9 | }, 10 | "any" : { 11 | "qty" : ["one","many"] 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /config/routing/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/equalframework/equal/25cd74e7030fe81a126c37287cf93b6202ced774/config/routing/.gitkeep -------------------------------------------------------------------------------- /config/widget_types.json: -------------------------------------------------------------------------------- 1 | { 2 | "boolean" : [ 3 | "toggle", 4 | "checkbox" 5 | ], 6 | "many2many" : [ 7 | "list", 8 | "multiselect", 9 | "multiselect_dynamic" 10 | ], 11 | "many2one" : [ 12 | "select", 13 | "select_dynamic" 14 | ], 15 | "one2many" : [ 16 | "list", 17 | "multiselect", 18 | "multiselect_dynamic" 19 | ] 20 | } -------------------------------------------------------------------------------- /ecs.php: -------------------------------------------------------------------------------- 1 | paths([__DIR__ . '/src', __DIR__ . '/tests']); 11 | 12 | $ecsConfig->sets([ 13 | // run and fix, one by one 14 | SetList::SPACES, 15 | SetList::ARRAY, 16 | SetList::DOCBLOCK, 17 | // #memo - messes with COMMENTS blocks 18 | // SetList::SYMPLIFY, 19 | // #memo - adds declare(strict_types=1) 20 | // SetList::COMMON, 21 | SetList::CLEAN_CODE, 22 | SetList::PSR_12, 23 | ]); 24 | 25 | $ecsConfig->ruleWithConfiguration(ArraySyntaxFixer::class, [ 26 | 'syntax' => 'short', 27 | ]); 28 | 29 | }; 30 | -------------------------------------------------------------------------------- /equal.run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # This script is meant to shorten the syntax for calling eQual controllers through CLI 3 | if php -v > /dev/null 2>&1; then 4 | php run.php "$@" 5 | else 6 | echo "PHP cannot be found. Check your installation." 7 | fi -------------------------------------------------------------------------------- /lib/equal/data/adapt/AdapterProvider.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2021 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | namespace equal\data\adapt; 8 | 9 | 10 | interface AdapterProvider { 11 | 12 | public function get(string $type); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /lib/equal/data/adapt/adapters/sql/mysql/DataAdapterSqlArrayMySql.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2024 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | namespace equal\data\adapt\adapters\sql\mysql; 8 | 9 | use equal\data\adapt\adapters\sql\DataAdapterSqlArray; 10 | 11 | class DataAdapterSqlArrayMySql extends DataAdapterSqlArray { 12 | 13 | public function getType() { 14 | return 'sql/array'; 15 | } 16 | 17 | public function castInType(): string { 18 | return 'array'; 19 | } 20 | 21 | public function castOutType($usage=null): string { 22 | // max-size of 65k 23 | return 'TEXT'; 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /lib/equal/data/adapt/adapters/sql/mysql/DataAdapterSqlBinaryMySql.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2024 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | namespace equal\data\adapt\adapters\sql\mysql; 8 | 9 | use equal\data\adapt\adapters\sql\DataAdapterSqlBinary; 10 | use equal\orm\UsageFactory; 11 | use equal\orm\usages\Usage; 12 | 13 | class DataAdapterSqlBinaryMySql extends DataAdapterSqlBinary { 14 | 15 | public function getType() { 16 | return 'sql/binary'; 17 | } 18 | 19 | public function castInType(): string { 20 | return 'string'; 21 | } 22 | 23 | public function castOutType($usage=null): string { 24 | $type = 'BLOB'; 25 | if(!is_null($usage)) { 26 | if(!($usage instanceof Usage)) { 27 | $usage = UsageFactory::create($usage); 28 | } 29 | $length = $usage->getLength(); 30 | if($length > 16777215) { 31 | // up to 4GB 32 | $type = 'LONGBLOB'; 33 | } 34 | elseif($length > 65535) { 35 | // up to 16MB 36 | $type = 'MEDIUMBLOB'; 37 | } 38 | } 39 | return $type; 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /lib/equal/data/adapt/adapters/sql/mysql/DataAdapterSqlBooleanMySql.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2024 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | namespace equal\data\adapt\adapters\sql\mysql; 8 | 9 | use equal\data\adapt\adapters\sql\DataAdapterSqlBoolean; 10 | 11 | class DataAdapterSqlBooleanMySql extends DataAdapterSqlBoolean { 12 | 13 | public function getType() { 14 | return 'sql/boolean'; 15 | } 16 | 17 | public function castInType(): string { 18 | return 'boolean'; 19 | } 20 | 21 | public function castOutType($usage=null): string { 22 | return 'TINYINT(4)'; 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /lib/equal/data/adapt/adapters/sql/mysql/DataAdapterSqlDateMySql.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2024 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | namespace equal\data\adapt\adapters\sql\mysql; 8 | 9 | use equal\data\adapt\adapters\sql\DataAdapterSqlDate; 10 | 11 | class DataAdapterSqlDateMySql extends DataAdapterSqlDate { 12 | 13 | public function getType() { 14 | return 'sql/date'; 15 | } 16 | 17 | public function castInType(): string { 18 | return 'integer'; 19 | } 20 | 21 | public function castOutType($usage=null): string { 22 | return 'DATE'; 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /lib/equal/data/adapt/adapters/sql/mysql/DataAdapterSqlDateTimeMySql.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2024 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | namespace equal\data\adapt\adapters\sql\mysql; 8 | 9 | use equal\data\adapt\adapters\sql\DataAdapterSqlDateTime; 10 | 11 | class DataAdapterSqlDateTimeMySql extends DataAdapterSqlDateTime { 12 | 13 | public function getType() { 14 | return 'sql/datetime'; 15 | } 16 | 17 | public function castInType(): string { 18 | return 'integer'; 19 | } 20 | 21 | public function castOutType($usage=null): string { 22 | return 'DATETIME'; 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /lib/equal/data/adapt/adapters/sql/mysql/DataAdapterSqlIntegerMySql.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2024 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | namespace equal\data\adapt\adapters\sql\mysql; 8 | 9 | use equal\data\adapt\adapters\sql\DataAdapterSqlInteger; 10 | 11 | class DataAdapterSqlIntegerMySql extends DataAdapterSqlInteger { 12 | 13 | public function getType() { 14 | return 'sql/integer'; 15 | } 16 | 17 | public function castInType(): string { 18 | return 'integer'; 19 | } 20 | 21 | public function castOutType($usage=null): string { 22 | return 'INT(11)'; 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /lib/equal/data/adapt/adapters/sql/mysql/DataAdapterSqlRealMySql.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2024 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | namespace equal\data\adapt\adapters\sql\mysql; 8 | 9 | use equal\data\adapt\adapters\sql\DataAdapterSqlReal; 10 | use equal\orm\UsageFactory; 11 | use equal\orm\usages\Usage; 12 | 13 | class DataAdapterSqlRealMySql extends DataAdapterSqlReal { 14 | 15 | public function getType() { 16 | return 'sql/real'; 17 | } 18 | 19 | public function castInType(): string { 20 | return 'float'; 21 | } 22 | 23 | /** 24 | * @param string|Usage $usage The usage descriptor the adaptation is requested for. 25 | */ 26 | public function castOutType($usage=null): string { 27 | // default values 28 | $precision = 10; 29 | $scale = 2; 30 | 31 | // arg represents a numeric value (either numeric type or string) 32 | if(!is_null($usage)) { 33 | if(!($usage instanceof Usage)) { 34 | $usage = UsageFactory::create($usage); 35 | } 36 | $scale = $usage->getScale(); 37 | $precision = $usage->getPrecision() + $scale; 38 | } 39 | 40 | return 'DECIMAL('.$precision.','.$scale.')'; 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /lib/equal/data/adapt/adapters/sql/mysql/DataAdapterSqlTextMySql.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2024 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | namespace equal\data\adapt\adapters\sql\mysql; 8 | 9 | use equal\data\adapt\adapters\sql\DataAdapterSqlText; 10 | use equal\orm\UsageFactory; 11 | use equal\orm\usages\Usage; 12 | 13 | class DataAdapterSqlTextMySql extends DataAdapterSqlText { 14 | 15 | public function getType() { 16 | return 'sql/text'; 17 | } 18 | 19 | public function castInType(): string { 20 | return 'string'; 21 | } 22 | 23 | public function castOutType($usage=null): string { 24 | $type = 'VARCHAR(255)'; 25 | 26 | if(!is_null($usage)) { 27 | if(!($usage instanceof Usage)) { 28 | $usage = UsageFactory::create($usage); 29 | } 30 | $length = $usage->getLength(); 31 | if($length > 16777215) { 32 | // up to 4GB 33 | $type = 'LONGTEXT'; 34 | } 35 | elseif($length > 65535) { 36 | // up to 16MB 37 | $type = 'MEDIUMTEXT'; 38 | } 39 | elseif($length > 255) { 40 | // up to 65KB 41 | $type = 'TEXT'; 42 | } 43 | else { 44 | $type = 'VARCHAR('.max($length, 1).')'; 45 | } 46 | } 47 | 48 | return $type; 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /lib/equal/data/adapt/adapters/sql/mysql/DataAdapterSqlTimeMySql.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2024 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | namespace equal\data\adapt\adapters\sql\mysql; 8 | 9 | use equal\data\adapt\adapters\sql\DataAdapterSqlTime; 10 | 11 | class DataAdapterSqlTimeMySql extends DataAdapterSqlTime { 12 | 13 | public function getType() { 14 | return 'sql/time'; 15 | } 16 | 17 | public function castInType(): string { 18 | return 'integer'; 19 | } 20 | 21 | public function castOutType($usage=null): string { 22 | return 'TIME'; 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /lib/equal/data/adapt/adapters/sql/sqlite/DataAdapterSqlArraySqlite.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2024 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | namespace equal\data\adapt\adapters\sql\sqlite; 8 | 9 | use equal\data\adapt\adapters\sql\DataAdapterSqlArray; 10 | 11 | class DataAdapterSqlArraySqLite extends DataAdapterSqlArray { 12 | 13 | public function getType() { 14 | return 'sql/array'; 15 | } 16 | 17 | public function castInType(): string { 18 | return 'array'; 19 | } 20 | 21 | public function castOutType($usage=null): string { 22 | return 'VARCHAR'; 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /lib/equal/data/adapt/adapters/sql/sqlite/DataAdapterSqlBinarySqlite.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2024 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | namespace equal\data\adapt\adapters\sql\sqlite; 8 | 9 | use equal\data\adapt\adapters\sql\DataAdapterSqlBinary; 10 | 11 | class DataAdapterSqlBinarySqlite extends DataAdapterSqlBinary { 12 | 13 | public function getType() { 14 | return 'sql/binary'; 15 | } 16 | 17 | public function castInType(): string { 18 | return 'string'; 19 | } 20 | 21 | public function castOutType($usage=null): string { 22 | return 'BLOB'; 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /lib/equal/data/adapt/adapters/sql/sqlite/DataAdapterSqlBooleanSqlite.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2024 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | namespace equal\data\adapt\adapters\sql\sqlite; 8 | 9 | use equal\data\adapt\adapters\sql\DataAdapterSqlBoolean; 10 | 11 | class DataAdapterSqlBooleanSqlite extends DataAdapterSqlBoolean { 12 | 13 | public function getType() { 14 | return 'sql/boolean'; 15 | } 16 | 17 | public function castInType(): string { 18 | return 'boolean'; 19 | } 20 | 21 | public function castOutType($usage=null): string { 22 | return 'BOOLEAN'; 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /lib/equal/data/adapt/adapters/sql/sqlite/DataAdapterSqlDateSqlite.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2024 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | namespace equal\data\adapt\adapters\sql\sqlite; 8 | 9 | use equal\data\adapt\adapters\sql\DataAdapterSqlDate; 10 | 11 | class DataAdapterSqlDateSqlite extends DataAdapterSqlDate { 12 | 13 | public function getType() { 14 | return 'sql/date'; 15 | } 16 | 17 | public function castInType(): string { 18 | return 'integer'; 19 | } 20 | 21 | public function castOutType($usage=null): string { 22 | return 'DATE'; 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /lib/equal/data/adapt/adapters/sql/sqlite/DataAdapterSqlDateTimeSqlite.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2024 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | namespace equal\data\adapt\adapters\sql\sqlite; 8 | 9 | use equal\data\adapt\adapters\sql\DataAdapterSqlDateTime; 10 | 11 | class DataAdapterSqlDateTimeSqlite extends DataAdapterSqlDateTime { 12 | 13 | public function getType() { 14 | return 'sql/datetime'; 15 | } 16 | 17 | public function castInType(): string { 18 | return 'integer'; 19 | } 20 | 21 | public function castOutType($usage=null): string { 22 | return 'DATETIME'; 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /lib/equal/data/adapt/adapters/sql/sqlite/DataAdapterSqlIntegerSqlite.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2024 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | namespace equal\data\adapt\adapters\sql\sqlite; 8 | 9 | use equal\data\adapt\adapters\sql\DataAdapterSqlInteger; 10 | 11 | class DataAdapterSqlIntegerSqlite extends DataAdapterSqlInteger { 12 | 13 | public function getType() { 14 | return 'sql/integer'; 15 | } 16 | 17 | public function castInType(): string { 18 | return 'integer'; 19 | } 20 | 21 | public function castOutType($usage=null): string { 22 | return 'INTEGER'; 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /lib/equal/data/adapt/adapters/sql/sqlite/DataAdapterSqlRealSqlite.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2024 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | namespace equal\data\adapt\adapters\sql\sqlite; 8 | 9 | use equal\data\adapt\adapters\sql\DataAdapterSqlReal; 10 | 11 | class DataAdapterSqlRealSqlite extends DataAdapterSqlReal { 12 | 13 | public function getType() { 14 | return 'sql/real'; 15 | } 16 | 17 | public function castInType(): string { 18 | return 'float'; 19 | } 20 | 21 | public function castOutType($usage=null): string { 22 | return 'FLOAT'; 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /lib/equal/data/adapt/adapters/sql/sqlite/DataAdapterSqlTextSqlite.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2024 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | namespace equal\data\adapt\adapters\sql\sqlite; 8 | 9 | use equal\data\adapt\adapters\sql\DataAdapterSqlText; 10 | 11 | class DataAdapterSqlTextSqlite extends DataAdapterSqlText { 12 | 13 | public function getType() { 14 | return 'sql/text'; 15 | } 16 | 17 | public function castInType(): string { 18 | return 'string'; 19 | } 20 | 21 | public function castOutType($usage=null): string { 22 | return 'TEXT'; 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /lib/equal/data/adapt/adapters/sql/sqlite/DataAdapterSqlTimeSqlite.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2024 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | namespace equal\data\adapt\adapters\sql\sqlite; 8 | 9 | use equal\data\adapt\adapters\sql\DataAdapterSqlTime; 10 | 11 | class DataAdapterSqlTimeSqlite extends DataAdapterSqlTime { 12 | 13 | public function getType() { 14 | return 'sql/time'; 15 | } 16 | 17 | public function castInType(): string { 18 | return 'integer'; 19 | } 20 | 21 | public function castOutType($usage=null): string { 22 | return 'TIME'; 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /lib/equal/data/adapt/adapters/sql/sqlsrv/DataAdapterSqlArraySqlSrv.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2024 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | namespace equal\data\adapt\adapters\sql\sqlite; 8 | 9 | use equal\data\adapt\adapters\sql\DataAdapterSqlArray; 10 | 11 | class DataAdapterSqlArraySqlSrv extends DataAdapterSqlArray { 12 | 13 | public function getType() { 14 | return 'sql/array'; 15 | } 16 | 17 | public function castInType(): string { 18 | return 'array'; 19 | } 20 | 21 | public function castOutType($usage=null): string { 22 | return 'VARCHAR'; 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /lib/equal/data/adapt/adapters/sql/sqlsrv/DataAdapterSqlBinarySqlSrv.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2024 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | namespace equal\data\adapt\adapters\sql\sqlite; 8 | 9 | use equal\data\adapt\adapters\sql\DataAdapterSqlBinary; 10 | 11 | class DataAdapterSqlBinarySqlSrv extends DataAdapterSqlBinary { 12 | 13 | public function getType() { 14 | return 'sql/binary'; 15 | } 16 | 17 | public function castInType(): string { 18 | return 'string'; 19 | } 20 | 21 | public function castOutType($usage=null): string { 22 | return 'BLOB'; 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /lib/equal/data/adapt/adapters/sql/sqlsrv/DataAdapterSqlBooleanSqlSrv.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2024 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | namespace equal\data\adapt\adapters\sql\sqlite; 8 | 9 | use equal\data\adapt\adapters\sql\DataAdapterSqlBoolean; 10 | 11 | class DataAdapterSqlBooleanSqlSrv extends DataAdapterSqlBoolean { 12 | 13 | public function getType() { 14 | return 'sql/boolean'; 15 | } 16 | 17 | public function castInType(): string { 18 | return 'boolean'; 19 | } 20 | 21 | public function castOutType($usage=null): string { 22 | // 1 byte 23 | return 'bit'; 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /lib/equal/data/adapt/adapters/sql/sqlsrv/DataAdapterSqlDateSqlSrv.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2024 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | namespace equal\data\adapt\adapters\sql\sqlite; 8 | 9 | use equal\data\adapt\adapters\sql\DataAdapterSqlDate; 10 | 11 | class DataAdapterSqlDateSqlSrv extends DataAdapterSqlDate { 12 | 13 | public function getType() { 14 | return 'sql/date'; 15 | } 16 | 17 | public function castInType(): string { 18 | return 'integer'; 19 | } 20 | 21 | public function castOutType($usage=null): string { 22 | return 'date'; 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /lib/equal/data/adapt/adapters/sql/sqlsrv/DataAdapterSqlDateTimeSqlSrv.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2024 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | namespace equal\data\adapt\adapters\sql\sqlite; 8 | 9 | use equal\data\adapt\adapters\sql\DataAdapterSqlDateTime; 10 | 11 | class DataAdapterSqlDateTimeSqlSrv extends DataAdapterSqlDateTime { 12 | 13 | public function getType() { 14 | return 'sql/datetime'; 15 | } 16 | 17 | public function castInType(): string { 18 | return 'integer'; 19 | } 20 | 21 | public function castOutType($usage=null): string { 22 | return 'datetime2'; 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /lib/equal/data/adapt/adapters/sql/sqlsrv/DataAdapterSqlIntegerSqlSrv.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2024 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | namespace equal\data\adapt\adapters\sql\sqlite; 8 | 9 | use equal\data\adapt\adapters\sql\DataAdapterSqlInteger; 10 | 11 | class DataAdapterSqlIntegerSqlSrv extends DataAdapterSqlInteger { 12 | 13 | public function getType() { 14 | return 'sql/integer'; 15 | } 16 | 17 | public function castInType(): string { 18 | return 'integer'; 19 | } 20 | 21 | public function castOutType($usage=null): string { 22 | // 4 bytes 23 | return 'int'; 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /lib/equal/data/adapt/adapters/sql/sqlsrv/DataAdapterSqlRealSqlSrv.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2024 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | namespace equal\data\adapt\adapters\sql\sqlite; 8 | 9 | use equal\data\adapt\adapters\sql\DataAdapterSqlReal; 10 | 11 | class DataAdapterSqlRealSqlSrv extends DataAdapterSqlReal { 12 | 13 | public function getType() { 14 | return 'sql/real'; 15 | } 16 | 17 | public function castInType(): string { 18 | return 'float'; 19 | } 20 | 21 | public function castOutType($usage=null): string { 22 | // 4 bytes 23 | return 'float(24)'; 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /lib/equal/data/adapt/adapters/sql/sqlsrv/DataAdapterSqlTextSqlSrv.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2024 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | namespace equal\data\adapt\adapters\sql\sqlite; 8 | 9 | use equal\data\adapt\adapters\sql\DataAdapterSqlText; 10 | use equal\orm\UsageFactory; 11 | use equal\orm\usages\Usage; 12 | 13 | class DataAdapterSqlTextSqlSrv extends DataAdapterSqlText { 14 | 15 | public function getType() { 16 | return 'sql/text'; 17 | } 18 | 19 | public function castInType(): string { 20 | return 'string'; 21 | } 22 | 23 | public function castOutType($usage=null): string { 24 | $type = 'nvarchar(255)'; 25 | 26 | if(!is_null($usage)) { 27 | if(!($usage instanceof Usage)) { 28 | $usage = UsageFactory::create($usage); 29 | } 30 | $length = $usage->getLength(); 31 | if($length > 255) { 32 | // up to 1GB 33 | $type = 'nvarchar(max)'; 34 | } 35 | else { 36 | $type = 'nvarchar('.min($length, 1).')'; 37 | } 38 | } 39 | 40 | return $type; 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /lib/equal/data/adapt/adapters/sql/sqlsrv/DataAdapterSqlTimeSqlSrv.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2024 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | namespace equal\data\adapt\adapters\sql\sqlite; 8 | 9 | use equal\data\adapt\adapters\sql\DataAdapterSqlTime; 10 | 11 | class DataAdapterSqlTimeSqlSrv extends DataAdapterSqlTime { 12 | 13 | public function getType() { 14 | return 'sql/time'; 15 | } 16 | 17 | public function castInType(): string { 18 | return 'integer'; 19 | } 20 | 21 | public function castOutType($usage=null): string { 22 | return 'time'; 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /lib/equal/db/DBConnection.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, eQual framework, 2010-2024 5 | Original author(s): Cédric FRANCOYS 6 | License: GNU LGPL 3 license 7 | */ 8 | namespace equal\db; 9 | 10 | 11 | /** 12 | * This class uses factory pattern for providing DBManipulator instances. 13 | */ 14 | class DBConnection { 15 | 16 | public static function create(string $dbms='', string $host='', int $port=null, string $name='', string $user='', string $password='', string $charset='', string $collation='') { 17 | /** @var DBManipulator */ 18 | $dbConnection = null; 19 | 20 | switch($dbms) { 21 | case 'MARIADB': 22 | case 'MYSQL' : 23 | $dbConnection = new DBManipulatorMySQL($host, $port, $name, $user, $password, $charset, $collation); 24 | break; 25 | case 'SQLSRV' : 26 | $dbConnection = new DBManipulatorSqlSrv($host, $port, $name, $user, $password, $charset, $collation); 27 | break; 28 | case 'SQLITE' : 29 | $dbConnection = new DBManipulatorSQLite($host, $port, $name, $user, $password, $charset, $collation); 30 | break; 31 | case 'POSTGRESQL' : 32 | // #todo 33 | break; 34 | case 'ORACLE' : 35 | // #todo 36 | break; 37 | } 38 | return $dbConnection; 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /lib/equal/email/EmailAttachment.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2021 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | namespace equal\email; 8 | 9 | 10 | class EmailAttachment { 11 | 12 | /** 13 | * Full filename of the attachment (with extension). 14 | * @var string 15 | */ 16 | public $name; 17 | 18 | /** 19 | * Raw binary data of the attachment. 20 | * @var string 21 | */ 22 | public $data; 23 | 24 | /** 25 | * Content Type of data (MIME type). 26 | * @var string 27 | */ 28 | public $content_type; 29 | 30 | 31 | public function __construct(string $name, string $data, string $content_type) { 32 | $this->name = $name; 33 | $this->data = $data; 34 | $this->content_type = $content_type; 35 | } 36 | } -------------------------------------------------------------------------------- /lib/equal/http/HttpUriHelper.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2021 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | namespace equal\http; 8 | 9 | use equal\http\HttpUri; 10 | 11 | 12 | /** 13 | * 14 | * Utility class for URI manipulations 15 | * can be invoked either in a static context 16 | */ 17 | class HttpUriHelper { 18 | 19 | private static $instance; 20 | 21 | private static function &getInstance() { 22 | if (!(self::$instance instanceof self)) { 23 | self::$instance = new HttpUri(); 24 | } 25 | return self::$instance; 26 | } 27 | 28 | 29 | public static function __callStatic($method, $arguments) { 30 | $instance = self::getInstance(); 31 | $instance->setUri($arguments[0]); 32 | return call_user_func_array(array($instance, $method), []); 33 | } 34 | } -------------------------------------------------------------------------------- /lib/equal/organic/Factory.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2021 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | 8 | namespace equal\organic; 9 | 10 | class Factory extends Service { 11 | 12 | public function __construct() {} 13 | 14 | public function create($arg) {} 15 | } -------------------------------------------------------------------------------- /lib/equal/organic/Service.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2021 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | namespace equal\organic; 8 | use equal\services\Container; 9 | 10 | class Service extends Singleton { 11 | /* All services are instantiated through the service container 12 | which instance is, in turn, made available as public member 13 | */ 14 | public $container; 15 | 16 | /** 17 | * Returns a list of constant names that the service expects to be available. 18 | * 19 | * @return array 20 | */ 21 | public static function constants() { return []; } 22 | 23 | 24 | public function getContainer() { 25 | return $this->container; 26 | } 27 | 28 | } -------------------------------------------------------------------------------- /lib/equal/organic/Singleton.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2021 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | namespace equal\organic; 8 | 9 | class Singleton { 10 | protected function __construct() {} 11 | 12 | protected function __clone() {} 13 | 14 | // public function __sleep() {} 15 | 16 | // public function __wakeup() {} 17 | 18 | public static function &getInstance() { 19 | // late-static-bound class name 20 | $class_name = get_called_class(); 21 | $class_id = '__INSTANCE__'.str_replace("\\", '_', $class_name); 22 | if (!isset($GLOBALS[$class_id])) { 23 | $GLOBALS[$class_id] = new $class_name(...func_get_args()); 24 | } 25 | return $GLOBALS[$class_id]; 26 | } 27 | 28 | /** 29 | * Provide an access to singleton instance in static call context 30 | * 31 | */ 32 | public static function _isStatic() { 33 | $backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2); 34 | // retrieve info from where the error was actually raised 35 | return $backtrace[1]['type'] == '::'; 36 | } 37 | } -------------------------------------------------------------------------------- /lib/equal/orm/Collections.class.php: -------------------------------------------------------------------------------- 1 | container->get('orm'), 24 | $this->container->get('access'), 25 | $this->container->get('auth'), 26 | $this->container->get('adapt'), 27 | $this->container->get('log') 28 | ); 29 | } 30 | } -------------------------------------------------------------------------------- /lib/equal/orm/Package.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2024 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | namespace equal\orm; 8 | 9 | class Package { 10 | /** 11 | * @var string 12 | * 13 | */ 14 | private $name; 15 | 16 | /** 17 | * @param string $name Name of the package. 18 | */ 19 | public final function __construct(string $package_name) { 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /lib/equal/orm/usages/UsageArray.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2021 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | namespace equal\orm\usages; 8 | 9 | 10 | class UsageArray extends Usage { 11 | 12 | 13 | /** 14 | * 15 | */ 16 | public function getConstraints(): array { 17 | return [ 18 | 19 | 'not_array' => [ 20 | 'message' => 'Value is not an array.', 21 | 'function' => function($value) { 22 | return is_array($value); 23 | } 24 | ] 25 | 26 | ]; 27 | } 28 | 29 | public function generateRandomValue(): array { 30 | return []; 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /lib/equal/orm/usages/UsageBinary.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2021 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | namespace equal\orm\usages; 8 | 9 | class UsageBinary extends Usage { 10 | 11 | public function __construct(string $usage_str) { 12 | parent::__construct($usage_str); 13 | 14 | if($this->length == 0) { 15 | $this->length = constant('UPLOAD_MAX_FILE_SIZE'); 16 | } 17 | } 18 | 19 | public function getConstraints(): array { 20 | return [ 21 | 'size_exceeded' => [ 22 | 'message' => 'Binary exceeds length constraint.', 23 | 'function' => function($value) { 24 | $len = intval($this->getLength()); 25 | $strlen = strlen($value); 26 | return !( ($len && $strlen > $len) || $strlen > constant('UPLOAD_MAX_FILE_SIZE')); 27 | } 28 | ] 29 | ]; 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /lib/equal/orm/usages/UsageEmail.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2021 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | namespace equal\orm\usages; 8 | 9 | 10 | use equal\data\DataGenerator; 11 | 12 | class UsageEmail extends Usage { 13 | 14 | public function __construct(string $usage_str) { 15 | parent::__construct($usage_str); 16 | if($this->length == 0) { 17 | $this->length = 255; 18 | } 19 | } 20 | 21 | /** 22 | * 23 | * supports: 24 | * c@a.com 25 | * c@a.b.com 26 | * c@a.b.c.com 27 | * a+c@a.b.c.com 28 | * a.c+d@a.b.c.com 29 | * ad@a.b.c.xn--vermgensberatung-pwb 30 | * does not support: 31 | * a+c.d@a.b.c.com 32 | */ 33 | public function getConstraints(): array { 34 | return [ 35 | 'invalid_email' => [ 36 | 'message' => 'Malformed email address.', 37 | 'function' => function($value) { 38 | return (bool) (preg_match('/^([_a-z0-9-\.]+)(\+([_a-z0-9]+))?@(([a-z0-9-]+\.)*)([a-z0-9-]{1,63})(\.[a-z-]{2,24})$/i', $value)); 39 | } 40 | ] 41 | ]; 42 | } 43 | 44 | public function generateRandomValue(): string { 45 | return DataGenerator::email(); 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /lib/equal/orm/usages/UsagePhone.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2021 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | namespace equal\orm\usages; 8 | 9 | 10 | use equal\data\DataGenerator; 11 | 12 | class UsagePhone extends Usage { 13 | 14 | public function __construct(string $usage_str) { 15 | parent::__construct($usage_str); 16 | if($this->length == 0) { 17 | $this->length = 17; 18 | } 19 | } 20 | 21 | public function getConstraints(): array { 22 | return [ 23 | 'invalid_phone' => [ 24 | 'message' => 'String does not comply with usage constraint.', 25 | 'function' => function($value) { 26 | return (bool) (preg_match('/^((\+[1-9]{2,3})|00|0)+([0-9]){1,13}$/', $value)); 27 | } 28 | ] 29 | ]; 30 | } 31 | 32 | public function generateRandomValue(): string { 33 | return DataGenerator::phoneNumberE164(); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /lib/equal/orm/usages/UsageTime.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2021 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | namespace equal\orm\usages; 8 | 9 | use equal\data\DataGenerator; 10 | 11 | class UsageTime extends Usage { 12 | 13 | /* 14 | time/plain (h:m:s) 15 | */ 16 | public function getConstraints(): array { 17 | /* 18 | switch($this->getSubtype()) { 19 | default: 20 | } 21 | */ 22 | return []; 23 | } 24 | 25 | public function generateRandomValue(): string { 26 | return DataGenerator::time(); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /log/log2json.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # converts all lines from current equal.log file to a valid JSON object (array) and send to STDOUT 3 | echo "["; awk '{print $0","}' equal.log | sed '$ s/,$//'; echo "]" 4 | 5 | # usage 6 | 7 | # ./log2json.sh 8 | 9 | # This script can be used in conjunction with a JSON parser like jqlang (https://jqlang.github.io/) 10 | 11 | # examples 12 | 13 | # unique threads identifiers 14 | # ./log2json.sh | ./jq.exe '[.[].thread_id] | unique' 15 | 16 | # datetimes of all requests (1 per thread) 17 | # ./log2json.sh | ./jq.exe '.[] | select(.mode == "NET" and .level == "SYSTEM") | [.time]' 18 | 19 | # simplified version with time and message of all items from a given thread 20 | # ./log2json.sh | ./jq.exe '.[] | select(.thread_id == "e208e52f") | {time: .time, message: .message}' -------------------------------------------------------------------------------- /packages/core/actions/alert/bulk-dismiss.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2024 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | use core\alert\Message; 8 | 9 | list($params, $providers) = eQual::announce([ 10 | 'description' => "Tries to dismiss a selection of alert message. Should be invoked as a user request for removing the message.", 11 | 'params' => [ 12 | 'ids' => [ 13 | 'description' => 'Identifiers of the alerts to dismiss.', 14 | 'type' => 'one2many', 15 | 'foreign_object' => 'core\alert\Message', 16 | 'required' => true 17 | ] 18 | ], 19 | 'access' => [ 20 | 'visibility' => 'protected' 21 | ], 22 | 'response' => [ 23 | 'content-type' => 'application/json', 24 | 'charset' => 'utf-8', 25 | 'accept-origin' => '*' 26 | ], 27 | 'providers' => ['context', 'dispatch'] 28 | ]); 29 | 30 | /** 31 | * @var \equal\php\Context $context 32 | * @var \equal\dispatch\Dispatcher $dispatch 33 | */ 34 | list($context, $dispatch) = [ $providers['context'], $providers['dispatch']]; 35 | 36 | $messages = Message::ids($params['ids'])->read(['id']); 37 | 38 | foreach($messages as $id => $message) { 39 | try { 40 | eQual::run('do', 'core_alert_dismiss', ['id' => $id]); 41 | } 42 | catch(Exception $e) { 43 | // something went wrong : ignore 44 | } 45 | } 46 | 47 | $context->httpResponse() 48 | ->send(); 49 | -------------------------------------------------------------------------------- /packages/core/actions/alert/delete.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2024 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | use core\alert\Message; 8 | 9 | list($params, $providers) = eQual::announce([ 10 | 'description' => "Remove the alert without retrying to perform related verification (issue might still be present).", 11 | 'params' => [ 12 | 'id' => [ 13 | 'description' => 'Identifier of the alert to dismiss.', 14 | 'type' => 'integer', 15 | 'required' => true 16 | ] 17 | ], 18 | 'access' => [ 19 | 'visibility' => 'protected' 20 | ], 21 | 'response' => [ 22 | 'content-type' => 'application/json', 23 | 'charset' => 'utf-8', 24 | 'accept-origin' => '*' 25 | ], 26 | 'providers' => ['context', 'auth', 'dispatch'] 27 | ]); 28 | 29 | /** 30 | * @var \equal\php\Context $context 31 | * @var \equal\auth\AuthenticationManager $auth 32 | * @var \equal\dispatch\Dispatcher $dispatch 33 | */ 34 | list($context, $auth, $dispatch) = [ $providers['context'], $providers['auth'], $providers['dispatch']]; 35 | 36 | $user_id = $auth->userId(); 37 | 38 | // If the alert is not found, the call is ignored. If a controller is mentioned in the alert it is called. 39 | Message::id($params['id'])->delete(true); 40 | 41 | $context->httpResponse() 42 | ->status(205) 43 | ->send(); 44 | -------------------------------------------------------------------------------- /packages/core/actions/alert/dismiss.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2024 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | 8 | list($params, $providers) = eQual::announce([ 9 | 'description' => "Tries to dismiss a message. Should be invoked as a user request for removing the message. If the situation is still occurring an identical alert will be re-created.", 10 | 'params' => [ 11 | 'id' => [ 12 | 'description' => 'Identifier of the alert to dismiss.', 13 | 'type' => 'integer', 14 | 'required' => true 15 | ] 16 | ], 17 | 'access' => [ 18 | 'visibility' => 'protected' 19 | ], 20 | 'response' => [ 21 | 'content-type' => 'application/json', 22 | 'charset' => 'utf-8', 23 | 'accept-origin' => '*' 24 | ], 25 | 'providers' => ['context', 'auth', 'dispatch'] 26 | ]); 27 | 28 | /** 29 | * @var \equal\php\Context $context 30 | * @var \equal\auth\AuthenticationManager $auth 31 | * @var \equal\dispatch\Dispatcher $dispatch 32 | */ 33 | ['context' => $context, 'auth' => $auth, 'dispatch' => $dispatch] = $providers; 34 | 35 | // #todo - restrict access based on link between MessageModel and user groups 36 | $user_id = $auth->userId(); 37 | 38 | // If the alert is not found, the call is ignored. If a controller is mentioned in the alert it is called. 39 | $dispatch->dismiss($params['id']); 40 | 41 | $context->httpResponse() 42 | ->send(); 43 | -------------------------------------------------------------------------------- /packages/core/actions/config/update-package.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2021 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | 8 | list($params, $providers) = eQual::announce([ 9 | 'description' => "Updates a given package name.", 10 | 'help' => "Still not sure how to handle this since the package name might be referenced in many places.", 11 | 'response' => [ 12 | 'content-type' => 'text/plain', 13 | 'charset' => 'UTF-8', 14 | 'accept-origin' => '*' 15 | ], 16 | 'params' => [ 17 | 'package' => [ 18 | 'description' => 'Name of the package for which the name has to be updated.', 19 | 'type' => 'string', 20 | 'required' => true 21 | ], 22 | 'name' => [ 23 | 'description' => 'New name for the package.', 24 | 'type' => 'string', 25 | 'required' => true 26 | ] 27 | ], 28 | 'providers' => ['context', 'orm'] 29 | ]); 30 | 31 | /** 32 | * @var \equal\php\Context $context 33 | * @var \equal\orm\ObjectManager $orm 34 | */ 35 | list($context, $orm) = [$providers['context'], $providers['orm']]; 36 | 37 | 38 | $context->httpResponse() 39 | ->body($result) 40 | ->send(); 41 | -------------------------------------------------------------------------------- /packages/core/actions/cron/run.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Yesbabylon SRL, 2020-2021 5 | Licensed under GNU AGPL 3 license 6 | */ 7 | 8 | use core\Task; 9 | 10 | list($params, $providers) = announce([ 11 | 'description' => "Run a batch of scheduled task. Expected to be run with CLI `$ ./equal.run --do=cron_run`", 12 | 'params' => [ 13 | 'ids' => [ 14 | 'type' => 'one2many', 15 | 'foreign_object' => Task::getType(), 16 | 'description' => 'Optional identifiers of the specific tasks to run. If not given, all due tasks are candidates to execution.', 17 | 'default' => [] 18 | ] 19 | ], 20 | 'access' => [ 21 | 'visibility' => 'protected' 22 | ], 23 | 'response' => [ 24 | 'content-type' => 'application/json', 25 | 'charset' => 'utf-8', 26 | 'accept-origin' => '*' 27 | ], 28 | 'providers' => ['context', 'cron', 'access'] 29 | ]); 30 | 31 | /** 32 | * @var \equal\php\Context $context 33 | * @var \equal\cron\Scheduler $cron 34 | * @var \equal\access\AccessController $am 35 | */ 36 | list($context, $cron, $am) = [$providers['context'], $providers['cron'], $providers['access']]; 37 | 38 | if(!$am->hasGroup('admins')) { 39 | throw new Exception('admin_only', QN_ERROR_NOT_ALLOWED); 40 | } 41 | 42 | // run the scheduled tasks that require it 43 | $cron->run($params['ids']); 44 | 45 | $context->httpResponse() 46 | ->status(204) 47 | ->send(); 48 | -------------------------------------------------------------------------------- /packages/core/actions/decrypt.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2021 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | 8 | // announce script and fetch parameters values 9 | list($params, $providers) = announce([ 10 | 'description' => "Decrypts given cipher using private cipher key.", 11 | 'params' => [ 12 | 'value' => [ 13 | 'description' => 'Cipher to decrypt.', 14 | 'type' => 'string', 15 | 'required' => true 16 | ] 17 | ], 18 | 'response' => [ 19 | 'content-type' => 'application/json', 20 | 'charset' => 'utf-8', 21 | 'accept-origin' => '*' 22 | ], 23 | 'providers' => ['context'] 24 | ]); 25 | 26 | 27 | // initalise local vars with inputs 28 | list($context) = [ $providers['context'] ]; 29 | 30 | $result = config\decrypt($params['value']); 31 | 32 | $context->httpResponse() 33 | ->body(['result' => $result]) 34 | ->status(204) 35 | ->send(); -------------------------------------------------------------------------------- /packages/core/actions/encrypt.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2021 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | 8 | // announce script and fetch parameters values 9 | list($params, $providers) = announce([ 10 | 'description' => "Encrypts given value using private cipher key.", 11 | 'params' => [ 12 | 'value' => [ 13 | 'description' => 'Value to encrypt.', 14 | 'type' => 'string', 15 | 'required' => true 16 | ] 17 | ], 18 | 'response' => [ 19 | 'content-type' => 'application/json', 20 | 'charset' => 'utf-8', 21 | 'accept-origin' => '*' 22 | ], 23 | 'providers' => ['context'] 24 | ]); 25 | 26 | 27 | // initalise local vars with inputs 28 | list($context) = [ $providers['context'] ]; 29 | 30 | $result = config\encrypt($params['value']); 31 | 32 | $context->httpResponse() 33 | ->body(['result' => $result]) 34 | ->status(204) 35 | ->send(); -------------------------------------------------------------------------------- /packages/core/actions/init/db.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2021 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | use equal\db\DBConnector; 8 | 9 | 10 | list($params, $providers) = eQual::announce([ 11 | 'description' => 'Create a database according to the configuration', 12 | 'params' => [], 13 | 'providers' => ['context', 'orm'], 14 | 'constants' => ['DB_HOST', 'DB_PORT', 'DB_NAME', 'DB_USER', 'DB_PASSWORD', 'DB_DBMS', 'DB_CHARSET'] 15 | ]); 16 | 17 | list($context, $orm) = [$providers['context'], $providers['orm']]; 18 | 19 | eQual::run('do', 'test_db-connectivity'); 20 | 21 | // create Master database 22 | $db = DBConnector::getInstance()->connect(false); 23 | $db->createDatabase(constant('DB_NAME')); 24 | 25 | // create replica members, if any 26 | if(defined('DB_REPLICATION') && constant('DB_REPLICATION') != 'NO') { 27 | $i = 1; 28 | while(defined('DB_'.$i.'_HOST') && defined('DB_'.$i.'_PORT') && defined('DB_'.$i.'_USER') && defined('DB_'.$i.'_PASSWORD') && defined('DB_'.$i.'_NAME')) { 29 | $db = DBConnector::getInstance(constant('DB_'.$i.'_HOST'), constant('DB_'.$i.'_PORT'), constant('DB_'.$i.'_NAME'), constant('DB_'.$i.'_USER'), constant('DB_'.$i.'_PASSWORD'), constant('DB_DBMS'))->connect(false); 30 | $db->createDatabase(constant('DB_'.$i.'_NAME')); 31 | ++$i; 32 | } 33 | } -------------------------------------------------------------------------------- /packages/core/actions/spool/run.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2024 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | use core\Mail; 8 | 9 | // announce script and fetch parameters values 10 | list($params, $providers) = eQual::announce([ 11 | 'description' => "Send emails that are currently in spool queue.", 12 | 'params' => [ 13 | ], 14 | 'access' => [ 15 | 'visibility' => 'private' 16 | ], 17 | 'response' => [ 18 | 'content-type' => 'application/json', 19 | 'charset' => 'utf-8', 20 | 'accept-origin' => '*' 21 | ], 22 | 'providers' => ['context', 'orm', 'auth'] 23 | ]); 24 | 25 | 26 | // initialize local vars with inputs 27 | list($om, $context, $auth) = [ $providers['orm'], $providers['context'], $providers['auth'] ]; 28 | 29 | Mail::flush(); 30 | 31 | $context->httpResponse() 32 | ->status(204) 33 | ->send(); 34 | -------------------------------------------------------------------------------- /packages/core/actions/test/config.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2021 5 | Licensed under GNU GPL 3 license 6 | */ 7 | use equal\db\DBConnector; 8 | 9 | $params = announce([ 10 | 'description' => "Tests access to the database.\nIn case of success, the script simply terminates with a status code of 0 (no output).", 11 | 'params' => [], 12 | 'constants' => ['DB_HOST', 'DB_PORT', 'DB_NAME', 'DB_USER', 'DB_PASSWORD', 'DB_DBMS'] 13 | ]); 14 | 15 | // retrieve connection object 16 | $db = DBConnector::getInstance(constant('DB_HOST'), constant('DB_PORT'), constant('DB_NAME'), constant('DB_USER'), constant('DB_PASSWORD'), constant('DB_DBMS')); 17 | 18 | // 1) test connectivity to DBMS service 19 | $json = run('do', 'test_db-connectivity'); 20 | if(strlen($json)) { 21 | // relay result 22 | print($json); 23 | // return an error code 24 | exit(1); 25 | } 26 | // 2) try to connect to DBMS 27 | if(!$db->connected()) { 28 | if($db->connect(false) == false) { 29 | throw new Exception('Unable to establish connection to DBMS host (wrong credentials)', QN_ERROR_INVALID_CONFIG); 30 | } 31 | } 32 | // 3) try to select specified DB 33 | if(!$db->select(constant('DB_NAME'))) { 34 | $db->disconnect(); 35 | throw new Exception('Unable to access specified database (DB \''.constant('DB_NAME').'\' not found)', QN_ERROR_INVALID_CONFIG); 36 | } 37 | // 3) everything went well: disconnect 38 | $db->disconnect(); 39 | 40 | // no error, exit code will be 0 -------------------------------------------------------------------------------- /packages/core/actions/test/db-connectivity.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2021 5 | Licensed under GNU GPL 3 license 6 | */ 7 | use equal\db\DBConnector; 8 | 9 | $params = eQual::announce([ 10 | 'description' => "Tests connectivity to the DBMS server.\n 11 | In case of success, the script simply terminates with a status code of 0 (no output).", 12 | 'params' => [], 13 | 'constants' => ['DB_HOST', 'DB_PORT', 'DB_NAME', 'DB_USER', 'DB_PASSWORD', 'DB_DBMS'] 14 | ]); 15 | 16 | // retrieve connection object 17 | $db = DBConnector::getInstance(constant('DB_HOST'), constant('DB_PORT'), constant('DB_NAME'), constant('DB_USER'), constant('DB_PASSWORD'), constant('DB_DBMS')); 18 | 19 | // 1) test access to DBMS service 20 | if(!$db->canConnect()) { 21 | throw new Exception('Unable to establish connection to DBMS host (wrong hostname).', QN_ERROR_INVALID_CONFIG); 22 | } 23 | // 2) try to connect to DBMS 24 | if(!$db->connected()) { 25 | if($db->connect(false) == false) { 26 | throw new Exception('Unable to establish connection to DBMS host (wrong port or wrong credentials).', QN_ERROR_INVALID_CONFIG); 27 | } 28 | } 29 | // 3) everything went well: disconnect 30 | $db->disconnect(); 31 | 32 | // no error, exit code will be 0 -------------------------------------------------------------------------------- /packages/core/actions/user/signout.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2021 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | 8 | list($params, $providers) = eQual::announce([ 9 | 'description' => "Sign a user out.", 10 | 'params' => [ 11 | ], 12 | 'constants' => ['BACKEND_URL', 'AUTH_TOKEN_HTTPS'], 13 | 'response' => [ 14 | 'content-type' => 'application/json', 15 | 'charset' => 'utf-8', 16 | 'accept-origin' => '*' 17 | ], 18 | 'providers' => ['context'], 19 | ]); 20 | 21 | /** 22 | * @var equal\php\Context $context 23 | */ 24 | ['context' => $context ] = $providers; 25 | 26 | 27 | $context->httpResponse() 28 | ->cookie('access_token', '', [ 29 | 'expires' => time(), 30 | 'httponly' => true, 31 | 'secure' => constant('AUTH_TOKEN_HTTPS'), 32 | 'domain' => parse_url(constant('BACKEND_URL'), PHP_URL_HOST) 33 | ]) 34 | ->status(204) 35 | ->send(); 36 | -------------------------------------------------------------------------------- /packages/core/apps/app/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "app", 3 | "description": "Standard App to serve as surrogate for Package-specific Apps.", 4 | "version": "1.0", 5 | "authors": ["Cedric Francoys"], 6 | "license": "LGPL-3", 7 | "repository": "https://github.com/equalframework/apps-core-app.git", 8 | "url": "/app", 9 | "access": { 10 | "groups": [ 11 | "users" 12 | ] 13 | }, 14 | "show_in_apps": false 15 | } -------------------------------------------------------------------------------- /packages/core/apps/app/version: -------------------------------------------------------------------------------- 1 | 753600ef0b8de42432eb5c3429879a74 2 | -------------------------------------------------------------------------------- /packages/core/apps/app/web.app: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/equalframework/equal/25cd74e7030fe81a126c37287cf93b6202ced774/packages/core/apps/app/web.app -------------------------------------------------------------------------------- /packages/core/apps/apps.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2024 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | list($params, $providers) = eQual::announce([ 8 | 'description' => 'Redirect to `/apps` public folder.', 9 | 'params' => [], 10 | 'response' => [ 11 | 'location' => '/apps/' 12 | ] 13 | ]); 14 | -------------------------------------------------------------------------------- /packages/core/apps/apps/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Apps", 3 | "description": "Dashboard showing all Apps that are available to current User.", 4 | "version": "1.0", 5 | "authors": ["Cedric Francoys"], 6 | "license": "LGPL-3", 7 | "repository": "https://github.com/equalframework/apps-core-apps.git", 8 | "url": "/apps", 9 | "access": { 10 | "groups": [ 11 | "users" 12 | ] 13 | }, 14 | "show_in_apps": false 15 | } -------------------------------------------------------------------------------- /packages/core/apps/apps/version: -------------------------------------------------------------------------------- 1 | 7ef695ed786fd5c6984faa15cb2de4cc 2 | -------------------------------------------------------------------------------- /packages/core/apps/apps/web.app: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/equalframework/equal/25cd74e7030fe81a126c37287cf93b6202ced774/packages/core/apps/apps/web.app -------------------------------------------------------------------------------- /packages/core/apps/auth.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2024 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | list($params, $providers) = eQual::announce([ 8 | 'description' => 'Redirect to `/auth` public folder.', 9 | 'params' => [], 10 | 'response' => [ 11 | 'location' => '/auth/' 12 | ] 13 | ]); 14 | -------------------------------------------------------------------------------- /packages/core/apps/auth/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Authentication", 3 | "description": "App for authenticating users and/or creating new accounts.", 4 | "version": "1.0", 5 | "authors": ["Cedric Francoys"], 6 | "license": "LGPL-3", 7 | "repository": "https://github.com/equalframework/apps-core-auth.git", 8 | "url": "/auth", 9 | "access": { 10 | "groups": [ 11 | "users" 12 | ] 13 | }, 14 | "show_in_apps": false 15 | } -------------------------------------------------------------------------------- /packages/core/apps/auth/version: -------------------------------------------------------------------------------- 1 | 8f177a53b1d9439b24c5bfc5d0c959ef 2 | -------------------------------------------------------------------------------- /packages/core/apps/auth/web.app: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/equalframework/equal/25cd74e7030fe81a126c37287cf93b6202ced774/packages/core/apps/auth/web.app -------------------------------------------------------------------------------- /packages/core/apps/discord.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2021 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | list($params, $providers) = eQual::announce([ 8 | 'description' => 'Redirect to eQual Discord server.', 9 | 'params' => [], 10 | 'response' => [ 11 | 'location' => 'https://discord.gg/xNAXyhbYBp' 12 | ] 13 | ]); 14 | -------------------------------------------------------------------------------- /packages/core/apps/noop.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | Invalid request 4 | -------------------------------------------------------------------------------- /packages/core/apps/sandbox/.gitignore: -------------------------------------------------------------------------------- 1 | source/ 2 | -------------------------------------------------------------------------------- /packages/core/apps/sandbox/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Sandbox", 3 | "description": "Demo App to help learning how to use the eQUI logic.", 4 | "version": "1.0", 5 | "authors": ["Cedric Francoys"], 6 | "license": "LGPL-3", 7 | "repository": "https://github.com/equalframework/apps-core-sandbox.git", 8 | "url": "/sandbox", 9 | "icon": "edit_note", 10 | "color": "#d2252c", 11 | "access": { 12 | "groups": [ 13 | "users", "admins" 14 | ] 15 | }, 16 | "show_in_apps": false 17 | } -------------------------------------------------------------------------------- /packages/core/apps/sandbox/web.app: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/equalframework/equal/25cd74e7030fe81a126c37287cf93b6202ced774/packages/core/apps/sandbox/web.app -------------------------------------------------------------------------------- /packages/core/apps/settings/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Settings", 3 | "description": "Manage and configure global and App-specific options and parameters.", 4 | "version": "1.0", 5 | "authors": ["Cedric Francoys"], 6 | "license": "LGPL-3", 7 | "repository": "https://github.com/equalframework/apps-core-settings.git", 8 | "url": "/settings", 9 | "icon": "settings", 10 | "color": "#FF5F00", 11 | "access": { 12 | "groups": [ 13 | "admins" 14 | ] 15 | }, 16 | "show_in_apps": true 17 | } -------------------------------------------------------------------------------- /packages/core/apps/settings/version: -------------------------------------------------------------------------------- 1 | d774a26460bc9591c407a6868fe36eff 2 | -------------------------------------------------------------------------------- /packages/core/apps/settings/web.app: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/equalframework/equal/25cd74e7030fe81a126c37287cf93b6202ced774/packages/core/apps/settings/web.app -------------------------------------------------------------------------------- /packages/core/apps/welcome.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2024 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | list($params, $providers) = eQual::announce([ 8 | 'description' => 'Redirect to `/welcome` public folder.', 9 | 'params' => [], 10 | 'response' => [ 11 | 'location' => '/welcome/' 12 | ] 13 | ]); 14 | -------------------------------------------------------------------------------- /packages/core/apps/welcome/web.app: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/equalframework/equal/25cd74e7030fe81a126c37287cf93b6202ced774/packages/core/apps/welcome/web.app -------------------------------------------------------------------------------- /packages/core/apps/workbench/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Workbench", 3 | "description": "The workbench App allows to create, edit, and configure the components of the current installation.", 4 | "url": "/workbench", 5 | "icon": "construction", 6 | "color": "#3a8f50", 7 | "access": { 8 | "groups": [ 9 | "admins" 10 | ] 11 | }, 12 | "show_in_apps": true 13 | } -------------------------------------------------------------------------------- /packages/core/apps/workbench/version: -------------------------------------------------------------------------------- 1 | 9c2936c336a974e178c442bd43820a86 2 | -------------------------------------------------------------------------------- /packages/core/apps/workbench/web.app: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/equalframework/equal/25cd74e7030fe81a126c37287cf93b6202ced774/packages/core/apps/workbench/web.app -------------------------------------------------------------------------------- /packages/core/classes/TaskLog.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2021 5 | Licensed under GNU GPL 3 license 6 | */ 7 | namespace core; 8 | 9 | use equal\orm\Model; 10 | 11 | class TaskLog extends Model { 12 | 13 | public static function getDescription() { 14 | return "A TaskLog is an entry that relates to a task. One TaskLog is created after each execution of a task."; 15 | } 16 | 17 | /** 18 | * Tasks are executed by the CRON service if moment (timestamp) is lower or equal to the current time 19 | */ 20 | public static function getColumns() { 21 | return [ 22 | 23 | 'task_id' => [ 24 | 'type' => 'many2one', 25 | 'foreign_object' => 'core\Task', 26 | 'description' => 'The Task the log entry refers to.', 27 | 'required' => true 28 | ], 29 | 30 | 'status' => [ 31 | 'type' => 'string', 32 | 'selection' => [ 33 | 'success', 34 | 'error' 35 | ], 36 | 'description' => 'Status depending on the Task execution outcome.' 37 | ], 38 | 39 | 'log' => [ 40 | 'type' => 'string', 41 | 'usage' => 'text/plain', 42 | 'description' => "The value returned at the execution of the controller targeted by the Task." 43 | ] 44 | 45 | ]; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /packages/core/classes/Translation.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2021 5 | Licensed under GNU GPL 3 license 6 | */ 7 | namespace core; 8 | 9 | use equal\orm\Model; 10 | 11 | class Translation extends Model { 12 | 13 | public static function getColumns() { 14 | return [ 15 | 'language' => [ 16 | 'type' => 'string', 17 | 'usage' => 'language/iso-639:2' 18 | ], 19 | 'object_class' => [ 20 | 'type' => 'string' 21 | ], 22 | 'object_field' => [ 23 | 'type' => 'string' 24 | ], 25 | 'object_id' => [ 26 | 'type' => 'integer' 27 | ], 28 | 'value' => [ 29 | 'type' => 'binary' 30 | ] 31 | ]; 32 | } 33 | } -------------------------------------------------------------------------------- /packages/core/classes/Version.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2021 5 | Licensed under GNU GPL 3 license 6 | */ 7 | namespace core; 8 | 9 | use equal\orm\Model; 10 | 11 | /** 12 | * @deprecated 13 | */ 14 | class Version extends Model { 15 | 16 | public static function getColumns() { 17 | return [ 18 | /* override state field */ 19 | 'state' => [ 20 | 'type' => 'string', 21 | 'selection' => ['draft', 'version'] 22 | ], 23 | 24 | 'object_class' => [ 25 | 'type' => 'string' 26 | ], 27 | 28 | 'object_id' => [ 29 | 'type' => 'integer' 30 | ], 31 | 32 | 'serialized_value' => [ 33 | 'type' => 'string', 34 | 'usage' => 'text/plain', 35 | ], 36 | 37 | 'lang' => [ 38 | 'type' => 'string' 39 | ] 40 | ]; 41 | } 42 | } -------------------------------------------------------------------------------- /packages/core/classes/alert/MessageModel.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2021 5 | Licensed under GNU GPL 3 license 6 | */ 7 | namespace core\alert; 8 | 9 | use equal\orm\Model; 10 | 11 | class MessageModel extends Model { 12 | 13 | public static function getColumns() { 14 | return [ 15 | 'name' => [ 16 | 'type' => 'string', 17 | 'description' => 'Name of the model, for system identification.', 18 | 'required' => true 19 | ], 20 | 21 | 'label' => [ 22 | 'type' => 'string', 23 | 'description' => "Short name of the message model.", 24 | 'multilang' => true 25 | ], 26 | 27 | 'description' => [ 28 | 'type' => 'string', 29 | 'description' => "Description of the meaning of the message.", 30 | 'multilang' => true 31 | ], 32 | 33 | 'type' => [ 34 | 'type' => 'string', 35 | 'description' => "Short code/string for grouping the models." 36 | ], 37 | 38 | 'messages_ids' => [ 39 | 'type' => 'one2many', 40 | 'foreign_object' => 'core\alert\Message', 41 | 'foreign_field' => 'message_model_id', 42 | 'description' => "List of messages of this model." 43 | ] 44 | 45 | ]; 46 | } 47 | } -------------------------------------------------------------------------------- /packages/core/classes/import/DataTransformerMapValue.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2021 5 | Licensed under GNU GPL 3 license 6 | */ 7 | namespace core\import; 8 | 9 | use equal\orm\Model; 10 | 11 | class DataTransformerMapValue extends Model { 12 | 13 | public static function getDescription(): string { 14 | return 'Transform step to adapt external data to eQual entity.'; 15 | } 16 | 17 | public static function getColumns(): array { 18 | return [ 19 | 20 | 'data_transformer_id' => [ 21 | 'type' => 'many2one', 22 | 'foreign_object' => 'core\import\DataTransformer', 23 | 'description' => 'The data transformer this map value is part of.', 24 | 'required' => true 25 | ], 26 | 27 | 'old_value' => [ 28 | 'type' => 'string', 29 | 'description' => 'Old value that needs to be replaced.', 30 | 'required' => true 31 | ], 32 | 33 | 'new_value' => [ 34 | 'type' => 'string', 35 | 'description' => 'New value that needs to be replace the old value.', 36 | 'required' => true 37 | ] 38 | 39 | ]; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /packages/core/classes/pipeline/NodeLink.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2021 5 | Licensed under GNU GPL 3 license 6 | */ 7 | 8 | namespace core\pipeline; 9 | 10 | use equal\orm\Model; 11 | 12 | class NodeLink extends Model 13 | { 14 | 15 | public static function getColumns() 16 | { 17 | return [ 18 | 'reference_node_id' => [ 19 | 'type' => 'integer', 20 | 'required' => true 21 | ], 22 | 23 | 'source_node_id' => [ 24 | 'type' => 'many2one', 25 | 'foreign_object' => 'core\pipeline\Node', 26 | 'required' => true 27 | ], 28 | 29 | 'target_node_id' => [ 30 | 'type' => 'many2one', 31 | 'foreign_object' => 'core\pipeline\Node', 32 | 'required' => true 33 | ], 34 | 35 | 'target_param' => [ 36 | 'type' => 'string' 37 | ] 38 | ]; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /packages/core/classes/pipeline/Parameter.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Yesbabylon SRL, 2020-2021 5 | Licensed under GNU AGPL 3 license 6 | */ 7 | 8 | namespace core\pipeline; 9 | 10 | use equal\orm\Model; 11 | 12 | class Parameter extends Model 13 | { 14 | 15 | public static function getColumns() 16 | { 17 | return [ 18 | 'node_id' => [ 19 | 'type' => 'many2one', 20 | 'foreign_object' => 'core\pipeline\Node' 21 | ], 22 | 23 | 'value' => [ 24 | 'type' => 'string', 25 | 'required' => true 26 | ], 27 | 28 | 'param' => [ 29 | 'type' => 'string', 30 | 'required' => true 31 | ] 32 | ]; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /packages/core/classes/pipeline/Pipeline.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2021 5 | Licensed under GNU GPL 3 license 6 | */ 7 | 8 | namespace core\pipeline; 9 | 10 | use equal\orm\Model; 11 | 12 | class Pipeline extends Model 13 | { 14 | 15 | public static function getColumns() 16 | { 17 | return [ 18 | 'nodes_ids' => [ 19 | 'type' => 'one2many', 20 | 'foreign_object' => 'core\pipeline\Node', 21 | 'foreign_field' => 'pipeline_id' 22 | ], 23 | 24 | 'name' => [ 25 | 'type' => 'string', 26 | 'required' => true, 27 | 'unique' => true 28 | ], 29 | ]; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /packages/core/classes/pipeline/PipelineExecution.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2021 5 | Licensed under GNU GPL 3 license 6 | */ 7 | 8 | namespace core\pipeline; 9 | 10 | use equal\orm\Model; 11 | 12 | class PipelineExecution extends Model 13 | { 14 | 15 | public static function getColumns() 16 | { 17 | return [ 18 | 19 | 'pipeline_id' => [ 20 | 'type' => 'many2one', 21 | 'foreign_object' => 'core\pipeline\Pipeline', 22 | 'required' => true 23 | ], 24 | 25 | 'status' => [ 26 | 'type' => 'string' 27 | ] 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /packages/core/classes/pipeline/PipelineNodeExecution.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2021 5 | Licensed under GNU GPL 3 license 6 | */ 7 | 8 | namespace core\pipeline; 9 | 10 | use equal\orm\Model; 11 | 12 | class PipelineNodeExecution extends Model 13 | { 14 | 15 | public static function getColumns() 16 | { 17 | return [ 18 | 19 | 'pipeline_execution_id' => [ 20 | 'type' => 'many2one', 21 | 'foreign_object' => 'core\pipeline\PipelineExecution', 22 | 'required' => true 23 | ], 24 | 25 | 'node_id' => [ 26 | 'type' => 'many2one', 27 | 'foreign_object' => 'core\pipeline\Node', 28 | 'required' => true 29 | ], 30 | 31 | 'status' => [ 32 | 'type' => 'string' 33 | ], 34 | 35 | 'result' => [ 36 | 'type' => 'string' 37 | ] 38 | ]; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /packages/core/classes/setting/SettingChoice.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2021 5 | Licensed under GNU GPL 3 license 6 | */ 7 | namespace core\setting; 8 | 9 | use equal\orm\Model; 10 | 11 | class SettingChoice extends Model { 12 | 13 | public static function getName() { 14 | return 'Setting choice'; 15 | } 16 | 17 | public static function getDescription() { 18 | return "Assignable choice for a given setting."; 19 | } 20 | 21 | public static function getColumns() { 22 | return [ 23 | 24 | 'name' => [ 25 | 'type' => 'string', 26 | 'description' => 'Name of the choice, if any.', 27 | 'multilang' => true 28 | ], 29 | 30 | 'setting_id' => [ 31 | 'type' => 'many2one', 32 | 'foreign_object' => 'core\setting\Setting', 33 | 'description' => 'Setting the choice relates to.', 34 | 'required' => true 35 | ], 36 | 37 | 'value' => [ 38 | 'type' => 'string', 39 | 'description' => 'JSON value of the parameter (type depends on the setting).' 40 | ] 41 | 42 | ]; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /packages/core/classes/test/Test.class.php: -------------------------------------------------------------------------------- 1 | 5 | Some Rights Reserved, Cedric Francoys, 2010-2021 6 | Licensed under GNU GPL 3 license 7 | */ 8 | namespace core\test; 9 | 10 | use equal\orm\Model; 11 | 12 | /** 13 | * @property alias $name rest 14 | * @property string $login 15 | * @property string $username test bonjour 1 24 5d 344 555 666 16 | */ 17 | class Test extends Model 18 | { 19 | public static function getDescription() { 20 | return "This Class is defined for testing purpose, and is intended to be used in testing units of the core package."; 21 | } 22 | 23 | public static function getColumns() 24 | { 25 | return [ 26 | 'string_short' => [ 27 | 'type' => 'string', 28 | 'usage' => 'text/plain:9', 29 | 'dependents' => ['tests1_ids' => ['test']] 30 | ], 31 | 32 | 'string_currency' => [ 33 | 'type' => 'string', 34 | 'usage' => 'currency' 35 | ], 36 | 37 | 'float_amount' => [ 38 | 'type' => 'float', 39 | 'usage' => 'amount/money' 40 | ], 41 | 42 | 'datetime' => [ 43 | 'type' => 'datetime' 44 | ], 45 | 46 | 'tests1_ids' => [ 47 | 'type' => 'one2many', 48 | 'foreign_object' => 'core\test\Test1', 49 | 'foreign_field' => 'test_id' 50 | ], 51 | 52 | ]; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /packages/core/classes/test/Test1.class.php: -------------------------------------------------------------------------------- 1 | 5 | Some Rights Reserved, Cedric Francoys, 2010-2021 6 | Licensed under GNU GPL 3 license 7 | */ 8 | namespace core\test; 9 | 10 | use equal\orm\Model; 11 | 12 | class Test1 extends Model 13 | { 14 | public static function getColumns() 15 | { 16 | return [ 17 | 'test' => [ 18 | 'type' => 'computed', 19 | 'result_type' => 'string', 20 | 'function' => 'calcTest', 21 | 'store' => true 22 | ], 23 | 24 | 'test_id' => [ 25 | 'type' => 'many2one', 26 | 'foreign_object' => 'core\test\Test' 27 | ], 28 | ]; 29 | } 30 | 31 | public static function calcTest($self) { 32 | $result = []; 33 | $self->read(['test_id' => ['id', 'string_short']]); 34 | foreach($self as $id => $test1) { 35 | trigger_error("ORM::".'rel:'.$test1['test_id']['id'], QN_REPORT_WARNING); 36 | trigger_error("ORM::".'val:'.$test1['test_id']['string_short'], QN_REPORT_WARNING); 37 | $result[$id] = $test1['test_id']['string_short']; 38 | } 39 | return $result; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /packages/core/data/config/apis.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2021 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | list($params, $providers) = eQual::announce([ 8 | 'description' => "Returns a list of existing API (string identifiers).\nResult is based on json files stored into config/routing.\nExpected format is api_{identifier}", 9 | 'deprecated' => true, 10 | 'response' => [ 11 | 'content-type' => 'application/json', 12 | 'charset' => 'utf-8', 13 | 'accept-origin' => '*' 14 | ], 15 | 'providers' => ['context'] 16 | ]); 17 | 18 | 19 | list($context) = [ $providers['context'] ]; 20 | 21 | $result = []; 22 | foreach(glob(QN_BASEDIR.'/config/routing/api_*.json') as $api_file) { 23 | $matches = array(); 24 | preg_match ("/api_(.*)\.json/iU", basename($api_file), $matches); 25 | $result[] = $matches[1]; 26 | } 27 | 28 | $context->httpResponse()->body($result)->send(); -------------------------------------------------------------------------------- /packages/core/data/config/constant.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2021 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | list($params, $providers) = announce([ 8 | 'description' => 'Request the final value of a specific configuration constant (as it is provided when a controller requests it). If the value is encrypted, the decrypted value is shown.', 9 | 'params' => [ 10 | 'constant' => [ 11 | 'type' => 'string', 12 | 'description' => 'name of the constant for which the value is requested.', 13 | 'required' => true 14 | ] 15 | ], 16 | 'response' => [ 17 | 'content-type' => 'application/json', 18 | 'charset' => 'utf-8', 19 | 'accept-origin' => '*' 20 | ], 21 | 'access' => [ 22 | 'visibility' => 'private' 23 | ], 24 | 'providers' => [ 'context', 'report' ] 25 | ]); 26 | 27 | /** 28 | * @var \equal\php\Context $context 29 | * @var \equal\error\Reporter $reporter 30 | */ 31 | list($context, $reporter) = [ $providers['context'], $providers['report'] ]; 32 | 33 | if(!\config\constant($params['constant']) && !defined($params['constant'])) { 34 | throw new Exception('unknown_property', QN_ERROR_INVALID_PARAM); 35 | } 36 | 37 | \config\export($params['constant']); 38 | 39 | $context->httpResponse() 40 | ->status(200) 41 | ->body(['result' => constant($params['constant'])]) 42 | ->send(); 43 | -------------------------------------------------------------------------------- /packages/core/data/config/domain-operators.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2021 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | 8 | use equal\orm\ObjectManager; 9 | 10 | list($params, $providers) = announce([ 11 | 'description' => 'Returns schema of available operators and for each type', 12 | 'response' => [ 13 | 'content-type' => 'application/json', 14 | 'charset' => 'utf-8', 15 | 'accept-origin' => '*' 16 | ], 17 | 'params' => [ 18 | ], 19 | 'providers' => ['context', 'orm'] 20 | ]); 21 | 22 | 23 | list($context, $orm) = [ $providers['context'], $providers['orm'] ]; 24 | 25 | $operators = ObjectManager::$valid_operators; 26 | 27 | $context->httpResponse() 28 | ->body($operators) 29 | ->send(); 30 | -------------------------------------------------------------------------------- /packages/core/data/config/email-signature.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2021 5 | Licensed under GNU GPL 3 license 6 | */ 7 | list($params, $providers) = eQual::announce([ 8 | 'description' => "Retrieves the translation values related to the specified entity. This controller is deprecated, use `core_config_translation` instead.", 9 | 'deprecated' => true, 10 | 'params' => [ 11 | 'entity' => [ 12 | 'description' => 'Full name (including namespace) of the class to look for (e.g. \'core\\User\').', 13 | 'type' => 'string', 14 | 'required' => true 15 | ], 16 | 'lang' => [ 17 | 'description' => 'Language for which values are requested (iso639 code expected).', 18 | 'type' => 'string', 19 | 'default' => constant('DEFAULT_LANG') 20 | ] 21 | ], 22 | 'constants' => ['DEFAULT_LANG'], 23 | 'response' => [ 24 | 'content-type' => 'application/json', 25 | 'charset' => 'utf-8', 26 | 'accept-origin' => '*' 27 | ], 28 | 'providers' => ['context'] 29 | ]); 30 | 31 | ['context' => $context] = $providers; 32 | 33 | $result = eQual::run('get', 'translation', $params); 34 | 35 | $context->httpResponse() 36 | ->body($result) 37 | ->send(); 38 | -------------------------------------------------------------------------------- /packages/core/data/config/live/packages.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2021 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | list($params, $providers) = eQual::announce([ 8 | 'description' => "Provide a map with the descriptors of initialized packages.", 9 | 'help' => "Info is retrieved from log file `log/packages.json`. This is necessary because status of packages without apps cannot be deduced from `installed-apps`.", 10 | 'access' => [ 11 | 'visibility' => 'protected' 12 | ], 13 | 'response' => [ 14 | 'content-type' => 'application/json', 15 | 'charset' => 'utf-8', 16 | 'accept-origin' => '*', 17 | 'schema' => [ 18 | 'type' => 'array', 19 | 'usage' => 'text[]/plain:255', 20 | 'description' => 'List of packages names.' 21 | ] 22 | ], 23 | 'providers' => ['context'] 24 | ]); 25 | 26 | /** 27 | * @var \equal\php\Context $context 28 | */ 29 | list($context) = [$providers['context']]; 30 | 31 | $map_packages = []; 32 | 33 | if(file_exists("public/app") && file_exists("log/packages.json")) { 34 | $map_packages = json_decode(file_get_contents("log/packages.json"), true); 35 | } 36 | 37 | $context->httpResponse() 38 | ->body(array_keys($map_packages)) 39 | ->send(); 40 | -------------------------------------------------------------------------------- /packages/core/data/config/live/routes.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2024 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | list($params, $providers) = eQual::announce([ 8 | 'description' => 'Returns currently active routes with priority based on the number.', 9 | 'help' => 'Only one descriptor is return for each route. In case two identical routes co-exist, the one described in the file with highest priority will overwrite the previous.', 10 | 'access' => [ 11 | 'visibility' => 'protected' 12 | ], 13 | 'response' => [ 14 | 'content-type' => 'application/json', 15 | 'charset' => 'UTF-8', 16 | 'accept-origin' => '*' 17 | ], 18 | 'params' => [], 19 | 'providers' => ['context', 'route'] 20 | ]); 21 | 22 | /** 23 | * @var \equal\php\Context $context 24 | * @var \equal\route\Router $router 25 | */ 26 | list($context, $router) = [$providers['context'], $providers['route']]; 27 | 28 | // get all json routes descriptors sorted by filename in DESC order 29 | $files = array_reverse(glob(EQ_BASEDIR.'/config/routing/*.json')); 30 | 31 | $result = []; 32 | 33 | foreach($files as $filepath) { 34 | $json = file_get_contents($filepath); 35 | $routes = json_decode($json); 36 | foreach($routes as $path => $resolver) { 37 | $result[$path]["methods"] = $resolver; 38 | $result[$path]["info"]["file"] = basename($filepath); 39 | } 40 | } 41 | 42 | $context->httpResponse() 43 | ->body($result) 44 | ->send(); 45 | -------------------------------------------------------------------------------- /packages/core/data/config/packages.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2024 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | list($params, $providers) = eQual::announce([ 8 | 'description' => 'Provide the full list of packages present within the `packages` folder (initialized or not).', 9 | 'response' => [ 10 | 'content-type' => 'application/json', 11 | 'charset' => 'utf-8', 12 | 'accept-origin' => '*' 13 | ], 14 | 'providers' => ['context'] 15 | ]); 16 | 17 | /** 18 | * @var \equal\php\Context $context 19 | */ 20 | list($context) = [$providers['context']]; 21 | 22 | $packages = []; 23 | 24 | if(!is_dir('packages') || !($list = scandir('packages'))) { 25 | throw new Exception('missing_packages_directory', QN_ERROR_INVALID_CONFIG); 26 | } 27 | 28 | foreach($list as $node) { 29 | if(is_dir('packages/'.$node) && !in_array($node, array('.', '..')) && $node[0] != '.') { 30 | $packages[] = $node; 31 | } 32 | } 33 | 34 | $context->httpResponse() 35 | ->body($packages) 36 | ->send(); 37 | -------------------------------------------------------------------------------- /packages/core/data/config/widget-types.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2021 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | list($params, $providers) = announce([ 8 | 'description' => 'Returns an associative array mapping orm types with possible widget types.', 9 | 'help' => 'Widget types allow variations on the way the widget is displayed, without impacting the underlying value (whose type depends on the type and usage from the related field).', 10 | 'response' => [ 11 | 'content-type' => 'application/json', 12 | 'charset' => 'utf-8', 13 | 'accept-origin' => '*' 14 | ], 15 | 'params' => [], 16 | 'providers' => ['context'] 17 | ]); 18 | 19 | /** 20 | * @var \equal\php\Context $context 21 | */ 22 | list($context) = [$providers['context']]; 23 | 24 | if(!file_exists(QN_BASEDIR."/config/widget_types.json")) { 25 | throw new Exception("no_usages_file", EQ_ERROR_UNKNOWN); 26 | } 27 | 28 | $content = file_get_contents(QN_BASEDIR."/config/widget_types.json"); 29 | 30 | $context->httpResponse() 31 | ->body($content) 32 | ->send(); 33 | -------------------------------------------------------------------------------- /packages/core/data/installed-apps.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2021 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | list($params, $providers) = eQual::announce([ 8 | 'description' => "Returns a map with the descriptors of the installed apps (depending on initialized packages).", 9 | 'deprecated' => true, 10 | 'access' => [ 11 | 'visibility' => 'protected' 12 | ], 13 | 'response' => [ 14 | 'content-type' => 'application/json', 15 | 'charset' => 'utf-8', 16 | 'accept-origin' => '*' 17 | ], 18 | 'providers' => ['context', 'orm'] 19 | ]); 20 | 21 | /** 22 | * @var \equal\php\Context $context 23 | * @var \equal\orm\ObjectManager $orm 24 | */ 25 | list($context, $orm) = [$providers['context'], $providers['orm']]; 26 | 27 | // #deprecated - scripts should make direct calls to core_config_live_packages 28 | $result = eQual::run('get', 'core_config_live_apps'); 29 | 30 | $context->httpResponse() 31 | ->body($result) 32 | ->send(); 33 | -------------------------------------------------------------------------------- /packages/core/data/installed-packages.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2021 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | list($params, $providers) = eQual::announce([ 8 | 'description' => "Provide a map with the descriptors of initialized packages.", 9 | 'help' => "Info is retrieved from log file `log/packages.json`. This is necessary because status of packages without apps cannot be deduced from `installed-apps`.", 10 | 'deprecated' => true, 11 | 'access' => [ 12 | 'visibility' => 'protected' 13 | ], 14 | 'response' => [ 15 | 'content-type' => 'application/json', 16 | 'charset' => 'utf-8', 17 | 'accept-origin' => '*' 18 | ], 19 | 'providers' => ['context'] 20 | ]); 21 | 22 | /** 23 | * @var \equal\php\Context $context 24 | */ 25 | list($context) = [$providers['context']]; 26 | 27 | // #deprecated - scripts should make direct calls to core_config_live_packages 28 | $result = eQual::run('get', 'core_config_live_packages'); 29 | 30 | $context->httpResponse() 31 | ->body($result) 32 | ->send(); 33 | -------------------------------------------------------------------------------- /packages/core/data/model/menu.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2021 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | list($params, $providers) = eQual::announce([ 8 | 'description' => "Returns the JSON menu related to a package, given a menu ID ().", 9 | 'params' => [ 10 | 'package' => [ 11 | 'description' => 'Name of the package the menu relates to (e.g. \'core\').', 12 | 'type' => 'string', 13 | 'required' => true 14 | ], 15 | 'menu_id' => [ 16 | 'description' => 'The identifier of the menu .', 17 | 'type' => 'string', 18 | 'default' => 'list' 19 | ] 20 | ], 21 | 'response' => [ 22 | 'content-type' => 'application/json', 23 | 'charset' => 'utf-8', 24 | 'accept-origin' => '*' 25 | ], 26 | 'providers' => ['context'] 27 | ]); 28 | 29 | /** 30 | * @var \equal\php\Context $context 31 | */ 32 | list($context) = [ $providers['context'] ]; 33 | 34 | $result = []; 35 | 36 | // retrieve existing view meant for package 37 | $file = QN_BASEDIR."/packages/{$params['package']}/views/menu.{$params['menu_id']}.json"; 38 | 39 | // #memo - to prevent untimely log entries, this script always return a non-404 error 40 | if(file_exists($file) && ($view = json_decode(@file_get_contents($file), true)) !== null) { 41 | $result = $view; 42 | } 43 | 44 | $context->httpResponse() 45 | ->body($result) 46 | ->send(); 47 | -------------------------------------------------------------------------------- /packages/core/data/pipeline/test-divide.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2021 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | list($params, $providers) = eQual::announce([ 8 | 'description' => 'Returns the division of two values.', 9 | 'params' => [ 10 | 'numerator' => [ 11 | 'description' => 'Numerator', 12 | 'type' => 'integer', 13 | 'usage' => 'numeric/integer', 14 | 'required' => true 15 | ], 16 | 'denominator' => [ 17 | 'description' => 'Denominator', 18 | 'type' => 'integer', 19 | 'usage' => 'numeric/integer', 20 | 'required' => true 21 | ] 22 | ], 23 | 'response' => [ 24 | 'content-type' => 'application/json', 25 | 'charset' => 'UTF-8', 26 | 'accept-origin' => '*', 27 | 'schema' => [ 28 | 'type' => 'integer', 29 | 'usage' => 'numeric/integer', 30 | 'qty' => 'one' 31 | ] 32 | ], 33 | 'access' => [ 34 | 'visibility' => 'public', 35 | ], 36 | 'providers' => ['context'] 37 | ]); 38 | 39 | list($context) = [$providers['context']]; 40 | 41 | $result = 0; 42 | 43 | if ($params['denominator'] != 0) { 44 | $result = intdiv($params['numerator'], $params['denominator']); 45 | } 46 | 47 | $context->httpResponse() 48 | ->body($result) 49 | ->send(); 50 | -------------------------------------------------------------------------------- /packages/core/data/pipeline/test-sum-list.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2021 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | list($params, $providers) = eQual::announce([ 8 | 'description' => 'Returns the sum of a list of integer', 9 | 'params' => [ 10 | 'list' => [ 11 | 'description' => 'list of integer', 12 | 'type' => 'array', 13 | 'required' => true 14 | ] 15 | ], 16 | 'response' => [ 17 | 'content-type' => 'application/json', 18 | 'charset' => 'UTF-8', 19 | 'accept-origin' => '*', 20 | 'schema' => [ 21 | 'type' => 'integer', 22 | 'usage' => 'numeric/integer', 23 | 'qty' => 'one' 24 | ] 25 | ], 26 | 'access' => [ 27 | 'visibility' => 'public', 28 | ], 29 | 'providers' => ['context'] 30 | ]); 31 | 32 | list($context) = [$providers['context']]; 33 | 34 | $result = 0; 35 | 36 | foreach ($params['list'] as $element) { 37 | $result += $element; 38 | } 39 | 40 | $context->httpResponse() 41 | ->body($result) 42 | ->send(); 43 | -------------------------------------------------------------------------------- /packages/core/data/pipeline/test-sum.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2021 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | list($params, $providers) = eQual::announce([ 8 | 'description' => 'Returns the sum of two values.', 9 | 'params' => [ 10 | 'first_value' => [ 11 | 'description' => 'First value', 12 | 'type' => 'integer', 13 | 'usage' => 'numeric/integer', 14 | 'required' => true 15 | ], 16 | 'second_value' => [ 17 | 'description' => 'Second value', 18 | 'type' => 'integer', 19 | 'usage' => 'numeric/integer', 20 | 'required' => true 21 | ] 22 | ], 23 | 'response' => [ 24 | 'content-type' => 'application/json', 25 | 'charset' => 'UTF-8', 26 | 'accept-origin' => '*', 27 | 'schema' => [ 28 | 'type' => 'integer', 29 | 'usage' => 'numeric/integer', 30 | 'qty' => 'one' 31 | ] 32 | ], 33 | 'access' => [ 34 | 'visibility' => 'public', 35 | ], 36 | 'providers' => ['context'] 37 | ]); 38 | 39 | list($context) = [$providers['context']]; 40 | 41 | $result = $params['first_value'] + $params['second_value']; 42 | 43 | $context->httpResponse() 44 | ->body($result) 45 | ->send(); 46 | -------------------------------------------------------------------------------- /packages/core/data/setting/timezones.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2021 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | 8 | list($params, $providers) = announce([ 9 | 'description' => 'Returns a list of timezones identifiers, filtered by keywords if given.', 10 | 'params' => [ 11 | 'q' => [ 12 | 'description' => 'Keyword for filtering matching timezones.', 13 | 'type' => 'string', 14 | 'default' => '' 15 | ] 16 | ], 17 | 'constants' => ['DEFAULT_LANG'], 18 | 'response' => [ 19 | 'content-type' => 'application/json', 20 | 'charset' => 'utf-8', 21 | 'accept-origin' => '*' 22 | ], 23 | 'providers' => [ 'context' ] 24 | ]); 25 | 26 | /** 27 | * @var \equal\php\Context $context 28 | */ 29 | list($context) = [ $providers['context'] ]; 30 | 31 | $result = []; 32 | 33 | $list = DateTimeZone::listIdentifiers(); 34 | 35 | if(strlen($params['q'])) { 36 | foreach($list as $tz) { 37 | if(stripos($tz, $params['q']) !== false) { 38 | $result[] = $tz; 39 | } 40 | } 41 | } 42 | else { 43 | $result = $list; 44 | } 45 | 46 | $context->httpResponse() 47 | ->body($result) 48 | ->send(); -------------------------------------------------------------------------------- /packages/core/data/utils/git-revision.php: -------------------------------------------------------------------------------- 1 | "Provide a unique identifier of the current git revision.\n". 5 | "This script assumes the current installation is versioned using git.", 6 | 'response' => [ 7 | 'content-type' => 'application/json', 8 | 'charset' => 'utf-8' 9 | ], 10 | 'params' => [ 11 | ], 12 | 'providers' => ['context'] 13 | ]); 14 | 15 | list( $context, 16 | $head_path, 17 | $index_path 18 | ) = [ 19 | $providers['context'], 20 | '../.git/HEAD', 21 | '../.git/index' 22 | ]; 23 | 24 | if(!file_exists($head_path)) { 25 | throw new Exception('git HEAD not found', QN_ERROR_INVALID_CONFIG); 26 | } 27 | 28 | if(!file_exists($index_path)) { 29 | throw new Exception('git index not found', QN_ERROR_INVALID_CONFIG); 30 | } 31 | 32 | $files = explode(' ', file_get_contents($head_path)); 33 | 34 | if(!$files || !count($files)) { 35 | throw new Exception('no files found in git index', QN_ERROR_INVALID_CONFIG); 36 | } 37 | 38 | $file = trim($files[1]); 39 | 40 | $file_path = "../.git/$file"; 41 | 42 | if(!file_exists($file_path)) { 43 | throw new Exception('inconsistent git index', QN_ERROR_INVALID_CONFIG); 44 | } 45 | 46 | 47 | // read first bytes from current branch revision hash 48 | $hash = substr(file_get_contents($file_path), 0, 7); 49 | $time = filemtime($index_path); 50 | $date = date("Y.m.d", $time); 51 | 52 | 53 | $context->httpResponse()->body(['revision' => "$date.$hash"])->send(); -------------------------------------------------------------------------------- /packages/core/i18n/en/Model.json: -------------------------------------------------------------------------------- 1 | { 2 | "model": { 3 | "id": { 4 | "label": "Identifier", 5 | "description": "Unique identifier of the object.", 6 | "help": "" 7 | }, 8 | "creator": { 9 | "label": "Creator", 10 | "description": "User who created the object.", 11 | "help": "" 12 | }, 13 | "created": { 14 | "label": "Created", 15 | "description": "Date of the object creation.", 16 | "help": "" 17 | }, 18 | "modifier": { 19 | "label": "Modifier", 20 | "description": "Last user to have modified the object.", 21 | "help": "" 22 | }, 23 | "modified": { 24 | "label": "Modified", 25 | "description": "Date of last update.", 26 | "help": "" 27 | }, 28 | "deleted": { 29 | "label": "Deleted", 30 | "description": "Flag for deleted objects.", 31 | "help": "" 32 | }, 33 | "state": { 34 | "label": "State", 35 | "description": "Status of the object (draft, instance).", 36 | "help": "" 37 | } 38 | }, 39 | "view": { 40 | }, 41 | "error": { 42 | } 43 | } -------------------------------------------------------------------------------- /packages/core/i18n/en/Permission.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Permission", 3 | "plural": "Permissions", 4 | "description": "Permissions.", 5 | "model": { 6 | "class_name":{"label":"Class", "description": "", "help": ""}, 7 | "rights":{"label":"Rights", "description": "", "help":"Permissions are set by using a binary mask, bits meaning:\nbit 0 (2^0 = 1): create\nbit 1 (2^1 = 2): read\nbit 2 (2^2 = 4): write\nbit 3 (2^3 = 8): delete\nbit 4 (2^4 = 16): manage\n\nEx.: To grant read and write permissions, we need to set bits 1 and 2,\n so field value would be 6 (2^1+2^2)."}, 8 | "group_id":{"label":"Group", "description": "Group to which the permission belongs.", "help": ""}, 9 | "rights_txt":{"label":"Rights", "description": "Translation in text of the rights of the permission.", "help": ""} 10 | }, 11 | "view": { 12 | 13 | } 14 | } -------------------------------------------------------------------------------- /packages/core/i18n/en/User.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "User", 3 | "plural": "Users", 4 | "description": "Users can log in, join groups and be granted specific permissions.", 5 | "model": { 6 | "login":{ 7 | "label":"Email", 8 | "description": "", 9 | "help":"The email address is used as login." 10 | }, 11 | "password":{"label":"Password", "description": "", "help": ""}, 12 | "firstname":{"label":"Given name", "description": "", "help": ""}, 13 | "lastname":{"label":"Family name", "description": "", "help": ""} 14 | }, 15 | "view": { 16 | "identification":{"label":"Identification"}, 17 | "ok":{"label":"Connect"}, 18 | "subscribe":{"label":"Create an account"}, 19 | "invalid_login":{"label":"Incorrect login format: not a valid e-mail address"}, 20 | "invalid_password":{"label":"Incorrect password format: not an md5 value"} 21 | } 22 | } -------------------------------------------------------------------------------- /packages/core/i18n/en/mail_test.html: -------------------------------------------------------------------------------- 1 |

2 | Test email was successfully sent from {{ url }} ! 3 |

-------------------------------------------------------------------------------- /packages/core/i18n/en/mail_user_confirm.html: -------------------------------------------------------------------------------- 1 | 2 |

3 | Hello ,
4 |
5 | Welcome to our platform !
6 | Your subscription has been successfully processed and you can now use the App.
7 | However, in order to complete you profile, please validate your email address by clicking on the link below.
8 | 9 |

10 |
11 | 12 | This is an automatic message sent from following a registration that provided your email address.
13 | If you are not the originator of this request, simply ignore this message. If there is no response within 24 hours, your email address will be automatically removed from our database. 14 |
15 |

-------------------------------------------------------------------------------- /packages/core/i18n/en/mail_user_pass_recover.html: -------------------------------------------------------------------------------- 1 | 2 |

3 | Hello ,
4 |
5 |
6 | This is an automated message sent as a response to your request to reset your password.
7 |
8 | You can upadate your password by clicking on the link below (the link will remain valid for 15 minutes).
9 |
10 | 11 |

12 |
13 | 14 | This is an automated message sent from .
15 |
16 | Si vous n'êtes pas à l'origine de cette requête, ignorez simplement ce message. Aucun changement ne sera fait à votre compte.
17 | En cas de messages non sollicités répétés, merci de le signaler à
18 |

19 | 20 |
21 |

-------------------------------------------------------------------------------- /packages/core/i18n/en/setting/SettingChoice.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Choice of parameter", 3 | "plural": "Choice of parameters", 4 | "description": "Available choices for a parameter.", 5 | "model": { 6 | "name": { 7 | "label": "Name", 8 | "description": "Parameter name.", 9 | "help": "" 10 | }, 11 | "setting_id": { 12 | "label": "Parameter", 13 | "description": "Parameter to which the choice belongs.", 14 | "help": "" 15 | }, 16 | "value": { 17 | "label": "Value", 18 | "description": "Choice value.", 19 | "help": "" 20 | } 21 | }, 22 | "view": { 23 | "form.default": { 24 | "name": "Parameter choice", 25 | "description": "Displays an option of the parameter." 26 | }, 27 | "list.default": { 28 | "name": "List of the parameter options", 29 | "description": "Displays the options of the parameters." 30 | } 31 | }, 32 | "error": { 33 | } 34 | } -------------------------------------------------------------------------------- /packages/core/i18n/en/setting/SettingValue.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Parameter value", 3 | "plural": "Parameters values", 4 | "description": "", 5 | "model": { 6 | "name": { 7 | "label": "Name", 8 | "description": "Setting identifier.", 9 | "help": "" 10 | }, 11 | "setting_id": { 12 | "label": "Setting", 13 | "description": "Setting value.", 14 | "help": "" 15 | }, 16 | "user_id": { 17 | "label": "User", 18 | "description": "User to which the parameter belongs.", 19 | "help": "" 20 | }, 21 | "value": { 22 | "label": "Value", 23 | "description": "Parameter Value.", 24 | "help": "" 25 | } 26 | }, 27 | "view": { 28 | "form.default": { 29 | "name": "Parameter Value", 30 | "description": "Displays the value of a setting." 31 | }, 32 | "list.default": { 33 | "name": "List of parameters values.", 34 | "description": "Displays the value of settings." 35 | } 36 | }, 37 | "error": { 38 | } 39 | } -------------------------------------------------------------------------------- /packages/core/i18n/es/Assignment.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Asignación", 3 | "plural": "Asignaciones", 4 | "description": "", 5 | "model": { 6 | "id": { 7 | "label": "Identificador", 8 | "description": "", 9 | "help": "" 10 | }, 11 | "object_class": { 12 | "label": "Clase", 13 | "description": "Nombre completo de la entidad sobre la que se aplica la asignación de roles.", 14 | "help": "" 15 | }, 16 | "object_id": { 17 | "label": "Objeto", 18 | "description": "Identificador del objeto específico al que se asigna el rol.", 19 | "help": "" 20 | }, 21 | "user_id": { 22 | "label": "Usuario", 23 | "description": "Usuario al que se asigna el rol.", 24 | "help": "" 25 | }, 26 | "role": { 27 | "label": "Rol", 28 | "description": "Rol que se asigna al usuario.", 29 | "help": "El rol asignado debe coincidir con uno de los roles definidos a nivel de entidad y devueltos por el método `getRole()`." 30 | } 31 | }, 32 | "view": [], 33 | "error": [] 34 | } -------------------------------------------------------------------------------- /packages/core/i18n/es/Lang.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Idioma", 3 | "plural": "Idiomas", 4 | "description": "", 5 | "model": { 6 | "name": { 7 | "label": "Nombre", 8 | "description": "Nombre del idioma.", 9 | "help": "" 10 | }, 11 | "code": { 12 | "label": "Código", 13 | "description": "Código de idioma (ISO 639): 2 letras minúsculas.", 14 | "help": "" 15 | } 16 | }, 17 | "view": { 18 | "form.default": { 19 | "name": "Idioma", 20 | "description": "Formulario de idioma.", 21 | "layout": [] 22 | }, 23 | "list.default": { 24 | "name": "Lista de idomas", 25 | "description": "" 26 | } 27 | }, 28 | "error": [] 29 | } -------------------------------------------------------------------------------- /packages/core/i18n/es/Log.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Log", 3 | "plural": "Logs", 4 | "description": "", 5 | "model": { 6 | "created": { 7 | "label": "Creado", 8 | "description": "Fecha de creación.", 9 | "help": "" 10 | }, 11 | "user_id": { 12 | "label": "Usuario", 13 | "description": "Usuario que realizó la acción.", 14 | "help": "" 15 | }, 16 | "object_class": { 17 | "label": "Clase", 18 | "description": "Clase de entidad con la que está relacionada esta entrada.", 19 | "help": "" 20 | }, 21 | "object_id": { 22 | "label": "Identificador", 23 | "description": "Identificador del objeto objetivo (de la clase dada).", 24 | "help": "" 25 | }, 26 | "value": { 27 | "label": "Valor", 28 | "description": "Cambios (nuevos valores) realizados en el objeto, si los hay.", 29 | "help": "Representación JSON de los nuevos valores(diff) del objeto (si se han realizado cambios)." 30 | }, 31 | "name": { 32 | "label": "Nombre", 33 | "description": "El nombre de la acción realizada en el objeto de destino (\\'create\\', \\'update\\', \\'delete\\' o cualquier valor personalizado).", 34 | "help": "" 35 | } 36 | }, 37 | "view": { 38 | "form.default": { 39 | "name": "Logs", 40 | "description": "Formulario de logs", 41 | "layout": [] 42 | }, 43 | "list.default": { 44 | "name": "Lista de logs", 45 | "description": "" 46 | } 47 | }, 48 | "error": [] 49 | } -------------------------------------------------------------------------------- /packages/core/i18n/es/Permission.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Permiso", 3 | "plural": "Permisos", 4 | "description": "Permisos", 5 | "model": { 6 | "class_name": { 7 | "label": "Clase", 8 | "description": "", 9 | "help": "" 10 | }, 11 | "domain": { 12 | "label": "Dominio", 13 | "description": "Valor JSON del dominio de restricciones.", 14 | "help": "" 15 | }, 16 | "group_id": { 17 | "label": "Grupo", 18 | "description": "Grupo al que pertenece el permiso.", 19 | "help": "" 20 | }, 21 | "user_id": { 22 | "label": "Usuario", 23 | "description": "", 24 | "help": "" 25 | }, 26 | "rights": { 27 | "label": "Permiso", 28 | "description": "Los permisos se establecen mediante una máscara binaria", 29 | "help": "" 30 | }, 31 | "rights_txt": { 32 | "label": "Permiso texto", 33 | "description": "Traducción en texto de los derechos del permiso.", 34 | "help": "" 35 | } 36 | }, 37 | "view": { 38 | "form.default": { 39 | "name": "Permiso", 40 | "description": "Formulario de permisos.", 41 | "layout": [], 42 | "routes": [] 43 | }, 44 | "list.default": { 45 | "name": "Lista de permisos", 46 | "description": "" 47 | } 48 | }, 49 | "error": [] 50 | } -------------------------------------------------------------------------------- /packages/core/i18n/es/TaskLog.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Registro de tarea", 3 | "plural": "Registros de tareas", 4 | "description": "", 5 | "model": { 6 | "created": { 7 | "label": "Creado", 8 | "description": "Fecha de creación.", 9 | "help": "" 10 | }, 11 | "task_id": { 12 | "label": "Tarea", 13 | "description": "Tarea a la que se refiere el registro.", 14 | "help": "" 15 | }, 16 | "status": { 17 | "label": "Estado", 18 | "description": "Estado en función del resultado de la ejecución de la Tarea.", 19 | "help": "" 20 | }, 21 | "log": { 22 | "label": "Log", 23 | "description": "El valor devuelto en la ejecución del controlador al que se dirige la Tarea.", 24 | "help": "" 25 | } 26 | }, 27 | "view": { 28 | "form.default": { 29 | "name": "Registro de tarea", 30 | "description": "", 31 | "layout": [] 32 | }, 33 | "list.default": { 34 | "name": "Lista de registro de tarea", 35 | "description": "" 36 | } 37 | }, 38 | "error": [] 39 | } -------------------------------------------------------------------------------- /packages/core/i18n/es/Version.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Versión", 3 | "plural": "Veriones", 4 | "description": "", 5 | "model": { 6 | "object_class": { 7 | "label": "Clase", 8 | "description": "Clase del objeto de destino", 9 | "help": "" 10 | }, 11 | "object_id": { 12 | "label": "Identificador", 13 | "description": "Identificador del objeto.", 14 | "help": "" 15 | }, 16 | "serialized_value": { 17 | "label": "valor serializado", 18 | "description": "", 19 | "help": "" 20 | }, 21 | "lang": { 22 | "label": "Idioma", 23 | "description": "Idioma del objeto.", 24 | "help": "" 25 | } 26 | }, 27 | "view": [], 28 | "error": [] 29 | } -------------------------------------------------------------------------------- /packages/core/i18n/es/alert/MessageModel.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Modelo de mensaje de alerta", 3 | "plural": "Modelos de mensajes de alertas.", 4 | "description": "", 5 | "model": { 6 | "name": { 7 | "label": "Nombre", 8 | "description": "Identificador de opción de parámetro.", 9 | "help": "" 10 | }, 11 | "label": { 12 | "label": "Etiqueta", 13 | "description": "Título del mensaje.", 14 | "help": "" 15 | }, 16 | "description": { 17 | "label": "Descripción", 18 | "description": "Descripción del significado del mensaje.", 19 | "help": "" 20 | }, 21 | "type": { 22 | "label": "Tipo", 23 | "description": "Tipo de mensaje.", 24 | "help": "" 25 | }, 26 | "messages_ids": { 27 | "label": "Mensajes", 28 | "description": "", 29 | "help": "" 30 | } 31 | }, 32 | "view": { 33 | "form.default": { 34 | "name": "Modelo de mensaje de alerta", 35 | "description": "Formulario de modelo de mensaje de alerta.", 36 | "layout": [] 37 | }, 38 | "list.default": { 39 | "name": "Lista de modelos de mensajes de alerta.", 40 | "description": "" 41 | } 42 | }, 43 | "error": [] 44 | } -------------------------------------------------------------------------------- /packages/core/i18n/es/setting/SettingChoice.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Elección de configuración", 3 | "plural": "Elecciones de configuraciónes", 4 | "description": "Opciones disponibles por una configuración", 5 | "model": { 6 | "name": { 7 | "label": "Nombre", 8 | "description": "Nombre de la configuración.", 9 | "help": "" 10 | }, 11 | "setting_id": { 12 | "label": "Configuración", 13 | "description": "Configuración que se adjunta la opción.", 14 | "help": "" 15 | }, 16 | "value": { 17 | "label": "Valor", 18 | "description": "Valor de opción de la configuración.", 19 | "help": "" 20 | } 21 | }, 22 | "view": { 23 | "form.default": { 24 | "name": "Opción de la configuración", 25 | "description": "Muestra una opción de la configuración.", 26 | "layout": [] 27 | }, 28 | "list.default": { 29 | "name": "", 30 | "description": "" 31 | } 32 | }, 33 | "error": [] 34 | } -------------------------------------------------------------------------------- /packages/core/i18n/es/setting/SettingValue.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Valor de la configuración", 3 | "plural": "Valores de configuraciones", 4 | "description": "", 5 | "model": { 6 | "name": { 7 | "label": "Nombre", 8 | "description": "Identificador de la configuración.", 9 | "help": "" 10 | }, 11 | "setting_id": { 12 | "label": "Configuración", 13 | "description": "Configuración al que se adjunta el valor.", 14 | "help": "" 15 | }, 16 | "user_id": { 17 | "label": "Usuario", 18 | "description": "Usuario al que pertenece la configuración.", 19 | "help": "" 20 | }, 21 | "value": { 22 | "label": "Valor", 23 | "description": "Valor de la configuración.", 24 | "help": "" 25 | } 26 | }, 27 | "view": { 28 | "form.default": { 29 | "name": "Valor de la configuración", 30 | "description": "Muestra un valor de la configuración.", 31 | "layout": [] 32 | }, 33 | "list.default": { 34 | "name": "", 35 | "description": "" 36 | } 37 | }, 38 | "error": [] 39 | } -------------------------------------------------------------------------------- /packages/core/i18n/fr/Model.json: -------------------------------------------------------------------------------- 1 | { 2 | "model": { 3 | "id": { 4 | "label": "Identifiant", 5 | "description": "Identifiant unique de l'objet.", 6 | "help": "" 7 | }, 8 | "name": { 9 | "label": "Libellé", 10 | "description": "Nom de l'objet.", 11 | "help": "" 12 | }, 13 | "creator": { 14 | "label": "Créé par", 15 | "description": "Utilisateur ayant créé l'objet.", 16 | "help": "" 17 | }, 18 | "created": { 19 | "label": "Créé", 20 | "description": "Date de création de l'objet.", 21 | "help": "" 22 | }, 23 | "modifier": { 24 | "label": "Modifié par", 25 | "description": "Dernier utilisateur a avoir modifié l'objet.", 26 | "help": "" 27 | }, 28 | "modified": { 29 | "label": "Modifié", 30 | "description": "Date de dernière modification.", 31 | "help": "" 32 | }, 33 | "deleted": { 34 | "label": "Supprimé", 35 | "description": "Indicateur pour les objets supprimés.", 36 | "help": "" 37 | }, 38 | "state": { 39 | "label": "Statut", 40 | "description": "Etat de l'objet (brouillon, instance, archive).", 41 | "help": "" 42 | } 43 | }, 44 | "view": { 45 | }, 46 | "error": { 47 | } 48 | } -------------------------------------------------------------------------------- /packages/core/i18n/fr/alert/MessageModel.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Modèle de message d'alerte", 3 | "plural": "Modèles de messages d'alerte", 4 | "description": "", 5 | "model": { 6 | "name": { 7 | "label": "Nom", 8 | "description": "Identifiant de l'option de paramètre.", 9 | "help": "" 10 | }, 11 | "label": { 12 | "label": "Libellé", 13 | "description": "Titre du message.", 14 | "help": "" 15 | }, 16 | "description": { 17 | "label": "Description", 18 | "description": "Descriptif du motif de l'alerte.", 19 | "help": "" 20 | }, 21 | "type": { 22 | "label": "Type", 23 | "description": "Type de message.", 24 | "help": "" 25 | } 26 | }, 27 | "view": { 28 | "form.default": { 29 | "name": "Modèle de message", 30 | "description": "Modèe de message d'alerte." 31 | }, 32 | "list.default": { 33 | "name": "Modèles des messages", 34 | "description": "Liste des modèles de messages d'alerte." 35 | } 36 | }, 37 | "error": { 38 | } 39 | } -------------------------------------------------------------------------------- /packages/core/i18n/fr/mail_test.html: -------------------------------------------------------------------------------- 1 |

2 | Message email de test envoyé avec succès depuis {{ url }} ! 3 |

-------------------------------------------------------------------------------- /packages/core/i18n/fr/mail_user_confirm.html: -------------------------------------------------------------------------------- 1 | 2 |

3 | Bonjour ,
4 |
5 | Bienvenue sur notre plateforme !
6 | Ton inscription a bien été prise en compte et tu peux désormais utiliser l'application.
7 | Cependant, pour que ton profil soit complet, tu es invité à valider ton adresse email en cliquant sur le lien ci-dessous.
8 | 9 |

10 |
11 | 12 | Ceci est un message automatique envoyé depuis suite à une inscription renseignant votre adresse email.
13 | Si vous n'êtes pas à l'origine de cette requête, ignorez simplement ce message. Sans réponse dans les 24h, votre adresse email sera automatiquement supprimée de notre base de données. 14 |
15 |

-------------------------------------------------------------------------------- /packages/core/i18n/fr/mail_user_pass_recover.html: -------------------------------------------------------------------------------- 1 | 2 |

3 | Bonjour ,
4 |
5 |
6 | Ceci est un message automatique suite à votre demande de récupération de mot de passe.
7 |
8 | Vous pouvez modifier votre mot de passe en utilisant le lien ci-dessous (valide durant les 15 prochaines minutes).
9 |
10 | 11 |

12 |
13 | 14 | Ceci est un message automatique envoyé depuis .
15 |
16 | Si vous n'êtes pas à l'origine de cette requête, ignorez simplement ce message. Aucun changement ne sera fait à votre compte.
17 | En cas de messages non sollicités répétés, merci de le signaler à
18 |

19 | 20 |
21 |

-------------------------------------------------------------------------------- /packages/core/i18n/fr/setting/SettingChoice.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Choix du paramètre", 3 | "plural": "Choix des paramètres", 4 | "description": "Options disponibles pour un paramètre", 5 | "model": { 6 | "name": { 7 | "label": "Nom", 8 | "description": "Identifiant de l'option de paramètre.", 9 | "help": "" 10 | }, 11 | "setting_id": { 12 | "label": "Paramètre", 13 | "description": "Paramètre auquel est attaché l'option.", 14 | "help": "" 15 | }, 16 | "value": { 17 | "label": "Valeur", 18 | "description": "Valeur de l'option de paramètre.", 19 | "help": "" 20 | } 21 | }, 22 | "view": { 23 | "form.default": { 24 | "name": "Option de paramètre", 25 | "description": "Affiche une option de paramètre" 26 | }, 27 | "list.default": { 28 | "name": "Liste des valeurs des options de paramètres", 29 | "description": "Liste des options des paramètres." 30 | } 31 | }, 32 | "error": { 33 | } 34 | } -------------------------------------------------------------------------------- /packages/core/i18n/fr/setting/SettingValue.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Valeur du paramètre", 3 | "plural": "Valeurs des paramètres", 4 | "description": "", 5 | "model": { 6 | "name": { 7 | "label": "Nom", 8 | "description": "Identifiant du paramètre.", 9 | "help": "" 10 | }, 11 | "setting_id": { 12 | "label": "Paramètre", 13 | "description": "Paramètre auquel est attaché la valeur.", 14 | "help": "" 15 | }, 16 | "user_id": { 17 | "label": "Utilisateur", 18 | "description": "Utilisateur auquel appartient le paramètre.", 19 | "help": "" 20 | }, 21 | "value": { 22 | "label": "Valeur", 23 | "description": "Valeur du paramètre.", 24 | "help": "" 25 | } 26 | }, 27 | "view": { 28 | "form.default": { 29 | "name": "Valeur du paramètre", 30 | "description": "Affiche une valeur de paramètre." 31 | }, 32 | "list.default": { 33 | "name": "Liste des valeurs de paramètres", 34 | "description": "Liste des valeurs des paramètres." 35 | } 36 | }, 37 | "error": { 38 | } 39 | } -------------------------------------------------------------------------------- /packages/core/init/assets/img/equal_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/equalframework/equal/25cd74e7030fe81a126c37287cf93b6202ced774/packages/core/init/assets/img/equal_logo.png -------------------------------------------------------------------------------- /packages/core/init/assets/img/equal_presentation.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/equalframework/equal/25cd74e7030fe81a126c37287cf93b6202ced774/packages/core/init/assets/img/equal_presentation.gif -------------------------------------------------------------------------------- /packages/core/init/assets/img/equal_summary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/equalframework/equal/25cd74e7030fe81a126c37287cf93b6202ced774/packages/core/init/assets/img/equal_summary.png -------------------------------------------------------------------------------- /packages/core/init/assets/img/equal_symbol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/equalframework/equal/25cd74e7030fe81a126c37287cf93b6202ced774/packages/core/init/assets/img/equal_symbol.png -------------------------------------------------------------------------------- /packages/core/init/data/core_Group.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "core\\Group", 4 | "lang": "en", 5 | "data": [ 6 | { 7 | "id": 1, 8 | "name": "admins", 9 | "display_name": "Administrators", 10 | "description": "Users with admin privileges.", 11 | "users_ids": [ 12 | "1" 13 | ] 14 | }, 15 | { 16 | "id": 2, 17 | "name": "users", 18 | "display_name": "All Users", 19 | "description": "Default group for users.", 20 | "users_ids": [ 21 | "1", 22 | "2" 23 | ] 24 | } 25 | ] 26 | }, 27 | { 28 | "name": "core\\Group", 29 | "lang": "fr", 30 | "data": [ 31 | { 32 | "id": 1, 33 | "display_name": "Administrateurs", 34 | "description": "Utilisateurs avec privilèges d'administration." 35 | }, 36 | { 37 | "id": 2, 38 | "display_name": "Tous les utilisateurs", 39 | "description": "Groupe par défaut pour les utilisateurs." 40 | } 41 | ] 42 | } 43 | ] -------------------------------------------------------------------------------- /packages/core/init/data/core_Lang.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "core\\Lang", 4 | "lang": "en", 5 | "data": [ 6 | { 7 | "id": "1", 8 | "name": "English", 9 | "code": "en" 10 | }, 11 | { 12 | "id": "2", 13 | "name": "French", 14 | "code": "fr" 15 | }, 16 | { 17 | "id": "3", 18 | "name": "Nederlands", 19 | "code": "nl" 20 | } 21 | ] 22 | }, 23 | { 24 | "name": "core\\Lang", 25 | "lang": "fr", 26 | "data": [ 27 | { 28 | "id": "1", 29 | "name": "Anglais" 30 | }, 31 | { 32 | "id": "2", 33 | "name": "Français" 34 | }, 35 | { 36 | "id": "3", 37 | "name": "Néérlandais" 38 | } 39 | ] 40 | }, 41 | { 42 | "name": "core\\Lang", 43 | "lang": "nl", 44 | "data": [ 45 | { 46 | "id": "1", 47 | "name": "Engels" 48 | }, 49 | { 50 | "id": "2", 51 | "name": "Frans" 52 | }, 53 | { 54 | "id": "3", 55 | "name": "Nederlands" 56 | } 57 | ] 58 | } 59 | ] -------------------------------------------------------------------------------- /packages/core/init/data/core_Meta.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "core\\Meta", 4 | "lang": "en", 5 | "data": [ 6 | { 7 | "name": "workflow.core.User", 8 | "code": "workflow", 9 | "reference": "core.User", 10 | "value": "{\"created\":{\"position\":{\"x\":192,\"y\":193},\"transitions\":{\"validation\":{\"anchorFrom\":4,\"anchorTo\":3}}},\"validated\":{\"position\":{\"x\":368,\"y\":193},\"transitions\":{\"suspension\":{\"anchorFrom\":4,\"anchorTo\":3},\"confirmation\":{\"anchorFrom\":4,\"anchorTo\":3}}},\"confirmed\":{\"position\":{\"x\":633,\"y\":106},\"transitions\":{\"suspension\":{\"anchorFrom\":1,\"anchorTo\":6}}},\"suspended\":{\"position\":{\"x\":630,\"y\":302},\"transitions\":{\"confirmation\":{\"anchorFrom\":1,\"anchorTo\":6}}}}" 11 | } 12 | ] 13 | } 14 | ] -------------------------------------------------------------------------------- /packages/core/init/data/core_Permission.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "core\\Permission", 4 | "lang": "en", 5 | "description": "Grant READ permission on common objects (`core` package).", 6 | "data": [ 7 | { 8 | "class_name": "core\\*", 9 | "domain": "", 10 | "group_id": 2, 11 | "user_id": null, 12 | "rights": 2 13 | } 14 | ] 15 | } 16 | ] -------------------------------------------------------------------------------- /packages/core/init/data/core_User.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "core\\User", 4 | "lang": "en", 5 | "data": [ 6 | { 7 | "id": 1, 8 | "login": "root@equal.local", 9 | "password": "secure_password", 10 | "firstname": "Root", 11 | "lastname": "USER", 12 | "language": "en", 13 | "validated": true, 14 | "groups_ids": [1, 2] 15 | }, 16 | { 17 | "id": 2, 18 | "login": "user@equal.local", 19 | "password": "safe_pass", 20 | "firstname": "First", 21 | "lastname": "USER", 22 | "language": "en", 23 | "validated": true, 24 | "groups_ids": [2] 25 | } 26 | ] 27 | } 28 | ] -------------------------------------------------------------------------------- /packages/core/init/demo/core_security_SecurityPolicy.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "core\\security\\SecurityPolicy", 4 | "lang": "en", 5 | "data": [ 6 | { 7 | "id": 1, 8 | "name": "default policy", 9 | "is_active": true, 10 | "description": null 11 | } 12 | ] 13 | } 14 | ] -------------------------------------------------------------------------------- /packages/core/init/demo/core_security_SecurityPolicyRule.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "core\\security\\SecurityPolicyRule", 4 | "lang": "en", 5 | "data": [ 6 | { 7 | "id": 1, 8 | "name": "Ip address (for Everyone)", 9 | "user_id": null, 10 | "security_policy_id": 1, 11 | "policy_rule_type": "ip_address", 12 | "description": "Request IP address match against one or more values." 13 | }, 14 | { 15 | "id": 2, 16 | "name": "Time range (for Everyone)", 17 | "user_id": null, 18 | "security_policy_id": 1, 19 | "policy_rule_type": "time_range", 20 | "description": "Time of Request included in at least one the listed time ranges." 21 | } 22 | ] 23 | } 24 | ] -------------------------------------------------------------------------------- /packages/core/init/demo/core_security_SecurityPolicyRuleValue.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "core\\security\\SecurityPolicyRuleValue", 4 | "lang": "en", 5 | "data": [ 6 | { 7 | "id": 1, 8 | "security_policy_id": 1, 9 | "policy_rule_id": 1, 10 | "value": "109.135.28.87" 11 | }, 12 | { 13 | "id": 2, 14 | "security_policy_id": 1, 15 | "policy_rule_id": 2, 16 | "value": "mon@8:00-mon@18:30" 17 | }, 18 | { 19 | "id": 3, 20 | "security_policy_id": 1, 21 | "policy_rule_id": 2, 22 | "value": "tue@8:00-tue@18:30" 23 | }, 24 | { 25 | "id": 4, 26 | "security_policy_id": 1, 27 | "policy_rule_id": 2, 28 | "value": "wed@8:00-wed@18:30" 29 | }, 30 | { 31 | "id": 5, 32 | "security_policy_id": 1, 33 | "policy_rule_id": 2, 34 | "value": "thu@8:00-thu@18:30" 35 | }, 36 | { 37 | "id": 6, 38 | "security_policy_id": 1, 39 | "policy_rule_id": 2, 40 | "value": "fri@8:00-fri@18:30" 41 | } 42 | ] 43 | } 44 | ] -------------------------------------------------------------------------------- /packages/core/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "core", 3 | "description": "Foundation package holding common application logic and elementary entities.", 4 | "version": "2.0", 5 | "authors": ["Cedric Francoys"], 6 | "license": "LGPL-3", 7 | "tags": [ "equal", "core" ], 8 | "depends_on": [], 9 | "requires": { 10 | "swiftmailer/swiftmailer": "^6.2", 11 | "phpoffice/phpspreadsheet": "^1.4", 12 | "dompdf/dompdf": "^0.8.3" 13 | }, 14 | "apps": [ "apps", "auth", "app", "settings", "workbench", "welcome" ] 15 | } 16 | -------------------------------------------------------------------------------- /packages/core/tests/auth.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2021 5 | Licensed under GNU GPL 3 license 6 | */ 7 | 8 | $tests = [ 9 | 10 | '0101' => [ 11 | 'description' => "Retrieve authentication service from eQual::announce", 12 | 'return' => ['object'], 13 | 'assert' => function($auth) { 14 | return ($auth instanceof equal\auth\AuthenticationManager); 15 | }, 16 | 'act' => function () { 17 | list($params, $providers) = eQual::announce([ 18 | 'providers' => ['equal\auth\AuthenticationManager'] 19 | ]); 20 | return $providers['equal\auth\AuthenticationManager']; 21 | } 22 | ], 23 | 24 | '0102' => [ 25 | 'description' => "Get auth provider using a custom registered name.", 26 | 'return' => ['object'], 27 | 'assert' => function($auth) { 28 | return ($auth instanceof equal\auth\AuthenticationManager); 29 | }, 30 | 'act' => function (){ 31 | list($params, $providers) = eQual::announce([ 32 | 'providers' => ['@@testAuth' => 'equal\auth\AuthenticationManager'] 33 | ]); 34 | return $providers['@@testAuth']; 35 | } 36 | ] 37 | ]; -------------------------------------------------------------------------------- /packages/core/tests/computed.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2021 5 | Licensed under GNU GPL 3 license 6 | */ 7 | 8 | $tests = [ 9 | 10 | '1001' => [ 11 | 'description' => "Checking dependents chaining with computed field of related object.", 12 | 'act' => function () { 13 | $result = []; 14 | $test = core\test\Test::create(['string_short' => 'test 0'])->read(['id'])->first(); 15 | $test1 = core\test\Test1::create(['test_id' => $test['id']])->read(['id', 'test'])->first(); 16 | $result[] = $test1['test']; 17 | core\test\Test::id($test['id'])->update(['string_short' => 'test 1']); 18 | $test1 = core\test\Test1::id($test1['id'])->read(['test'])->first(); 19 | $result[] = $test1['test']; 20 | return $result; 21 | }, 22 | 'assert' => function($result) { 23 | return ($result[0] == 'test 0' && $result[1] == 'test 1'); 24 | } 25 | ] 26 | 27 | ]; -------------------------------------------------------------------------------- /packages/core/views/Assignment.list.default.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Assignments", 3 | "description": "List of existing Role assignments granted to users.", 4 | "layout": { 5 | "items": [ 6 | { 7 | "type": "field", 8 | "value": "id", 9 | "width": "10%" 10 | }, 11 | { 12 | "type": "field", 13 | "value": "object_class", 14 | "width": "20%", 15 | "widget": { 16 | "sortable": true 17 | } 18 | }, 19 | { 20 | "type": "field", 21 | "value": "object_id", 22 | "width": "15%" 23 | }, 24 | { 25 | "type": "field", 26 | "value": "user_id", 27 | "width": "15%" 28 | }, 29 | { 30 | "type": "field", 31 | "value": "role", 32 | "width": "25%" 33 | } 34 | ] 35 | } 36 | } -------------------------------------------------------------------------------- /packages/core/views/Group.list.default.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Groups list", 3 | "description": "This view is intended for displaying basic listing of existing groups", 4 | "order": "name", 5 | "sort": "asc", 6 | "layout": { 7 | "items": [ 8 | { 9 | "type": "field", 10 | "value": "name", 11 | "width": "25%", 12 | "widget": { 13 | "sortable": true 14 | } 15 | }, 16 | { 17 | "type": "field", 18 | "value": "display_name", 19 | "width": "35%" 20 | }, 21 | { 22 | "type": "field", 23 | "value": "description", 24 | "width": "35%" 25 | } 26 | ] 27 | } 28 | } -------------------------------------------------------------------------------- /packages/core/views/Group.list.selection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Groups selection", 3 | "description": "Intended for picking up one or more group(s).", 4 | "layout": { 5 | "items": [ 6 | { 7 | "type": "field", 8 | "value": "name", 9 | "width": "20%" 10 | } 11 | ] 12 | } 13 | } -------------------------------------------------------------------------------- /packages/core/views/Lang.form.default.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Language", 3 | "description": "Default form for language.", 4 | "layout": { 5 | "groups": [ 6 | { 7 | "sections": [ 8 | { 9 | "rows": [ 10 | { 11 | "columns": [ 12 | { 13 | "width": "100%", 14 | "align": "left", 15 | "items": [ 16 | { 17 | "type": "field", 18 | "value": "name", 19 | "width": "50%" 20 | }, 21 | { 22 | "type": "field", 23 | "value": "code", 24 | "width": "50%" 25 | } 26 | ] 27 | } 28 | ] 29 | } 30 | ] 31 | } 32 | ] 33 | } 34 | ] 35 | } 36 | } -------------------------------------------------------------------------------- /packages/core/views/Lang.list.default.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Languages listing", 3 | "description": "Full list of available languages.", 4 | "layout": { 5 | "items": [ 6 | { 7 | "type": "field", 8 | "value": "name", 9 | "width": "20%" 10 | }, 11 | { 12 | "type": "field", 13 | "value": "code", 14 | "width": "20%" 15 | } 16 | ] 17 | } 18 | } -------------------------------------------------------------------------------- /packages/core/views/Log.list.default.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Logs list", 3 | "description": "This view is intended for displaying basic logs", 4 | "layout": { 5 | "items": [ 6 | { 7 | "type": "field", 8 | "value": "id", 9 | "width": "5%" 10 | }, 11 | { 12 | "type": "field", 13 | "value": "created", 14 | "width": "10%" 15 | }, 16 | { 17 | "type": "field", 18 | "value": "user_id", 19 | "label": "User", 20 | "width": "10%" 21 | }, 22 | { 23 | "type": "field", 24 | "value": "action", 25 | "width": "20%" 26 | }, 27 | { 28 | "type": "field", 29 | "value": "object_class", 30 | "link": true, 31 | "width": "35%" 32 | }, 33 | { 34 | "type": "field", 35 | "value": "object_id", 36 | "width": "35%" 37 | } 38 | ] 39 | } 40 | } -------------------------------------------------------------------------------- /packages/core/views/Meta.list.default.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Meta values listing", 3 | "description": "Full list of existing meta values.", 4 | "layout": { 5 | "items": [ 6 | { 7 | "type": "field", 8 | "value": "name", 9 | "width": "20%" 10 | }, 11 | { 12 | "type": "field", 13 | "value": "code", 14 | "width": "20%" 15 | }, 16 | { 17 | "type": "field", 18 | "value": "reference", 19 | "width": "20%" 20 | }, 21 | { 22 | "type": "field", 23 | "value": "value", 24 | "width": "20%" 25 | } 26 | 27 | ] 28 | } 29 | } -------------------------------------------------------------------------------- /packages/core/views/Permission.list.default.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Permissions list", 3 | "description": "This view is intended for displaying basic listing of existing permissions", 4 | "order": "name", 5 | "sort": "asc", 6 | "layout": { 7 | "items": [ 8 | { 9 | "type": "field", 10 | "value": "class_name", 11 | "width": "15%", 12 | "widget": { 13 | "sortable": true 14 | } 15 | }, 16 | { 17 | "type": "field", 18 | "value": "domain", 19 | "width": "15%" 20 | }, 21 | { 22 | "type": "field", 23 | "value": "group_id", 24 | "width": "20%" 25 | }, 26 | 27 | { 28 | "type": "field", 29 | "value": "user_id", 30 | "width": "20%" 31 | }, 32 | { 33 | "type": "field", 34 | "value": "rights_txt", 35 | "label": "Rights", 36 | "width": "30%" 37 | } 38 | ] 39 | } 40 | } -------------------------------------------------------------------------------- /packages/core/views/TaskLog.list.default.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Task Logs", 3 | "description": "Logs of the scheduled task.", 4 | "order": "created", 5 | "sort": "desc", 6 | "layout": { 7 | "items": [ 8 | { 9 | "type": "field", 10 | "value": "created", 11 | "width": "25%", 12 | "sortable": true 13 | }, 14 | { 15 | "type": "field", 16 | "value": "status", 17 | "width": "15%", 18 | "sortable": true 19 | } 20 | ] 21 | } 22 | } -------------------------------------------------------------------------------- /packages/core/views/Translation.form.default.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | 5 |
6 | 7 |
8 | 9 |
10 | 11 |
12 |
13 |
-------------------------------------------------------------------------------- /packages/core/views/Translation.list.default.html: -------------------------------------------------------------------------------- 1 |
    2 |
  • 3 |
  • 4 |
  • 5 |
  • 6 |
  • 7 |
  • 8 |
-------------------------------------------------------------------------------- /packages/core/views/alert/Message.list.dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Messages list", 3 | "description": "Listing of pending messages.", 4 | "header": { 5 | "actions": { 6 | "ACTION.CREATE": false 7 | }, 8 | "selection": { 9 | "default" : false, 10 | "actions" : [ 11 | { 12 | "id": "header.selection.actions.bulk_dismiss", 13 | "label": "Re-check", 14 | "icon": "replay", 15 | "controller": "core_alert_bulk-dismiss" 16 | } 17 | ] 18 | } 19 | }, 20 | "layout": { 21 | "items": [ 22 | { 23 | "type": "field", 24 | "value": "label", 25 | "width": "25%" 26 | }, 27 | { 28 | "type": "field", 29 | "value": "object_link", 30 | "width": "25%" 31 | }, 32 | { 33 | "type": "field", 34 | "value": "description", 35 | "label": "Name", 36 | "width": "35%" 37 | }, 38 | { 39 | "type": "field", 40 | "value": "severity", 41 | "width": "15%" 42 | } 43 | ] 44 | } 45 | } -------------------------------------------------------------------------------- /packages/core/views/alert/Message.list.default.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Messages list", 3 | "description": "Listing of pending messages.", 4 | "layout": { 5 | "items": [ 6 | { 7 | "type": "field", 8 | "value": "created", 9 | "width": "25%" 10 | }, 11 | { 12 | "type": "field", 13 | "value": "creator", 14 | "width": "25%" 15 | }, 16 | { 17 | "type": "field", 18 | "value": "message_model_id", 19 | "width": "25%" 20 | }, 21 | { 22 | "type": "field", 23 | "value": "object_class", 24 | "width": "20%" 25 | }, 26 | { 27 | "type": "field", 28 | "value": "object_id", 29 | "width": "10%" 30 | }, 31 | { 32 | "type": "field", 33 | "value": "severity", 34 | "width": "15%" 35 | }, 36 | { 37 | "type": "field", 38 | "value": "controller", 39 | "width": "15%" 40 | }, 41 | { 42 | "type": "field", 43 | "value": "params", 44 | "width": "15%" 45 | } 46 | ] 47 | } 48 | } -------------------------------------------------------------------------------- /packages/core/views/alert/MessageModel.list.default.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Message Models list", 3 | "description": "Listing messages models.", 4 | "layout": { 5 | "items": [ 6 | { 7 | "type": "field", 8 | "value": "name", 9 | "width": "25%" 10 | }, 11 | { 12 | "type": "field", 13 | "value": "label", 14 | "width": "25%" 15 | }, 16 | { 17 | "type": "field", 18 | "value": "type", 19 | "width": "25%" 20 | }, 21 | { 22 | "type": "field", 23 | "value": "description", 24 | "width": "50%" 25 | } 26 | ] 27 | } 28 | } -------------------------------------------------------------------------------- /packages/core/views/import/ColumnMapping.list.default.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Column Mappings", 3 | "description": "Listing view for Column Mapping items.", 4 | "layout": { 5 | "items": [ 6 | { 7 | "type": "field", 8 | "value": "id", 9 | "width": "10%", 10 | "sortable": true, 11 | "readonly": true 12 | }, 13 | { 14 | "type": "field", 15 | "value": "entity_mapping_id", 16 | "width": "20%", 17 | "sortable": true 18 | }, 19 | { 20 | "type": "field", 21 | "value": "mapping_type", 22 | "width": "20%", 23 | "sortable": true 24 | }, 25 | { 26 | "type": "field", 27 | "value": "origin", 28 | "width": "20%", 29 | "sortable": true 30 | }, 31 | { 32 | "type": "field", 33 | "value": "target_name", 34 | "width": "20%", 35 | "sortable": true 36 | } 37 | ] 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /packages/core/views/import/DataTransformer.list.default.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Data Transformers", 3 | "description": "Listing view for Data Transformer items.", 4 | "layout": { 5 | "items": [ 6 | { 7 | "type": "field", 8 | "value": "id", 9 | "width": "10%", 10 | "sortable": true, 11 | "readonly": true 12 | }, 13 | { 14 | "type": "field", 15 | "value": "column_mapping_id", 16 | "width": "40%", 17 | "sortable": true 18 | }, 19 | { 20 | "type": "field", 21 | "value": "transformer_type", 22 | "width": "40%", 23 | "sortable": true 24 | }, 25 | { 26 | "type": "field", 27 | "value": "order", 28 | "width": "10%", 29 | "sortable": true 30 | } 31 | ] 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /packages/core/views/import/DataTransformerMapValue.list.default.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Data Transformer Map Value", 3 | "description": "Listing view for Data Transformer Map Value items.", 4 | "layout": { 5 | "items": [ 6 | { 7 | "type": "field", 8 | "value": "id", 9 | "width": "10%", 10 | "sortable": true, 11 | "readonly": true 12 | }, 13 | { 14 | "type": "field", 15 | "value": "data_transformer_id", 16 | "width": "25%", 17 | "sortable": true 18 | }, 19 | { 20 | "type": "field", 21 | "value": "old_value", 22 | "width": "25%", 23 | "sortable": true 24 | }, 25 | { 26 | "type": "field", 27 | "value": "new_value", 28 | "width": "25%", 29 | "sortable": true 30 | } 31 | ] 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /packages/core/views/import/EntityMapping.list.default.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Entity Mappings", 3 | "description": "Listing view for Entity Mapping items.", 4 | "layout": { 5 | "items": [ 6 | { 7 | "type": "field", 8 | "value": "id", 9 | "width": "10%", 10 | "sortable": true, 11 | "readonly": true 12 | }, 13 | { 14 | "type": "field", 15 | "value": "name", 16 | "width": "33%", 17 | "sortable": true, 18 | "readonly": false 19 | }, 20 | { 21 | "type": "field", 22 | "value": "entity", 23 | "width": "33%", 24 | "sortable": true, 25 | "readonly": false 26 | }, 27 | { 28 | "type": "field", 29 | "value": "mapping_type", 30 | "width": "25%", 31 | "sortable": true, 32 | "readonly": false 33 | } 34 | ] 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /packages/core/views/menu.sandbox.left.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Sandbox menu", 3 | "access": { 4 | "groups": ["users"] 5 | }, 6 | "layout": { 7 | "items": [ 8 | { 9 | "id": "users", 10 | "type": "entry", 11 | "label": "Users", 12 | "description": "", 13 | "context": { 14 | "entity": "core\\User", 15 | "view": "list.default" 16 | } 17 | } 18 | ] 19 | } 20 | } -------------------------------------------------------------------------------- /packages/core/views/menu.workbench.left.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Workbench menu", 3 | "access": { 4 | "groups": [ 5 | "users" 6 | ] 7 | }, 8 | "layout": { 9 | "items": [ 10 | { 11 | "id": "components", 12 | "type": "entry", 13 | "label": "Components", 14 | "icon": "category", 15 | "route": "/" 16 | }, 17 | { 18 | "id": "pipelines", 19 | "type": "entry", 20 | "label": "Pipelines", 21 | "icon": "insights", 22 | "route": "/pipelines" 23 | }, 24 | { 25 | "id": "uml.erd", 26 | "type": "entry", 27 | "label": "ERD", 28 | "icon": "account_tree", 29 | "route": "/uml" 30 | }, 31 | { 32 | "id": "routes", 33 | "type": "entry", 34 | "label": "Routes", 35 | "icon": "route", 36 | "route": "/routes" 37 | } 38 | ] 39 | } 40 | } -------------------------------------------------------------------------------- /packages/core/views/notification/Notification.list.default.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Notifications", 3 | "description": "List of existing Notifications sent to users.", 4 | "layout": { 5 | "items": [ 6 | { 7 | "type": "field", 8 | "value": "id", 9 | "width": "10%" 10 | }, 11 | { 12 | "type": "field", 13 | "value": "title", 14 | "width": "25%", 15 | "widget": { 16 | "sortable": true 17 | } 18 | }, 19 | { 20 | "type": "field", 21 | "value": "user_id", 22 | "width": "20%", 23 | "widget": { 24 | "sortable": true 25 | } 26 | }, 27 | { 28 | "type": "field", 29 | "value": "status", 30 | "width": "15%", 31 | "widget": { 32 | "sortable": true 33 | } 34 | }, 35 | { 36 | "type": "field", 37 | "value": "is_persistent", 38 | "width": "10%" 39 | }, 40 | { 41 | "type": "field", 42 | "value": "remind_frequency", 43 | "width": "15%" 44 | } 45 | ] 46 | } 47 | } -------------------------------------------------------------------------------- /packages/core/views/security/SecurityPolicy.list.default.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Groups list", 3 | "description": "This view is intended for displaying basic listing of existing groups", 4 | "order": "name", 5 | "sort": "asc", 6 | "layout": { 7 | "items": [ 8 | { 9 | "type": "field", 10 | "value": "name", 11 | "width": "25%", 12 | "widget": { 13 | "sortable": true 14 | } 15 | }, 16 | { 17 | "type": "field", 18 | "value": "created", 19 | "width": "10%", 20 | "widget": { 21 | "sortable": true 22 | } 23 | }, 24 | { 25 | "type": "field", 26 | "value": "is_active", 27 | "width": "10%", 28 | "widget": { 29 | "sortable": true 30 | } 31 | }, 32 | { 33 | "type": "field", 34 | "value": "description", 35 | "width": "35%" 36 | } 37 | ] 38 | } 39 | } -------------------------------------------------------------------------------- /packages/core/views/security/SecurityPolicyRule.list.default.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Groups list", 3 | "description": "This view is intended for displaying basic listing of existing groups", 4 | "order": "name", 5 | "sort": "asc", 6 | "layout": { 7 | "items": [ 8 | { 9 | "type": "field", 10 | "value": "name", 11 | "width": "25%", 12 | "widget": { 13 | "sortable": true 14 | } 15 | }, 16 | { 17 | "type": "field", 18 | "value": "created", 19 | "width": "10%", 20 | "widget": { 21 | "sortable": true 22 | } 23 | }, 24 | { 25 | "type": "field", 26 | "value": "user_id", 27 | "width": "10%", 28 | "widget": { 29 | "sortable": true 30 | } 31 | }, 32 | { 33 | "type": "field", 34 | "value": "description", 35 | "width": "35%" 36 | } 37 | ] 38 | } 39 | } -------------------------------------------------------------------------------- /packages/core/views/security/SecurityPolicyRuleValue.list.default.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Policy Rule Values", 3 | "description": "List of Policy Rule values.", 4 | "order": "name", 5 | "sort": "asc", 6 | "layout": { 7 | "items": [ 8 | { 9 | "type": "field", 10 | "value": "name", 11 | "width": "25%", 12 | "widget": { 13 | "sortable": true 14 | } 15 | }, 16 | { 17 | "type": "field", 18 | "value": "security_policy_id", 19 | "label": "Security Policy", 20 | "width": "15%", 21 | "widget": { 22 | "sortable": true 23 | } 24 | }, 25 | { 26 | "type": "field", 27 | "value": "policy_rule_id", 28 | "label": "Policy Rule", 29 | "width": "15%", 30 | "widget": { 31 | "sortable": true 32 | } 33 | }, 34 | { 35 | "type": "field", 36 | "value": "value", 37 | "width": "35%" 38 | } 39 | ] 40 | } 41 | } -------------------------------------------------------------------------------- /packages/core/views/setting/Setting.list.default.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Config params list", 3 | "description": "Default listing of configuration parameters.", 4 | "layout": { 5 | "items": [ 6 | { 7 | "type": "field", 8 | "value": "name", 9 | "width": "15%", 10 | "sortable": true, 11 | "readonly": true 12 | }, 13 | { 14 | "type": "field", 15 | "value": "package", 16 | "label": "Package", 17 | "width": "15%", 18 | "sortable": true 19 | }, 20 | { 21 | "type": "field", 22 | "value": "section", 23 | "label": "Section", 24 | "width": "10%", 25 | "sortable": true 26 | }, 27 | { 28 | "type": "field", 29 | "value": "code", 30 | "width": "15%", 31 | "sortable": true 32 | }, 33 | { 34 | "type": "field", 35 | "value": "type", 36 | "width": "10%", 37 | "sortable": true 38 | }, 39 | { 40 | "type": "field", 41 | "value": "is_sequence", 42 | "label": "sequence", 43 | "width": "10%", 44 | "sortable": true 45 | }, 46 | { 47 | "type": "field", 48 | "value": "description", 49 | "width": "25%" 50 | } 51 | ] 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /packages/core/views/setting/SettingChoice.list.default.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Config params list", 3 | "description": "Default listing of configuration parameters.", 4 | "layout": { 5 | "items": [ 6 | { 7 | "type": "field", 8 | "value": "name", 9 | "width": "33%" 10 | }, 11 | { 12 | "type": "field", 13 | "value": "value", 14 | "width": "33%" 15 | }, 16 | { 17 | "type": "field", 18 | "value": "setting_id", 19 | "width": "33%" 20 | } 21 | ] 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /packages/core/views/setting/SettingSection.list.default.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Setting Sections", 3 | "description": "Default listing for setting sections.", 4 | "layout": { 5 | "items": [ 6 | { 7 | "type": "field", 8 | "value": "name", 9 | "width": "25%", 10 | "sortable": true, 11 | "readonly": true 12 | }, 13 | { 14 | "type": "field", 15 | "value": "code", 16 | "width": "15%", 17 | "sortable": true 18 | }, 19 | { 20 | "type": "field", 21 | "value": "description", 22 | "width": "45%" 23 | } 24 | ] 25 | } 26 | } -------------------------------------------------------------------------------- /packages/core/views/setting/SettingSequence.form.default.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Setting sequence", 3 | "description": "Default form for Setting Sequence.", 4 | "layout": { 5 | "groups": [ 6 | { 7 | "sections": [ 8 | { 9 | "rows": [ 10 | { 11 | "columns": [ 12 | { 13 | "width": "100%", 14 | "align": "left", 15 | "items": [ 16 | { 17 | "type": "field", 18 | "value": "setting_id", 19 | "width": "33%" 20 | }, 21 | { 22 | "type": "field", 23 | "value": "value", 24 | "width": "33%" 25 | } 26 | ] 27 | } 28 | ] 29 | } 30 | ] 31 | } 32 | ] 33 | } 34 | ] 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /packages/core/views/setting/SettingSequence.list.default.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Config params sequences", 3 | "description": "Default listing of configuration sequences.", 4 | "layout": { 5 | "items": [ 6 | { 7 | "type": "field", 8 | "value": "name", 9 | "label": "Name", 10 | "width": "30%", 11 | "sortable": true 12 | }, 13 | { 14 | "type": "field", 15 | "value": "value", 16 | "width": "25%" 17 | } 18 | ] 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /packages/core/views/setting/SettingValue.list.default.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Config params values", 3 | "description": "Default listing of configuration values.", 4 | "layout": { 5 | "items": [ 6 | { 7 | "type": "field", 8 | "value": "name", 9 | "label": "Name", 10 | "width": "30%", 11 | "sortable": true 12 | }, 13 | { 14 | "type": "field", 15 | "value": "user_id", 16 | "label": "User", 17 | "width": "25%", 18 | "sortable": true 19 | }, 20 | { 21 | "type": "field", 22 | "value": "value", 23 | "width": "25%" 24 | } 25 | ] 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /packages/demo/classes/Foo.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2021 5 | Licensed under GNU GPL 3 license 6 | */ 7 | namespace demo; 8 | 9 | class Foo { 10 | 11 | public static function getColumns() { 12 | return [ 13 | 'field_a' => [ 14 | 'type' => 'string', 15 | 'multilang' => true 16 | ], 17 | 'field_b' => [ 18 | 'type' => 'string' 19 | ] 20 | ]; 21 | } 22 | } -------------------------------------------------------------------------------- /packages/demo/classes/User.class.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2021 5 | Licensed under GNU GPL 3 license 6 | */ 7 | namespace demo; 8 | 9 | class User extends \core\User { 10 | 11 | public static function getColumns() { 12 | return [ 13 | 'new_field' => [ 14 | 'type' => 'string', 15 | 'multilang' => true 16 | ], 17 | 'myfile' => [ 18 | 'type' => 'file' 19 | ] 20 | ]; 21 | } 22 | } -------------------------------------------------------------------------------- /packages/demo/data/announce.php: -------------------------------------------------------------------------------- 1 | 'This ia an example to show how to use the announce() method', 5 | 'params' => [ 6 | 'a' => [ 7 | 'description' => 'This is a mandatory argument that has to be formated as an integer', 8 | 'type' => 'integer', 9 | 'required' => true 10 | ], 11 | 'b' => [ 12 | 'description' => 'This is an optional string argument', 13 | 'type' => 'string' 14 | ], 15 | 'c' => [ 16 | 'description' => 'This is an optional argument with a default value (will always be present)', 17 | 'type' => 'string', 18 | 'default' => 'test' 19 | ] 20 | 21 | ] 22 | ]); 23 | 24 | print_r($params); -------------------------------------------------------------------------------- /packages/demo/data/cities.php: -------------------------------------------------------------------------------- 1 | 'Get list of cities with pictures using teleport API.', 4 | 'params' => [ 5 | ], 6 | 'response' => [ 7 | 'content-type' => 'application/json', 8 | 'charset' => 'utf-8' 9 | ], 10 | 'providers' => ['context'] 11 | ]); 12 | 13 | $json = file_get_contents('https://api.teleport.org/api/urban_areas/?embed=ua:item/ua:images'); 14 | $data = json_decode($json, true); 15 | 16 | $cities = []; 17 | 18 | foreach($data['_embedded']['ua:item'] as $item) { 19 | $cities[$item['slug']] = $item['_embedded']['ua:images']['photos'][0]['image']['mobile']; 20 | } 21 | 22 | $providers['context'] 23 | ->httpResponse() 24 | ->body($cities) 25 | ->send(); 26 | -------------------------------------------------------------------------------- /packages/demo/data/first.php: -------------------------------------------------------------------------------- 1 | 'Get picture data from imgur.com using imgur API.', 10 | 'params' => [ 11 | 'id' => [ 12 | 'description' => 'Hash of the image to retrieve', 13 | 'type' => 'string', 14 | 'default' => 'a5NE1kW' 15 | ] 16 | ], 17 | 'response' => [ 18 | 'content-type' => 'application/json', 19 | 'charset' => 'utf-8' 20 | ], 21 | 'providers' => ['context'] 22 | ]); 23 | 24 | $request = new httpRequest("GET https://api.imgur.com/3/image/{$params['id']}"); 25 | 26 | $response = $request 27 | ->header('Authorization', "Client-ID 34030ab1f5ef12d") 28 | ->send(); 29 | 30 | $providers['context'] 31 | ->httpResponse() 32 | ->body(['result' => $response->body()]) 33 | ->send(); -------------------------------------------------------------------------------- /packages/demo/data/listen.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, Cedric Francoys, 2010-2021 5 | Licensed under GNU LGPL 3 license 6 | */ 7 | use equal\services\Container; 8 | 9 | $container = Container::getInstance(); 10 | // retrieve required services 11 | $context = $container->get(['context']); 12 | 13 | 14 | $request = $context->getHttpRequest(); 15 | 16 | var_dump($request); 17 | -------------------------------------------------------------------------------- /packages/demo/data/reuse.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | RewriteEngine On 7 | RewriteBase / 8 | 9 | RewriteRule ^(equal|index|console)\.php(\??.*)$ - [L] 10 | 11 | RewriteCond %{REQUEST_FILENAME} ^(.*)\.php$ [OR] 12 | RewriteCond %{REQUEST_FILENAME} !-f 13 | RewriteCond %{REQUEST_FILENAME} !-d 14 | RewriteRule . /index.php [L] 15 | 16 | 17 | -------------------------------------------------------------------------------- /public/assets/css/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/equalframework/equal/25cd74e7030fe81a126c37287cf93b6202ced774/public/assets/css/.gitkeep -------------------------------------------------------------------------------- /public/assets/env/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/equalframework/equal/25cd74e7030fe81a126c37287cf93b6202ced774/public/assets/env/.gitkeep -------------------------------------------------------------------------------- /public/assets/env/default.json: -------------------------------------------------------------------------------- 1 | { 2 | "production": true, 3 | "parent_domain": "equal.local", 4 | "backend_url": "http://equal.local", 5 | "rest_api_url": "http://equal.local/", 6 | "lang": "en", 7 | "locale": "en", 8 | "company_name": "eQual Framework", 9 | "company_url": "https://yesbabylon.com", 10 | "app_name": "eQual.run", 11 | "app_logo_url": "/assets/img/logo.svg", 12 | "app_settings_root_package": "core", 13 | "version": "1.0", 14 | "license": "AGPL", 15 | "license_url": "https://www.gnu.org/licenses/agpl-3.0.en.html" 16 | } -------------------------------------------------------------------------------- /public/assets/fonts/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/equalframework/equal/25cd74e7030fe81a126c37287cf93b6202ced774/public/assets/fonts/.gitkeep -------------------------------------------------------------------------------- /public/assets/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/equalframework/equal/25cd74e7030fe81a126c37287cf93b6202ced774/public/assets/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /public/assets/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/equalframework/equal/25cd74e7030fe81a126c37287cf93b6202ced774/public/assets/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /public/assets/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/equalframework/equal/25cd74e7030fe81a126c37287cf93b6202ced774/public/assets/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /public/assets/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/equalframework/equal/25cd74e7030fe81a126c37287cf93b6202ced774/public/assets/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /public/assets/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/equalframework/equal/25cd74e7030fe81a126c37287cf93b6202ced774/public/assets/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /public/assets/i18n/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/equalframework/equal/25cd74e7030fe81a126c37287cf93b6202ced774/public/assets/i18n/.gitkeep -------------------------------------------------------------------------------- /public/assets/img/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/equalframework/equal/25cd74e7030fe81a126c37287cf93b6202ced774/public/assets/img/.gitkeep -------------------------------------------------------------------------------- /public/assets/img/avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/equalframework/equal/25cd74e7030fe81a126c37287cf93b6202ced774/public/assets/img/avatar.png -------------------------------------------------------------------------------- /public/assets/img/equal_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/equalframework/equal/25cd74e7030fe81a126c37287cf93b6202ced774/public/assets/img/equal_logo.png -------------------------------------------------------------------------------- /public/assets/img/equal_presentation.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/equalframework/equal/25cd74e7030fe81a126c37287cf93b6202ced774/public/assets/img/equal_presentation.gif -------------------------------------------------------------------------------- /public/assets/img/equal_summary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/equalframework/equal/25cd74e7030fe81a126c37287cf93b6202ced774/public/assets/img/equal_summary.png -------------------------------------------------------------------------------- /public/assets/img/equal_symbol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/equalframework/equal/25cd74e7030fe81a126c37287cf93b6202ced774/public/assets/img/equal_symbol.png -------------------------------------------------------------------------------- /public/assets/img/low_resolution.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/equalframework/equal/25cd74e7030fe81a126c37287cf93b6202ced774/public/assets/img/low_resolution.png -------------------------------------------------------------------------------- /public/assets/js/.kitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/equalframework/equal/25cd74e7030fe81a126c37287cf93b6202ced774/public/assets/js/.kitkeep -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/equalframework/equal/25cd74e7030fe81a126c37287cf93b6202ced774/public/favicon.ico -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | 4 | Some Rights Reserved, The eQual Framework, 2010-2024 5 | Original Author: Cedric Francoys 6 | License: GNU LGPL 3 license 7 | */ 8 | 9 | /* 10 | Session config 11 | */ 12 | // disable SID and sessions 13 | ini_set('session.use_cookies', '0'); 14 | ini_set('session.use_only_cookies', '1'); 15 | // make sure not to rewrite URL 16 | ini_set('session.use_trans_sid', '0'); 17 | ini_set('url_rewriter.tags', ''); 18 | 19 | /* 20 | URI sanitization 21 | */ 22 | // handle the '_escaped_fragment_' parameter to support requests made by crawlers 23 | if(isset($_REQUEST['_escaped_fragment_'])) { 24 | $uri = $_REQUEST['_escaped_fragment_']; 25 | header('Status: 200 OK'); 26 | header('Location: '.$uri); 27 | exit(); 28 | } 29 | 30 | /* 31 | Request handling 32 | */ 33 | 34 | // #debug - for debugging, uncomment this to force the header of generated HTTP response 35 | /* 36 | header("HTTP/1.1 200 OK"); 37 | header('Content-type: application/json; charset=UTF-8'); 38 | header('Access-Control-Allow-Origin: *'); 39 | header('Access-Control-Allow-Methods: GET,POST,PUT,PATCH,DELETE,OPTIONS,HEAD,TRACE'); 40 | header('Access-Control-Allow-Headers: *'); 41 | header('Access-Control-Expose-Headers: *'); 42 | header('Allow: *'); 43 | flush(); 44 | */ 45 | 46 | // parse requested operation and relay result to php://stdout 47 | include('../run.php'); -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-Agent: * 2 | Disallow: / --------------------------------------------------------------------------------