PHP Class App\Services\Form\Server\ServerForm

Mostra file Open project: ngmy/webloyer Class Usage Examples

Protected Properties

Property Type Description
$server
$validator

Public Methods

Method Description
__construct ( App\Services\Validation\ValidableInterface $validator, App\Repositories\Server\ServerInterface $server ) : void Create a new form service instance.
errors ( ) : array Return validation errors.
save ( array $input ) : boolean Create a new server.
update ( array $input ) : boolean Update an existing server.

Protected Methods

Method Description
valid ( array $input ) : boolean Test whether form validator passes.

Method Details

__construct() public method

Create a new form service instance.
public __construct ( App\Services\Validation\ValidableInterface $validator, App\Repositories\Server\ServerInterface $server ) : void
$validator App\Services\Validation\ValidableInterface
$server App\Repositories\Server\ServerInterface
return void

errors() public method

Return validation errors.
public errors ( ) : array
return array

save() public method

Create a new server.
public save ( array $input ) : boolean
$input array Data to create a server
return boolean

update() public method

Update an existing server.
public update ( array $input ) : boolean
$input array Data to update a server
return boolean

valid() protected method

Test whether form validator passes.
protected valid ( array $input ) : boolean
$input array
return boolean

Property Details

$server protected_oe property

protected $server

$validator protected_oe property

protected $validator