Persistence in PHP with Doctrine ORM

This book is designed for PHP developers and architects who want to modernize their skills through better understanding of Persistence and ORM. You’ll learn through explanations and code samples, all tied to the full development of a web application.

Persistence in PHP with Doctrine ORM

Kévin Dunglas

1 customer reviews
This book is designed for PHP developers and architects who want to modernize their skills through better understanding of Persistence and ORM. You’ll learn through explanations and code samples, all tied to the full development of a web application.
Mapt Subscription
FREE
$29.99/m after trial
eBook
$12.60
RRP $17.99
Print + eBook
$29.99
RRP $29.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$12.60
$29.99
$29.99p/m after trial
RRP $17.99
RRP $29.99
Subscription
eBook
Print + eBook
Start 30 Day Trial
Subscribe and access every Packt eBook & Video.
 
  • 5,000+ eBooks & Videos
  • 50+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 
Preview in Mapt

Book Details

ISBN 139781782164104
Paperback114 pages

Book Description

Doctrine 2 has become the most popular modern persistence system for PHP. It can either be used as a standalone system or can be distributed with Symfony 2, and it also integrates very well with popular frameworks. It allows you to easily retrieve PHP object graphs, provides a powerful object-oriented query language called DQL, a database schema generator tool, and supports database migration. It is efficient, abstracts popular DBMS, and supports PHP 5.3 features.

Doctrine is a must-have for modern PHP applications.

Persistence in PHP with Doctrine ORM is a practical, hands-on guide that describes the full creation process of a web application powered by Doctrine. Core features of the ORM are explained in depth and illustrated by useful, explicit, and reusable code samples.

Persistence in PHP with Doctrine ORM explains everything you need to know to get started with Doctrine in a clear and detailed manner.

From installing the ORM through Composer to mastering advanced features such as native queries, this book is a full overview of the power of Doctrine. You will also learn a bunch of mapping annotations, create associations, and generate database schemas from PHP classes. You will also see how to write data fixtures, create custom entity repositories, and issue advanced DQL queries. Finally it will teach you to play with inheritance, write native queries, and use built-in lifecycle events. If you want to use a powerful persistence system for your PHP application, Persistence in PHP with Doctrine ORM is the book you.

Table of Contents

Chapter 1: Getting Started with Doctrine 2
Prerequisites
Understanding the concepts behind Doctrine
Creating a project structure
Installing Composer
Installing Doctrine
Bootstrapping the app
Using Doctrine's Entity Manager
Configuring Doctrine command-line tools
Summary
Chapter 2: Entities and Mapping Information
Creating the Entity class
Generating getters and setters
Mapping with Doctrine annotations
Understanding Doctrine Mapping Types
Creating the database schema
Installing Data fixtures
Creating a simple UI
Summary
Chapter 3: Associations
Getting started with the Doctrine associations
Understanding the @ManyToOne and @OneToMany annotations with the comment system
Understanding the @ManyToMany annotation with tags
Summary
Chapter 4: Building Queries
Understanding DQL
Using the entity repositories
Getting started with Query Builder
Filtering by tag
Counting comments
Summary
Chapter 5: Going Further
Implementing inheritance
Getting started with events
Writing native queries
Summary

What You Will Learn

  • Install Doctrine through the Composer dependency manager
  • Configure Doctrine Command Line Tools
  • Learn to manage relations between entities with different association types
  • Create data fixtures, a custom entity repository, and native SQL queries
  • Master the query builder to generate DQL queries
  • Get started with inheritance and lifecycle events

Authors

Table of Contents

Chapter 1: Getting Started with Doctrine 2
Prerequisites
Understanding the concepts behind Doctrine
Creating a project structure
Installing Composer
Installing Doctrine
Bootstrapping the app
Using Doctrine's Entity Manager
Configuring Doctrine command-line tools
Summary
Chapter 2: Entities and Mapping Information
Creating the Entity class
Generating getters and setters
Mapping with Doctrine annotations
Understanding Doctrine Mapping Types
Creating the database schema
Installing Data fixtures
Creating a simple UI
Summary
Chapter 3: Associations
Getting started with the Doctrine associations
Understanding the @ManyToOne and @OneToMany annotations with the comment system
Understanding the @ManyToMany annotation with tags
Summary
Chapter 4: Building Queries
Understanding DQL
Using the entity repositories
Getting started with Query Builder
Filtering by tag
Counting comments
Summary
Chapter 5: Going Further
Implementing inheritance
Getting started with events
Writing native queries
Summary

Book Details

ISBN 139781782164104
Paperback114 pages
Read More
From 1 reviews

Read More Reviews

Recommended for You

AngularJS Web Application Development Blueprints Book Cover
AngularJS Web Application Development Blueprints
$ 29.99
$ 21.00