PHPFusion\Rewrite\RewriteDriver::verifyHandlers PHP Метод

verifyHandlers() защищенный Метод

This will verify all the added Handlers by checking if they are enabled or not. The Disabled Handlers are removed from the List and only Enabled Handlers are kept for working.
protected verifyHandlers ( )
    protected function verifyHandlers()
    {
        if (!empty($this->handlers)) {
            $types = array();
            foreach ($this->handlers as $key => $value) {
                $types[] = "'" . $value . "'";
                // When working on string, the values should be inside single quotes.
            }
            $types_str = implode(",", $types);
            $query = "SELECT rewrite_name FROM " . DB_PERMALINK_REWRITE . " WHERE rewrite_name IN(" . $types_str . ")";
            $this->queries[] = $query;
            $result = dbquery($query);
            $types_enabled = array();
            if (dbrows($result) > 0) {
                while ($data = dbarray($result)) {
                    $types_enabled[] = $data['rewrite_name'];
                }
            }
            // Compute the Intersection
            // This is because we want only those Handlers, which are Enabled on website by admin
            $this->handlers = array_intersect($this->handlers, $types_enabled);
        }
    }