Skip to content

Commit

Permalink
[doc] Move class definition to the correct section
Browse files Browse the repository at this point in the history
  • Loading branch information
GromNaN committed Apr 2, 2014
1 parent aed7cb8 commit 6d03fe4
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions doc/providers/validator.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,6 @@ collection of constraints::

use Symfony\Component\Validator\Constraints as Assert;

class Book
{
public $title;
public $author;
}

class Author
{
public $first_name;
public $last_name;
}

$book = array(
'title' => 'My Book',
'author' => array(
Expand Down Expand Up @@ -123,6 +111,18 @@ the class properties and getters, and then call the ``validate`` method::

use Symfony\Component\Validator\Constraints as Assert;

class Book
{
public $title;
public $author;
}

class Author
{
public $first_name;
public $last_name;
}

$author = new Author();
$author->first_name = 'Fabien';
$author->last_name = 'Potencier';
Expand Down

0 comments on commit 6d03fe4

Please sign in to comment.