Kronolith_Resource_Base::getResponse PHP Метод

getResponse() публичный Метод

Check availability and return an appropriate Kronolith response code.
public getResponse ( Kronolith_Event $event ) : integer
$event Kronolith_Event The event to check on
Результат integer Kronolith::RESPONSE* constant
    public function getResponse(Kronolith_Event $event)
    {
        switch ($this->getResponseType()) {
            case Kronolith_Resource::RESPONSETYPE_ALWAYS_ACCEPT:
                return Kronolith::RESPONSE_ACCEPTED;
            case Kronolith_Resource::RESPONSETYPE_AUTO:
                if ($this->isFree($event)) {
                    return Kronolith::RESPONSE_ACCEPTED;
                } else {
                    return Kronolith::RESPONSE_DECLINED;
                }
            case Kronolith_Resource::RESPONSETYPE_ALWAYS_DECLINE:
                return Kronolith::RESPONSE_DECLINED;
            case Kronolith_Resource::RESPONSETYPE_NONE:
            case Kronolith_Resource::RESPONSETYPE_MANUAL:
                return Kronolith::RESPONSE_NONE;
        }
    }