Download the PHP package codebjorn/mjolnir without Composer

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

Mjölnir, WordPress Utility Framework

GitHub release Generic badge

Mjölnir is small utility framework that gives utilities and possibilities to create WordPress plugins & themes using best of PHP. This package is compliant with PSR-1, PSR-2, PSR-4 and PSR-11.

If you think this approach is not working, please open an issue and let's discuss :)

Already made implementations

To see already made implementations please check official boilerplates:

Pre-Requirements

Before we proceed further:

  1. I suggest you to read documentation of PHP League Container.
    Mjölnir it uses as to provide Dependency Injection in your application.

  2. Also, if you will use default template engine, check documentation of BladeOne

Requirements

Requirements for this framework are:

Installation

You can install framework via composer:

Copy stubs from folder stubs to your folder, rename app folder if is need it and update {{namespace}} with application namespace

In a nutshell

Base of framework is dependency injection container, that stores some utility classes for: configuration, render, exception handling, hooks, blocks and all other services that you add and resolve, after all of that you add your service to hook.

As example, you have class that add some WP functionality PostTypes.php, you resolve all dependencies in ServiceProvider and after apply it to a hook

Utilities

To explain how utilities works, let's take a look to each namespace that has utilities

Admin

Admin namespace contains utilities for add new features on admin side:

  1. Option.php is a wrapper of functions related to Option Api, examples:

  2. Page.php is a wrapper for all functions related to creating a page in admin, examples:

Content

Content namespace contains utilities for creating different content solutions that WordPress has:

  1. PostType.php allows you easy to create different custom post types, example:

  2. Taxonomy.php allows you easy to create different taxonomies, example:

  3. Shortcode.php is a wrapper for functions related to Shortcode Api, example:

Database

Database namespace contains utilities for database interaction:

  1. Query.php is a wrapper for WP Query arguments

Routing

Routing namespace contains utilities related to routing system of WordPress such as Api:

  1. Api.php is a wrapper of all functions related to REST API, example:

Support

Support namespace contains utilities that will help you work with data:

  1. Arr.php is utility class that allows you to manipulate with array, examples:

  2. Collection.php is class for working with arrays of data, examples:

  3. Is.php is wrapper for functions to determine type of variable, examples:

  4. Str.php is class to manipulate with string, examples:

Utils

Utils namespace contains utilities for working with plugins and themes:

  1. Enqueue.php is wrapper of functions related to enqueue, example:

  2. Post.php is wrapper of WP_Post that gives better API to get post, example:

  3. Theme.php is wrapper of functions related to theme, example:

Facades

Facades are API that allows you to create a class that will get resolved class from container, check stubs/app/Facades to check default facades:

  1. Action.php give access to action hook, example:

  2. Filter.php give access to filter hook, example:

  3. Block.php give access to class related to block, example:

  4. Config.php give access to config files, example:

  5. View.php give access to view file for render, example:

Testing

//TODO

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of mjolnir with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
eftec/bladeone Version ^3.52
league/container Version ^3.3
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 codebjorn/mjolnir contains the following files

Loading the files please wait ....