Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
parf committed Apr 3, 2018
1 parent dfa69fa commit d5f966a
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 4 deletions.
4 changes: 2 additions & 2 deletions project/app1/src/app1/action/Profiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace app1\action;


use function hb\dbg; // use ?DEBUG=1 or --debug=1 to see this messages
use function hb\debug; // use ?DEBUG or --debug to see this messages

/*
* Sample Nested and Deep Profiling Example
Expand All @@ -22,7 +22,7 @@ function veryVeryLong_Method__Name($a, $b, $c, $d) {

static function methodName($param1, &$param2, $deep = 0) {
$P = profiler(__FUNCTION__, $param1);
dbg(1, "in-here");
debug("in-here");
// hb\e(hb\HB::$Q);
usleep(800);
iprofiler()->info("info", ['reason' => 'test:', 'p' => $param1]);
Expand Down
23 changes: 22 additions & 1 deletion project/app1/src/app1/action/Root.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,33 @@

namespace app1\action;


class T1 { };
class T2 extends T1 {};
class T3 extends T2 {};


class Root extends \hb\Action {

function index() {
function classConfig() {
i('config')->_setMany(['_class.app1\action\T3.a.b' => 'xxx']); // internal way - do not DO this !!
v(C('class.app1\action\T3.a.b'));
v("Used nodes cache: ", \hb\HB::$CONFIG);
}

function iGenerator() {
echo "hello world";
\hb\debug("test");
v( C("i") );
$g = i('\hbx\tools\IGenerator');
v($g->_genConfig(C("i")));
v($g->run(C("i")));
echo "<pre>";
\I::cli()->box("some text");
echo "</pre>";
}

function index() {
}

}
3 changes: 2 additions & 1 deletion standalone-app/SampleApp/init.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php

define("APP_DIR", __DIR__);
include "/proj/vendor/homebase2/src/homebase-bundle.inc.php"; // homebase project init
#include "/proj/vendor/homebase2/src/homebase-bundle.inc.php"; // homebase project init
include __DIR__."/vendor/hb2/src/homebase-bundle.inc.php"; // homebase project init
\hb\HB::dispatch();
2 changes: 2 additions & 0 deletions standalone-app/SampleApp/src/SampleApp/action/Root.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ class Root extends \hb\Action {
function index() {
echo "index";
$this["x"] = "xxx";
\hb\e("{red}hb\\e TEXT{/}");
\hb\err("{red}hb\\err TEXT{/}");
}

}

0 comments on commit d5f966a

Please sign in to comment.