/** * Overload object factory for Singleton * * @return bConverter|null|static */ public static function create() { if (self::$_instance === null) { self::$_instance = parent::create(func_get_args()); } return self::$_instance; }
/** * Set format if it type is string. Or provide this request to inner component (decor it) * * @param null $format - format name * @return null|bConverter__instance - for chaining */ public final function setFormat($format = null) { if ($this->_component !== null) { return $this->_component->setFormat($format); } if (is_string($format)) { $this->_format = $format; } return $this->_parent->output(); }