Download the PHP package lum/lum-core without Composer

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

lum.core.php

Summary

A small class with a singleton instance that can be used to manage the lifecycle of a PHP application, acting as a director for models, controllers, and views.

It also supports additional plugins that have a ton of extra functionality.

Despite the name of the package and class, this is not in fact the singular core library that everything else in the Lum.php collections builds upon. It used to be in the 1.x days, but has since become just the App Director singleton class. See lum-compat for the true fundamental core class that the whole PHP library set uses.

Classes

Class Description
Lum\Core The Core class itself.
Lum\Plugins\Capture A helper for capturing PHP output.
Lum\Plugins\Controllers A plugin for loading controllers.
Lum\Plugins\Instance A base class for loading class instances.
Lum\Plugins\Models A plugin for loading models.
Lum\Plugins\Plugins A meta-plugin for loading plugins.
Lum\Plugins\Sess A plugin for managing PHP Sessions.
Lum\Plugins\Views A plugin for loading views.

Traits

Trait Description
Lum\Loader\Content A loader trait for parsing PHP content.
Lum\Loader\Files A loader trait for finding files in a folder.
Lum\Loader\Instance A loader trait for creating an object instance.
Lum\Loader\Namespaces A loader trait for finding classes in namespaces.

Note on Plugins

Prior to v3.0 most of the additional plugins were included in the core package itself, but I decided that it made more sense to split them off into their own packages. A suggested lum-core-plugins meta-package will be available to install all of the plugins that used to be included in this package.

Creating a Core instance

You only need to do this once in your application, generally right at the beginning (either at the very top of the main PHP script, or right after a namespace declaration if the script itself is inside a PHP Namespace.)

The first line is a standard for anything using Composer, and the second line is a compatibility function from lum-compat that allows the use of classic SPL autoloading along side Composer autoloading.

The last line is the one that actually creates the singleton instance.

You cannot use the new \Lum\Core() style constructor with this class. The constructor is protected and can only be called via getInstance().

Getting the current Core instance

Any time you need the Core, you simply call the getInstance() method.

Since this is using a singleton instance, it will always return the same object no matter where or how many times it is called.

Using plugins

The plugins are loaded automatically when first called. For instance:

The above example is written assuming lum-core-plugins is also installed, as the conf and router plugins have been split into their own packages and are no longer included by default, but lum-core-plugins includes all of the split-off plugins.

Official URLs

This library can be found in two places:

Author

Timothy Totten

License

MIT


All versions of lum-core with dependencies

PHP Build Version
Package Version
Requires lum/lum-compat Version ^2.6
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 lum/lum-core contains the following files

Loading the files please wait ....