Created
September 16, 2012 20:09
-
-
Save jamescarr/3734179 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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