コード例 #1
0
ファイル: initializer.php プロジェクト: hugoabonizio/BirdsPHP
 function run($uri, $method)
 {
     $url_prefix = \Framework\Application::$url_prefix;
     if (substr($uri, 0, strlen($url_prefix)) == $url_prefix) {
         $uri = substr($uri, strlen($url_prefix));
     }
     $path = strtok($uri, '?');
     if ($path[0] != '/') {
         $path = '/' . $path;
     }
     parent::route($method, $path);
 }
コード例 #2
0
ファイル: index.php プロジェクト: guadin/pylon
<?php

include __DIR__ . "/../core/init.php";
include __DIR__ . "/../lib/index.php";
$application = new Application();
$application->route();
コード例 #3
0
ファイル: index.php プロジェクト: walney/SlaveFramework
<?php

define('DACCESS', 1);
require 'framework.php';
$app = new Application();
$app->route();
$app->dispatch();
$app->render();
コード例 #4
0
ファイル: index.php プロジェクト: RomsonApp/blog
<?php

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
require_once __DIR__ . "/vendor/autoload.php";
$config = (require __DIR__ . '/application/config/main.php');
$app = new Application();
$app->merge($config);
$app->route()->get($_GET);
コード例 #5
0
ファイル: Redirect.php プロジェクト: nkammah/Crash-Analytics
 /**
  * Redirect user the the given link under the same domain.
  * 
  * @param string $path
  * @return \Koldy\Redirect
  * @link http://koldy.net/docs/redirect#usage
  * @link http://koldy.net/docs/url#link
  */
 public static function link($path)
 {
     return self::temporary(Application::route()->link($path));
 }
コード例 #6
0
ファイル: Url.php プロジェクト: nkammah/Crash-Analytics
 /**
  * Generate URL for asset file depending on configuration for assets located in configs/application.php 'cdn_url'.
  * This method is using cdn() method in routing class, so be careful because it might be overriden in your case.
  *
  * @param string $path
  * @return string
  */
 public static function cdn($path)
 {
     return Application::route()->cdn($path);
 }
コード例 #7
0
ファイル: index.php プロジェクト: natewilliford/cmsexp
//print_r($_SERVER); exit;
require_once '../Bootstrap.php';
Config::setDocumentRoot('/Users/nathan/Projects/Sites/cmsexp');
//class MyHook implements Application_Hook {
//
//    public function preDispatch() {
//        print_r('pre dispatch'); exit;
//    }
//
//    public function postDispatch() {
//
//    }
//}
//Application::setHookListenner(new MyHook());
Application::route($_SERVER['REQUEST_URI']);
//
//$type = Content_Type::create('page');
//$type->addField('title');
//$type->addField('body');
//$type->save();
//$type = Content_Type::getByName('post');
//$type = Content_Type::getOne('4e1e099833f1f74a22000000');
//$type->delete(); exit;
//$type->removeField('author');
//print_r($type); exit;
//$content = Content::create('post', array('title' => 'This is a test post', 'body' => 'Lorem ipsum dolor', 'someotherfield' => 'derp2'));
//$content = Content::getOne('post', '4e345b5833f1f7f11d020000');
//print_r($content); exit;
//echo Content::getOne('post', '4e34596833f1f7f51d010000')->render(); exit;
//$page = new Page('main');