Themosis\Validation\ValidationBuilder::getAttributes PHP Method

getAttributes() protected method

Return the defined attributes.
protected getAttributes ( string $attributes ) : array
$attributes string The string of attributes.
return array
    protected function getAttributes($attributes)
    {
        // If comma, get a list of attributes
        if (0 < strpos($attributes, ',')) {
            $attributes = explode(',', $attributes);
            $attributes = array_map(function ($att) {
                return trim($att);
            }, $attributes);
        } else {
            // No comma, only one attribute
            $attributes = [trim($attributes)];
        }
        return $attributes;
    }