Запись в буфер информации о сущности
@param array $info Атрибуты и свойства сущности
@return array Атрибуты без свойств
438527
static function set_info($info)
    {
        if (!isset($info['proto']) && $info['uri'] !='/vendor/boolive/basic/object'){
            $info['proto'] = '/vendor/boolive/basic/object';
        }
        if (isset($info['properties'])){
            foreach ($info['properties'] as $name => $child){
                if (is_scalar($child) || is_null($child)){
                    $child = ['value' => $child];
                    if (isset($info['proto'])) $child['proto'] = $info['proto'].'/'.$name;
                }
                $child['name'] = $name;
                $child['is_property'] = true;
                if (!empty($child['value'])) $child['is_default_value'] = false;
                if (!empty($child['file'])) $child['is_default_file'] = false;
                if (!isset($child['is_default_logic'])) $child['is_default_logic'] = true;
                if (!isset($child['created']) && isset($info['created'])) $child['created'] = $info['created'];
                if (!isset($child['updated']) && isset($info['updated'])) $child['updated'] = $info['updated'];
                $child['is_exists'] = $info['is_exists'];
                $child['uri'] = $info['uri'].'/'.$name;
                self::$list_props[$info['uri']][$name] = $child['uri'];
                self::set_info($child);
            }
            unset($info['properties']);
        }
        self::$list_info[$info['uri']] = $info;
        return $info;
    }
68733
public static function dicionario(string $entity = null, bool $info = null)
    {
        if (file_exists(PATH_HOME . "entity/cache") && (empty($entity) || file_exists(PATH_HOME . "entity/cache/{$entity}.json"))) {
            if (empty($entity)) {

                //read all dicionarios
                $list = [];
                foreach (\Helpers\Helper::listFolder(PATH_HOME . "entity/cache") as $json) {
                    if (preg_match('/^\w+\.json$/i', $json)) {
                        $entity = str_replace('.json', '', $json);
                        if ($dic = self::dicionario($entity)) {
                            if ($info)
                                $dic = ["dicionario" => $dic, "info" => Metadados::getInfo($entity)];

                            $list[$entity] = $dic;
                        }
                    }
                }

                return $list;

            } else {

                //read dicionario específico
                $setor = !empty($_SESSION['userlogin']['setor']) ? $_SESSION['userlogin']['setor'] : "0";
                $meta = Metadados::getDicionario($entity, !0, !0);

                if (!empty($meta))
                    return ($info ? ["dicionario" => $meta, "info" => Metadados::getInfo($entity)] : $meta);
            }
        }

        return null;
    }
701511
protected function render( array $info )
	{
		$content = file_get_contents( $this->path );

		$info['home_url'] = asset( '/' );
		$info['favicon_url'] = asset( 'favicon.ico' );

		foreach ( $info as $key => $val )
		{
			$content = str_replace( "{{ $$key }}", $val, $content );
		}

		return $content;
	}
9833
public static function cleanPhpInfo($info, $recursive = false)
    {
        static $excludeKeys = ['directive', 'variable',];

        $clean = [];

        //  Remove images and move nested args to root
        if (!$recursive && isset($info[0], $info[0][0]) && is_array($info[0])) {
            $info['general'] = [];

            foreach ($info[0] as $key => $value) {
                if (is_numeric($key) || in_array(strtolower($key), $excludeKeys)) {
                    continue;
                }

                $info['general'][$key] = $value;
                unset($info[0][$key]);
            }

            unset($info[0]);
        }

        foreach ($info as $key => $value) {
            if (in_array(strtolower($key), $excludeKeys)) {
                continue;
            }

            $key = strtolower(str_replace(' ', '_', $key));

            if (is_array($value) && 2 == count($value) && isset($value[0], $value[1])) {
                $v1 = array_get($value, 0);

                if ($v1 == '<i>no value</i>') {
                    $v1 = null;
                }

                if (in_array(strtolower($v1), ['on', 'off', '0', '1'])) {
                    $v1 = array_get_bool($value, 0);
                }

                $value = $v1;
            }

            if (is_array($value)) {
                $value = static::cleanPhpInfo($value, true);
            }

            $clean[$key] = $value;
        }

        return $clean;
    }
