Jyxo\Input\Filter\ExplodeName::filterValue PHP Method

filterValue() protected method

Filters a value.
protected filterValue ( mixed $in ) : mixed
$in mixed Input value
return mixed
    protected function filterValue($in)
    {
        $data = explode(' ', $in);
        $lastname = array_pop($data);
        $firstname = implode(' ', $data);
        $in = ['firstname' => $firstname, 'lastname' => $lastname];
        return $in;
    }
ExplodeName