public function loadFromString($ofxContent)
    {
        $ofxContent = str_replace(["\r\n", "\r"], "\n", $ofxContent);
        $ofxContent = utf8_encode($ofxContent);
        $ofxContent = $this->conditionallyAddNewlines($ofxContent);

        $sgmlStart = stripos($ofxContent, '<OFX>');

        $ofxHeader =  trim(substr($ofxContent, 0, $sgmlStart-1));

        $header = $this->parseHeader($ofxHeader);

        $ofxSgml = trim(substr($ofxContent, $sgmlStart));

        $ofxXml = $this->convertSgmlToXml($ofxSgml);

        $xml = $this->xmlLoadString($ofxXml);

        $ofx = new Ofx($xml);
        $ofx->buildHeader($header);

        return $ofx;
    }
public function loadFromString($ofxContent)
    {
        $ofxContent = str_replace(["\r\n", "\r"], "\n", $ofxContent);
        $ofxContent = utf8_encode($ofxContent);
        $ofxContent = $this->conditionallyAddNewlines($ofxContent);

        $sgmlStart = stripos($ofxContent, '<OFX>');

        $ofxHeader =  trim(substr($ofxContent, 0, $sgmlStart-1));

        $header = $this->parseHeader($ofxHeader);

        $ofxSgml = trim(substr($ofxContent, $sgmlStart));

        $ofxXml = $this->convertSgmlToXml($ofxSgml);

        $xml = $this->xmlLoadString($ofxXml);

        $ofx = new Ofx($xml);
        $ofx->buildHeader($header);

        return $ofx;
    }
public function loadFromString ( $ ofxContent ) { $ ofxContent = str_replace ( [ "\r\n" , "\r" ] , "\n" , $ ofxContent ) ; $ ofxContent = utf8_encode ( $ ofxContent ) ; $ ofxContent = $ this -> conditionallyAddNewlines ( $ ofxContent ) ; $ sgmlStart = stripos ( $ ofxContent , '<OFX>' ) ; $ ofxHeader = trim ( substr ( $ ofxContent , 0 , $ sgmlStart - 1 ) ) ; $ header = $ this -> parseHeader ( $ ofxHeader ) ; $ ofxSgml = trim ( substr ( $ ofxContent , $ sgmlStart ) ) ; $ ofxXml = $ this -> convertSgmlToXml ( $ ofxSgml ) ; $ xml = $ this -> xmlLoadString ( $ ofxXml ) ; $ ofx = new Ofx ( $ xml ) ; $ ofx -> buildHeader ( $ header ) ; return $ ofx ; }
Load an OFX by directly using the text content

@param string $ofxContent
@return  Ofx
@throws \Exception
Load an OFX by directly using the text content