This repository has been archived by the owner on Feb 5, 2019. It is now read-only.
-
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.
Merge pull request #13 from CodeIncHQ/2.x
v2.0.2
- Loading branch information
Showing
4 changed files
with
13 additions
and
11 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
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,7 +21,7 @@ | |
// | ||
declare(strict_types=1); | ||
namespace CodeInc\AssetsMiddleware\Responses; | ||
use CodeInc\Psr7Responses\FileResponse; | ||
use CodeInc\Psr7Responses\LocalFileResponse; | ||
|
||
|
||
/** | ||
|
@@ -30,7 +30,7 @@ | |
* @package CodeInc\AssetsMiddleware\Responses | ||
* @author Joan Fabrégat <[email protected]> | ||
*/ | ||
class AssetResponse extends FileResponse implements AssetResponseInterface | ||
class AssetResponse extends LocalFileResponse implements AssetResponseInterface | ||
{ | ||
/** | ||
* @var string | ||
|
@@ -41,18 +41,19 @@ class AssetResponse extends FileResponse implements AssetResponseInterface | |
* AssetResponse constructor. | ||
* | ||
* @param string $assetPath | ||
* @param string $mediaType | ||
* @param string $contentType | ||
* @throws \CodeInc\MediaTypes\Exceptions\MediaTypesException | ||
*/ | ||
public function __construct(string $assetPath, string $mediaType) | ||
public function __construct(string $assetPath, string $contentType) | ||
{ | ||
$this->assetPath = $assetPath; | ||
parent::__construct( | ||
$assetPath, | ||
basename($assetPath), | ||
200, | ||
'', | ||
$mediaType, | ||
null, | ||
$contentType, | ||
null, | ||
false | ||
); | ||
} | ||
|
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,7 +21,7 @@ | |
// | ||
declare(strict_types=1); | ||
namespace CodeInc\AssetsMiddleware\Responses; | ||
use CodeInc\Psr7Responses\EmptyResponse; | ||
use CodeInc\Psr7Responses\NotModifiedResponse; | ||
|
||
|
||
/** | ||
|
@@ -30,7 +30,7 @@ | |
* @package CodeInc\AssetsMiddleware\Responses | ||
* @author Joan Fabrégat <[email protected]> | ||
*/ | ||
class NotModifiedAssetResponse extends EmptyResponse implements AssetResponseInterface | ||
class NotModifiedAssetResponse extends NotModifiedResponse implements AssetResponseInterface | ||
{ | ||
/** | ||
* @var string | ||
|
@@ -45,7 +45,7 @@ class NotModifiedAssetResponse extends EmptyResponse implements AssetResponseInt | |
public function __construct(string $assetPath) | ||
{ | ||
$this->assetPath = $assetPath; | ||
parent::__construct(304); | ||
parent::__construct(); | ||
} | ||
|
||
/** | ||
|