First commit, version 0.1 beta base nibiru framework

This commit is contained in:
Stephan Kasdorf
2017-06-16 12:21:19 +02:00
parent 7d475ceb6b
commit 4bfe207b78
556 changed files with 113905 additions and 26 deletions

17
core/i/auth.php Normal file
View File

@@ -0,0 +1,17 @@
<?php
namespace Nibiru;
/**
* User - stephan
* Date - 01.02.17
* Time - 17:18
* @author - alllinux.de GbR
* @category - [PLEASE SPECIFIY]
* @license - BSD License
*/
interface IAuth
{
const NIBIRU_SECURITY = "SECURITY";
public function auth( $username, $password );
}

47
core/i/controller.php Normal file
View File

@@ -0,0 +1,47 @@
<?php
namespace Nibiru;
/**
* User - stephan
* Date - 24.01.17
* Time - 22:36
* @author - Stephan Kasdorf
* @category - [PLEASE SPECIFIY]
* @license - BSD License
*/
interface IController
{
/**
* This should be part of any extended controller
* class in order to implement a page structure
* @return array
*/
public function pageAction();
/**
* This is the part where you can add titles to
* your page navigation.
*/
public function navigationAction();
/**
* Here you can add any form data for handling in your
* controller
*
* @param bool $action
* @param string $name
* @param string $type
* @param bool $labeled
* @param array $data
*
* @return array
*/
public function formAction( $action = false, $name = <<<NAME
NAME
, $type = <<<METHOD
METHOD
, $labeled = false , $data = array()
);
}

16
core/i/engine.php Normal file
View File

@@ -0,0 +1,16 @@
<?php
namespace Nibiru;
/**
* Created by PhpStorm.
* User: skasdorf
* Date: 10.05.17
* Time: 10:46
*/
interface IEngine
{
const T_ENGINE = "ENGINE";
const T_ENGINE_NAME = "name";
const T_ENGINE_TWIG = "Twig";
const T_ENGINE_SMARTY = "Smarty";
const T_ENGINE_DWOO = "Dwoo";
}

44
core/i/form.php Normal file
View File

@@ -0,0 +1,44 @@
<?php
namespace Nibiru;
/**
* Created by PhpStorm.
* User: stephan
* Date: 24.01.17
* Time: 10:20
*/
interface IForm
{
/**
* @desc Basic Form template
*/
const TYPE_FORM = "<form action=\"{action}\" method=\"{type}\" name=\"{name}\">" . "\n" . "{fields}" . "\n" . "<input type='submit' value='speichern'>\t\t" . "</form>" . "\n";
const TYPE_FORM_FIELDSET = "<form action=\"{action}\" method=\"{type}\" name=\"{name}\">"."\n"."<fieldset><label>{flname}</label>" . "\n" . "{fields}" . "\n" . "<input type='submit' value='speichern'>" . "\t\t" . "</fieldset>"."\n"."</form>" . "\n";
/**
* @desc add the form action in order to set the path
* for the controller
* @param $action
* @return mixed
*/
public static function setFormAction($action);
/**
* @desc set the form type, two types (post, get)
* @param $type
* @return mixed
*/
public static function setFormType($type);
/**
* @desc set the name for the form
* @param $name
* @return mixed
*/
public static function setFormName($name);
/**
* @desc display the form data on the html layout
* @return mixed
*/
public function displayForm();
}

20
core/i/formaction.php Normal file
View File

@@ -0,0 +1,20 @@
<?php
namespace Nibiru;
/**
* User - stephan
* Date - 24.01.17
* Time - 14:39
* @author - Stephan Kasdorf
* @category - [PLEASE SPECIFIY]
* @license - BSD License
*/
interface IFormaction
{
public function getPostData();
public function getGetData();
public function getRequestData();
public function saveData();
}

14
core/i/formfromtable.php Normal file
View File

@@ -0,0 +1,14 @@
<?php
namespace Nibiru;
/**
* Created by PhpStorm.
* User: mithril
* Date: 17.03.2017
* Time: 14:27
*/
interface IFormfromtable
{
//TODO: Buld form from table
}

71
core/i/input.php Normal file
View File

@@ -0,0 +1,71 @@
<?php
namespace Nibiru;
/**
* Created by PhpStorm.
* User: stephan
* Date: 24.01.17
* Time: 11:16
*/
interface IInput
{
/**
* @desc constant form types for this class
*/
const TYPE_CHECKBOX = "checkbox";
const TYPE_RADIO = "radio";
const TYPE_EMAIL = "email";
const TYPE_TEXT = "text";
const TYPE_HIDDEN = "hidden";
const TYPE_DATE = "date";
const TYPE_IMAGE = "image";
const TYPE_PASSWORD = "password";
const TYPE_WEEK = "week";
const TYPE_TIME = "time";
const TYPE_TEL = "tel";
const TYPE_SUBMIT = "submit";
const TYPE_BUTTON = "button";
const TYPE_URL = "url";
const TYPE_COLOR = "color";
const TYPE_DATETIME_LOCAL = "datetime-local";
/**
* TODO: Implement onClick for javascript form validation
*@desc Build Templates for the input form field
*/
const INPUT = "\t\t\t" . "<input name=\"{name}\" type=\"{type}\" value=\"{value}\" min=\"{min}\" max=\"{max}\">" . "\n";
const INPUT_LABELED = "\t\t\t" . "<label for=\"{name}\">{labelname}</label>"."<input name=\"{name}\" type=\"{type}\" value=\"{value}\" min=\"{min}\" max=\"{max}\">" . "\n";
/**
* @desc set the form fields, they must be passed within an
* array: array(
* 'fieldnames' => array('name', 'name' ...),
* 'fieldtypes' => 'array(text, radio ...)',
* 'min' => array(number, number ...),
* 'max' => array(number, nunber ...)
* );
* @param $fields
* @return mixed
*/
public function setInputFields($fields);
/**
* @desc offer the main types for an input field
* e.g. type="checkbox",
* type="radio",
* type="email",
* type="text",
* type="hidden",
* type="date",
* type="image"
* type="password"
* type="week"
* type="time"
* type="tel"
* type="submit"
* type="button"
* type="url"
* @param (string) $type
* @return (string)
*/
}

