src/Infrastructure/Config/Settings.php
public function toArray()
    {
        $data = array();

        foreach ($this as $key => $value) {
            if (is_object($value)) {
                if (!is_callable(array($value, 'toArray'))) {
                    throw new RuntimeException('Object does not implement toArray() method on key: ' . $key);
                }
                $data[$key] = $value->toArray();
            } else {
                $data[$key] = $value;
            }
        }

        return $data;
    }
public function toArray()
    {
        $data = array();

        foreach ($this as $key => $value) {
            if (is_object($value)) {
                if (!is_callable(array($value, 'toArray'))) {
                    throw new RuntimeException('Object does not implement toArray() method on key: ' . $key);
                }
                $data[$key] = $value->toArray();
            } else {
                $data[$key] = $value;
            }
        }

        return $data;
    }
public function toArray ( ) { $ data = array ( ) ; foreach ( $ this as $ key => $ value ) { if ( is_object ( $ value ) ) { if ( ! is_callable ( array ( $ value , 'toArray' ) ) ) { throw new RuntimeException ( 'Object does not implement toArray() method on key: ' . $ key ) ; } $ data [ $ key ] = $ value -> toArray ( ) ; } else { $ data [ $ key ] = $ value ; } } return $ data ; }
Returns the data as an associative array.

@return array with all data

@throws BadValueException when no toArray method is available on an object value
Returns the data as an associative array .