refactor: Move exceptions and streams to seperate namespaces
This commit is contained in:
parent
1a6ff90eac
commit
e13404903b
11 changed files with 24 additions and 14 deletions
|
@ -5,6 +5,8 @@
|
|||
|
||||
namespace Alltube;
|
||||
|
||||
use Alltube\Exception\EmptyUrlException;
|
||||
use Alltube\Exception\PasswordException;
|
||||
use Exception;
|
||||
use GuzzleHttp\Client;
|
||||
use GuzzleHttp\Psr7\Response;
|
||||
|
@ -65,6 +67,7 @@ class Video
|
|||
|
||||
/**
|
||||
* URLs of the video files.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $urls;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* EmptyUrlException class.
|
||||
*/
|
||||
|
||||
namespace Alltube;
|
||||
namespace Alltube\Exception;
|
||||
|
||||
use Exception;
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
* PasswordException class.
|
||||
*/
|
||||
|
||||
namespace Alltube;
|
||||
namespace Alltube\Exception;
|
||||
|
||||
use Exception;
|
||||
|
|
@ -3,8 +3,9 @@
|
|||
* ConvertedPlaylistArchiveStream class.
|
||||
*/
|
||||
|
||||
namespace Alltube;
|
||||
namespace Alltube\Stream;
|
||||
|
||||
use Alltube\Video;
|
||||
use Slim\Http\Stream;
|
||||
|
||||
/**
|
|
@ -3,8 +3,9 @@
|
|||
* PlaylistArchiveStream class.
|
||||
*/
|
||||
|
||||
namespace Alltube;
|
||||
namespace Alltube\Stream;
|
||||
|
||||
use Alltube\Video;
|
||||
use Barracuda\ArchiveStream\ZipArchive;
|
||||
use Psr\Http\Message\StreamInterface;
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
* YoutubeChunkStream class.
|
||||
*/
|
||||
|
||||
namespace Alltube;
|
||||
namespace Alltube\Stream;
|
||||
|
||||
use GuzzleHttp\Psr7\Response;
|
||||
use Psr\Http\Message\StreamInterface;
|
||||
|
@ -17,6 +17,7 @@ class YoutubeChunkStream implements StreamInterface
|
|||
|
||||
/**
|
||||
* HTTP response containing the video chunk.
|
||||
*
|
||||
* @var Response
|
||||
*/
|
||||
private $response;
|
||||
|
@ -173,7 +174,7 @@ class YoutubeChunkStream implements StreamInterface
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the remaining contents in a string
|
||||
* Returns the remaining contents in a string.
|
||||
*
|
||||
* @return string
|
||||
*/
|
|
@ -3,9 +3,11 @@
|
|||
* YoutubeStream class.
|
||||
*/
|
||||
|
||||
namespace Alltube;
|
||||
namespace Alltube\Stream;
|
||||
|
||||
use Alltube\Video;
|
||||
use GuzzleHttp\Psr7\AppendStream;
|
||||
use Psr\Http\Message\StreamInterface;
|
||||
|
||||
/**
|
||||
* Stream that downloads a video in chunks.
|
Loading…
Add table
Add a link
Reference in a new issue