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

Added RobotLoader::excludeDirectory(), docs #9

Merged
merged 1 commit into from Jan 23, 2017
Merged

Conversation

@vlastavesely
Copy link
Contributor

vlastavesely commented Jan 19, 2017

FR #8

A $loader->disallow($path) function would be nice to have, and less awkward than creating a file to instruct the loader which paths to disallow.

I also think it is useful for it is more intuitive than using netterobots.txt. A few months ago I needed to do the same thing and because my only documentation was API reference at the time, I did not know about possibility to use netterobots.txt and I had to move that directory to an other place.

* @param string|string[] absolute path
* @return static
*/
public function excludeDirectory($path)

This comment has been minimized.

Copy link
@JanTvrdik

JanTvrdik Jan 19, 2017

Contributor

...$path

This comment has been minimized.

Copy link
@vlastavesely

vlastavesely Jan 19, 2017

Author Contributor

Yes, it could be. But if so, it should be done also in RobotLoader::addDirectory(). The functions are almost the same.

@dg

This comment has been minimized.

Copy link
Member

dg commented Jan 23, 2017

Thanks!

@dg dg merged commit eb4443d into nette:master Jan 23, 2017
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.5%) to 82.955%
Details
dg added a commit that referenced this pull request Jan 23, 2017
@dg dg mentioned this pull request Jan 23, 2017
dg added a commit that referenced this pull request Jan 23, 2017
dg added a commit that referenced this pull request Jan 23, 2017
dg added a commit that referenced this pull request Jan 23, 2017
dg added a commit that referenced this pull request Jan 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.