1. Go to this page and download the library: Download eloquent/constance library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
eloquent / constance example snippets
use Eloquent\Constance\AbstractClassConstant;
final class PdoAttribute extends AbstractClassConstant
{
/**
* The class to inspect for constants.
*/
const CONSTANCE_CLASS = 'PDO';
/**
* The expression used to match constant names that should be
class MyConnection
{
public function setAttribute(PdoAttribute $attribute, $value)
{
// ...
}
}
$connection = new MyConnection;
$connection->setAttribute(PdoAttribute::ATTR_AUTOCOMMIT(), true);
$connection->setAttribute(PdoAttribute::ATTR_PERSISTENT(), false);
use Eloquent\Constance\AbstractGlobalConstant;
final class ErrorLevel extends AbstractGlobalConstant
{
/**
* The expression used to match constant names that should be