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

#2 issue-2 add resolve class for interface #3

Merged
merged 2 commits into from
Sep 2, 2018
Merged

#2 issue-2 add resolve class for interface #3

merged 2 commits into from
Sep 2, 2018

Conversation

alexpts
Copy link
Contributor

@alexpts alexpts commented Aug 29, 2018

@nikolaposa nikolaposa self-requested a review September 1, 2018 16:08
Copy link
Owner

@nikolaposa nikolaposa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea with special __class__ key in options, but I think that making this library aware of options as an another special key feels awkward and is not necessary. I would rather keep things as simple as possible, just by introducing that one special argument, so that the class can be constructed this way:

$cascader->create(BufferHandler::class, [
    'handler' => [
        '__class__' => NativeMailHandler::class, //this one gets removed from options after you pick it up
        'to' => 'test@example.com',
        'subject' => 'Test',
        'from' => 'noreply@example.com',
        'level' => Logger::ALERT,
    ],
    'buffer_limit' => 5
]);

@alexpts
Copy link
Contributor Author

alexpts commented Sep 1, 2018

@nikolaposa, I will send commit for it.

@alexpts
Copy link
Contributor Author

alexpts commented Sep 2, 2018

I fixed the comments about flat format

@nikolaposa nikolaposa merged commit fd7d0ff into nikolaposa:master Sep 2, 2018
@nikolaposa nikolaposa added this to the 1.0.1 milestone Sep 2, 2018
@nikolaposa nikolaposa modified the milestones: 1.0.1, 1.1.0 Sep 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants