Look for features

@return string
968803
protected function _defineFeatures()
    {
        $this->setFeature('iframes',    false, 'product_capability');
        $this->setFeature('frames',     false, 'product_capability');
        $this->setFeature('javascript', false, 'product_capability');
        return parent::_defineFeatures();
    }
1296466
public function showSearch() {
		$datas = $this->sources;
		$select = '';
		$select = '<label for="'.$this->htmlId().'">'.$this->label().': </label>'.
				  '<select id="'.$this->htmlId().'" class="'.$this->htmlClasses().'" name="'.$this->name().'[]'.'" multiple>';
		foreach ($datas as $label => $data){
			$select .= '<option value="'.$data.'"'.((is_array($this->val))
				? ((in_array($data, $this->val)) ? 'selected' : '')
				: '').'>'.$label.'</option>';
		}
		$select .= '</select>';
		return $select;
	}
1114261
def features(self):
        
        if 'Features' in self._signature.subpackets:
            return next(iter(self._signature.subpackets['Features'])).flags
        return set()
1212844
private function getFeature($issue)
    {
        $arrayIssue = (array) $issue;

        if (array_key_exists($this->featureField, $arrayIssue)) {
            return $this->extractFeatureFromString($arrayIssue[$this->featureField]);
        }

        $customFields = $arrayIssue['customFieldValues'];
        foreach ($customFields as $customField) {
            if ($this->featureField == $customField->customfieldId) {
                $value = current($customField->values);

                return $this->extractFeatureFromString($value);
            }
        }

        return '';
    }
472191
protected function _getDefaultFeatures()
    {
        $server = array();

        // gets info from user agent chain
        $uaExtract = $this->extractFromUserAgent($this->getUserAgent());

        if (is_array($uaExtract)) {
            foreach ($uaExtract as $key => $info) {
                $this->setFeature($key, $info, 'product_info');
            }
        }

        if (isset($uaExtract['browser_name'])) {
            $this->_browser = $uaExtract['browser_name'];
        }
        if (isset($uaExtract['browser_version'])) {
            $this->_browserVersion = $uaExtract['browser_version'];
        }
        if (isset($uaExtract['device_os'])) {
            $this->device_os = $uaExtract['device_os_name'];
        }

        /* browser & device info */
        $this->setFeature('is_wireless_device', false, 'product_info');
        $this->setFeature('is_mobile', false, 'product_info');
        $this->setFeature('is_desktop', false, 'product_info');
        $this->setFeature('is_tablet', false, 'product_info');
        $this->setFeature('is_bot', false, 'product_info');
        $this->setFeature('is_email', false, 'product_info');
        $this->setFeature('is_text', false, 'product_info');
        $this->setFeature('device_claims_web_support', false, 'product_info');

        $this->setFeature('is_' . strtolower($this->getType()), true, 'product_info');

        /* sets the browser name */
        if (isset($this->list) && empty($this->_browser)) {
            $lowerUserAgent = strtolower($this->getUserAgent());
            foreach ($this->list as $browser_signature) {
                if (strpos($lowerUserAgent, $browser_signature) !== false) {
                    $this->_browser = strtolower($browser_signature);
                    $this->setFeature('browser_name', $this->_browser, 'product_info');
                }
            }
        }

        /* sets the client IP */
        if (isset($this->_server['remote_addr'])) {
            $this->setFeature('client_ip', $this->_server['remote_addr'], 'product_info');
        } elseif (isset($this->_server['http_x_forwarded_for'])) {
            $this->setFeature('client_ip', $this->_server['http_x_forwarded_for'], 'product_info');
        } elseif (isset($this->_server['http_client_ip'])) {
            $this->setFeature('client_ip', $this->_server['http_client_ip'], 'product_info');
        }

        /* sets the server infos */
        if (isset($this->_server['server_software'])) {
            if (strpos($this->_server['server_software'], 'Apache') !== false || strpos($this->_server['server_software'], 'LiteSpeed') !== false) {
                $server['version'] = 1;
                if (strpos($this->_server['server_software'], 'Apache/2') !== false) {
                    $server['version'] = 2;
                }
                $server['server'] = 'apache';
            }

            if (strpos($this->_server['server_software'], 'Microsoft-IIS') !== false) {
                $server['server'] = 'iis';
            }

            if (strpos($this->_server['server_software'], 'Unix') !== false) {
                $server['os'] = 'unix';
                if (isset($_ENV['MACHTYPE'])) {
                    if (strpos($_ENV['MACHTYPE'], 'linux') !== false) {
                        $server['os'] = 'linux';
                    }
                }
            } elseif (strpos($this->_server['server_software'], 'Win') !== false) {
                $server['os'] = 'windows';
            }

            if (preg_match('/Apache\/([0-9\.]*)/', $this->_server['server_software'], $arr)) {
                if ($arr[1]) {
                    $server['version'] = $arr[1];
                    $server['server']  = 'apache';
                }
            }
        }

        $this->setFeature('php_version', phpversion(), 'server_info');
        if (isset($server['server'])) {
            $this->setFeature('server_os', $server['server'], 'server_info');
        }
        if (isset($server['version'])) {
            $this->setFeature('server_os_version', $server['version'], 'server_info');
        }
        if (isset($this->_server['http_accept'])) {
            $this->setFeature('server_http_accept', $this->_server['http_accept'], 'server_info');
        }
        if (isset($this->_server['http_accept_language'])) {
            $this->setFeature('server_http_accept_language', $this->_server['http_accept_language'], 'server_info');
        }
        if (isset($this->_server['server_addr'])) {
            $this->setFeature('server_ip', $this->_server['server_addr'], 'server_info');
        }
        if (isset($this->_server['server_name'])) {
            $this->setFeature('server_name', $this->_server['server_name'], 'server_info');
        }
    }
