Version 0.3.5 beta
This commit is contained in:
@@ -40,6 +40,13 @@ interface IDb
|
||||
*/
|
||||
public function insertArrayIntoTable( $dataset = array() );
|
||||
|
||||
/**
|
||||
* @desc selects a row by the fieldname and the given value, should be
|
||||
* array('fieldname' => 'value')
|
||||
* @param array $field
|
||||
* @return mixed
|
||||
*/
|
||||
public function selectRowByFieldWhere( $field = array() );
|
||||
/**
|
||||
* @desc beacause there is no autoindex this has to be part of every database model
|
||||
* class, so the next index is always correctly set
|
||||
@@ -47,6 +54,10 @@ interface IDb
|
||||
*/
|
||||
public function nextInsertIndex();
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @desc loads the password from the datbaase for remembering
|
||||
* @param bool $user_name
|
||||
* @return mixed
|
||||
*/
|
||||
public function loadPasswordByUsername( $user_name = false );
|
||||
}
|
||||
@@ -12,23 +12,29 @@ interface IForm
|
||||
/**
|
||||
* @desc Constant Form attributes
|
||||
*/
|
||||
const FORM_NAME = 'name';
|
||||
const FORM_VALUE = 'value';
|
||||
const FORM_METHOD = 'method';
|
||||
const FORM_METHOD_TYPE = array('post', 'get');
|
||||
const FORM_ACTION = 'action';
|
||||
const FORM_TARGET = 'target';
|
||||
const FORM_TARGET_TYPE = array('_blank', '_self', '_parent', '_top');
|
||||
const FORM_TYPE_TEXT = 'text';
|
||||
const FORM_TYPE_SUBMIT = 'submit';
|
||||
const FORM_TYPE_BUTTON = 'button';
|
||||
const FORM_ATTRIBUTE_ROWS = 'rows';
|
||||
const FORM_ATTRIBUTE_COLS = 'cols';
|
||||
const FORM_ATTRIBUTE_SPEECH = 'speech';
|
||||
const FORM_ATTRIBUTE_SRC = 'src';
|
||||
const FORM_ATTRIBUTE_ALT = 'alt';
|
||||
const FORM_ATTRIBUTE_ID = 'id';
|
||||
|
||||
const FORM_NAME = 'name';
|
||||
const FORM_VALUE = 'value';
|
||||
const FORM_METHOD = 'method';
|
||||
const FORM_METHOD_TYPE = array('post', 'get');
|
||||
const FORM_ACTION = 'action';
|
||||
const FORM_TARGET = 'target';
|
||||
const FORM_TARGET_TYPE = array('_blank', '_self', '_parent', '_top');
|
||||
const FORM_TYPE_TEXT = 'text';
|
||||
const FORM_TYPE_SUBMIT = 'submit';
|
||||
const FORM_TYPE_BUTTON = 'button';
|
||||
const FORM_ATTRIBUTE_ROWS = 'rows';
|
||||
const FORM_ATTRIBUTE_COLS = 'cols';
|
||||
const FORM_ATTRIBUTE_SPEECH = 'speech';
|
||||
const FORM_ATTRIBUTE_SRC = 'src';
|
||||
const FORM_ATTRIBUTE_ALT = 'alt';
|
||||
const FORM_ATTRIBUTE_ID = 'id';
|
||||
const FORM_ATTRIBUTE_CLASS = 'class';
|
||||
const FORM_ATTRIBUTE_FOR = 'for';
|
||||
const FORM_ATTRIBUTE_FORM = 'form';
|
||||
const FORM_ATTRIBUTE_PLACEHOLDER = 'placeholder';
|
||||
const FORM_ATTRIBUTE_REQUIRED = 'required';
|
||||
const FORM_ATTRIBUTE_TYPE = 'type';
|
||||
|
||||
/**
|
||||
* @desc loads the current Form element to the form
|
||||
* @param $element
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
<?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)
|
||||
*/
|
||||
|
||||
}
|
||||
@@ -26,6 +26,8 @@ interface IMysql
|
||||
const PLACE_PRIMARY_KEY = "PRI";
|
||||
const PLACE_COLUMN_NAME = "NO COLUMN NAME";
|
||||
const PLACE_SEARCH_TERM = "NO SEARCH PARAMETER";
|
||||
const PLACE_FIELD_NAME = "NO FIELD NAME";
|
||||
const PLACE_WHERE_VALUE = "NO WHERE VALUE";
|
||||
const PLACE_DES_ENCRYPT = false;
|
||||
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
<?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);
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
<?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);
|
||||
}
|
||||
Reference in New Issue
Block a user