limeberry/autopulse

This package is abandoned and no longer maintained. The author suggests using the nessphp/application package instead.

Autopulse served as part of the limeberry framework. You can use autopulse for all database related operations in your limeberry projects.

This package has no released version yet, and little information is available.


README

limeberry.library.png

Autopulse Extension

This repository contains source codes of limeberry framework. If you want to create a project using limeberry framework use the limeberry repository.

Autopulse served as part of the limeberry framework. You can use autopulse for all database related operations in your limeberry projects.

Some features of limeberry framework are served as separate packages. This repository contains some of the core codes for the framework. Please keep composer updated to get the latest packages.

Download

composer require limeberry/autopulse

Explore the Ease of Autopulse

Let's create a database class for handling the database generation and migration.

project_root\application\library\database.php

<?php

use limeberry\autopulse\MySqlConnect;
use limeberry\autopulse\factory\Column;
use limeberry\autopulse\factory\Table;
use limeberry\autopulse\factory\Schema;
use limeberry\autopulse\factory\Migration;
use limeberry\Configuration;


class database
{
    private $connection;
    private $schema;

    function __construct()
    {
        $this->connection = new MySqlConnect("localhost", "root", "pass");
    }


    function migration(){

        $database = new Schema("db_name");
        $database->Version(1)
                ->Tables(new Table("users",
                            new Column("id", "int", "primary key AUTO_INCREMENT"),
                            new Column("username", "varchar(25)","unique not null"),
                            new Column("password", "varchar(16) not null")));

        /** Optional; If you do not want to write database name manualy later. */
        $this->schema = $database;
        //If you are in 'development' mode run
        //the migration action to check the database
        //version and migrate if needed
        
        if(Configuration::isErrorsEnabled()){
            Migration::Up($database, $this->connection->Source());
        }

    }

    public function getConnection()
    {
        return $this->connection;
    }

    /**
     * optional.
     */
    public function getDatabaseName(){
        return $this->schema->Name();
    }
}

Learning Limeberry Framework

We tried to explain the definitions and usage of the framework in a simple user manual. You can start learning Limeberry from the user manual. We are working harder to create slideshow tutorials and some educational material for the framework. We will begin publishing new tutorials as soon as possible.

Contact

For any suggestions or security vulnerabilities you can contact to Limeberry via email from limeberry.framework@gmail.com