196593
function callTOC( $info )
    {
        $params = array();

        eZPDFTable::extractParameters( $info['p'], 0, $params, true );

        $sizes = isset( $params['size'] ) ? explode( ',', $params['size'] ) : '';
        $indents = isset( $params['indent'] ) ? explode( ',', $params['indent'] ) : '';
        $dots = isset( $params['dots'] ) ? $params['dots'] : '';
        $contentText = isset( $params['contentText'] ) ? $params['contentText'] : ezpI18n::tr( 'lib/ezpdf/classes', 'Contents', 'Table of contents' );

        $this->insertTOC( $sizes, $indents, $dots, $contentText );
    }
811280
protected function createList(Infoset $info) {
		$list = [];
		
		if ($info->hasTitle()) {
			$list[] = $info->getTitle() . ':';
		}
		
		foreach ($info as $content) {
			if ($content instanceof Infoset) {
				$content = $this->createContent($content);
			}
			
			if ($info->isContentBbCodes()) {
				$content = $this->bbCodesHandle($content);
			}
			
			$list[] = ' - ' . $content;
		}

		return implode(PHP_EOL, $list);
	}
289352
protected function _parseTableInfo($info)
    {
        $table = new AnDatabaseSchemaTable;
        $table->name        = $info->Name;
        $table->engine      = $info->Engine;
        $table->type        = $info->Comment == 'VIEW' ? 'VIEW' : 'BASE';
        $table->length      = $info->Data_length;
        $table->autoinc     = $info->Auto_increment;
        $table->collation   = $info->Collation;
        $table->behaviors   = array();
        $table->description = $info->Comment != 'VIEW' ? $info->Comment : '';

        return $table;
    }
1090626
protected function createContent(Infoset $info) {
		foreach ($this->errors as $error) {
			if (isset(self::$errorTypes[$error['type']])) {
				$type = self::$errorTypes[$error['type']];
			} else {
				$type = 'Uncnown';
			}

			$info[] = sprintf($this->errorTemplate, $type, $error['message'], $error['file'], $error['line']);
		}
	}
888810
public function find(array $info)
    {
        $path = str_replace(parse_url($info['url'], PHP_URL_SCHEME).'://', '', $info['url']);

        $file   = pathinfo($path, PATHINFO_FILENAME);
        $format = pathinfo($path, PATHINFO_EXTENSION);
        $path   = ltrim(pathinfo($path, PATHINFO_DIRNAME), '.');

        $parts = array();

        //Add the base path
        if($base = $this->getBasePath()) {
            $parts[] = $base;
        }

        //Add the file path
        if($path) {
            $parts[] = $path;
        }

        //Add the file
        $parts[] = $file;

        //Create the path
        $path = implode('/', $parts);

        //Append the format
        if($format) {
            $path = $path.'.'.$format;
        }

        if(!$result = $this->realPath($path))
        {
            $pattern = $path.'.*';
            $results = glob($pattern);

            //Try to find the file
            if ($results)
            {
                foreach($results as $file)
                {
                    if($result = $this->realPath($file)) {
                        break;
                    }
                }
            }
        }

        return $result;
    }
70213
private function getArray(Array_ $array)
    {
        $return = [];

        foreach ($array->items as $item) {
            if ($item->key === null) {
                $return[] = $this->getValue($item->value);
            } else {
                $return[$this->getValue($item->key)] = $this->getValue($item->value);
            }
        }

        return $return;
    }
1134163
public static function filterUserInfo($info)
    {
        if (!\is_string($info)) {
            throw new \InvalidArgumentException('Uri user info must be a string');
        }

        return preg_replace_callback(
            '/(?:[^a-zA-Z0-9_\-\.~!\$&\'\(\)\*\+,;=]+|%(?![A-Fa-f0-9]{2}))/u',
            function ($match) {
                return rawurlencode($match[0]);
            },
            $info
        ) ?? '';
    }
