Download the PHP package mattsmithdev/pdo-repo-project without Composer

On this page you can find all versions of the php package mattsmithdev/pdo-repo-project. 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 pdo-repo-project

pdo-crud-for-free-repositories-sample-project

This sample project illustrates how to use the PHP package:

All code is (intended :-) to follow PSR-1, PSR-12 coding standards. Classes are following the PSR-4 autoloading standard.

Install 1 - Get the files on your computer

Via Composer with the create-project option, change demo1 to whatever you want the project folder name to be:

Via Git clone:

Or just download the project ZIP from Github.

Install 2 - Declare your MySQL database settings in /.env

File .env defines the 5 required constants for DB access.

You will need an up-and-running MySQL (or compatible) DB server to use this project. Ensure you know the DB user and password for programs to connect and communicate with the DB server.

Update them as required for your own MySQL setup:

NOTE: These variables names are chosen for easy deployment to Fortrabbit https://www.fortrabbit.com/

Install 3 - Run the migration and initial data fixtures script

There is a Composer script shortcut setup for you: "setupdb": "php db/migrateAndLoadFixtures.php"

So you can just type at the command line:

In folder db is a file migrateAndLoadFixtures.php. By running this script your create the DB table movie, and insert 2 initial records (with auto-increment IDs):

The database and table will be created automatically if they don't already exist.

Run the web server

Run your web server, making /public the web root:

Or use Composer script shortcut:

Open a browser

Open a browser to http://localhost:8000

or whatever port at which your webserver is running:

About this project

The features of this project can be summaraised as follows:

The Movie class is a simple entity class - with an int id property, properties for movie objects (like title and price), and public getters and setters.

The MovieRepository class extends the library class Mattsmithdev\PdoCrudRepo\DatabaseTableRepository (which has been copied by Composer into the vendor directory). These library classes provide a very simple ORM (Object-Relational Mapper), allowing basic CRUD operations with no need to manually create DB connections or write SQL etc.

For more information about the pdo-crud-for-free-repositories library see that project's Github page:

have fun

.. matt smith .. June 2022


All versions of pdo-repo-project with dependencies

PHP Build Version
Package Version
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 mattsmithdev/pdo-repo-project contains the following files

Loading the files please wait ....