static public function extend(array $to, array $from)
    {
        foreach ($from as $key => $value) {
            if (is_array($value)) {
                $to[$key] = self::extend((array) (isset($to[$key]) ? $to[$key] : []),$value);
            }else{
                $to[$key] = $value;
            }
        }
        return $to;
    }