Skip to content
View phpfui's full-sized avatar
Block or Report

Block or report phpfui

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Add an optional note:
Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
phpfui/README.md

PHPFUI Tests Latest Packagist release

PHP Wrapper for the Foundation CSS Framework

PHPFUI, PHP Foundation User Interface, is a modern PHP library that produces HTML formated for Foundation. It does everything you need for a fully functional Foundation page, with the power of an OO language. It currently uses Foundation 6.6.

"I was surprised that people were prepared to write HTML. In my initial requirements for this thing, I had assumed, as an absolute pre-condition, that nobody would have to do HTML or deal with URLs. If you use the original World Wide Web program, you never see a URL or have to deal with HTML. You're presented with the raw information. You then input more information. So you are linking information to information--like using a word processor. That was a surprise to me--that people were prepared to painstakingly write HTML."

Sir Tim Berners-Lee, inventor of the World Wide Web

Using PHPFUI for view output will produce 100% valid HTML and insulate you from future changes to Foundation, your custom HMTL layouts, CSS and JS library changes. You write to an abstract concept (I want a checkbox here), and the library will output a checkbox formatted for Foundation. You can inherit from CheckBox and add your own take on a checkbox, and when the graphic designer decides they have the most awesome checkbox ever, you simply change your CheckBox class, and it is changed on every page system wide.

Don't write HTML by hand!

Usage

namespace PHPFUI;
$page = new Page();
$form = new Form($page);
$fieldset = new FieldSet('A basic input form');
$time = new Input\Time($page, 'time', 'Enter A Time in 15 minute increments');
$time->setRequired();
$date = new Input\Date($page, 'date', 'Pick A Date');
$fieldset->add(new MultiColumn($time, $date));
$fieldset->add(new Input\TextArea('text', 'Enter some text'));
$fieldset->add(new Submit());
$form->add($fieldset);
$page->add($form);
$page->addStyleSheet('/css/styles.css');
echo $page;

Installation Instructions

composer require phpfui/phpfui

Then run update.php from the vendor/phpfui/phpfui directory and supply the path to your public directory / the directory for the various JS and CSS files PHPFUI uses. This will copy all required public files into your public directory. For example:

php vendor/phpfui/phpfui/update.php public/PHPFUI

The PHPFUI library defaults to your-public-directory/PHPFUI, it can be overridden, but it is suggested to use PHPFUI to keep everything in one place. update.php should be run when ever you update PHPFUI.

Versioning

Versioning will match the Foundation versions for Major semantic versions. PHPUI will always support the most recent version of Foundation possible for the Major version. PHPFUI Minor version will include breaking changes and may incorporate changes for the latest version of Foundation. The PHPFUI Patch version will include non breaking changes or additions. So PHPFUI Version 6.0.0 would be the first version of the library, 6.0.1 would be the first patch of PHPFUI. Both should work with any Foundation 6.x version. PHPFUI 6.1.0 will track PHP 7.4 - 8.1, 6.2.0 will track 8.0 - 8.2, but both will still track Foundation 6.x. PHPFUI 7.0.0 would track Foundation 7.x series on currently supported versions of PHP.

Depreciation and Foundation changes

Since major versions of Foundation have in the past depreciated and obsoleted things, PHPFUI will track the latest version of Foundation for class names and functionality. However, when Foundation makes a breaking change or removes something, PHPFUI will continue to support the old functionality as best as possible in the new Foundation framework. Depreciated classes will be put in the \PHPFUI\Vx namespace (where x would be the prior Major Foundation version containing that feature). So if something gets depreciated in a newer version of Foundation, you simply will need to change your code from \PHPFUI\Example to \PHPFUI\V6\Example. The depreciated namespace will only be supported for one Major version of PHPFUI, so it is recommended you migrate off of it in a timely manor.

Full Class Documentation

PHPFUI/InstaDoc

Live Examples

Via PHPFUI/Examples

Unit Testing

