protected function flatReference(array $reference)/*# : array */
    {
        reset($reference);
        foreach ($reference as $key => $value) {
            if (is_object($value)) {
                $reference[$key] = get_class($value);
            } elseif (is_array($value)) {
                $reference[$key] = $this->flatReference($value);
            }
        }
        ksort($reference);
        return $reference;
    }
protected function flatReference(array $reference)/*# : array */
    {
        reset($reference);
        foreach ($reference as $key => $value) {
            if (is_object($value)) {
                $reference[$key] = get_class($value);
            } elseif (is_array($value)) {
                $reference[$key] = $this->flatReference($value);
            }
        }
        ksort($reference);
        return $reference;
    }
protected function flatReference ( array $ reference ) /*# : array */ { reset ( $ reference ) ; foreach ( $ reference as $ key => $ value ) { if ( is_object ( $ value ) ) { $ reference [ $ key ] = get_class ( $ value ) ; } elseif ( is_array ( $ value ) ) { $ reference [ $ key ] = $ this -> flatReference ( $ value ) ; } } ksort ( $ reference ) ; return $ reference ; }
flat the reference array to make it easy for serialize

@param  array $reference reference data
@return array flattered array
@access protected
flat the reference array to make it easy for serialize