创建实例后
@param array $option
@param string $alias
@param mixed $object
767659
protected static function __createAfter(&$option,$alias,&$object)
	{
		if ('@' !== $alias && $object->merge && null !== self::$defaultObject)
		{
			// 将数据合并到公用项
			self::$defaultObject->set($object->get());
		}
		$data = $object->get('CONFIGS');
		if(is_array($data))
		{
			// 循环加载配置文件中的配置文件
			foreach($data as $name => $option)
			{
				self::create($option,$name);
			}
		}
	}
1116921
public static function add(OptionItem $opt, $str_alias = null)
    {
        // tester ici si version ou aide : à ne pas mettre
        if(
            !in_array($opt->getShort(true), self::$arr_prohibited, true)
            &&
            !in_array($opt->getLong(true), self::$arr_prohibited, true)
        )
        {
            if (is_string($str_alias) && isset(self::$arr_group[$str_alias])) {
                self::$arr_group[$str_alias]->args[$opt->getName()] = $opt;
            } else {
                self::$arr_opt[$opt->getName()] = $opt;
            }
        }
    }
807343
public static function toProtobuf($object, $filter = NULL)
	{
		$output = '';

		if (isset($object->name) && ($filter === null || isset($filter['name']))) {
			$output .= "\x0a";
			$output .= Binary::encodeVarint(strlen($object->name));
			$output .= $object->name;
		}

		if (isset($object->number) && ($filter === null || isset($filter['number']))) {
			$output .= "\x10";
			$output .= Binary::encodeVarint($object->number);
		}

		if (isset($object->options) && ($filter === null || isset($filter['options']))) {
			$output .= "\x1a";
			$buffer = EnumValueOptionsMeta::toProtobuf($object->options, $filter === null ? null : $filter['options']);
			$output .= Binary::encodeVarint(strlen($buffer));
			$output .= $buffer;
		}

		return $output;
	}
27914
private function generateJoin($parent, $field, $alias)
    {
        // JOIN {parent}.{associationName} {associationPrefix} [ ON {joinCondition}]
        $format = '
                LEFT JOIN %s.%s %s %s';

        return sprintf($format, $parent, $field, $alias, $this->generateJoinCondition($field));
    }
1079995
public static function add($content, $option = array() , $alias = null)
	{
		$object = self::getInstance($alias);
		if($object)
		{
			$object->add($content, $option);
			if(IS_CLI && Config::get('@.LOG_CLI_AUTOSAVE'))
			{
				$object->save();
				$object->data = array();
			}
		}
	}
813293
public function add($alias, $item = null, array $options = null)
    {
        $this->addItem($alias, $item, $options);
    }
190565
protected function getJoinTable($join, &$alias = null)
    {
        // 传入的表名为数组
        if (is_array($join)) {
            $table = $join[0];
            $alias = $join[1];
        } else {
            $join = trim($join);
            if (false !== strpos($join, '(')) {
                // 使用子查询
                $table = $join;
            } else {
                $prefix = $this->prefix;
                if (strpos($join, ' ')) {
                    // 使用别名
                    list($table, $alias) = explode(' ', $join);
                } else {
                    $table = $join;
                    if (false === strpos($join, '.') && 0 !== strpos($join, '__')) {
                        $alias = $join;
                    }
                }
                if ($prefix && false === strpos($table, '.') && 0 !== strpos($table, $prefix) && 0 !== strpos($table, '__')) {
                    $table = $this->getTable($table);
                }
            }
        }
        if (isset($alias)) {
            if (isset($this->options['alias'][$table])) {
                $table = $table . '@think' . uniqid();
            }
            $table = [$table => $alias];
            $this->alias($table);
        }
        return $table;
    }
1369573
public function max($alias, $field = null, $script = null)
    {
        $aggregation = new MaxAggregation($alias, $field, $script);

        $this->append($aggregation);
    }
863129
function(object, options) {
		var i, r = [];
		for (i in object) {
			if (object.hasOwnProperty(i)) {
				r = r.concat(options.fn(object[i]));
			}
		}
		return r;
	}
1314391
public function setAlias($alias) {
        if ($alias !== null && ! $this->argumentsParser->isOptionAlias($alias)) {
            throw new InvalidOptionAliasException(s(
                'A option alias must have this format: "-f", got: "%s"', $alias
            ));
        }

        $this->alias = $alias;

        return $this;
    }
706309
private function select2($fields = false, $where = null, $orderBy = null, $limit = null): array
    {
        //合并请求参数
        $statement = $this->statement;
        $statement->select($fields, $where, $orderBy, $limit);

        // 执行前置 钩子
        $ret = $this->before('Select', $statement);
        if ($ret === self::INTERRUPT) {
            return [];
        }

        //修正查询参数
        list($this->statement) = $ret;

        // 查询结果
        $ret = self::query2();

        // 清除Statement缓存
        $this->clear();

        // 执行后置钩子
        return $this->after('Select', $ret);
    }
1256342
public function doJoin($joinType, $table, $alias = null, $joinOn = null)
    {
        $this->joinTables[] = $tableObject = $this->createTable($table, $alias);

        $joinMetadata = new JoinMetadata();
        $joinMetadata->setJoinType($joinType);

        if ($joinOn) {
            $relativeOn = new RelativeClause($tableObject, $joinOn, RelativeClause::SELF_DIRECTIVE);
            $joinMetadata->setJoinOn($relativeOn);
        }

        $tableObject->setJoinMetadata($joinMetadata);
        is_callable($table) && $table($tableObject, $joinMetadata);

        return $tableObject;
    }
783743
function alias( $aliasName )
    {
        $aliasList = $this->aliasList();
        if ( !array_key_exists( $aliasName, $aliasList ) )
            return false;
        return $aliasList[$aliasName];
    }
155048
public function alias($alias = null)
    {
        if (null === $alias) {
            $alias = $this->getTableAlias();
        }
        $this->oosql_table_alias = $alias;
        return $this;
    }
938356
public function set(object $object, string $alias = null)
    {
        $class = get_class($object);
        $this->instances[$class] = $object;

        if (isset($alias)) {
            $this->addAlias($alias, $class);
        }

        $interfaces = class_implements($object);
        if (is_array($interfaces)) {
            foreach ($interfaces as $i) {
                $this->addInterface($i, $class);
            }
        }

        return $this;
    }
212034
private function setParamsTransObj(&$trans_obj, $locale, $alias, $title='')
    {
        $trans_obj
            ->setAlias($alias)
            ->setLocale($locale)
            ->setTitle($title)
            ->save();
    }
1084458
function connect($alias = null)
    {
        if ($this->conn == null) {
            try {
                $this->conn = new PDO(
                    $this->config['dsn'],
                    $this->config['user'],
                    $this->config['passw']
                );

                $this->conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
            } catch (PDOException $e) {
                trigger_error('Data base not connected!');
            }
        }
        if (!is_object($this->conn)) {
            trigger_error('I can not connect to the database', E_USER_ERROR);
        }
        return $this->conn;
    }