Opens a window for the Smarty Debugging Console and display the data

@param Smarty_Internal_Template|Smarty $obj object to debug
@param bool                            $full
349016
public function display_debug($obj, $full = false)
    {
        if (!$full) {
            $this->offset ++;
            $savedIndex = $this->index;
            $this->index = 9999;
        }
        if ($obj->_objType == 1) {
            $smarty = $obj;
        } else {
            $smarty = $obj->smarty;
        }
        // create fresh instance of smarty for displaying the debug console
        // to avoid problems if the application did overload the Smarty class
        $debObj = new Smarty();
        // copy the working dirs from application
        $debObj->setCompileDir($smarty->getCompileDir());
        // init properties by hand as user may have edited the original Smarty class
        $debObj->setPluginsDir(is_dir(__DIR__ . '/../plugins') ? __DIR__ . '/../plugins' : $smarty->getPluginsDir());
        $debObj->force_compile = false;
        $debObj->compile_check = true;
        $debObj->left_delimiter = '{';
        $debObj->right_delimiter = '}';
        $debObj->security_policy = null;
        $debObj->debugging = false;
        $debObj->debugging_ctrl = 'NONE';
        $debObj->error_reporting = E_ALL & ~E_NOTICE;
        $debObj->debug_tpl = isset($smarty->debug_tpl) ? $smarty->debug_tpl : 'file:' . __DIR__ . '/../debug.tpl';
        $debObj->registered_plugins = array();
        $debObj->registered_resources = array();
        $debObj->registered_filters = array();
        $debObj->autoload_filters = array();
        $debObj->default_modifiers = array();
        $debObj->escape_html = true;
        $debObj->caching = false;
        $debObj->compile_id = null;
        $debObj->cache_id = null;
        // prepare information of assigned variables
        $ptr = $this->get_debug_vars($obj);
        $_assigned_vars = $ptr->tpl_vars;
        ksort($_assigned_vars);
        $_config_vars = $ptr->config_vars;
        ksort($_config_vars);
        $debugging = $smarty->debugging;

        $_template = new Smarty_Internal_Template($debObj->debug_tpl, $debObj);
        if ($obj->_objType == 2) {
            $_template->assign('template_name', $obj->source->type . ':' . $obj->source->name);
        }
        if ($obj->_objType == 1 || $full) {
            $_template->assign('template_data', $this->template_data[$this->index]);
        } else {
            $_template->assign('template_data', null);
        }
        $_template->assign('assigned_vars', $_assigned_vars);
        $_template->assign('config_vars', $_config_vars);
        $_template->assign('execution_time', microtime(true) - $smarty->start_time);
        $_template->assign('display_mode', $debugging == 2 || !$full);
        $_template->assign('offset', $this->offset * 50);
        echo $_template->fetch();
        if (isset($full)) {
            $this->index --;
        }
        if (!$full) {
            $this->index = $savedIndex;
        }
    }
460997
public function get_external_view(string $full_path, string $mode = 'html', array $data=null){
    if ( !router::is_mode($mode) ){
      die("Incorrect mode $full_path $mode");
    }
    if ( ($this->get_mode() === 'dom') && (!defined('BBN_DEFAULT_MODE') || (BBN_DEFAULT_MODE !== 'dom')) ){
      $full_path .= ($full_path === '' ? '' : '/').'index';
    }
    $view = null;
    if ( $this->has_view($full_path, $mode) ){
      $view = self::$loaded_views[$mode][$full_path];
    }
    else if ( $info = $this->router->route(basename($full_path), 'free-'.$mode, \dirname($full_path)) ){
      $view = new mvc\view($info);
      $this->add_to_views($full_path, $mode, $view);
    }
    if ( \is_object($view) && $view->check() ){
      return \is_array($data) ? $view->get($data) : $view->get();
    }
    return '';
  }
1147106
function full() {
    var _this4 = this;

    var options = this.options,
        viewer = this.viewer,
        image = this.image,
        list = this.list;


    if (!this.isShown || this.played || this.fulled || !options.inline) {
      return this;
    }

    this.fulled = true;
    this.open();
    addClass(this.button, CLASS_FULLSCREEN_EXIT);

    if (options.transition) {
      removeClass(list, CLASS_TRANSITION);

      if (this.viewed) {
        removeClass(image, CLASS_TRANSITION);
      }
    }

    addClass(viewer, CLASS_FIXED);
    viewer.setAttribute('style', '');
    setStyle(viewer, {
      zIndex: options.zIndex
    });

    this.initContainer();
    this.viewerData = assign({}, this.containerData);
    this.renderList();

    if (this.viewed) {
      this.initImage(function () {
        _this4.renderImage(function () {
          if (options.transition) {
            setTimeout(function () {
              addClass(image, CLASS_TRANSITION);
              addClass(list, CLASS_TRANSITION);
            }, 0);
          }
        });
      });
    }

    return this;
  }