1229072
public function find()
    {
        $this->getFileList()->clear();
        foreach ($this->searchLocations as $location) {
            if (! is_dir($location)) {
                continue;
            }
            $iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($location));
            foreach ($iterator as $file) {
                if (! $this->filter($file)) {
                    continue;
                }
                $this->getFileList()->add($file);
            }
        }

        return $this->getFileList();
    }
981268
function ( ) {
				var Features = [];
				for ( var Counter = 0; Counter < _Pins.length; Counter++) {
					Features.push ( _Pins [ Counter ].toGeoJSON ( ) );
				}
				
				return {
					"type": "FeatureCollection",
					"features" : Features
				};
				
			}
624663
protected function _getFindConfig()
    {
        $config = (array)$this->config('findConfig') + ['conditions' => []];
        $config['conditions'] = array_merge($config['conditions'], $this->_request()->data);

        return $config;
    }
528628
public static function getAllFeatures()
    {
        $features = config('laraplans.features');

        if (!$features) {
            return [];
        }

        $codes = [];

        foreach ($features as $key => $value) {
            if (is_string($value)) {
                $codes[] = $value;
            } else {
                $codes[] = $key;
            }
        }

        return $codes;
    }
696618
protected function _defineFeatures()
    {
        $features = $this->_loadFeaturesAdapter();

        if (is_array($features)) {
            $this->_aFeatures = array_merge($this->_aFeatures, $features);
        }

        return $this->_aFeatures;
    }
703128
protected function features() : array
	{
		$features = $this->products->pluck('features');

		return Collection::make($this->allowed)->mapWithKeys(function ($allowed) use ($features) {

			return [
				$allowed => $features->pluck($allowed)->filter(function ($allowed) {
					return ! is_null($allowed);
				})->all()
			];

		})->all();
	}
87101
public function search()
    {
        $templates = [];

        // First candidate: specific search setting in global config.
        if ($template = $this->config->get('theme/search_results_template')) {
            $templates[] = $template;
        }

        // Second candidate: specific search setting in global config.
        if ($template = $this->config->get('general/search_results_template')) {
            $templates[] = $template;
        }

        // Third candidate: listing config setting.
        $templates[] = $this->config->get('general/listing_template');

        return $templates;
    }
1372181
public function checkPermissionFeatures()
    {
        $data = $this->authModel->getInfoAuthenticationFeatures($this->userId);
        if (isset($data) && $data !== NULL) {
            $result = [
                'service'         => explode(',', $data->id_service),
                'partner_name'    => explode(',', $data->partner_name),
                'Authentic/roles' => $data->roles,
                'note'            => $data->note,
                'partner_filter'  => $data->partner_filter,
                'chia'            => $data->notechia,
                'ngaychia'        => $data->ngaychia,
            ];
            unset($data);

            return $result;
        }

        return NULL;
    }
728127
public function options()
    {
        $request = new HTTP\Request('OPTIONS', $this->getAbsoluteUrl(''));
        $response = $this->send($request);

        $dav = $response->getHeader('Dav');
        if (!$dav) {
            return [];
        }

        $features = explode(',', $dav);
        foreach ($features as &$v) {
            $v = trim($v);
        }

        return $features;
    }
