Updated Development (markdown)
parent
3add630b87
commit
30599d1b14
@ -51,8 +51,9 @@ Note that it can take an hour or longer to run the several thousand tests.
|
|||||||
|
|
||||||
If you want to create your own data models, you might want to know how the arrays, that you have to store, look like:
|
If you want to create your own data models, you might want to know how the arrays, that you have to store, look like:
|
||||||
|
|
||||||
public function create($pasteid, $paste)
|
```php
|
||||||
{
|
public function create($pasteid, $paste)
|
||||||
|
{
|
||||||
$pasteid = substr(hash('md5', $paste['data']), 0, 16);
|
$pasteid = substr(hash('md5', $paste['data']), 0, 16);
|
||||||
|
|
||||||
$paste['data'] // text
|
$paste['data'] // text
|
||||||
@ -63,10 +64,10 @@ If you want to create your own data models, you might want to know how the array
|
|||||||
$paste['meta']['formatter'] // string
|
$paste['meta']['formatter'] // string
|
||||||
$paste['meta']['attachment'] // text
|
$paste['meta']['attachment'] // text
|
||||||
$paste['meta']['attachmentname'] // text
|
$paste['meta']['attachmentname'] // text
|
||||||
}
|
}
|
||||||
|
|
||||||
public function createComment($pasteid, $parentid, $commentid, $comment)
|
public function createComment($pasteid, $parentid, $commentid, $comment)
|
||||||
{
|
{
|
||||||
$pasteid // the id of the paste this comment belongs to
|
$pasteid // the id of the paste this comment belongs to
|
||||||
$parentid // the id of the parent of this comment, may be the paste id itself
|
$parentid // the id of the parent of this comment, may be the paste id itself
|
||||||
$commentid = substr(hash('md5', $paste['data']), 0, 16);
|
$commentid = substr(hash('md5', $paste['data']), 0, 16);
|
||||||
@ -75,4 +76,5 @@ If you want to create your own data models, you might want to know how the array
|
|||||||
$comment['meta']['nickname'] // text or null (if anonymous)
|
$comment['meta']['nickname'] // text or null (if anonymous)
|
||||||
$comment['meta']['vizhash'] // text or null (if anonymous)
|
$comment['meta']['vizhash'] // text or null (if anonymous)
|
||||||
$comment['meta']['postdate'] // int UNIX timestamp
|
$comment['meta']['postdate'] // int UNIX timestamp
|
||||||
}
|
}
|
||||||
|
```
|
Loading…
Reference in New Issue
Block a user