PHPackages                             phpwine/optimizedhtml - 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. phpwine/optimizedhtml

ActiveLibrary

phpwine/optimizedhtml
=====================

HTML Frontend Framework Design for backend OptimizedHTML PHPWine written in PHP (Hypertext Preprocessor)

v2.2.2(2y ago)4641MITPHPPHP &gt;=8.0

Since Jun 9Pushed 2y ago1 watchersCompare

[ Source](https://github.com/PHPWine/PHPWine)[ Packagist](https://packagist.org/packages/phpwine/optimizedhtml)[ Docs](https://phpwine.github.io/documents/)[ RSS](/packages/phpwine-optimizedhtml/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (7)DependenciesVersions (18)Used By (0)

[![](https://camo.githubusercontent.com/b8cadaa967891081f8f165695470689986c028821dd8a040132f6e661795dc0d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c7565)](https://camo.githubusercontent.com/b8cadaa967891081f8f165695470689986c028821dd8a040132f6e661795dc0d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c7565) [![Maintenance](https://camo.githubusercontent.com/5ca62441414bacaa54c6c6e5b68e46c76305947b6bf498c4949fc71c1b4b10dd/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4d61696e7461696e65642533462d7965732d677265656e2e737667)](https://github.com/PHPWine/PHPWine/graphs/commit-activity) [![GitHub Release](https://camo.githubusercontent.com/67a7aa5222d118700a840c1422c56913f587ea00f37728e9dbbdf7941fecb1e8/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f50485057696e652f50485057696e652e7376673f7374796c653d666c6174)](https://github.com/PHPWine/PHPWine/releases) [![Packagist Version (custom server)](https://camo.githubusercontent.com/ecd257cffff4a20341d3a769c2601c74c8b4fcc91384d779aa4e22354bf26fea/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f70687077696e652f6f7074696d697a656468746d6c3f636f6c6f723d6f72616e6765)](https://camo.githubusercontent.com/ecd257cffff4a20341d3a769c2601c74c8b4fcc91384d779aa4e22354bf26fea/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f70687077696e652f6f7074696d697a656468746d6c3f636f6c6f723d6f72616e6765) [![GitHub Release Date](https://camo.githubusercontent.com/015166618c7272cfaed40d4bb864caa1cd20682af5f14f10e30d9188a95f7c96/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652d646174652f50485057696e652f50485057696e65)](https://camo.githubusercontent.com/015166618c7272cfaed40d4bb864caa1cd20682af5f14f10e30d9188a95f7c96/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652d646174652f50485057696e652f50485057696e65) [![GitHub code size in bytes](https://camo.githubusercontent.com/c2de8b691e8bc6a8d81daf5e35090aac4fb65f25be86409a9e9649cc362d1c9a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f636f64652d73697a652f50485057696e652f50485057696e65)](https://camo.githubusercontent.com/c2de8b691e8bc6a8d81daf5e35090aac4fb65f25be86409a9e9649cc362d1c9a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f636f64652d73697a652f50485057696e652f50485057696e65) [![GitHub repo size](https://camo.githubusercontent.com/d33d7d79f155d4b8eba38390c9e0322dccf8f2057fd4ed8da0c7f5bf42cfdbaf/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7265706f2d73697a652f50485057696e652f50485057696e65)](https://camo.githubusercontent.com/d33d7d79f155d4b8eba38390c9e0322dccf8f2057fd4ed8da0c7f5bf42cfdbaf/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7265706f2d73697a652f50485057696e652f50485057696e65) [![Maintainer](https://camo.githubusercontent.com/75ae58c10d2150ab885ce73c02fb9965da45d4fce3e0f6c17afa3b6763b7ae7d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6d61696e7461696e65722d6e69656c736f66666963652d677265656e)](https://camo.githubusercontent.com/75ae58c10d2150ab885ce73c02fb9965da45d4fce3e0f6c17afa3b6763b7ae7d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6d61696e7461696e65722d6e69656c736f66666963652d677265656e) [![GitHub last commit](https://camo.githubusercontent.com/fa4ecd592ce589af200c0e235e41e75b9e386d99818e04145a39139c6ec7f1ca/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f50485057696e652f50485057696e65)](https://camo.githubusercontent.com/fa4ecd592ce589af200c0e235e41e75b9e386d99818e04145a39139c6ec7f1ca/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f50485057696e652f50485057696e65) [![Ask Me Anything !](https://camo.githubusercontent.com/f58000eb7d904f735fbbca30835a588c716bdde0781156f1fb2e601d44307a3a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f41736b2532306d652d616e797468696e672d3161626339632e737667)](https://github.com/PHPWine/PHPWine/issues/new) [![Issues](https://camo.githubusercontent.com/0e81533884cf2752c0cca91cf4ca6ffc45fd7777f0c59c330fe5e2d4e85cd631/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732d7261772f50485057696e652f50485057696e652e7376673f6d61784167653d3235303030)](https://github.com/PHPWine/PHPWine/issues)

PHPWine (OptimizedHtml)
=======================

[](#phpwine-optimizedhtml)

HTML Frontend Framework Design for Backend OptimizedHTML PHPWine written in PHP (Hypertext Preprocessor).

PHPWine doesn't force developers not to use native HTML, in fact if you feel super comfortable with native HTML you can stick to it, the main goal is to lessen, minimize, optimize, and organize both HTML and workload.

There are a lot of ways to use Wine but I highly recommend using OOP for HTML applications with Doctrine and Components, through that you can easily add and update HTML that separates from your data.

**DOCTRINE:** This files and classes is the main source where the data are being used multiple times in single or different pages, for instance, your branding source file. That is possible to use in the main header and footer or menu arrays of data that are used both in the navigation and footer section you can store them in doctrine properties and send back to your hooks as your arguments.  *In addition Doctrine is powerful enough to handle the visibility of elements based of the specific screen size you set, especially using the reserved key "those" Those having the class you assigned the visibility will respond based on your doctrine declaration.*

**APPS:** These are the main public classes that will invoke in public pages that display HTML and data to browser, With these files and classes you will prepared the layout of your HTML application base on your key hooks for column or columns and xrow or xrows as the HTML is not visible to you at least you have a proper pointers that human-readable that can help you to analyze your codes in php to HTML.

**COMPONENTS:** These are HTML that hold data information from your controller or classes like ul, li, img files that take care of specific data. most of the time this is an inner second or third child of HTML and data.

In addition: I don't recommend wine having more of a third child HTML in case I highly recommend to add a hook and creating a new method for the value of that child.

```
 // Structure
 views
  |- Apps
  |- Components
  |- Doctrines
```

```
/* Installation via composer */
/* required version *v2.2.2 */
composer require phpwine/optimizedhtml v2.2.2
```

```
 /** Local file PHPWine **/
 require_once __DIR__ . '/vendor/autoload.php';

 new \PHPWineOptimizedHtml\OptimizedHtml;
```

```
// Function Hooks @since v2.0
wine(
  string $tag = '',
  string|callable|array $content = [],
  string|array $attr = []
  array $hooks = []
);

source: https://github.com/PHPWine/PHPWine/blob/main/src/wine/hooks/wine.php
```

```
// Function Hooks @since v2.0
wcleared()
Source: https://github.com/PHPWine/PHPWine/blob/main/src/wine/hooks/wcleared.php

wine_doctrine_init();
Source: https://github.com/PHPWine/PHPWine/blob/main/src/wine/hooks/wine_doctrine_init.php
```

```
// Method Hooks @since v2.0
attr(
  object|string $class = null,
  string|callable $call_back = null,
  mixed ...$attr
);

source: https://github.com/PHPWine/PHPWine/blob/main/src/wine/hooks/attr.php
```

```
// Method Hooks @since v2.0
magic(
 object|string $class = null,
 string|callable $call_back = null,
 mixed ...$current_value
);

source: https://github.com/PHPWine/PHPWine/blob/main/src/wine/hooks/magic.php
```

```
// Method Hooks @since v2.0
value(
 object|string|null $class = null,
 string|callable|null $call_back = null,
 mixed ...$args
);

source: https://github.com/PHPWine/PHPWine/blob/main/src/wine/hooks/value.php
```

Collections :
 [Quick Start ](https://phpwine.github.io/documents/#w_quickstart)
 [ WP WineWPMenuWalker (Custom Menu w/Hooks) @since v2.0 ](https://github.com/PHPWine/WineWPMenuWalker)
 [ WineAccordion @since v2.2.0 ](https://github.com/PHPWine/WineAccordion)
 [ WineTab @since v2.2.0 ](https://github.com/PHPWine/WineTab)
 [ WinePopup @since v2.2.0 ](https://github.com/PHPWine/WinePopup)

 New :

```
// New in v2.0 soon Hooks
echo wine(h1,'Hello World', [ id => 'wine_id'], $hooks = [
  ['top_your_hook_name_add_html_top',[ $one = 2, $two = 4] ],
  ['bottom_your_hook_name_add_html_bottom',[ $one = 'A', $two = 'B']]
 ]
);

// You can now | Using key "string" top_ OR bottom_ followed by your hook name ...
// ex. [  bottom_your_hook_name_add_html_bottom, [ $argu_1, .... ] ]
$hooks = [
 ['bottom_your_hook_name_add_html_bottom',[ $one = 'A', $two = 'B']] /* this will display in the bottom element html */
]
```

```
@since v1.4.0 OptimizedHtml
$this->wine::child => [
/*  ['div', $this->wine::value=>[ $this->wine->value((new Branding),'component_top_logo_header')]], this still works anyway */
    ['div', $this->wine::value=>[ $this->wine->value(MenuList::class,'component_top_right_menu', $this->links ) ]]
  ]
 ]);
```

Features :
 `@since v1.3.9 later(); no object require, call back function hook`
Logs :
 `v2.2.2 [FIXED] : Doctrine namespace to Doctrine from doctrine | 09.12.2023`
 `v2.2.1 [FIXED] : Dynamic prefix accordion | 08.12.2023`
 `v1.3.8 [FIXED] : Class name attribute space child array | 08.11.2023`

---

Thanks To:
----------

[](#thanks-to)

##### Github : To allow me to upload my PHP Library PHPWine Vanilla Flavour to repository
 php.net : The opportunity to develop web applications using corePHP - PHPFrameworks

[](#github--to-allow-me-to-upload-my-php-library-phpwine-vanilla-flavour-to-repository-phpnet--the-opportunity-to-develop-web-applications-using-corephp---phpframeworks)

**LICENSE BY MIT**

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

---

Would you like me to treat a cake and coffee ?
Become a donor, Because with you! We can build more... Donate:
GCash : +639650332900
Paypal account:

---

Thanks and good luck!

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 99.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~34 days

Recently: every ~4 days

Total

17

Last Release

891d ago

Major Versions

v1.5.0 → v2.02023-11-23

PHP version history (2 changes)v1.4.0.0PHP &gt;=8.0

v1.2.9bPHP &gt;=8.0.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/1a6a90f90c3558fee183c4a1ab010977318a0f9af516a28a56a06eb9b2be4a21?d=identicon)[nielsofficeofficial](/maintainers/nielsofficeofficial)

---

Top Contributors

[![nielsoffice](https://avatars.githubusercontent.com/u/67406593?v=4)](https://github.com/nielsoffice "nielsoffice (215 commits)")[![nielsoffice-Pro](https://avatars.githubusercontent.com/u/172331875?v=4)](https://github.com/nielsoffice-Pro "nielsoffice-Pro (1 commits)")

---

Tags

code-designerhtmlhtml5optimizationoptimizerphp8phplibraryphpvanillahtmloptimizerphplibrary

### Embed Badge

![Health badge](/badges/phpwine-optimizedhtml/health.svg)

```
[![Health](https://phpackages.com/badges/phpwine-optimizedhtml/health.svg)](https://phpackages.com/packages/phpwine-optimizedhtml)
```

###  Alternatives

[ezyang/htmlpurifier

Standards compliant HTML filter written in PHP

3.3k327.6M445](/packages/ezyang-htmlpurifier)[phpoffice/phpword

PHPWord - A pure PHP library for reading and writing word processing documents (OOXML, ODF, RTF, HTML, PDF)

7.6k34.7M186](/packages/phpoffice-phpword)[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[league/html-to-markdown

An HTML-to-markdown conversion helper for PHP

1.9k28.6M199](/packages/league-html-to-markdown)[picqer/php-barcode-generator

An easy to use, non-bloated, barcode generator in PHP. Creates SVG, PNG, JPG and HTML images from the most used 1D barcode standards.

1.8k25.5M88](/packages/picqer-php-barcode-generator)[soundasleep/html2text

A PHP script to convert HTML into a plain text format

48519.5M75](/packages/soundasleep-html2text)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
