$comment = $param . ': ' . $comments[$param]; if (isset($comments_conditions[$param]) && !empty($comments_conditions[$param][0])) { $comment .= ' (' . $comments_conditions[$param][0] . ')'; // Дополнительная информация } $output[$error][] = $comment; } var_export($output); } class AMatchRussian extends AMatchStatus { protected function _fillComments() { parent::_fillComments(); // Если не вызвать родительский метод, то отсутствующие строки будут отданы в виде кодов $this->_result_comments[self::KEY_NOT_EXISTS] = 'Искал, вот честно. Не нашел'; $this->_result_comments[self::KEY_CONDITION_NOT_VALID] = 'Попробуйте поиграть шрифтами'; $this->_result_comments[self::CONDITION_IS_UNKNOWN] = 'Нипаняятна'; } } $match = AMatch::runMatch($params_bad, AMatch::FLAG_SHOW_GOOD_COMMENTS | AMatch::FLAG_DONT_STOP_MATCHING, new AMatchRussian())->title('', 'string', 'Incorrect document title. Please, read FAQ.')->parent_id('', 'int')->ineedkey()->subject_id(1, '>')->delimeter('', 'blabla'); mapping($match); // echo PHP_EOL . PHP_EOL . 'EXAMPLE 3: plugins' . PHP_EOL; function matchCallbacks($params) { $match = AMatch::runMatch($params, AMatch::FLAG_DONT_STOP_MATCHING)->parent_id('/^-?\\d+$/', 'AMatchString::pregMatch')->title(12, 'AMatchString::length')->email('([\\w-]+@([\\w-]+\\.)+[\\w-]+)', 'AMatchString::isEmail')->links(AMatchArray::FLAG_EMPTY_SOME_ELEMENT, 'AMatchArray::isNotEmpty'); result($match); } matchCallbacks($params); matchCallbacks($params_bad);
private function getControllerAndMethod() { // Parse the values obtained from the url (obtained from .htaccess) to get the controller and view $details = array(); if (USE_CATCH_ALL) { require_once path('/app/settings/mapping.php'); $request = array(); if ($this->cli->isEnabled()) { $request = $this->getCliArray(); } else { $request = $this->getRequestArray(); } $details = mapping($request); if (!checkArray($details, 'controller')) { $details['controller'] = isset($request[0]) && $request[0] != '' ? $request[0] : DEFAULT_CONTROLLER; } if (!checkArray($details, 'method')) { $details['method'] = isset($request[1]) && $request[1] != '' ? $request[1] : 'base'; } // Do not destroy the generatrix controller $c_id = $this->cli->isEnabled() ? 1 : 0; if (isset($request[$c_id]) && $request[$c_id] == 'generatrix') { $details['controller'] = $request[$c_id]; $c_id++; if (isset($request[$c_id]) && $request[$c_id] != '') { $details['method'] = $request[$c_id]; } else { $details['method'] = 'base'; } } } else { // If no controller or method is defined, we need to use the DEFAULT_CONTROLLER (defined in app/settings/config.php) // If cli is enabled, we use the format site.com/index.php controller function // Hence we need to get the values from the arguments as $argv[0], $argv[1] etc if ($this->cli->isEnabled()) { if ($this->cli->getValue('controller') == "") { header('HTTP/1.1 301 Moved Permanently'); location('/' . DEFAULT_CONTROLLER); } $details['controller'] = $this->cli->getValue('controller') == "" ? DEFAULT_CONTROLLER : $this->cli->getValue('controller'); $details['method'] = $this->cli->getValue('method') == "" ? 'base' : $this->cli->getValue('method'); } else { // If this request is coming from the browser, we need to get the value from url (obtained from .htaccess) if ($this->request->getValue('controller') == "") { header('HTTP/1.1 301 Moved Permanently'); location('/' . DEFAULT_CONTROLLER); } $details['controller'] = $this->request->getValue('controller') == "" ? DEFAULT_CONTROLLER : $this->request->getValue('controller'); $details['method'] = $this->request->getValue('method') == "" ? 'base' : $this->request->getValue('method'); } // TODO : Add customHandlers // We need to set the $controller and $method for the generatrix class $this->controller = function_exists('customHandlers') ? customHandlers($details, 'controller') : $details['controller']; $this->method = function_exists('customHandlers') ? customHandlers($details, 'method') : $details['method']; // set the controller and method again (depending on the customHandlers) $details['controller'] = $this->controller; $details['method'] = $this->method; } return $details; }
mapping("Str Rm, [Rn, SHF]", "ISTRccA #0 (Rn, SHF) <- Rm -> Rd"); mapping("Str Rm, [Rn, -SHF]", "ISTRccA #0 (Rn, -SHF) <- Rm -> Rd"); mapping("Str Rm, [Rn], #4", "ISTRccA #0 (Rn), 4 <- Rm -> Rd"); mapping("Str Rm, [Rn], #-4", "ISTRccA #0 (Rn), -4 <- Rm -> Rd"); mapping_end(); mapping_start("Native extended op (?)", "Internal"); mapping("Str Rm, [Rn, #4]!", "ISTRccHA #0 (Rn, 2) <- Rm -> Rn"); mapping("Str Rm, [Rn, #4]!", "ISTRccBA #0 (Rn, 1) <- Rm -> Rn"); mapping("Str Rm, [Rn, SHF]", "ISTRccHA #0 (Rn, SHF) <- Rm"); mapping("Str Rm, [Rn, SHF]", "ISTRccBA #0 (Rn, SHF) <- Rm"); mapping("Str Rm, [Rn, -SHF]", "ISTRccHA #0 (Rn, -SHF) <- Rm -> Rn"); mapping("Str Rm, [Rn, -SHF]", "ISTRccBA #0 (Rn, -SHF) <- Rm -> Rn"); mapping("Str Rm, [Rn], #4", "ISTRccHA #0 (Rn), 2 <- Rm -> Rn"); mapping("Str Rm, [Rn], #4", "ISTRccBA #0 (Rn), 1 <- Rm -> Rn"); mapping("Str Rm, [Rn], #-4", "ISTRccHA #0 (Rn), -2 <- Rm -> Rn"); mapping("Str Rm, [Rn], #-4", "ISTRccBA #0 (Rn), -1 <- Rm -> Rn"); mapping_end(); ?> Any extended immediate value is ignored by store instructions. If extended with extcmd, then 'op' of 0 indicates standard operation, op of 1 indicates half-word accesses and op of 2 indicates byte accesses, as shown above. <?php page_section("notes", "Notes on instructions"); ?> Coprocessors are accesed through the postbus, which is a register set. <p> There are a set of registers marked as 'special' which allow for control of the sticky/unsticky flags control, condition passed shadow size, endianness, unaligned accesses.