@param array $table
@param \ArchitectureSniffer\PropelQuery\Schema\Transfer\PropelSchemaTableTransfer $transfer

@return \ArchitectureSniffer\PropelQuery\Schema\Transfer\PropelSchemaTableTransfer
775978
protected function addPhpName(array $table, PropelSchemaTableTransfer $transfer): PropelSchemaTableTransfer
    {
        if (isset($table['phpName'])) {
            $transfer->setPhpName($table['phpName']);
        }

        if ($transfer->getPhpName() === null) {
            $defaultPropelPhpName = str_replace('_', '', ucwords($transfer->getTableName(), '_'));
            $transfer->setPhpName($defaultPropelPhpName);
        }

        return $transfer;
    }
947587
public function from($table, array $columns = null)
    {
        $this->q['from']['table'] = $table;

        if (isset($columns)) {
            $this->q['from']['columns'] = $columns;
        }

        return $this;
    }
231500
public function copyToArray(array &$array)
    {
        $array['grantType']            = LanguageUtility::toString($this->grantType);
        $array['clientId']             = LanguageUtility::orZero($this->clientId);
        $array['subject']              = $this->subject;
        $array['scopes']               = $this->scopes;
        $array['accessTokenDuration']  = LanguageUtility::orZero($this->accessTokenDuration);
        $array['refreshTokenDuration'] = LanguageUtility::orZero($this->refreshTokenDuration);
        $array['properties']           = LanguageUtility::convertArrayOfArrayCopyableToArray($this->properties);
        $array['clientIdAliasUsed']    = $this->clientIdAliasUsed;
        $array['accessToken']          = $this->accessToken;
        $array['refreshToken']         = $this->refreshToken;
    }
943834
public function from($table, /*# string */ $alias = '')
    {
        $tbl = $this->fixTable($table, $alias);
        $this->tables = array_merge($this->tables, $tbl);
        return $this;
    }
648529
public function table($table, $alias = null)
    {
        if ($alias) {
            $table = [$alias => $table];
        } elseif (!is_array($table)) {
            $table = [$table];
        }

        $this->joins = [];
        foreach ($table as $alias => $name) {
            if ($name instanceof QueryInterface) {
                $expression = '(' . $name->getQuery() . ')';
            } else {
                $expression = $this->connection->quoteIdentifier($name);
            }
            if (is_string($alias)) {
                $this->tables[$alias] = $expression . ' ' . $alias;
            } else {
                $this->tables[$name] = $expression;
            }
        }

        return $this;
    }
1186936
public function transAlterField($table, $field, $schema)
    {
        $this->transInitTable($table);
        $this->schemaUpdateTransaction[$table]['alteredFields'][$field] = $schema;
    }
53665
public function request(
        OrderTransfer $orderTransfer,
        ComputopApiHeaderPaymentTransfer $computopApiHeaderPayment
    ): TransferInterface {
        $requestData = $this
            ->getMethodMapper($this->getPaymentMethodFromOrder($orderTransfer))
            ->buildRequest($orderTransfer, $computopApiHeaderPayment);

        return $this->sendRequest($requestData);
    }
627088
public function getQueryData($table, array $data)
    {
        $columns = $this->getSchemaManager()->listTableColumns($table);

        $allColumnTypes = $this->getColumnTypes($table);
        $columnTypes = [];
        foreach ($columns as $column) {
            $columnName = $column->getName();
            if (\array_key_exists($columnName, $data)) {
                $columnTypes[$this->connection->quoteIdentifier($columnName)] = $allColumnTypes[$columnName];
            }
        }

        $quotedData = [];
        foreach ($data as $column => $value) {
            $quotedColumn = $this->connection->quoteIdentifier($column);
            if (\array_key_exists($quotedColumn, $columnTypes)) {
                $quotedData[$quotedColumn] = $value;
            }
        }

        \ksort($quotedData);
        \ksort($columnTypes);

        return new QueryData(
            $this->connection->quoteIdentifier($table),
            $quotedData,
            \array_values($columnTypes)
        );
    }
