<commit_before><commit_msg>Add feed controller with recently_added method<commit_after><?php defined('SYSPATH') or die('No direct script access.');

class Controller_Feed extends Controller
{
    public function action_index()
    {
        return $this->action_recently_added();
    }
    
    public function action_recently_added()
    {
        $items = DB::select(
                array(DB::expr('CONCAT(username,"/",name)'), 'title'),
                array(DB::expr('CONCAT("modules/",username,"/",name)'), 'link'),
                array('created_at', 'pubDate'),
                'description'
            )
            ->from('modules')
            ->order_by('created_at', 'DESC')
            ->limit(25)
            ->execute();
            
        $info = array(
            'title'       => 'Kohana Modules',
            'description' => 'Recently added modules at kohana-modules.com.',
            'pubDate'     => $items[0]['pubDate'],
            );
        
        echo Feed::create($info, $items);
    }
}
{'fraction_non_alphanumeric': 0.1544477028347996, 'fraction_numerical': 0.002932551319648094, 'mean_word_length': 1.9681159420289855, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4924681', 'n_tokens_mistral': 289, 'n_tokens_neox': 281, 'n_words': 54}