UserAddress.php 379 B

1234567891011121314151617181920212223
  1. <?php
  2. class UserAddress extends EMongoEmbeddedDocuemnt
  3. {
  4. public $city;
  5. public $street;
  6. public $apartment;
  7. public $zip;
  8. public function rules()
  9. {
  10. return array(
  11. array('city, street, house', 'length', 'max'=>255),
  12. array('house, apartment, zip', 'length', 'max'=>10),
  13. );
  14. }
  15. public function attributeLabels()
  16. {
  17. return array(
  18. 'zip' => 'Postal Code',
  19. );
  20. }
  21. }