Download the PHP package divineomega/thisishowirole without Composer

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

This Is How I Role (TIHIR)

'This Is How I Role' is a PHP role management system that can be applied to any class.

Installation

You can use composer to install this package. Just run composer require divineomega/thisishowirole.

Setup

Table creation

First, create a new table in your application's database to store the TIHIR roles. You can use the following SQL snippet to create the table.

If you're using Laravel, you can use the following database migration to create the TIHIR roles table.

Database connection configuration

If you're using Laravel, TIHIR will automatically use the database you've configured for your application, so you don't need to do anything here. We'll also use Eloquent to communicate with your database.

Otherwise, you need to set some environmental variables to point TIHIR towards your database. Something similar to the following will do the trick. If you're using a framework that supports it, you can put this in your .env file. If not, you can use PHP's built in putenv function.

Usage

This Is How I Role works by enhancing existing classes. This will work on any PHP class, be it a manually created class or a Laravel Eloquent model. The only requirement is that the class must have an accessible, numeric id property.

All you need to do is add two extra use lines to your class. This is shown in the example User class shown below.

This User class now has the TIHIR roles system available to it. You can now use various methods to add, remove or check for roles against this class. The snippet below shows how roles can be manipulated.


All versions of thisishowirole with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.9
rapidwebltd/rw-file-cache Version ^1.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 divineomega/thisishowirole contains the following files

Loading the files please wait ....