Scalr\Api\Service\User\V1beta0\Adapter\ServerAdapter::_status PHP Method

_status() protected method

protected _status ( $from, $to, $action )
    protected function _status($from, $to, $action)
    {
        switch ($action) {
            case static::ACT_CONVERT_TO_OBJECT:
                /* @var $from Server */
                $to->status = lcfirst(str_replace(' ', '_', $from->status));
                break;
            case static::ACT_CONVERT_TO_ENTITY:
                /* @var $to Server */
                $to->status = ucfirst(str_replace('_', ' ', $from->status));
                break;
            case static::ACT_GET_FILTER_CRITERIA:
                return [['status' => ucfirst(str_replace('_', ' ', $from->status))]];
        }
    }