定義データをリロードする
@return boolean 成否。
559357
public function reload_definition_data(){
		// キャッシュから読み込み
		$caches = $this->caches->load_cached_contents();

		if( $caches === false ){
			// テーブル定義ファイルの解析を実行
			$table_definition = $this->parse_definition_file();
			$this->fs->save_file(
				$this->config->path_cache_dir.'/table_definition.json',
				json_encode($table_definition, JSON_PRETTY_PRINT)
			);
			$caches = $this->caches->load_cached_contents();
		}
		if( $caches === false ){
			trigger_error('[ExcellentDb: Setup Error] Could NOT read data.');
			return;
		}
		$this->table_definition = $caches->table_definition;
		return true;
	}
879470
public function generateRawData()
    {
        $rawData = ['id' => $this->getId()];
        if ($this->getValue()) {
            $rawData['value'] = $this->getValue();
        }
        if ($this->getName()) {
            $rawData['name'] = $this->getName();
        }
        if ($this->getAppId()) {
            $rawData['app_id'] = $this->getAppId();
        }
        if ($this->getLanguage()) {
            $rawData['language'] = $this->getLanguage();
        }
        if ($this->getCreatedAt()) {
            $rawData['created_at'] = $this->getCreatedAt();
        }
        if ($this->getUpdatedAt()) {
            $rawData['updated_at'] = $this->getUpdatedAt();
        }

        return $rawData;
    }
1184328
public function verifyModuleStructure(){
		// Check Model Path
		$isValid = $this->verifyPath(dirname($this->getNames()->modelPath));
		
		// Check Entity Path
		$isValid = $isValid && $this->verifyPath(dirname($this->getNames()->entityPath));
		
		//$moduleFile = "{$this->getNames()->modulePath}/Module.php";
		
		return $isValid;
	}
541227
private function login(){
        extract($this->config);
        $this->link = ftp_connect($host, $port, $timeout);
        if($this->link) {
            if (ftp_login($this->link, $username, $password)) {
               return true;
            } else {
                $this->error = "无法登录到FTP服务器：username - {$username}";
            }
        } else {
            $this->error = "无法连接到FTP服务器：{$host}";
        }
        return false;
    }
1069398
protected function _primaryDataMustHaveType()
    {
        $path = $this->_getPathObject('data.type');

        if (!$this->_hasProperty($path)) {
            $this->_errorCollection->addDataError(
                $title = '_required',
                $detail = "Primary data does not contain member 'type'",
                $status = null,
                $idx = null,
                $aboutLink = $this->_getAboutLink('http://jsonapi.org/format/#crud-creating')
            );

            return false;
        }

        $value = $this->_getProperty($path->dotted);

        if (is_string($value)) {
            return true;
        }

        $this->_errorCollection->addDataTypeError(
            $title = '_notString',
            $details = "Primary data member 'type' is not a string",
            $status = null,
            $idx = null,
            $aboutLink = $this->_getAboutLink('http://jsonapi.org/format/#document-resource-object-identification')
        );

        return false;
    }
367462
protected function initAdapter(): bool
    {
        if (null === $this->adapter || 'files' === $this->adapter) {
            // try to apply settings
            if ($settings = $this->getOption('settings', 'files')) {
                $this->setSavePath($settings['save_path']);
            }
            return true;
        }
        if (\is_string($this->adapter)) {
            $adapterClass = '\\Bluz\\Session\\Adapter\\' . ucfirst($this->adapter);
            if (!class_exists($adapterClass) || !is_subclass_of($adapterClass, \SessionHandlerInterface::class)) {
                throw new ComponentException("Class for session adapter `{$this->adapter}` not found");
            }
            $settings = $this->getOption('settings', $this->adapter) ?: [];

            $this->adapter = new $adapterClass($settings);
            return session_set_save_handler($this->adapter);
        }
        return true;
    }
224746
public function canEdit(): bool
    {
        if ($this->isPendingDeletion()) {
            return false;
        }

        if (Auth::isManager($this->record->tree())) {
            return true;
        }

        // Members cannot edit RESN, CHAN and locked records
        return Auth::isEditor($this->record->tree()) && strpos($this->gedcom, "\n2 RESN locked") === false && $this->getTag() !== 'RESN' && $this->getTag() !== 'CHAN';
    }
