Exemple #1
0
 /**
  * Returns all sellers.
  *
  * @return array
  */
 public static function all()
 {
     return Service_Seller::find();
 }
Exemple #2
0
// Load in the Autoloader
require COREPATH . 'classes' . DIRECTORY_SEPARATOR . 'autoloader.php';
class_alias('Fuel\\Core\\Autoloader', 'Autoloader');
// Bootstrap the framework DO NOT edit this
require COREPATH . 'bootstrap.php';
Autoloader::add_classes(array('Controller' => APPPATH . 'classes/controller.php', 'Model' => APPPATH . 'classes/model.php', 'Pagination' => APPPATH . 'classes/pagination.php', 'Session' => APPPATH . 'classes/session.php', 'Inflector' => APPPATH . 'classes/inflector.php', 'Validation' => APPPATH . 'classes/validation.php', 'Validation_Error' => APPPATH . 'classes/validation/error.php', 'Api\\HttpErrorException' => APPPATH . '../modules/api/classes/httpexceptions.php', 'Api\\HttpBadRequestException' => APPPATH . '../modules/api/classes/httpexceptions.php', 'Api\\HttpNotFoundException' => APPPATH . '../modules/api/classes/httpexceptions.php', 'Api\\HttpServerErrorException' => APPPATH . '../modules/api/classes/httpexceptions.php'));
// Register the autoloader
Autoloader::register();
/**
 * Your environment.  Can be set to any of the following:
 *
 * Fuel::DEVELOPMENT
 * Fuel::TEST
 * Fuel::STAGING
 * Fuel::PRODUCTION
 */
Fuel::$env = isset($_SERVER['FUEL_ENV']) ? $_SERVER['FUEL_ENV'] : Fuel::DEVELOPMENT;
// Initialize the framework with the config file.
Fuel::init('config.php');
// Load the app helper functions.
require APPPATH . 'app.php';
if (!Fuel::$is_cli) {
    // Redirect to setup if no sellers exist.
    if (Input::server('REQUEST_URI') != '/setup') {
        $sellers = Service_Seller::find();
        if (empty($sellers)) {
            Response::redirect('setup');
        }
    }
}