Doctrine pro non-doctrine programátory

Click here to load reader

  • date post

    15-Jul-2015
  • Category

    Software

  • view

    1.543
  • download

    6

Embed Size (px)

Transcript of Doctrine pro non-doctrine programátory

Doctrine pro non-doctrine programtory

Doctrine pronon-doctrine programtoryMartin Zlmal@mrtnzlml

Sledujte puntkyToto bude jednoduch a ml bych to znt.WTF?Toto bude dobr znt, ale je na to jet asIntegrace do NetteJedna knihovna vldne vem, jedna jim vem ke, jedna vechny pivede, do temnoty sve.

Kdyby\Doctrine (github.com/Kdyby/Doctrine) Filip ProchzkaIntegrace do Nettecomposer.json"require": { "kdyby/doctrine": "~2.3.1}config.neonextensions: console: Kdyby\Console\DI\ConsoleExtension events: Kdyby\Events\DI\EventsExtension annotations: Kdyby\Annotations\DI\AnnotationsExtension doctrine: Kdyby\Doctrine\DI\OrmExtension3) config.local.neondoctrine: dbname: tada user: usernameORM Object-relational mapp(er|ing)Doctrine umouje pracovat s relan databz objektovHodn vc se zde to kolem tzv. entit

Entita je jakkoliv pesn definovan mnoina daj.

Chpete vichni co jsou to entity?EntityMon je XML nebo YAML mappingDoporuuji vak pout klasick PHP a anotace:

/** * @Doctrine\ORM\Mapping\Entity * @Doctrine\ORM\Mapping\Table(name="posts") */class Post extends Kdyby\Doctrine\Entities\BaseEntity { //...Ukzka jednoduch entity