backbone87/contao-dao — pull request #1 by kryptychon (2014-02-27 10:03:42+00:00)
Title: Added a DAOProxy which may be used to restrict access to DAO very granular

Hi Oliver,

I implemented a Proxy for your DAO to rectrict access to methods and fields.
Examplary usage:

```php
123));
$dao->update();

// create DAOProxy
$proxy = \bbit\contao\util\dao\DAOProxy::create($dao);

// allow method access
$proxy->addAllowedMethod('set')
->addAllowedMethod('save');

// allow field access
$proxy->addAllowedField('firstname')
->addAllowedField('lastname');

// lock DAOProxy, so no further changes to allowed methods and fields can be made
$proxy->lock();

// only the allowed methods are accessible
$proxy->set('firstname','Max');
$proxy->set('lastname','Mustermann');
$proxy->save();

// will throw MethodAccessDeniedException because get-method is not allowed to be used
echo $proxy->get('firstname');
```