Created
July 21, 2017 17:11
-
-
Save niko-afv/608b18bd45687e1e8e77af627a434fa5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public function register() | |
| { | |
| $this->app->bind( | |
| 'App\Interfaces\ICore', | |
| 'App\Classes\PlutusCore' | |
| ); | |
| $this->app->bind( | |
| 'App\Interfaces\IMapper', | |
| 'App\Classes\AccountMapper' | |
| ); | |
| $this->app->bind( | |
| 'App\Interfaces\IProxy', | |
| 'App\Classes\ProxyConnector' | |
| ); | |
| $this->app->bind( | |
| 'App\Interfaces\IConnectorFrom', | |
| 'App\Services\SalesForceConnector' | |
| ); | |
| } | |
| //Controller | |
| class AccountController extends Controller | |
| { | |
| public function sync_test(ICore $plutus) | |
| { | |
| $plutus->sync(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
interface IAccountMapper implements IMapper{}
interface IBillsMapper implements IMapper{}
$this->app->bind(
'App\Interfaces\IAccountMapper',
'App\Classes\AccountMapper'
);
$this->app->bind(
'App\Interfaces\IBillsMapper',
'App\Classes\BillsMapper' --> si este objeto ya no sirviera y se tuviera que crear otro, tendria que implementar IBIllsMapper
);