Ejemplo n.º 1
0
    {
        if ($con === null) {
            $con = Propel::getConnection(self::DATABASE_NAME);
        }
        $objs = null;
        if (empty($pks)) {
            $objs = array();
        } else {
            $criteria = new Criteria();
            $criteria->add(BlogPeer::ID, $pks, Criteria::IN);
            $objs = BlogPeer::doSelect($criteria, $con);
        }
        return $objs;
    }
}
// BaseBlogPeer
// static code to register the map builder for this Peer with the main Propel class
if (Propel::isInit()) {
    // the MapBuilder classes register themselves with Propel during initialization
    // so we need to load them here.
    try {
        BaseBlogPeer::getMapBuilder();
    } catch (Exception $e) {
        Propel::log('Could not initialize Peer: ' . $e->getMessage(), Propel::LOG_ERR);
    }
} else {
    // even if Propel is not yet initialized, the map builder class can be registered
    // now and then it will be loaded when Propel initializes.
    require_once 'lib/model/map/BlogMapBuilder.php';
    Propel::registerMapBuilder('lib.model.map.BlogMapBuilder');
}