/** * Loads a bean from the object database. * It searches for a OODBBean Bean Object in the * database. It does not matter how this bean has been stored. * RedBean uses the primary key ID $id and the string $type * to find the bean. The $type specifies what kind of bean you * are looking for; this is the same type as used with the * dispense() function. If RedBean finds the bean it will return * the OODB Bean object; if it cannot find the bean * RedBean will return a new bean of type $type and with * primary key ID 0. In the latter case it acts basically the * same as dispense(). * * Important note: * If the bean cannot be found in the database a new bean of * the specified type will be generated and returned. * * @param string $type type of bean you want to load * @param integer $id ID of the bean you want to load * * @return OODBBean */ public function load($type, $id) { return $this->repository->load($type, $id); }