mirror of
https://github.com/jimeh/zynapse.git
synced 2026-02-19 07:06:39 +00:00
a small number of tweaks
This commit is contained in:
@@ -15,9 +15,9 @@
|
||||
$this->environment = "development";
|
||||
|
||||
|
||||
# Default server display mode - Overridden by host
|
||||
# Default output format - Overridden by host
|
||||
# specific configurations.
|
||||
$this->mode = "web";
|
||||
$this->format = "html";
|
||||
|
||||
|
||||
# When enabled, environment and more is set based
|
||||
|
||||
@@ -8,15 +8,15 @@
|
||||
|
||||
|
||||
# host configuration
|
||||
# - set environment, display mode, and root path for
|
||||
# - set environment, default format, and root path for
|
||||
# specific hosts. available options are "environment",
|
||||
# "mode", and "root".
|
||||
# "format", and "root".
|
||||
$hosts = array(
|
||||
// "zynapse" => array(
|
||||
//
|
||||
// ),
|
||||
// "wap.zynapse" => array(
|
||||
// "mode" => "wap",
|
||||
// "iphone.zynapse" => array(
|
||||
// "format" => "iphone",
|
||||
// ),
|
||||
// "admin.zynapse" => array(
|
||||
// "root" => "admin",
|
||||
|
||||
20
vendor/zynapse/action_base.php
vendored
20
vendor/zynapse/action_base.php
vendored
@@ -5,7 +5,7 @@
|
||||
|
||||
|
||||
http://www.zynapse.org/
|
||||
Copyright (c) 2009 Jim Myhrberg.
|
||||
Copyright (c) 2010 Jim Myhrberg.
|
||||
|
||||
----------
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
@@ -36,10 +36,10 @@ class ActionBase {
|
||||
public
|
||||
|
||||
# Components
|
||||
$env, // ActionEnvironment
|
||||
$view, // ActionView
|
||||
$log, // ActiveLog
|
||||
$locale, // ActiveLocale
|
||||
$env, // ActionEnvironment
|
||||
$view, // ActionView
|
||||
$log, // ActiveLog
|
||||
$locale, // ActiveLocale
|
||||
$session, // ActiveSession
|
||||
|
||||
# Paths
|
||||
@@ -55,11 +55,11 @@ class ActionBase {
|
||||
$started = false;
|
||||
|
||||
|
||||
function __construct () {
|
||||
public function __construct () {
|
||||
|
||||
}
|
||||
|
||||
function __sleep () {
|
||||
public function __sleep () {
|
||||
$blacklist = array_flip(array("env", "view", "log", "locale"));
|
||||
$save = array();
|
||||
foreach( $this as $key => $value ) {
|
||||
@@ -70,16 +70,16 @@ class ActionBase {
|
||||
return $save;
|
||||
}
|
||||
|
||||
function __wakeup () {
|
||||
public function __wakeup () {
|
||||
|
||||
}
|
||||
|
||||
function init () {
|
||||
public function init () {
|
||||
$this->set_paths();
|
||||
$this->started = true;
|
||||
}
|
||||
|
||||
function set_paths () {
|
||||
private function set_paths () {
|
||||
$this->apps_path = ZNAP_ROOT."/apps";
|
||||
$this->lib_path = ZNAP_ROOT."/lib";
|
||||
$this->log_path = ZNAP_ROOT."/log";
|
||||
|
||||
10
vendor/zynapse/action_environment.php
vendored
10
vendor/zynapse/action_environment.php
vendored
@@ -5,7 +5,7 @@
|
||||
|
||||
|
||||
http://www.zynapse.org/
|
||||
Copyright (c) 2009 Jim Myhrberg.
|
||||
Copyright (c) 2010 Jim Myhrberg.
|
||||
|
||||
----------
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
@@ -37,7 +37,7 @@ class ActionEnvironment {
|
||||
|
||||
# Main
|
||||
$environment,
|
||||
$mode,
|
||||
$format,
|
||||
$root,
|
||||
|
||||
# Components
|
||||
@@ -62,6 +62,7 @@ class ActionEnvironment {
|
||||
}
|
||||
|
||||
function __wakeup () {
|
||||
$this->set_include_paths();
|
||||
$this->define_constants();
|
||||
}
|
||||
|
||||
@@ -82,7 +83,7 @@ class ActionEnvironment {
|
||||
$host = $this->match_to_host($hosts);
|
||||
if ( !empty($host) ) {
|
||||
if ( !empty($host['environment']) ) $this->environment = $host['environment'];
|
||||
if ( !empty($host['mode']) ) $this->mode = $host['mode'];
|
||||
if ( !empty($host['format']) ) $this->format = $host['format'];
|
||||
if ( !empty($host['root']) ) {
|
||||
if ( !empty($_SERVER['REQUEST_URI']) ) $_SERVER['REQUEST_URI'] = '/'.$host['root'].$_SERVER['REQUEST_URI'];
|
||||
if ( !empty($_SERVER['REDIRECT_URL']) ) $_SERVER['REDIRECT_URL'] = '/'.$host['root'].$_SERVER['REDIRECT_URL'];
|
||||
@@ -114,9 +115,6 @@ class ActionEnvironment {
|
||||
if ( !defined("ZNAP_ENV") ) {
|
||||
define("ZNAP_ENV", $this->environment);
|
||||
}
|
||||
if ( !defined("ZNAP_MODE") ) {
|
||||
define("ZNAP_MODE", $this->mode);
|
||||
}
|
||||
}
|
||||
|
||||
function match_to_host ($list = array()) {
|
||||
|
||||
2
vendor/zynapse/action_view.php
vendored
2
vendor/zynapse/action_view.php
vendored
@@ -5,7 +5,7 @@
|
||||
|
||||
|
||||
http://www.zynapse.org/
|
||||
Copyright (c) 2009 Jim Myhrberg.
|
||||
Copyright (c) 2010 Jim Myhrberg.
|
||||
|
||||
----------
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
|
||||
2
vendor/zynapse/active_session.php
vendored
2
vendor/zynapse/active_session.php
vendored
@@ -5,7 +5,7 @@
|
||||
|
||||
|
||||
http://www.zynapse.org/
|
||||
Copyright (c) 2009 Jim Myhrberg.
|
||||
Copyright (c) 2010 Jim Myhrberg.
|
||||
|
||||
----------
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
|
||||
2
vendor/zynapse/zynapse.php
vendored
2
vendor/zynapse/zynapse.php
vendored
@@ -5,7 +5,7 @@
|
||||
|
||||
|
||||
http://www.zynapse.org/
|
||||
Copyright (c) 2009 Jim Myhrberg.
|
||||
Copyright (c) 2010 Jim Myhrberg.
|
||||
|
||||
----------
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
|
||||
Reference in New Issue
Block a user