Maurits van der Schee
1b3ff0de4a
Update client.php
2017-03-17 09:48:17 +01:00
Maurits van der Schee
c5627c4260
add example for #211
2017-03-17 09:45:00 +01:00
Maurits van der Schee
a522bccb98
fix soft delete documentation
2017-03-17 03:05:35 +01:00
Maurits van der Schee
07e5ce5e1f
fix soft delete
2017-03-17 03:01:35 +01:00
Maurits van der Schee
c240c4fdcd
bugfix
2017-03-17 02:14:33 +01:00
Maurits van der Schee
75febbe3a5
some adjustments
2017-03-17 01:45:33 +01:00
Maurits van der Schee
c3fd4564bf
Merge pull request #208 from appcrew/hotfix/1.0.8_swagger
...
Swagger: Output swagger description
2017-03-17 01:45:08 +01:00
Maurits van der Schee
ebb8fecc0e
Fix for #208
2017-03-17 01:43:54 +01:00
Maurits van der Schee
919e820ba0
Some fixes
2017-03-17 01:29:52 +01:00
Maurits van der Schee
2b515bd9b5
Merge branch 'VyseExhale-patch-1'
2017-03-16 18:14:21 +01:00
Barry Dam
68a4043965
call before multiple times
...
[refererring to](https://github.com/mevdschee/php-crud-api/pull/210 )
2017-03-16 13:16:07 +01:00
Barry Dam
1d105ad435
Bug in beforehandler, on deleting multiple rows
...
Hi there,
We're allmost there, I found 2 bug, one I solved by this pull request:
The first one: when deleting multiple rows at once and applying my soft delete [see example 209](https://github.com/mevdschee/php-crud-api/issues/209 ) I got an 404 errror : Subject cuased by the [updateObject method](https://github.com/mevdschee/php-crud-api/blob/master/api.php#L1533-L1535 )
The other you will find here [209](https://github.com/mevdschee/php-crud-api/issues/209 ), this needs to be discussed first.
2017-03-16 09:35:51 +01:00
mevdschee
753c0c05bb
bugfix
2017-03-16 09:33:24 +01:00
Benedikt Dahm
aada5cab0a
Swagger: Output swagger description when api.php (__FILE__) is requested and no path requested entitiy is given
2017-03-15 23:26:13 +01:00
Maurits van der Schee
71116bc8e5
12.04 compatability fix
2017-03-15 22:57:50 +01:00
Maurits van der Schee
33d82a6a08
12.04 compatability fix
2017-03-15 22:55:53 +01:00
Maurits van der Schee
c05cb8d130
cleanup construct
2017-03-15 22:32:28 +01:00
Maurits van der Schee
b91bd3177a
cleanup construct
2017-03-15 19:17:31 +01:00
mevdschee
444b530f38
update docs
2017-03-15 17:45:39 +01:00
mevdschee
c298faa57a
update docs
2017-03-15 17:43:31 +01:00
mevdschee
fec8b5ccef
fix #207
2017-03-15 17:37:39 +01:00
Maurits van der Schee
f7d0dbb4e8
Merge pull request #207 from VyseExhale/patch-1
...
Possible fix for issue 206
2017-03-15 17:36:25 +01:00
Maurits van der Schee
c6d79bbdf3
Merge branch 'master' into patch-1
2017-03-15 17:36:15 +01:00
mevdschee
9039cb66a9
Added example from #207
2017-03-15 17:31:15 +01:00
mevdschee
b11f5966e6
Fix for #130
2017-03-15 17:26:59 +01:00
Barry Dam
70922c6ec2
Possible fix for issue 206
...
Possible fix for [issue 206](https://github.com/mevdschee/php-crud-api/issues/206 )
soft delete example
```php
'before'=>function(&$cmd, &$db, &$tab, &$id, &$in) {
if ($cmd == 'delete') {
$cmd = 'update'; // change command to update
foreach($in as $k => $o) {
$in[$k]->deleted = date('Y-m-d H:i:s', time());
}
}
},
'column_authorizer'=>function($cmd, $db ,$tab, $col) {
return ( ! in_array($col, array('deleted')));
},
'record_filter'=>function($cmd,$db,$tab) {
return array('deleted,is,null');
}
```
2017-03-15 15:35:27 +01:00
mevdschee
0da7a623fa
bugfix DST
2017-03-13 20:33:00 +01:00
Maurits van der Schee
ea0166bb00
bugfix
2017-03-12 23:06:12 +01:00
Maurits van der Schee
b59e18163a
Merge branch 'master' of github.com:mevdschee/php-crud-api
2017-03-12 23:04:43 +01:00
Maurits van der Schee
67ac9da434
Use only second precision on dates in tests
2017-03-12 23:04:08 +01:00
Maurits van der Schee
65f052a21a
Update README.md
2017-03-12 15:12:22 +01:00
Maurits van der Schee
f5a2c56e23
Update README.md
2017-03-12 15:04:42 +01:00
Maurits van der Schee
e05752c63f
Adjust before handler to facilitate #130
2017-03-12 14:19:39 +01:00
Maurits van der Schee
272f5759f4
Adjust before handler to facilitate #130
2017-03-12 14:17:57 +01:00
Maurits van der Schee
7d3968ce50
bugfix
2017-03-12 10:35:30 +01:00
Maurits van der Schee
6710c042f9
Before handler to facilitate #151
2017-03-12 10:30:38 +01:00
Maurits van der Schee
4cf339c9ea
Before handler to facilitate #151
2017-03-12 09:56:27 +01:00
Maurits van der Schee
7ff9ff9d30
Allow error logging
2017-03-11 09:04:08 +01:00
Maurits van der Schee
1a41e008e7
whitespace
2017-03-11 01:46:37 +01:00
Maurits van der Schee
f4bb543d47
Improve documentation
2017-03-11 01:24:12 +01:00
Maurits van der Schee
bc31c2ba67
As discussed in #200
2017-03-11 00:22:59 +01:00
Maurits van der Schee
4e27405863
As discussed in #200
2017-03-10 23:09:25 +01:00
Maurits van der Schee
ee34a99942
As discussed in #200
2017-03-10 23:00:07 +01:00
Maurits van der Schee
d50eac6813
Merge pull request #200 from VyseExhale/patch-1
...
after_create
2017-03-10 22:40:29 +01:00
Maurits van der Schee
37f2e0d6a1
Merge pull request #201 from jr3cermak/master
...
A little bugfix.
2017-03-10 20:44:06 +01:00
Rob Cermak
cefe7b44e9
Fix for schema object. If no fields are required, do not add required tag. Fix to tests (Token->TOKEN).
2017-03-10 18:47:30 +00:00
Barry Dam
b712ebc8d7
after_create
...
Hi Maurits,
I needed a callback function that got triggered on a new db entry (Create).
For example I wanted to send an e-mail to a newly registered member.
In this example I have a "members" table with the columns: id , firstName, lastName, email
the yourEmailFunction method will send a welcome message to the newly entered member.
```php
$api = new PHP_CRUD_API(array(
'after_create'=>function($db,$tab,$row) {
if ($tab == 'members')
yourEmailFunction($row['firstName'],$row['lastName'],$row['email']);
}
}
));
$api->executeCommand();
```
Tell me you thoughts... maybe if you like it and willing to accept the pull request I can also create an after_delete and after_update method.
2017-03-09 15:14:08 +01:00
Maurits van der Schee
88b7bdb41a
bugfix
2017-03-07 04:17:15 +01:00
Maurits van der Schee
fc12285ad9
Added response interceptor to transform 'x-xsrf-token' header into 'XSRF-TOKEN' cookie for cross-domain requests
2017-03-07 02:54:04 +01:00
Maurits van der Schee
a20a82cefd
Improve bash authentication example
2017-03-05 10:25:52 +01:00