public function __construct($opt = '') { global $xham; //instanciation de l'environnement gestActes::setEnvironnement(); $fileClassSuffixes = '.class.php'; //inclusion des définition des classes mères $motherDirectory = realpath(dirname(__FILE__) . '/base/'); include_once $motherDirectory . 'caObjetBase' . $fileClassSuffixes; include_once $motherDirectory . 'caObjetBasePeer' . $fileClassSuffixes; include_once $motherDirectory . 'caEnvironnement' . $fileClassSuffixes; //dans quel répertoire aller chercher les classes héritées ? $suffixDirectory = $xham->getOption('actes_site') ? upperCase($xham->getOption('actes_site')) : 'Default'; //inclusion des définition des classes filles $dautherDirectory = realpath(dirname(__FILE__) . "/ca{$suffixDirectory}/"); include_once $motherDirectory . 'toto' . $fileClassSuffixes; //appel du controleur $this->af = caController::executeAction($xham->getNavi(0), $xham->getNavi(1)); }
$string = trim($string, '"() '); return $string; } echo stripQuotesAndParenthesis('("In Transition 2.0")') . '<br/>'; // teisendab kõik tähed väiketähtedeks function lowerCase($string) { $string = mb_strtolower($string, 'UTF-8'); return $string; } echo lowerCase('("In Transition 2.0")') . '<br/>'; // teisendab kõik tähed suurtähtedeks function upperCase($string) { $string = mb_strtoupper($string, 'UTF-8'); return $string; } echo upperCase('("In Transition 2.0")') . '<br/>'; // arvu süntaksi muutmine function alterFloat($float) { $float = number_format($float, 1, ',', ' '); return $float; } echo alterFloat(2015.16); ?> </fieldset> </body> </html>
<?php global $addNumber; if (isset($_POST['addNumber'])) { $addNumber = addNumber(); } ?> <h2 class="phrase"><strong>Random Phrase Generated with a Number: </strong><i><?php echo $addNumber; ?> </i></h2> <?php global $upperCase; if (isset($_POST['upperCase'])) { $upperCase = upperCase(); } ?> <h2 class="phrase"><strong>Random Phrase Generted with an Upper Case: </strong><i><?php echo $upperCase; ?> </i></h2> </body> </html>
// Make a function that takes in a string and returns it capitalized. If the input is not a string, return false. // Make a function that takes in a string and returns it lowercased. If the input is not a string, return false. // Write a function called isVowel that takes in a single character and returns true if the character is a vowel, false if not. // Write a function called countVowels that takes in a string and returns the number of vowels in the string. function square($number) { $square = $number * $number; return $square; } echo square(7); // function upperCase($string) { if (!is_string($string)) { return false; } } return strtoupper($string); echo upperCase([]); echo upperCase("foo"); // function lowerCase($string) { if (!is_string($string)) { return false; } } return strtolower($string); echo lowerCase([]); echo lowerCase("FOO"); //