Skip to content

Commit

Permalink
Remove docs "_i_" NS workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed Jul 16, 2023
1 parent e56327d commit 130980b
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 29 deletions.
2 changes: 1 addition & 1 deletion docs/aggregates.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

# Model Aggregates

:::{php:class} Model_i_AggregateModel
:::{php:class} Model\AggregateModel
:::

In order to create model aggregates the AggregateModel model needs to be used:
Expand Down
4 changes: 2 additions & 2 deletions docs/conditions.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ This method provides access to the model scope enabling conditions to be added:
$contact->scope()->addCondition($condition); // adding condition to a model
```

:::{php:class} Model_i_Scope
:::{php:class} Model\Scope
:::

Scope object has a single defined junction (AND or OR) and can contain multiple nested Condition and/or Scope objects referred to as nested conditions.
Expand Down Expand Up @@ -370,7 +370,7 @@ Checks if scope components are joined by OR

Checks if scope components are joined by AND

:::{php:class} Model_i_Scope_i_Condition
:::{php:class} Model\Scope\Condition
:::

Condition represents a simple condition in a form [field, operation, value], similar to the functionality of the
Expand Down
2 changes: 1 addition & 1 deletion docs/fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ $model->set('age', null); // exception
:::

Modifying field that is read-only through set() methods (or array access) will
result in exception. {php:class}`Field_i_SqlExpressionField` is read-only by default.
result in exception. {php:class}`Field\SqlExpressionField` is read-only by default.

:::{php:attr} actual
:::
Expand Down
4 changes: 2 additions & 2 deletions docs/joins.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

# Model from multiple joined tables

:::{php:class} Model_i_Join
:::{php:class} Model\Join
:::

Sometimes model logically contains information that is stored in various places
Expand Down Expand Up @@ -219,7 +219,7 @@ Joins are implemented like this:
are using reverse join, then foreign table record will not be updated, but
value of the foreign field will be set to null.

:::{php:class} Persistence_i_Sql_i_Join
:::{php:class} Persistence\Sql\Join
:::

## SQL-specific joins
Expand Down
4 changes: 2 additions & 2 deletions docs/model.md
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ passwords to be generated and sent to the users:
Crud::addTo($app)->setModel(new User($app->db));
```

Read more about {php:class}`Model_i_UserAction`
Read more about {php:class}`Model\UserAction`

### Hooks

Expand Down Expand Up @@ -487,7 +487,7 @@ $m = $m->load(1);
echo $m->get('name'); // peter
```

See {php:class}`Persistence_i_Static_`
See {php:class}`Persistence\Static_`

:::{php:attr} persistence
:::
Expand Down
2 changes: 1 addition & 1 deletion docs/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ echo $table->render();
Class `\Atk4\Ui\Table` here is designed to work with persistencies and models -
it will populate columns of correct type, fetch data, calculate totals if needed.
But what if you have your data inside an array?
You can use {php:class}`Persistence_i_Static_` for that:
You can use {php:class}`Persistence\Static_` for that:

```
$table = \Atk4\Ui\Table::addTo($app);
Expand Down
2 changes: 1 addition & 1 deletion docs/persistence/csv.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

# Loading and Saving CSV Files

:::{php:class} Persistence_i_Csv
:::{php:class} Persistence\Csv
:::

Agile Data can operate with CSV files for data loading, or saving. The capabilities
Expand Down
4 changes: 2 additions & 2 deletions docs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -512,8 +512,8 @@ $cc->get();
### Implementation of References

