A map $j:A\rightarrow X$ is said to have the homotopy extension property with respect to a space $Z$ if whenever given a map $f:X\rightarrow Z$ and a homotopy $H:A\times I\rightarrow Z$ with $H_0=fj$, there exists a homotopy $\widehat H:X\times I\rightarrow Z$ satisfying $$i)\;\;\widehat H_0=f,\qquad\qquad ii)\;\;\widehat H_tj=H_t.$$ For ease I'll capture this in diagram form by requiring the existence of a diagonal filler in any commutative square $\require{AMScd}$ \begin{CD} A @>H>> Z^I\\ @VjV V @VVev_0V\\ X @>f>> Z. \end{CD} The map $j$ is said to be a cofibration if it has the homotopy extension property with respect to all spaces.
Is it ever useful to consider maps which have the homotopy extension property with respect to a proper subclass of topological spaces $\mathcal{C}\subset Top$? In particular, have such things been considered in the literature?
One reason I am interested in this question is that if you consider the dual problem, then the answer is affirmative. A map is a (Hurewicz) fibration if it has the homotopy lifting property with respect to all spaces. This is obtained by dualising the definition of the homotopy extension property I gave you above. As it turns out, maps which have the homotopy lifting property with respect to all CW complexes (rather than all spaces) are called Serre fibrations, and play in important rôle in the Quillen model structure on $Top$.
Now there are many ways in which objects that are less general than cofibrations do get used, but as far as I know none of these are specified by restricting the homotopy extension property. For instance we may consider closed cofibrations (cofibrations in the above sense which are closed embeddings) or Serre cofibrations (maps which are orthogonal to Serre fibrations which are weak equivalences). Both of these classes of maps are cofibrations in the above sense, but cannot be characterised completely by the homotopy extension property.