We provide a projection-based analysis of a large class of finite element methods for second order elliptic problems. It includes the hybridized version of the main mixed and hybridizable discontinuous Galerkin methods. The main feature of this unifying approach is that it reduces the main difficulty of the analysis to the verification of some properties of an auxiliary, locally defined projection and of the local spaces defining the methods. Sufficient conditions for the optimal convergence of the approximate flux and the superconvergence of an element-by-element postprocessing of the scalar variable are obtained. New mixed and hybridizable discontinuous Galerkin methods with these properties are devised which are defined on squares, cubes and prisms.