Skip to content

Commit

Permalink
0.12.0 release!
Browse files Browse the repository at this point in the history
  • Loading branch information
philiplb committed Aug 22, 2017
1 parent 8c8dca5 commit a10e392
Show file tree
Hide file tree
Showing 118 changed files with 34,571 additions and 5 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
CRUDlex Changelog
=================

## 0.12.0
## 0.13.0
Released: Upcoming

## 0.12.0
Released: 2017-08-22
- Attention: Switched from the own abstraction "FileProcessorInterface" to the library Flysystem for file handling, API changes:
- All implementations of the FileProcessorInterface are gone now
- The class "MimeTypes" is gone now
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ CRUDlex is an easy to use, well documented and tested CRUD generator for Silex.

## Documentation

- [Documentation 0.12.0](http://philiplb.github.io/CRUDlex/docs/html/0.12.0/) (upcoming)
- [Documentation 0.13.0](http://philiplb.github.io/CRUDlex/docs/html/0.13.0/) (upcoming)
- [Documentation 0.12.0](http://philiplb.github.io/CRUDlex/docs/html/0.12.0/)
- [Documentation 0.11.0](http://philiplb.github.io/CRUDlex/docs/html/0.11.0/)
- [Documentation 0.10.0](http://philiplb.github.io/CRUDlex/docs/html/0.10.0/)
- [Documentation 0.9.10](http://philiplb.github.io/CRUDlex/docs/html/0.9.10/)
Expand All @@ -52,15 +53,15 @@ care about notes in the changelog when upgrading.

```json
"require": {
"philiplb/crudlex": "0.11.0"
"philiplb/crudlex": "0.12.0"
}
```

### Bleeding Edge

```json
"require": {
"philiplb/crudlex": "0.12.x-dev"
"philiplb/crudlex": "0.13.x-dev"
}
```

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "0.12.x-dev"
"dev-master": "0.13.x-dev"
}
}
}
4 changes: 4 additions & 0 deletions docs/html/0.13.0/.buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: e69166ad9716feb667fdb65a73e9a1a6
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file added docs/html/0.13.0/_images/01_List.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
232 changes: 232 additions & 0 deletions docs/html/0.13.0/_sources/api/AbstractData.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,232 @@
---------------------
CRUDlex\\AbstractData
---------------------

.. toctree::
:maxdepth: 1

MySQLData

.. php:namespace: CRUDlex

.. php:class:: AbstractData

The abstract class for reading and writing data.

.. php:const:: DELETION_SUCCESS

Return value on successful deletion.

.. php:const:: DELETION_FAILED_STILL_REFERENCED

Return value on failed deletion due to existing references.

.. php:const:: DELETION_FAILED_EVENT

Return value on failed deletion due to a failed before delete event.

.. php:attr:: definition

protected EntityDefinition

Holds the entity definition.

.. php:attr:: filesystem

protected FilesystemInterface

Holds the filesystem.

.. php:attr:: events

protected EntityEvents

Holds the events.

.. php:method:: doDelete(Entity $entity, $deleteCascade)

Performs the actual deletion.

:type $entity: Entity
:param $entity: the id of the entry to delete
:type $deleteCascade: boolean
:param $deleteCascade: whether to delete children and subchildren
:returns: integer true on successful deletion

.. php:method:: hydrate($row)

Creates an Entity from the raw data array with the field name
as keys and field values as values.

:type $row: array
:param $row: the array with the raw data
:returns: Entity the entity containing the array data then

.. php:method:: enrichEntityWithMetaData($id, Entity $entity)

Enriches an entity with metadata:
id, version, created_at, updated_at

:type $id: mixed
:param $id: the id of the entity to enrich
:type $entity: Entity
:param $entity: the entity to enrich

.. php:method:: getManyFields()

Gets the many-to-many fields.

:returns: array|\string[] the many-to-many fields

.. php:method:: getFormFields()

Gets all form fields including the many-to-many-ones.

:returns: array all form fields

.. php:method:: deleteChildren($id, $deleteCascade)

Performs the cascading children deletion.

:type $id: integer
:param $id: the current entities id
:type $deleteCascade: boolean
:param $deleteCascade: whether to delete children and sub children
:returns: integer returns one of: - AbstractData::DELETION_SUCCESS -> successful deletion - AbstractData::DELETION_FAILED_STILL_REFERENCED -> failed deletion due to existing references - AbstractData::DELETION_FAILED_EVENT -> failed deletion due to a failed before delete event

.. php:method:: getReferenceIds($entities, $field)

Gets an array of reference ids for the given entities.

:type $entities: array
:param $entities: the entities to extract the ids
:type $field: string
:param $field: the reference field
:returns: array the extracted ids

.. php:method:: doCreate(Entity $entity)

Performs the persistence of the given entity as new entry in the
datasource.

:type $entity: Entity
:param $entity: the entity to persist
:returns: boolean true on successful creation

.. php:method:: doUpdate(Entity $entity)

Performs the updates of an existing entry in the datasource having the
same id.

:type $entity: Entity
:param $entity: the entity with the new data
:returns: boolean true on successful update

.. php:method:: getEvents()

Gets the events instance.

:returns: EntityEvents the events instance

.. php:method:: get($id)

Gets the entity with the given id.

:type $id: string
:param $id: the id
:returns: Entity the entity belonging to the id or null if not existant

.. php:method:: listEntries($filter = [], $filterOperators = [], $skip = null, $amount = null, $sortField = null, $sortAscending = null)

Gets a list of entities fullfilling the given filter or all if no
selection was given.

:type $filter: array
:param $filter: the filter all resulting entities must fulfill, the keys as field names
:type $filterOperators: array
:param $filterOperators: the operators of the filter like "=" defining the full condition of the field
:type $skip: integer|null
:param $skip: if given and not null, it specifies the amount of rows to skip
:type $amount: integer|null
:param $amount: if given and not null, it specifies the maximum amount of rows to retrieve
:type $sortField: string|null
:param $sortField: if given and not null, it specifies the field to sort the entries
:type $sortAscending: boolean|null
:param $sortAscending: if given and not null, it specifies that the sort order is ascending, descending else
:returns: Entity[] the entities fulfilling the filter or all if no filter was given

.. php:method:: create(Entity $entity)

Persists the given entity as new entry in the datasource.

:type $entity: Entity
:param $entity: the entity to persist
:returns: boolean true on successful creation

.. php:method:: update(Entity $entity)

Updates an existing entry in the datasource having the same id.

:type $entity: Entity
:param $entity: the entity with the new data
:returns: boolean true on successful update

.. php:method:: delete($entity)

Deletes an entry from the datasource.

:type $entity: Entity
:param $entity: the entity to delete
:returns: integer returns one of: - AbstractData::DELETION_SUCCESS -> successful deletion - AbstractData::DELETION_FAILED_STILL_REFERENCED -> failed deletion due to existing references - AbstractData::DELETION_FAILED_EVENT -> failed deletion due to a failed before delete event

.. php:method:: getIdToNameMap($entity, $nameField)

Gets ids and names of a table. Used for building up the dropdown box of
reference type fields for example.

:type $entity: string
:param $entity: the entity
:type $nameField: string
:param $nameField: the field defining the name of the rows
:returns: array an array with the ids as key and the names as values

.. php:method:: countBy($table, $params, $paramsOperators, $excludeDeleted)

Retrieves the amount of entities in the datasource fulfilling the given
parameters.

:type $table: string
:param $table: the table to count in
:type $params: array
:param $params: an array with the field names as keys and field values as values
:type $paramsOperators: array
:param $paramsOperators: the operators of the parameters like "=" defining the full condition of the field
:type $excludeDeleted: boolean
:param $excludeDeleted: false, if soft deleted entries in the datasource should be counted, too
:returns: integer the count fulfilling the given parameters

.. php:method:: hasManySet($field, $thatIds, $excludeId = null)

Checks whether a given set of ids is assigned to any entity exactly
like it is given (no subset, no superset).

:type $field: string
:param $field: the many field
:type $thatIds: array
:param $thatIds: the id set to check
:type $excludeId: string|null
:param $excludeId: one optional own id to exclude from the check
:returns: boolean true if the set of ids exists for an entity

.. php:method:: getDefinition()

Gets the EntityDefinition instance.

:returns: EntityDefinition the definition instance

.. php:method:: createEmpty()

Creates a new, empty entity instance having all fields prefilled with
null or the defined value in case of fixed fields.

:returns: Entity the newly created entity
Loading

0 comments on commit a10e392

Please sign in to comment.