<?php
/**
 * Implementation of the base domain model class for blog.
 *
 * @package homepage
 * @author Miroslav Kubelik (koubel@seznam.cz)
 * @copyright Copyright (c) 2007-2009 Miroslav Kubelik
 * @license http://opensource.org/licenses/bsd-license.php new BSD license
 */

/**
 * The base class for all domain models in a blog module.
 * Adds functionality for an returning search result.
 *
 * @package homepage
 * @author Miroslav Kubelik (koubel@seznam.cz)
 * @copyright Copyright (c) 2007-2009 Miroslav Kubelik
 * @license http://opensource.org/licenses/bsd-license.php new BSD license
 */ 
abstract class Blog_Model_Model extends HomeWebApp_Model_Model
{
    /**
     * Gets found items. 
     * The result is made from the result of the search object as $search parameter. 
     * @param Blog_Model_Search $search search object with the search result. Object must
     * be initialized before this method call, we only call method for the result.
     * @return array set of Blog_Model_Model objects
     */
    public function getFound(Blog_Model_Search $search)
    {
        $rows = $search->searchItems();
        return $this->_getSet($rows);
    }
}
