Download the PHP package elefant/app-wires without Composer

On this page you can find all versions of the php package elefant/app-wires. 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 app-wires

Wires

Inspired by Laravel Livewire, this app provides simple template extensions for the Elefant CMS that wires any handler and its view template up to Alpine.js, providing a few interesting features:

Installation

Via composer:

Usage

Here's how it works:

In your handler (apps/myapp/handlers/example.php):

Then in your accompanying view template (apps/myapp/views/example.html):

Alternately, you can modify the response data on the server-side before returning it:

And in case of an error on the server, you can use:

Behind the scenes, the <div {{_wire_}}> connects Alpine.js to the template data.

If you want to define your own functions for use with Alpine.js, you can initialize the component like this instead, using the {{_wire_data_}} tag:

In addition to {{_wire_}} and {{_wire_data_}}, three custom tags can be used to connect buttons, inputs, and links to make API calls to the same endpoint:

Other features of Alpine.js should work just the same too, although loops should use pure Alpine.js instead of Elefant's template syntax for looping. For example:

Can be connected like this:

Modifying the list on either the client or the server will update the displayed list of elements.

Convenience methods

Wires defines two additional convenience methods for communicating with the server:

The first serializes and sends the entire component state, while the second only sends the specific data that it's given.

These can be used to send the updated component state to the server for storage and additional processing after modifying it locally.

Example usage:

Using this.send(params), you could also send just the item that changed, which you would also need to check for on the server-side.

Demos

Once you've installed this app, go to /wires/demos in your Elefant CMS installation and log in as a site administrator to see some working demos.

You can inspect the source code for the demos under apps/wires/handlers/demos and apps/wires/views/demos in your Elefant CMS installation.


All versions of app-wires with dependencies

PHP Build Version
Package Version
Requires elefant/app-installer Version *
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 elefant/app-wires contains the following files

Loading the files please wait ....