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

Project Config #45

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Project Config #45

wants to merge 1 commit into from

Conversation

mkusher
Copy link
Member

@mkusher mkusher commented May 19, 2016

Implementation of the #20

@mkusher mkusher added the WIP label May 19, 2016
) {
$self = new static($index, $rootFolder);
$self->config = $config;
return $self;
Copy link

@greg0ire greg0ire Jul 25, 2016

Choose a reason for hiding this comment

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

Why not have just one constructor, with the following signature : public function __construct(Index $index, $rootFolder = "", Config $config = null). If $config is null, it can be initialized to Config::default(), right?

Copy link
Member Author

Choose a reason for hiding this comment

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

it looks more elegant with named factories

Choose a reason for hiding this comment

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

I'm not familiar with them (apart from the very ancient time where I learnt C++ and there were several possible constructors), but I guess it's something that might indeed come in handy if you don't want to remember the order of the 1878739 constructor arguments…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants