This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace AppBundle\Integration\TheCatApi; | |
use AppBundle\Integration\TheCatApi\Value\TheCatApiValue; | |
use eZ\Publish\Core\MVC\ConfigResolverInterface; | |
use Http\Client\HttpClient; | |
use Http\Message\MessageFactory; | |
use Psr\Http\Message\RequestInterface; | |
use Symfony\Component\HttpFoundation\Request; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Varnish VCL for: | |
// - Varnish 5.1 or higher (6.0LTS recommended, and is what we mainly test against) | |
// - Varnish xkey vmod (via varnish-modules package 0.10.2 or higher, or via Varnish Plus) | |
// - eZ Platform 2.5LTS or higher with ezplatform-http-cache (this) bundle | |
// | |
// Make sure to at least adjust default parameters.yml, defaults there reflect our testing needs with docker. | |
vcl 4.1; | |
import std; | |
import xkey; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Httplug configuration | |
httplug: | |
plugins: | |
logger: ~ | |
clients: | |
app: | |
factory: httplug.factory.guzzle6 | |
plugins: [httplug.plugin.logger] | |
second: | |
factory: httplug.factory.curl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
composer require "php-http/guzzle6-adapter:~1.0" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new Http\HttplugBundle\HttplugBundle() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
composer require "php-http/httplug-bundle:^1.15.2" "php-http/curl-client:^1.7.1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Httplug configuration | |
httplug: | |
plugins: | |
logger: ~ | |
clients: | |
app: | |
factory: httplug.factory.guzzle6 | |
plugins: [httplug.plugin.logger] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends '@ezdesign/pagelayout.html.twig' %} | |
{% block content %} | |
<h1>TheCatAPI - Cats as a Service, Everyday is Caturday.</h1> | |
<h3>Available categories</h3> | |
{% if categories|length > 0 %} | |
<ul> | |
{% for category in categories %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ezpublish: | |
system: | |
site_group: | |
content_view: | |
full: | |
main_page: | |
template: '@ezdesign/default/content/full.html.twig' | |
controller: 'app.controller.cat_api' | |
match: | |
Id\Location: 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
namespace AppBundle\Controller; | |
use AppBundle\Http\CatApiClient; | |
use eZ\Publish\Core\MVC\Symfony\Controller\Controller; | |
use eZ\Publish\Core\MVC\Symfony\View\ContentView; |