Created
June 20, 2012 11:16
-
-
Save khepin/2959400 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 | |
namespace Khepin\UserValidatorBundle\Annotation; | |
/** | |
* @Annotation | |
* Annotation to validate a user or redirect him to his profile edit page if | |
* the profile is not valid according to the given validation groups | |
*/ | |
final class ValidateUser | |
{ | |
private $route; | |
private $validation_group; | |
public function __construct(array $data) | |
{ | |
$this->validation_group = $data['value']; | |
$this->route = $data['route']; | |
} | |
public function getValidationGroup() | |
{ | |
return $this->validation_group; | |
} | |
public function getRoute() | |
{ | |
return $this->route; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment