<?php

/**
 * Class renders and handles manual activation - when user 
 * enters machine code generated by program and receives
 * activation code returned by Am_Softsale_Activator (your algo)
 * 
 * Your activator may extend this class and return it in 
 * getManualActivator method
 * @link Am_Softsale_Activator::getManualActivator
 */
class Am_Softsale_ManualActivator_Standard extends Am_Softsale_Base
{
    public function render(License $license, Am_Mvc_Request $request)
    {
        if ($request->isPost())
        {
            $id = $request->getFiltered('id');
            $out = "";
            $this->plugin->getActivator()->activateLicense($license, array('id' => $id), $out);
        }
        $v = Am_Di::getInstance()->view;
        $v->display('softsale/_manual-activate.phtml');
    }
}