Created
August 11, 2012 04:36
-
-
Save ezzatron/3320962 to your computer and use it in GitHub Desktop.
Options for Typhoon validator design
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 Foo\Bar; | |
use Typhoon\Foo\Bar\BazTyphoon; | |
class Baz | |
{ | |
public function __construct() | |
{ | |
$this->typhoon = Typhoon::getValidator(__CLASS__, func_get_args()); | |
} | |
/** | |
* @param string $doom | |
* @param integer $splat | |
*/ | |
public function qux($doom, $splat = null) | |
{ | |
$this->typhoon->qux(func_get_args()); | |
} | |
public function pip() | |
{ | |
$this->typhoon->pip(func_get_args()); | |
} | |
private $typhoon; | |
} |
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 Foo\Bar; | |
use Typhoon\Foo\Bar\BazTyphoon; | |
class Baz | |
{ | |
public function __construct() | |
{ | |
Typhoon::validate(__METHOD__, func_get_args()); | |
} | |
/** | |
* @param string $doom | |
* @param integer $splat | |
*/ | |
public function qux($doom, $splat = null) | |
{ | |
Typhoon::validate(__METHOD__, func_get_args()); | |
} | |
public function pip() | |
{ | |
Typhoon::validate(__METHOD__, func_get_args()); | |
} | |
private $typhoon; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment