-
Notifications
You must be signed in to change notification settings - Fork 17
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 #48 from bushbaby/deprated-php71
Deprated php71
- Loading branch information
Showing
54 changed files
with
776 additions
and
370 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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
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,52 @@ | ||
<?php | ||
|
||
/** | ||
* BsbFlystem | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
* | ||
* @see https://bushbaby.nl/ | ||
* | ||
* @copyright Copyright (c) 2014-2019 bushbaby multimedia. (https://bushbaby.nl) | ||
* @author Bas Kamer <[email protected]> | ||
* @license MIT | ||
* | ||
* @package bushbaby/flysystem | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace BsbFlysystem\Adapter\Factory; | ||
|
||
use BsbFlysystem\Exception\UnexpectedValueException; | ||
use League\Flysystem\Adapter\Ftpd as Adapter; | ||
use League\Flysystem\AdapterInterface; | ||
use Psr\Container\ContainerInterface; | ||
|
||
class FtpdAdapterFactory extends AbstractAdapterFactory | ||
{ | ||
public function doCreateService(ContainerInterface $container): AdapterInterface | ||
{ | ||
return new Adapter($this->options); | ||
} | ||
|
||
protected function validateConfig(): void | ||
{ | ||
if (! isset($this->options['host'])) { | ||
throw new UnexpectedValueException("Missing 'host' as option"); | ||
} | ||
|
||
if (! isset($this->options['port'])) { | ||
throw new UnexpectedValueException("Missing 'port' as option"); | ||
} | ||
|
||
if (! isset($this->options['username'])) { | ||
throw new UnexpectedValueException("Missing 'username' as option"); | ||
} | ||
|
||
if (! isset($this->options['password'])) { | ||
throw new UnexpectedValueException("Missing 'password' as option"); | ||
} | ||
} | ||
} |
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,59 @@ | ||
<?php | ||
|
||
/** | ||
* BsbFlystem | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
* | ||
* @see https://bushbaby.nl/ | ||
* | ||
* @copyright Copyright (c) 2014-2019 bushbaby multimedia. (https://bushbaby.nl) | ||
* @author Bas Kamer <[email protected]> | ||
* @license MIT | ||
* | ||
* @package bushbaby/flysystem | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace BsbFlysystem\Adapter\Factory; | ||
|
||
use BsbFlysystem\Exception\RequirementsException; | ||
use BsbFlysystem\Exception\UnexpectedValueException; | ||
use Google\Cloud\Storage\StorageClient; | ||
use League\Flysystem\AdapterInterface; | ||
use Psr\Container\ContainerInterface; | ||
use Superbalist\Flysystem\GoogleStorage\GoogleStorageAdapter as Adapter; | ||
|
||
class GoogleCloudDriveAdapterFactory extends AbstractAdapterFactory | ||
{ | ||
public function doCreateService(ContainerInterface $container): AdapterInterface | ||
{ | ||
if (! \class_exists(Adapter::class)) { | ||
throw new RequirementsException( | ||
['superbalist/flysystem-google-storage'], | ||
'GoogleCloudDrive' | ||
); | ||
} | ||
|
||
$storageClient = new StorageClient([ | ||
'projectId' => $this->options['project_id'], | ||
]); | ||
|
||
$bucket = $storageClient->bucket($this->options['bucket']); | ||
|
||
return new Adapter($storageClient, $bucket); | ||
} | ||
|
||
protected function validateConfig(): void | ||
{ | ||
if (! isset($this->options['project_id'])) { | ||
throw new UnexpectedValueException("Missing 'project_id' as option"); | ||
} | ||
|
||
if (! isset($this->options['bucket'])) { | ||
throw new UnexpectedValueException("Missing 'bucket' as option"); | ||
} | ||
} | ||
} |
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
Oops, something went wrong.