aboutsummaryrefslogtreecommitdiffstats
path: root/MainView.php
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2010-05-22 16:14:58 +0300
committerFilipp Lepalaan <filipp@mac.com>2010-05-22 16:14:58 +0300
commit63fcc0deec2f821104ea1d16378b392cf1650b6e (patch)
tree98b1eac20cb572729aa8877b7b369ddc467106c5 /MainView.php
parentbf1475c7d5a78759e0819f3934f5deb90f478fa2 (diff)
downloadmain-63fcc0deec2f821104ea1d16378b392cf1650b6e.tar.gz
main-63fcc0deec2f821104ea1d16378b392cf1650b6e.tar.bz2
main-63fcc0deec2f821104ea1d16378b392cf1650b6e.zip
More fixes, better PHP 5.3 support
Diffstat (limited to 'MainView.php')
-rw-r--r--MainView.php19
1 files changed, 14 insertions, 5 deletions
diff --git a/MainView.php b/MainView.php
index d964b6c..038ccf7 100644
--- a/MainView.php
+++ b/MainView.php
@@ -5,6 +5,15 @@
// @author Filipp Lepalaan <filipp@mac.com>
class MainView
{
+ ////
+ // include something within the project tree
+ function snippet($path)
+ {
+ $base = dirname(__FILE__).'/../..';
+ $base = realpath($base);
+ include $base.'/'.$path;
+ }
+
/**
* Create HTML <select> options from array
* @param array array
@@ -39,16 +48,16 @@ class MainView
break;
}
- if (is_array ($args))
+ if (is_array($args))
{
- while (list ($k, $v) = each ($args)) {
- if (!empty ($k)) $str_args .= ' ' . $k . '="' . $v . '"';
+ while (list($k, $v) = each($args)) {
+ if (!empty($k)) $str_args .= ' ' . $k . '="' . $v . '"';
}
}
- if (is_array ($content))
+ if (is_array($content))
{
- foreach ($content as $k => $v)
+ foreach($content as $k => $v)
{
//
}