Last active
December 11, 2015 02:48
-
-
Save TomHAnderson/4533098 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Db\Form\InputFilter; | |
trait Field | |
{ | |
abstract public function inputFilterInput(); | |
} | |
namespace Db\Field; | |
trait Username | |
{ | |
use \Db\Form\InputFilter\Field { inputFilterInput as inputFilterInputUsername; } | |
private function inputFilterInputUsername($inputFilter = null) { | |
if (!$inputFilter) $inputFilter = new InputFilter(); | |
return $inputFilter->getFactory()->createInput(array( | |
'name' => 'displayName', | |
'required' => true, | |
'validators' => array(), | |
)); | |
} | |
} | |
results in | |
Class Db\Entity\User contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Db\Entity\User::inputFilterInput) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment