Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

38 lines (32 sloc) 0.899 kb
<?php
use PhlyBlog\AuthorEntity;
use PhlyBlog\EntryEntity;
$entry = new EntryEntity();
$author = new AuthorEntity();
$author->fromArray(array(
'id' => 'yourusername',
'name' => 'Your Full Name',
'email' => 'you@your.tld',
'url' => 'http://your.tld/',
));
$entry->setId('this-is-the-stub-used-in-the-uri-and-should-be-unique');
$entry->setTitle('New site!');
$entry->setAuthor($author);
$entry->setDraft(false);
$entry->setPublic(true);
$entry->setCreated(1300744335);
$entry->setUpdated(1301034313);
$entry->setTimezone('America/New_York');
$entry->setTags(array('php', 'personal'));
$body =<<<'EOT'
<p>
This is the principal body of the post, and will be shown everywhere.
</p>
EOT;
$entry->setBody($body);
$extended =<<<'EOT'
This is the extended portion of the entry, and is only shown in the main entry
views.
EOT;
$entry->setExtended($extended);
return $entry;
Jump to Line
Something went wrong with that request. Please try again.