Download the PHP package nowise/uup-web-component without Composer

On this page you can find all versions of the php package nowise/uup-web-component. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package uup-web-component

UUP-WEB-COMPONENT - OOP approach on web components

This library provides web component classes for rendering HTML.

A component is a class that has both behavior and interface. The main classes are widget (standard components), element (simple HTML elements) and finally container (using template file). You can use these direct, but recommended is to use one of their sub-classes.

The easiest way to get started is to examine the code in the examples directory while watching the outcome in a web browser. It's recommended to open the project in i.e. NetBeans IDE to get autocomplete of property names. Start explore the container and widget classes.

The library is organized as:

UUP\Web\Component
    +-- Component           // Interface class
    +-- Transform           // Rendition transformer (callable)
    +-- Element             // Generic element component class
    +-- Container           // Generic container component class
    +-- Style               // Enum classes for inline CSS
    |     +-- Alignment
    |     +-- Border
    |     +-- Color
    |     +-- Font
    |    ...
    +-- Collection          // Collection support (i.e. attributes and events).
    |     +-- Attributes
    |     +-- Classes
    |     +-- Events
    |     +-- Stylesheet
    |     +-- Properties    // Generic properties
    |     +-- Collection    // Base class
    +-- Element             // Components with direct rendering (HTML elements)
    |     +-- Button
    |     +-- Span
    |     +-- List
    |     +-- Table
    |    ...
    +-- Widget              // Components with direct rendering (specialized objects)
    |     +-- Button
    |     +-- Combobox
    |     +-- Panel
    |    ...
    +-- Container           // Components using rendering template
          +-- Grid
          +-- Card
          +-- Download
          +-- Sitemap

All classes derived from element has access to the special properties class, event, props, style and attr that provides collection support. Settings in the props collection are transformed during rendering. Some of the collection has virtual sub collections that groups properties together:

Components contains properties and optional sub components. It's the job of the render transformer to generate HTML from component objects and rendition can be altered by passing the transformer to render() method or set a default transformer globally:

The reason for using a custom transformer could be to support themes, creating high-contrast styles or translation of text. It's up to you as the library user to decide how to use it, at the extreme you can bypass the builtin rendition and use the library classes as plain objects.

The default render transformer is paragon that produces HTML targetting the W3.CSS library from properties defined in component objects:

You can override this by passing an transform class instance to the render() method and modify classes:

Another option is to not using the component properties, but to use the collection properties instead:

For setting attributes that can't be used as property names (syntax violation on i.e. background-color), use the add() method instead:

You are not limited to setting individual properties. The class, event, attr and style properties all accepts an array:

For setting all at once, use the second argument during construction:

All components (element and containers) can contain other child components:

Calling render() on parent component automatic renders all child components. The rendition will take care of outputting them inside itself using their added order but after its own text (think inner HTML).

The scope of this library is not to provide a complete set of HTML element components. Neither does it care if nesting input elements inside an option element.

More

Visit the project page for more examples.


All versions of uup-web-component with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package nowise/uup-web-component contains the following files

Loading the files please wait ....