phpwine/optimizedhtml

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

v2.2.2 2023-12-09 14:03 UTC

This package is auto-updated.

Last update: 2024-09-19 15:22:31 UTC


README

Maintenance GitHub Release Packagist Version (custom server) GitHub Release Date GitHub code size in bytes GitHub repo size Maintainer GitHub last commit Ask Me Anything ! Issues

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
WP WineWPMenuWalker (Custom Menu w/Hooks) @since v2.0
WineAccordion @since v2.2.0
WineTab @since v2.2.0
WinePopup @since v2.2.0


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:

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

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: syncdevprojects@gmail.com


Thanks and good luck!