Exemple #1
0
<?php 
require __DIR__ . '/../config/boot.php';
MyImouto\Application::dispatchRequest();
Exemple #2
0
<?php

MyImouto\Application::configure(function ($config) {
    $config->rails_panel_path = 'railspanel';
    $config->error->report_types = E_ALL;
    $config->consider_all_requests_local = true;
    $config->serve_static_assets = false;
    $config->assets->concat = true;
    $config->active_record->use_cached_schema = false;
    $config->action_mailer->delivery_method = 'file';
});
Exemple #3
0
<?php

MyImouto\Application::routes()->draw(function () {
    # Admin
    $this->match('admin(/index)', 'admin#index', ['via' => ['get', 'post']]);
    $this->match('admin/edit_user', ['via' => ['get', 'post']]);
    $this->match('admin/reset_password', ['via' => ['get', 'post']]);
    $this->post('admin/recalculate_tag_count');
    $this->post('admin/purge_tags');
    # Advertisements
    $this->resources('advertisements', function () {
        $this->collection(function () {
            $this->post('update_multiple');
        });
        $this->member(function () {
            $this->get('redirect');
        });
    });
    # Artist
    $this->match('artist(/index)(.:format)', 'artist#index', ['via' => ['get', 'post']]);
    $this->match('artist/create(.:format)', ['via' => ['get', 'post']]);
    $this->match('artist/destroy(.:format)(/:id)', 'artist#destroy', ['via' => ['get', 'post']]);
    $this->match('artist/preview', ['via' => ['get', 'post']]);
    $this->match('artist/show(/:id)', 'artist#show', ['via' => ['get', 'post']]);
    $this->match('artist/update(.:format)(/:id)', 'artist#update', ['via' => ['get', 'post']]);
    # Banned
    $this->match('banned(/index)', 'banned#index', ['via' => ['get', 'post']]);
    # Batch
    $this->match('batch(/index)', 'batch#index', ['via' => ['get', 'post']]);
    $this->match('batch/create', ['via' => ['get', 'post']]);
    $this->post('batch/enqueue');
Exemple #4
0
<?php

/**
 * Working environment.
 */
if (!defined('RAILS_ENV')) {
    define('RAILS_ENV', 'production');
}
/**
 * Application's root directory.
 */
define('RAILS_ROOT', dirname(__DIR__));
/**
 * Path to Rails.
 */
$railsPath = __DIR__ . '/../vendor/railsphp/railsphp/lib/Rails';
/**
 * Load and initialize Rails.
 */
require $railsPath . '/Rails.php';
Rails::initialize();
/**
 * Load and initialize application.
 */
require __DIR__ . '/application.php';
MyImouto\Application::initialize();
Exemple #5
0
<?php

MyImouto\Application::configure(function ($config) {
    $config->error->report_types = E_WARNING;
    $config->serve_static_assets = true;
    $config->consider_all_requests_local = false;
    $config->active_record->use_cached_schema = true;
    $config->assets->digest = true;
});