LaravelBook\Laravel4Powerpack\Str::pool PHP Method

pool() protected method

Get the character pool for a given type of random string.
protected pool ( string $type ) : string
$type string
return string
    protected function pool($type)
    {
        switch ($type) {
            case 'alpha':
                return 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
            case 'alnum':
                return '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
            default:
                throw new \Exception("Invalid random string type [{$type}].");
        }
    }