Pop\Data\Data::parseFile PHP Method

parseFile() public method

Parse the data file stream and return a PHP data object.
public parseFile ( ) : mixed
return mixed
    public function parseFile()
    {
        $class = 'Pop\\Data\\Type\\' . $this->type;
        $this->data = $class::decode($this->file);
        return $this->data;
    }

Usage Example

Ejemplo n.º 1
0
 public function testData()
 {
     $d = new Data(__DIR__ . '/../tmp/test.sql');
     $ary = $d->parseFile();
     $keys = array('id', 'username', 'password', 'email', 'access');
     $this->assertEquals(9, count($ary));
     $this->assertEquals($keys, array_keys($ary['row_1']));
 }
All Usage Examples Of Pop\Data\Data::parseFile