PHPackages                             timefinancehub/syntaxsanctuary - 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. [Templating &amp; Views](/categories/templating)
4. /
5. timefinancehub/syntaxsanctuary

ActiveProject[Templating &amp; Views](/categories/templating)

timefinancehub/syntaxsanctuary
==============================

Una herramienta para generar programáticamente elementos HTML y estructuras de páginas web complejas con PHP.

v1.3.3(5mo ago)022MITPHPPHP &gt;=8.1

Since Nov 21Pushed 5mo agoCompare

[ Source](https://github.com/TimeFinanceHub/syntaxsanctuary)[ Packagist](https://packagist.org/packages/timefinancehub/syntaxsanctuary)[ RSS](/packages/timefinancehub-syntaxsanctuary/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (2)Versions (22)Used By (0)

SyntaxSanctuary
===============

[](#syntaxsanctuary)

SyntaxSanctuary is a PHP project for programmatically generating HTML elements. It provides a collection of classes that represent HTML tags, allowing you to build complex HTML structures in an object-oriented way.

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

[](#installation)

To create a new project using SyntaxSanctuary, run the following Composer command:

```
composer create-project timefinancehub/syntaxsanctuary your-project-name
```

This is the recommended way of installation as SyntaxSanctuary is a complete project, not a library.

Features
--------

[](#features)

- **Object-Oriented HTML Generation:** Create HTML elements as objects.
- **Component-Based Architecture:** Build complex UI components by composing smaller elements.
- **Flexible and Extensible:** Easily create your own custom components.
- **XSS Protection:** Automatic content escaping to prevent cross-site scripting attacks.

New Classes for Page Composition
--------------------------------

[](#new-classes-for-page-composition)

This library now includes a set of classes designed to build a complete HTML page from scratch.

- `Html`: A versatile base class to create any HTML element.
- `Meta`, `Link`, `Style`: Classes to generate the corresponding tags in the `` section.
- `Head`: Assembles the entire `` section of the page.
- `Tituloh1`, `H`, `Parrafo`: Classes for creating heading and paragraph tags.
- `Card`: A reusable component for creating content cards.
- `Header`, `Content`, `Footer`: Classes that represent the main semantic sections of a page.
- `Body`: Assembles the `` of the page.
- `Page`: The main class that puts everything together to generate the final HTML document.

How to Use
----------

[](#how-to-use)

Here is an example of how to use the new page composition classes to build a complete web page:

```
