Redaxscript\Reader::getArray PHP Метод

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

get the array
С версии: 3.0.0
public getArray ( ) : array
Результат array
    public function getArray()
    {
        if (!$this->_dataArray && $this->_dataObject) {
            $this->_dataArray = $this->_convertToArray();
        }
        return $this->_dataArray;
    }

Usage Example

Пример #1
0
 /**
  * testConvertToArray
  *
  * @since 3.0.0
  */
 public function testConvertToArray()
 {
     /* setup */
     $reader = new Reader();
     $reader->loadXML('tests/provider/reader.xml');
     /* actual */
     $actual = $reader->getArray();
     /* compare */
     $this->assertEquals('1', $actual['@attributes']['id']);
 }