PHP code example of dkaframework / core

1. Go to this page and download the library: Download dkaframework/core library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

dkaframework / core example snippets


   
   
   pace of modules
   use dkaframework\core\Module\Database\MariaDB\MariaDB;
   use dkaframework\core\Module\Database\MariaDB\CRUD;
   use dkaframework\core\Module\Database\MariaDB\CRUD\Read;
   use dkaframework\core\Module\Database\MariaDB\CRUD\Delete;

    /** @var array $db_config DB Configuration to Access Database */
    $db_config = array(
        'host' => "localhost",
        'user' => "developer",
        'password' => "Cyberhack2010",
        'database' => "test"
    );
    /** @var MariaDB $MariaDB call classess MariaDB */
    $MariaDB = new MariaDB($db_config);
    /** @var CRUD\CRUD $CRUD Add Crud For Create | Read | Update | delete */
    $CRUD = $MariaDB->CRUD();
    /** @var Read\Options $Options Read Options Of Data */
    $Options = new Read\Options();
    $Options
        ->jsonFormat(true) // Show Result to Array Formated PHP Or JSON String
        ->addSearch(array(
            "id" => 2
        ));
    /** @var $Read variable for Result Read */
    $Read = $CRUD->Read("test", $Options);
    //##############
    /** Example Format Show Data */
    header('Content-Type: application/json');
    /** Show Result */
    print_r($Read);
shell
    php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
    php -r "if (hash_file('sha384', 'composer-setup.php') === 'e21205b207c3ff031906575712edab6f13eb0b361f2085f1f1237b7126d785e826a450292b6cfd1d64d92e6563bbde02') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
    php composer-setup.php
    php -r "unlink('composer-setup.php');"