Skip to content

Instantly share code, notes, and snippets.

@khepin
Created June 20, 2012 11:16
Show Gist options
  • Save khepin/2959400 to your computer and use it in GitHub Desktop.
Save khepin/2959400 to your computer and use it in GitHub Desktop.
<?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