You can't mix and match static and instance like this. Your real problem comes in how you're calling exists:
public static function sign($alias, $password) {
if(!self::exists($alias)) {
self::signup($alias, $password);
} else {
self::signin($alias, $password);
}
}
Unless you really need a static method here, you should probably create an object and call sign()
as an instance method of that object.
You could also use sign()
as a factory, but as in any programming, there are several ways to $cat->skin().
public static function sign($alias, $password) {
$retVal = new Sign();
if(!$retVal->exists($alias)) {
$retVal->signup($alias, $password);
} else {
$retVal->signin($alias, $password);
}
return $retVal;
}