Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Searching 219 files for "Spl" (regex)
- /home/hosiplan/develop/libs/nette/dev/Nette/Application/MicroPresenter.php:
- 84 }
- 85 if (is_array($response)) {
- 86: if ($response[0] instanceof \SplFileInfo) {
- 87 $response = $this->createTemplate('Nette\Templating\FileTemplate')
- 88 ->setParameters($response[1])->setFile($response[0]);
- /home/hosiplan/develop/libs/nette/dev/Nette/Application/Routers/Route.php:
- 275 $params[self::PRESENTER_KEY] = $presenter;
- 276
- 277: if (isset($metadata[self::MODULE_KEY])) { // try split into module and [submodule:]presenter parts
- 278 $module = $metadata[self::MODULE_KEY];
- 279 if (isset($module['fixity']) && strncasecmp($presenter, $module[self::VALUE] . ':', strlen($module[self::VALUE]) + 1) === 0) {
- ...
- 438 // PARSE MASK
- 439 // <parameter-name[=default] [pattern] [#class]> or [ or ] or ?...
- 440: $parts = Strings::split($mask, '/<([^>#= ]+)(=[^># ]*)? *([^>#]*)(#?[^>\[\]]*)>|(\[!?|\]|\s*\?.*)/');
- 441
- 442 $this->xlat = array();
- /home/hosiplan/develop/libs/nette/dev/Nette/Application/UI/Control.php:
- 122
- 123 /**
- 124: * Saves the message to template, that can be displayed after redirect.
- 125 * @param string
- 126 * @param string
- /home/hosiplan/develop/libs/nette/dev/Nette/Config/Configurator.php:
- 308 public static function detectDebugMode($list = NULL)
- 309 {
- 310: $list = is_string($list) ? preg_split('#[,\s]+#', $list) : (array) $list;
- 311 if (!isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
- 312 $list[] = '127.0.0.1';
- /home/hosiplan/develop/libs/nette/dev/Nette/DI/Helpers.php:
- 53 }
- 54
- 55: $parts = preg_split('#%([\w.-]*)%#i', $var, -1, PREG_SPLIT_DELIM_CAPTURE);
- 56 $res = '';
- 57 foreach ($parts as $n => $part) {
- /home/hosiplan/develop/libs/nette/dev/Nette/Database/Helpers.php:
- 39
- 40 /**
- 41: * Displays complete result set as HTML table for debug purposes.
- 42 * @return void
- 43 */
- /home/hosiplan/develop/libs/nette/dev/Nette/Database/Statement.php:
- 162
- 163 /**
- 164: * Displays complete result set as HTML table for debug purposes.
- 165 * @return void
- 166 */
- /home/hosiplan/develop/libs/nette/dev/Nette/Diagnostics/Debugger.php:
- 17
- 18 /**
- 19: * Debugger: displays and logs errors.
- 20 *
- 21 * Behavior is determined by two factors: mode & output
- ..
- 50 /********************* Debugger::dump() ****************d*g**/
- 51
- 52: /** @var int how many nested levels of array/object properties display {@link Debugger::dump()} */
- 53 public static $maxDepth = 3;
- 54
- 55: /** @var int how long strings display {@link Debugger::dump()} */
- 56 public static $maxLen = 150;
- 57
- 58: /** @var bool display location? {@link Debugger::dump()} */
- 59 public static $showLocation = FALSE;
- 60
- ..
- 217
- 218 /**
- 219: * Enables displaying or logging errors and exceptions.
- 220 * @param mixed production, development mode, autodetection or IP address(es) whitelist.
- 221 * @param string error log directory; enables logging in production mode, FALSE means that logging is disabled
- ...
- 232
- 233 } elseif ($mode !== self::DETECT || self::$productionMode === NULL) { // IP addresses or computer names whitelist detection
- 234: $list = is_string($mode) ? preg_split('#[,\s]+#', $mode) : (array) $mode;
- 235 if (!isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
- 236 $list[] = '127.0.0.1';
- ...
- 258 // php configuration
- 259 if (function_exists('ini_set')) {
- 260: ini_set('display_errors', !self::$productionMode); // or 'stderr'
- 261 ini_set('html_errors', FALSE);
- 262 ini_set('log_errors', FALSE);
- 263
- 264: } elseif (ini_get('display_errors') != !self::$productionMode && ini_get('display_errors') !== (self::$productionMode ? 'stderr' : 'stdout')) { // intentionally ==
- 265 throw new Nette\NotSupportedException('Function ini_set() must be enabled.');
- 266 }
- /home/hosiplan/develop/libs/nette/dev/Nette/Diagnostics/FireLogger.php:
- 108
- 109 self::$payload['logs'][] = self::jsonDump($item, -1);
- 110: foreach (str_split(base64_encode(@json_encode(self::$payload)), 4990) as $k => $v) { // intentionally @
- 111 header("FireLogger-de11e-$k:$v");
- 112 }
- /home/hosiplan/develop/libs/nette/dev/Nette/Forms/Container.php:
- 290
- 291 /**
- 292: * Adds hidden form control used to store a non-displayed value.
- 293 * @param string control name
- 294 * @param mixed default value
- /home/hosiplan/develop/libs/nette/dev/Nette/Forms/ControlGroup.php:
- 26 class ControlGroup extends Nette\Object
- 27 {
- 28: /** @var \SplObjectStorage */
- 29 protected $controls;
- 30
- ..
- 36 public function __construct()
- 37 {
- 38: $this->controls = new \SplObjectStorage;
- 39 }
- 40
- /home/hosiplan/develop/libs/nette/dev/Nette/Forms/Rules.php:
- 67 * Adds a validation rule for the current control.
- 68 * @param mixed rule type
- 69: * @param string message to display for invalid data
- 70 * @param mixed optional rule arguments
- 71 * @return Rules provides a fluent interface
- /home/hosiplan/develop/libs/nette/dev/Nette/Forms/Controls/BaseControl.php:
- 461 * Adds a validation rule.
- 462 * @param mixed rule type
- 463: * @param string message to display for invalid data
- 464 * @param mixed optional rule arguments
- 465 * @return BaseControl provides a fluent interface
- /home/hosiplan/develop/libs/nette/dev/Nette/Forms/Controls/HiddenField.php:
- 17
- 18 /**
- 19: * Hidden form control used to store a non-displayed value.
- 20 *
- 21 * @author David Grudl
- /home/hosiplan/develop/libs/nette/dev/Nette/Forms/Rendering/DefaultFormRenderer.php:
- 205 $s = '';
- 206 if (isset($url[1])) {
- 207: foreach (preg_split('#[;&]#', $url[1]) as $param) {
- 208 $parts = explode('=', $param, 2);
- 209 $name = urldecode($parts[0]);
- ...
- 237 }
- 238 if (iterator_count($this->form->getComponents(TRUE, 'Nette\Forms\Controls\TextInput')) < 2) {
- 239: $s .= '<!--[if IE]><input type=IEbug disabled style="display:none"><![endif]-->';
- 240 }
- 241 if ($s) {
- /home/hosiplan/develop/libs/nette/dev/Nette/Http/Url.php:
- 440
- 441 // compare query strings
- 442: $part = preg_split('#[&;]#', self::unescape(strtr((string) strtok('?#'), '+', ' '), '%&;=+'));
- 443 sort($part);
- 444: $query = preg_split('#[&;]#', $this->query);
- 445 sort($query);
- 446 return $part === $query;
- /home/hosiplan/develop/libs/nette/dev/Nette/Latte/Compiler.php:
- 39 private $macros;
- 40
- 41: /** @var \SplObjectStorage */
- 42 private $macroHandlers;
- 43
- ..
- 78 public function __construct()
- 79 {
- 80: $this->macroHandlers = new \SplObjectStorage;
- 81 }
- 82
- /home/hosiplan/develop/libs/nette/dev/Nette/Latte/Macros/CoreMacros.php:
- 40 * - {dump $var}
- 41 * - {debugbreak}
- 42: * - {l} {r} to display { }
- 43 *
- 44 * @author David Grudl
- /home/hosiplan/develop/libs/nette/dev/Nette/Latte/Macros/FormMacros.php:
- 112 $url = explode('?', $form->getElementPrototype()->action, 2);
- 113 if (isset($url[1])) {
- 114: foreach (preg_split('#[;&]#', $url[1]) as $param) {
- 115 $parts = explode('=', $param, 2);
- 116 $name = urldecode($parts[0]);
- ...
- 129
- 130 if (iterator_count($form->getComponents(TRUE, 'Nette\Forms\Controls\TextInput')) < 2) {
- 131: $s .= '<!--[if IE]><input type=IEbug disabled style="display:none"><![endif]-->';
- 132 }
- 133
- /home/hosiplan/develop/libs/nette/dev/Nette/Loaders/AutoLoader.php:
- 65 public function register(/**/$prepend = FALSE/**/)
- 66 {
- 67: if (!function_exists('spl_autoload_register')) {
- 68: throw new Nette\NotSupportedException('spl_autoload does not exist in this PHP installation.');
- 69 }
- 70
- 71: spl_autoload_register(array($this, 'tryLoad')/**/, TRUE, (bool) $prepend/**/);
- 72: self::$loaders[spl_object_hash($this)] = $this;
- 73 }
- 74
- ..
- 81 public function unregister()
- 82 {
- 83: unset(self::$loaders[spl_object_hash($this)]);
- 84: return spl_autoload_unregister(array($this, 'tryLoad'));
- 85 }
- 86
- /home/hosiplan/develop/libs/nette/dev/Nette/Loaders/RobotLoader.php:
- 233 {
- 234 if (is_dir($dir)) {
- 235: $ignoreDirs = is_array($this->ignoreDirs) ? $this->ignoreDirs : Strings::split($this->ignoreDirs, '#[,\s]+#');
- 236 $disallow = array();
- 237 foreach ($ignoreDirs as $item) {
- ...
- 240 }
- 241 }
- 242: $iterator = Nette\Utils\Finder::findFiles(is_array($this->acceptFiles) ? $this->acceptFiles : Strings::split($this->acceptFiles, '#[,\s]+#'))
- 243 ->filter(function($file) use (&$disallow){
- 244 return !isset($disallow[$file->getPathname()]);
- ...
- 257 return !isset($disallow[$path]);
- 258 });
- 259: $filter(new \SplFileInfo($dir));
- 260 } else {
- 261: $iterator = new \ArrayIterator(array(new \SplFileInfo($dir)));
- 262 }
- 263
- /home/hosiplan/develop/libs/nette/dev/Nette/Mail/MimePart.php:
- 281
- 282 case self::ENCODING_BASE64:
- 283: $output .= rtrim(chunk_split(base64_encode($body), self::LINE_LENGTH, self::EOL));
- 284 break;
- 285
- /home/hosiplan/develop/libs/nette/dev/Nette/Reflection/AnnotationsParser.php:
- 160 $res = array();
- 161 $comment = preg_replace('#^\s*\*\s?#ms', '', trim($comment, '/*'));
- 162: $parts = preg_split('#^\s*(?=@'.self::RE_IDENTIFIER.')#m', $comment, 2);
- 163
- 164 $description = trim($parts[0]);
- /home/hosiplan/develop/libs/nette/dev/Nette/Utils/Html.php:
- 358
- 359 } else { // insert or replace
- 360: array_splice($this->children, (int) $index, $replace ? 1 : 0, array($child));
- 361 }
- 362
- ...
- 415 {
- 416 if (isset($this->children[$index])) {
- 417: array_splice($this->children, (int) $index, 1);
- 418 }
- 419 }
- /home/hosiplan/develop/libs/nette/dev/Nette/Utils/Json.php:
- 54 Nette\Diagnostics\Debugger::tryError();
- 55 if (function_exists('ini_set')) {
- 56: $old = ini_set('display_errors', 0); // needed to receive 'Invalid UTF-8 sequence' error
- 57 $json = json_encode($value);
- 58: ini_set('display_errors', $old);
- 59 } else {
- 60 $json = json_encode($value);
- /home/hosiplan/develop/libs/nette/dev/Nette/Utils/Paginator.php:
- 166
- 167 /**
- 168: * Sets the number of items to display on a single page.
- 169 * @param int
- 170 * @return Paginator provides a fluent interface
- ...
- 179
- 180 /**
- 181: * Returns the number of items to display on a single page.
- 182 * @return int
- 183 */
- /home/hosiplan/develop/libs/nette/dev/Nette/Utils/Strings.php:
- 410
- 411 /**
- 412: * Splits string by a regular expression.
- 413 * @param string
- 414 * @param string
- ...
- 416 * @return array
- 417 */
- 418: public static function split($subject, $pattern, $flags = 0)
- 419 {
- 420 Debugger::tryError();
- 421: $res = preg_split($pattern, $subject, -1, $flags | PREG_SPLIT_DELIM_CAPTURE);
- 422 if (Debugger::catchError($e) || preg_last_error()) { // compile error XOR run-time error
- 423 throw new RegexpException($e ? $e->getMessage() : NULL, $e ? NULL : preg_last_error(), $pattern);
- /home/hosiplan/develop/libs/nette/dev/Nette/Utils/Tokenizer.php:
- 90
- 91 } else {
- 92: $this->tokens = Strings::split($input, $this->re, PREG_SPLIT_NO_EMPTY);
- 93 if ($this->tokens && !Strings::match(end($this->tokens), $this->re)) {
- 94: $tmp = Strings::split($this->input, $this->re, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_OFFSET_CAPTURE);
- 95 list(, $errorOffset) = end($tmp);
- 96 }
- ..
- 122 public function getOffset($i)
- 123 {
- 124: $tokens = Strings::split($this->input, $this->re, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_OFFSET_CAPTURE);
- 125 $offset = isset($tokens[$i]) ? $tokens[$i][1] : strlen($this->input);
- 126 return array(
- /home/hosiplan/develop/libs/nette/dev/Nette/common/ArrayList.php:
- 112 throw new OutOfRangeException("Offset invalid or out of range");
- 113 }
- 114: array_splice($this->list, (int) $index, 1);
- 115 }
- 116
- 65 matches across 29 files
Add Comment
Please, Sign In to add comment