Download the PHP package eftec/dashone without Composer

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

DashOne

A minimalist dashboard /backend library for PHP

This library allows to create a fast dashboard with the basic features without any template and only using code. In the examples, we create a page for a dashboard in less than 80 lines of code ( examples/test.php )

Build Status Packagist Total Downloads [Maintenance]() [composer]() [php]() [php]() [CocoaPods]()

Example ( examples/test.php ):

Another example ( examples/test.php ):

Getting started

Install via composer

composer require eftec/dashone

Create a new object DashOne (you will need to add the required include, via autoload.php or manually)

$dash=new DashOne();

And you could render a page using the object of the class DashOne()

Classes

DashOne

It is the main class that generates the dashboard.

$dash=new DashOne();

It is possible to add new elements using fluent interface (chain methods each one).

Example: It renders an empty page

Example using fluent

Where the method head is required to render the < head > of the page.

The footer is also required to close all the tags.

And every chain of methods must end with the method render() (it draw the page).

Method DashOne->head($title,$extrahtml)

It renders the head of the page. This element is required

$dash->head('Example - test 1');

Method DashOne->menuUpper($leftControls=[],$rightControls=[])

It renders the upper menu of the dashboard.

$dash->menuUpper([new ImageOne('https://via.placeholder.com/32x32')," - ",new LinkOne('Cocacola','#')]);

AlertOne

It renders an alert

new AlertOne($title,$content,$class);

Example:

ButtonOne

It renders a button

new ButtonOne('button1','Click me','btn btn-primary');

You could use the method buttons (DashOne) to render a button (or buttons). The method has a second argument to determine if the buttons must be aligned or not with the form.

$dash->buttons($buttons,true)

$dash->buttons($buttons,false)

ContainerOne

It renders a container where it is possible to add other elements (such as buttons)

new ContainerOne($html);

Example:

The method container() but be followed by a visual method. This method is added inside the container (where it says %control)

Another example:

FormOne

It renders a form. It requires a declarative array.

If it sets a definition, then it uses the definition to define the types of input objects (textbox,textarea,etc.)

If a field of the definition has an array then it is used to render a dropdownitem

If it doesn't have a definition then, it uses the values to define the types of input objects (textboxes,textareas,etc.)

You could also render a message (for example for warning or information) You could draw a form using an associative array. By default, every field will be a textbox

Or you could explicit the type of field

UlOne

It draws a list (unsorted list)

ImageOne

It draws a image

new ImageOne('https://via.placeholder.com/32x32');

https://via.placeholder.com/32x32

LinkOne

It draws a hyperlink

The first value is the name of the link, the second is the address. And the third value (optional), it's a icon (using the classes of Font-Awesome)

new LinkOne('Cocacola','#','far fa-star') $dash->link('Cocacola','#','far fa-star')

TableOne

it renders a table.

A basic page :

Any pages requires at least to call the head(), footer() and Render().

Render() draws the page so it must be called at the end of the chain.

For example, a basic page is as follow:

An empty dashboard:

Login Page

examples/testlogin.php

The library has a build-in login page that it relies on PHP's session variable.

To use a the function, the session must be enabled

And we could read the current session as follow:

Step 1 Initialize Login Page

To create a login page, you must initialize in the constructor as follow

Using an array (user and password)

Or using a method

Step 2 Fetch values

Step 3 Redirect if the user has sign-in correctly

Step 4 Display Login Screen

Step 5 Log out

The validation of the user is keep in the session. So to close a session we could destroy the session or unsetting the session.

Step 6 CSRF protection (optional)

It is possible to add an extra layer of protection by adding the next line

Step 7 Validating the session

It is possible to validate the session

Version

Copyright

Copyright Jorge Patricio Castro Castillo Dual License (LGPL v3 and Commercial License)

You could use in commercial / close source product or service while

In a nutshell (it is the license):


All versions of dashone with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
ext-json Version *
ext-openssl 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 eftec/dashone contains the following files

Loading the files please wait ....