PHP Classes

File: App/Config/gateway.php

Recommend this page to a friend!
  Classes of Ahmed Saad   Simple PHP MVC Framework   App/Config/gateway.php   Download  
File: App/Config/gateway.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Simple PHP MVC Framework
Developing Web applications using the MVC pattern
Author: By
Last change:
Date: 2 years ago
Size: 489 bytes
 

Contents

Class file image Download
<?php
/**
 * Gateway Configuration
 *
 * @package Simple Framework
 * @author Ahmed Saad <a7mad.sa3d.2014@gmail.com>
 * @license https://creativecommons.org/licenses/by-sa/4.0/legalcode.txt CC-BY-SA-4.0 Creative Commons Attribution Share Alike 4.0
 */

use App\Library\Redirect;

return [
   
'admin' => function(){
        if( !
$this->session->isLoggedIn() )
            return
Redirect::to( '/auth/login' );

        return (
$this->session->user->admin );
    },

   
'auth/login' => function(){
        return
1;
    },

];