Login +

Release Notes / 1.0.5

Introduction

SillySmart 1.0.5 introduces 34 new features & bug fixes.

To browse the full list, check the roadmap :

http://redmine.sillysmart.org/versions/34

Controller

Creating Components

A Component is similar to an action (without appropriate View) and can be binded on any action.

This allows to relocate in an independent module redundant treatments.

In the SillySmart Back Office, they can be created in the layer Controllers & Actions.

Once created, you can bind this component on any action.

The component, in its logic, is very similar to a Statics Controller, unlike the fact that it runs only on actions on which it is mapped, not the entire application as a Statics.

Coupled with an XSL Generics, it helps to have a completely independent module.

init() method

Birth of init() method that is called before each execution of action and following the same logic of inheritance as protected classes.

Action => init() => __ Controller.protected => init() => __ Site.protected => init()

This allows to relocate redundant treatment at N levels of application.

View

The set of XSL Templates and XSL Generics can be now managed (create / delete) from the SillySmart Back Office.

Back-Office

- All MySQL defaults values are automatically pre-filled on action Add.

- Added a right click context menu on action List.

- Creating a new generic action "Clone". This action allows to clone 1-N recordsets.

- The listing can now display recordsets from more than two tables. The multi natural-joinis implemented.

- The JavaScript header wich allow to bind ckeditor on textareas are automatically generable from the SillySmart Back Office.

SLS_String1

Birth of a new function arrayToObject() to cast an array in Std Class (native object implemented by PDO). The interest is to avoid tedious mode of treatments on associative arrays and allow to merge a collection of PDO recordsets with the result of the getParams() function of the current object.

Prototype:

public StdClass arrayToObject($array)

Return:

StdClass $object

SLS_Email2

If constructor parameters are not filled, php native function mail() is used instead SMTP transport.

SLS_Bo

Monitoring of all actions on Sls Bo.

SLS_Cookie3

Complete recasting of the class to simplify it and make it consistent with other classes
of datas manipulation (SLS_Session,SLS_HttpRequest, etc..).

Constructor

Create a new cookie described by $cookieName or retrieves the cookie if already existing.

Prototype:

public void __construct($cookieName)

Return:

void

Setter

Set key/value in object (delete key if empty value).

Prototype:

public bool __set($key, $value = “”)

Return:

bool true if set, else false

Getter

Get value described by a given key.

Prototype:

public mixed __get($key)

Return:

mixed value

Getters

Get all keys/values

Prototype:

public array getParams()

Return:

array keys/values

Save

Prototype:

public bool save($expire=0, $path = "/", $domain = "")

Return:

bool true if saved, else false

Flush

Delete a key from the object

Prototype:

public bool flush($key)

Return:

bool true if deleted, else false

Delete

Delete cookie.

Prototype:

public bool delete()

Return:

bool true if deleted, else fase

References

  1. SLS_String - Tool SLS_String - String Treatment
  2. SLS_Email - Send mail from a distant SMTP
  3. SLS_Cookie - SLS_Cookie class - Manage cookie