Download the PHP package alisahanyalcin/infinity-core without Composer

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

��# InfinityCore

InfinityCore is a PHP framework for building web applications.

## Installation

create project via composer:

`

composer create-project alisahanyalcin/infinity-core:dev-master app-name

cd app-name

`

or run the following command directly:

git clone https://github.com/alisahanyalcin/InfinityCore.git

cd InfinityCore

composer install

# Basic Usage

You can found full documentation at [Wiki](https://github.com/alisahanyalcin/InfinityCore/wiki).

## Config

Application/config/AppConfig.php

`php

const base_url = 'http://localhost/InfinityCore/';

// development, production, testing

const ENVIRONMENT = 'production';

const TIMEZONE = 'Europe/Istanbul';

`

Application/config/DBConfig.php

`php

const dbConfig = [

'debug' => true,

'host' => 'localhost',

'driver' => 'mysql',

'database' => 'testDB',

'username' => 'root',

'password' => '',

'charset' => 'utf8',

'collation' => 'utf8generalci',

'prefix' => ''

];

`

## Application

`php

<?php

require DIR . '/vendor/autoload.php';

use InfinityCore\Core\Application; // import the application class

$app = new Application(); // Create new application

here you can add your routes

$app->run(); // run the application

`

## Routing

Example Route Definition:

`php

$app->router->get('/', 'HomeController@index');

$app->router->get('/about', 'HomeController@about'); // return view about page with data from database PDOx class

`

## Errors

Example error: index.php

php

use InfinityCore\Application\config\AppConfig;

//e.g. test 404 - Not Found

$app->router->error(function () use ($app) {

$app->load::view('errors/'.AppConfig::pageNotFoundErrorView, [

'statusCode' => '404',

'messageTitle' => 'Page Not Found',

'message' => 'Sorry, but the page you were trying to view does not exist.'

]);

});

## Controllers

`php

<?php

namespace InfinityCore\Application\controllers;

use InfinityCore\Core\BaseController;

class HomeController extends BaseController

{

public function construct()

{

parent::construct();

}

public function index()

{

$this->load->view('home', ['name' => 'InfinityCore']);

}

public function about()

{

$records = $this->model->getModel('HomeModel')->getRecords();

$this->load->view('about', ['name' => 'About Page', 'records' => $records]);

}

}

`

## Views

index.php

php

<h1>

Welcome to{% if name %} {{name}} {% endif %}

</h1>

<p>

{{name}} is a PHP framework for building web applications. // print name

</p>

about.php

php

<h1>

Welcome to

{% if name %}

{{name}}

{% endif %}

</h1>

<p>

{% for record in records %}

<br> > {{record.name}}:{{record.email}}

{% else %}

No users have been found.

{% endfor %}

</p>

## Database

Example database:

`sql

CREATE TABLE testdb.users

(

id INT NOT NULL AUTO_INCREMENT ,

email VARCHAR(256) NOT NULL ,

name VARCHAR(256) NOT NULL ,

PRIMARY KEY (id)

) ENGINE = InnoDB CHARSET=utf8 COLLATE utf8generalci;

`


All versions of infinity-core with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4
ext-json Version *
symfony/http-foundation Version ^5.1
twig/twig Version ~3.0
ext-pdo 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 alisahanyalcin/infinity-core contains the following files

Loading the files please wait ....