364859
private function buildOnChangeFunc($info)
    {
        $strFunc = 'function '.$info['funcName'].'() {'."\n";
        $strFunc .= "\t".'var val = BDKForm.getValue("'.$info['selector'].'"),'."\n"
            ."\t\t".'req;'."\n";
        foreach ($info['check'] as $check) {
            $strFunc .= "\t".'req = ( '.$check['isReq'].' );'."\n"
                // ."\t".'console.log("req", "'.$check['selector'].'", req);'."\n"
                ."\t".'BDKForm.setRequired("'.$check['selector'].'", req);'."\n";
        }
        $strFunc .= '}';
        return $strFunc;
    }
708725
public function info()
    {
        $data = [];
        foreach ($this->attributes as $key => $value) {
            switch (gettype($value)) {
                case 'boolean':
                    $data[$key] = [
                        'boolValue' => $value
                    ];
                    break;
                case 'integer':
                    $data[$key] = [
                        'intValue' => $value
                    ];
                    break;
                default:
                    $data[$key] = [
                        'stringValue' => ['value' => (string) $value]
                    ];
            }
        }
        return [
            'attributeMap' => $data
        ];
    }
178227
public function getProviderInfo(): array
    {
        if ($this->info === null) {
            $event = new RegisterProviderInfo();

            $this->trigger(
                $event::REGISTER_INFO,
                $event
            );

            $this->info = $event->info;

            $this->formatInfoArray($this->info);
        }

        return $this->info;
    }
802316
public function formatCommand($info) {
    // Create the base.
    $parts = ["drush"];
    $parts[] = $info['alias'];

    // Check for a '--yes' options and set it early for common formatting.
    if (isset($info['options']['yes'])) {
      $parts[] = '-y';
      unset($info['options']['yes']);
    }

    // Add the command name.
    $parts[] = $info['name'];

    // Add arguments.
    if (!empty($info['args'])) {
      $parts[] = implode(' ', $info['args']);
    }

    // Add options.
    if (!empty($info['options'])) {
      // Skip the config option.
      unset($info['options']['config']);

      foreach ($info['options'] as $option => $value) {
        $part = "--{$option}";
        if ($value !== TRUE && $value !== 1) {
          $part .= "={$value}";
        }

        $parts[] = $part;
      }
    }

    return implode(' ', $parts);
  }
540607
public function addInfoLog($info)
    {
        if ($this->configHelper->isDebugModeOn()) {
            $this->boltLogger->info($info);
        }
        return $this;
    }
1274017
protected function _parseColumnInfo($info)
    {
        list($type, $length, $scope) = $this->_parseColumnType($info->Type);

        $column           = new KDatabaseSchemaColumn();
        $column->name     = $info->Field;
        $column->type     = $type;
        $column->length   = $length ? $length : null;
        $column->scope    = $scope ? (int) $scope : null;
        $column->default  = $info->Default;
        $column->required = $info->Null != 'YES';
        $column->primary  = $info->Key == 'PRI';
        $column->unique   = ($info->Key == 'UNI' || $info->Key == 'PRI');
        $column->autoinc  = strpos($info->Extra, 'auto_increment') !== false;
        $column->filter   = $this->_type_map[$type];

        // Don't keep "size" for integers.
        if(substr($type, -3) == 'int') {
            $column->length = null;
        }

        // Get the related fields if the column is primary key or part of a unique multi column index.
        if($indexes = $this->_table_schema[$info->Table]->indexes)
        {
            foreach($indexes as $index)
            {
                // We only deal with composite-unique indexes.
                if(count($index) > 1 && !$index[1]->Non_unique)
                {
                    $fields = array();
                    foreach($index as $field) {
                        $fields[$field->Column_name] = $field->Column_name;
                    }

                    if(array_key_exists($column->name, $fields))
                    {
                        unset($fields[$column->name]);
                        $column->related = array_values($fields);
                        $column->unique = true;
                        break;
                    }
                }
            }
        }

        return $column;
    }