960057
public function request(
        QuoteTransfer $quoteTransfer,
        ComputopApiHeaderPaymentTransfer $computopApiHeaderPayment
    ): TransferInterface {
        $requestData = $this
            ->mapper
            ->buildRequest($quoteTransfer, $computopApiHeaderPayment);

        return $this->sendRequest($requestData);
    }
885228
public function filter(Table $table)
    {
        $this->andOps = [];

        $columns = $table->getColumns();
        foreach ($table->getFilters() as $column => $filters) {
            foreach ($filters as $name => $value) {
                $this->buildFilter($columns[$column]['field_name'], $columns[$column]['type'], $name, $value);
            }
        }

        if (count($this->andOps) == 0)
            return;

        $qb = $this->getQueryBuilder();
        foreach ($this->andOps as $field => $orOps) {
            $expr = $qb->expr();
            foreach ($orOps as $op) {
                $operator = $op['operator'];
                if ($operator == 'range') {
                    $value1 = $op['value1'];
                    $value2 = $op['value2'];
                    if (strlen($value1) && strlen($value2)) {
                        $expr->addOr(
                            $qb->expr()->field($field)->range(
                                $value1 instanceof MongoDate ? $value1 : (int)$value1,
                                $value2 instanceof MongoDate ? $value2 : (int)$value2
                            )
                        );
                        $expr->addOr(
                            $qb->expr()->field($field)->equals(
                                $value2 instanceof MongoDate ? $value2 : (int)$value2
                            )
                        );
                    } else if (strlen($value1)) {
                        $expr->addOr(
                            $qb->expr()->field($field)->gte(
                                $value1 instanceof MongoDate ? $value1 : (int)$value1
                            )
                        );
                    } else if (strlen($value2)) {
                        $expr->addOr(
                            $qb->expr()->field($field)->lte(
                                $value2 instanceof MongoDate ? $value2 : (int)$value2
                            )
                        );
                    }
                } else {
                    $value = $op['value'];
                    $expr->addOr(
                        $qb->expr()->field($field)->$operator($value)
                    );
                }
            }
            $qb->addAnd($expr);
        }
    }
260740
public function dropPrimaryKey($table)
    {
        $table = $this->prefixTable($table);

        return $this->container->make('Piwik\Updater\Migration\Db\DropPrimaryKey', array(
            'table' => $table
        ));
    }
1079316
public function createTransfers(array $options)
    {
        $pay = new Transfers($this->config->get());
        return $pay->create($options);
    }
602882
public function transferCredit(Transfer $transfer)
    {
        $transfer->setRequiredFields(array(
            'amount',
            'linkedAccount',
            'merchantRefNum',
        ));
        $transfer->setOptionalFields(array(
            'detail',
            'dupCheck',
        ));

        $request = new Request(array(
               'method' => Request::POST,
               'uri' => $this->prepareURI($this->creditPath),
               'body' => $transfer
           ));

        $response = $this->client->processRequest($request);

        return new Transfer($response);
    }
486595
public static function getTableBelongsToFields(Table $table): array
    {
        $fields = [];
        $belongsToModels = Configure::read('RolesCapabilities.accessCheck.belongsToModels');

        foreach ($table->associations() as $association) {
            // skip non-assignation models
            if (!in_array($association->className(), $belongsToModels)) {
                continue;
            }

            $fields[] = $association->foreignKey();
        }

        return $fields;
    }
615422
public function from($table = null): Select
    {
        $this->from = [];
        if (!\is_string($table) && !\is_array($table)) {
            throw new InvalidArgumentException('$table has to be an array or a string');
        }
        $this->from = $this->namesClass->parse($table, true);

        return $this;
    }
112289
public function selectFromTable($table, $fields)
    {
        $fieldExpressions = array_map(function ($item) use ($table) {
            return Convert::symbol2sql("{$table}.{$item}");
        }, $fields);

        $this->query->setSelect($fieldExpressions);

        return $this;
    }
1249301
public function table($table = null, $alias = null)
    {
        $query = new Table($this); return $query->table($table, $alias);
    }