c666e4e0abb6312a405b9dd74153d9955250bc80
[yaffs-website] / vendor / zendframework / zend-diactoros / src / functions / marshal_method_from_sapi.php
1 <?php
2 /**
3  * @see       https://github.com/zendframework/zend-diactoros for the canonical source repository
4  * @copyright Copyright (c) 2018 Zend Technologies USA Inc. (https://www.zend.com)
5  * @license   https://github.com/zendframework/zend-diactoros/blob/master/LICENSE.md New BSD License
6  */
7
8 namespace Zend\Diactoros;
9
10 /**
11  * Retrieve the request method from the SAPI parameters.
12  *
13  * @param array $server
14  * @return string
15  */
16 function marshalMethodFromSapi(array $server)
17 {
18     return isset($server['REQUEST_METHOD']) ? $server['REQUEST_METHOD'] : 'GET';
19 }