A new holiday provider instance can be created using this function. You can use one of the providers included
already with Yasumi, or your own provider by giving the name of your class in the first parameter. Your provider
class needs to implement the 'ProviderInterface' class.
public static create ( string $class, integer $year = null, string $locale = self::DEFAULT_LOCALE ) : |
||
$class | string | holiday provider name |
$year | integer | year for which the country provider needs to be created. Year needs to be a valid integer between 1000 and 9999. |
$locale | string | The locale to use. If empty we'll use the default locale (en_US) |
return | An instance of class $class is created and returned |