Commit 6d03fe41 authored by Jérôme Tamarelle's avatar Jérôme Tamarelle

[doc] Move class definition to the correct section

parent aed7cb81
...@@ -78,18 +78,6 @@ collection of constraints:: ...@@ -78,18 +78,6 @@ collection of constraints::
use Symfony\Component\Validator\Constraints as Assert; use Symfony\Component\Validator\Constraints as Assert;
class Book
{
public $title;
public $author;
}
class Author
{
public $first_name;
public $last_name;
}
$book = array( $book = array(
'title' => 'My Book', 'title' => 'My Book',
'author' => array( 'author' => array(
...@@ -123,6 +111,18 @@ the class properties and getters, and then call the ``validate`` method:: ...@@ -123,6 +111,18 @@ the class properties and getters, and then call the ``validate`` method::
use Symfony\Component\Validator\Constraints as Assert; 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 = new Author();
$author->first_name = 'Fabien'; $author->first_name = 'Fabien';
$author->last_name = 'Potencier'; $author->last_name = 'Potencier';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment