SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.
SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.
Successfully reported this slideshow.
Activate your 14 day free trial to unlock unlimited reading.
39.
//src/Acme/ApiBundle/Tests/Fixtures/Product.php
use AcmeApiBundleEntityProduct as ProductEntity;
use DoctrineCommonPersistenceObjectManager;
use DoctrineCommonDataFixturesFixtureInterface;
class Product implements FixtureInterface
{
public function load(ObjectManager $em)
{
$product = new ProductEntity();
$product->setName('Product #1');
$product->setPrice(19.90);
$product->setDescription('Awesome product!');
$em->persist($product);
$em->flush();
}
}
54.
“What needs to be done to make the REST
architectural style clear on the notion that
hypertext is a constraint? In other words, if the
engine of application state (and hence the API)
is not being driven by hypertext, then it cannot
be RESTful and cannot be a REST API. Period.
Is there some broken manual somewhere that
needs to be fixed?”
Roy Fielding
55.
“Tuttavia, essendo pragmatici, a volte anche
un livello 2 ben fatto è garanzia di una buona
API...”
Daniel Londero
56.
“But don’t call it RESTful. Period.”
Roy Fielding