コード例 #1
0
ファイル: home.php プロジェクト: murahman2008/plogistics
 public function index()
 {
     die('fsfsdfsd');
     $this->load->library('basic_barcode');
     $imageName = Basic_Barcode::generateBarcode('OL00000000000000000027');
     inspect($imageName);
     die;
     $this->load->model('product');
     try {
         $this->product->addInstanceForProduct(array('qty' => 20, 'product_id' => 1));
     } catch (Exception $ex) {
         var_dump($ex->getMessage());
     }
     //var_dump($this->product->bookBarcode(2));
     die;
     $this->load->library('basicauth');
     // 		BasicAuth::test();
     // 		$user = BasicAuth::authenticate(array('username' => 'mrahman', 'password' => 'mrahman'));
     // 		inspect($user);
     // 		die();
     // 		$this->db->query("insert into user (`username`, `password`, `role_id`, `first_name`, `last_name`, `email`, `active`, `created`, `created_by_id`, `updated`, `updated_by_id`)
     // 						  VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", array('mrahman', sha1('mrahman'), 1, 'Mushfique', 'Rahman', '*****@*****.**', 1, date('Y-m-d H:i:s'), 1, date('Y-m-d H:i:s'), 1));
     die;
     $valueArray = $param = array();
     for ($i = 2; $i <= 50; $i++) {
         $valueArray[] = "(" . implode(", ", array('?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?')) . ")";
         $param[] = 'Bay ' . $i;
         $param[] = 'Footscray Warehouse Bay ' . $i;
         $param[] = 11;
         $param[] = 2;
         $param[] = '100010001' . str_pad($i, 4, '0', STR_PAD_LEFT);
         $param[] = 0;
         $param[] = '';
         $param[] = 0;
         $param[] = 1;
         $param[] = date('Y-m-d H:i:s');
         $param[] = 1;
         $param[] = date('Y-m-d H:i:s');
         $param[] = 1;
     }
     $query = "insert into warehouse (`name`, `description`, `parent_id`, `root_id`, `position`, `address_id`, `code`, `warehouse_type_id`, `active`, `created`, `created_by_id`, `updated`, `updated_by_id`)\n\t\t\t VALUES " . implode(", ", $valueArray);
     $result = $this->db->query($query, $param);
     die;
     $this->load->model('warehouse');
     $output = $output2 = array();
     //$this->warehouse->getAllWarehouseHierachy(0, 'id', $output);
     $output = $this->warehouse->getAllChildWarehouseHierachyForWarehouse(0, false, '*');
     $this->warehouse->converWarehouseArrayForFancyTree($output, $output2);
     inspect($output);
     inspect($output2);
     die;
     $output = $this->warehouse->displayAllChildWarehouseHierachyForWarehouse(3, false);
     echo $output;
     die;
     inspect($output);
     die;
 }
コード例 #2
0
 function add($navigationMap, $prepend = false, $targetId = null)
 {
     if (isset($targetId)) {
         if (!isset($this->IDs[$targetId])) {
             inspect()->simpleTable(array_keys($this->IDs), 'Registered link IDs');
             throw new Fault(Faults::LINK_NOT_FOUND, $targetId);
         }
         $target = $this->IDs[$targetId];
     } else {
         $target = $this->rootLink;
     }
     $target->merge($navigationMap, $prepend);
     return $this;
 }
コード例 #3
0
beautify();
echo 'Inspecting $num2:' . PHP_EOL;
echo inspect($num2) . PHP_EOL;
beautify();
echo 'Inspecting $num3:' . PHP_EOL;
echo inspect($num3) . PHP_EOL;
beautify();
echo 'Inspecting $num4:' . PHP_EOL;
echo inspect($num4) . PHP_EOL;
beautify();
echo 'Inspecting $null:' . PHP_EOL;
echo inspect($null) . PHP_EOL;
beautify();
echo 'Inspecting $bool1' . PHP_EOL;
echo inspect($bool1) . PHP_EOL;
beautify();
echo 'Inspecting $bool2' . PHP_EOL;
echo inspect($bool2) . PHP_EOL;
beautify();
echo 'Inspecting $string1' . PHP_EOL;
echo inspect($string1) . PHP_EOL;
beautify();
echo 'Inspecting $string2' . PHP_EOL;
echo inspect($string2) . PHP_EOL;
beautify();
echo 'Inspecting $array1' . PHP_EOL;
echo inspect($array1) . PHP_EOL;
beautify();
echo 'Inspecting $array2' . PHP_EOL;
echo inspect($array2) . PHP_EOL;
コード例 #4
0
ファイル: functions.php プロジェクト: Rayac/search
/**
 * Waits on all of the provided promises, but does not unwrap rejected promises
 * as thrown exception.
 *
 * Returns an array of inspection state arrays.
 *
 * @param PromiseInterface[] $promises Traversable of promises to wait upon.
 *
 * @return array
 * @see GuzzleHttp\Promise\inspect for the inspection state array format.
 */
