File/majax.php

Description

PHP - AJAX library for rapid development.

Very simple library for rapid development, that provides:

  • form creating
  • form validation
  • catching requests from AJAX frontend
  • json en/decoding
  • creating dom structure

  • author: Martin Majlis (http://martin.m-core.net)
  • version: 0.1
Classes
Class Description
Abstract class MajaxCore Core class for Majax library.
 class Majax Main class of Majax library, that provides functions for
 class MajaxFormHandler Provides basic interface for form handling. It's singleton pattern.
Abstract class MajaxFormElement General form element. Implements basic setters/getters.
 class MajaxForm
Abstract class MajaxFormInput
 class MajaxFormInputText
 class MajaxFormInputPassword
 class MajaxFormInputSubmit
 class MajaxFormSelect
 class MajaxFormTextarea
 class MajaxFormUnknown Unknown form element.
Constants
MAJAX_REQUEST_NAME = 'majaxName' (line 25)

Name of GET/POST key, where is stored request name.

MJX_C_IN_SELECT = 'inselect' (line 79)

This rule is just for select element. Input value must be in known values.

MJX_C_IN_VALUES = 'values' (line 69)

Input value must be from specified array.

MJX_C_MATCH = 'match' (line 49)

Input value must match regular expression (preg_match function is used).

MJX_C_MAX_LENGTH = 'maxlength' (line 39)

Maximal length of input value.

MJX_C_MAX_VALLUE = 'maxvalue' (line 64)

Maximal value of input.

MJX_C_MIN_LENGTH = 'minlength' (line 34)

Minimal length of input value.

MJX_C_MIN_VALUE = 'minvalue' (line 59)

Minimal value of input.

MJX_C_NOT_IN_VALUES = 'notvalues' (line 74)

Input value must not be from specified array.

MJX_C_NOT_MATCH = 'notmatch' (line 54)

Input value must not match regular expression (preg_match).

MJX_C_SAME_AS = 'sameas' (line 44)

Input value must be same as value of another element.

MJX_R_MAIL = '~^([!#-\'*+.-9=?A-Z^-~-]+|"([ !#-\[\]-~]|\\[ -~])*")@([!#-\'*+-9=?A-Z^-~-]+\.[!#-\'*+.-9=?A-Z^-~-]+|\[([ -Z^-~]|\\[ -~])+(\.|\\\.)([ -Z^-~]|\\[ -~])+\])$~' (line 88)

Regular expression for e-mail - http://mj.ucw.cz/download/net/checkaddr.pl

MJX_R_PHONE = '~(+(\d *){3} *)?(\d *){9}~' (line 93)

Regular expression for phone number.

MJX_R_PSC = '~(\d *){5}~' (line 98)

Regular expression for PSC.

MJX_T_BUTTON = 'button' (line 142)

Input - type="button"

MJX_T_CHECKBOX = 'checkbox' (line 122)

Input - type="checkbox"

MJX_T_FILE = 'file' (line 127)

Input - type="file"

MJX_T_HIDDEN = 'hidden' (line 152)

Input - type="hidden"

MJX_T_IMAGE = 'image' (line 147)

Input - type="image"

MJX_T_PASSWORD = 'password' (line 112)

Input - type="password"

MJX_T_RADIO = 'radio' (line 117)

Input - type="radio"

MJX_T_RESET = 'reset' (line 137)

Input - type="reset"

MJX_T_SELECT = 'select' (line 157)

Select

MJX_T_SUBMIT = 'submit' (line 132)

Input - type="submit"

MJX_T_TEXT = 'text' (line 107)

Input - type="text"

MJX_T_TEXTAREA = 'textarea' (line 162)

Textarea

Documentation generated on Tue, 23 Feb 2010 10:23:57 +0100 by phpDocumentor 1.4.3