blob: 654499ee57324910deafb149227cabb1044e227f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
<?php
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
protected function _initAuth(){
$auth = Zend_Auth::getInstance();
$auth->setStorage(new Zend_Auth_Storage_Session('auth'));
}
protected function _initDocType(){
$this->bootstrap('View');
$view = $this->getResource('View');
$view->doctype('XHTML1_STRICT');
$view->headTitle('pbs2')
->setSeparator(' :: ');
}
function _initViewHelpers()
{
$this->bootstrap('layout');
$layout = $this->getResource('layout');
$view = $layout->getView();
$view->doctype('XHTML1_STRICT');
$view->headMeta()->appendHttpEquiv('Content-Type', 'text/html;charset=utf-8');
$view->headLink()->appendStylesheet('/media/css/styles.css');
$view->headTitle()->setSeparator(' - ');
$view->headTitle('pbs²');
}
}
function print_a(){
$numargs = func_num_args();
if($numargs>1){
$out = '';
ob_start();
echo "<div style='background-color:#FFCC33;border:1px solid black;margin:3px;padding:5px;'>";
for($a=0;$a<$numargs;$a++)
print_a(func_get_arg($a));
echo "</div>";
$out .= ob_get_contents();
ob_end_clean();
echo $out;
}else{
echo "<pre style='background-color:#FFDF80;border:1px solid #000;margin:3px;padding:5px;'>";
$a = func_get_arg(0);
$a = (is_bool($a))?(($a)?'true':'false'):$a;
print_r($a);
echo "</pre>";
}
}
|