Skip to content

Latest commit

 

History

History
22 lines (14 loc) · 807 Bytes

Readme.md

File metadata and controls

22 lines (14 loc) · 807 Bytes

Abstract Model Class Build Status

Abstract PHP class for models, using the Zend Filter Input class from the Zend Framework.

AbstractModel needs to be extended, then $_fields declared and optionally validators (and filters, although there's no way of actually getting the filtered inputs just yet).

Example:

class Document extends AbstractModel {

    protected $_fields = array('title', 'author');

    protected $_validators = array(
        'title' => array(
                    'Alnum',
                    'presence' => 'required'
        )
    );

}

Unit tests are for PHPUnit.