@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

LiskDAO documentation: minor improvements

Summary:
Minor improvement of documentation syntax highlight.

Plus, add a link about "Database Schema", where needed.

Test Plan:
Look at this documentation page before the patch:

http://phorge.localhost/book/dev/class/LiskDAO/

After the patch, re-generate it:

./bin/diviner generate

Look at the same documentation page, in another tab.

Call all your coworkers and use a huge monitor to inspect the difference.

Reviewers: O1 Blessed Committers, aklapper

Reviewed By: O1 Blessed Committers, aklapper

Subscribers: aklapper, tobiaswiese, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D26278

+8 -1
+8 -1
src/infrastructure/storage/lisk/LiskDAO.php
··· 30 30 * @{class:AphrontDatabaseConnection}; this will tell Lisk where to save your 31 31 * objects. 32 32 * 33 + * lang=php 33 34 * class Dog extends LiskDAO { 34 35 * 35 36 * protected $name; ··· 40 41 * } 41 42 * } 42 43 * 43 - * Now, you should create your table: 44 + * Now, you should create your table in the @{article:Database Schema}: 44 45 * 45 46 * lang=sql 46 47 * CREATE TABLE dog ( ··· 76 77 * 77 78 * To create and persist a Lisk object, use @{method:save}: 78 79 * 80 + * lang=php 79 81 * $dog = id(new Dog()) 80 82 * ->setName('Sawyer') 81 83 * ->setBreed('Pug') ··· 91 93 * 92 94 * To load objects by ID, use the @{method:load} method: 93 95 * 96 + * lang=php 94 97 * $dog = id(new Dog())->load($id); 95 98 * 96 99 * This will load the Dog record with ID $id into $dog, or `null` if no such ··· 100 103 * 101 104 * To update an object, change its properties and save it: 102 105 * 106 + * lang=php 103 107 * $dog->setBreed('Lab')->save(); 104 108 * 105 109 * To delete an object, call @{method:delete}: 106 110 * 111 + * lang=php 107 112 * $dog->delete(); 108 113 * 109 114 * That's Lisk CRUD in a nutshell. ··· 113 118 * Often, you want to load a bunch of objects, or execute a more specialized 114 119 * query. Use @{method:loadAllWhere} or @{method:loadOneWhere} to do this: 115 120 * 121 + * lang=php 116 122 * $pugs = $dog->loadAllWhere('breed = %s', 'Pug'); 117 123 * $sawyer = $dog->loadOneWhere('name = %s', 'Sawyer'); 118 124 * ··· 128 134 * of the transactional state of objects to implement correct transaction 129 135 * semantics: 130 136 * 137 + * lang=php 131 138 * $obj->openTransaction(); 132 139 * $obj->save(); 133 140 * $other->save();