-
Notifications
You must be signed in to change notification settings - Fork 3
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 #10 from Nekland/feature/temporary-file-helper
Add new feature : TemporaryFile class
- Loading branch information
Showing
20 changed files
with
557 additions
and
3 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
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<phpunit bootstrap="vendor/autoload.php" colors="true"> | ||
<testsuites> | ||
<testsuite name="Nekland Tools"> | ||
<directory suffix="Test.php">./tests/Nekland</directory> | ||
</testsuite> | ||
</testsuites> | ||
|
||
<filter> | ||
<whitelist> | ||
<directory>./</directory> | ||
<exclude> | ||
<directory>./docs</directory> | ||
<directory>./tests</directory> | ||
<directory>./vendor</directory> | ||
</exclude> | ||
</whitelist> | ||
</filter> | ||
</phpunit> |
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
/** | ||
* This file is a part of NeklandTools package. | ||
* | ||
* (c) Nekland <[email protected]> | ||
* | ||
* For the full license, take a look to the LICENSE file | ||
* on the root directory of this project | ||
*/ | ||
|
||
namespace Nekland\Utils\Exception; | ||
|
||
class LogicException extends \LogicException implements NeklandExceptionInterface | ||
{ | ||
|
||
} |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
/** | ||
* This file is a part of NeklandTools package. | ||
* | ||
* (c) Nekland <[email protected]> | ||
* | ||
* For the full license, take a look to the LICENSE file | ||
* on the root directory of this project | ||
*/ | ||
|
||
namespace Nekland\Utils\Exception; | ||
|
||
interface NeklandExceptionInterface | ||
{ | ||
} |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
/** | ||
* This file is a part of NeklandTools package. | ||
* | ||
* (c) Nekland <[email protected]> | ||
* | ||
* For the full license, take a look to the LICENSE file | ||
* on the root directory of this project | ||
*/ | ||
|
||
namespace Nekland\Utils\Exception; | ||
|
||
class RuntimeException extends \RuntimeException implements NeklandExceptionInterface | ||
{ | ||
|
||
} |
17 changes: 17 additions & 0 deletions
17
src/Utils/Tempfile/Exception/CannotCreateFileException.php
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
/** | ||
* This file is a part of NeklandTools package. | ||
* | ||
* (c) Nekland <[email protected]> | ||
* | ||
* For the full license, take a look to the LICENSE file | ||
* on the root directory of this project | ||
*/ | ||
|
||
namespace Nekland\Utils\Tempfile\Exception; | ||
|
||
use Nekland\Utils\Exception\RuntimeException; | ||
|
||
class CannotCreateFileException extends RuntimeException | ||
{ | ||
} |
21 changes: 21 additions & 0 deletions
21
src/Utils/Tempfile/Exception/ImpossibleToCreateDirectoryException.php
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
/** | ||
* This file is a part of NeklandTools package. | ||
* | ||
* (c) Nekland <[email protected]> | ||
* | ||
* For the full license, take a look to the LICENSE file | ||
* on the root directory of this project | ||
*/ | ||
|
||
namespace Nekland\Utils\Tempfile\Exception; | ||
|
||
use Nekland\Utils\Exception\RuntimeException; | ||
|
||
class ImpossibleToCreateDirectoryException extends RuntimeException | ||
{ | ||
public function __construct($directory = "", $code = 0, $previous = null) | ||
{ | ||
parent::__construct(sprintf('Impossible to create directory "%s".', $directory), $code, $previous); | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
src/Utils/Tempfile/Exception/ImpossibleToUpdateFileException.php
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
/** | ||
* This file is a part of NeklandTools package. | ||
* | ||
* (c) Nekland <[email protected]> | ||
* | ||
* For the full license, take a look to the LICENSE file | ||
* on the root directory of this project | ||
*/ | ||
|
||
namespace Nekland\Utils\Tempfile\Exception; | ||
|
||
use Nekland\Utils\Exception\RuntimeException; | ||
|
||
class ImpossibleToUpdateFileException extends RuntimeException | ||
{ | ||
} |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
/** | ||
* This file is a part of NeklandTools package. | ||
* | ||
* (c) Nekland <[email protected]> | ||
* | ||
* For the full license, take a look to the LICENSE file | ||
* on the root directory of this project | ||
*/ | ||
|
||
namespace Nekland\Utils\Tempfile\Exception; | ||
|
||
use Nekland\Utils\Exception\LogicException; | ||
|
||
class InvalidArgumentException extends LogicException | ||
{ | ||
|
||
} |
22 changes: 22 additions & 0 deletions
22
src/Utils/Tempfile/Exception/TemporaryFileAlreadyRemovedException.php
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
/** | ||
* This file is a part of NeklandTools package. | ||
* | ||
* (c) Nekland <[email protected]> | ||
* | ||
* For the full license, take a look to the LICENSE file | ||
* on the root directory of this project | ||
*/ | ||
|
||
namespace Nekland\Utils\Tempfile\Exception; | ||
|
||
use Nekland\Utils\Exception\LogicException; | ||
|
||
class TemporaryFileAlreadyRemovedException extends LogicException | ||
{ | ||
public function __construct($path = "", $code = 0, $previous = null) | ||
{ | ||
$message = \sprintf('The file "%s" has already been removed.', $path); | ||
parent::__construct($message, $code, $previous); | ||
} | ||
} |
Oops, something went wrong.