/** * forge. * * @param [mixed] Boolean or Object * * @return object new|old Instance */ public static function forge($param = true) { $classname = __CLASS__; if (false === $param) { return parent::createInstance(); } elseif ($param instanceof $class) { self::$modelCollections[$class] = $param; } if (!isset(self::$modelCollections[$class])) { self::$modelCollections[$class] = parent::createInstance($param); } return self::$modelCollections[$class]; }
/** * convert. * * @param string word * * @return object|string */ public static function convert($word) { return parent::createInstance($word); }