/** * Tests setting the filter impact via the collection helper method * * @covers \Expose\FilterCollection::setFilterImpact */ public function testGetSetFilterImpact() { $filter = new Filter(); $filter->setId(1234); $filter->setImpact(3); $this->collection->addFilter($filter); $this->collection->setFilterImpact(1234, 27); $this->assertEquals(27, $filter->getImpact()); }
/** * Fire up the Expose engine and actually scan the request. */ function scan_request() { $data = get_request_data(); // Load up our filters $filters = new Expose\FilterCollection(); $filters->load(); // Get an instance of our logger $logger = new Logger(); $manager = new Expose\Manager($filters, $logger); $manager->run($data); /** * Dispatch any events tied to a specific impact level for the current request. * * @param int $impact Impact score * @param Expose\Manager $manager Actual manager instance */ do_action('unmask_expose_request_impact', $manager->getImpact(), $manager); }