コード例 #1
0
        ],
    ],
    // This section existed, but needs edits:
    'middleware_pipeline' => [
        'pre_routing' => [
            // Add the following:
            [ 'middleware' => ServerUrlMiddleware::class ],
            /* ... */
        ],
        'post_routing' => [
            /* ... */
        ],
    ],
];
```

Once these changes are made, your application should now be ready to use the helpers.

## Future

We're very excited about this release! Thanks to a large number of testers and users,
we've been able to refine the offering, and improve our ability to interoperate in the
PSR-7 ecosystem. We feel this version provides a nice sweet spot for the initial
stable features, and anticipate a stable release in the next couple weeks.

If you are testing Expressive — whether for the first time, or updating an
existing application — please help us polish the release and get it ready
for general availability!
EOC;
$post->setExtended($markdown->convertToHtml($extended));
return $post;
コード例 #2
0
<ul>
    <li>
        <a href="/downloads/latest#ZF1">http://framework.zend.com/downloads/latest#ZF1</a>
    </li>
</ul>

EOS;
$post->setBody($body);
$extended = <<<'EOC'

<h2>Fixes</h2>

<p>
    The primary rationale for the release was a problem introduced by a bugfix in 1.12.10
    with regards to the <code>ViewRenderer</code> action helper. The fix was incorrectly
    resolving the controller name, which led to problems primarily when using a custom
    dispatcher with your application. 1.12.11 introduces a proper fix that addresses the
    original issue, as well as the problem it introduced.
</p>

<p>
    For the full list of changes, visit the changelog:
</p>

<ul>
    <li><a href="/changelog/1.12.11">Changelog</a></li>
</ul>
EOC;
$post->setExtended($extended);
return $post;
コード例 #3
0
ファイル: sample-post.php プロジェクト: vrkansagara/ZFBlog
<?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;