Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

H #2

Closed
groyal opened this issue Aug 7, 2017 · 0 comments
Closed

H #2

groyal opened this issue Aug 7, 2017 · 0 comments

Comments

@groyal
Copy link

groyal commented Aug 7, 2017

This code snipnet shows a simple implementation.

  $leads = $dynamics->createRequest("GET", "/leads")
                  ->setReturnType(Model\Lead::class)
                  ->execute();

However I want to make setReturnType( {model} ) changeable at execution but I am having trouble finding the right way to do it.
so

$model_class = new Account(); ???????
$resource = /accounts?$select=name
$records = $dynamics-> $dynamics->createRequest("GET", $resource)
                      ->setReturnType( $model_class) 
                      -> execute();

Thanks

@groyal groyal closed this as completed Aug 9, 2017
@synergy6 synergy6 mentioned this issue Apr 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant