/** * @param \DBFarmRole $farmRole * @return FarmRoleStorageConfig[] */ public static function getByFarmRole(\DBFarmRole $farmRole) { $db = \Scalr::getDb(); $configs = array(); $ids = $db->GetCol('SELECT id FROM farm_role_storage_config WHERE farm_role_id = ?', array($farmRole->ID)); foreach ($ids as $id) { $config = new FarmRoleStorageConfig($farmRole); if ($config->loadById($id)) { $configs[] = $config; } } return $configs; }