IMP_Compose_LinkedAttachment::__construct PHP Method

__construct() public method

Constructor.
public __construct ( string $user, string $id = null )
$user string Attachment owner.
$id string ID of the attachment.
    public function __construct($user, $id = null)
    {
        global $conf, $injector;
        /* Sanity checking - no gettext needed. */
        if (empty($conf['compose']['link_attachments'])) {
            throw new IMP_Exception('Linked attachments are forbidden.');
        }
        $this->_atc = $injector->getInstance('IMP_Factory_ComposeAtc')->create($user, $id);
        $this->_id = $id;
        $this->_user = $user;
    }