Skip to content

Instantly share code, notes, and snippets.

@jamescarr
Created September 16, 2012 20:09
Show Gist options
  • Save jamescarr/3734179 to your computer and use it in GitHub Desktop.
Save jamescarr/3734179 to your computer and use it in GitHub Desktop.
<?php
// module/Album/src/Album/Model/Album.php:
namespace Album\Model;
use Zend\Form\Annotation as Form;
class Album{
/**
* @Form\Required(false)
* @Form\Attributes({"type":"hidden"})
*/
public $id;
/**
* @Form\Required(true)
* @Form\Attributes({"type":"text"})
* @Form\Options({"label":"Artist"})
* @Form\Filter({"name":"StringTrim"})
* @Form\Validator({"name":"StringLength", "options":{"min":1, "max":100}})
*/
public $artist;
/**
* @Form\Required(true)
* @Form\Attributes({"type":"text"})
* @Form\Options({"label":"Title"})
* @Form\Filter({"name":"StringTrim"})
* @Form\Filter({"name":"StripTags"})
*/
public $title;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment