Download the PHP package telnowedge/freepbx-base without Composer

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

TelNowEdge/FreepbxBase bundle

Version

Install

Dependencies requirements

Currently FreePBX® come with a symfony/property-access:3.4.19 on this version a major bug is known #29340. So, to install this module you must update your packages.

With composer require

With git

git clone inside composer vendor dir

Update composer autoload by adding on composer.json

And finally run

To known

  1. Cache system

All cached files was written on rootFreePBX/assets/cache/. Please take care with the rights.

Overview

This FreepbxBase bundle provide an easy way to write FreePBX® modules like an MVC project. He works alone without any modification of FreePBX® core files except composer.json.

FreepbxBase bundle use Symfony® components to improve security, accessibility and support.

It register its own namespace to give access on the different components through several helpers.

FreepbxBase bundle introduce in FreePBX® the Dependency Injection concept with the Symfony® component. This component is very useful to prevent any singleton and share easily your object through your own code.

FreepbxBase bundle provide too the Symfony® Form component to validate your form on the server side before to save it on your sql storage.

Before start using it, you need to understand namespace and the Symfony base development concepts.

Acme example module

Coding standard

To check the coding standard please include on your module GrumPHP.

  1. Require packages

  2. Create config file for php-cs-fixer ./php_cs

  3. Create GrumPHP config file ./grumphp.yml

Included components

  1. doctrine/annotations
  2. doctrine/cache
  3. guzzlehttp/guzzle
  4. monolog/monolog
  5. symfony/cache
  6. symfony/config
  7. symfony/dependency-injection
  8. symfony/event-dispatcher
  9. symfony/form
  10. symfony/http-foundation
  11. symfony/ldap
  12. symfony/property-access
  13. symfony/security-csrf
  14. symfony/serializer
  15. symfony/twig-bridge
  16. symfony/validator
  17. symfony/yaml

How to use

Start a new FreePBX® module

Start a new FreePBX® module like FreePBX® practices and change only the extends class to TelNowEdge\FreePBX\Base\Module\Module.

This extends start and bridge all Symfony® components and register a new namespace. Now you can use a PSR4 namespace inside your module.

The new register namespace is \TelNowEdge\Module. He is registered with ./modules base directory. So now you can use \TelNowEdge\Module\foo namespace.

Note:

Take care with the case of your module name. Your class can be Foo.class.php but the folder is ./modules/foo. So the namespace is \TelNowEdge\Module\foo.

Use FreePBX® class like an entry point

Your Foo.class.php is the first file for FreePBX®. Now use it to call your logic Controller.

Your controller ./modules/foo/Controller/FooBarController.php

Reference

Module

Entry point to start FreepbxBase bundle.

FreePBX® module must extends TelNowEdge\FreePBX\Base\Module\Module

Controller

Your Controller must extends TelNowEdge\FreePBX\Base\Controller\AbstractController

  1. createForm()

  2. render()

    Render return the compile html from the template. Append on FreePBX® with the FreePBX® practices.

  3. get()

Model

Note:

This bundle don't use Doctrine ORM. But the way is the same.

Model is the Database representation. This class must not extends anything.

On each properties, you can add a validator.

Repository

Repository get informations from sql storage and map with Model. ORM like very lite.

Your Repository must extends TelNowEdge\FreePBX\Base\Repository\AbtractRepository

  1. sqlToArray() Transform sql results set to an array for objectFromArray()

    sqlToArray() need a formatted input.

    sqlToArray() return an associative array like:

    Note:

    The _ was remove to create table key and was camel case.

  2. objectFromArray() Map the sqlToArray() to the model. On each properties, he try to call the setter.

DbHandler

DbHandler save data from the Model to the sql.

Your Repository must extends TelNowEdge\FreePBX\Base\Handler\AbtractDbHandler

Form

Form provide an easy way to build and validate your form.

This component is used exactly like Symfony does.

Validator

Validator works with Form to validate it on server side.

This component is used exactly like Symfony does.

Dependency Injection

Dependency Injection create a container of services to deal with on your code.

This component is used exactly like Symfony does.

Twig

Twig is a templating component. Cery useful to render the Symfony® forms

This component is used exactly like Symfony does.

Todo

  1. Increase security in service.yml with public / private service

All versions of freepbx-base with dependencies

PHP Build Version
Package Version
Requires doctrine/annotations Version ^1.4
doctrine/cache Version ^1.6
guzzlehttp/guzzle Version ~6.0
monolog/monolog Version ^1.23
symfony/cache Version ^3.4
symfony/config Version ^3.3.3
symfony/dependency-injection Version ^3.3.3
symfony/event-dispatcher Version ^3.3.0
symfony/form Version ^3.3.10
symfony/http-foundation Version ^3.0.9
symfony/ldap Version ^3.4
symfony/property-access Version ^3.4.27
symfony/security-csrf Version ^3.3.10
symfony/serializer Version ^3.0.3
symfony/twig-bridge Version ^3.3.10
symfony/validator Version ^3.0.9
symfony/yaml Version ^3.0.3
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 telnowedge/freepbx-base contains the following files

Loading the files please wait ....