Sorry if this has been asked before; I'm still learning about electronics and probably don't have the right vocabulary to describe this part's functionality.
I came across an interesting part made by NXP when looking for simple ways to get a constant current source of around 20mA for trickle-charging some nickel batteries. The part is the 'PSSI2021SAY', from NXP:
It is currently out of stock on Digikey, but glancing at the datasheet, it looks like it should be simple to make a similar circuit out of a PNP transistor, a couple of diodes, and a few resistors:
My questions are, how does this topology work? Does it require a stable input voltage or other external factors? Does the transistor need any special properties? What about the diodes/resistors?
It looks like it is somewhat cheaper than most other parts with a similar function, so in a nutshell, what's the catch?