/** * Instantiate the object (Factory) * * @return Files The files object */ public static function getInstance() { if (self::$objInstance === null) { self::$objInstance = new static(); } return self::$objInstance; }
/** * Instantiate the object (Factory) * * @return \Files The files object */ public static function getInstance() { if (!is_object(self::$objInstance)) { // Use FTP to modify files if ($GLOBALS['TL_CONFIG']['useFTP']) { self::$objInstance = new \Files_Ftp(); } elseif ($GLOBALS['TL_CONFIG']['useSmhExtended'] && in_array('smhextended', \Config::getInstance()->getActiveModules())) { self::$objInstance = new \SMHExtended(); } else { self::$objInstance = new \Files_Php(); } } return self::$objInstance; }
/** * Instantiate the object (Factory) * * @return \Files The files object */ public static function getInstance() { if (self::$objInstance === null) { // Use FTP to modify files if (\Config::get('useFTP')) { self::$objInstance = new \Files\Ftp(); } elseif (\Config::get('useSmhExtended') && in_array('smhextended', \ModuleLoader::getActive())) { self::$objInstance = new \SMHExtended(); } else { self::$objInstance = new \Files\Php(); } } return self::$objInstance; }