854461
protected function processClassMethod(ClassMethod $method, string $fullClassName, array $uses = []): void
    {
        $fullMethodName = $fullClassName . '::' . $method->name;
        $type = $method->returnType;

        if ($type instanceof NullableType) {
            $type = ['null', $this->mapClassAndNamespace($uses, (string)$type->type)];
            sort($type);
        } else {
            if (!is_null($type)) {
                $type = (string)$type;
            }
        }

        $type = $this->mapClassAndNamespace($uses, $type);

        $thisMethod = [
            'file' => $this->file,
            'class' => $fullClassName,
            'name' => $fullMethodName,
            'line' => $method->getAttribute('startLine'),
            'return' => $type,
            'params' => [],
            'docblock' => $this->getDocBlock($method, $uses),
        ];

        /** @var Param $param */
        foreach ($method->params as $param) {
            $type = $this->getClassMethodReturnType($param, $uses);

            if (!isset($param->var)) {
                throw new RuntimeException('Access to an undefined property PhpParser\Node\Param::$var');
            }

            if (!isset($param->var->name)) {
                throw new RuntimeException('Access to an undefined property PhpParser\Node\Param::$var->$name');
            }

            if (!is_string($param->var->name)) {
                throw new RuntimeException('Access to invalid property PhpParser\Node\Param::$var->$name');
            }

            $thisMethod['params']['$' . $param->var->name] = $type;
        }

        $this->methods[$fullMethodName] = $thisMethod;
    }
376422
private function setFullNameEmbeddable(FullNameEmbeddableInterface $fullNameEmbeddable, bool $notify = true): self
    {
        $this->fullNameEmbeddable = $fullNameEmbeddable;
        $this->fullNameEmbeddable->setOwningEntity($this);
        if (true === $notify) {
            $this->notifyEmbeddablePrefixedProperties(
                HasFullNameEmbeddableInterface::PROP_FULL_NAME_EMBEDDABLE
            );
        }

        return $this;
    }
337995
public function exec($command, $full = false)
    {
        if ($full) {
            exec($command, $output);

            return $output;
        }

        return exec($command);
    }
134025
public function buildComplete($url = null, $full = false) {
		if (is_array($url)) {
			$url = $this->addQueryStrings($url);
		}

		return parent::build($url, $full);
	}
888618
protected function getFileHandle($fullPath, $mode)
    {
        $key = md5($fullPath.$mode);
        if (array_key_exists($key, $this->openFileHandles)) {
            $handle = $this->openFileHandles[$key];
        } else {
            $handle = fopen($fullPath, $mode);
            $this->openFileHandles[$key] = $handle;
        }

        if ('stream' !== get_resource_type($handle)) {
            throw new \Exception('The file handle is not a file stream!');
        }

        if (false !== strpos($mode, 'w')) {
            if ('stream' === !is_writeable($fullPath)) {
                throw new \Exception('The file handle in the context is not writeable!');
            }
        }

        return $handle;
    }
1034817
public static function ofObjectType($fullName)
    {
        $result = self::of($fullName);
        if (!($result instanceof ObjectType))
            throw new InvalidArgumentException("Argument 'fullName' does not describe a class or interface.");
        return $result;
    }
264585
public static function setIsDebug(bool $bool): void
    {
        if (self::isCliApp()) {
            self::$IS_DEBUG = $bool;
        } else {
            MSession::set(MCoreApplication::DEBUG, $bool);
        }
    }
