Recommend this page to a friend! |
Download .zip |
Info | Documentation | View files (103) | Download .zip | Reputation | Support forum (1) | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2024-01-10 (3 days ago) | 71% | Total: 456 This week: 3 | All time: 6,103 This week: 154 |
Version | License | PHP version | Categories | |||
php-generics 0.35 | BSD License | 5.4 | Networking, PHP 5, Libraries, Logging |
Description | Author | |
This package is a framework for accessing streams, sockets and logs. |
The purpose of this package is to provide some classes for more sophisticated access to ressources. It can be used in any framework or application which intends to use abstract interfaces.
Currently it provides a basic stream API, a socket provider and a logging infrastructure based on the PSR-3. The intention is to extend it with more infrastructure code.
Please take a look into API documentation. To create the API documentation by yourself, please install Apache Ant and execute
ant
Any further execution can be performed without updating the dependencies using command
ant no-update
The API is a test-driven framework and uses PHPUnit to test the stability. Please use ant (if not yet done, see Usage) and execute
ant
This will run all available test suites in tests/*. The command performs also some basic checks for copy&paste code parts and calculate the code quality.
Feel free to write and publish further tests.
In case of an error please report bugs using a PHPUnit test class. Take a look into the tests/ sub folders to see examples how to do create a new one.
The whole package is published under the terms of second BSD License (BSD2). Take a look into LICENSE.md
This framework makes use of composer available at https://getcomposer.org/ to generate API documentation and perform tests.
Files |
File | Role | Description | ||
---|---|---|---|---|
contrib (1 file) | ||||
src (1 directory) | ||||
tests (7 directories) | ||||
.travis.yml | Data | Travis Ci configuration | ||
build.xml | Data | Ant build script | ||
composer.json | Data | Auxiliary data | ||
LICENSE.md | Lic. | Auxiliary data | ||
phpcs.xml | Data | PHPCodeSniffer configuration | ||
phpdox.xml | Data | PHPDox configuration | ||
phpmd.xml | Data | PHPMessDetector configuration | ||
phpunit.xml | Data | PHPUnit configuration | ||
README.md | Doc. | Auxiliary data |
Files | / | src | / | Generics |
File | Role | Description | ||
---|---|---|---|---|
Client (8 files) | ||||
Logger (10 files) | ||||
Socket (10 files) | ||||
Streams (11 files, 1 directory) | ||||
Util (8 files) | ||||
DeprecatedException.php | Class | Class source | ||
DirectoryException.php | Class | Derived exception | ||
FileExistsException.php | Class | Derived Exception | ||
FileNotFoundException.php | Class | Derived Exception | ||
GenericsException.php | Class | Derived Exception | ||
Lockable.php | Class | Lockable interface | ||
LockException.php | Class | Derived exception | ||
NoAccessException.php | Class | Derived Exception | ||
NoticeException.php | Class | Class source | ||
RecoverableErrorException.php | Class | Class source | ||
ResetException.php | Class | Derived exception | ||
Resettable.php | Class | Resettable interface | ||
UserDeprecatedException.php | Class | Class source | ||
UserErrorException.php | Class | Class source | ||
UserNoticeException.php | Class | Class source | ||
UserWarningException.php | Class | Class source | ||
WarningException.php | Class | Class source |
Files | / | src | / | Generics | / | Client |
File | Role | Description |
---|---|---|
HttpClient.php | Class | HTTP Client |
HttpClientFactory.php | Class | Class source |
HttpClientTrait.php | Class | Class source |
HttpException.php | Class | Derived Exception |
HttpHeadersTrait.php | Class | Class source |
HttpsClient.php | Class | Class source |
HttpStatus.php | Class | HTTP Status support |
Session.php | Class | Session wrapper class |
Files | / | src | / | Generics | / | Logger |
File | Role | Description |
---|---|---|
BasicLogger.php | Class | Common logging functionality |
ConsoleLogger.php | Class | Basic console logger |
DumpLogger.php | Class | Dumping variables logger interface |
DumpLoggerTrait.php | Class | Trait for logging dumps |
ExceptionLogger.php | Class | Exception logger interface |
ExceptionLoggerTrait.php | Class | Trait for logging exceptions |
ExtendedConsoleLogger.php | Class | Extended console logger |
ExtendedLogger.php | Class | Extended logger |
LoggerTrait.php | Class | Trait for generic logging |
SimpleLogger.php | Class | Simple logger implementation against PSR-3 |
Files | / | src | / | Generics | / | Socket |
File | Role | Description |
---|---|---|
ClientSocket.php | Class | Client socket implementation |
Endpoint.php | Class | Socket enpoint dataholder |
InvalidUrlException.php | Class | Derived Exception |
SecureClientSocket.php | Class | Class source |
SecureSocket.php | Class | Class source |
ServerSocket.php | Class | Server socket implementation |
ServiceCallback.php | Class | Server socket callback interface |
Socket.php | Class | Socket interface |
SocketException.php | Class | Derived Exception |
Url.php | Class | Url class |
Files | / | src | / | Generics | / | Streams |
File | Role | Description | ||
---|---|---|---|---|
Interceptor (3 files) | ||||
FileInputStream.php | Class | File input stream implementation | ||
FileOutputStream.php | Class | File output stream implementation | ||
HttpStream.php | Class | Http stream interface | ||
InputOutputStream.php | Class | Input/output stream interface | ||
InputStream.php | Class | Input stream interface | ||
MemoryStream.php | Class | Memory stream implementation | ||
OutputStream.php | Class | Output stream interface | ||
SocketStream.php | Class | Socket stream interface | ||
StandardOutputStream.php | Class | Class source | ||
Stream.php | Class | Stream interface | ||
StreamException.php | Class | Derived Exception |
Files | / | src | / | Generics | / | Streams | / | Interceptor |
File | Role | Description |
---|---|---|
AbstractStreamInterceptor.php | Class | Class source |
CachedStreamInterceptor.php | Class | Class source |
StreamInterceptor.php | Class | Class source |
Files | / | src | / | Generics | / | Util |
File | Role | Description |
---|---|---|
Arrays.php | Class | Arrays support utilities |
BasicAuth.php | Class | HTTP Basic Auth class |
Directory.php | Class | Directory utitlity class |
EndpointParser.php | Class | EndpointParser class |
ExceptionErrorHandler.php | Class | Class source |
Interpolator.php | Class | Trait for interpolating |
RandomString.php | Class | Class to generate a random string with specific length |
UrlParser.php | Class | UrlParser class |
Files | / | tests |
File | Role | Description | ||
---|---|---|---|---|
exception-tests (1 file) | ||||
http-tests (4 files) | ||||
logger-tests (2 files) | ||||
manually (5 files) | ||||
socket-tests (4 files) | ||||
stream-tests (4 files) | ||||
util-tests (6 files) |
Files | / | tests | / | exception-tests |
File | Role | Description |
---|---|---|
ExceptionTest.php | Test | Unit test for exceptions |
Files | / | tests | / | http-tests |
File | Role | Description |
---|---|---|
HttpClientFactoryTest.php | Class | Class source |
HttpClientTest.php | Test | HTTP Client unit test |
HttpsClientTest.php | Class | Class source |
SessionsTest.php | Class | Class source |
Files | / | tests | / | logger-tests |
File | Role | Description |
---|---|---|
ExtendedLoggerTest.php | Test | Unit test for extended logger |
SimpleLoggerTest.php | Test | Unit test script |
Files | / | tests | / | manually |
File | Role | Description |
---|---|---|
ClientTestManually.php | Test | Unit test for manually testing ClientSocket |
HttpClientHeadTestManually.php | Test | Manually test the http client header retrieval |
HttpClientTestManually.php | Test | Unit test for manually testing HttpClientSocket |
ServerTestManually.php | Test | Unit test for manually testing ServerSocket |
TestServerSocketCallback.php | Class | Callback for manually testing ServerSocket |
Files | / | tests | / | socket-tests |
File | Role | Description |
---|---|---|
ClientSocketTest.php | Test | Unit test script |
ServerSocketTest.php | Test | Unit test script |
TestServiceCallback.php | Class | Callback for unit test for manually testing ServerSocket |
UrlTest.php | Test | Url class test |
Files | / | tests | / | stream-tests |
File | Role | Description |
---|---|---|
FileInputStreamTest.php | Test | Unit test script |
FileOutputStreamTest.php | Test | Unit test script |
MemoryStreamTest.php | Test | Unit test script |
StandardOutputStreamTest.php | Class | Class source |
Files | / | tests | / | util-tests |
File | Role | Description |
---|---|---|
ArraysTest.php | Test | Testing Arrays support utilities |
DirectoryTest.php | Test | Unit test for Directory utility class |
EndpointParserTest.php | Test | EndpointParser class test |
ExceptionErrorHandlerTest.php | Class | Class source |
HttpStatusTest.php | Test | HttpStatus class test |
UrlParserTest.php | Test | UrlParser class test |
Version Control | Reuses | Unique User Downloads | Download Rankings | ||||||||||||||||
100% | 2 |
|
|
User Ratings | User Comments (1) | ||||||||||||||||||||||||||||||||||
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.
Other classes that need this package |
Class | Why it is needed | Dependency |
---|---|---|
Caribu ORM | Logging & Interpolation | Required |
PHP Git Library Provider | Several general purpose classes such as Directory and logging exists already there | Required |
Related pages |
Dynamic generated API documentation |
Unit test code coverage statistics |