show() static public method

Shows an entire array or object in a human readable way This is perfect for debugging
static public show ( array $array, boolean $echo = true ) : mixed
$array array The source array
$echo boolean By default the result will be echoed instantly. You can switch that off here.
return mixed If echo is false, this will return the generated array output.
示例#1
0
    function testArrayShow()
    {
        $this->assertEqual(a::show($this->arr, false), '<pre>Array
(
    [cat] =&gt; miao
    [dog] =&gt; wuff
    [bird] =&gt; tweet
)
</pre>');
    }
示例#2
0
</dd>
    
  <dt>Installed Snippets</dt>
  <dd><?php 
a::show(dir::read(c::get('root.snippets')));
?>
</dd>

  <dt>Your config files</dt>
  <dd><?php 
a::show(dir::read(c::get('root.site') . '/config'));
?>
</dd>
    
  <dt>Your entire config</dt>
  <dd><?php 
a::show(c::get());
?>
</dd>

  <dt>PHP Error Reporting</dt>
  <dd><?php 
echo ini_get('display_errors') ? 'yes' : 'no';
?>
</dd>

</ul>

</body>

</html>
    $dir = $root . '/' . $name;
    if (is_dir($dir)) {
        $skipped[] = basename($dir);
        continue;
    }
    dir::make($dir);
    $content = implode("\n\n" . '----' . "\n\n", $output);
    $file = $dir . '/' . $template;
    f::write($file, $content);
}
putmessage('Exported ' . $n . ' articles to ' . $root . '<br /><br />');
if (!empty($errors)) {
    putmessage(count($errors) . ' article(s) could not be imported<br /><br />');
}
if (!empty($skipped)) {
    putmessage('The following folders have been skipped, because they already existed:' . a::show($skipped, false));
}
/**
 * IXR - The Inutio XML-RPC Library
 *
 * @package IXR
 * @since 1.5
 *
 * @copyright Incutio Ltd 2002-2005
 * @version 1.7 (beta) 23rd May 2005
 * @author Simon Willison
 * @link http://scripts.incutio.com/xmlrpc/ Site
 * @link http://scripts.incutio.com/xmlrpc/manual.php Manual
 * @license BSD License http://www.opensource.org/licenses/bsd-license.php
 */
/**
示例#4
0
function dump($var)
{
    return a::show($var);
}
示例#5
0
 /**
  * Checks if all required keys are in the 'raw' event array. Throws an
  * exception if one is missing.
  *
  * @param array $event a 'raw' event array containing all fields
  */
 private static function validate($event)
 {
     $missingKeys = a::missing($event, self::$requiredKeys);
     if ($missingKeys) {
         $message = "Event creation failed because of the following missing " . "required fields:\n" . a::show($missingKeys, false);
         throw new Exception($message, 1);
     }
 }