<?php include_once 'includes/globalConfig.php'; Dune::setDatabaseCredentials($twlProjectCredentials); function isfloat($f) { return $f == (string) (double) $f; } print isfloat(false) . '<br>'; print isfloat(true) . '<br>'; print isfloat("") . '<br>'; print isfloat("abc") . '<br>'; print isfloat(2) . '<br>'; print isfloat("2") . '<br>'; print isfloat(2.3) . '<br>'; print isfloat("2.3") . '<br>';
/** * Saves the site dunes to the database. * * @throws InvalidOperationException If the database credentials have not been set. */ public final function saveSiteDunes() { if (is_null(self::$databaseCredentials)) { throw new InvalidOperationException('Database credentials must be set at the class level to allow this action to take place.'); } Dune::setDatabaseCredentials(self::$databaseCredentials); foreach ($this->dunes as $dune) { $dune->save(); } }