Skip to content

Commit d074745

Browse files
committed
Create a seam to extract search endpoint to improve readability
elifesciences/issues#9169
1 parent f6e328a commit d074745

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/endpoints/Search.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
3+
use Silex\Application;
4+
5+
class Search
6+
{
7+
public static function add(Application $app)
8+
{
9+
return $app;
10+
}
11+
}

web/index.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
<?php
22

3+
require_once( __DIR__.'/../src/endpoints/Search.php');
34
$app = require __DIR__.'/../src/bootstrap.php';
45

6+
$app = Search::add($app);
7+
58
$app->run();

0 commit comments

Comments
 (0)