Download the PHP package codera21/sf without Composer

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

SimpleFramework

It is a MVC framwork made in PHP.

Requirement

Since I am using latest version of twig and it needs at least php 7.0. you will need what a typical php project will require.

Installation

run:

Guidelines

  1. Controller Name must be in CapitalCase and must follow Controller suffix
  2. Function inside the Controller also must be in CapitalCase and must follow Action suffix
  3. Table in Database and it's respective Model Class name must be in pural.

Getting Started

Using the Controller

Inside Application\WebInterfaceyou will see three folders Controllers , Models , ViewModels , Views. Goto Controllers then Create one new Controller Let's Say PageController.php with one method IndexAction() the code is as shown below:

Then in the output navigate to <Host>/<ProjectName>/Page/Index or <Host>/<ProjectName>/Page in my case http://localhost:90/SimpleFrameWork/Page then you will see the page with string "Hello World" echoed out. Yes the routes are created automatically in this format : <host>/<controller>/<action/method>

Parameters

In the same PageController I created a new method AddAction(int $num1 , int $num2) the code is as follows:

Now if you navigate to link like http://localhost:90/SimpleFrameWork/Page/Add/5/5 then you will see in the page 10 echoed out.

Dealing with database

One of the strong suite of the SimpleFramework is its easy to use out of the box ORM for common database queries:

Connection to database

Goto Application/Config/DbConfig.php and fill up the ServerName, Username, Password and DatabaseName. eg:

Model

Suppose you have a table named items with columns ID , ItemName, ItemPrice, ItemCategory. Then in WebInterface/Models create a class Items like:

Repository

Make a Repo of database functions in Application/Repository make a new class ItemRepo with constructor initialized with Model class ( made above) and table like this:

Calling Common database queries:

In the PageController's IndexAction I can create an object of ItemRepo and use its common queries:

It is a good idea to make object in the constructor if more than one function uses the particular Repository:

list of common queries

custom query ( we use PDO)

you can create your own custom functions and make your own queries like this in Repository/ItemRepo new function Custom is made:

Many More Features

There are many more features of SimpleFramework, that is not covered here. please go through this framework and see for yourself :)


All versions of sf with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.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 codera21/sf contains the following files

Loading the files please wait ....