public function flatten_props($props)
    {
        foreach ($props as $property => $value) {
            if (is_object($value) && get_class($value) == 'DateTime') {
                $props[$property] = $value->format('Y-m-d H:i:s');
            } elseif (is_array($value)) {
                $props[$property] = serialize($value);
            } elseif ($value instanceof AbstractClass) {
                $props[$property] = $value->primary_key();
            }
        }

        return $props;
    }
public function flatten_props($props)
    {
        foreach ($props as $property => $value) {
            if (is_object($value) && get_class($value) == 'DateTime') {
                $props[$property] = $value->format('Y-m-d H:i:s');
            } elseif (is_array($value)) {
                $props[$property] = serialize($value);
            } elseif ($value instanceof AbstractClass) {
                $props[$property] = $value->primary_key();
            }
        }

        return $props;
    }
public function flatten_props ( $ props ) { foreach ( $ props as $ property => $ value ) { if ( is_object ( $ value ) && get_class ( $ value ) == 'DateTime' ) { $ props [ $ property ] = $ value -> format ( 'Y-m-d H:i:s' ) ; } elseif ( is_array ( $ value ) ) { $ props [ $ property ] = serialize ( $ value ) ; } elseif ( $ value instanceof AbstractClass ) { $ props [ $ property ] = $ value -> primary_key ( ) ; } } return $ props ; }
Convert complex objects to strings to insert into the database.

@param  array $props
@return array
Convert complex objects to strings to insert into the database .