function inspect_all($promises)
{
    $results = [];
    foreach ($promises as $key => $promise) {
        $results[$key] = inspect($promise);
    }
    return $results;
}
コード例 #5
0
ファイル: template.php プロジェクト: redroot/URIKA
	<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.8/themes/base/jquery-ui.css" type="text/css" media="all" /> 
	
	<link rel="shortcut icon" href="<?php 
echo base_url();
?>
favicon.ico"> 
   
   <?php 
echo $_styles;
?>

  
</head>
<?php 
if (isset($_GET["monster"])) {
    inspect($_COOKIE);
}
?>
<body id="<?php 
echo $body_id;
?>
">
<div id="header_wrapper">
	<div class="inner_wrap">
		<h1><a href="<?php 
echo base_url();
?>
" title="Return to Homepage" class="hidetext">URIKA - Homepage</a></h1>
		<div id="screenreaderInfo">
			<p>UR!KA is a site for web developers and web professionals to share inspiration. This website makes heavy use of Javascript, CSS3 and other 
			current web technologies. As such, functionality is very limited without these enabled, such as if you are using a screen reader. We do apologise for this, but below there are links
コード例 #6
0
$bool1 = true;
$bool2 = false;
$num1 = 0;
$num2 = 0.0;
$num3 = 12;
$num4 = 14.4;
$null = NULL;
// TODO: After each echo statement, use inspect() to output the variable's type and its value
echo 'Inspecting $num1:' . PHP_EOL;
echo inspect($num1);
echo 'Inspecting $num2:' . PHP_EOL;
echo inspect($num2);
echo 'Inspecting $num3:' . PHP_EOL;
echo inspect($num3);
echo 'Inspecting $num4:' . PHP_EOL;
echo inspect($num4);
echo 'Inspecting $null:' . PHP_EOL;
echo inspect($null);
echo 'Inspecting $bool1' . PHP_EOL;
echo inspect($bool1);
echo 'Inspecting $bool2' . PHP_EOL;
echo inspect($bool2);
echo 'Inspecting $string1' . PHP_EOL;
echo inspect($string1);
echo 'Inspecting $string2' . PHP_EOL;
echo inspect($string2);
echo 'Inspecting $array1' . PHP_EOL;
echo inspect($array1);
echo 'Inspecting $array2' . PHP_EOL;
echo inspect($array2);
コード例 #7
0
ファイル: functions.php プロジェクト: walteraries/anahita
/**
 * Inspects an array of objects
 *
 * @param array   $data     The data to inspect
 * @param boolean $var_dump Boolean value whether to dump or just return the inspected set
 *
 * @return mixed
 */
