Giter Site home page Giter Site logo

filter's People

Contributors

bueltge avatar chrico avatar mvarugh avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

filter's Issues

Inherited `@uses` documentation

Each filter class's filter() method aims to inherit the docs from the AbstractFilter class's abstract filter() method.

However, not all of the filter classes use _doing_it_wrong() as the @uses suggests.

Replacing Exceptions with `_doing_it_wrong`

Since this package is designed to fit into a WordPress-envoirment, Exceptions could lead to broken sites (WordPress does not handle Exceptions by default).

Exception in set_options
Maybe we should change the behavior of set_options from throwing an InvalidArgumentException to a more "wordpressy"-way by using _doing_it_wrong() and not setting the given configuration to the $options-array.

Usage of _doing_it_wrong in Inpsyde\Filter\WordPress
The other point which has to be discussed is the _doing_it_wrong in Inpsyde\Filter\WordPress folder, when a incorrect $value-type is given. I think just returning the value and triggering a _doing_it_wrong seems to be ok, since WordPress does nothing (no error message, just continue with something similar or even break) against wrong values.

[Question] What is the idea behind mutable filter objects?

Just this question to get the idea behind this approach. The mutable state means that a filter object can return different values for the same argument during its life cycle. Further any user of the filter would be able to change the behavior of the filter. Is that desired?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.