Bienvenue

Nov/2020

xuServer est un Framework ORM français, écrit en PHP pour des bases de données MySQL.

Objectifs & Caractéristiques :

  • Encapsulation des concepts de Programmation Orientée Objet
  • Syntaxe POO chainable
  • Facilitation du développement de fontionnalités métier par les utilisateurs finaux
  • Namespacing et Modularité (gestion de droits, fonctionnalités métier ...)
  • Génération automatique des interfaces utilisateurs
  • Cet environnement de développement léger se fonde sur l'emploi de :

  • PHP 7.x
  • MySQL 5.x
  • jQuery 3.4
  • Bootstrap 4
  • Page de Démonstration

    L'accès au service dépend de vos droits d'utilisateur.

    Merci de bien vouloir créer un compte et vous y connecter

    Documentation

    La documentation de l'API est disponible ici (version béta)

    Open Source GPAO

    Contact

    A propos du webmaster




    modelStructure


    ORM MODEL STRUCTURE CLASS

    The modelStructure class is an iteratorItem child that olds Methods :
    - to launch PHP overloading Functions over a model (set, get, call, invoke)
    - to access and traverse Model structure (properties, methods, relations, iterator (to be renamed))
    - to access database and sql classes
    - to describe the Model : __module()

    INHERITANCE

    public __construct()

    modelStructure::__construct()

    Constructor for model structure and children

    @param database $db
    if no db given, the system will use the database defined in config.php file




    public __set()

    modelStructure::__set()

    OVERLOADING
    Set instance property values using overloading
    This reduces the code to use to manipulate model "meta Properties"

    USAGE
    // change customer name on customer model
    // full syntax is
    $customer->properties()->find("customerName")->val("change the name") ;

    // short syntax is
    $customer->customerName = "change the name";
    // meta tag syntax also working to set value
    $customer->§customerName = "also change the name";

    @param string $name
    The $name of the designated overloaded meta property
    note : you can also name properties using "§" meta tag
    @param mixed $value
    Value given to the overloaded meta property
    @see property
    @see properties




    public __get()

    modelStructure::__get()

    OVERLOADING
    Return a the value of a "meta Property".


    USAGE

    // using "§" meta tag , the meta property itself is returned
    $prop = $customer->§customerName;
    $prop->val("change the value") ;
    // without "§" meta tag , property::val() is returned


    @param string $name
    The name of the designated overloaded meta property
    note : When you use "§" meta tag , the property is returned
    note : When you do not use "§" meta tag , the property value is returned
    @return \xuserver\v5\property |string



    public __call()

    modelStructure::__call()

    OVERLOADING


    otherwise ;
    @param string $name
    @return \xuserver\v5\property|string



    public __invoke()

    modelStructure::__invoke()

    OVERLOADING


    @todo reflechir a son emploi
    @return \xuserver\v5\iterator



    public __module()

    modelStructure::__module()

    Return the name of the module the model (or its descendant) belongs to
    Module name is defined parsing namespaces of descendant class
    @return string



    public __reset()

    modelStructure::__reset()

    Init model interface, reseting its modelStructure properties



    public iterator()

    modelStructure::iterator()

    Traversing modelStructure
    Return the iterator object that stores the list of instances

    @see \xuserver\v5\model
    @return \xuserver\v5\iterator



    public properties()

    modelStructure::properties()

    Traversing modelStructure
    Return the iterator object that stores the list of property

    @see \xuserver\v5\property
    @return \xuserver\v5\properties



    public relations()

    modelStructure::relations()

    Traversing modelStructure
    Return the iterator object that stores the list of relation

    @see \xuserver\v5\relation
    @return \xuserver\v5\relations



    public methods()

    modelStructure::methods()

    Traversing modelStructure
    Return the iterator object that stores the list of method

    @see \xuserver\v5\method
    @return \xuserver\v5\methods



    public sql()

    modelStructure::sql()

    Traversing modelStructure

    Return the sql ORM driver
    @return \xuserver\v5\sql



    public db()

    modelStructure::db()

    Traversing model structure
    Return the database object on which PDO queries are executed

    @return \xuserver\v5\database



    public db_tablename()

    modelStructure::db_tablename()


    Return the name of the database table that stores the model
    @return string



    public db_index()

    modelStructure::db_index()

    Return the name of the database field that stores the model primary key
    @return string



    public db_id()

    modelStructure::db_id()

    Set or Retrieve the value model primary key in database
    @param string $set
    value can be either an integer or an array of integers
    @return \xuserver\v5\modelStructure|string



    public href()

    modelStructure::href()

    Return model a string that references the model instance

    USAGE

    $customer->href() ;
    // return "customer-1"

    EXAMPLES



    @see router.php
    @see \xs_encrypt()
    @see \xs_link()
    @return string



    public state()

    modelStructure::state()

    set model current _state
    model state can be virgin, instance, selection

    @param string $set
    @return \xuserver\v5\model|string





    iteratorItem


    standard item in iterator


    INHERITANCE

    public type()

    iteratorItem::type()

    Set or Retrieve the item type

    @param string $set
    @return \xuserver\v5\iteratorItem|string