#####Let's say someone has this class
<?php
//
class Load {
public static function load($file)
{
$lines = [];
foreach (File::load($file) as $key => $value)
{
$value = sanitize($value);
$lines[$key] = transformToPHPDataType($value);
}
return $lines;
}
private static function sanitize($value)
{
/// do a lot of things to sanitize the value
/// do a lot of things to sanitize the value
/// do a lot of things to sanitize the value
/// do a lot of things to sanitize the value
return $value;
}
private static function sanitize($value)
{
/// do whatever is needed
$return $value;
}
}
#####And I need to change a little bit the values after they have been sanitized but before they become PHP data types.
#####I can't see anything else, not even an adapter hooking into those values. Because there is no entry point, I would have to somehow work those values after they have been converted to PHP datatypes and, if not possible, yes, fork the package to suit my needs and keep merging the updates forever.
#####Yes, there is no room for an adapter in the class and that's the main problem of it, but I don't think I'll be able to fix all development problems in the world with tweets :)
#####Nor be able to PR better implementations for all of them, so extentable classes are the most simple and easily doable think I can ask people to do, but it may be just me.