-
Notifications
You must be signed in to change notification settings - Fork 16
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 #3 from BPing/dev
doc(*):文档信息
- Loading branch information
Showing
23 changed files
with
613 additions
and
213 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 |
---|---|---|
@@ -1,7 +1,15 @@ | ||
<?php | ||
|
||
namespace FFMpegPush\Command; | ||
|
||
interface CommandInterface | ||
{ | ||
/** | ||
* 执行命令. | ||
* | ||
* @param mixed $command 命令参数 | ||
* | ||
* @return mixed | ||
*/ | ||
public function command($command); | ||
} | ||
} |
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,29 +1,34 @@ | ||
<?php | ||
|
||
namespace FFMpegPush\Command; | ||
|
||
use FFMpegPush\Configuration; | ||
use FFMpegPush\ConfigurationInterface; | ||
use Psr\Log\LoggerInterface; | ||
|
||
/** | ||
* ffmpeg 可执行命令. | ||
*/ | ||
class FFMpegCommand extends Command | ||
{ | ||
/** | ||
* FFMpegCommand constructor. | ||
* @param array $configuration | ||
* | ||
* @param array $configuration | ||
* @param LoggerInterface|null $logger | ||
*/ | ||
public function __construct($configuration = array(), LoggerInterface $logger = null) | ||
public function __construct($configuration = [], LoggerInterface $logger = null) | ||
{ | ||
$this->name = 'FFMpeg'; | ||
if (!$configuration instanceof ConfigurationInterface) { | ||
$configuration = new Configuration($configuration); | ||
} | ||
$configuration->set('binaries', $configuration->get('ffmpeg.binaries', array('ffmpeg'))); | ||
$configuration->set('binaries', $configuration->get('ffmpeg.binaries', ['ffmpeg'])); | ||
parent::__construct($configuration, $logger); | ||
} | ||
|
||
public static function create($configuration = array(), LoggerInterface $logger = null) | ||
public static function create($configuration = [], LoggerInterface $logger = null) | ||
{ | ||
return new static($configuration, $logger); | ||
} | ||
} | ||
} |
Oops, something went wrong.