Baum\SetMapper::firstOrNew PHP Method

firstOrNew() protected method

protected firstOrNew ( $attributes )
    protected function firstOrNew($attributes)
    {
        $className = get_class($this->node);
        if (count($attributes) === 0) {
            return new $className();
        }
        return forward_static_call([$className, 'firstOrNew'], $attributes);
    }