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

Feature/types filter add operator #27

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Zerogiven
Copy link

No description provided.

@Zerogiven
Copy link
Author

If you merge this branch with #26 into master you have to resolve the conflict like this:

			/**
			 * Apply our type-level filters (if applicable)
			 **/
			if (isset($type['Filters'])){
				foreach ($type['Filters'] as $key => $value){
                    if (is_array($value) && array_key_exists('Operator', $value) && array_key_exists('Value', $value)) {
                        $where.= ' AND ('.$key.$value['Operator'].$value['Value'].')';
                        continue;
                    }
					if (is_array($value) === true) {
						$where.= ' AND ('.$key.' IN ('.implode(',', $value).'))';
						continue;
					}
					$where.= ' AND ('.$key.' = '.$value.')';
				}
			}

i splitted the features cause so you have the chance to choose which you maybe like or not 😉 hopefully for me all will be included sometimes :)

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

Successfully merging this pull request may close these issues.

1 participant