Download the PHP package timefinancehub/syntaxsanctuary without Composer
On this page you can find all versions of the php package timefinancehub/syntaxsanctuary. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download timefinancehub/syntaxsanctuary
More information about timefinancehub/syntaxsanctuary
Files in timefinancehub/syntaxsanctuary
Package syntaxsanctuary
Short Description Una descripción concisa de lo que hace tu librería.
License MIT
Informations about the package 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
To create a new project using SyntaxSanctuary, run the following Composer command:
This is the recommended way of installation as SyntaxSanctuary is a complete project, not a library.
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
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<head>section.Head: Assembles the entire<head>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<body>of the page.Page: The main class that puts everything together to generate the final HTML document.
How to Use
Here is an example of how to use the new page composition classes to build a complete web page:
This will generate a complete HTML5 page with the specified title, metadata, and styles. The body of the page is pre-defined with the layout you provided.
Development
Dependencies
This project uses Composer to manage dependencies. To install the dependencies, run:
Testing
The project uses PHPUnit for testing. To run the test suite, execute the following command:
This will run all the tests in the tests directory and provide a report of the results.
Contributing
Contributions are welcome! Please feel free to submit a pull request or open an issue.
License
This project is licensed under the MIT License. See the LICENSE file for details.