Full unit testing using phpfui/html-unit-tester

License

PHPFUI is distributed under the MIT License.

PHP Versions

This library only supports modern versions of PHP which still receive security updates. While we would love to support PHP from the late Ming Dynasty, the advantages of modern PHP versions far out weigh quaint notions of backward compatibility. Time to upgrade.

Popular repositories

  1. ConstantContact ConstantContact Public

    PHP 15 6

  2. icalendar icalendar Public

    Forked from ZContent/icalendar

    Library for reading and writing iCalendar files in PHP

    PHP 8 7

  3. phpfui phpfui Public

    A PHP wrapper for the Zurb Foundation responsive front-end framework

    PHP 7 1

  4. InstaDoc InstaDoc Public

    Instant PHP Documentation pages

    PHP 6 1

  5. MySQLSlowQueryParser MySQLSlowQueryParser Public

    PHP MySQL Slow Query Parser

    PHP 4 4

  6. HTMLUnitTester HTMLUnitTester Public

    PHPUnit Testing extensions for HMTL and CSS

    PHP 3 1

974 contributions in the last year

2 contributions on December 11th.1 contribution on December 18th.No contributions on December 25th.1 contribution on January 1st.1 contribution on January 8th.2 contributions on January 15th.No contributions on January 22nd.No contributions on January 29th.3 contributions on February 5th.1 contribution on February 12th.2 contributions on February 19th.No contributions on February 26th.No contributions on March 5th.No contributions on March 12th.6 contributions on March 19th.No contributions on March 26th.2 contributions on April 2nd.No contributions on April 9th.2 contributions on April 16th.1 contribution on April 23rd.9 contributions on April 30th.1 contribution on May 7th.No contributions on May 14th.1 contribution on May 21st.1 contribution on May 28th.1 contribution on June 4th.No contributions on June 11th.No contributions on June 18th.1 contribution on June 25th.1 contribution on July 2nd.3 contributions on July 9th.1 contribution on July 16th.No contributions on July 23rd.No contributions on July 30th.No contributions on August 6th.3 contributions on August 13th.No contributions on August 20th.1 contribution on August 27th.No contributions on September 3rd.No contributions on September 10th.No contributions on September 17th.No contributions on September 24th.No contributions on October 1st.No contributions on October 8th.No contributions on October 15th.No contributions on October 22nd.2 contributions on October 29th.No contributions on November 5th.No contributions on November 12th.2 contributions on November 19th.2 contributions on November 26th.No contributions on December 3rd.No contributions on December 10th.4 contributions on December 12th.3 contributions on December 19th.6 contributions on December 26th.3 contributions on January 2nd.4 contributions on January 9th.3 contributions on January 16th.1 contribution on January 23rd.No contributions on January 30th.4 contributions on February 6th.1 contribution on February 13th.1 contribution on February 20th.No contributions on February 27th.1 contribution on March 6th.No contributions on March 13th.14 contributions on March 20th.2 contributions on March 27th.6 contributions on April 3rd.6 contributions on April 10th.6 contributions on April 17th.4 contributions on April 24th.3 contributions on May 1st.7 contributions on May 8th.No contributions on May 15th.9 contributions on May 22nd.No contributions on May 29th.7 contributions on June 5th.2 contributions on June 12th.8 contributions on June 19th.6 contributions on June 26th.1 contribution on July 3rd.11 contributions on July 10th.4 contributions on July 17th.2 contributions on July 24th.5 contributions on July 31st.1 contribution on August 7th.3 contributions on August 14th.1 contribution on August 21st.1 contribution on August 28th.No contributions on September 4th.No contributions on September 11th.10 contributions on September 18th.No contributions on September 25th.9 contributions on October 2nd.1 contribution on October 9th.1 contribution on October 16th.No contributions on October 23rd.5 contributions on October 30th.1 contribution on November 6th.1 contribution on November 13th.1 contribution on November 20th.3 contributions on November 27th.5 contributions on December 4th.8 contributions on December 11th.7 contributions on December 13th.17 contributions on December 20th.15 contributions on December 27th.10 contributions on January 3rd.6 contributions on January 10th.5 contributions on January 17th.3 contributions on January 24th.1 contribution on January 31st.No contributions on February 7th.7 contributions on February 14th.No contributions on February 21st.No contributions on February 28th.1 contribution on March 7th.1 contribution on March 14th.4 contributions on March 21st.No contributions on March 28th.8 contributions on April 4th.7 contributions on April 11th.7 contributions on April 18th.5 contributions on April 25th.6 contributions on May 2nd.4 contributions on May 9th.2 contributions on May 16th.2 contributions on May 23rd.2 contributions on May 30th.4 contributions on June 6th.5 contributions on June 13th.3 contributions on June 20th.2 contributions on June 27th.No contributions on July 4th.No contributions on July 11th.3 contributions on July 18th.4 contributions on July 25th.6 contributions on August 1st.1 contribution on August 8th.1 contribution on August 15th.1 contribution on August 22nd.No contributions on August 29th.No contributions on September 5th.No contributions on September 12th.5 contributions on September 19th.No contributions on September 26th.1 contribution on October 3rd.1 contribution on October 10th.3 contributions on October 17th.2 contributions on October 24th.2 contributions on October 31st.2 contributions on November 7th.2 contributions on November 14th.9 contributions on November 21st.4 contributions on November 28th.2 contributions on December 5th.4 contributions on December 12th.7 contributions on December 14th.12 contributions on December 21st.2 contributions on December 28th.1 contribution on January 4th.11 contributions on January 11th.5 contributions on January 18th.3 contributions on January 25th.No contributions on February 1st.1 contribution on February 8th.3 contributions on February 15th.2 contributions on February 22nd.2 contributions on March 1st.No contributions on March 8th.No contributions on March 15th.4 contributions on March 22nd.4 contributions on March 29th.12 contributions on April 5th.6 contributions on April 12th.8 contributions on April 19th.7 contributions on April 26th.4 contributions on May 3rd.2 contributions on May 10th.10 contributions on May 17th.No contributions on May 24th.4 contributions on May 31st.4 contributions on June 7th.8 contributions on June 14th.7 contributions on June 21st.7 contributions on June 28th.4 contributions on July 5th.6 contributions on July 12th.No contributions on July 19th.No contributions on July 26th.3 contributions on August 2nd.No contributions on August 9th.3 contributions on August 16th.2 contributions on August 23rd.1 contribution on August 30th.No contributions on September 6th.No contributions on September 13th.No contributions on September 20th.3 contributions on September 27th.No contributions on October 4th.No contributions on October 11th.No contributions on October 18th.2 contributions on October 25th.No contributions on November 1st.No contributions on November 8th.2 contributions on November 15th.1 contribution on November 22nd.2 contributions on November 29th.4 contributions on December 6th.1 contribution on December 13th.3 contributions on December 15th.11 contributions on December 22nd.2 contributions on December 29th.2 contributions on January 5th.11 contributions on January 12th.4 contributions on January 19th.No contributions on January 26th.1 contribution on February 2nd.2 contributions on February 9th.No contributions on February 16th.6 contributions on February 23rd.2 contributions on March 2nd.1 contribution on March 9th.1 contribution on March 16th.1 contribution on March 23rd.5 contributions on March 30th.4 contributions on April 6th.3 contributions on April 13th.8 contributions on April 20th.3 contributions on April 27th.6 contributions on May 4th.6 contributions on May 11th.3 contributions on May 18th.No contributions on May 25th.2 contributions on June 1st.4 contributions on June 8th.2 contributions on June 15th.6 contributions on June 22nd.4 contributions on June 29th.2 contributions on July 6th.7 contributions on July 13th.1 contribution on July 20th.1 contribution on July 27th.3 contributions on August 3rd.1 contribution on August 10th.9 contributions on August 17th.No contributions on August 24th.No contributions on August 31st.No contributions on September 7th.No contributions on September 14th.1 contribution on September 21st.2 contributions on September 28th.No contributions on October 5th.No contributions on October 12th.2 contributions on October 19th.3 contributions on October 26th.2 contributions on November 2nd.No contributions on November 9th.6 contributions on November 16th.10 contributions on November 23rd.4 contributions on November 30th.3 contributions on December 7th.No contributions on December 14th.1 contribution on December 16th.4 contributions on December 23rd.13 contributions on December 30th.7 contributions on January 6th.7 contributions on January 13th.No contributions on January 20th.No contributions on January 27th.No contributions on February 3rd.No contributions on February 10th.No contributions on February 17th.No contributions on February 24th.1 contribution on March 3rd.7 contributions on March 10th.4 contributions on March 17th.1 contribution on March 24th.3 contributions on March 31st.4 contributions on April 7th.9 contributions on April 14th.3 contributions on April 21st.20 contributions on April 28th.3 contributions on May 5th.10 contributions on May 12th.3 contributions on May 19th.No contributions on May 26th.1 contribution on June 2nd.1 contribution on June 9th.1 contribution on June 16th.1 contribution on June 23rd.2 contributions on June 30th.1 contribution on July 7th.1 contribution on July 14th.No contributions on July 21st.No contributions on July 28th.2 contributions on August 4th.No contributions on August 11th.7 contributions on August 18th.2 contributions on August 25th.1 contribution on September 1st.1 contribution on September 8th.No contributions on September 15th.No contributions on September 22nd.2 contributions on September 29th.No contributions on October 6th.2 contributions on October 13th.25 contributions on October 20th.No contributions on October 27th.2 contributions on November 3rd.1 contribution on November 10th.3 contributions on November 17th.No contributions on November 24th.1 contribution on December 1st.2 contributions on December 8th.1 contribution on December 17th.11 contributions on December 24th.No contributions on December 31st.1 contribution on January 7th.1 contribution on January 14th.No contributions on January 21st.No contributions on January 28th.2 contributions on February 4th.2 contributions on February 11th.2 contributions on February 18th.No contributions on February 25th.1 contribution on March 4th.2 contributions on March 11th.1 contribution on March 18th.5 contributions on March 25th.8 contributions on April 1st.1 contribution on April 8th.2 contributions on April 15th.3 contributions on April 22nd.6 contributions on April 29th.2 contributions on May 6th.2 contributions on May 13th.No contributions on May 20th.No contributions on May 27th.No contributions on June 3rd.No contributions on June 10th.No contributions on June 17th.No contributions on June 24th.No contributions on July 1st.No contributions on July 8th.No contributions on July 15th.No contributions on July 22nd.No contributions on July 29th.No contributions on August 5th.No contributions on August 12th.No contributions on August 19th.No contributions on August 26th.No contributions on September 2nd.No contributions on September 9th.No contributions on September 16th.1 contribution on September 23rd.3 contributions on September 30th.No contributions on October 7th.1 contribution on October 14th.2 contributions on October 21st.No contributions on October 28th.No contributions on November 4th.No contributions on November 11th.No contributions on November 18th.No contributions on November 25th.No contributions on December 2nd.No contributions on December 9th.
Contribution Graph
Day of Week December January February March April May June July August September October November December
Sunday
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
Less
No contributions.
Low contributions.
Medium-low contributions.
Medium-high contributions.
High contributions.
More

Activity overview

Contributed to phpfui/BicycleClubWebsite2023, phpfui/PHPFUIWebsite, phpfui/ORM and 33 other repositories
A graph representing phpfui's contributions from December 11, 2022 to December 14, 2023. The contributions are 96% commits, 4% pull requests, 0% code review, 0% issues.

Contribution activity

Seeing something unexpected? Take a look at the GitHub profile guide.