function inspect($data, $var_dump = true)
{
    $dump = array();
    $data = KConfig::unbox($data);
    foreach ($data as $key => $value) {
        if (is_array($value) || $value instanceof IteratorAggregate || $value instanceof Iterator) {
            $dump[$key] = inspect($value, false);
        } elseif (is_scalar($value)) {
            $dump[$key] = $value;
        } elseif (is($value, 'AnDomainEntityAbstract', 'AnDomainEntitysetAbstract')) {
            $dump[$key] = $value->inspect(false);
        } elseif (is($value, 'KObjectIdentifiable')) {
            $dump[$key] = (string) $value->getIdentifier();
        } elseif (is_object($value)) {
            $dump[$key] = get_class($value);
        }
    }
    if ($var_dump) {
        var_dump($dump);
    } else {
        return $dump;
    }
}
コード例 #8
0
$string2 = '';
$array1 = [];
$array2 = [1, 2, 3];
$bool1 = true;
$bool2 = false;
$num1 = 0;
$num2 = 0.0;
$num3 = 12;
$num4 = 14.4;
$null = NULL;
echo inspect($num1);
echo inspect($num2);
echo inspect($num3);
echo inspect($num4);
echo inspect($string1);
echo inspect($string2);
echo inspect($bool1);
echo inspect($bool2);
echo inspect($null);
// TODO: After each echo statement, use inspect() to output the variable's type and its value
echo 'Inspecting $num1:' . PHP_EOL;
echo 'Inspecting $num2:' . PHP_EOL;
echo 'Inspecting $num3:' . PHP_EOL;
echo 'Inspecting $num4:' . PHP_EOL;
echo 'Inspecting $null:' . PHP_EOL;
echo 'Inspecting $bool1' . PHP_EOL;
echo 'Inspecting $bool2' . PHP_EOL;
echo 'Inspecting $string1' . PHP_EOL;
echo 'Inspecting $string2' . PHP_EOL;
echo 'Inspecting $array1' . PHP_EOL;
echo 'Inspecting $array2' . PHP_EOL;
コード例 #9
0
$bool1 = true;
$bool2 = false;
$num1 = 0;
$num2 = 0.0;
$num3 = 12;
$num4 = 14.4;
$null = NULL;
// TODO: After each echo statement, use inspect() to output the variable's type and its value
echo 'Inspecting $num1:' . PHP_EOL;
inspect($num1);
echo 'Inspecting $num2:' . PHP_EOL;
inspect($num2);
echo 'Inspecting $num3:' . PHP_EOL;
inspect($num3);
echo 'Inspecting $num4:' . PHP_EOL;
inspect($num4);
echo 'Inspecting $null:' . PHP_EOL;
inspect($null);
echo 'Inspecting $bool1' . PHP_EOL;
inspect($bool1);
echo 'Inspecting $bool2' . PHP_EOL;
inspect($bool2);
echo 'Inspecting $string1' . PHP_EOL;
inspect($string1);
echo 'Inspecting $string2' . PHP_EOL;
inspect($string2);
echo 'Inspecting $array1' . PHP_EOL;
inspect($array1);
echo 'Inspecting $array2' . PHP_EOL;
inspect($array2);
コード例 #10
0
ファイル: Component.php プロジェクト: electro-modules/matisse
 function __toString()
 {
     try {
         return $this->inspect();
     } catch (\Exception $e) {
         inspect($e->getTraceAsString());
         return '';
     }
 }
コード例 #11
0
                }
            }
            break;
    }
}
// Do not mofify these variables!
$string1 = "I'm a little teapot";
$string2 = '';
$array1 = [];
$array2 = [1, 2, 3];
$bool1 = true;
$bool2 = false;
$num1 = 0;
$num2 = 0.0;
$num3 = 12;
$num4 = 14.4;
$null = NULL;
// TODO: After each echo statement, use inspect() to output the variable's type and its value
echo PHP_EOL . PHP_EOL;
echo 'Inspecting $num1: ' . inspect($num1) . PHP_EOL;
echo 'Inspecting $num2: ' . inspect($num2) . PHP_EOL;
echo 'Inspecting $num3: ' . inspect($num3) . PHP_EOL;
echo 'Inspecting $num4: ' . inspect($num4) . PHP_EOL;
echo 'Inspecting $null: ' . inspect($null) . PHP_EOL;
echo 'Inspecting $bool1: ' . inspect($bool1) . PHP_EOL;
echo 'Inspecting $bool2: ' . inspect($bool2) . PHP_EOL;
echo 'Inspecting $string1: ' . inspect($string1) . PHP_EOL;
echo 'Inspecting $string2: ' . inspect($string2) . PHP_EOL;
echo 'Inspecting $array1: ' . inspect($array1) . PHP_EOL;
echo 'Inspecting $array2: ' . inspect($array2) . PHP_EOL;
echo PHP_EOL . PHP_EOL;
コード例 #12
0
 /**
  * Sends a value to the debugging console/log, if one exists.
  *
  * @param string $v
  * @return string Empty string.
  */
 function filter_log($v)
 {
     if (function_exists('inspect')) {
         inspect($v);
     }
     return '';
 }
コード例 #13
0
ファイル: search.php プロジェクト: Geeklog-Plugins/hello
    $retval = '';
    if ($uid > 1) {
        DB_query("UPDATE {$_TABLES['userindex']} SET etids = '-' WHERE uid = '{$uid}'");
        if (DB_getItem($_TABLES['plugins'], 'pi_enabled', "pi_name = 'forum'") == 1) {
            DB_query("DELETE FROM {$_TABLES['gf_watch']} WHERE uid = '{$uid}'");
        }
        $username = DB_getItem($_TABLES['users'], 'username', "uid = '{$uid}'");
        $retval .= '<p>' . sprintf($LANG_HELLO01['success'], $username) . '</p>' . LB;
    }
    $retval .= display_form();
    return $retval;
}
$display .= hello_admin_menu();
$display .= COM_startBlock($LANG_HELLO01['block_headline']);
switch ($_GET['mode']) {
    case 'inspect':
        $display .= inspect($_GET['uid']);
        break;
    case 'reset':
        $display .= reset_it($_GET['uid']);
        break;
    case 'search':
        $display .= search_user($_GET['query']);
        break;
    default:
        $display .= display_form();
        break;
}
$display .= COM_endBlock();
$display = COM_createHTMLDocument($display);
COM_output($display);
コード例 #14
0
ファイル: load_console.php プロジェクト: hbnro/habanero
say("\n  {$prefix}Press \\bwhite(CTRL+C)\\b to exit\n");
$cache = array();
if ($readline = function_exists('readline')) {
    readline_completion_function(function () {
        return array();
    });
}
$callback = $readline ? 'readline' : '\\Sauce\\Shell\\CLI::readln';
\Sauce\Shell\CLI::main(function () use($callback, $readline, &$cache, $warn) {
    $_ = trim(call_user_func($callback, colorize('  > ')));
    if (!$_) {
        return;
    } elseif ($readline && $_ && !in_array($_, $cache)) {
        readline_add_history($_);
        $cache[] = $_;
    }
    $code = "extract(__set());return __set({$_},get_defined_vars());";
    $out = $warn ? (array) @eval($code) : @assert($_);
    if (is_array($out)) {
        foreach ($out as $key => $one) {
            $prefix = '';
            if (is_string($key)) {
                $prefix = "\\clight_gray({$key} )\\c";
            }
            $one = preg_replace('/^/m', colorize("  \\cgreen(>)\\c {$prefix}"), trim(inspect($one)));
            writeln($one);
        }
    } else {
        writeln(colorize(sprintf('  \\c%s(> %s)\\c', $out ? 'green' : 'red', $_)));
    }
});
コード例 #15
0
ファイル: check_config.php プロジェクト: hbnro/habanero
    $title = 'Application options';
    $file = path(APP_PATH, 'config', "{$what}.php");
} elseif (arg('g global')) {
    $title = 'Main options';
    $file = path(APP_PATH, 'config.php');
    $what = 'default';
}
$config = isset($file) ? $trap($file) : config();
$params = array_diff_key(flags(), array_flip(array('global', 'app', 'dev', 'prod', 'd', 'p', 'a', 'g')));
if (!empty($params)) {
    success("\n  {$title} updated");
    $code = '';
    $params = array_merge($config, $params);
    foreach ($params as $item => $value) {
        if (!is_numeric($item)) {
            $sub = explode('.', $item);
            $key = "['" . join("']['", $sub) . "']";
            $value = var_export($value, TRUE);
            $code .= "\$config{$key} = {$value};\n";
        }
    }
    if (isset($file)) {
        !is_file($file) && mkdir(dirname($file), 0755, TRUE);
        write($file, "<?php\n{$code}\n");
    }
} else {
    info("\n  {$title}:");
}
$config = isset($file) ? $trap($file) : config();
printf("\n%s\n", preg_replace('/^/m', '  ', inspect($config)));