338303
public function preCacheTranslateObject(ModelObject $obj)
    {
        // merge aspects
        //$db = $this->getConnection();

//        $q = new Query();
//        $q->select('aspectid');
//        $q->from('elementaspectrel');
//        $q->where("elementid = {$db->quote($obj->{$obj->getPrimaryKey()})}");

//        $aspectIDs = $db->readCol($q);

//        $this->populateRels();

//        $aspectSlugs = array_key_exists($obj->Slug, $this->aspectrel)?$this->aspectrel[$obj->Slug]['Aspects']:array();

        $aspectSlugs = $obj->getAspectSlugs();

        $schema = new NodeSchema();

        if (!empty($aspectSlugs)) {

            $aspects = $this->AspectDAO->multiGetBySlug($aspectSlugs);

            $newAspects = array();
            foreach ($aspects as $aspect) {
//                $plugin = $this->PluginService->getByID($aspect['PluginID']);
//                if(empty($plugin) || !$plugin->isInstalled() || !$plugin->isEnabled())
//                    continue;


                $aspectSchema = $aspect->getSchema();
                foreach ($aspectSchema->getTagDefs() as $tagDef)
                    $schema->addTagDef($tagDef);
                foreach ($aspectSchema->getMetaDefs() as $metaDef)
                    $schema->addMetaDef($metaDef);

                $newAspects[] = $aspect;
            }

            $obj->setAspects($newAspects);

        }

        $obj->setSchema($schema);
        $obj->setAnchoredSite($this->SiteService->getAnchoredSite());
        $obj->setAnchoredSiteSlug($obj->getAnchoredSite()->getSlug());

        return $obj;
    }
727937
@Override
    public void visitCode(Code obj) {
        fbInfo.clear();
        loadedReg = -1;

        CodeException[] exc = obj.getExceptionTable();
        if (exc != null) {
            for (CodeException ce : exc) {
                if ((ce.getCatchType() == 0) && (ce.getStartPC() == ce.getHandlerPC())) {
                    fbInfo.add(new FinallyBlockInfo(ce.getStartPC()));
                }
            }
        }

        if (!fbInfo.isEmpty()) {
            try {
                super.visitCode(obj);
            } catch (StopOpcodeParsingException e) {
                // no more finally blocks to check
            }
        }
    }
52937
private function initDebugIds(bool $created = false)
    {
        $this->debugIdAsString = (string)$this->id;
        $this->debugObjectHash = spl_object_hash($this);
        if (false === $created) {
            return;
        }
        static $increment = 0;
        $this->debugCreationIncrement = ++$increment;
    }
1069425
public static function full_func_name($item, $showArgs = false, $argCharLimit = 10000)
    {
        $funcName = '';
        if (isset($item['class'])) {
            $funcName .= $item['class'];
        }
        if (isset($item['type'])) {
            $funcName .= $item['type'];
        }
        if (isset($item['function'])) {
            $funcName .= $item['function'];
        }

        if ($showArgs && isset($item['args'])) {
            $args = array();
            foreach ($item['args'] as $arg) {
                if (!is_object($arg) || method_exists($arg, '__toString')) {
                    $sarg = is_array($arg) ? 'Array' : strval($arg);
                    $args[] = (strlen($sarg) > $argCharLimit) ? substr($sarg, 0, $argCharLimit) . '...' : $sarg;
                } else {
                    $args[] = get_class($arg);
                }
            }

            $funcName .= "(" . implode(", ", $args) . ")";
        }

        return $funcName;
    }
786370
function fullscreenchangeHandler() {
        viewerAPI.fire('fullscreenchange');
        if (isFullscreen()) {
            $el.addClass('crocodoc-fullscreen');
            viewerAPI.fire('fullscreenenter');
        } else {
            $el.removeClass('crocodoc-fullscreen');
            viewerAPI.fire('fullscreenexit');
        }
    }
1079528
public static function showTableColumns($table, $full = false, $where = null)
    {
        $query = static::getQuery();

        return static::build(
            'SHOW',
            $full ? 'FULL' : false,
            'COLUMNS FROM',
            $query->quoteName($table),
            $where ? new QueryElement('WHERE', $where, 'AND') : null
        );
    }
743812
public function applyData($applyEntrie = NULL, $full = true){

        if (is_array($applyEntrie)){
            if ($full) {
                $this->values = $applyEntrie;
            } else {
                $this->values = array_replace($this->values, $applyEntrie);
            }
        }elseif (is_string($applyEntrie)){
            if ($full) {
                $this->values = explode($this->getDelimiter(), $applyEntrie);
            } else {
                $this->values = array_replace($this->values,explode($this->getDelimiter(), $applyEntrie));
            }
        } else {
            throw new \InvalidArgumentException("Argument must be an array or Speparated string");
        }

    }