Download the PHP package moesif/moesif-slim without Composer

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

Moesif Slim Middlware

Built For Latest Version Total Downloads Software License Source Code

Source Code on GitHub

Middleware for PHP Slim Framework to automatically log API Calls and sends to Moesif for API analytics and log analysis

How to install

Via Composer

or add 'moesif/moesif-slim' to your composer.json file accordingly.

How to use

Add Middleware

Add to the root level:

To track only certain routes, use route specific middleware setup.

Setup config

Edit config/moesif.php file.

Your Moesif Application Id can be found in the Moesif Portal. After signing up for a Moesif account, your Moesif Application Id will be displayed during the onboarding steps.

You can always find your Moesif Application Id at any time by logging into the Moesif Portal, click on the top right menu, and then clicking Installation.

For other configuration options, see below.

Configuration options

You can define Moesif configuration options in the config/moesif.php file. Some of these fields are functions. For options functions that take request and response as input arguments, the request and response objects passed in are Request request or Response objects.

applicationId

Type: String Required, a string that identifies your application.

identifyUserId

Type: ($request, $response) => String Optional, a function that takes a $request and $response and return a string for userId.

identifyCompanyId

Type: ($request, $response) => String Optional, a function that takes a $request and $response and return a string for companyId.

identifySessionId

Type: ($request, $response) => String Optional, a function that takes a $request and $response and return a string for sessionId. Moesif automatically sessionizes by processing at your data, but you can override this via identifySessionId if you're not happy with the results.

getMetadata

Type: ($request, $response) => Associative Array Optional, a function that takes a $request and $response and returns $metdata which is an associative array representation of JSON.

apiVersion

Type: String Optional, a string to specifiy an API Version such as 1.0.1, allowing easier filters.

maskRequestHeaders

Type: $headers => $headers Optional, a function that takes a $headers, which is an associative array, and returns an associative array with your sensitive headers removed/masked.

maskRequestBody

Type: $body => $body Optional, a function that takes a $body, which is an associative array representation of JSON, and returns an associative array with any information removed.

maskResponseHeaders

Type: $headers => $headers Optional, same as above, but for Responses.

maskResponseBody

Type: $body => $body Optional, same as above, but for Responses.

skip

Type: ($request, $response) => String Optional, a function that takes a $request and $response and returns true if this API call should be not be sent to Moesif.

debug

Type: Boolean Optional, If true, will print debug messages using Illuminate\Support\Facades\Log

logBody

Type: Boolean Optional, Default true, Set to false to remove logging request and response body to Moesif.

disableForking

Type: Boolean Optional, If true, this will disable forking. For the best performance, the SDK forks a process to send events by default. However, this requires your PHP environment to not have exec disabled via disable_functions.

Update a Single User

Create or update a user profile in Moesif. The metadata field can be any customer demographic or other info you want to store. Only the user_id field is required.

The metadata field can be any custom data you want to set on the user. The user_id field is required.

Update Users in Batch

Similar to updateUser, but used to update a list of users in one batch. Only the user_id field is required.

The metadata field can be any custom data you want to set on the user. The user_id field is required.

Update a Single Company

Create or update a company profile in Moesif. The metadata field can be any company demographic or other info you want to store. Only the company_id field is required.

The metadata field can be any custom data you want to set on the company. The company_id field is required.

Update Companies in Batch

Similar to update_company, but used to update a list of companies in one batch. Only the company_id field is required.

The metadata field can be any custom data you want to set on the company. The company_id field is required.

An Example Slim App with Moesif Integrated

Moesif Slim Example

Other integrations

To view more documentation on integration options, please visit the Integration Options Documentation.


All versions of moesif-slim with dependencies

PHP Build Version
Package Version
Requires slim/slim Version 4.*
slim/psr7 Version ^1.1
aza/thread Version ~1.0
akrabat/ip-address-middleware Version ^1.0
monolog/monolog Version ^2.1
moesif/moesifapi-php 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 moesif/moesif-slim contains the following files

Loading the files please wait ....