/** * Prototype resources to object * * @param mixed|optional $value * An optional value to be used by prototyped resource */ protected function prototype($i = NULL) { // Copying parent's prototypes parent::prototype($i); if (!is_null($i)) { $this->implement('convert', function ($from, $to) use($i) { return new String(base_convert($i, $from, $to)); }); } }