Download the PHP
package damiantw/fake-customer-gateway without Composer
On this page you can find all versions of the php package
damiantw/fake-customer-gateway. It is possible to download/install
these versions without Composer. Possible dependencies are resolved
automatically.
Vendor damiantw Package fake-customer-gateway Short Description A simple in-memory customer data gateway for Albany Can Code. License
MIT
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.
You will need to have Composer and PHP v7.0 or greater installed.
Create a file called composer.json in your project root and paste in the following:
Run the following command to add this package to the dependency list of your project.
composer require damiantw/fake-customer-gateway
Require the Composer autoload file and import the namespace in your PHP script.
Usage
Create an instance of CustomerGateway
Use the following methods to interact with the customer data:
Usage Example
Suppose you wanted to print out an HTML unordered list containing all of the customers ids and names.
Persisting Data Changes
The CustomerGateway instance will build an in memory data structure to hold the customer data when it is created.
By default, any changes that are made to the customer data will not persist between requests.
Functions are provided that allow for saving the current state of customer data to a file on disk and
the ability for the CustomerGateway instance to restore customer data state by loading one of these files.
Sample Data
Default output of var_dump($customerGateway->all());
All versions of fake-customer-gateway with dependencies
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 damiantw/fake-customer-gateway contains the following files
Loading the files please wait ....
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.