Пример #1
0
<?php

use PhlyBlog\AuthorEntity;
use PhlyBlog\EntryEntity;
$entry = new EntryEntity();
$author = new AuthorEntity();
$author->fromArray(array('id' => 'yourusername', 'name' => 'Your Full Name', 'email' => '*****@*****.**', '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;
Пример #2
0
<?php

// @codingStandardsIgnoreFile
use League\CommonMark\CommonMarkConverter;
use PhlyBlog\AuthorEntity;
use PhlyBlog\EntryEntity;
$author = new AuthorEntity();
$author->setId('matthew');
$author->setName("Matthew Weier O'Phinney");
$author->setEmail('*****@*****.**');
$author->setUrl('http://mwop.net/');
$markdown = new CommonMarkConverter();
$post = new EntryEntity();
$post->setId('2015-12-10-zf3-biweekly-update');
$post->setTitle('Zend Framework 3 Update for 2015-12-10');
$post->setAuthor($author);
$post->setDraft(false);
$post->setPublic(true);
$post->setCreated(new DateTime('2015-12-10 10:50', new DateTimezone('America/Chicago')));
$post->setUpdated(new DateTime('2015-12-10 10:50', new DateTimezone('America/Chicago')));
$body = <<<'EOS'
Per our [previous ZF3 update](/blog/zend-framework-3-update-and-roadmap.html), this is the
first in an ongoing series of bi-weekly posts on ZF3 development status.

The highlights:

- &gt;80 pull requests merged
- 28 releases of components
- 9 components updated to zend-servicemanager/zend-eventmanager v3 changes
- 2 release candidates of expressive
EOS;
<?php

use PhlyBlog\AuthorEntity;
use PhlyBlog\EntryEntity;
$author = new AuthorEntity();
$author->setId('matthew');
$author->setName("Matthew Weier O'Phinney");
$author->setEmail('*****@*****.**');
$author->setUrl('http://mwop.net/');
$post = new EntryEntity();
$post->setId('2013-03-27-zf1-git-migration');
$post->setTitle('Zend Framework 1 is Migrating to Git!');
$post->setAuthor($author);
$post->setDraft(false);
$post->setPublic(true);
$post->setCreated(new DateTime('2013-03-27 11:45', new DateTimezone('America/Chicago')));
$post->setUpdated(new DateTime('2013-03-27 11:45', new DateTimezone('America/Chicago')));
$body = <<<'EOS'
<p>
    Since its inception, Zend Framework 1 has used <a 
    href="http://subversion.apache.org/">Subversion</a>
    for versioning. However, as we approach its end-of-life (which will occur 
    12-18 months from the time this post is written), and as our experience
    with ZF2 processes becomes more familiar, we -- the Zend team and the Community
    Review team -- feel that we can better support ZF1 via <a href="http://github.com">GitHub</a>.
</p>

<p>
    As such, we will be migrating the ZF1 Subversion repository to GitHub this 
    week. Please read on for details!
</p>
<?php

use PhlyBlog\AuthorEntity;
use PhlyBlog\EntryEntity;
$author = new AuthorEntity();
$author->setId('matthew');
$author->setName("Matthew Weier O'Phinney");
$author->setEmail('*****@*****.**');
$author->setUrl('http://mwop.net/');
$post = new EntryEntity();
$post->setId('2013-03-14-zend-framework-3-for-1-release-day');
$post->setTitle('Zend Framework 2.1.4, 2.0.8, and 1.12.3 Released!');
$post->setAuthor($author);
$post->setDraft(false);
$post->setPublic(true);
$post->setCreated(new DateTime('2013-03-14 10:30', new DateTimezone('America/Chicago')));
$post->setUpdated(new DateTime('2013-03-14 10:30', new DateTimezone('America/Chicago')));
$body = <<<'EOS'
<p>
    The Zend Framework community is pleased to announce the immediate availability
    of three new releases: 2.1.4, 2.0.8, and 1.12.3!  Packages and installation 
    instructions are available at:
</p>

<ul>
    <li>
        <a href="/downloads/latest">http://framework.zend.com/downloads/latest</a>
    </li>
</ul>

<p>
<?php

use PhlyBlog\AuthorEntity;
use PhlyBlog\EntryEntity;
$author = new AuthorEntity();
$author->setId('robertbasic');
$author->setName("Robert Basic");
$author->setEmail('*****@*****.**');
$author->setUrl('http://robertbasic.com/');
$post = new EntryEntity();
$post->setId('2013-03-28-help-us-improve-the-documentation');
$post->setTitle('Help us improve the documentation!');
$post->setAuthor($author);
$post->setDraft(false);
$post->setPublic(true);
$post->setCreated(new DateTime('2013-03-28 10:15', new DateTimezone('Europe/Belgrade')));
$post->setUpdated(new DateTime('2013-03-28 10:15', new DateTimezone('Europe/Belgrade')));
$body = <<<'EOS'
<p>
    A piece of software is only as good as its documentation. The Zend 
    Framework team and a dozen or so contributors are working hard to 
    improve the Zend Framework 2 documentation, but we still want <em>you</em> 
    to help us improve it even more. Any kind of help is welcome and greatly 
    appreciated.
</p>

<p>
    First of all, you don't have to have a major in English literature to help 
    us with the documentation. We, the contributors, come from all over the 
    world and many of us use English as a second &mdash; or even third! &mdash; 
    language, but that does not stop us from trying to improve the docs. Neither