Skip to content

grahamlyons/Model

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Abstract PHP class for representing data in a model.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages