-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
60104d2
commit 27851d1
Showing
12 changed files
with
78 additions
and
79 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
service_name: travis-ci | ||
coverage_clover: build/logs/clover.xml | ||
# json_path: tests/coveralls-upload.json | ||
#repo_token: VNsS1pG6yyIfxasg8yz8nf9IxTDRttlac |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,12 +21,13 @@ | |
|
||
use Jaybizzle\CrawlerDetect\CrawlerDetect; | ||
use Pluf\Exception; | ||
use Pluf\Middleware; | ||
use Pluf; | ||
use Pluf_HTTP_Request; | ||
use Pluf_HTTP_Response; | ||
use Pluf_Middleware; | ||
use Seo_Backend; | ||
use Seo_Request; | ||
use Pluf\Logger; | ||
|
||
/** | ||
* SEO middleware | ||
|
@@ -35,15 +36,15 @@ | |
* @author maso <[email protected]> | ||
* | ||
*/ | ||
class Render implements Pluf_Middleware | ||
class Render implements Middleware | ||
{ | ||
|
||
/** | ||
* | ||
* {@inheritdoc} | ||
* @see Pluf_Middleware::process_request() | ||
* @see Middleware::process_request() | ||
*/ | ||
function process_request(&$request) | ||
function process_request(Pluf_HTTP_Request &$request) | ||
{ | ||
if ($request->method !== 'GET') { | ||
return false; | ||
|
@@ -94,17 +95,17 @@ function prerenderResponse(Pluf_HTTP_Request $request) | |
return new Pluf_HTTP_Response($response); | ||
} | ||
} catch (Exception $error) { | ||
// TODO: maso, 2014: log the error | ||
Logger::warn('A SEO Prerender Backedn fails to process a request', $backend, $error); | ||
} | ||
} | ||
// No prerender engine is set. So default prerender will be used. | ||
if (Pluf::f('seo.prerender.default.enable', false)) { | ||
if (Pluf::f('seo_prerender_default_enable', false)) { | ||
$backend = new Seo_Backend(); | ||
$backend->title = 'Default global prerenderer'; | ||
$backend->symbol = 'global'; | ||
$backend->engine = 'global'; | ||
$backend->setMeta('period', Pluf::f('.prerender.default.period', '+7 days')); | ||
$backend->setMeta('pattern', Pluf::f('seo.prerender.default.pattern', '.*')); | ||
$backend->setMeta('period', Pluf::f('seo_prerender_default_period', '+7 days')); | ||
$backend->setMeta('pattern', Pluf::f('seo_prerender_default_pattern', '.*')); | ||
return $backend->render($renderRequest); | ||
} | ||
|
||
|
@@ -114,8 +115,10 @@ function prerenderResponse(Pluf_HTTP_Request $request) | |
/** | ||
* | ||
* {@inheritdoc} | ||
* @see Pluf_Middleware::process_response() | ||
* @see Middleware::process_response() | ||
*/ | ||
public function process_response($request, $response) | ||
{} | ||
public function process_response(Pluf_HTTP_Request $request, Pluf_HTTP_Response $response): Pluf_HTTP_Response | ||
{ | ||
return $response; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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