opensrs\Ops::decode PHP Метод

decode() публичный Метод

Accepts an OPS protocol message or an file handle and decodes the data into a PHP array.
public decode ( $in ) : mixed
Результат mixed PHP array, or error
    public function decode($in)
    {
        $ops_msg = '';
        /* determine if we were passed a string or file handle */
        if (is_resource($in)) {
            # read the file into a string, then process as usual
            while (!feof($in)) {
                $ops_msg .= fgets($in, 400);
            }
        } else {
            $ops_msg = $in;
        }
        return $this->XML2PHP($ops_msg);
        /* decode and return */
    }