sets
@param string $table
@param string $view
@param mixed $primaryKey string | array (in case of compound primary keys)
17022
public function setORMParameters($table, $view, $primaryKey)
    {
        $this->ORMParameters['table'] = $table;
        $this->ORMParameters['view'] = $view;
        $this->ORMParameters['primaryKey'] = is_array($primaryKey) ? $primaryKey : [$primaryKey];
    
    }
1180003
final public function setView(View $view) {
        $this->view = $view;
        $this->publicAssetsPath = ROOT . 'public' . DIRECTORY_SEPARATOR . '.assets' . DIRECTORY_SEPARATOR;
        return $this;
    }
360769
private function setKeyForTable($table, $key)
    {
        $this->validateTableName($table);
        $this->validateKeyName($key);
        $this->tableKeys[$table] = $key;
    }
1303481
public function setPrimaryKey($value)
    {
        $pk = static::primaryKey()[0];
        if ($this->getIsNewRecord() || $pk != '_id') {
            $this->$pk = $value;
        } else {
            throw new InvalidCallException('Changing the primaryKey of an already saved record is not allowed.');
        }
    }
348161
public function setTable($table)
    {
        if (is_array($table)) {
            if (!isset($table['name'])) {
                throw new \InvalidArgumentException('A name key is required when passing an array to setTable()');
            }
            $this->table = $table['name'];
        } else {
            $this->table = $table;
        }
    }
1239585
public function setPrimaryKey( $key )
	{
		if( in_array( $key, $this->fields ) )
		{
			$this->primaryKey = $key;
			return TRUE;
		}
		return FALSE;
	}
1360736
protected function setContent($view, $data = array(), $mergeData = array())
	{
		if ( ! is_null($view))
		{
			if (is_string($view))
			{
				$this->layout->content = View::make($view, $data, $mergeData);
			}
			else {
				$this->layout->content = $view;
			}
		}
	}
1223818
public function _cascadeDelete($parentTableClassname, array $primaryKey)
    {
        $this->_setupMetadata();
        $rowsAffected = 0;
        foreach ($this->_getReferenceMapNormalized() as $map) {
            if ($map[self::REF_TABLE_CLASS] == $parentTableClassname && isset($map[self::ON_DELETE])) {
                switch ($map[self::ON_DELETE]) {
                    case self::CASCADE:
                        $where = array();
                        for ($i = 0; $i < count($map[self::COLUMNS]); ++$i) {
                            $col = $this->_db->foldCase($map[self::COLUMNS][$i]);
                            $refCol = $this->_db->foldCase($map[self::REF_COLUMNS][$i]);
                            $type = $this->_metadata[$col]['DATA_TYPE'];
                            $where[] = $this->_db->quoteInto(
                                $this->_db->quoteIdentifier($col, true) . ' = ?',
                                $primaryKey[$refCol], $type);
                        }
                        $rowsAffected += $this->delete($where);
                        break;
                    default:
                        // no action
                        break;
                }
            }
        }
        return $rowsAffected;
    }
160870
public function composeWithModel(View $view)
    {
        $key = $this->getModelRouteKey();
        $model = $this->findModelByRouteKey($key);

        $view->with('model', $model);
    }
1350950
public function addView(View $view)
    {
        if ($this->hasView($view->getName())) {
            throw SchemaException::schemaViewAlreadyExists($this->getName(), $view->getName());
        }

        $this->views[$view->getName()] = $view;
    }
16748
public static function addView(string $view, array $data): void
    {
        if (self::$debugbar instanceof StandardDebugBar) {
            $collector = self::$debugbar->getCollector('views');

            if ($collector instanceof ViewCollector) {
                $collector->addView($view, $data);
            }
        }
    }
130471
public function setPrimaryKey(PrimaryKey $primaryKey)
    {
        foreach ($primaryKey->getColumnNames() as $columnName) {
            $this->getColumn($columnName)->setNotNull(true);
        }

        $this->primaryKey = $primaryKey;
    }
170098
public function setRecord(string $table, array $criteria = [], array $fields): void
    {
        $record = $this->findRecord($table, $criteria);

        Assertion::notNull($record, 'Record not found');

        /** @var Response $response */
        $response = $this->browser->put(
            $this->getEndpoint($table, $record->getId()),
            [
                'content-type' => 'application/json',
            ],
            json_encode([
                'fields' => $fields,
            ])
        );

        $this->guardResponse($table, $response);
    }
182757
public function setPrimaryKey($value)
    {
        if (!$this->primaryKey) {
            throw InvalidOperationException::methodCall(__METHOD__, 'Table does not have a primary key');
        }

        $this->columnData[$this->primaryKey] = $value;
    }
906605
public function view($view = null, $layout = null)
    {
        $layoutOptions = $this->getLayoutOptions($layout);

        // Set up the default view resolution
        viewResolver()->setUp($layoutOptions, $view);
        $this->setupLayout();
    }
1122325
public function setViewPath($view)
    {
        $this->layout->layout = $this->viewPath->setUp($this->layout->layout, $view);

        return $this;
    }
283869
public function set($primaryKey, $secondaryKey, $value)
    {
        if (!isset($this->values[$primaryKey])) {
            $this->values[$primaryKey] = array();
        }

        $this->values[$primaryKey][$secondaryKey] = $value;
    }