src/Request/SlimRequest.php
/**
     * Parses body parts after splitting it with boundary string
     *
     * @param string $body             Body received from partial request
     * @param array  $filePartialsInfo Data with current uploaded files
     *
     * @return bool
     */
Parses body parts after splitting it with boundary string
@param string $body             Body received from partial request
@param array  $filePartialsInfo Data with current uploaded files

@return bool
Parses body parts after splitting it with boundary string @param string $body Body received from partial request @param array $filePartialsInfo Data with current uploaded files @return bool
static public function parseBody(string $body, array &$filePartialsInfo) :bool
    {
        $bodyParts = explode($filePartialsInfo['boundary'], $body);
        if (empty($bodyParts[0]) === true) {
            array_shift($bodyParts);
        }
        foreach($bodyParts as $piece) {
            if ($piece !== "--\r\n") {
                static::parseBodyParts($piece, $filePartialsInfo);
            }
        }
        if( is_array($bodyParts) === true && in_array("--\r\n", $bodyParts) === true) {
            static::setFileSizes($filePartialsInfo);
            return false;
        } elseif($bodyParts === '--') {
            static::setFileSizes($filePartialsInfo);
            return false;
        }
        return true;
    }
static public function parseBody ( string $ body , array & $ filePartialsInfo ) : bool { $ bodyParts = explode ( $ filePartialsInfo [ 'boundary' ] , $ body ) ; if ( empty ( $ bodyParts [ 0 ] ) === true ) { array_shift ( $ bodyParts ) ; } foreach ( $ bodyParts as $ piece ) { if ( $ piece !== " -- \r \n " ) { static :: parseBodyParts ( $ piece , $ filePartialsInfo ) ; } } if ( is_array ( $ bodyParts ) === true && in_array ( " -- \r \n " , $ bodyParts ) === true ) { static :: setFileSizes ( $ filePartialsInfo ) ; return false ; } elseif ( $ bodyParts === '--' ) { static :: setFileSizes ( $ filePartialsInfo ) ; return false ; } return true ; }
Parses body parts after splitting it with boundary string
 @param string $body             Body received from partial request
 @param array  $filePartialsInfo Data with current uploaded files
Parses body parts after splitting it with boundary string @param string $body Body received from partial request @param array $filePartialsInfo Data with current uploaded files