<?php public function __construct() {
$args = func_get_args();
$argsStr = '';
foreach ($args as $arg) {
$argsStr .= '_' . gettype($arg);
}
if (method_exists($this, $constructor = '__construct' . $argsStr))
call_user_func_array(array($this, $constructor), $args);
else
throw new Exception('NO CONSTRUCTOR: ' . get_class() . $constructor, NULL, NULL);
}
public function __construct_integer($a) {}
public function __construct_string($a) {}
public function __construct_integer_string($a, $b) {}
public function __construct_string_integer($a, $b) {} ?>
User this regular expression : ^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.(?:[A-Z]{2}|com|org|net|edu|gov|mil|biz|info|mobi|name|aero|asia|jobs|museum)$
Comments
Post a Comment