Service class to find beans. For the most part this class
offers user friendly utility methods for interacting with the
OODB::find() method, which is rather complex. This class can be
used to find beans using plain old SQL queries.
/** * Tries to find beans matching the specified type and * criteria set. * * If the optional additional SQL snippet is a condition, it will * be glued to the rest of the query using the AND operator. * * @param string $type type of bean to search for * @param array $like optional criteria set describing the bean to search for * @param string $sql optional additional SQL for sorting * * @return array */ public static function findLike($type, $like = array(), $sql = '') { return self::$finder->findLike($type, $like, $sql); }
/** * @see Facade::find * This variation returns the last bean only. * * @param string $type type the type of bean you are looking for * @param string $sql sql SQL query to find the desired bean, starting right after WHERE clause * @param array $bindings values array of values to be bound to parameters in query * * @return OODBBean */ public static function findLast($type, $sql = NULL, $bindings = array()) { return self::$finder->findLast($type, $sql, $bindings); }