Overview

Namespaces

  • Application
    • Controller
    • Model
      • DAO
        • Impl
      • Service
        • Impl
  • Define
    • Core
    • DBDrivers
    • Exceptions
    • IUtilities
    • Traits
    • Utilities
  • None

Classes

  • Application\Controller\ApplicationController
  • Application\Controller\ErrorController
  • Application\Controller\IndexController
  • Application\Model\DAO\ApplicationDAO
  • Application\Model\DAO\Impl\IndexDAO
  • Application\Model\Service\ApplicationService
  • Application\Model\Service\Impl\IndexService
  • Define\Core\BaseController
  • Define\Core\BaseDAO
  • Define\Core\BaseModel
  • Define\Core\BaseService
  • Define\Core\Framework
  • Define\Core\ObjectContainer
  • Define\Core\Router
  • Define\Core\View
  • Define\DBDrivers\DatabaseBean
  • Define\DBDrivers\DatabaseFactory
  • Define\DBDrivers\MONGODBDriver
  • Define\DBDrivers\MSSQLDriver
  • Define\DBDrivers\MYSQLDriver
  • Define\DBDrivers\MYSQLIDriver
  • Define\DBDrivers\ORACLEDriver
  • Define\DBDrivers\PDODriver
  • Define\DBDrivers\POSTGREDriver
  • Define\DBDrivers\SQLITEDriver
  • Define\IUtilities\PasswordHelper
  • Define\Utilities\ErrorExceptionHandler
  • Define\Utilities\Localization
  • Define\Utilities\Logger
  • Define\Utilities\Session
  • PHPMailer
  • SMTP

Interfaces

  • Define\Core\IBaseDAO
  • Define\Core\IBaseModel
  • Define\Core\IBaseService
  • Define\Core\IDefine
  • Define\Core\IRouter
  • Define\Core\IView
  • Define\DBDrivers\IDatabase
  • Define\Exceptions\IException
  • Define\Utilities\IUtilities

Traits

  • Define\Traits\SingletonTrait

Exceptions

  • Define\Exceptions\FileNotFoundException
  • Define\Exceptions\FrameworkException
  • Define\Exceptions\LoggerException
  • Define\Exceptions\NullPointerException
  • Define\Exceptions\RuntimeException
  • phpmailerException

Functions

  • __autoload
  • Overview
  • Namespace
  • Class
 1: <?php
 2: namespace Define\Utilities;
 3: use Define\Traits\SingletonTrait;
 4: 
 5: if(!defined('DIRECT_ACCESS')) {
 6:     die("Direct access is forbidden.");
 7: }
 8: 
 9: /**
10:  * LOCALIZATION
11:  *
12:  * Singleton localization implementation.
13:  *  
14:  * @category Define
15:  * @package Utilities
16:  * @author Nitesh Apte <me@niteshapte.com>
17:  * @copyright 2015 Nitesh Apte
18:  * @version 1.0.0
19:  * @since 1.0.0
20:  * @license https://www.gnu.org/licenses/gpl.txt GNU General Public License v3
21:  * 
22:  * This program is free software: you can redistribute it and/or modify
23:  * it under the terms of the GNU General Public License as published by
24:  * the Free Software Foundation, either version 3 of the License, or
25:  * (at your option) any later version.
26:  *
27:  * This program is distributed in the hope that it will be useful,
28:  * but WITHOUT ANY WARRANTY; without even the implied warranty of
29:  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
30:  * GNU General Public License for more details.
31:  *
32:  * You should have received a copy of the GNU General Public License
33:  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
34:  */
35: class Localization implements IUtilities {
36:     
37:     // Yes, keep it singleton
38:     use SingletonTrait;
39:     
40:     /**
41:      * 
42:      * @param string $language
43:      * @return string
44:      */
45:     public function loadLanguage($language = "en") {
46:         return file_exists(LOCALIZATION_PATH.$language.'/'.$language.'.php') ? LOCALIZATION_PATH.$language.'/'.$language.'.php' : LOCALIZATION_PATH.DEFAULT_LANGUAGE.'/'.DEFAULT_LANGUAGE.'.php';
47:     }
48: }
API documentation generated by ApiGen