1263270
public static function method() {
        // $this->methodParam 默认值为 '_method'
        // 如果指定 $_POST['_method'] ，表示使用POST请求来模拟其他方法的请求。
        // 此时 $_POST['_method'] 即为所模拟的请求类型。
        if (isset($_POST[$this->methodParam])) {
            return strtoupper($_POST[$this->methodParam]);
            // 或者使用 $_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'] 的值作为方法名。
        } elseif (isset($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'])) {
            return strtoupper($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE']);
            // 或者使用 $_SERVER['REQUEST_METHOD'] 作为方法名，未指定时，默认为 GET 方法
        } else {
            return isset($_SERVER['REQUEST_METHOD']) ? strtoupper($_SERVER['REQUEST_METHOD']) : 'GET';
        }
    }
1062112
public function getData()
    {
        $this->validate('txnTime', 'fileType', 'settleDate');

        $data = array(
            'version'    => $this->getVersion(),        //版本号
            'encoding'   => $this->getEncoding(),        //编码方式
            'certId'     => $this->getCertId(),    //证书ID
            'txnType'    => '76',        //交易类型
            'signMethod' => $this->getSignMethod(),        //签名方法
            'txnSubType' => '01',        //交易子类
            'bizType'    => '000000',        //业务类型
            'accessType' => '0',        //接入类型
            'merId'      => $this->getMerId(),     //商户代码
            'settleDate' => '0119',        //清算日期
            'txnTime'    => $this->getTxnTime(),    //订单发送时间
            'fileType'   => $this->getFileType(),        //文件类型
        );

        $data = $this->filter($data);

        $data['signature'] = $this->sign($data);

        return $data;
    }
1125822
public function fetchColumnAttributes()
    {
        if ( !is_object($this->datasource) )
            return false;

        $conn = $this->datasource->ado_connection;
        //$a = new Reportico($this->datasource);
        //$old_database = $a->database;

        $datadict = false;
        reset($this->columns);
        $lasttab = "";
        while ($d = key($this->columns)) {
            $value = &$this->columns[$d];

            if (array_key_exists($value->query_name, $this->clone_columns)) {
                $value->column_type =
                $this->clone_columns[$value->query_name][0];
                $value->column_length =
                $this->clone_columns[$value->query_name][1];

            } else if ($value->table_name) {
                if ($lasttab != $value->table_name) {
                    $datadict = $this->datasource->ado_connection->MetaColumns($value->table_name);
                    if (!$datadict) {
                        // echo "Data Dictionary Attack Failed Table $value->table_name\n";
                        // echo "Error ".$this->datasource->ado_connection->ErrorMsg()."<br>";
                        //die;
                    }
                }
                foreach ($datadict as $k => $v) {

                    if (strtoupper(trim($k)) == strtoupper($value->column_name)) {
                        //$coldets = $datadict[strtoupper($value->column_name)];
                        $coldets = $datadict[$k];
                        $value->column_type =
                        ReporticoDataSource::mapColumnType(
                            $this->datasource->driver,
                            $datadict[$k]->type);

                        if (strtoupper($value->column_type) == "INTEGER") {
                            $value->column_length = 0;
                        } else if (strtoupper($value->column_type) == "SMALLINT") {
                            $value->column_length = 0;
                        } else {
                            $value->column_length = (int) $datadict[$k]->max_length;
                        }

                        break;
                    }
                }
            }
            $lasttab = $value->table_name;
            next($this->columns);
        }
    }
110761
public function generate() {

		$methods   = array(); // Actual validation methods
		$rules     = array(); // Individual field rules
		$messages  = array(); // Field error messages
		$php_rules = $this->validator->get_rules();


		foreach($php_rules as $field_name => $field_rules) {

			$rules[$field_name] = array();

			foreach($field_rules as $rule) {

				if( ! ($rule instanceof jQueryValidationRule) ) continue;
				$rule_name = $rule->jquery__get_rule_name();


				if(!isset($methods[$rule_name])) {
					$method = method_exists($rule, 'jquery__get_method_definition') ? $rule->jquery__get_method_definition() : null;
					if($method) $methods[$rule_name] = $method;
				}


				$js_rule = $rule->jquery__get_rule_definition();

				if(is_array($js_rule)) {
					$rules[$field_name] = array_merge($rules[$field_name], $js_rule);
				} else {
					$rules[$field_name][$js_rule] = true;
				}


				$messages[$field_name][$rule_name] = $rule->get_error_message($field_name, null, $this->validator);

			}

			if(empty($rules[$field_name])) unset($rules[$field_name]);
			if(empty($messages[$field_name])) unset($messages[$field_name]);

		}


		return array(
			'rules'    => $rules,
			'messages' => $messages,
			'methods'  => $methods,
		);

	}
1311614
private function generatorClassEntity() {

        /* Lista os schemas do banco de dados */
        foreach ($this->oMetadata->getSchemas() as $valueSchema) {

            $tableNames = $this->oMetadata->getTableNames($valueSchema);

            $namespaceSchema = 'Orm\\' . $this->toCamelCase($valueSchema) . '\Entities';

            /* Lista as tabelas do banco de dados */
            foreach ($tableNames as $tableName) {

                $multiPk = $primaryKey = $bodyExchangeArray = null;

                $class = new ClassGenerator();

                $class->setNamespaceName($namespaceSchema);

                $docBlockClass = DocBlockGenerator::fromArray(array(
                            'shortDescription' => 'Classe tipo model da tabela ' . $tableName . ' dentro do schema ' . $valueSchema,
                            'longDescription' => null,
                ));

                $class->setDocBlock($docBlockClass);
                $class->setName($this->toCamelCase($tableName));

                $class->addProperty('DBSCHEMA', $valueSchema, PropertyGenerator::FLAG_STATIC);
                $class->addProperty('DBTABLE', $tableName, PropertyGenerator::FLAG_STATIC);

                foreach ($this->oMetadata->getConstraints($tableName, $valueSchema) as $constraint) {
                    if (!$constraint->hasColumns()) {
                        continue;
                    }

                    if ($constraint->isPrimaryKey()) {
                        $columns = $constraint->getColumns();

                        if (count($columns) > 1) {
                            $multiPk = true;
                            $primaryKey = implode(', ', $columns);
                        } else {
                            $multiPk = false;
                            $primaryKey = $columns[0];
                        }
                        $class->addProperty('MULTIPK', $multiPk, PropertyGenerator::FLAG_STATIC);
                        $class->addProperty('PKCOLUMN', $primaryKey, PropertyGenerator::FLAG_STATIC);
                    }
                }




                /* Cria os metodos setter/getter e as variáveis das colunas da tabela */

                $table = $this->oMetadata->getTable($tableName, $valueSchema);

                /* Lista as colunas da tabela do banco de dados */
                foreach ($table->getColumns() as $column) {

                    $varName = $this->camelCase($column->getName());
                    $class->addProperty($varName, null, PropertyGenerator::FLAG_PRIVATE);

                    $methodGet = 'get' . $this->toCamelCase($column->getName());
                    $methodSet = 'set' . $this->toCamelCase($column->getName());

                    $docBlockSet = DocBlockGenerator::fromArray(array(
                                'shortDescription' => 'Setter da coluna ' . $column->getName(),
                                'longDescription' => null,
                                'tags' => array(
                                    new Tag\ParamTag($varName, $this->prepareSqlTypeDocBlock($column->getDataType())),
                                ),
                    ));

                    $docBlockGet = DocBlockGenerator::fromArray(array(
                                'shortDescription' => 'Getter da coluna ' . $column->getName(),
                                'longDescription' => null,
                                'tags' => array(
                                    new Tag\ReturnTag(array(
                                        'datatype' => $this->prepareSqlTypeDocBlock($column->getDataType()),
                                            )),
                                ),
                    ));

                    $bodyGet = 'return $this->' . $varName . ';';
                    $bodySet = '$this->' . $varName . ' = $' . $this->camelCase($column->getName()) . ';';

                    $class->addMethod($methodSet, array($this->camelCase($column->getName())), MethodGenerator::FLAG_PUBLIC, $bodySet, $docBlockSet);
                    $class->addMethod($methodGet, array(), MethodGenerator::FLAG_PUBLIC, $bodyGet, $docBlockGet);

                    $bodyExchangeArray .= '$this->' . $varName . ' = (isset($data["' . $column->getName() . '"])) ? $data["' . $column->getName() . '"] : null;' . "\n\n";
                }

                $docBlockExchangeArray = DocBlockGenerator::fromArray(array(
                            'shortDescription' => 'Função para settar todos os objetos por meio de array',
                            'longDescription' => null,
                            'tags' => array(
                                new Tag\ParamTag('data', 'array'),
                            ),
                ));
                $class->addMethod('exchangeArray', array('data'), MethodGenerator::FLAG_PUBLIC, $bodyExchangeArray, $docBlockExchangeArray);

                $docBlockGetArrayCopy = DocBlockGenerator::fromArray(array(
                            'shortDescription' => 'Função para retornar os valores por meio de array dos objetos da classe',
                            'longDescription' => null,
                            'tags' => array(
                                new Tag\ReturnTag(array(
                                    'datatype' => 'mixed',
                                        )),
                            ),
                ));
                $class->addMethod('getArrayCopy', array(), MethodGenerator::FLAG_PUBLIC, 'return get_object_vars($this);', $docBlockGetArrayCopy);

                $classCode = "<?php" . PHP_EOL;

                $classCode .= $class->generate();

                /*
                  $idxConstraint = 0;
                  foreach ($this->oMetadata->getConstraints($tableName, $valueSchema) as $constraint) {

                  $typeConstraint = ($constraint->isPrimaryKey()) ? 'pk' : (($constraint->isForeignKey()) ? 'fk' : null);
                  if (!empty($typeConstraint)) {

                  $consName = $constraint->getName();
                  $contraintObj = $this->oMetadata->getConstraint($consName, $tableName, $valueSchema);

                  $constraintColumns = $contraintObj->getColumns();
                  if (count($constraintColumns) > 1) {
                  foreach ($constraintColumns as $valueConsColumns) {
                  $this->aDatabase[$valueSchema][$tableName][$valueConsColumns]['constraints']['type'] = $typeConstraint;
                  if ($typeConstraint === 'fk') {
                  $this->aDatabase[$valueSchema][$tableName][$valueConsColumns]['constraints']['schemaRef'] = $contraintObj->getReferencedTableSchema();
                  $this->aDatabase[$valueSchema][$tableName][$valueConsColumns]['constraints']['tableRef'] = $contraintObj->getReferencedTableName();
                  $this->aDatabase[$valueSchema][$tableName][$valueConsColumns]['constraints']['columnsRef'] = $contraintObj->getReferencedColumns();
                  }
                  }
                  } else {
                  $this->aDatabase[$valueSchema][$tableName][$constraintColumns[0]]['constraints']['type'] = $typeConstraint;
                  if ($typeConstraint === 'fk') {
                  $this->aDatabase[$valueSchema][$tableName][$constraintColumns[0]]['constraints']['schemaRef'] = $contraintObj->getReferencedTableSchema();
                  $this->aDatabase[$valueSchema][$tableName][$constraintColumns[0]]['constraints']['tableRef'] = $contraintObj->getReferencedTableName();
                  $this->aDatabase[$valueSchema][$tableName][$constraintColumns[0]]['constraints']['columnsRef'] = $contraintObj->getReferencedColumns();
                  }
                  }
                  }

                  $idxConstraint++;
                  }
                 * 
                 */
                file_put_contents($this->ormFolder . $this->toCamelCase($valueSchema) . DS . 'Entities' . DS . $this->toCamelCase($tableName) . '.php', $classCode);
                chmod($this->ormFolder . $this->toCamelCase($valueSchema) . DS . 'Entities' . DS . $this->toCamelCase($tableName) . '.php', 0644);

                $this->generatorClassEntityTable($valueSchema, $tableName);
            }


            //gera arquivo por tabela
        }
        return $this;
    }
672757
public function toData()
    {
        if ($this->action === self::TYPE_READ) {
            return [
                'fields' => 'whitelisted_domains',
            ];
        }

        if ($this->action === self::TYPE_DELETE) {
            return [
                'fields' => [
                    'whitelisted_domains',
                ],
            ];
        }

        return [
            'whitelisted_domains' => $this->domains,
        ];
    }
672640
public function isFormData()
    {
        return ($this->getContentType() == '' && $this->getOriginalMethod() === static::METHOD_POST) || in_array($this->getMediaType(), self::$formDataMediaTypes);
    }
1072198
public function getID()
    {
        if ($this->datos===null) {
            $this->datos = $this->toArray();
        }
        return !empty($this->datos['LibroCompraVenta']['EnvioLibro']['@attributes']['ID']) ? $this->datos['LibroCompraVenta']['EnvioLibro']['@attributes']['ID'] : false;
    }
92969
public function renderFilterForm()
    {
        if (!$this->_filter) {
            // Disabled
            return false;
        }

        foreach ($this->_columns as $columnData) {
            $column = new Column($columnData);
            if ($column->searchable()) {
                // At least one column is searchable - form should be generated
                return true;
            }
        }

        return false;
    }
717922
public function getRevProxy(): bool {
        $meta = $this->getMetadata();
        $value = $meta->getLiteral(RC::get('fedoraServiceRevProxyProp'))->getValue();
        return $value ?? false;
    }