Skip to content

Instantly share code, notes, and snippets.

@Mulkave
Created June 8, 2016 20:30
Show Gist options
  • Save Mulkave/12ae8ab3e0113ca6013889c35b44fe62 to your computer and use it in GitHub Desktop.
Save Mulkave/12ae8ab3e0113ca6013889c35b44fe62 to your computer and use it in GitHub Desktop.
<?php
namespace Directory\Foundation;
class Value
{
protected $value;
public function __construct($value)
{
$this->setValue($value);
}
public function validation(array $input, array $rules)
{
return app(‘Directory\Foundation\Validation’)
->make($input, $rules);
}
public function setValue($value)
{
$this->value = $value;
}
public function getValue()
{
return $this->value;
}
public function __toString()
{
return sprintf(‘%s’, $this->value);
}
public function __set($name, $value)
{
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment