Download the PHP package bvdputte/kirby-vpkit without Composer

On this page you can find all versions of the php package bvdputte/kirby-vpkit. 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 kirby-vpkit

Virtual pages helper kit for multilingual Kirby 3

Opinionated boilerplate helper to make it easier to work with virtual pages in a multilingual kirby 3 setup.

By default virtual pages in a multilingual Kirby environment require some additional, repetitive work. This plugin is an attempt to keep it DRY, and it also takes care of some other niceties such as caching to avoid hammering your backend.

Installation

Setup

  1. Add a configuration array to your config.php that contains following keys:
    1. fetch: a closure (function) that returns an array as example below. This will be used to generate the virtual pages.
    2. parentUid: The ID of the parent page where the virtual pages will be put
    3. template: The template you want for the virtual pages
  2. Create a model for template to site/models and reuse the children() method to return the virtual pages with this plugin's helper
  3. Create a template that matches the given template-name to site/templates
  4. Done. Kirby should now use your added virtual pages as regular pages.

This plugin expects a configuration that returns data in the following form to convert into "virtual Kirby pages", e.g.:

Check the included demo folder in this repo for some examples.

Caching

Default

By default, each fetch is cached. This is so to avoid latency occuring when fetching data from the endpoint.\ If you don't want this, you can opt out via 'bvdputte.kirby-vpkit.cache' => false in config.php.

Each fetch will be cached by default for 1 minute.\ You can change this with 'bvdputte.kirby-vpkit.cache.timeout' => 60 in config.php (The value is in minutes).

Re-cache when backend is down

When cache is enabled, and your backend is down, this plugin will also continue to serve the already cached data instead of erroring. You can opt out this behaviour via 'bvdputte.kirby-vpkit.recache-on-fail' => false in config.php.\ The timeout for this cache is also 1 minute by default but can set via option: 'bvdputte.kirby-vpkit.recache-on-fail.timeout' => 30 in config.php (The value is also in minutes).

In this case, and if you have the kirby-log plugin installed, failed attempts will be logged.

Combine with pages cache

If you want to combine this with pages cache you'll need a strategy to invalidate the reinstantiate cache; a common strategy here is to use a worker via a cronjob. There's also a demo worker included in this repo. Or you could exclude your virtual pages from your page cache.

Caveats


All versions of kirby-vpkit with dependencies

PHP Build Version
Package Version
Requires getkirby/composer-installer Version ^1.1
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 bvdputte/kirby-vpkit contains the following files

Loading the files please wait ....