31
core/i/mysql.php Normal file
View File

@@ -0,0 +1,31 @@
<?php
namespace Nibiru;
/**
* User - stephan
* Date - 01.02.17
* Time - 17:27
* @author - alllinux.de GbR
* @category - [PLEASE SPECIFIY]
* @license - BSD License
*/
interface IMysql
{
const SETTINGS_DATABASE = "DATABASE";
const PLACE_NO_QUERY = "NO QUERY";
const NO_ID = false;
const PLACE_TABLE_NAME = "NO TABLENAME";
const PLACE_DSN = "NO CONNECTION STRING";
const PLACE_USERNAME = "username";
const PLACE_PASSWORD = "password";
const PLACE_HOSTNAME = "hostname";
const PLACE_DRIVER = "driver";
const PLACE_DATABASE = "basename";
const PLACE_PORT = "port";
const PLACE_CONNECTION = "NO CONNECTION";
const PLACE_PRIMARY_KEY = "PRI";
const PLACE_COLUMN_NAME = "NO COLUMN NAME";
const PLACE_SEARCH_TERM = "NO SEARCH PARAMETER";
const PLACE_DES_ENCRYPT = false;
}

63
core/i/pdo.php Normal file
View File

@@ -0,0 +1,63 @@
<?php
namespace Nibiru;
/**
* User - stephan
* Date - 01.02.17
* Time - 19:03
* @author - alllinux.de GbR
* @category - [PLEASE SPECIFIY]
* @license - BSD License
*/
interface IPdo
{
/**
* @desc returns the query by ressult
* @param string $string
*
* @return array()
*/
public static function query( $string = IMysql::PLACE_NO_QUERY );
/**
* @desc returns the row by id
* @param bool $id
*
* @return array()
*/
public static function fetchRowInArrayById( $tablename = IMysql::PLACE_TABLE_NAME, $id = IMysql::NO_ID );
/**
* @desc returns row by column name and search parameter
* @param string $tablename
* @param string $column_name
* @param IMysql $
* @return mixed
*/
public static function fetchRowInArrayByWhere( $tablename = IMysql::PLACE_TABLE_NAME,
$column_name = IMysql::PLACE_COLUMN_NAME,
$parameter_name = IMysql::PLACE_SEARCH_TERM );
/**
* @desc will return the last inserted ID
* @return integer
*/
public static function getLastInsertedID();
/**
* @desc will return all entries from the selected tablename
*
* @param string $tablename
*
* @return mixed
*/
public static function fetchTableAsArray( $tablename = IMysql::PLACE_TABLE_NAME );
/**
* @desc insert array content into database
* @param string $tablename
* @param string $array_name
* @return mixed
*/
public static function insertArrayIntoTable( $tablename = IMysql::PLACE_TABLE_NAME, $array_name = IMysql::PLACE_ARRAY_NAME, $encrypted = IMysql::PLACE_DES_ENCRYPT );
}

44
core/i/select.php Normal file
View File

@@ -0,0 +1,44 @@
<?php
namespace Nibiru;
/**
* Created by PhpStorm.
* User: stephan
* Date: 24.01.17
* Time: 11:16
* TODO: Write the corresponding class for the select dropdown of the form
*/
interface ISelect
{
/**
* @desc set the name for the select box
* @param $selectName
* @return mixed
*/
public static function setSelectName($selectName);
/**
* @desc set the options array in the current form if present
* e.g.: array(
'names' => array('name1', 'name2'),
* 'value' => array('value1', 'value2')
* )
* @param $optionNames
* @return mixed
*/
public static function setOptionNames($optionNames);
/**
* @desc set the select type possible parameter values
* multiple, single
* @param $selectType
* @return mixed
*/
public static function setSelectType($selectType);
/**
* @desc set the size of the select type if it is multiple
* @param $selectTypeSize
* @return mixed
*/
public static function setSelectTypeSize($selectTypeSize);
}

15
core/i/soap.php Normal file
View File

@@ -0,0 +1,15 @@
<?php
/**
* Created by PhpStorm.
* User: skasdorf
* Date: 16.06.17
* Time: 10:44
*/
namespace Nibiru;
interface ISoap
{
}

33
core/i/textarea.php Normal file
View File

@@ -0,0 +1,33 @@
<?php
namespace Nibiru;
/**
* Created by PhpStorm.
* User: stephan
* Date: 24.01.17
* Time: 11:22
* TODO: Write the class for the textareas
*/
interface ITextarea
{
/**
* @desc set the name of the text area
* @param (string) $textareaName
* @return (string)
*/
public static function setTextareaName($textareaName);
/**
* @desc set the size of the text area
* @param (int) $textareaSize
* @return (int)
*/
public static function setTextareaSize($textareaSize);
/**
* @desc set the textarea form name given by the father class
* e.g.:
* @param (string) $textareaFormname
* @return (string)
*/
public static function setTextareaFormname($textareaFormname);
}

14
core/i/view.php Normal file
View File

@@ -0,0 +1,14 @@
<?php
namespace Nibiru;
/**
* User - stephan
* Date - 24.01.17
* Time - 22:41
* @author - Stephan Kasdorf
* @category - [PLEASE SPECIFIY]
* @license - BSD License
*/
interface IView
{
}