Format::_from_csv PHP Method

_from_csv() protected method

protected _from_csv ( string $data, string $delimiter = ',', string $enclosure = '"' ) : array
$data string CSV string
$delimiter string The optional delimiter parameter sets the field delimiter (one character only). NULL will use the default value (,)
$enclosure string The optional enclosure parameter sets the field enclosure (one character only). NULL will use the default value (")
return array A multi-dimensional array with the outer array being the number of rows and the inner arrays the individual fields
    protected function _from_csv($data, $delimiter = ',', $enclosure = '"')
    {
        // If NULL, then set as the default delimiter
        if ($delimiter === NULL) {
            $delimiter = ',';
        }
        // If NULL, then set as the default enclosure
        if ($enclosure === NULL) {
            $enclosure = '"';
        }
        return str_getcsv($data, $delimiter, $enclosure);
    }