Download the PHP package dneustadt/majima without Composer

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

majima

Scrutinizer Join the chat at https://gitter.im/majima-framework/Lobby

majima is a lightweight PHP framework that is based on Symfony components. It features a plugin system that relies heavily on the concept of dependency injection and should suffice as a foundation for most web applications.

Features

Server requirements

Required PHP extensions

Installation

1.) Clone the git repository to the desired location using:

git clone https://github.com/dneustadt/majima.git

or use composer

composer require dneustadt/majima

2.) Set the correct directory permissions:

chmod -R 755 var
chmod -R 755 web
chmod -R 755 upload

3.) Install dependencies from the same directory

composer install

4.) Create a new MySQL database

5.) Run the majima installation script by accessing the URL in a web browser. This should be the URL where you uploaded the majima files.

Plugins

For a real life examples see the demo plugins:

To create a new plugin first make a new directory under the plugins directory. In this example it will be MyPlugin. Create a new class MyPlugin.php within that new directory. The name of the file must match the name of the containing folder.

By extending PluginAbstract you will gain access to the ContainerBuilder reference

$this->container // returns instance of ContainerBuilder

Example of a Plugin class:

Return an integer for the priority in which order plugins should be loaded. default is 1

Returns the version of the plugin. default is 1.0.0. If the version is newer than what is saved in the database, the method update() will be called.

Do something if the plugin isn't registered in database yet, e.g. create tables.

Use this method and $this->container to add compiler passes, set container services or parameters.

Use this method to register new controllers or decorate existing ones. Since the id majima.admin_controller is already set, the service for that controller will be decorated. The new id for the decorated service will then be prepended by snake case of the plugin class name, so in this case it would be my_plugin.majima.admin_controller

Enhance the routes to actions of controllers for the routing. The name/id of a route, e.g. myPlugin_index, will also determine, where the view for that action will be looked for. Underscores will be converted to slashes and the first letter will be capitalized. So in this example majima would look for a template MyPlugin/index.tpl

Collect views for routes and assets for compilation. Assets can be separated for use in frontend and backend context (when user is logged in).

Controller Example

By extending MajimaController you will gain access to the following references

$this->container //returns instance of DependencyInjection\Container
$this->dbal //returns instance of FluentPDO
$this->engine //returns instance of Dwoo\Core

FluentPDO is a query builder
Dwoo is the template engine of majima
Use assign to pass an array of data to views.

If the route to the action can be resolved as a path to a template (see above), you don't have to return anything in your action. If you're outside of the conventions, you can render a template and return a response yourself:

Template functions

Adding to Dwoo's own functions majima introduces a few more:

{inherits "Index/index.tpl"}

Virtually the same as Dwoo's extends but allows you to inherit templates from the majima's base HTML bootstrap and views of previously loaded plugins.

{url "index_index" array('foo' => $bar)}

Will generate the url of a registered route. Optionally pass an array of GET parameters.

{link "/web/css/style.min.css", $.cache_buster}

Get the absolute path to an asset. Optionally pass a cache buster value. You can use the global $.cache_buster which will be regenerated once the cache is emptied.


All versions of majima with dependencies

PHP Build Version
Package Version
Requires symfony/http-foundation Version ^3.2
symfony/http-kernel Version ^3.2
symfony/config Version ^3.2
symfony/dependency-injection Version ^3.2
symfony/framework-bundle Version ^3.2
symfony/security Version ^3.2
symfony/security-bundle Version ^3.2
psr/log Version ^1.0
dwoo/dwoo Version ^1.3
fpdo/fluentpdo Version ^1.1
leafo/scssphp Version ^0.6.7
patchwork/jsqueeze Version ^2.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 dneustadt/majima contains the following files

Loading the files please wait ....