src/icepay_api_webservice.php
public function loadFromFile($fileName = "wsdata", $directory = "")
    {
        if ($directory == "")
            $directory = dirname(__FILE__);

        $filename = sprintf("%s/%s.csv", $directory, $fileName);
        try {
            $fp = @fopen($filename, "r");
            $line = @fgets($fp);
            @fclose($fp);
        } catch (Exception $e) {
            throw new Exception($e->getMessage());
        };

        if (!$line) {
            throw new Exception("No data stored");
        }

        $arr = explode(",", $line);
        $this->importFromString($arr[1]);

        return $this;
    }
public function loadFromFile($fileName = "wsdata", $directory = "")
    {
        if ($directory == "")
            $directory = dirname(__FILE__);

        $filename = sprintf("%s/%s.csv", $directory, $fileName);
        try {
            $fp = @fopen($filename, "r");
            $line = @fgets($fp);
            @fclose($fp);
        } catch (Exception $e) {
            throw new Exception($e->getMessage());
        };

        if (!$line) {
            throw new Exception("No data stored");
        }

        $arr = explode(",", $line);
        $this->importFromString($arr[1]);

        return $this;
    }
public function loadFromFile ( $ fileName = "wsdata" , $ directory = "" ) { if ( $ directory == "" ) $ directory = dirname ( __FILE__ ) ; $ filename = sprintf ( "%s/%s.csv" , $ directory , $ fileName ) ; try { $ fp = @ fopen ( $ filename , "r" ) ; $ line = @ fgets ( $ fp ) ; @ fclose ( $ fp ) ; } catch ( Exception $ e ) { throw new Exception ( $ e -> getMessage ( ) ) ; } ; if ( ! $ line ) { throw new Exception ( "No data stored" ) ; } $ arr = explode ( "," , $ line ) ; $ this -> importFromString ( $ arr [ 1 ] ) ; return $ this ; }
Read data from stored file

@since 2.1.0
@access public
@param string $fileName
@param string $directory
@return \Icepay_Webservice_Filtering
@throws Exception
Read data from stored file