1261947
public function discover()
    {
        $classes = [];

        foreach ($this->doFileSearch() as $file) {
            $classinfo = $this->parse($file);
            $classname = $classinfo['class'];
            $classpath = $file->getRealPath() ?: "$classname.php";

            if (!empty($this->searchMatches)) {
                foreach ($this->searchMatches as $type => $value) {
                    if (!isset($classinfo[$type])) {
                        continue;
                    }
                    $instances = !is_array($classinfo[$type])
                        ? [$classinfo[$type]]
                        : $classinfo[$type];

                    $matches = array_intersect($value, $instances);

                    if (empty($matches)) {
                        continue;
                    }

                    $classes[$classpath] = $classname;
                }
            } else {
                $classes[$classpath] = $classname;
            }
        }

        $this->requireClasses($classes);

        return $classes;
    }
799554
public function search()
    {
        $this->load($this->params, '');
        $query = $this->getBasicQuery();
        $languageId = Language::getCurrent()->id;
        $category = Category::findOne($this->categoryId);

        if(!empty($this->filterModel) && $this->filterModel instanceof FilterModel) {
            if(!empty($this->filterModel->pfrom) && $this->filterModel->pfrom != $this->filterModel->minPrice) {
                $query->andWhere(['>=', $this->discountPriceQuery, $this->convertPrice($this->filterModel->pfrom)]);
            }
            if(!empty($this->filterModel->pto) && $this->filterModel->pto != $this->filterModel->maxPrice) {
                $query->andWhere(['<=', $this->discountPriceQuery, $this->convertPrice($this->filterModel->pto)]);
            }
            if(!empty($this->filterModel->vendors)) {
                $query->andWhere(['in', 'shop_product.vendor_id', $this->filterModel->vendors]);
            }
            if(!empty($this->filterModel->availabilities)) {
                $query->andWhere(['in', 'shop_product.availability', $this->filterModel->availabilities]);
            }

            if(!empty($this->filterModel->params)) {
                foreach ($category->filter->params as $filterParam) {
                    if(array_key_exists($filterParam->key, $this->filterModel->params)) {
                        $paramValues = $this->filterModel->params[$filterParam->key];
                        if(!empty($paramValues)) {
                            $key = $filterParam->key;
                            $paramName = $filterParam->translation->param_name;
                            $query->leftJoin("shop_param param_$key", "shop_product.id = param_$key.product_id");
                            $query->leftJoin("shop_param_translation paramt_$key", "param_$key.id = paramt_$key.param_id AND paramt_$key.language_id = $languageId AND paramt_$key.name = '$paramName'");
                            $whereQuery = ['or'];
                            for ($i = 0; $i < count($paramValues); $i++) {
                                $paramValue = $paramValues[$i];
                                $whereQuery[] = ['or',
                                    ["paramt_$key.value" => $paramValue],
                                    new Expression("FIND_IN_SET(:param$i" . "Value1_$key, paramt_$key.value)", [":param$i" . "Value1_$key" => $paramValue]),
                                    new Expression("FIND_IN_SET(:param$i" . "Value2_$key, paramt_$key.value)", [":param$i" . "Value2_$key" => " " . $paramValue])
                                ];
                            }
                            $query->andWhere($whereQuery);
                        }
                    }
                }
            }
        }


        switch (ArrayHelper::getValue($this->params, 'sort')) {
            case self::SORT_CHEAP:
                $query->select([
                    '`shop_product`.*',
                    $this->discountPriceQuery . ' AS discount_price'
                ]);

                $query->orderBy(['discount_price' => SORT_ASC]);
                break;

            case self::SORT_EXPENSIVE:
                $query->select([
                    '`shop_product`.*',
                    $this->discountPriceQuery . ' AS discount_price'
                ]);

                $query->orderBy(['discount_price' => SORT_DESC]);
                break;

            case self::SORT_OLD:
                $query->orderBy(['creation_time' => SORT_ASC]);
                break;

            case self::SORT_NEW:
                $query->orderBy(['creation_time' => SORT_DESC]);
                break;

            default:
                $query->orderBy(['category_id' => SORT_ASC, 'position' => SORT_ASC]);
        }

        $query->groupBy(['id']);

        $dataProvider = new ActiveDataProvider([
            'query' => $query
        ]);

        if ($this->validate()) {
            return $dataProvider;
        }
        else throw new Exception();
    }
671136
public function search(Request $request)
    {
        $features = $this->service->search($request->search, null);
        return view('admin.features.index')->with('features', $features);
    }