smindel /
silverstripe-gis
| 1 | <?php |
||||
| 2 | |||||
| 3 | namespace Smindel\GIS\ORM; |
||||
| 4 | |||||
| 5 | use SilverStripe\ORM\Connect\MySQLSchemaManager; |
||||
| 6 | use SilverStripe\ORM\DB; |
||||
| 7 | use Smindel\GIS\GIS; |
||||
| 8 | |||||
| 9 | class MySQLGISSchemaManager extends MySQLSchemaManager |
||||
| 10 | { |
||||
| 11 | use GISSchemaManager; |
||||
|
0 ignored issues
–
show
introduced
by
Loading history...
|
|||||
| 12 | |||||
| 13 | public function geography($values) |
||||
|
0 ignored issues
–
show
The parameter
$values is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. Loading history...
|
|||||
| 14 | { |
||||
| 15 | // ATTENTION: GEOGRAPHY IS NOT SUPPORTED BY MYSQL. THIS IS STRICTLY FOR COMPATIBILITY |
||||
| 16 | return 'geometry'; |
||||
| 17 | } |
||||
| 18 | |||||
| 19 | public function translateStGeometryTypeFilter($field, $value, $inclusive) |
||||
| 20 | { |
||||
| 21 | $null = $inclusive ? '' : ' OR ' . DB::get_conn()->nullCheckClause($field, true); |
||||
| 22 | $fragment = sprintf( |
||||
| 23 | '%sLOWER(ST_GeometryType(%s)) = ?%s', |
||||
| 24 | $inclusive ? '' : 'NOT ', |
||||
| 25 | $field, |
||||
| 26 | $null |
||||
| 27 | ); |
||||
| 28 | return [$fragment => strtolower($value)]; |
||||
| 29 | } |
||||
| 30 | } |
||||
| 31 |