Download the PHP package miladm/prototype without Composer

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

configurations

Just install package using composer and load autoloader into your index.php file

index.php

create model (prototype)

here we extend Prototype

create connection

to create connection create a class as below

and setup your connection into prototype as below

insert schema

to create schema we have to setup schema in init method pf class

create schema

there's a method in Prototype parent called schema as below

name parameter is the name of this prototype in your database. for example if you have a table named user_data in database and you want to create UserModel prototype you have to put user_data as name into schema method.

to create schema you have to setup architecture of the table. to config table architecture you have to call methods of Schema. to understand better we go through an example

in this example we have three fields for table user_data and they are name in type if string and family in type of string and age in type of number. by type string we mean varchar in mariadb database and by type number we mean int.

Important note: all schema has id:int, create_time:timestamp and update_time:timestamp by default. you don't need to add any.

there are more field types for your architecture. you can follow as table below:

method parameters createsType description
int name:string int creates integer field
bigInt name:string bigInt creates integer with more capacity field
string name:string varchar creates string type field
text name:string text create text type field (more capacity string)
boolean name:string boolean create boolean field (0 or 1)
email name:string varchar creates string type field with email validation
url name:string varchar creates string type field with url validation
hash name:string varchar creates string type field. data will hash before insertion
timestamp name:string timestamp timestamp can hold exact time. got for dates and times
json name:string text stores json encoded data and decode data on selection
object name:string, prototype:Prototype int stores foreign key. good for relations between prototypes

Example

this documentation is under construction but code talks for itself. feel free to read and use the code!


All versions of prototype with dependencies

PHP Build Version
Package Version
Requires miladm/orm Version ^4.0.9
miladm/prototype_cli Version ^1.0
miladm/data-object 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 miladm/prototype contains the following files

Loading the files please wait ....