Exemplo n.º 1
0
 /**
  * Returns only the last associated bean.
  * This works just like R::related but returns a single bean, the last one.
  * If the query result contains multiple beans, the last bean from this result set will be returned.
  * For more details refer to R::related.
  * 
  * @warning not a preferred method, use $bean->shared if possible.
  *
  * @param RedBean_OODBBean $bean     bean provided
  * @param string           $type     type of bean you are searching for
  * @param string           $sql      SQL for extra filtering
  * @param array            $bindings values to be inserted in SQL slots
  *
  * @return RedBean_OODBBean
  */
 public static function relatedLast(RedBean_OODBBean $bean, $type, $sql = NULL, $bindings = array())
 {
     return self::$associationManager->relatedLast($bean, $type, $sql, $bindings);
 }