When reference is added using {php:meth}`Model::hasOne()` or {php:meth}`Model::hasMany()`,
the new object is created and added into Model of class {php:class}`Reference_i_HasMany`
or {php:class}`Reference_i_HasOne` (or {php:class}`Reference_i_HasOneSql` in case you
the new object is created and added into Model of class {php:class}`Reference\HasMany`
or {php:class}`Reference\HasOne` (or {php:class}`Reference\HasOneSql` in case you
use SQL database). The object itself is quite simple and you can fetch it from
the model if you keep the return value of hasOne() / hasMany() or call
{php:meth}`Model::getReference()` with the same identifier later on.
Expand Down
2 changes: 1 addition & 1 deletion docs/references.md
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ hook, which will update address_id field of the $m.

References are implemented through several classes:

:::{php:class} Reference_i_HasOne
:::{php:class} Reference\HasOne
Defines generic reference, that is typically created by {php:meth}`Model::addReference`
:::

Expand Down
26 changes: 13 additions & 13 deletions docs/sql.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,28 @@

# SQL Extensions

Databases that support SQL language can use {php:class}`Persistence_i_Sql`.
Databases that support SQL language can use {php:class}`Persistence\Sql`.
This driver will format queries to the database using SQL language.

In addition to normal operations you can extend and customize various queries.

## Default Model Classes

When using {php:class}`Persistence_i_Sql` model building will use different classes for fields,
When using {php:class}`Persistence\Sql` model building will use different classes for fields,
expressions, joins etc:

- addField - different class is no longer used/needed
- hasOne - {php:class}`Reference_i_HasOneSql` (allow importing fields)
- addExpression - {php:class}`Field_i_SqlExpressionField` (define expression through DSQL)
- join - {php:class}`Persistence_i_Sql_i_Join` (join tables query-time)
- hasOne - {php:class}`Reference\HasOneSql` (allow importing fields)
- addExpression - {php:class}`Field\SqlExpressionField` (define expression through DSQL)
- join - {php:class}`Persistence\Sql\Join` (join tables query-time)

### SQL Field

:::{php:class} Field
:::

:::{php:attr} actual
{php:class}`Persistence_i_Sql` supports field name mapping. Your field could
{php:class}`Persistence\Sql` supports field name mapping. Your field could
have different column name in your schema:

```
Expand All @@ -49,8 +49,8 @@ $q = $connection->expr('[age] + [birth_year]', [

### SQL Reference

:::{php:class} Reference_i_HasOneSql
Extends {php:class}`Reference_i_HasOne`
:::{php:class} Reference\HasOneSql
Extends {php:class}`Reference\HasOne`
:::

:::{php:method} addField
Expand Down Expand Up @@ -114,7 +114,7 @@ Returns $this.
:::

:::{php:method} ref
While similar to {php:meth}`Reference_i_HasOne::ref` this implementation
While similar to {php:meth}`Reference\HasOne::ref` this implementation
implements deep traversal:

```
Expand Down Expand Up @@ -152,7 +152,7 @@ Returns new field object.

### Expressions

:::{php:class} Field_i_SqlExpressionField
:::{php:class} Field\SqlExpressionField
Extends {php:class}`Field`
:::

Expand Down Expand Up @@ -180,7 +180,7 @@ as default behavior, see {php:attr}`Model::reloadAfterSave`.

## Transactions

:::{php:class} Persistence_i_Sql
:::{php:class} Persistence\Sql
:::

:::{php:method} atomic
Expand Down Expand Up @@ -234,7 +234,7 @@ $q = $connection->expr('[age] + [birth_year]', [
$q = $m->expr('[age] + [birth_year']);
```

This method is automatically used by {php:class}`Field_i_SqlExpressionField`.
This method is automatically used by {php:class}`Field\SqlExpressionField`.

## Actions

Expand Down Expand Up @@ -462,7 +462,7 @@ where once again, stored function is hidden.
Not all SQL vendors may support this approach.
:::

Method {php:meth}`Persistence_i_Sql::action` and {php:meth}`Model::action`
Method {php:meth}`Persistence\Sql::action` and {php:meth}`Model::action`
generates queries for most of model operations. By re-defining this method,
you can significantly affect the query building of an SQL model:

Expand Down
6 changes: 3 additions & 3 deletions docs/static.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

# Static Persistence

:::{php:class} Persistence_i_Static_
:::{php:class} Persistence\Static_
:::

Static Persistence extends {php:class}`Persistence_i_Array_` to implement
Static Persistence extends {php:class}`Persistence\Array_` to implement
a user-friendly way of specifying data through an array.

## Usage
Expand Down Expand Up @@ -44,7 +44,7 @@ Alternative it will check key "title".

If neither are present you can still manually specify title field for your model.

Finally, static persistence (unlike {php:class}`Persistence_i_Array_`) will automatically
Finally, static persistence (unlike {php:class}`Persistence\Array_`) will automatically
populate fields for the model and will even attempt to deduce field types.

Currently it recognizes integer, date, boolean, float, array and object types.
Expand Down

0 comments on commit 130980b

Please sign in to comment.