-
Notifications
You must be signed in to change notification settings - Fork 12
Notes
geonef edited this page Mar 19, 2012
·
1 revision
Should errors be handled through PHP exceptions? If so, many methods can return the "real" result rather than status integer. It is quite practical, but different from GDAL/OGR model.
In GDAL/OGR, constants are "global", as preprocessor constants (#define). In PHP, the best practise would encourage these constants to belong to PHP classes, when it is logical. Again, this good practise would make the PHP API different from original GDAL/OGR's.
- We don't use OGRSFDriverRegistrar::OpenShared, to keep things simple. Hence, we don't use OGRDataSource::Release either. Same way as PosgreSQL PHP module. Explicit Open/Close. PHP app is responsible for it, and is trusted not to access layers/features/... belonging to a closed dataSource. DataSources are closed at the end of request anyway by the module.