for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/* Divine CMS - Open source CMS for widespread use.
Copyright (c) 2019 Mykola Burakov ([email protected])
See SOURCE.txt for other and additional information.
This file is part of Divine CMS.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
class ModelLocalisationCountry extends \Divine\Engine\Core\Model
You can fix this by adding a namespace to your class:
namespace YourVendor; class YourClass { }
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.
{
public function getCountry($country_id)
$query = $this->db->query("
SELECT *
FROM country
WHERE country_id = '" . (int)$country_id . "'
AND status = '1'
");
return $query->row;
}
public function getCountries()
$country_data = $this->cache->get('country.catalog');
if (!$country_data) {
WHERE status = '1'
ORDER BY name ASC
$country_data = $query->rows;
$this->cache->set(
'country.catalog',
$country_data
);
return $country_data;
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.