PHPackages                             dlunire/dlcore - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. dlunire/dlcore

ActiveLibrary[Framework](/categories/framework)

dlunire/dlcore
==============

DLCore es el núcleo funcional del framework DLUnire. Proporciona el ORM, motor de plantillas, autenticación, envío de correos y lectura avanzada de variables de entorno con tipado estático. Todo lo esencial para construir aplicaciones modernas en PHP con una arquitectura limpia y extensible

v1.1.5(1mo ago)0253↓62.5%1MITPHPPHP &gt;=8.0

Since Apr 8Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/dlunire/dlcore)[ Packagist](https://packagist.org/packages/dlunire/dlcore)[ Docs](https://dlunire.pro/)[ RSS](/packages/dlunire-dlcore/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (14)Versions (8)Used By (1)

DLCore — Kernel de DLUnire / DLUnire Core Kernel
================================================

[](#dlcore--kernel-de-dlunire--dlunire-core-kernel)

Español
-------

[](#español)

### Dependencia de Infraestructura

[](#dependencia-de-infraestructura)

DLCore **requiere DLRoute como proveedor del contexto de ejecución**. Esto incluye, pero no se limita a:

- Resolución del *document root*
- Contexto del entorno de servidor
- Resolución base del sistema de archivos y rutas

DLCore **no inicializa ni define el entorno de ejecución**. Su responsabilidad es **consumir dicho entorno de forma determinista**, delegando esta tarea a DLRoute como capa de infraestructura.

Esta dependencia es **intencional y estructural**, y forma parte del diseño arquitectónico del framework. **DLRoute** actúa como la capa inferior que abstrae el entorno de ejecución, mientras que **DLCore** construye sobre dicho contexto sin duplicar responsabilidades.

---

English
-------

[](#english)

### Infrastructure Dependency

[](#infrastructure-dependency)

DLCore **requires DLRoute as the execution context provider**. This includes, but is not limited to:

- Document root resolution
- Server environment context
- Base filesystem and path resolution

DLCore **does not initialize nor define the execution environment**. Its responsibility is to **consume that environment deterministically**, delegating this role to DLRoute as the infrastructure layer.

This dependency is **intentional and structural**, and is part of the framework’s architectural design. DLRoute acts as the lower-level layer that abstracts the execution environment, while DLCore builds on top of that context without duplicating responsibilities.

Installation
------------

[](#installation)

To install `dlunire/dlcore`, run the following command:

```
composer require dlunire/dlcore
```

> **Important:** You must have Composer installed before installing this tool. If you don’t have it yet, [visit Composer’s official website](https://getcomposer.org) and follow the instructions.

---

Instalación
-----------

[](#instalación)

Para instalar `dlunire/dlcore`, ejecute el siguiente comando:

```
composer require dlunire/dlcore
```

> **Importante:** debe tener instalado Composer previamente. Si no lo tiene, [visite el sitio oficial de Composer](https://getcomposer.org) y siga las instrucciones.

---

Features / Características
--------------------------

[](#features--características)

- Query builder.
- Model system.
- Typed environment variable reader, which validates types such as `string`, `integer`, `boolean`, `email`, and `uuidv4`, even without a traditional `.env` file.
- Template parser for `*.template.html` files with syntax similar to Laravel Blade.

---

### Template Syntax Comparison / Comparación con Laravel

[](#template-syntax-comparison--comparación-con-laravel)

FeatureLaravelDLCoreBase template`@extends('base')``@base('base')`Template directory`/resources/``/resources/`Template extension`.blade.php``.template.html`JSON output`@json($array)``@json($array, 'pretty')`Markdown supportN/A`@markdown('file')`Looping`@for(...) @endfor``@for(...) @endfor`> Markdown files must be placed in `/resources/` and use `.md` extensions, but do **not** include the extension in `@markdown()`.

---

Usage / Uso
-----------

[](#usage--uso)

### Environment Variables / Variables de entorno

[](#environment-variables--variables-de-entorno)

Create a `.env.type` file with typed variables:

```
DL_PRODUCTION: boolean = false
DL_DATABASE_HOST: string = "localhost"
DL_DATABASE_PORT: integer = 3306
DL_DATABASE_USER: string = "your-user"
DL_DATABASE_PASSWORD: string = "your-password"
DL_DATABASE_NAME: string = "your-database"
DL_DATABASE_CHARSET: string = "utf8"
DL_DATABASE_COLLATION: string = "utf8_general_ci"
DL_DATABASE_DRIVE: string = "mysql"
DL_PREFIX: string = "dl_"
```

To send emails:

```
MAIL_USERNAME: email = no-reply@example.com
MAIL_PASSWORD: string = "password"
MAIL_PORT: integer = 465
MAIL_COMPANY_NAME: string = "Your Company"
MAIL_CONTACT: email = contact@example.com
```

Google reCAPTCHA keys:

```
G_SECRET_KEY: string = ""
G_SITE_KEY: string = ""
```

> For syntax highlighting, install [DL Typed Environment extension](https://marketplace.visualstudio.com/items?itemName=dlunamontilla.envtype)

---

### Models / Modelos

[](#models--modelos)

```
