package.xml 0000644 0011611 0000144 00000027462 13524411442 011712 0 ustar rin users
psr
pecl.php.net
PSR interfaces
This extension provides the accepted PSR interfaces, so they can be used in an extension.
See http://www.php-fig.org/psr/
John Boehr
jbboehr
jbboehr@php.net
yes
2019-08-13
0.7.0
0.7.0
stable
stable
BSD-2-Clause
- Preliminary PHP 7.4 and 8.0 (master) support
- PSR-14 Event Dispatcher support (@flyinghail)
- Removed PHP 5 support
7.0.0
7.4.99
1.4.1
psr
psr-0.7.0/CHANGELOG.md 0000644 0011611 0000144 00000005634 13524411442 012647 0 ustar rin users # Changelog
All Notable changes to `php-psr` will be documented in this file.
Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
## [0.7.0] - 2019-08-12
### Added
- Preliminary PHP 7.4 and 8.0 (master) support
- PSR-14 Event Dispatcher support
### Removed
- PHP 5 support
## [0.6.1] - 2018-11-13
### Fixed
- Test failures on PHP 5.6
## [0.6.0] - 2018-11-11
### Added
- PSR-18 HTTP Client support
## [0.5.1] - 2018-10-29
### Fixed
- `Psr\Http\Message\ServerRequestInterface` did not actually extend `Psr\Http\Message\RequestInterface`
## [0.5.0] - 2018-09-10
### Added
- PSR-17 HTTP Factories support
- Whitelist PHP 7.3
## [0.4.0] - 2018-03-05
### Added
- PSR-15 HTTP Handlers support
## [0.3.0] - 2018-02-08
### Added
- PSR-11 Container support
- PSR-13 Link support
- PSR-16 Simple Cache support
- Windows support
### Removed
- No longer run CI against PHP 5 due to lack of support in libraries
### Fixed
- TypeError when no argument is passed to methods in AbstractLogger
## [0.2.3] - 2016-05-05
### Changed
- Changed the license from `LGPLv3` to `Simplified BSD License`
- Move PHP5/7 compatibility macros into separate header
## [0.2.2] - 2016-03-16
### Added
- arginfo for interfaces in headers
### Fixed
- Memory leak in Psr\Log\AbstractLogger::log()
## [0.2.1] - 2015-12-15
### Changed
- PSR-6 [psr/cache](https://github.com/php-fig/cache) v1.0.0 is released without changes to interfaces since commit [4908941](https://github.com/php-fig/cache/commit/4908941)
- Test PSR-6 interfaces against Stash v1.0.0-dev branch
### Fixed
- Memory leak in Psr\Log\AbstractLogger::log() with PHP7
## [0.2.0] - 2015-12-09
### Changed
- Update PSR-6 interfaces for commits up to [4908941](https://github.com/php-fig/cache/commit/4908941)
### Fixed
- Invalid read in Psr\Log\AbstractLogger::log()
## 0.1.0 - 2015-08-07
### Added
- PSR-3 [psr/log](https://github.com/php-fig/log) v1.0.0 interfaces and classes
- PSR-6 [commit 2b812a4](https://github.com/php-fig/fig-standards/commit/2b812a4) interfaces
- PSR-7 [psr/http-message](https://github.com/php-fig/http-message) v1.0.0 interfaces
[Unreleased]: https://github.com/jbboehr/php-psr/compare/v0.7.0...HEAD
[0.7.0]: https://github.com/jbboehr/php-psr/compare/v0.6.1...v0.7.0
[0.6.1]: https://github.com/jbboehr/php-psr/compare/v0.6.0...v0.6.1
[0.6.0]: https://github.com/jbboehr/php-psr/compare/v0.5.1...v0.6.0
[0.5.1]: https://github.com/jbboehr/php-psr/compare/v0.5.0...v0.5.1
[0.5.0]: https://github.com/jbboehr/php-psr/compare/v0.4.0...v0.5.0
[0.4.0]: https://github.com/jbboehr/php-psr/compare/v0.3.0...v0.4.0
[0.3.0]: https://github.com/jbboehr/php-psr/compare/v0.2.3...v0.3.0
[0.2.3]: https://github.com/jbboehr/php-psr/compare/v0.2.2...v0.2.3
[0.2.2]: https://github.com/jbboehr/php-psr/compare/v0.2.1...v0.2.2
[0.2.1]: https://github.com/jbboehr/php-psr/compare/v0.2.0...v0.2.1
[0.2.0]: https://github.com/jbboehr/php-psr/compare/v0.1.0...v0.2.0
psr-0.7.0/LICENSE.md 0000644 0011611 0000144 00000003046 13524411442 012435 0 ustar rin users Simplified BSD License
======================
_Copyright © 2016-2018 John Boehr_
_All rights reserved._
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The views and conclusions contained in the software and documentation are those
of the authors and should not be interpreted as representing official policies,
either expressed or implied, of the FreeBSD Project.
psr-0.7.0/README.md 0000644 0011611 0000144 00000017154 13524411442 012315 0 ustar rin users
# php-psr
[![Build Status][:badge-travis:]][:build-travis:]
[![Build status][:badge-appveyor:]][:build-appveyor:]
[![Coverage Status][:badge-coveralls:]][:build-coveralls:]
[![License][:badge-license:]][:ext-license:]
This PHP extension provides the interfaces from the [PSR][:psr-fig:] standards as established by the [PHP-FIG][:php-fig:] group.
You can use interfaces provided by this extension in another extension easily - see this [example][:example:].
## Interfaces
| PSR | Reference | Tested against |
| --- | --- | --- |
| [PSR-3][:psr-3:] | [psr/log][:psr-log:] [*](#psrlogunimpl) | [monolog][:monolog:] |
| [PSR-6][:psr-6:] | [psr/cache][:psr-cache:] | [Stash][:stash:] and [psx-cache][:psx-cache:] |
| [PSR-7][:psr-7:] | [psr/http-message][:psr-http-message:] | [guzzle/psr7][:guzzle:] |
| [PSR-11][:psr-11:] | [psr/container][:psr-container:] | [league/container][:league-container:] |
| [PSR-13][:psr-13:] | [psr/link][:psr-link:] | [php-fig/link-util][:link-util:] |
| [PSR-14][:psr-14:] | [psr/event-dispatcher][:psr-event-dispatcher:] | [tukio][:tukio:] |
| [PSR-15][:psr-15:] | [psr/http-server-handler][:psr-http-server-handler:] | [equip/dispatch][:dispatch:] |
| [PSR-15][:psr-15:] | [psr/http-server-middleware][:psr-http-server-middleware:] | [middleware/request-handler][:request-handler:] |
| [PSR-16][:psr-16:] | [psr/simple-cache][:psr-simple-cache:] | [psx-cache][:psx-cache:] |
| [PSR-17][:psr-17:] | [psr/http-factory][:psr-http-factory:] | [http-interop/http-factory-guzzle][:http-factory-guzzle:] |
| [PSR-18][:psr-18:] | [psr/http-client][:psr-http-client:] | [ricardofiorani/guzzle-psr18-adapter][:guzzle-psr18-adapter:] |
## Installation
### Linux / macOS
Prerequisite packages are:
- PHP development headers and tools
- `gcc` >= 4.4 | `clang` >= 3.x | `vc` >= 11
- GNU `make` >= 3.81
- `automake`
- `autoconf`
You will need the PHP development headers. If PHP was manually installed, these should be available by default. Otherwise, you will need to fetch them from a repository.
```bash
git clone https://github.com/jbboehr/php-psr.git
cd php-psr
phpize
./configure
make
make test
sudo make install
```
If you have specific PHP versions running:
```bash
git clone https://github.com/jbboehr/php-psr.git
cd php-psr
/usr/local/bin/phpize
./configure --with-php-config=/usr/local/bin/php-config
make
make test
sudo make install
```
Add the extension to your *php.ini*:
```ini
echo extension=psr.so | tee -a /path/to/your/php.ini
```
Finally, _restart the web server_.
### PECL / Windows
You may also be able to install this extension via [PECL][:pecl-psr:]:
```bash
pecl install psr
```
or by downloading a DLL from [PECL][:pecl-psr:] or [windows.php.net][:windows-psr:] and placing it in the appropriate directory.
### Nix/NixOS
```bash
nix-env -i -f https://github.com/jbboehr/php-psr/archive/master.tar.gz
```
with a custom version of PHP:
```bash
nix-env -i -f https://github.com/jbboehr/php-psr/archive/master.tar.gz --arg php '(import {}).php71'
```
or, in a `.nix` file:
```nix
(import {}).callPackage (import (fetchTarball {
url = https://github.com/jbboehr/php-psr/archive/v0.6.0.tar.gz;
sha256 = "1zslwrjpzsvvnr5igy0j6z7hgjvrflzk7j20v6w0pc2v124g5ykk";
})) {}
```
### Using with composer
In your project, you can prevent the installation of the unnecessary composer packages provided by this extension by adding the following to your `composer.json`. You will need to make sure the extension is installed and enabled in your PHP configuration. You may also want to consider leaving them installed to provide stubs to your IDE. This configuration is not suitable for a library published to packagist.
Note: `LoggerInterfaceTest` and `TestLogger` from `psr/log` are not implemented. If you use these classes, you should keep `psr/log` installed ([discussion](https://github.com/jbboehr/php-psr/issues/57)).
```json
{
"name": "sample/app",
"require": {
"ext-psr": "*"
},
"provide": {
"psr/log": "^1",
"psr/cache": "^1",
"psr/http-message": "^1",
"psr/container": "^1",
"psr/link": "^1",
"psr/event-dispatcher": "^1",
"psr/http-server-handler": "^1",
"psr/http-server-middleware": "^1",
"psr/simple-cache": "^1",
"psr/http-factory": "^1",
"psr/http-client": "^1"
},
}
```
This will use this PHP extension instead of downloading from packagist.
## Credits
* [@sergeyklay][:github-sergeyklay:] - Appveyor and documentation improvements
* [@flyinghail][:github-flyinghail:] - PSR-14, PSR-15, PSR-17, and PSR-18 support
* [@Jan-E][:github-jan-e:] - Original appveyor template
## License
This project is open source software licensed under the Simplified BSD License.
See the [LICENSE.md][:ext-license:] file for more information.
PSR Interfaces: Copyright (c) 2012-present [PHP Framework Interoperability Group][:php-fig:].
[:psr-fig:]: https://www.php-fig.org/psr
[:php-fig:]: https://www.php-fig.org
[:pecl-psr:]: https://pecl.php.net/package/psr
[:badge-travis:]: https://travis-ci.org/jbboehr/php-psr.svg?branch=master
[:badge-appveyor:]: https://ci.appveyor.com/api/projects/status/x1ymkqggy1mkl0ux/branch/master?svg=true
[:badge-coveralls:]: https://coveralls.io/repos/jbboehr/php-psr/badge.svg?branch=master&service=github
[:badge-license:]: https://img.shields.io/badge/license-BSD-brightgreen.svg
[:build-travis:]: https://travis-ci.org/jbboehr/php-psr
[:build-appveyor:]: https://ci.appveyor.com/project/jbboehr/php-psr/branch/master
[:build-coveralls:]: https://coveralls.io/github/jbboehr/php-psr?branch=master
[:ext-license:]: https://github.com/jbboehr/php-psr/blob/master/LICENSE.md
[:example:]: https://github.com/jbboehr/php-handlebars/blob/v0.7.1/impl.c#L213-L215
[:psr-3:]: http://www.php-fig.org/psr/psr-3
[:psr-log:]: https://github.com/php-fig/log
[:monolog:]: https://github.com/Seldaek/monolog
[:psr-6:]: https://www.php-fig.org/psr/psr-6
[:psr-cache:]: https://github.com/php-fig/cache
[:stash:]: https://github.com/tedious/Stash
[:psx-cache:]: https://github.com/apioo/psx-cache
[:psr-7:]: https://www.php-fig.org/psr/psr-7
[:psr-http-message:]: https://github.com/php-fig/http-message
[:guzzle:]: https://github.com/guzzle/psr7
[:psr-11:]: https://www.php-fig.org/psr/psr-11
[:psr-container:]: https://github.com/php-fig/container
[:league-container:]: https://github.com/thephpleague/container
[:psr-13:]: https://www.php-fig.org/psr/psr-13
[:psr-link:]: https://github.com/php-fig/link
[:link-util:]: https://github.com/php-fig/link-util
[:psr-16:]: https://www.php-fig.org/psr/psr-16
[:psr-simple-cache:]: https://github.com/php-fig/simple-cache
[:windows-psr:]: http://windows.php.net/downloads/pecl/releases/psr/
[:github-sergeyklay:]: https://github.com/sergeyklay
[:github-jan-e:]: https://github.com/Jan-E
[:github-flyinghail:]: https://github.com/flyinghail
[:psr-15:]: http://www.php-fig.org/psr/psr-15
[:psr-http-server-handler:]: https://github.com/php-fig/http-server-handler
[:psr-http-server-middleware:]: https://github.com/php-fig/http-server-middleware
[:dispatch:]: https://github.com/equip/dispatch
[:request-handler:]: https://github.com/middlewares/request-handler
[:psr-17:]: https://www.php-fig.org/psr/psr-17
[:psr-http-factory:]: https://github.com/php-fig/http-factory
[:http-factory-guzzle:]: https://github.com/http-interop/http-factory-guzzle
[:psr-18:]: https://www.php-fig.org/psr/psr-18
[:psr-http-client:]: https://github.com/php-fig/http-client
[:guzzle-psr18-adapter:]: https://github.com/ricardofiorani/guzzle-psr18-adapter
[:psr-14:]: http://www.php-fig.org/psr/psr-14
[:psr-event-dispatcher:]: https://github.com/php-fig/event-dispatcher
[:tukio:]: https://github.com/Crell/Tukio.git
psr-0.7.0/config.m4 0000644 0011611 0000144 00000001620 13524411442 012534 0 ustar rin users dnl vim: tabstop=4:softtabstop=4:shiftwidth=4:expandtab
dnl PSR --------------------------------------------------------------------------
PHP_ARG_ENABLE(psr, whether to enable psr support,
[ --enable-psr Enable PSR support])
dnl MAIN -------------------------------------------------------------------------
if test "$PHP_PSR" != "no"; then
AC_DEFINE(HAVE_PSR, 1, [Whether you have PSR])
PHP_NEW_EXTENSION(psr, php_psr.c psr_cache.c psr_container.c psr_http_message.c psr_link.c psr_log.c psr_simple_cache.c psr_http_server_handler.c psr_http_server_middleware.c psr_http_factory.c psr_http_client.c psr_event_dispatcher.c, $ext_shared)
PHP_INSTALL_HEADERS([ext/psr], [php_psr.h psr_cache.h psr_container.h psr_http_message.h psr_link.h psr_log.h psr_simple_cache.h psr_http_server_handler.h psr_http_server_middleware.h psr_http_factory.h psr_http_client.h psr_event_dispatcher.h])
fi
psr-0.7.0/config.w32 0000644 0011611 0000144 00000001171 13524411442 012630 0 ustar rin users // vim:ft=javascript
ARG_ENABLE("psr", "Enable psr support", "no");
if (PHP_PSR != "no") {
AC_DEFINE("HAVE_PSR", 1, "Have PSR Support");
EXTENSION("psr", "php_psr.c psr_cache.c psr_container.c psr_http_message.c psr_link.c psr_log.c psr_simple_cache.c psr_http_server_handler.c psr_http_server_middleware.c psr_http_factory.c psr_http_client.c psr_event_dispatcher.c");
PHP_INSTALL_HEADERS("ext\\psr", "php_psr.h psr_cache.h psr_container.h psr_http_message.h psr_link.h psr_log.h psr_simple_cache.h psr_http_server_handler.h psr_http_server_middleware.h psr_http_factory.h psr_http_client.h psr_event_dispatcher.h")
}
psr-0.7.0/php_psr.c 0000644 0011611 0000144 00000006632 13524411442 012654 0 ustar rin users
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "php.h"
#include "php_ini.h"
#include "ext/standard/info.h"
#include "ext/spl/spl_exceptions.h"
#include "zend_API.h"
#include "zend_interfaces.h"
#include "php_psr.h"
#include "psr_cache.h"
#include "psr_container.h"
#include "psr_http_message.h"
#include "psr_link.h"
#include "psr_log.h"
#include "psr_simple_cache.h"
#include "psr_http_server_handler.h"
#include "psr_http_server_middleware.h"
#include "psr_http_factory.h"
#include "psr_http_client.h"
#include "psr_event_dispatcher.h"
static PHP_MINIT_FUNCTION(psr)
{
PHP_MINIT(psr_cache)(INIT_FUNC_ARGS_PASSTHRU);
PHP_MINIT(psr_container)(INIT_FUNC_ARGS_PASSTHRU);
PHP_MINIT(psr_http_message)(INIT_FUNC_ARGS_PASSTHRU);
PHP_MINIT(psr_link)(INIT_FUNC_ARGS_PASSTHRU);
PHP_MINIT(psr_log)(INIT_FUNC_ARGS_PASSTHRU);
PHP_MINIT(psr_simple_cache)(INIT_FUNC_ARGS_PASSTHRU);
PHP_MINIT(psr_http_server_handler)(INIT_FUNC_ARGS_PASSTHRU);
PHP_MINIT(psr_http_server_middleware)(INIT_FUNC_ARGS_PASSTHRU);
PHP_MINIT(psr_http_factory)(INIT_FUNC_ARGS_PASSTHRU);
PHP_MINIT(psr_http_client)(INIT_FUNC_ARGS_PASSTHRU);
#if PHP_VERSION_ID >= 70200
PHP_MINIT(psr_event_dispatcher)(INIT_FUNC_ARGS_PASSTHRU);
#endif
return SUCCESS;
}
static PHP_MINFO_FUNCTION(psr)
{
php_info_print_table_start();
php_info_print_table_row(2, "Version", PHP_PSR_VERSION);
php_info_print_table_row(2, "Released", PHP_PSR_RELEASE);
php_info_print_table_row(2, "Authors", PHP_PSR_AUTHORS);
php_info_print_table_row(2, "PSR-3 Log Version", PHP_PSR_LOG_VERSION);
php_info_print_table_row(2, "PSR-6 Cache Version", PHP_PSR_CACHE_VERSION);
php_info_print_table_row(2, "PSR-7 Http Message Version", PHP_PSR_HTTP_MESSAGE_VERSION);
php_info_print_table_row(2, "PSR-11 Container Version", PHP_PSR_CONTAINER_VERSION);
php_info_print_table_row(2, "PSR-13 Link Version", PHP_PSR_LOG_VERSION);
#if PHP_VERSION_ID >= 70200
php_info_print_table_row(2, "PSR-14 Event Dispatcher", PHP_PSR_EVENT_DISPATCHER_VERSION);
#endif
php_info_print_table_row(2, "PSR-15 HTTP Handlers (Server Handler)", PHP_PSR_HTTP_SERVER_HANDLER_VERSION);
php_info_print_table_row(2, "PSR-15 HTTP Handlers (Middleware)", PHP_PSR_HTTP_SERVER_MIDDLEWARE_VERSION);
php_info_print_table_row(2, "PSR-16 Simple Cache Version", PHP_PSR_SIMPLE_CACHE_VERSION);
php_info_print_table_row(2, "PSR-17 HTTP Factories", PHP_PSR_HTTP_FACTORY_VERSION);
php_info_print_table_row(2, "PSR-18 HTTP Client", PHP_PSR_HTTP_CLIENT_VERSION);
php_info_print_table_end();
}
static const zend_module_dep psr_deps[] = {
ZEND_MOD_REQUIRED("spl")
ZEND_MOD_END
};
zend_module_entry psr_module_entry = {
STANDARD_MODULE_HEADER_EX,
NULL,
psr_deps,
PHP_PSR_NAME, /* Name */
NULL, /* Functions */
PHP_MINIT(psr), /* MINIT */
NULL, /* MSHUTDOWN */
NULL, /* RINIT */
NULL, /* RSHUTDOWN */
PHP_MINFO(psr), /* MINFO */
PHP_PSR_VERSION, /* Version */
STANDARD_MODULE_PROPERTIES
};
#ifdef COMPILE_DL_PSR
ZEND_GET_MODULE(psr) // Common for all PHP extensions which are build as shared modules
#endif
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: fdm=marker
* vim: et sw=4 ts=4
*/
psr-0.7.0/php_psr.h 0000644 0011611 0000144 00000003410 13524411442 012650 0 ustar rin users
#ifndef PHP_PSR_H
#define PHP_PSR_H
#include "php.h"
#include "php_ini.h"
#include "ext/standard/info.h"
#ifdef ZTS
#include "TSRM.h"
#endif
#if defined(PHP_WIN32) && defined(PSR_EXPORTS)
#define PHP_PSR_API __declspec(dllexport)
#else
#define PHP_PSR_API PHPAPI
#endif
#define PHP_PSR_NAME "psr"
#define PHP_PSR_VERSION "0.7.0"
#define PHP_PSR_RELEASE "2019-08-12"
#define PHP_PSR_AUTHORS "John Boehr (lead)"
#define PHP_PSR_ABSTRACT_ME(c, f) PHP_ABSTRACT_ME(c, f, arginfo_ ## c ## _ ## f)
#define PHP_PSR_BEGIN_ARG_INFO(c, f, n) ZEND_BEGIN_ARG_INFO_EX(arginfo_ ## c ## _ ## f, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, n)
#define PHP_PSR_END_ARG_INFO ZEND_END_ARG_INFO
#define REGISTER_PSR_CLASS_CONST_STRING(ce, const_name, value) \
zend_declare_class_constant_stringl(ce, const_name, sizeof(const_name)-1, value, sizeof(value)-1);
#ifdef ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX
#define PHP_PSR_BEGIN_ARG_WITH_RETURN_OBJ_INFO(c, f, n, cn, an) ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_ ## c ## _ ## f, ZEND_RETURN_VALUE, n, cn, an)
#define PHP_PSR_BEGIN_ARG_WITH_RETURN_TYPE_INFO(c, f, n, t, an) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ ## c ## _ ## f, ZEND_RETURN_VALUE, n, t, an)
#else
#define PHP_PSR_BEGIN_ARG_WITH_RETURN_OBJ_INFO(c, f, n, cn, an) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ ## c ## _ ## f, ZEND_RETURN_VALUE, n, IS_OBJECT, #cn, an)
#define PHP_PSR_BEGIN_ARG_WITH_RETURN_TYPE_INFO(c, f, n, t, an) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ ## c ## _ ## f, ZEND_RETURN_VALUE, n, t, NULL, an)
#endif
extern zend_module_entry psr_module_entry;
#define phpext_psr_ptr &psr_module_entry
#endif /* PHP_PSR_H */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: fdm=marker
* vim: et sw=4 ts=4
*/
psr-0.7.0/psr_cache.c 0000644 0011611 0000144 00000007647 13524411442 013137 0 ustar rin users
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "php.h"
#include "php_ini.h"
#include "ext/standard/info.h"
#include "ext/spl/spl_exceptions.h"
#include "zend_API.h"
#include "zend_interfaces.h"
#include "php_psr.h"
#include "psr_cache.h"
/* {{{ CacheException ------------------------------------------------------- */
PHP_PSR_API zend_class_entry * PsrCacheCacheException_ce_ptr;
static zend_always_inline void php_psr_register_CacheException(INIT_FUNC_ARGS)
{
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "Psr\\Cache\\CacheException", NULL);
PsrCacheCacheException_ce_ptr = zend_register_internal_interface(&ce);
}
/* }}} ---------------------------------------------------------------------- */
/* {{{ CacheItemInterface --------------------------------------------------- */
PHP_PSR_API zend_class_entry * PsrCacheCacheItemInterface_ce_ptr;
static zend_function_entry PsrCacheCacheItemInterface_methods[] = {
PHP_PSR_ABSTRACT_ME(PsrCacheCacheItemInterface, getKey)
PHP_PSR_ABSTRACT_ME(PsrCacheCacheItemInterface, get)
PHP_PSR_ABSTRACT_ME(PsrCacheCacheItemInterface, isHit)
PHP_PSR_ABSTRACT_ME(PsrCacheCacheItemInterface, set)
PHP_PSR_ABSTRACT_ME(PsrCacheCacheItemInterface, expiresAt)
PHP_PSR_ABSTRACT_ME(PsrCacheCacheItemInterface, expiresAfter)
PHP_FE_END
};
static zend_always_inline void php_psr_register_CacheItemInterface(INIT_FUNC_ARGS)
{
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "Psr\\Cache\\CacheItemInterface", PsrCacheCacheItemInterface_methods);
PsrCacheCacheItemInterface_ce_ptr = zend_register_internal_interface(&ce);
}
/* }}} ---------------------------------------------------------------------- */
/* {{{ CacheItemPoolInterface ----------------------------------------------- */
PHP_PSR_API zend_class_entry * PsrCacheCacheItemPoolInterface_ce_ptr;
static zend_function_entry PsrCacheCacheItemPoolInterface_methods[] = {
PHP_PSR_ABSTRACT_ME(PsrCacheCacheItemPoolInterface, getItem)
PHP_PSR_ABSTRACT_ME(PsrCacheCacheItemPoolInterface, getItems)
PHP_PSR_ABSTRACT_ME(PsrCacheCacheItemPoolInterface, hasItem)
PHP_PSR_ABSTRACT_ME(PsrCacheCacheItemPoolInterface, clear)
PHP_PSR_ABSTRACT_ME(PsrCacheCacheItemPoolInterface, deleteItem)
PHP_PSR_ABSTRACT_ME(PsrCacheCacheItemPoolInterface, deleteItems)
PHP_PSR_ABSTRACT_ME(PsrCacheCacheItemPoolInterface, save)
PHP_PSR_ABSTRACT_ME(PsrCacheCacheItemPoolInterface, saveDeferred)
PHP_PSR_ABSTRACT_ME(PsrCacheCacheItemPoolInterface, commit)
PHP_FE_END
};
static zend_always_inline void php_psr_register_CacheItemPoolInterface(INIT_FUNC_ARGS)
{
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "Psr\\Cache\\CacheItemPoolInterface", PsrCacheCacheItemPoolInterface_methods);
PsrCacheCacheItemPoolInterface_ce_ptr = zend_register_internal_interface(&ce);
}
/* }}} ---------------------------------------------------------------------- */
/* {{{ InvalidArgumentException --------------------------------------------- */
PHP_PSR_API zend_class_entry * PsrCacheInvalidArgumentException_ce_ptr;
static zend_always_inline void php_psr_register_InvalidArgumentException(INIT_FUNC_ARGS)
{
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "Psr\\Cache\\InvalidArgumentException", NULL);
PsrCacheInvalidArgumentException_ce_ptr = zend_register_internal_interface(&ce);
zend_class_implements(PsrCacheInvalidArgumentException_ce_ptr, 1, PsrCacheCacheException_ce_ptr);
}
/* }}} ---------------------------------------------------------------------- */
/* {{{ PHP_MINIT_FUNCTION */
PHP_MINIT_FUNCTION(psr_cache)
{
php_psr_register_CacheException(INIT_FUNC_ARGS_PASSTHRU);
php_psr_register_CacheItemInterface(INIT_FUNC_ARGS_PASSTHRU);
php_psr_register_CacheItemPoolInterface(INIT_FUNC_ARGS_PASSTHRU);
php_psr_register_InvalidArgumentException(INIT_FUNC_ARGS_PASSTHRU);
return SUCCESS;
}
/* }}} */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: fdm=marker
* vim: et sw=4 ts=4
*/
psr-0.7.0/psr_cache.h 0000644 0011611 0000144 00000004415 13524411442 013132 0 ustar rin users
#ifndef PSR_CACHE_H
#define PSR_CACHE_H
#include "php.h"
#include "php_psr.h"
#define PHP_PSR_CACHE_VERSION "1.0.0"
extern PHP_PSR_API zend_class_entry * PsrCacheCacheItemInterface_ce_ptr;
extern PHP_PSR_API zend_class_entry * PsrCacheCacheItemPoolInterface_ce_ptr;
extern PHP_PSR_API zend_class_entry * PsrCacheInvalidArgumentException_ce_ptr;
extern PHP_PSR_API zend_class_entry * PsrCacheCacheException_ce_ptr;
extern PHP_MINIT_FUNCTION(psr_cache);
PHP_PSR_BEGIN_ARG_INFO(PsrCacheCacheItemInterface, getKey, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrCacheCacheItemInterface, get, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrCacheCacheItemInterface, isHit, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrCacheCacheItemInterface, set, 1)
ZEND_ARG_INFO(0, value)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrCacheCacheItemInterface, expiresAt, 1)
ZEND_ARG_INFO(0, expiration)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrCacheCacheItemInterface, expiresAfter, 1)
ZEND_ARG_INFO(0, time)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrCacheCacheItemPoolInterface, getItem, 1)
ZEND_ARG_INFO(0, key)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrCacheCacheItemPoolInterface, getItems, 0)
ZEND_ARG_ARRAY_INFO(0, keys, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrCacheCacheItemPoolInterface, hasItem, 1)
ZEND_ARG_INFO(0, key)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrCacheCacheItemPoolInterface, clear, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrCacheCacheItemPoolInterface, deleteItem, 1)
ZEND_ARG_INFO(0, key)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrCacheCacheItemPoolInterface, deleteItems, 1)
ZEND_ARG_ARRAY_INFO(0, keys, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrCacheCacheItemPoolInterface, save, 1)
ZEND_ARG_OBJ_INFO(0, logger, Psr\\Cache\\CacheItemInterface, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrCacheCacheItemPoolInterface, saveDeferred, 1)
ZEND_ARG_OBJ_INFO(0, logger, Psr\\Cache\\CacheItemInterface, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrCacheCacheItemPoolInterface, commit, 0)
PHP_PSR_END_ARG_INFO()
#endif /* PSR_CACHE_H */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: fdm=marker
* vim: et sw=4 ts=4
*/
psr-0.7.0/psr_container.c 0000644 0011611 0000144 00000005012 13524411442 014036 0 ustar rin users
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "php.h"
#include "php_psr.h"
#include "psr_container.h"
/* {{{ ContainerExceptionInterface ------------------------------------------ */
PHP_PSR_API zend_class_entry * PsrContainerContainerExceptionInterface_ce_ptr;
static zend_always_inline void php_psr_register_PsrContainerContainerExceptionInterface(INIT_FUNC_ARGS)
{
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "Psr\\Container\\ContainerExceptionInterface", NULL);
PsrContainerContainerExceptionInterface_ce_ptr = zend_register_internal_interface(&ce);
}
/* }}} ---------------------------------------------------------------------- */
/* {{{ ContainerInterface --------------------------------------------------- */
PHP_PSR_API zend_class_entry * PsrContainerContainerInterface_ce_ptr;
static zend_function_entry PsrContainerContainerInterface_methods[] = {
PHP_PSR_ABSTRACT_ME(PsrContainerContainerInterface, get)
PHP_PSR_ABSTRACT_ME(PsrContainerContainerInterface, has)
PHP_FE_END
};
static zend_always_inline void php_psr_register_PsrContainerContainerInterface(INIT_FUNC_ARGS)
{
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "Psr\\Container\\ContainerInterface", PsrContainerContainerInterface_methods);
PsrContainerContainerInterface_ce_ptr = zend_register_internal_interface(&ce);
}
/* }}} ---------------------------------------------------------------------- */
/* {{{ NotFoundException ---------------------------------------------------- */
PHP_PSR_API zend_class_entry * PsrContainerNotFoundExceptionInterface_ce_ptr;
static zend_always_inline void php_psr_register_PsrContainerNotFoundExceptionInterface(INIT_FUNC_ARGS)
{
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "Psr\\Container\\NotFoundExceptionInterface", NULL);
PsrContainerNotFoundExceptionInterface_ce_ptr = zend_register_internal_interface(&ce);
zend_class_implements(PsrContainerNotFoundExceptionInterface_ce_ptr, 1, PsrContainerContainerExceptionInterface_ce_ptr);
}
/* }}} ---------------------------------------------------------------------- */
/* {{{ PHP_MINIT_FUNCTION */
PHP_MINIT_FUNCTION(psr_container)
{
php_psr_register_PsrContainerContainerExceptionInterface(INIT_FUNC_ARGS_PASSTHRU);
php_psr_register_PsrContainerContainerInterface(INIT_FUNC_ARGS_PASSTHRU);
php_psr_register_PsrContainerNotFoundExceptionInterface(INIT_FUNC_ARGS_PASSTHRU);
return SUCCESS;
}
/* }}} */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: fdm=marker
* vim: et sw=4 ts=4
*/
psr-0.7.0/psr_container.h 0000644 0011611 0000144 00000001431 13524411442 014044 0 ustar rin users
#ifndef PSR_CONTAINER_H
#define PSR_CONTAINER_H
#include "php.h"
#include "php_psr.h"
#define PHP_PSR_CONTAINER_VERSION "1.0.0"
extern PHP_PSR_API zend_class_entry * PsrContainerContainerExceptionInterface_ce_ptr;
extern PHP_PSR_API zend_class_entry * PsrContainerContainerInterface_ce_ptr;
extern PHP_PSR_API zend_class_entry * PsrContainerNotFoundExceptionInterface_ce_ptr;
extern PHP_MINIT_FUNCTION(psr_container);
PHP_PSR_BEGIN_ARG_INFO(PsrContainerContainerInterface, get, 1)
ZEND_ARG_INFO(0, id)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrContainerContainerInterface, has, 1)
ZEND_ARG_INFO(0, id)
PHP_PSR_END_ARG_INFO()
#endif /* PSR_CONTAINER_H */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: fdm=marker
* vim: et sw=4 ts=4
*/
psr-0.7.0/psr_event_dispatcher.c 0000644 0011611 0000144 00000005542 13524411442 015413 0 ustar rin users
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "php.h"
#include "php_psr.h"
#include "psr_event_dispatcher.h"
#if PHP_VERSION_ID >= 70200
/* {{{ Psr\EventDispatcher\EventDispatcherInterface */
PHP_PSR_API zend_class_entry * PsrEventDispatcherEventDispatcherInterface_ce_ptr;
static zend_function_entry PsrEventDispatcherEventDispatcherInterface_methods[] = {
PHP_PSR_ABSTRACT_ME(PsrEventDispatcherEventDispatcherInterface, dispatch)
PHP_FE_END
};
static zend_always_inline void php_psr_register_PsrEventDispatcherEventDispatcherInterface(INIT_FUNC_ARGS)
{
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "Psr\\EventDispatcher\\EventDispatcherInterface", PsrEventDispatcherEventDispatcherInterface_methods);
PsrEventDispatcherEventDispatcherInterface_ce_ptr = zend_register_internal_interface(&ce);
}
/* }}} Psr\EventDispatcher\EventDispatcherInterface */
/* {{{ Psr\EventDispatcher\ListenerProviderInterface */
PHP_PSR_API zend_class_entry * PsrEventDispatcherListenerProviderInterface_ce_ptr;
static zend_function_entry PsrEventDispatcherListenerProviderInterface_methods[] = {
PHP_PSR_ABSTRACT_ME(PsrEventDispatcherListenerProviderInterface, getListenersForEvent)
PHP_FE_END
};
static zend_always_inline void php_psr_register_PsrEventDispatcherListenerProviderInterface(INIT_FUNC_ARGS)
{
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "Psr\\EventDispatcher\\ListenerProviderInterface", PsrEventDispatcherListenerProviderInterface_methods);
PsrEventDispatcherListenerProviderInterface_ce_ptr = zend_register_internal_interface(&ce);
}
/* }}} Psr\EventDispatcher\ListenerProviderInterface */
/* {{{ Psr\EventDispatcher\StoppableEventInterface */
PHP_PSR_API zend_class_entry * PsrEventDispatcherStoppableEventInterface_ce_ptr;
static zend_function_entry PsrEventDispatcherStoppableEventInterface_methods[] = {
PHP_PSR_ABSTRACT_ME(PsrEventDispatcherStoppableEventInterface, isPropagationStopped)
PHP_FE_END
};
static zend_always_inline void php_psr_register_PsrEventDispatcherStoppableEventInterface(INIT_FUNC_ARGS)
{
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "Psr\\EventDispatcher\\StoppableEventInterface", PsrEventDispatcherStoppableEventInterface_methods);
PsrEventDispatcherStoppableEventInterface_ce_ptr = zend_register_internal_interface(&ce);
}
/* }}} Psr\EventDispatcher\StoppableEventInterface */
#endif
/* {{{ PHP_MINIT_FUNCTION */
PHP_MINIT_FUNCTION(psr_event_dispatcher)
{
#if PHP_VERSION_ID >= 70200
php_psr_register_PsrEventDispatcherEventDispatcherInterface(INIT_FUNC_ARGS_PASSTHRU);
php_psr_register_PsrEventDispatcherListenerProviderInterface(INIT_FUNC_ARGS_PASSTHRU);
php_psr_register_PsrEventDispatcherStoppableEventInterface(INIT_FUNC_ARGS_PASSTHRU);
#endif
return SUCCESS;
}
/* }}} */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: fdm=marker
* vim: et sw=4 ts=4
*/
psr-0.7.0/psr_event_dispatcher.h 0000644 0011611 0000144 00000002177 13524411442 015421 0 ustar rin users
#ifndef PSR_EVENT_DISPATCHER_H
#define PSR_EVENT_DISPATCHER_H
#include "php.h"
#include "php_psr.h"
#if PHP_VERSION_ID >= 70200
#define PHP_PSR_EVENT_DISPATCHER_VERSION "1.0.0"
extern PHP_PSR_API zend_class_entry * PsrEventDispatcherEventDispatcherInterface_ce_ptr;
extern PHP_PSR_API zend_class_entry * PsrEventDispatcherListenerProviderInterface_ce_ptr;
extern PHP_PSR_API zend_class_entry * PsrEventDispatcherStoppableEventInterface_ce_ptr;
extern PHP_MINIT_FUNCTION(psr_event_dispatcher);
PHP_PSR_BEGIN_ARG_INFO(PsrEventDispatcherEventDispatcherInterface, dispatch, 1)
ZEND_ARG_TYPE_INFO(0, event, IS_OBJECT, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_WITH_RETURN_TYPE_INFO(PsrEventDispatcherListenerProviderInterface, getListenersForEvent, 1, IS_ITERABLE, 0)
ZEND_ARG_TYPE_INFO(0, event, IS_OBJECT, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_WITH_RETURN_TYPE_INFO(PsrEventDispatcherStoppableEventInterface, isPropagationStopped, 0, _IS_BOOL, 0)
PHP_PSR_END_ARG_INFO()
#endif
#endif /* PSR_EVENT_DISPATCHER_H */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: fdm=marker
* vim: et sw=4 ts=4
*/
psr-0.7.0/psr_http_client.c 0000644 0011611 0000144 00000006737 13524411442 014410 0 ustar rin users
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "php.h"
#include
#include "php_psr.h"
#include "psr_http_client.h"
/* {{{ Psr\Http\Client\ClientInterface */
PHP_PSR_API zend_class_entry * PsrHttpClientClientInterface_ce_ptr;
static zend_function_entry PsrHttpClientClientInterface_methods[] = {
PHP_PSR_ABSTRACT_ME(PsrHttpClientClientInterface, sendRequest)
PHP_FE_END
};
static zend_always_inline void php_psr_register_PsrHttpClientClientInterface(INIT_FUNC_ARGS)
{
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "Psr\\Http\\Client\\ClientInterface", PsrHttpClientClientInterface_methods);
PsrHttpClientClientInterface_ce_ptr = zend_register_internal_interface(&ce);
}
/* }}} Psr\Http\Client\ClientInterface */
/* {{{ Psr\Http\Client\ClientExceptionInterface */
PHP_PSR_API zend_class_entry * PsrHttpClientClientExceptionInterface_ce_ptr;
static zend_always_inline void php_psr_register_PsrHttpClientClientExceptionInterface(INIT_FUNC_ARGS)
{
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "Psr\\Http\\Client\\ClientExceptionInterface", NULL);
PsrHttpClientClientExceptionInterface_ce_ptr = zend_register_internal_interface(&ce);
zend_class_implements(PsrHttpClientClientExceptionInterface_ce_ptr, 1, zend_ce_throwable);
}
/* }}} Psr\Http\Client\ClientExceptionInterface */
/* {{{ Psr\Http\Client\NetworkExceptionInterface */
PHP_PSR_API zend_class_entry * PsrHttpClientNetworkExceptionInterface_ce_ptr;
static zend_function_entry PsrHttpClientNetworkExceptionInterface_methods[] = {
PHP_PSR_ABSTRACT_ME(PsrHttpClientNetworkExceptionInterface, getRequest)
PHP_FE_END
};
static zend_always_inline void php_psr_register_PsrHttpClientNetworkExceptionInterface(INIT_FUNC_ARGS)
{
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "Psr\\Http\\Client\\NetworkExceptionInterface", PsrHttpClientNetworkExceptionInterface_methods);
PsrHttpClientNetworkExceptionInterface_ce_ptr = zend_register_internal_interface(&ce);
zend_class_implements(PsrHttpClientNetworkExceptionInterface_ce_ptr, 1, PsrHttpClientClientExceptionInterface_ce_ptr);
}
/* }}} Psr\Http\Client\NetworkExceptionInterface */
/* {{{ Psr\Http\Client\RequestExceptionInterface */
PHP_PSR_API zend_class_entry * PsrHttpClientRequestExceptionInterface_ce_ptr;
static zend_function_entry PsrHttpClientRequestExceptionInterface_methods[] = {
PHP_PSR_ABSTRACT_ME(PsrHttpClientRequestExceptionInterface, getRequest)
PHP_FE_END
};
static zend_always_inline void php_psr_register_PsrHttpClientRequestExceptionInterface(INIT_FUNC_ARGS)
{
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "Psr\\Http\\Client\\RequestExceptionInterface", PsrHttpClientRequestExceptionInterface_methods);
PsrHttpClientRequestExceptionInterface_ce_ptr = zend_register_internal_interface(&ce);
zend_class_implements(PsrHttpClientRequestExceptionInterface_ce_ptr, 1, PsrHttpClientClientExceptionInterface_ce_ptr);
}
/* }}} Psr\Http\Client\RequestExceptionInterface */
/* {{{ PHP_MINIT_FUNCTION */
PHP_MINIT_FUNCTION(psr_http_client)
{
php_psr_register_PsrHttpClientClientInterface(INIT_FUNC_ARGS_PASSTHRU);
php_psr_register_PsrHttpClientClientExceptionInterface(INIT_FUNC_ARGS_PASSTHRU);
php_psr_register_PsrHttpClientNetworkExceptionInterface(INIT_FUNC_ARGS_PASSTHRU);
php_psr_register_PsrHttpClientRequestExceptionInterface(INIT_FUNC_ARGS_PASSTHRU);
return SUCCESS;
}
/* }}} */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: fdm=marker
* vim: et sw=4 ts=4
*/
psr-0.7.0/psr_http_client.h 0000644 0011611 0000144 00000002264 13524411442 014404 0 ustar rin users
#ifndef PSR_HTTP_CLIENT_H
#define PSR_HTTP_CLIENT_H
#include "php.h"
#include "php_psr.h"
#define PHP_PSR_HTTP_CLIENT_VERSION "1.0.0"
extern PHP_PSR_API zend_class_entry * PsrHttpClientClientInterface_ce_ptr;
extern PHP_PSR_API zend_class_entry * PsrHttpClientClientExceptionInterface_ce_ptr;
extern PHP_PSR_API zend_class_entry * PsrHttpClientNetworkExceptionInterface_ce_ptr;
extern PHP_PSR_API zend_class_entry * PsrHttpClientRequestExceptionInterface_ce_ptr;
extern PHP_MINIT_FUNCTION(psr_http_client);
PHP_PSR_BEGIN_ARG_WITH_RETURN_OBJ_INFO(PsrHttpClientClientInterface, sendRequest, 1, Psr\\Http\\Message\\ResponseInterface, 0)
ZEND_ARG_OBJ_INFO(0, request, Psr\\Http\\Message\\RequestInterface, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_WITH_RETURN_OBJ_INFO(PsrHttpClientNetworkExceptionInterface, getRequest, 0, Psr\\Http\\Message\\RequestInterface, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_WITH_RETURN_OBJ_INFO(PsrHttpClientRequestExceptionInterface, getRequest, 0, Psr\\Http\\Message\\RequestInterface, 0)
PHP_PSR_END_ARG_INFO()
#endif /* PSR_HTTP_CLIENT_H */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: fdm=marker
* vim: et sw=4 ts=4
*/
psr-0.7.0/psr_http_factory.c 0000644 0011611 0000144 00000012252 13524411442 014566 0 ustar rin users
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "php.h"
#include "php_psr.h"
#include "psr_http_factory.h"
/* {{{ Psr\Http\Message\RequestFactoryInterface */
PHP_PSR_API zend_class_entry * PsrHttpMessageRequestFactoryInterface_ce_ptr;
static zend_function_entry PsrHttpMessageRequestFactoryInterface_methods[] = {
PHP_PSR_ABSTRACT_ME(PsrHttpMessageRequestFactoryInterface, createRequest)
PHP_FE_END
};
static zend_always_inline void php_psr_register_PsrHttpMessageRequestFactoryInterface(INIT_FUNC_ARGS)
{
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "Psr\\Http\\Message\\RequestFactoryInterface", PsrHttpMessageRequestFactoryInterface_methods);
PsrHttpMessageRequestFactoryInterface_ce_ptr = zend_register_internal_interface(&ce);
}
/* }}} Psr\Http\Message\RequestFactoryInterface */
/* {{{ Psr\Http\Message\ResponseFactoryInterface */
PHP_PSR_API zend_class_entry * PsrHttpMessageResponseFactoryInterface_ce_ptr;
static zend_function_entry PsrHttpMessageResponseFactoryInterface_methods[] = {
PHP_PSR_ABSTRACT_ME(PsrHttpMessageResponseFactoryInterface, createResponse)
PHP_FE_END
};
static zend_always_inline void php_psr_register_PsrHttpMessageResponseFactoryInterface(INIT_FUNC_ARGS)
{
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "Psr\\Http\\Message\\ResponseFactoryInterface", PsrHttpMessageResponseFactoryInterface_methods);
PsrHttpMessageResponseFactoryInterface_ce_ptr = zend_register_internal_interface(&ce);
}
/* }}} Psr\Http\Message\ResponseFactoryInterface */
/* {{{ Psr\Http\Message\ServerRequestFactoryInterface */
PHP_PSR_API zend_class_entry * PsrHttpMessageServerRequestFactoryInterface_ce_ptr;
static zend_function_entry PsrHttpMessageServerRequestFactoryInterface_methods[] = {
PHP_PSR_ABSTRACT_ME(PsrHttpMessageServerRequestFactoryInterface, createServerRequest)
PHP_FE_END
};
static zend_always_inline void php_psr_register_PsrHttpMessageServerRequestFactoryInterface(INIT_FUNC_ARGS)
{
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "Psr\\Http\\Message\\ServerRequestFactoryInterface", PsrHttpMessageServerRequestFactoryInterface_methods);
PsrHttpMessageServerRequestFactoryInterface_ce_ptr = zend_register_internal_interface(&ce);
}
/* }}} Psr\Http\Message\ServerRequestFactoryInterface */
/* {{{ Psr\Http\Message\StreamFactoryInterface */
PHP_PSR_API zend_class_entry * PsrHttpMessageStreamFactoryInterface_ce_ptr;
static zend_function_entry PsrHttpMessageStreamFactoryInterface_methods[] = {
PHP_PSR_ABSTRACT_ME(PsrHttpMessageStreamFactoryInterface, createStream)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageStreamFactoryInterface, createStreamFromFile)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageStreamFactoryInterface, createStreamFromResource)
PHP_FE_END
};
static zend_always_inline void php_psr_register_PsrHttpMessageStreamFactoryInterface(INIT_FUNC_ARGS)
{
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "Psr\\Http\\Message\\StreamFactoryInterface", PsrHttpMessageStreamFactoryInterface_methods);
PsrHttpMessageStreamFactoryInterface_ce_ptr = zend_register_internal_interface(&ce);
}
/* }}} Psr\Http\Message\StreamFactoryInterface */
/* {{{ Psr\Http\Message\UploadedFileFactoryInterface */
PHP_PSR_API zend_class_entry * PsrHttpMessageUploadedFileFactoryInterface_ce_ptr;
static zend_function_entry PsrHttpMessageUploadedFileFactoryInterface_methods[] = {
PHP_PSR_ABSTRACT_ME(PsrHttpMessageUploadedFileFactoryInterface, createUploadedFile)
PHP_FE_END
};
static zend_always_inline void php_psr_register_PsrHttpMessageUploadedFileFactoryInterface(INIT_FUNC_ARGS)
{
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "Psr\\Http\\Message\\UploadedFileFactoryInterface", PsrHttpMessageUploadedFileFactoryInterface_methods);
PsrHttpMessageUploadedFileFactoryInterface_ce_ptr = zend_register_internal_interface(&ce);
}
/* }}} Psr\Http\Message\UploadedFileFactoryInterface */
/* {{{ Psr\Http\Message\UriFactoryInterface */
PHP_PSR_API zend_class_entry * PsrHttpMessageUriFactoryInterface_ce_ptr;
static zend_function_entry PsrHttpMessageUriFactoryInterface_methods[] = {
PHP_PSR_ABSTRACT_ME(PsrHttpMessageUriFactoryInterface, createUri)
PHP_FE_END
};
static zend_always_inline void php_psr_register_PsrHttpMessageUriFactoryInterface(INIT_FUNC_ARGS)
{
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "Psr\\Http\\Message\\UriFactoryInterface", PsrHttpMessageUriFactoryInterface_methods);
PsrHttpMessageUriFactoryInterface_ce_ptr = zend_register_internal_interface(&ce);
}
/* }}} Psr\Http\Message\UriFactoryInterface */
/* {{{ PHP_MINIT_FUNCTION */
PHP_MINIT_FUNCTION(psr_http_factory)
{
php_psr_register_PsrHttpMessageRequestFactoryInterface(INIT_FUNC_ARGS_PASSTHRU);
php_psr_register_PsrHttpMessageResponseFactoryInterface(INIT_FUNC_ARGS_PASSTHRU);
php_psr_register_PsrHttpMessageServerRequestFactoryInterface(INIT_FUNC_ARGS_PASSTHRU);
php_psr_register_PsrHttpMessageStreamFactoryInterface(INIT_FUNC_ARGS_PASSTHRU);
php_psr_register_PsrHttpMessageUploadedFileFactoryInterface(INIT_FUNC_ARGS_PASSTHRU);
php_psr_register_PsrHttpMessageUriFactoryInterface(INIT_FUNC_ARGS_PASSTHRU);
return SUCCESS;
}
/* }}} */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: fdm=marker
* vim: et sw=4 ts=4
*/
psr-0.7.0/psr_http_factory.h 0000644 0011611 0000144 00000005613 13524411442 014576 0 ustar rin users
#ifndef PSR_HTTP_FACTORY_H
#define PSR_HTTP_FACTORY_H
#include "php.h"
#include "php_psr.h"
#define PHP_PSR_HTTP_FACTORY_VERSION "1.0.0"
extern PHP_PSR_API zend_class_entry * PsrHttpMessageRequestFactoryInterface_ce_ptr;
extern PHP_PSR_API zend_class_entry * PsrHttpMessageResponseFactoryInterface_ce_ptr;
extern PHP_PSR_API zend_class_entry * PsrHttpMessageServerRequestFactoryInterface_ce_ptr;
extern PHP_PSR_API zend_class_entry * PsrHttpMessageStreamFactoryInterface_ce_ptr;
extern PHP_PSR_API zend_class_entry * PsrHttpMessageUploadedFileFactoryInterface_ce_ptr;
extern PHP_PSR_API zend_class_entry * PsrHttpMessageUriFactoryInterface_ce_ptr;
extern PHP_MINIT_FUNCTION(psr_http_factory);
PHP_PSR_BEGIN_ARG_WITH_RETURN_OBJ_INFO(PsrHttpMessageRequestFactoryInterface, createRequest, 2, Psr\\Http\\Message\\RequestInterface, 0)
ZEND_ARG_TYPE_INFO(0, method, IS_STRING, 0)
ZEND_ARG_INFO(0, uri)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_WITH_RETURN_OBJ_INFO(PsrHttpMessageResponseFactoryInterface, createResponse, 0, Psr\\Http\\Message\\ResponseInterface, 0)
ZEND_ARG_TYPE_INFO(0, code, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, reasonPhrase, IS_STRING, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_WITH_RETURN_OBJ_INFO(PsrHttpMessageServerRequestFactoryInterface, createServerRequest, 2, Psr\\Http\\Message\\ServerRequestInterface, 0)
ZEND_ARG_TYPE_INFO(0, method, IS_STRING, 0)
ZEND_ARG_INFO(0, uri)
ZEND_ARG_ARRAY_INFO(0, serverParams, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_WITH_RETURN_OBJ_INFO(PsrHttpMessageStreamFactoryInterface, createStream, 0, Psr\\Http\\Message\\StreamInterface, 0)
ZEND_ARG_TYPE_INFO(0, content, IS_STRING, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_WITH_RETURN_OBJ_INFO(PsrHttpMessageStreamFactoryInterface, createStreamFromFile, 1, Psr\\Http\\Message\\StreamInterface, 0)
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, mode, IS_STRING, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_WITH_RETURN_OBJ_INFO(PsrHttpMessageStreamFactoryInterface, createStreamFromResource, 1, Psr\\Http\\Message\\StreamInterface, 0)
ZEND_ARG_INFO(0, resouce)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_WITH_RETURN_OBJ_INFO(PsrHttpMessageUploadedFileFactoryInterface, createUploadedFile, 1, Psr\\Http\\Message\\UploadedFileInterface, 0)
ZEND_ARG_OBJ_INFO(0, stream, Psr\\Http\\Message\\StreamInterface, 0)
ZEND_ARG_TYPE_INFO(0, size, IS_LONG, 1)
ZEND_ARG_TYPE_INFO(0, error, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, clientFilename, IS_STRING, 1)
ZEND_ARG_TYPE_INFO(0, clientMediaType, IS_STRING, 1)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_WITH_RETURN_OBJ_INFO(PsrHttpMessageUriFactoryInterface, createUri, 0, Psr\\Http\\Message\\UriInterface, 0)
ZEND_ARG_TYPE_INFO(0, uri, IS_STRING, 0)
PHP_PSR_END_ARG_INFO()
#endif /* PSR_HTTP_FACTORY_H */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: fdm=marker
* vim: et sw=4 ts=4
*/
psr-0.7.0/psr_http_message.c 0000644 0011611 0000144 00000023713 13524411442 014547 0 ustar rin users
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "php.h"
#include "php_ini.h"
#include "ext/standard/info.h"
#include "ext/spl/spl_exceptions.h"
#include "zend_API.h"
#include "zend_interfaces.h"
#include "php_psr.h"
#include "psr_http_message.h"
/* {{{ Psr\Http\Message\MessageInterface */
PHP_PSR_API zend_class_entry * PsrHttpMessageMessageInterface_ce_ptr;
static zend_function_entry PsrHttpMessageMessageInterface_methods[] = {
PHP_PSR_ABSTRACT_ME(PsrHttpMessageMessageInterface, getProtocolVersion)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageMessageInterface, withProtocolVersion)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageMessageInterface, getHeaders)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageMessageInterface, hasHeader)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageMessageInterface, getHeader)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageMessageInterface, getHeaderLine)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageMessageInterface, withHeader)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageMessageInterface, withAddedHeader)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageMessageInterface, withoutHeader)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageMessageInterface, getBody)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageMessageInterface, withBody)
PHP_FE_END
};
static zend_always_inline void php_register_PsrHttpMessageMessageInterface(INIT_FUNC_ARGS)
{
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "Psr\\Http\\Message\\MessageInterface", PsrHttpMessageMessageInterface_methods);
PsrHttpMessageMessageInterface_ce_ptr = zend_register_internal_interface(&ce);
}
/* }}} Psr\Http\Message\MessageInterface */
/* {{{ Psr\Http\Message\RequestInterface */
PHP_PSR_API zend_class_entry * PsrHttpMessageRequestInterface_ce_ptr;
static zend_function_entry PsrHttpMessageRequestInterface_methods[] = {
PHP_PSR_ABSTRACT_ME(PsrHttpMessageRequestInterface, getRequestTarget)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageRequestInterface, withRequestTarget)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageRequestInterface, getMethod)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageRequestInterface, withMethod)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageRequestInterface, getUri)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageRequestInterface, withUri)
PHP_FE_END
};
static zend_always_inline void php_register_PsrHttpMessageRequestInterface(INIT_FUNC_ARGS)
{
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "Psr\\Http\\Message\\RequestInterface", PsrHttpMessageRequestInterface_methods);
PsrHttpMessageRequestInterface_ce_ptr = zend_register_internal_interface(&ce);
// @todo make sure this is right
zend_class_implements(PsrHttpMessageRequestInterface_ce_ptr, 1, PsrHttpMessageMessageInterface_ce_ptr);
}
/* }}} Psr\Http\Message\RequestInterface */
/* {{{ Psr\Http\Message\ResponseInterface */
PHP_PSR_API zend_class_entry * PsrHttpMessageResponseInterface_ce_ptr;
static zend_function_entry PsrHttpMessageResponseInterface_methods[] = {
PHP_PSR_ABSTRACT_ME(PsrHttpMessageResponseInterface, getStatusCode)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageResponseInterface, withStatus)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageResponseInterface, getReasonPhrase)
PHP_FE_END
};
static zend_always_inline void php_register_PsrHttpMessageResponseInterface(INIT_FUNC_ARGS)
{
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "Psr\\Http\\Message\\ResponseInterface", PsrHttpMessageResponseInterface_methods);
PsrHttpMessageResponseInterface_ce_ptr = zend_register_internal_interface(&ce);
zend_class_implements(PsrHttpMessageResponseInterface_ce_ptr, 1, PsrHttpMessageMessageInterface_ce_ptr);
}
/* }}} Psr\Http\Message\ResponseInterface */
/* {{{ Psr\Http\Message\ServerRequestInterface */
PHP_PSR_API zend_class_entry * PsrHttpMessageServerRequestInterface_ce_ptr;
static zend_function_entry PsrHttpMessageServerRequestInterface_methods[] = {
PHP_PSR_ABSTRACT_ME(PsrHttpMessageServerRequestInterface, getServerParams)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageServerRequestInterface, getCookieParams)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageServerRequestInterface, withCookieParams)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageServerRequestInterface, getQueryParams)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageServerRequestInterface, withQueryParams)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageServerRequestInterface, getUploadedFiles)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageServerRequestInterface, withUploadedFiles)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageServerRequestInterface, getParsedBody)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageServerRequestInterface, withParsedBody)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageServerRequestInterface, getAttributes)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageServerRequestInterface, getAttribute)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageServerRequestInterface, withAttribute)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageServerRequestInterface, withoutAttribute)
PHP_FE_END
};
static zend_always_inline void php_register_PsrHttpMessageServerRequestInterface(INIT_FUNC_ARGS)
{
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "Psr\\Http\\Message\\ServerRequestInterface", PsrHttpMessageServerRequestInterface_methods);
PsrHttpMessageServerRequestInterface_ce_ptr = zend_register_internal_interface(&ce);
zend_class_implements(PsrHttpMessageServerRequestInterface_ce_ptr, 1, PsrHttpMessageRequestInterface_ce_ptr);
}
/* }}} Psr\Http\Message\ServerRequestInterface */
/* {{{ Psr\Http\Message\StreamInterface */
PHP_PSR_API zend_class_entry * PsrHttpMessageStreamInterface_ce_ptr;
static zend_function_entry PsrHttpMessageStreamInterface_methods[] = {
PHP_PSR_ABSTRACT_ME(PsrHttpMessageStreamInterface, __toString)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageStreamInterface, close)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageStreamInterface, detach)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageStreamInterface, getSize)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageStreamInterface, tell)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageStreamInterface, eof)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageStreamInterface, isSeekable)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageStreamInterface, seek)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageStreamInterface, rewind)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageStreamInterface, isWritable)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageStreamInterface, write)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageStreamInterface, isReadable)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageStreamInterface, read)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageStreamInterface, getContents)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageStreamInterface, getMetadata)
PHP_FE_END
};
static zend_always_inline void php_register_PsrHttpMessageStreamInterface(INIT_FUNC_ARGS)
{
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "Psr\\Http\\Message\\StreamInterface", PsrHttpMessageStreamInterface_methods);
PsrHttpMessageStreamInterface_ce_ptr = zend_register_internal_interface(&ce);
}
/* }}} Psr\Http\Message\StreamInterface */
/* {{{ Psr\Http\Message\UploadedFileInterface */
PHP_PSR_API zend_class_entry * PsrHttpMessageUploadedFileInterface_ce_ptr;
static zend_function_entry PsrHttpMessageUploadedFileInterface_methods[] = {
PHP_PSR_ABSTRACT_ME(PsrHttpMessageUploadedFileInterface, getStream)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageUploadedFileInterface, moveTo)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageUploadedFileInterface, getSize)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageUploadedFileInterface, getError)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageUploadedFileInterface, getClientFilename)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageUploadedFileInterface, getClientMediaType)
PHP_FE_END
};
static zend_always_inline void php_register_PsrHttpMessageUploadedFileInterface(INIT_FUNC_ARGS)
{
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "Psr\\Http\\Message\\UploadedFileInterface", PsrHttpMessageUploadedFileInterface_methods);
PsrHttpMessageUploadedFileInterface_ce_ptr = zend_register_internal_interface(&ce);
}
/* }}} Psr\Http\Message\UploadedFileInterface */
/* {{{ Psr\Http\Message\UriInterface */
PHP_PSR_API zend_class_entry * PsrHttpMessageUriInterface_ce_ptr;
static zend_function_entry PsrHttpMessageUriInterface_methods[] = {
PHP_PSR_ABSTRACT_ME(PsrHttpMessageUriInterface, getScheme)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageUriInterface, getAuthority)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageUriInterface, getUserInfo)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageUriInterface, getHost)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageUriInterface, getPort)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageUriInterface, getPath)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageUriInterface, getQuery)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageUriInterface, getFragment)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageUriInterface, withScheme)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageUriInterface, withUserInfo)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageUriInterface, withHost)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageUriInterface, withPort)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageUriInterface, withPath)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageUriInterface, withQuery)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageUriInterface, withFragment)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageUriInterface, __toString)
PHP_FE_END
};
static zend_always_inline void php_register_PsrHttpMessageUriInterface(INIT_FUNC_ARGS)
{
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "Psr\\Http\\Message\\UriInterface", PsrHttpMessageUriInterface_methods);
PsrHttpMessageUriInterface_ce_ptr = zend_register_internal_interface(&ce);
}
/* }}} Psr\Http\Message\UriInterface */
/* {{{ PHP_MINIT_FUNCTION */
PHP_MINIT_FUNCTION(psr_http_message)
{
php_register_PsrHttpMessageMessageInterface(INIT_FUNC_ARGS_PASSTHRU);
php_register_PsrHttpMessageRequestInterface(INIT_FUNC_ARGS_PASSTHRU);
php_register_PsrHttpMessageResponseInterface(INIT_FUNC_ARGS_PASSTHRU);
php_register_PsrHttpMessageServerRequestInterface(INIT_FUNC_ARGS_PASSTHRU);
php_register_PsrHttpMessageStreamInterface(INIT_FUNC_ARGS_PASSTHRU);
php_register_PsrHttpMessageUploadedFileInterface(INIT_FUNC_ARGS_PASSTHRU);
php_register_PsrHttpMessageUriInterface(INIT_FUNC_ARGS_PASSTHRU);
return SUCCESS;
}
/* }}} */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: fdm=marker
* vim: et sw=4 ts=4
*/
psr-0.7.0/psr_http_message.h 0000644 0011611 0000144 00000021114 13524411442 014545 0 ustar rin users
#ifndef PSR_HTTP_MESSAGE_H
#define PSR_HTTP_MESSAGE_H
#include "php.h"
#include "php_psr.h"
#define PHP_PSR_HTTP_MESSAGE_VERSION "1.0.0"
extern PHP_PSR_API zend_class_entry * PsrHttpMessageMessageInterface_ce_ptr;
extern PHP_PSR_API zend_class_entry * PsrHttpMessageRequestInterface_ce_ptr;
extern PHP_PSR_API zend_class_entry * PsrHttpMessageResponseInterface_ce_ptr;
extern PHP_PSR_API zend_class_entry * PsrHttpMessageServerRequestInterface_ce_ptr;
extern PHP_PSR_API zend_class_entry * PsrHttpMessageStreamInterface_ce_ptr;
extern PHP_PSR_API zend_class_entry * PsrHttpMessageUploadedFileInterface_ce_ptr;
extern PHP_PSR_API zend_class_entry * PsrHttpMessageUriInterface_ce_ptr;
extern PHP_MINIT_FUNCTION(psr_http_message);
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageMessageInterface, getProtocolVersion, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageMessageInterface, withProtocolVersion, 1)
ZEND_ARG_INFO(0, version)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageMessageInterface, getHeaders, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageMessageInterface, hasHeader, 1)
ZEND_ARG_INFO(0, name)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageMessageInterface, getHeader, 1)
ZEND_ARG_INFO(0, name)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageMessageInterface, getHeaderLine, 1)
ZEND_ARG_INFO(0, name)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageMessageInterface, withHeader, 2)
ZEND_ARG_INFO(0, name)
ZEND_ARG_INFO(0, value)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageMessageInterface, withAddedHeader, 2)
ZEND_ARG_INFO(0, name)
ZEND_ARG_INFO(0, value)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageMessageInterface, withoutHeader, 1)
ZEND_ARG_INFO(0, name)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageMessageInterface, getBody, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageMessageInterface, withBody, 1)
ZEND_ARG_OBJ_INFO(0, body, Psr\\Http\\Message\\StreamInterface, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageRequestInterface, getRequestTarget, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageRequestInterface, withRequestTarget, 1)
ZEND_ARG_INFO(0, requestTarget)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageRequestInterface, getMethod, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageRequestInterface, withMethod, 1)
ZEND_ARG_INFO(0, method)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageRequestInterface, getUri, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageRequestInterface, withUri, 1)
ZEND_ARG_OBJ_INFO(0, uri, Psr\\Http\\Message\\UriInterface, 0)
ZEND_ARG_INFO(0, preserveHost)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageResponseInterface, getStatusCode, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageResponseInterface, withStatus, 1)
ZEND_ARG_INFO(0, code)
ZEND_ARG_INFO(0, reasonPhrase)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageResponseInterface, getReasonPhrase, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageServerRequestInterface, getServerParams, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageServerRequestInterface, getCookieParams, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageServerRequestInterface, withCookieParams, 1)
ZEND_ARG_ARRAY_INFO(0, cookies, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageServerRequestInterface, getQueryParams, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageServerRequestInterface, withQueryParams, 1)
ZEND_ARG_ARRAY_INFO(0, query, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageServerRequestInterface, getUploadedFiles, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageServerRequestInterface, withUploadedFiles, 1)
ZEND_ARG_ARRAY_INFO(0, uploadedFiles, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageServerRequestInterface, getParsedBody, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageServerRequestInterface, withParsedBody, 1)
ZEND_ARG_INFO(0, parsedBody)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageServerRequestInterface, getAttributes, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageServerRequestInterface, getAttribute, 1)
ZEND_ARG_INFO(0, name)
ZEND_ARG_INFO(0, default)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageServerRequestInterface, withAttribute, 2)
ZEND_ARG_INFO(0, name)
ZEND_ARG_INFO(0, value)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageServerRequestInterface, withoutAttribute, 1)
ZEND_ARG_INFO(0, name)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageStreamInterface, __toString, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageStreamInterface, close, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageStreamInterface, detach, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageStreamInterface, getSize, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageStreamInterface, tell, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageStreamInterface, eof, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageStreamInterface, isSeekable, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageStreamInterface, seek, 1)
ZEND_ARG_INFO(0, offset)
ZEND_ARG_INFO(0, whence)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageStreamInterface, rewind, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageStreamInterface, isWritable, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageStreamInterface, write, 1)
ZEND_ARG_INFO(0, string)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageStreamInterface, isReadable, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageStreamInterface, read, 1)
ZEND_ARG_INFO(0, length)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageStreamInterface, getContents, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageStreamInterface, getMetadata, 0)
ZEND_ARG_INFO(0, key)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageUploadedFileInterface, getStream, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageUploadedFileInterface, moveTo, 1)
ZEND_ARG_INFO(0, targetPath)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageUploadedFileInterface, getSize, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageUploadedFileInterface, getError, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageUploadedFileInterface, getClientFilename, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageUploadedFileInterface, getClientMediaType, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageUriInterface, getScheme, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageUriInterface, getAuthority, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageUriInterface, getUserInfo, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageUriInterface, getHost, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageUriInterface, getPort, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageUriInterface, getPath, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageUriInterface, getQuery, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageUriInterface, getFragment, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageUriInterface, withScheme, 1)
ZEND_ARG_INFO(0, scheme)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageUriInterface, withUserInfo, 1)
ZEND_ARG_INFO(0, user)
ZEND_ARG_INFO(0, password)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageUriInterface, withHost, 1)
ZEND_ARG_INFO(0, host)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageUriInterface, withPort, 1)
ZEND_ARG_INFO(0, port)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageUriInterface, withPath, 1)
ZEND_ARG_INFO(0, path)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageUriInterface, withQuery, 1)
ZEND_ARG_INFO(0, query)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageUriInterface, withFragment, 1)
ZEND_ARG_INFO(0, fragment)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrHttpMessageUriInterface, __toString, 0)
PHP_PSR_END_ARG_INFO()
#endif /* PSR_HTTP_MESSAGE_H */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: fdm=marker
* vim: et sw=4 ts=4
*/
psr-0.7.0/psr_http_server_handler.c 0000644 0011611 0000144 00000002244 13524411442 016122 0 ustar rin users
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "php.h"
#include "php_psr.h"
#include "psr_http_server_handler.h"
/* {{{ RequestHandlerInterface ---------------------------------------------- */
PHP_PSR_API zend_class_entry * PsrHttpServerRequestHandlerInterface_ce_ptr;
static zend_function_entry PsrHttpServerRequestHandlerInterface_methods[] = {
PHP_PSR_ABSTRACT_ME(PsrHttpServerRequestHandlerInterface, handle)
PHP_FE_END
};
static zend_always_inline void php_psr_register_PsrHttpServerRequestHandlerInterface(INIT_FUNC_ARGS)
{
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "Psr\\Http\\Server\\RequestHandlerInterface", PsrHttpServerRequestHandlerInterface_methods);
PsrHttpServerRequestHandlerInterface_ce_ptr = zend_register_internal_interface(&ce);
}
/* }}} ---------------------------------------------------------------------- */
/* {{{ PHP_MINIT_FUNCTION */
PHP_MINIT_FUNCTION(psr_http_server_handler)
{
php_psr_register_PsrHttpServerRequestHandlerInterface(INIT_FUNC_ARGS_PASSTHRU);
return SUCCESS;
}
/* }}} */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: fdm=marker
* vim: et sw=4 ts=4
*/
psr-0.7.0/psr_http_server_handler.h 0000644 0011611 0000144 00000001260 13524411442 016124 0 ustar rin users #ifndef PSR_HTTP_SERVER_HANDLER_H
#define PSR_HTTP_SERVER_HANDLER_H
#include "php.h"
#include "php_psr.h"
#define PHP_PSR_HTTP_SERVER_HANDLER_VERSION "1.0.0"
extern PHP_MINIT_FUNCTION(psr_http_server_handler);
extern PHP_PSR_API zend_class_entry * PsrHttpServerRequestHandlerInterface_ce_ptr;
PHP_PSR_BEGIN_ARG_WITH_RETURN_OBJ_INFO(PsrHttpServerRequestHandlerInterface, handle, 1, Psr\\Http\\Message\\ResponseInterface, 0)
ZEND_ARG_OBJ_INFO(0, request, Psr\\Http\\Message\\ServerRequestInterface, 0)
PHP_PSR_END_ARG_INFO()
#endif /* PSR_HTTP_SERVER_HANDLER_H */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: fdm=marker
* vim: et sw=4 ts=4
*/
psr-0.7.0/psr_http_server_middleware.c 0000644 0011611 0000144 00000002213 13524411442 016616 0 ustar rin users
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "php.h"
#include "php_psr.h"
#include "psr_http_server_middleware.h"
/* {{{ MiddlewareInterface -------------------------------------------------- */
PHP_PSR_API zend_class_entry * PsrHttpServerMiddlewareInterface_ce_ptr;
static zend_function_entry PsrHttpServerMiddlewareInterface_methods[] = {
PHP_PSR_ABSTRACT_ME(PsrHttpServerMiddlewareInterface, process)
PHP_FE_END
};
static zend_always_inline void php_psr_register_PsrHttpServerMiddlewareInterface(INIT_FUNC_ARGS)
{
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "Psr\\Http\\Server\\MiddlewareInterface", PsrHttpServerMiddlewareInterface_methods);
PsrHttpServerMiddlewareInterface_ce_ptr = zend_register_internal_interface(&ce);
}
/* }}} ---------------------------------------------------------------------- */
/* {{{ PHP_MINIT_FUNCTION */
PHP_MINIT_FUNCTION(psr_http_server_middleware)
{
php_psr_register_PsrHttpServerMiddlewareInterface(INIT_FUNC_ARGS_PASSTHRU);
return SUCCESS;
}
/* }}} */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: fdm=marker
* vim: et sw=4 ts=4
*/
psr-0.7.0/psr_http_server_middleware.h 0000644 0011611 0000144 00000001411 13524411442 016622 0 ustar rin users #ifndef PSR_HTTP_SERVER_MIDDLEWARE_H
#define PSR_HTTP_SERVER_MIDDLEWARE_H
#include "php.h"
#include "php_psr.h"
#define PHP_PSR_HTTP_SERVER_MIDDLEWARE_VERSION "1.0.0"
extern PHP_MINIT_FUNCTION(psr_http_server_middleware);
extern PHP_PSR_API zend_class_entry * PsrHttpServerMiddlewareInterface_ce_ptr;
PHP_PSR_BEGIN_ARG_WITH_RETURN_OBJ_INFO(PsrHttpServerMiddlewareInterface, process, 2, Psr\\Http\\Message\\ResponseInterface, 0)
ZEND_ARG_OBJ_INFO(0, request, Psr\\Http\\Message\\ServerRequestInterface, 0)
ZEND_ARG_OBJ_INFO(0, handler, Psr\\Http\\Server\\RequestHandlerInterface, 0)
PHP_PSR_END_ARG_INFO()
#endif /* PSR_HTTP_SERVER_MIDDLEWARE_H */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: fdm=marker
* vim: et sw=4 ts=4
*/
psr-0.7.0/psr_link.c 0000644 0011611 0000144 00000010130 13524411442 013006 0 ustar rin users
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "php.h"
#include "php_psr.h"
#include "psr_link.h"
/* {{{ EvolvableLinkInterface ----------------------------------------------- */
PHP_PSR_API zend_class_entry * PsrLinkEvolvableLinkInterface_ce_ptr;
static zend_function_entry PsrLinkEvolvableLinkInterface_methods[] = {
PHP_PSR_ABSTRACT_ME(PsrLinkEvolvableLinkInterface, withHref)
PHP_PSR_ABSTRACT_ME(PsrLinkEvolvableLinkInterface, withRel)
PHP_PSR_ABSTRACT_ME(PsrLinkEvolvableLinkInterface, withoutRel)
PHP_PSR_ABSTRACT_ME(PsrLinkEvolvableLinkInterface, withAttribute)
PHP_PSR_ABSTRACT_ME(PsrLinkEvolvableLinkInterface, withoutAttribute)
PHP_FE_END
};
static zend_always_inline void php_psr_register_PsrLinkEvolvableLinkInterface(INIT_FUNC_ARGS)
{
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "Psr\\Link\\EvolvableLinkInterface", PsrLinkEvolvableLinkInterface_methods);
PsrLinkEvolvableLinkInterface_ce_ptr = zend_register_internal_interface(&ce);
zend_class_implements(PsrLinkEvolvableLinkInterface_ce_ptr, 1, PsrLinkLinkInterface_ce_ptr);
}
/* }}} ---------------------------------------------------------------------- */
/* {{{ PsrLinkEvolvableLinkProviderInterface -------------------------------- */
PHP_PSR_API zend_class_entry * PsrLinkEvolvableLinkProviderInterface_ce_ptr;
static zend_function_entry PsrLinkEvolvableLinkProviderInterface_methods[] = {
PHP_PSR_ABSTRACT_ME(PsrLinkEvolvableLinkProviderInterface, withLink)
PHP_PSR_ABSTRACT_ME(PsrLinkEvolvableLinkProviderInterface, withoutLink)
PHP_FE_END
};
static zend_always_inline void php_psr_register_PsrLinkEvolvableLinkProviderInterface(INIT_FUNC_ARGS)
{
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "Psr\\Link\\EvolvableLinkProviderInterface", PsrLinkEvolvableLinkProviderInterface_methods);
PsrLinkEvolvableLinkProviderInterface_ce_ptr = zend_register_internal_interface(&ce);
zend_class_implements(PsrLinkEvolvableLinkProviderInterface_ce_ptr, 1, PsrLinkLinkProviderInterface_ce_ptr);
}
/* }}} ---------------------------------------------------------------------- */
/* {{{ PsrLinkLinkInterface -------------------------------- */
PHP_PSR_API zend_class_entry * PsrLinkLinkInterface_ce_ptr;
static zend_function_entry PsrLinkLinkInterface_methods[] = {
PHP_PSR_ABSTRACT_ME(PsrLinkLinkInterface, getHref)
PHP_PSR_ABSTRACT_ME(PsrLinkLinkInterface, isTemplated)
PHP_PSR_ABSTRACT_ME(PsrLinkLinkInterface, getRels)
PHP_PSR_ABSTRACT_ME(PsrLinkLinkInterface, getAttributes)
PHP_FE_END
};
static zend_always_inline void php_psr_register_PsrLinkLinkInterface(INIT_FUNC_ARGS)
{
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "Psr\\Link\\LinkInterface", PsrLinkLinkInterface_methods);
PsrLinkLinkInterface_ce_ptr = zend_register_internal_interface(&ce);
}
/* }}} ---------------------------------------------------------------------- */
/* {{{ LinkProviderInterface ------------------------------------------------ */
PHP_PSR_API zend_class_entry * PsrLinkLinkProviderInterface_ce_ptr;
static zend_function_entry PsrLinkLinkProviderInterface_methods[] = {
PHP_PSR_ABSTRACT_ME(PsrLinkLinkProviderInterface, getLinks)
PHP_PSR_ABSTRACT_ME(PsrLinkLinkProviderInterface, getLinksByRel)
PHP_FE_END
};
static zend_always_inline void php_psr_register_PsrLinkLinkProviderInterface(INIT_FUNC_ARGS)
{
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "Psr\\Link\\LinkProviderInterface", PsrLinkLinkProviderInterface_methods);
PsrLinkLinkProviderInterface_ce_ptr = zend_register_internal_interface(&ce);
}
/* }}} ---------------------------------------------------------------------- */
/* {{{ PHP_MINIT_FUNCTION */
PHP_MINIT_FUNCTION(psr_link)
{
php_psr_register_PsrLinkLinkInterface(INIT_FUNC_ARGS_PASSTHRU);
php_psr_register_PsrLinkLinkProviderInterface(INIT_FUNC_ARGS_PASSTHRU);
php_psr_register_PsrLinkEvolvableLinkInterface(INIT_FUNC_ARGS_PASSTHRU);
php_psr_register_PsrLinkEvolvableLinkProviderInterface(INIT_FUNC_ARGS_PASSTHRU);
return SUCCESS;
}
/* }}} */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: fdm=marker
* vim: et sw=4 ts=4
*/
psr-0.7.0/psr_link.h 0000644 0011611 0000144 00000004070 13524411442 013021 0 ustar rin users
#ifndef PSR_LINK_H
#define PSR_LINK_H
#include "php.h"
#include "php_psr.h"
#define PHP_PSR_LINK_VERSION "1.0.0"
extern PHP_PSR_API zend_class_entry * PsrLinkEvolvableLinkInterface_ce_ptr;
extern PHP_PSR_API zend_class_entry * PsrLinkEvolvableLinkProviderInterface_ce_ptr;
extern PHP_PSR_API zend_class_entry * PsrLinkLinkInterface_ce_ptr;
extern PHP_PSR_API zend_class_entry * PsrLinkLinkProviderInterface_ce_ptr;
extern PHP_MINIT_FUNCTION(psr_link);
PHP_PSR_BEGIN_ARG_INFO(PsrLinkEvolvableLinkInterface, withHref, 1)
ZEND_ARG_INFO(0, href)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrLinkEvolvableLinkInterface, withRel, 1)
ZEND_ARG_INFO(0, rel)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrLinkEvolvableLinkInterface, withoutRel, 1)
ZEND_ARG_INFO(0, rel)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrLinkEvolvableLinkInterface, withAttribute, 2)
ZEND_ARG_INFO(0, attribute)
ZEND_ARG_INFO(0, value)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrLinkEvolvableLinkInterface, withoutAttribute, 1)
ZEND_ARG_INFO(0, attribute)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrLinkEvolvableLinkProviderInterface, withLink, 1)
ZEND_ARG_OBJ_INFO(0, link, Psr\\Link\\LinkInterface, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrLinkEvolvableLinkProviderInterface, withoutLink, 1)
ZEND_ARG_OBJ_INFO(0, link, Psr\\Link\\LinkInterface, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrLinkLinkInterface, getHref, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrLinkLinkInterface, isTemplated, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrLinkLinkInterface, getRels, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrLinkLinkInterface, getAttributes, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrLinkLinkProviderInterface, getLinks, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrLinkLinkProviderInterface, getLinksByRel, 1)
ZEND_ARG_INFO(0, rel)
PHP_PSR_END_ARG_INFO()
#endif /* PSR_LINK_H */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: fdm=marker
* vim: et sw=4 ts=4
*/
psr-0.7.0/psr_log.c 0000644 0011611 0000144 00000025234 13524411442 012645 0 ustar rin users
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "php.h"
#include "php_ini.h"
#include "ext/standard/info.h"
#include "ext/spl/spl_exceptions.h"
#include "zend_API.h"
#include "zend_interfaces.h"
#include "php_psr.h"
#include "psr_log.h"
/* Needed to work around https://bugs.php.net/bug.php?id=69579 */
#define PHP_PSR_EXTRA_TRAIT_FLAGS ZEND_ACC_ARENA_ALLOCATED
/* {{{ Psr\Log\InvalidArgumentException */
PHP_PSR_API zend_class_entry * PsrLogInvalidArgumentException_ce_ptr;
static zend_always_inline void php_psr_register_InvalidArgumentException(INIT_FUNC_ARGS)
{
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "Psr\\Log\\InvalidArgumentException", NULL);
PsrLogInvalidArgumentException_ce_ptr = zend_register_internal_class_ex(&ce, spl_ce_InvalidArgumentException);
}
/* }}} Psr\Log\InvalidArgumentException */
/* {{{ Psr\Log\LogLevel */
PHP_PSR_API zend_class_entry * PsrLogLogLevel_ce_ptr;
static zend_always_inline void php_psr_register_LogLevel(INIT_FUNC_ARGS)
{
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "Psr\\Log\\LogLevel", NULL);
PsrLogLogLevel_ce_ptr = zend_register_internal_class(&ce);
REGISTER_PSR_CLASS_CONST_STRING(PsrLogLogLevel_ce_ptr, "EMERGENCY", "emergency");
REGISTER_PSR_CLASS_CONST_STRING(PsrLogLogLevel_ce_ptr, "ALERT", "alert");
REGISTER_PSR_CLASS_CONST_STRING(PsrLogLogLevel_ce_ptr, "CRITICAL", "critical");
REGISTER_PSR_CLASS_CONST_STRING(PsrLogLogLevel_ce_ptr, "ERROR", "error");
REGISTER_PSR_CLASS_CONST_STRING(PsrLogLogLevel_ce_ptr, "WARNING", "warning");
REGISTER_PSR_CLASS_CONST_STRING(PsrLogLogLevel_ce_ptr, "NOTICE", "notice");
REGISTER_PSR_CLASS_CONST_STRING(PsrLogLogLevel_ce_ptr, "INFO", "info");
REGISTER_PSR_CLASS_CONST_STRING(PsrLogLogLevel_ce_ptr, "DEBUG", "debug");
}
/* }}} Psr\Log\LogLevel */
/* {{{ Psr\Log\LoggerInterface */
PHP_PSR_API zend_class_entry * PsrLogLoggerInterface_ce_ptr;
static zend_function_entry PsrLogLoggerInterface_methods[] = {
PHP_PSR_ABSTRACT_ME(PsrLogLoggerInterface, emergency)
PHP_PSR_ABSTRACT_ME(PsrLogLoggerInterface, alert)
PHP_PSR_ABSTRACT_ME(PsrLogLoggerInterface, critical)
PHP_PSR_ABSTRACT_ME(PsrLogLoggerInterface, error)
PHP_PSR_ABSTRACT_ME(PsrLogLoggerInterface, warning)
PHP_PSR_ABSTRACT_ME(PsrLogLoggerInterface, notice)
PHP_PSR_ABSTRACT_ME(PsrLogLoggerInterface, info)
PHP_PSR_ABSTRACT_ME(PsrLogLoggerInterface, debug)
PHP_PSR_ABSTRACT_ME(PsrLogLoggerInterface, log)
PHP_FE_END
};
static zend_always_inline void php_psr_register_LoggerInterface(INIT_FUNC_ARGS) {
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "Psr\\Log\\LoggerInterface", PsrLogLoggerInterface_methods);
PsrLogLoggerInterface_ce_ptr = zend_register_internal_interface(&ce);
}
/* }}} Psr\Log\LoggerInterface */
/* {{{ Psr\Log\LoggerAwareInterface */
PHP_PSR_API zend_class_entry * PsrLogLoggerAwareInterface_ce_ptr;
static zend_function_entry PsrLogLoggerAwareInterface_methods[] = {
PHP_PSR_ABSTRACT_ME(PsrLogLoggerAwareInterface, setLogger)
PHP_FE_END
};
static zend_always_inline void php_psr_register_LoggerAwareInterface(INIT_FUNC_ARGS)
{
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "Psr\\Log\\LoggerAwareInterface", PsrLogLoggerAwareInterface_methods);
PsrLogLoggerAwareInterface_ce_ptr = zend_register_internal_interface(&ce);
}
/* }}} Psr\Log\LoggerAwareInterface */
/* {{{ Psr\Log\AbstractLogger */
PHP_PSR_API zend_class_entry * PsrLogAbstractLogger_ce_ptr;
static void php_psr_PsrLogAbstractLogger_log(const char * level_str, size_t level_len, INTERNAL_FUNCTION_PARAMETERS)
{
zval * _this_zval = getThis();
zval * message;
zval * context = NULL;
zend_class_entry * expected_ce = NULL; // PsrLogAbstractLogger_ce_ptr
zval fname = {0};
zval fparams[3];
ZEND_PARSE_PARAMETERS_START(1, 2)
Z_PARAM_ZVAL(message)
Z_PARAM_OPTIONAL
Z_PARAM_ARRAY(context)
ZEND_PARSE_PARAMETERS_END();
// Alloc function name to call
ZVAL_STRINGL(&fname, "log", sizeof("log")-1);
// Make function params
ZVAL_STRINGL(&fparams[0], level_str, level_len);
ZVAL_ZVAL(&fparams[1], message, 0, 0);
if( context && Z_TYPE_P(context) == IS_ARRAY ) {
ZVAL_ZVAL(&fparams[2], context, 1, 0);
} else {
array_init(&fparams[2]);
}
call_user_function(&Z_OBJCE_P(_this_zval)->function_table, _this_zval, &fname, return_value, 3, fparams);
zval_ptr_dtor(&fparams[0]);
zval_ptr_dtor(&fparams[2]);
zval_ptr_dtor(&fname);
}
PHP_METHOD(PsrLogAbstractLogger, emergency)
{
php_psr_PsrLogAbstractLogger_log(ZEND_STRL("emergency"), INTERNAL_FUNCTION_PARAM_PASSTHRU);
}
PHP_METHOD(PsrLogAbstractLogger, alert)
{
php_psr_PsrLogAbstractLogger_log(ZEND_STRL("alert"), INTERNAL_FUNCTION_PARAM_PASSTHRU);
}
PHP_METHOD(PsrLogAbstractLogger, critical)
{
php_psr_PsrLogAbstractLogger_log(ZEND_STRL("critical"), INTERNAL_FUNCTION_PARAM_PASSTHRU);
}
PHP_METHOD(PsrLogAbstractLogger, error)
{
php_psr_PsrLogAbstractLogger_log(ZEND_STRL("error"), INTERNAL_FUNCTION_PARAM_PASSTHRU);
}
PHP_METHOD(PsrLogAbstractLogger, warning)
{
php_psr_PsrLogAbstractLogger_log(ZEND_STRL("warning"), INTERNAL_FUNCTION_PARAM_PASSTHRU);
}
PHP_METHOD(PsrLogAbstractLogger, notice)
{
php_psr_PsrLogAbstractLogger_log(ZEND_STRL("notice"), INTERNAL_FUNCTION_PARAM_PASSTHRU);
}
PHP_METHOD(PsrLogAbstractLogger, info)
{
php_psr_PsrLogAbstractLogger_log(ZEND_STRL("info"), INTERNAL_FUNCTION_PARAM_PASSTHRU);
}
PHP_METHOD(PsrLogAbstractLogger, debug)
{
php_psr_PsrLogAbstractLogger_log(ZEND_STRL("debug"), INTERNAL_FUNCTION_PARAM_PASSTHRU);
}
static zend_function_entry PsrLogAbstractLogger_methods[] = {
PHP_ME(PsrLogAbstractLogger, emergency, arginfo_PsrLogLoggerInterface_emergency, ZEND_ACC_PUBLIC)
PHP_ME(PsrLogAbstractLogger, alert, arginfo_PsrLogLoggerInterface_alert, ZEND_ACC_PUBLIC)
PHP_ME(PsrLogAbstractLogger, critical, arginfo_PsrLogLoggerInterface_critical, ZEND_ACC_PUBLIC)
PHP_ME(PsrLogAbstractLogger, error, arginfo_PsrLogLoggerInterface_error, ZEND_ACC_PUBLIC)
PHP_ME(PsrLogAbstractLogger, warning, arginfo_PsrLogLoggerInterface_warning, ZEND_ACC_PUBLIC)
PHP_ME(PsrLogAbstractLogger, notice, arginfo_PsrLogLoggerInterface_notice, ZEND_ACC_PUBLIC)
PHP_ME(PsrLogAbstractLogger, info, arginfo_PsrLogLoggerInterface_info, ZEND_ACC_PUBLIC)
PHP_ME(PsrLogAbstractLogger, debug, arginfo_PsrLogLoggerInterface_debug, ZEND_ACC_PUBLIC)
PHP_FE_END
};
static zend_always_inline void php_psr_register_AbstractLogger(INIT_FUNC_ARGS)
{
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "Psr\\Log\\AbstractLogger", PsrLogAbstractLogger_methods);
PsrLogAbstractLogger_ce_ptr = zend_register_internal_class(&ce);
zend_class_implements(PsrLogAbstractLogger_ce_ptr, 1, PsrLogLoggerInterface_ce_ptr);
}
/* }}} Psr\Log\AbstractLogger */
/* {{{ Psr\Log\NullLogger */
PHP_PSR_API zend_class_entry * PsrLogNullLogger_ce_ptr;
PHP_METHOD(PsrLogNullLogger, log)
{
// noop
}
static zend_function_entry PsrLogNullLogger_methods[] = {
PHP_ME(PsrLogNullLogger, log, arginfo_PsrLogLoggerInterface_log, ZEND_ACC_PUBLIC)
PHP_FE_END
};
static zend_always_inline void php_psr_register_NullLogger(INIT_FUNC_ARGS)
{
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "Psr\\Log\\NullLogger", PsrLogNullLogger_methods);
PsrLogNullLogger_ce_ptr = zend_register_internal_class_ex(&ce, PsrLogAbstractLogger_ce_ptr);
}
/* }}} Psr\Log\NullLogger */
/* {{{ Psr\Log\LoggerTrait */
PHP_PSR_API zend_class_entry * PsrLogLoggerTrait_ce_ptr;
static zend_function_entry PsrLogLoggerTrait_methods[] = {
PHP_ME(PsrLogAbstractLogger, emergency, arginfo_PsrLogLoggerInterface_emergency, ZEND_ACC_PUBLIC | PHP_PSR_EXTRA_TRAIT_FLAGS)
PHP_ME(PsrLogAbstractLogger, alert, arginfo_PsrLogLoggerInterface_alert, ZEND_ACC_PUBLIC | PHP_PSR_EXTRA_TRAIT_FLAGS)
PHP_ME(PsrLogAbstractLogger, critical, arginfo_PsrLogLoggerInterface_critical, ZEND_ACC_PUBLIC | PHP_PSR_EXTRA_TRAIT_FLAGS)
PHP_ME(PsrLogAbstractLogger, error, arginfo_PsrLogLoggerInterface_error, ZEND_ACC_PUBLIC | PHP_PSR_EXTRA_TRAIT_FLAGS)
PHP_ME(PsrLogAbstractLogger, warning, arginfo_PsrLogLoggerInterface_warning, ZEND_ACC_PUBLIC | PHP_PSR_EXTRA_TRAIT_FLAGS)
PHP_ME(PsrLogAbstractLogger, notice, arginfo_PsrLogLoggerInterface_notice, ZEND_ACC_PUBLIC | PHP_PSR_EXTRA_TRAIT_FLAGS)
PHP_ME(PsrLogAbstractLogger, info, arginfo_PsrLogLoggerInterface_info, ZEND_ACC_PUBLIC | PHP_PSR_EXTRA_TRAIT_FLAGS)
PHP_ME(PsrLogAbstractLogger, debug, arginfo_PsrLogLoggerInterface_debug, ZEND_ACC_PUBLIC | PHP_PSR_EXTRA_TRAIT_FLAGS)
PHP_ABSTRACT_ME(PsrLogNullLogger, log, arginfo_PsrLogLoggerInterface_log)
PHP_FE_END
};
static zend_always_inline void php_psr_register_LoggerTrait(INIT_FUNC_ARGS)
{
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "Psr\\Log\\LoggerTrait", PsrLogLoggerTrait_methods);
PsrLogLoggerTrait_ce_ptr = zend_register_internal_class(&ce);
PsrLogLoggerTrait_ce_ptr->ce_flags |= ZEND_ACC_TRAIT;
}
/* }}} Psr\Log\LoggerTrait */
/* {{{ Psr\Log\LoggerAwareTrait */
PHP_PSR_API zend_class_entry * PsrLogLoggerAwareTrait_ce_ptr;
PHP_METHOD(PsrLogLoggerAwareTrait, setLogger)
{
zval * _this_zval = getThis();
zval * logger;
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_OBJECT_OF_CLASS(logger, PsrLogLoggerInterface_ce_ptr)
ZEND_PARSE_PARAMETERS_END();
zend_update_property(Z_OBJCE_P(_this_zval), _this_zval, "logger", sizeof("logger")-1, logger);
}
static zend_function_entry PsrLogLoggerAwareTrait_methods[] = {
PHP_ME(PsrLogLoggerAwareTrait, setLogger, arginfo_PsrLogLoggerAwareInterface_setLogger, ZEND_ACC_PUBLIC | PHP_PSR_EXTRA_TRAIT_FLAGS)
PHP_FE_END
};
static zend_always_inline void php_psr_register_LoggerAwareTrait(INIT_FUNC_ARGS)
{
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "Psr\\Log\\LoggerAwareTrait", PsrLogLoggerAwareTrait_methods);
//ce.ce_flags |= ZEND_ACC_TRAIT;
PsrLogLoggerAwareTrait_ce_ptr = zend_register_internal_class(&ce);
PsrLogLoggerAwareTrait_ce_ptr->ce_flags |= ZEND_ACC_TRAIT;
zend_declare_property_null(PsrLogLoggerAwareTrait_ce_ptr, "logger", sizeof("logger")-1, ZEND_ACC_PROTECTED);
}
/* }}} Psr\Log\LoggerAwareTrait */
/* {{{ PHP_MINIT_FUNCTION */
PHP_MINIT_FUNCTION(psr_log)
{
php_psr_register_InvalidArgumentException(INIT_FUNC_ARGS_PASSTHRU);
php_psr_register_LogLevel(INIT_FUNC_ARGS_PASSTHRU);
php_psr_register_LoggerInterface(INIT_FUNC_ARGS_PASSTHRU);
php_psr_register_LoggerAwareInterface(INIT_FUNC_ARGS_PASSTHRU);
php_psr_register_AbstractLogger(INIT_FUNC_ARGS_PASSTHRU);
php_psr_register_NullLogger(INIT_FUNC_ARGS_PASSTHRU);
php_psr_register_LoggerTrait(INIT_FUNC_ARGS_PASSTHRU);
php_psr_register_LoggerAwareTrait(INIT_FUNC_ARGS_PASSTHRU);
return SUCCESS;
}
/* }}} */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: fdm=marker
* vim: et sw=4 ts=4
*/
psr-0.7.0/psr_log.h 0000644 0011611 0000144 00000004472 13524411442 012653 0 ustar rin users
#ifndef PSR_LOG_H
#define PSR_LOG_H
#include "php.h"
#include "php_psr.h"
#define PHP_PSR_LOG_VERSION "1.0.0"
extern PHP_PSR_API zend_class_entry * PsrLogInvalidArgumentException_ce_ptr;
extern PHP_PSR_API zend_class_entry * PsrLogLogLevel_ce_ptr;
extern PHP_PSR_API zend_class_entry * PsrLogLoggerInterface_ce_ptr;
extern PHP_PSR_API zend_class_entry * PsrLogLoggerAwareInterface_ce_ptr;
extern PHP_PSR_API zend_class_entry * PsrLogAbstractLogger_ce_ptr;
extern PHP_PSR_API zend_class_entry * PsrLogNullLogger_ce_ptr;
extern PHP_PSR_API zend_class_entry * PsrLogLoggerTrait_ce_ptr;
extern PHP_PSR_API zend_class_entry * PsrLogLoggerAwareTrait_ce_ptr;
extern PHP_MINIT_FUNCTION(psr_log);
PHP_PSR_BEGIN_ARG_INFO(PsrLogLoggerInterface, emergency, 1)
ZEND_ARG_INFO(0, message)
ZEND_ARG_ARRAY_INFO(0, context, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrLogLoggerInterface, alert, 1)
ZEND_ARG_INFO(0, message)
ZEND_ARG_ARRAY_INFO(0, context, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrLogLoggerInterface, critical, 1)
ZEND_ARG_INFO(0, message)
ZEND_ARG_ARRAY_INFO(0, context, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrLogLoggerInterface, error, 1)
ZEND_ARG_INFO(0, message)
ZEND_ARG_ARRAY_INFO(0, context, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrLogLoggerInterface, warning, 1)
ZEND_ARG_INFO(0, message)
ZEND_ARG_ARRAY_INFO(0, context, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrLogLoggerInterface, notice, 1)
ZEND_ARG_INFO(0, message)
ZEND_ARG_ARRAY_INFO(0, context, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrLogLoggerInterface, info, 1)
ZEND_ARG_INFO(0, message)
ZEND_ARG_ARRAY_INFO(0, context, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrLogLoggerInterface, debug, 1)
ZEND_ARG_INFO(0, message)
ZEND_ARG_ARRAY_INFO(0, context, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrLogLoggerInterface, log, 2)
ZEND_ARG_INFO(0, level)
ZEND_ARG_INFO(0, message)
ZEND_ARG_ARRAY_INFO(0, context, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrLogLoggerAwareInterface, setLogger, 1)
ZEND_ARG_OBJ_INFO(0, logger, Psr\\Log\\LoggerInterface, 0)
PHP_PSR_END_ARG_INFO();
#endif /* PSR_LOG_H */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: fdm=marker
* vim: et sw=4 ts=4
*/
psr-0.7.0/psr_simple_cache.c 0000644 0011611 0000144 00000005676 13524411442 014510 0 ustar rin users
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "php.h"
#include "php_ini.h"
#include "ext/standard/info.h"
#include "ext/spl/spl_exceptions.h"
#include "zend_API.h"
#include "zend_interfaces.h"
#include "php_psr.h"
#include "psr_simple_cache.h"
/* {{{ CacheException ------------------------------------------------------- */
PHP_PSR_API zend_class_entry * PsrSimpleCacheCacheException_ce_ptr;
static zend_always_inline void php_psr_register_PsrSimpleCacheCacheException(INIT_FUNC_ARGS)
{
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "Psr\\SimpleCache\\CacheException", NULL);
PsrSimpleCacheCacheException_ce_ptr = zend_register_internal_interface(&ce);
}
/* }}} ---------------------------------------------------------------------- */
/* {{{ CacheInterface ------------------------------------------------------- */
PHP_PSR_API zend_class_entry * PsrSimpleCacheCacheInterface_ce_ptr;
static zend_function_entry PsrSimpleCacheCacheInterface_methods[] = {
PHP_PSR_ABSTRACT_ME(PsrSimpleCacheCacheInterface, get)
PHP_PSR_ABSTRACT_ME(PsrSimpleCacheCacheInterface, set)
PHP_PSR_ABSTRACT_ME(PsrSimpleCacheCacheInterface, delete)
PHP_PSR_ABSTRACT_ME(PsrSimpleCacheCacheInterface, clear)
PHP_PSR_ABSTRACT_ME(PsrSimpleCacheCacheInterface, getMultiple)
PHP_PSR_ABSTRACT_ME(PsrSimpleCacheCacheInterface, setMultiple)
PHP_PSR_ABSTRACT_ME(PsrSimpleCacheCacheInterface, deleteMultiple)
PHP_PSR_ABSTRACT_ME(PsrSimpleCacheCacheInterface, has)
PHP_FE_END
};
static zend_always_inline void php_psr_register_PsrSimpleCacheCacheInterface(INIT_FUNC_ARGS)
{
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "Psr\\SimpleCache\\CacheInterface", PsrSimpleCacheCacheInterface_methods);
PsrSimpleCacheCacheInterface_ce_ptr = zend_register_internal_interface(&ce);
}
/* }}} ---------------------------------------------------------------------- */
/* {{{ InvalidArgumentException --------------------------------------------- */
PHP_PSR_API zend_class_entry * PsrSimpleCacheInvalidArgumentException_ce_ptr;
static zend_always_inline void php_psr_register_PsrSimpleCacheInvalidArgumentException(INIT_FUNC_ARGS)
{
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "Psr\\SimpleCache\\InvalidArgumentException", NULL);
PsrSimpleCacheInvalidArgumentException_ce_ptr = zend_register_internal_interface(&ce);
zend_class_implements(PsrSimpleCacheInvalidArgumentException_ce_ptr, 1, PsrSimpleCacheCacheException_ce_ptr);
}
/* }}} ---------------------------------------------------------------------- */
/* {{{ PHP_MINIT_FUNCTION */
PHP_MINIT_FUNCTION(psr_simple_cache)
{
php_psr_register_PsrSimpleCacheCacheException(INIT_FUNC_ARGS_PASSTHRU);
php_psr_register_PsrSimpleCacheCacheInterface(INIT_FUNC_ARGS_PASSTHRU);
php_psr_register_PsrSimpleCacheInvalidArgumentException(INIT_FUNC_ARGS_PASSTHRU);
return SUCCESS;
}
/* }}} */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: fdm=marker
* vim: et sw=4 ts=4
*/
psr-0.7.0/psr_simple_cache.h 0000644 0011611 0000144 00000003103 13524411442 014474 0 ustar rin users
#ifndef PSR_SIMPLE_CACHE_H
#define PSR_SIMPLE_CACHE_H
#include "php.h"
#include "php_psr.h"
#define PHP_PSR_SIMPLE_CACHE_VERSION "1.0.0"
extern PHP_PSR_API zend_class_entry * PsrSimpleCacheCacheException_ce_ptr;
extern PHP_PSR_API zend_class_entry * PsrSimpleCacheCacheInterface_ce_ptr;
extern PHP_PSR_API zend_class_entry * PsrSimpleCacheInvalidArgumentException_ce_ptr;
extern PHP_MINIT_FUNCTION(psr_simple_cache);
PHP_PSR_BEGIN_ARG_INFO(PsrSimpleCacheCacheInterface, get, 1)
ZEND_ARG_INFO(0, key)
ZEND_ARG_INFO(0, default)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrSimpleCacheCacheInterface, set, 2)
ZEND_ARG_INFO(0, key)
ZEND_ARG_INFO(0, value)
ZEND_ARG_INFO(0, ttl)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrSimpleCacheCacheInterface, delete, 1)
ZEND_ARG_INFO(0, key)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrSimpleCacheCacheInterface, clear, 0)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrSimpleCacheCacheInterface, getMultiple, 1)
ZEND_ARG_INFO(0, keys)
ZEND_ARG_INFO(0, default)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrSimpleCacheCacheInterface, setMultiple, 1)
ZEND_ARG_INFO(0, values)
ZEND_ARG_INFO(0, ttl)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrSimpleCacheCacheInterface, deleteMultiple, 1)
ZEND_ARG_INFO(0, keys)
PHP_PSR_END_ARG_INFO()
PHP_PSR_BEGIN_ARG_INFO(PsrSimpleCacheCacheInterface, has, 1)
ZEND_ARG_INFO(0, key)
PHP_PSR_END_ARG_INFO()
#endif /* PSR_CACHE_H */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: fdm=marker
* vim: et sw=4 ts=4
*/
psr-0.7.0/tests/PsrLogAbstractLogger.phpt 0000644 0011611 0000144 00000002374 13524411442 017125 0 ustar rin users --TEST--
Psr\Log\AbstractLogger
--SKIPIF--
--FILE--
emergency('msg emergency', array(1));
$logger->alert('msg alert', array(2));
$logger->critical('msg critical', array(3));
$logger->error('msg error', array(4));
$logger->warning('msg warning', array(5));
$logger->notice('msg notice', array(6));
$logger->info('msg info', array(7));
$logger->debug('msg debug', array(8));
$logger->log('level', 'msg', array(9));
$logger->log('level', 'no context');
--EXPECT--
string(9) "emergency"
string(13) "msg emergency"
array(1) {
[0]=>
int(1)
}
string(5) "alert"
string(9) "msg alert"
array(1) {
[0]=>
int(2)
}
string(8) "critical"
string(12) "msg critical"
array(1) {
[0]=>
int(3)
}
string(5) "error"
string(9) "msg error"
array(1) {
[0]=>
int(4)
}
string(7) "warning"
string(11) "msg warning"
array(1) {
[0]=>
int(5)
}
string(6) "notice"
string(10) "msg notice"
array(1) {
[0]=>
int(6)
}
string(4) "info"
string(8) "msg info"
array(1) {
[0]=>
int(7)
}
string(5) "debug"
string(9) "msg debug"
array(1) {
[0]=>
int(8)
}
string(5) "level"
string(3) "msg"
array(1) {
[0]=>
int(9)
}
string(5) "level"
string(10) "no context"
array(0) {
}
psr-0.7.0/tests/PsrContainerContainerInterface.phpt 0000644 0011611 0000144 00000000516 13524411442 021162 0 ustar rin users --TEST--
Psr\Container\ContainerInterface
--SKIPIF--
--FILE--
--FILE--
--FILE--
emergency('msg emergency', array(1));
$logger->alert('msg alert', array(2));
$logger->critical('msg critical', array(3));
$logger->error('msg error', array(4));
$logger->warning('msg warning', array(5));
$logger->notice('msg notice', array(6));
$logger->info('msg info', array(7));
$logger->debug('msg debug', array(8));
$logger->log('level', 'msg', array(9));
$logger->log('level', 'no context');
var_dump(class_uses($logger, false));
--EXPECT--
string(9) "emergency"
string(13) "msg emergency"
array(1) {
[0]=>
int(1)
}
string(5) "alert"
string(9) "msg alert"
array(1) {
[0]=>
int(2)
}
string(8) "critical"
string(12) "msg critical"
array(1) {
[0]=>
int(3)
}
string(5) "error"
string(9) "msg error"
array(1) {
[0]=>
int(4)
}
string(7) "warning"
string(11) "msg warning"
array(1) {
[0]=>
int(5)
}
string(6) "notice"
string(10) "msg notice"
array(1) {
[0]=>
int(6)
}
string(4) "info"
string(8) "msg info"
array(1) {
[0]=>
int(7)
}
string(5) "debug"
string(9) "msg debug"
array(1) {
[0]=>
int(8)
}
string(5) "level"
string(3) "msg"
array(1) {
[0]=>
int(9)
}
string(5) "level"
string(10) "no context"
array(0) {
}
array(1) {
["Psr\Log\LoggerTrait"]=>
string(19) "Psr\Log\LoggerTrait"
}
psr-0.7.0/tests/SampleCacheItemPool.inc 0000644 0011611 0000144 00000001662 13524411442 016506 0 ustar rin users
--FILE--
getMessage());
}
--EXPECT--
bool(true)
bool(true)
string(4) "test"
psr-0.7.0/tests/PsrSimpleCacheCacheInterface.phpt 0000644 0011611 0000144 00000001157 13524411442 020500 0 ustar rin users --TEST--
Psr\SimpleCache\CacheInterface
--SKIPIF--
--FILE--
--FILE--
__toString();
$stream->close();
$stream->detach();
$stream->getSize();
$stream->tell();
$stream->eof();
$stream->isSeekable();
$stream->seek(0);
$stream->rewind();
$stream->isWritable();
$stream->write('foo');
$stream->isReadable();
$stream->read(123);
$stream->getContents();
$stream->getMetadata();
--EXPECTF--
bool(true)
array(1) {
["Psr\Http\Message\StreamInterface"]=>
string(32) "Psr\Http\Message\StreamInterface"
}
string(24) "SampleStream::__toString"
string(19) "SampleStream::close"
string(20) "SampleStream::detach"
string(21) "SampleStream::getSize"
string(18) "SampleStream::tell"
string(17) "SampleStream::eof"
string(24) "SampleStream::isSeekable"
string(18) "SampleStream::seek"
int(0)
int(0)
string(20) "SampleStream::rewind"
string(24) "SampleStream::isWritable"
string(19) "SampleStream::write"
string(3) "foo"
string(24) "SampleStream::isReadable"
string(18) "SampleStream::read"
int(123)
string(25) "SampleStream::getContents"
string(25) "SampleStream::getMetadata"
NULL
psr-0.7.0/tests/PsrHttpMessageRequestInterface.phpt 0000644 0011611 0000144 00000002566 13524411442 021201 0 ustar rin users --TEST--
Psr\Http\Message\RequestInterface
--SKIPIF--
--FILE--
getRequestTarget();
$request->withRequestTarget('test');
$request->getMethod();
$request->withMethod('PUT');
$request->getUri();
$request->withUri(new SampleUri());
$request->withUri(new SampleUri(), true);
--EXPECTF--
bool(true)
bool(true)
array(2) {
["Psr\Http\Message\MessageInterface"]=>
string(33) "Psr\Http\Message\MessageInterface"
["Psr\Http\Message\RequestInterface"]=>
string(33) "Psr\Http\Message\RequestInterface"
}
bool(true)
string(31) "SampleRequest::getRequestTarget"
string(32) "SampleRequest::withRequestTarget"
string(4) "test"
string(24) "SampleRequest::getMethod"
string(25) "SampleRequest::withMethod"
string(3) "PUT"
string(21) "SampleRequest::getUri"
string(22) "SampleRequest::withUri"
object(SampleUri)#%d (0) {
}
bool(false)
string(22) "SampleRequest::withUri"
object(SampleUri)#%d (0) {
}
bool(true)
psr-0.7.0/tests/PsrHttpMessageServerRequestInterface.phpt 0000644 0011611 0000144 00000004773 13524411442 022372 0 ustar rin users --TEST--
Psr\Http\Message\ServerRequestInterface
--SKIPIF--
--FILE--
getServerParams();
$request->getCookieParams();
$request->withCookieParams(array('a' => 'b'));
$request->getQueryParams();
$request->withQueryParams(array('c' => 'd'));
$request->getUploadedFiles();
$request->withUploadedFiles(array());
$request->getParsedBody();
$request->withParsedBody('body');
$request->getAttributes();
$request->getAttribute('attr');
$request->getAttribute('attr', 'bar');
$request->withAttribute('foo', 'baz');
$request->withoutAttribute('bar');
--EXPECT--
bool(true)
bool(true)
bool(true)
array(3) {
["Psr\Http\Message\MessageInterface"]=>
string(33) "Psr\Http\Message\MessageInterface"
["Psr\Http\Message\RequestInterface"]=>
string(33) "Psr\Http\Message\RequestInterface"
["Psr\Http\Message\ServerRequestInterface"]=>
string(39) "Psr\Http\Message\ServerRequestInterface"
}
bool(true)
bool(true)
string(36) "SampleServerRequest::getServerParams"
string(36) "SampleServerRequest::getCookieParams"
string(37) "SampleServerRequest::withCookieParams"
array(1) {
["a"]=>
string(1) "b"
}
string(35) "SampleServerRequest::getQueryParams"
string(36) "SampleServerRequest::withQueryParams"
array(1) {
["c"]=>
string(1) "d"
}
string(37) "SampleServerRequest::getUploadedFiles"
string(38) "SampleServerRequest::withUploadedFiles"
array(0) {
}
string(34) "SampleServerRequest::getParsedBody"
string(35) "SampleServerRequest::withParsedBody"
string(4) "body"
string(34) "SampleServerRequest::getAttributes"
string(33) "SampleServerRequest::getAttribute"
string(4) "attr"
NULL
string(33) "SampleServerRequest::getAttribute"
string(4) "attr"
string(3) "bar"
string(34) "SampleServerRequest::withAttribute"
string(3) "foo"
string(3) "baz"
string(37) "SampleServerRequest::withoutAttribute"
string(3) "bar"
psr-0.7.0/tests/PsrCacheCacheItemPoolInterface.phpt 0000644 0011611 0000144 00000002711 13524411442 020774 0 ustar rin users --TEST--
Psr\Cache\CacheItemPoolInterface
--SKIPIF--
--FILE--
getItem('key');
$cacheItem->getItems();
$cacheItem->getItems(array('keyA', 'keyB'));
$cacheItem->hasItem('key');
$cacheItem->clear();
$cacheItem->deleteItem('keyC');
$cacheItem->deleteItems(array('keyC'));
$cacheItem->save(new SampleCacheItem());
$cacheItem->saveDeferred(new SampleCacheItem());
$cacheItem->commit();
--EXPECTF--
bool(true)
array(1) {
["Psr\Cache\CacheItemPoolInterface"]=>
string(32) "Psr\Cache\CacheItemPoolInterface"
}
string(28) "SampleCacheItemPool::getItem"
string(3) "key"
string(29) "SampleCacheItemPool::getItems"
array(0) {
}
string(29) "SampleCacheItemPool::getItems"
array(2) {
[0]=>
string(4) "keyA"
[1]=>
string(4) "keyB"
}
string(28) "SampleCacheItemPool::hasItem"
string(3) "key"
string(26) "SampleCacheItemPool::clear"
string(31) "SampleCacheItemPool::deleteItem"
string(4) "keyC"
string(32) "SampleCacheItemPool::deleteItems"
array(1) {
[0]=>
string(4) "keyC"
}
string(25) "SampleCacheItemPool::save"
object(SampleCacheItem)#%d (0) {
}
string(33) "SampleCacheItemPool::saveDeferred"
object(SampleCacheItem)#%d (0) {
}
string(27) "SampleCacheItemPool::commit"
psr-0.7.0/tests/PsrContainerContainerExceptionInterface.phpt 0000644 0011611 0000144 00000000766 13524411442 023050 0 ustar rin users --TEST--
Psr\Container\ContainerExceptionInterface
--SKIPIF--
--FILE--
getMessage());
}
--EXPECT--
bool(true)
bool(true)
string(4) "test"
psr-0.7.0/tests/PsrLogNullLogger.phpt 0000644 0011611 0000144 00000001253 13524411442 016267 0 ustar rin users --TEST--
Psr\Log\NullLogger
--SKIPIF--
--FILE--
emergency('msg emergency', array(1));
$logger->alert('msg alert', array(2));
$logger->critical('msg critical', array(3));
$logger->error('msg error', array(4));
$logger->warning('msg warning', array(5));
$logger->notice('msg notice', array(6));
$logger->info('msg info', array(7));
$logger->debug('msg debug', array(8));
$logger->log('level', 'msg', array(9));
$logger->log('level', 'no context');
var_dump($logger instanceof \Psr\Log\LoggerInterface);
var_dump($logger instanceof \Psr\Log\AbstractLogger);
--EXPECT--
bool(true)
bool(true)
psr-0.7.0/tests/PsrHttpMessageUriInterface.phpt 0000644 0011611 0000144 00000002601 13524411442 020276 0 ustar rin users --TEST--
Psr\Http\Message\UriInterface
--SKIPIF--
--FILE--
getScheme();
$uri->getAuthority();
$uri->getUserInfo();
$uri->getHost();
$uri->getPort();
$uri->getPath();
$uri->getQuery();
$uri->getFragment();
$uri->withScheme('http');
$uri->withUserInfo('foo', 'bar');
$uri->withHost('php.net');
$uri->withPort(8080);
$uri->withPath('/');
$uri->withQuery('');
$uri->withFragment('');
$uri->__toString();
--EXPECT--
bool(true)
array(1) {
["Psr\Http\Message\UriInterface"]=>
string(29) "Psr\Http\Message\UriInterface"
}
string(20) "SampleUri::getScheme"
string(23) "SampleUri::getAuthority"
string(22) "SampleUri::getUserInfo"
string(18) "SampleUri::getHost"
string(18) "SampleUri::getPort"
string(18) "SampleUri::getPath"
string(19) "SampleUri::getQuery"
string(22) "SampleUri::getFragment"
string(21) "SampleUri::withScheme"
string(4) "http"
string(23) "SampleUri::withUserInfo"
string(3) "foo"
string(3) "bar"
string(19) "SampleUri::withHost"
string(7) "php.net"
string(19) "SampleUri::withPort"
int(8080)
string(19) "SampleUri::withPath"
string(1) "/"
string(20) "SampleUri::withQuery"
string(0) ""
string(23) "SampleUri::withFragment"
string(0) ""
string(21) "SampleUri::__toString"
psr-0.7.0/tests/PsrLinkLinkProviderInterface.phpt 0000644 0011611 0000144 00000000535 13524411442 020624 0 ustar rin users --TEST--
Psr\Link\LinkProviderInterface
--SKIPIF--
--FILE--
--FILE--
logger;
}
}
$aware = new SampleLoggerAwareTraitUser();
$logger = new SampleLogger();
$aware->setLogger($logger);
var_dump($logger === $aware->getLogger());
var_dump(class_uses($aware, false));
--EXPECT--
bool(true)
array(1) {
["Psr\Log\LoggerAwareTrait"]=>
string(24) "Psr\Log\LoggerAwareTrait"
}
psr-0.7.0/tests/PsrLogAbstractLogger_construct.phpt 0000644 0011611 0000144 00000000522 13524411442 021222 0 ustar rin users --TEST--
Psr\Log\AbstractLogger
--SKIPIF--
--FILE--
getMessage();
} catch( \Throwable $e ) {
echo $e->getMessage();
}
--EXPECTF--
%SCannot instantiate abstract class Psr\Log\AbstractLogger%S
psr-0.7.0/tests/SampleLogger2.inc 0000644 0011611 0000144 00000000335 13524411442 015327 0 ustar rin users
--FILE--
getMessage());
}
--EXPECT--
bool(true)
bool(true)
bool(true)
string(4) "test"
psr-0.7.0/tests/PsrLinkEvolvableLinkInterface.phpt 0000644 0011611 0000144 00000001322 13524411442 020744 0 ustar rin users --TEST--
Psr\Link\EvolvableLinkInterface
--SKIPIF--
--FILE--
--FILE--
--FILE--
getMessage());
}
--EXPECT--
bool(true)
bool(true)
string(4) "test"
psr-0.7.0/tests/PsrHttpMessageMessageInterface.phpt 0000644 0011611 0000144 00000003061 13524411442 021124 0 ustar rin users --TEST--
Psr\Http\Message\MessageInterface
--SKIPIF--
--FILE--
getProtocolVersion();
$message->withProtocolVersion('1.0');
$message->getHeaders();
$message->hasHeader('content-type');
$message->getHeader('content-type');
$message->getHeaderLine('content-type');
$message->withHeader('content-type', 'text/plain');
$message->withAddedHeader('content-type', 'text/html');
$message->withoutHeader('content-type');
$message->getBody();
$message->withBody(new SampleStream());
--EXPECTF--
bool(true)
array(1) {
["Psr\Http\Message\MessageInterface"]=>
string(33) "Psr\Http\Message\MessageInterface"
}
string(33) "SampleMessage::getProtocolVersion"
string(34) "SampleMessage::withProtocolVersion"
string(3) "1.0"
string(25) "SampleMessage::getHeaders"
string(24) "SampleMessage::hasHeader"
string(12) "content-type"
string(24) "SampleMessage::getHeader"
string(12) "content-type"
string(28) "SampleMessage::getHeaderLine"
string(12) "content-type"
string(25) "SampleMessage::withHeader"
string(12) "content-type"
string(10) "text/plain"
string(30) "SampleMessage::withAddedHeader"
string(12) "content-type"
string(9) "text/html"
string(28) "SampleMessage::withoutHeader"
string(12) "content-type"
string(22) "SampleMessage::getBody"
string(23) "SampleMessage::withBody"
object(SampleStream)#%d (0) {
}
psr-0.7.0/tests/PsrCacheCacheItemInterface.phpt 0000644 0011611 0000144 00000001527 13524411442 020146 0 ustar rin users --TEST--
Psr\Cache\CacheItemInterface
--SKIPIF--
--FILE--
getKey();
$cacheItem->get();
$cacheItem->isHit();
$cacheItem->set('test set');
$cacheItem->expiresAt(1435364259);
$cacheItem->expiresAfter(1435364259);
--EXPECT--
bool(true)
array(1) {
["Psr\Cache\CacheItemInterface"]=>
string(28) "Psr\Cache\CacheItemInterface"
}
string(23) "SampleCacheItem::getKey"
string(20) "SampleCacheItem::get"
string(22) "SampleCacheItem::isHit"
string(20) "SampleCacheItem::set"
string(8) "test set"
string(26) "SampleCacheItem::expiresAt"
int(1435364259)
string(29) "SampleCacheItem::expiresAfter"
int(1435364259)
psr-0.7.0/tests/PsrLogLoggerInterface.phpt 0000644 0011611 0000144 00000002722 13524411442 017257 0 ustar rin users --TEST--
Psr\Log\LoggerInterface
--SKIPIF--
--FILE--
emergency('msg emergency', array(1));
$logger->alert('msg alert', array(2));
$logger->critical('msg critical', array(3));
$logger->error('msg error', array(4));
$logger->warning('msg warning', array(5));
$logger->notice('msg notice', array(6));
$logger->info('msg info', array(7));
$logger->debug('msg debug', array(8));
$logger->log('level', 'msg', array(9));
$logger->log('level', 'no context');
--EXPECT--
bool(true)
array(1) {
["Psr\Log\LoggerInterface"]=>
string(23) "Psr\Log\LoggerInterface"
}
string(9) "emergency"
string(13) "msg emergency"
array(1) {
[0]=>
int(1)
}
string(5) "alert"
string(9) "msg alert"
array(1) {
[0]=>
int(2)
}
string(8) "critical"
string(12) "msg critical"
array(1) {
[0]=>
int(3)
}
string(5) "error"
string(9) "msg error"
array(1) {
[0]=>
int(4)
}
string(7) "warning"
string(11) "msg warning"
array(1) {
[0]=>
int(5)
}
string(6) "notice"
string(10) "msg notice"
array(1) {
[0]=>
int(6)
}
string(4) "info"
string(8) "msg info"
array(1) {
[0]=>
int(7)
}
string(5) "debug"
string(9) "msg debug"
array(1) {
[0]=>
int(8)
}
string(5) "level"
string(3) "msg"
array(1) {
[0]=>
int(9)
}
string(5) "level"
string(10) "no context"
array(0) {
}
psr-0.7.0/tests/PsrHttpMessageUploadedFileInterface.phpt 0000644 0011611 0000144 00000001664 13524411442 022104 0 ustar rin users --TEST--
Psr\Http\Message\UploadedFileInterface
--SKIPIF--
--FILE--
getStream();
$uploadedFile->moveTo('/dev/null');
$uploadedFile->getSize();
$uploadedFile->getError();
$uploadedFile->getClientFilename();
$uploadedFile->getClientMediaType();
--EXPECT--
bool(true)
array(1) {
["Psr\Http\Message\UploadedFileInterface"]=>
string(38) "Psr\Http\Message\UploadedFileInterface"
}
string(29) "SampleUploadedFile::getStream"
string(26) "SampleUploadedFile::moveTo"
string(9) "/dev/null"
string(27) "SampleUploadedFile::getSize"
string(28) "SampleUploadedFile::getError"
string(37) "SampleUploadedFile::getClientFilename"
string(38) "SampleUploadedFile::getClientMediaType"
psr-0.7.0/tests/PsrHttpMessageResponseInterface.phpt 0000644 0011611 0000144 00000001777 13524411442 021352 0 ustar rin users --TEST--
Psr\Http\Message\ResponseInterface
--SKIPIF--
--FILE--
getStatusCode();
$request->withStatus(400, 'BAD REQUEST');
$request->getReasonPhrase();
--EXPECT--
bool(true)
bool(true)
array(2) {
["Psr\Http\Message\MessageInterface"]=>
string(33) "Psr\Http\Message\MessageInterface"
["Psr\Http\Message\ResponseInterface"]=>
string(34) "Psr\Http\Message\ResponseInterface"
}
bool(true)
string(29) "SampleResponse::getStatusCode"
string(26) "SampleResponse::withStatus"
int(400)
string(11) "BAD REQUEST"
string(31) "SampleResponse::getReasonPhrase"
psr-0.7.0/tests/SampleCacheItem.inc 0000644 0011611 0000144 00000001105 13524411442 015644 0 ustar rin users
--FILE--
logger = $logger;
var_dump('got logger');
}
public function doSomethingThatLogs() {
$this->logger->emergency('test log');
}
}
psr-0.7.0/tests/PsrLogLoggerAwareInterface.phpt 0000644 0011611 0000144 00000001157 13524411442 020240 0 ustar rin users --TEST--
Psr\Log\LoggerAwareInterface
--SKIPIF--
--FILE--
setLogger($logger);
$aware->doSomethingThatLogs();
--EXPECT--
bool(true)
array(1) {
["Psr\Log\LoggerAwareInterface"]=>
string(28) "Psr\Log\LoggerAwareInterface"
}
string(10) "got logger"
string(9) "emergency"
string(8) "test log"
array(0) {
}
psr-0.7.0/tests/SampleLogger.inc 0000644 0011611 0000144 00000002443 13524411442 015247 0 ustar rin users log(LogLevel::EMERGENCY, $message, $context);
}
public function alert($message, array $context = array()) {
return $this->log(LogLevel::ALERT, $message, $context);
}
public function critical($message, array $context = array()) {
return $this->log(LogLevel::CRITICAL, $message, $context);
}
public function error($message, array $context = array()) {
return $this->log(LogLevel::ERROR, $message, $context);
}
public function warning($message, array $context = array()) {
return $this->log(LogLevel::WARNING, $message, $context);
}
public function notice($message, array $context = array()) {
return $this->log(LogLevel::NOTICE, $message, $context);
}
public function info($message, array $context = array()) {
return $this->log(LogLevel::INFO, $message, $context);
}
public function debug($message, array $context = array()) {
return $this->log(LogLevel::DEBUG, $message, $context);
}
public function log($level, $message, array $context = array()) {
var_dump($level, $message, $context);
}
}
psr-0.7.0/tests/SampleResponse.inc 0000644 0011611 0000144 00000000630 13524411442 015622 0 ustar rin users
--FILE--
%s
Released => %s
Authors => %s
PSR-3 Log Version => %d.%d.%d
PSR-6 Cache Version => %d.%d.%d
PSR-7 Http Message Version => %d.%d.%d
PSR-11 Container Version => %d.%d.%d
PSR-13 Link Version => %d.%d.%d
PSR-14 Event Dispatcher => %d.%d.%d
PSR-15 HTTP Handlers (Server Handler) => %d.%d.%d
PSR-15 HTTP Handlers (Middleware) => %d.%d.%d
PSR-16 Simple Cache Version => %d.%d.%d
PSR-17 HTTP Factories => %d.%d.%d
PSR-18 HTTP Client => %d.%d.%d
%A
psr-0.7.0/tests/SampleStream.inc 0000644 0011611 0000144 00000002406 13524411442 015262 0 ustar rin users
--FILE--
getMessage());
}
--EXPECT--
bool(true)
bool(true)
bool(true)
string(4) "test"
psr-0.7.0/tests/PsrSimpleCacheCacheException.phpt 0000644 0011611 0000144 00000000671 13524411442 020536 0 ustar rin users --TEST--
Psr\SimpleCache\CacheException
--SKIPIF--
--FILE--
getMessage());
}
--EXPECT--
bool(true)
bool(true)
string(4) "test"
psr-0.7.0/tests/PsrSimpleCacheInvalidArgumentException.phpt 0000644 0011611 0000144 00000000753 13524411442 022625 0 ustar rin users --TEST--
Psr\SimpleCache\InvalidArgumentException
--SKIPIF--
--FILE--
getMessage());
}
--EXPECT--
bool(true)
bool(true)
string(4) "test"
psr-0.7.0/tests/PsrHttpServerMiddlewareInterface.phpt 0000644 0011611 0000144 00000002063 13524411442 021500 0 ustar rin users --TEST--
Psr\Http\Server\MiddlewareInterface
--SKIPIF--
--FILE--
process($request, $handler);
var_dump($response instanceof \Psr\Http\Message\ResponseInterface);
--EXPECT--
bool(true)
array(1) {
["Psr\Http\Server\MiddlewareInterface"]=>
string(35) "Psr\Http\Server\MiddlewareInterface"
}
bool(true)
bool(true)
string(25) "SampleMiddleware::process"
bool(true)
psr-0.7.0/tests/PsrHttpServerRequestHandlerInterface.phpt 0000644 0011611 0000144 00000001630 13524411442 022350 0 ustar rin users --TEST--
Psr\Http\Server\RequestHandlerInterface
--SKIPIF--
--FILE--
handle($request);
var_dump($response instanceof \Psr\Http\Message\ResponseInterface);
--EXPECT--
bool(true)
array(1) {
["Psr\Http\Server\RequestHandlerInterface"]=>
string(39) "Psr\Http\Server\RequestHandlerInterface"
}
bool(true)
string(28) "SampleRequestHandler::handle"
bool(true)
psr-0.7.0/tests/SampleRequestHandler.inc 0000644 0011611 0000144 00000000554 13524411442 016757 0 ustar rin users
--FILE--
createRequest('GET', 'http://domain.com');
var_dump($request instanceof \Psr\Http\Message\RequestInterface);
$factory->createRequest('POST', new SampleUri());
--EXPECTF--
bool(true)
array(1) {
["Psr\Http\Message\RequestFactoryInterface"]=>
string(40) "Psr\Http\Message\RequestFactoryInterface"
}
string(35) "SampleRequestFactory::createRequest"
string(3) "GET"
string(17) "http://domain.com"
bool(true)
string(35) "SampleRequestFactory::createRequest"
string(4) "POST"
object(SampleUri)#%d (0) {
}
psr-0.7.0/tests/PsrHttpMessageResponseFactoryInterface.phpt 0000644 0011611 0000144 00000001566 13524411442 022676 0 ustar rin users --TEST--
Psr\Http\Message\ResponseFactoryInterface
--SKIPIF--
--FILE--
createResponse();
var_dump($response instanceof \Psr\Http\Message\ResponseInterface);
$factory->createResponse(400, 'BAD REQUEST');
--EXPECT--
bool(true)
array(1) {
["Psr\Http\Message\ResponseFactoryInterface"]=>
string(41) "Psr\Http\Message\ResponseFactoryInterface"
}
string(37) "SampleResponseFactory::createResponse"
int(200)
string(0) ""
bool(true)
string(37) "SampleResponseFactory::createResponse"
int(400)
string(11) "BAD REQUEST"
psr-0.7.0/tests/PsrHttpMessageServerRequestFactoryInterface.phpt 0000644 0011611 0000144 00000002255 13524411442 023713 0 ustar rin users --TEST--
Psr\Http\Message\ServerRequestFactoryInterface
--SKIPIF--
--FILE--
createServerRequest('GET', 'http://domain.com');
var_dump($request instanceof \Psr\Http\Message\ServerRequestInterface);
$request = $factory->createServerRequest('POST', new SampleUri(), ['param' => 'value']);
--EXPECTF--
bool(true)
array(1) {
["Psr\Http\Message\ServerRequestFactoryInterface"]=>
string(46) "Psr\Http\Message\ServerRequestFactoryInterface"
}
string(47) "SampleServerRequestFactory::createServerRequest"
string(3) "GET"
string(17) "http://domain.com"
array(0) {
}
bool(true)
string(47) "SampleServerRequestFactory::createServerRequest"
string(4) "POST"
object(SampleUri)#%d (0) {
}
array(1) {
["param"]=>
string(5) "value"
}
psr-0.7.0/tests/PsrHttpMessageStreamFactoryInterface.phpt 0000644 0011611 0000144 00000002555 13524411442 022332 0 ustar rin users --TEST--
Psr\Http\Message\StreamFactoryInterface
--SKIPIF--
--FILE--
createStream();
var_dump($stream instanceof \Psr\Http\Message\StreamInterface);
$factory->createStream('content');
$stream = $factory->createStreamFromFile('/tmp/file1');
var_dump($stream instanceof \Psr\Http\Message\StreamInterface);
$factory->createStreamFromFile('/tmp/file2', 'wb');
$stream = $factory->createStreamFromResource(fopen('php://memory', 'r'));
var_dump($stream instanceof \Psr\Http\Message\StreamInterface);
--EXPECTF--
bool(true)
array(1) {
["Psr\Http\Message\StreamFactoryInterface"]=>
string(39) "Psr\Http\Message\StreamFactoryInterface"
}
string(33) "SampleStreamFactory::createStream"
string(0) ""
bool(true)
string(33) "SampleStreamFactory::createStream"
string(7) "content"
string(41) "SampleStreamFactory::createStreamFromFile"
string(10) "/tmp/file1"
string(1) "r"
bool(true)
string(41) "SampleStreamFactory::createStreamFromFile"
string(10) "/tmp/file2"
string(2) "wb"
string(45) "SampleStreamFactory::createStreamFromResource"
resource(%d) of type (stream)
bool(true)
psr-0.7.0/tests/PsrHttpMessageUploadedFileFactoryInterface.phpt 0000644 0011611 0000144 00000002141 13524411442 023423 0 ustar rin users --TEST--
Psr\Http\Message\UploadedFileFactoryInterface
--SKIPIF--
--FILE--
createUploadedFile($stream);
var_dump($uploadedFile instanceof \Psr\Http\Message\UploadedFileInterface);
$factory->createUploadedFile($stream, 100, UPLOAD_ERR_NO_FILE, 'image.png', 'image/png');
--EXPECTF--
bool(true)
array(1) {
["Psr\Http\Message\UploadedFileFactoryInterface"]=>
string(45) "Psr\Http\Message\UploadedFileFactoryInterface"
}
string(45) "SampleUploadedFileFactory::createUploadedFile"
object(SampleStream)#%d (0) {
}
NULL
int(0)
NULL
NULL
bool(true)
string(45) "SampleUploadedFileFactory::createUploadedFile"
object(SampleStream)#%d (0) {
}
int(100)
int(4)
string(9) "image.png"
string(9) "image/png"
psr-0.7.0/tests/PsrHttpMessageUriFactoryInterface.phpt 0000644 0011611 0000144 00000001356 13524411442 021634 0 ustar rin users --TEST--
Psr\Http\Message\UriFactoryInterface
--SKIPIF--
--FILE--
createUri();
var_dump($uri instanceof \Psr\Http\Message\UriInterface);
$factory->createUri('http://domain.com');
--EXPECT--
bool(true)
array(1) {
["Psr\Http\Message\UriFactoryInterface"]=>
string(36) "Psr\Http\Message\UriFactoryInterface"
}
string(27) "SampleUriFactory::createUri"
string(0) ""
bool(true)
string(27) "SampleUriFactory::createUri"
string(17) "http://domain.com"
psr-0.7.0/tests/SampleRequestFactory.inc 0000644 0011611 0000144 00000000507 13524411442 017007 0 ustar rin users
--FILE--
getMessage());
}
--EXPECT--
array(1) {
["Throwable"]=>
string(9) "Throwable"
}
bool(true)
bool(true)
bool(true)
string(4) "test"
psr-0.7.0/tests/PsrHttpClientClientInterface.phpt 0000644 0011611 0000144 00000001373 13524411442 020614 0 ustar rin users --TEST--
Psr\Http\Client\ClientInterface
--SKIPIF--
--FILE--
sendRequest($request);
var_dump($response instanceof \Psr\Http\Message\ResponseInterface);
--EXPECTF--
bool(true)
array(1) {
["Psr\Http\Client\ClientInterface"]=>
string(31) "Psr\Http\Client\ClientInterface"
}
string(25) "SampleClient::sendRequest"
object(SampleRequest)#%d (0) {
}
bool(true)
psr-0.7.0/tests/PsrHttpClientNetworkExceptionInterface.phpt 0000644 0011611 0000144 00000002271 13524411442 022704 0 ustar rin users --TEST--
Psr\Http\Client\NetworkExceptionInterface
--SKIPIF--
--FILE--
getMessage());
var_dump($e->getRequest());
}
--EXPECTF--
array(2) {
["Psr\Http\Client\ClientExceptionInterface"]=>
string(40) "Psr\Http\Client\ClientExceptionInterface"
["Throwable"]=>
string(9) "Throwable"
}
bool(true)
bool(true)
bool(true)
bool(true)
string(4) "test"
string(23) "MyException::getRequest"
object(SampleRequest)#%d (0) {
}
psr-0.7.0/tests/PsrHttpClientRequestExceptionInterface.phpt 0000644 0011611 0000144 00000002271 13524411442 022703 0 ustar rin users --TEST--
Psr\Http\Client\RequestExceptionInterface
--SKIPIF--
--FILE--
getMessage());
var_dump($e->getRequest());
}
--EXPECTF--
array(2) {
["Psr\Http\Client\ClientExceptionInterface"]=>
string(40) "Psr\Http\Client\ClientExceptionInterface"
["Throwable"]=>
string(9) "Throwable"
}
bool(true)
bool(true)
bool(true)
bool(true)
string(4) "test"
string(23) "MyException::getRequest"
object(SampleRequest)#%d (0) {
}
psr-0.7.0/tests/SampleClient.inc 0000644 0011611 0000144 00000000526 13524411442 015246 0 ustar rin users = 70200) {
print "skip Due to version incompatibility";
}
?>
--FILE--
%s
Released => %s
Authors => %s
PSR-3 Log Version => %d.%d.%d
PSR-6 Cache Version => %d.%d.%d
PSR-7 Http Message Version => %d.%d.%d
PSR-11 Container Version => %d.%d.%d
PSR-13 Link Version => %d.%d.%d
PSR-15 HTTP Handlers (Server Handler) => %d.%d.%d
PSR-15 HTTP Handlers (Middleware) => %d.%d.%d
PSR-16 Simple Cache Version => %d.%d.%d
PSR-17 HTTP Factories => %d.%d.%d
PSR-18 HTTP Client => %d.%d.%d
%A
psr-0.7.0/tests/PsrEventDispatcherEventDispatcherInterface.phpt 0000644 0011611 0000144 00000001337 13524411442 023500 0 ustar rin users --TEST--
Psr\EventDispatcher\EventDispatcherInterface
--SKIPIF--
--FILE--
dispatch($event);
var_dump(is_object($return));
--EXPECT--
bool(true)
array(1) {
["Psr\EventDispatcher\EventDispatcherInterface"]=>
string(44) "Psr\EventDispatcher\EventDispatcherInterface"
}
bool(true)
string(31) "SampleEventDispatcher::dispatch"
bool(true)
bool(true)
psr-0.7.0/tests/PsrEventDispatcherListenerProviderInterface.phpt 0000644 0011611 0000144 00000001374 13524411442 023711 0 ustar rin users --TEST--
Psr\EventDispatcher\ListenerProviderInterface
--SKIPIF--
--FILE--
getListenersForEvent($event);
var_dump(is_iterable($return));
--EXPECT--
bool(true)
array(1) {
["Psr\EventDispatcher\ListenerProviderInterface"]=>
string(45) "Psr\EventDispatcher\ListenerProviderInterface"
}
bool(true)
string(44) "SampleListenerProvider::getListenersForEvent"
bool(true)
bool(true)
psr-0.7.0/tests/PsrEventDispatcherStoppableEventInterface.phpt 0000644 0011611 0000144 00000001263 13524411442 023341 0 ustar rin users --TEST--
Psr\EventDispatcher\StoppableEventInterface
--SKIPIF--
--FILE--
isPropagationStopped();
var_dump(is_bool($return));
--EXPECT--
bool(true)
array(1) {
["Psr\EventDispatcher\StoppableEventInterface"]=>
string(43) "Psr\EventDispatcher\StoppableEventInterface"
}
bool(true)
string(42) "SampleStoppableEvent::isPropagationStopped"
bool(true)
psr-0.7.0/tests/SampleEventDispatcher.inc 0000644 0011611 0000144 00000000377 13524411442 017124 0 ustar rin users