I have made a class that extends SearchApiSolrConnection. In this class I override some methods to suit my needs. I also overrides some of the constants, and that's a bit of a problem cause, quiet a few of the methods uses self instead of $this, so I have to copy and paste those methods into my class too, with seems stupid.

What if, we changed the self to $this in the SearchApiSolrConnection class? Would it make any difference or impact on other functionality?

Comments

drunken monkey’s picture

Thanks for suggesting this!
However, do you know whether using $this in this manner is compatible with PHP 5.2? I know that the (equivalent) static keyword (resp. its use in this context) wasn't introduced until 5.3 or 5.4.
Otherwise, I'd say this would be a good idea which we could of course implement, yes.

tlyngej’s picture

Status: Active » Closed (won't fix)

After some quick tests I found out, that Views depends totally breaks, if changing the self to $this. And, as you mention, there might be a problem with older versions of PHP.

So maybe we can re-consider this for the Drupal 8 version, if Views behaves more nicely. But, for now, I think of this issue as not possible.