100+ results for 'php strtr'

Not the results you expected?

format.php (https://github.com/jarednipper/HSU-common-code.git) PHP · 151 lines

1 <?php // $Id: format.php,v 1.4.4.1 2007/11/02 16:21:06 tjhunt Exp $

2 // Alton College, Hampshire, UK - Tom Flannaghan, Andrew Walker

3 // Imports learnwise multiple choice quizzes (single and multiple answers)

5 // deductions are currently simply found by dividing the award for the incorrect

6 // answer by the total number of options

7 // Based on format.php, included by ../../import.php

8 /**

9 * @package questionbank

144 $transtable = get_html_translation_table(HTML_ENTITIES);

145 $transtable = array_flip($transtable);

146 return strtr($string, $transtable);

147 }

148

TbBaseMenu.php (https://github.com/LosYear/FluentCMS.git) PHP · 189 lines

1 <?php

2 /**

3 * TbBaseMenu class file.

4 * @author Christoffer Niska <ChristofferNiska@gmail.com>

5 * @copyright Copyright &copy; Christoffer Niska 2012-

6 * @license http://www.opensource.org/licenses/bsd-license.php New BSD License

7 * @package bootstrap.widgets

8 */

71 {

72 $template = isset($item['template']) ? $item['template'] : $this->itemTemplate;

73 echo strtr($template, array('{menu}' => $menu));

74 }

75 else

CNumberValidator.php (https://bitbucket.org/rezanachmad/php-selenium-training.git) PHP · 175 lines

1 <?php

2 /**

3 * CNumberValidator class file.

121 if(($message=$this->message)===null)

122 $message=$this->integerOnly ? Yii::t('yii','{attribute} must be an integer.') : Yii::t('yii','{attribute} must be a number.');

123 $message=strtr($message, array(

124 '{attribute}'=>$label,

125 ));

127 if(($tooBig=$this->tooBig)===null)

128 $tooBig=Yii::t('yii','{attribute} is too big (maximum is {max}).');

129 $tooBig=strtr($tooBig, array(

130 '{attribute}'=>$label,

131 '{max}'=>$this->max,

134 if(($tooSmall=$this->tooSmall)===null)

135 $tooSmall=Yii::t('yii','{attribute} is too small (minimum is {min}).');

136 $tooSmall=strtr($tooSmall, array(

137 '{attribute}'=>$label,

138 '{min}'=>$this->min,

Debug.php (https://bitbucket.org/jokusafet/magento2.git) PHP · 204 lines

1 <?php

2 /**

3 * Magento

8 * that is bundled with this package in the file LICENSE.txt.

9 * It is also available through the world-wide-web at this URL:

10 * http://opensource.org/licenses/osl-3.0.php

11 * If you did not receive a copy of the license and are unable to

12 * obtain it through the world-wide-web, please send an email

22 * @package Varien_Debug

23 * @copyright Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)

24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)

25 */

26

194 $arg = substr($arg, 0, self::$argLength) . "...";

195 }

196 $arg = strtr($arg, array("\t" => '\t', "\r" => '\r', "\n" => '\n', "'" => '\\\''));

197 $out .= "'" . $arg . "'";

198 } else if (is_bool($arg)) {

JWT.php (https://gitlab.com/sschand/WeatherShouldIGo) PHP · 164 lines

1 <?php

2

3 /**

16 * @param bool $verify Don't skip verification process

17 *

18 * @return object The JWT's payload as a PHP object

19 */

20 public static function decode($jwt, $key = null, $verify = true)

46

47 /**

48 * @param object|array $payload PHP object or array

49 * @param string $key The secret key

50 * @param string $algo The signing algorithm

107

108 /**

109 * @param object|array $input A PHP object or array

110 *

111 * @return string JSON representation of the PHP object or array

DefaultTranslator.php (https://gitlab.com/mohamedchiheb.bida/workshopFOS) PHP · 167 lines

1 <?php

2

3 /*

52 *

53 * Parameters are replaced in the message in the same manner that

54 * {@link strtr()} uses.

55 *

56 * Example usage:

74 public function trans($id, array $parameters = array(), $domain = null, $locale = null)

75 {

76 return strtr($id, $parameters);

77 }

78

134

135 if (1 == $number) {

136 return strtr($ids[0], $parameters);

137 }

138

Headers.php (https://gitlab.com/leon0399/damnit-engine) PHP · 198 lines

1 <?php

2 /**

3 * Slim Framework (http://slimframework.com)

4 *

5 * @link https://github.com/slimphp/Slim

6 * @copyright Copyright (c) 2011-2015 Josh Lockhart

7 * @license https://github.com/slimphp/Slim/blob/3.x/LICENSE.md (MIT License)

36 'CONTENT_TYPE' => 1,

37 'CONTENT_LENGTH' => 1,

38 'PHP_AUTH_USER' => 1,

39 'PHP_AUTH_PW' => 1,

40 'PHP_AUTH_DIGEST' => 1,

41 'AUTH_TYPE' => 1,

42 ];

Token.php (https://github.com/tmccormi/openemr.git) PHP · 273 lines

1 <?php

2 /**

3 * Zend Framework (http://framework.zend.com/)

259 if (!is_string($value) && (is_bool($value) || is_numeric($value))) {

260 $stringVal = (string) $value;

261 $changedVal = strtr($stringVal, $this->map);

262

263 // replace the value only if a string replacement occurred

269 }

270

271 return strtr((string) $value, $this->map);

272 }

273 }

Bundle.php (https://bitbucket.org/rkovcs/bigfish_test.git) PHP · 197 lines

1 <?php

2

3 /*

181

182 $finder = new Finder();

183 $finder->files()->name('*Command.php')->in($dir);

184

185 $prefix = $this->getNamespace().'\\Command';

187 $ns = $prefix;

188 if ($relativePath = $file->getRelativePath()) {

189 $ns .= '\\'.strtr($relativePath, '/', '\\');

190 }

191 $r = new \ReflectionClass($ns.'\\'.$file->getBasename('.php'));

Language.php (https://bitbucket.org/kudutest1/moodlegit.git) PHP · 163 lines

1 <?php

2

3 /**

78 /**

79 * Retrieves a localised error name.

80 * @param $int integer error number, corresponding to PHP's error

81 * reporting

82 * @return string localised message

156 $subst['$' . $i] = $value;

157 }

158 return strtr($raw, $subst);

159 }

160

ezpi18n.php (https://bitbucket.org/ericsagnes/ezpublish-multisite.git) PHP · 146 lines

1 <?php

2 /**

3 * File containing the ezpI18n class.

41 $replaceList[$argumentKey] = $argumentItem;

42 }

43 $text = strtr( $text, $replaceList );

44 }

45 return $text;

Debug.php (https://gitlab.com/blingbang2016/shop) PHP · 204 lines

1 <?php

2 /**

3 * Magento

8 * that is bundled with this package in the file LICENSE.txt.

9 * It is also available through the world-wide-web at this URL:

10 * http://opensource.org/licenses/osl-3.0.php

11 * If you did not receive a copy of the license and are unable to

12 * obtain it through the world-wide-web, please send an email

22 * @package Varien_Debug

23 * @copyright Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com)

24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)

25 */

26

194 $arg = substr($arg, 0, self::$argLength) . "...";

195 }

196 $arg = strtr($arg, array("\t" => '\t', "\r" => '\r', "\n" => '\n', "'" => '\\\''));

197 $out .= "'" . $arg . "'";

198 } else if (is_bool($arg)) {

Config.php (https://github.com/justinmc/turkiball.com.git) PHP · 514 lines

1 <?php

2 /*

3 * CKFinder

21 * Include access control config class

22 */

23 require_once CKFINDER_CONNECTOR_LIB_DIR . "/Core/AccessControlConfig.php";

24 /**

25 * Include resource type config class

26 */

27 require_once CKFINDER_CONNECTOR_LIB_DIR . "/Core/ResourceTypeConfig.php";

28 /**

29 * Include thumbnails config class

30 */

31 require_once CKFINDER_CONNECTOR_LIB_DIR . "/Core/ThumbnailsConfig.php";

32 /**

33 * Include thumbnails config class

QuickArrayReader.php (https://gitlab.com/link233/bootmw) PHP · 215 lines

1 <?php

2

3 /**

4 * Quickie parser class that can happily read the subset of PHP we need

5 * for our localization arrays safely.

6 *

152

153 /**

154 * Parse a scalar value in PHP

155 *

156 * @param $token string

169 // appended to the token; without it we ended up reading in the

170 // extra quote on the end!

171 return strtr( substr( trim( $str ), 1, -1 ),

172 array( '\\\'' => '\'', '\\\\' => '\\' ) );

173 }

TaggableBehavior.php (https://github.com/mmonguilod/sfPropel15TaggableBehaviorPlugin.git) PHP · 304 lines

10 protected $parameters = array(

11 'tagging_table' => '%TABLE%_tagging',

12 'tagging_table_phpname' => '%PHPNAME%Tagging',

13 'tag_table' => 'taggable_tag',

14 'tag_table_phpname' => 'Tag',

91 $this->taggingTable = $database->addTable(array(

92 'name' => $taggingTableName,

93 'phpName' => $this->replaceTokens($this->parameters['tagging_table_phpname']),

94 'package' => $table->getPackage(),

95 'schema' => $table->getSchema(),

297 return strtr($string, array(

298 '%TABLE%' => $table->getName(),

299 '%PHPNAME%' => $table->getPhpName(),

300 ));

301 }

CacheItem.php (https://github.com/pulzarraider/symfony.git) PHP · 186 lines

1 <?php

2

3 /*

181 }

182 }

183 @trigger_error(strtr($message, $replace), E_USER_WARNING);

184 }

185 }

CStringValidator.php (https://bitbucket.org/haichau59/manga.git) PHP · 177 lines

1 <?php

2 /**

3 * CStringValidator class file.

61 /**

62 * @var string the encoding of the string value to be validated (e.g. 'UTF-8').

63 * This property is used only when mbstring PHP extension is enabled.

64 * The value of this property will be used as the 2nd parameter of the

65 * mb_strlen() function. If this property is not set, the application charset

118 if(($message=$this->message)===null)

119 $message=Yii::t('yii','{attribute} is of the wrong length (should be {length} characters).');

120 $message=strtr($message, array(

121 '{attribute}'=>$label,

122 '{length}'=>$this->is,

125 if(($tooShort=$this->tooShort)===null)

126 $tooShort=Yii::t('yii','{attribute} is too short (minimum is {min} characters).');

127 $tooShort=strtr($tooShort, array(

128 '{attribute}'=>$label,

129 '{min}'=>$this->min,

StreamLogger.php (https://github.com/jfilip/moodle.git) PHP · 194 lines

1 <?php

2

3 /*

4 * This file is part of Mustache.php.

5 *

6 * (c) 2010-2014 Justin Hileman

17 * this stream.

18 *

19 * Hint: Try `php://stderr` for your stream URL.

20 */

21 class Mustache_Logger_StreamLogger extends Mustache_Logger_AbstractLogger

190

191 // interpolate replacement values into the the message and return

192 return strtr($message, $replace);

193 }

194 }

CodeFile.php (https://gitlab.com/isdzulqor/Slis-Dev) PHP · 194 lines

1 <?php

2 /**

3 * @link http://www.yiiframework.com/

18 * @property string $relativePath The code file path relative to the application base path. This property is

19 * read-only.

20 * @property string $type The code file extension (e.g. php, txt). This property is read-only.

21 *

22 * @author Qiang Xue <qiang.xue@gmail.com>

63 public function __construct($path, $content)

64 {

65 $this->path = strtr($path, '/\\', DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR);

66 $this->content = $content;

67 $this->id = md5($this->path);

115

116 /**

117 * @return string the code file extension (e.g. php, txt)

118 */

119 public function getType()

Container.php (https://github.com/leochaves/magento-pt_br.git) PHP · 206 lines

1 <?php

2 /**

3 * Magento

8 * that is bundled with this package in the file LICENSE.txt.

9 * It is also available through the world-wide-web at this URL:

10 * http://opensource.org/licenses/osl-3.0.php

11 * If you did not receive a copy of the license and are unable to

12 * obtain it through the world-wide-web, please send an email

22 * @package Mage_Adminhtml

23 * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)

24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)

25 */

26

174 public function getHeaderCssClass()

175 {

176 return 'head-' . strtr($this->_controller, '_', '-');

177 }

178

ClassLoader.php (https://bitbucket.org/galvani/flow-resque-board.git) PHP · 246 lines

1 <?php

2

3 /*

16 * ClassLoader implements a PSR-0 class loader

17 *

18 * See https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md

19 *

20 * $loader = new \Composer\Autoload\ClassLoader();

198 public function findFile($class)

199 {

200 // work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731

201 if ('\\' == $class[0]) {

202 $class = substr($class, 1);

217 }

218

219 $classPath .= strtr($className, '_', DIRECTORY_SEPARATOR) . '.php';

220

221 $first = $class[0];

format.php (https://github.com/nicolasconnault/moodle2.0.git) PHP · 151 lines

1 <?php // $Id: format.php,v 1.4 2007/03/20 02:23:12 pichetp Exp $

2 // Alton College, Hampshire, UK - Tom Flannaghan, Andrew Walker

3 // Imports learnwise multiple choice quizzes (single and multiple answers)

5 // deductions are currently simply found by dividing the award for the incorrect

6 // answer by the total number of options

7 // Based on format.php, included by ../../import.php

8 /**

9 * @package questionbank

144 $transtable = get_html_translation_table(HTML_ENTITIES);

145 $transtable = array_flip($transtable);

146 return strtr($string, $transtable);

147 }

148

UrlMatcherTest.php (https://bitbucket.org/hill2steve/mobileroom.git) PHP · 245 lines

1 <?php

2

3 /*

19 use Symfony\Component\Routing\RequestContext;

20

21 class UrlMatcherTest extends \PHPUnit_Framework_TestCase

22 {

23 public function testNoMethodSoAllowed()

167 $matcher = new UrlMatcher($collection, new RequestContext());

168 $this->assertEquals(array('_route' => 'foo', 'foo' => $chars), $matcher->match('/'.rawurlencode($chars).'/bar'));

169 $this->assertEquals(array('_route' => 'foo', 'foo' => $chars), $matcher->match('/'.strtr($chars, array('%' => '%25')).'/bar'));

170 }

171

UpdateCommand.php (https://github.com/genemu/GenemuDoctrineExtraBundle.git) PHP · 290 lines

1 <?php

2

3 /*

65 if ($dir = realpath($class->getPath().'/Controller')) {

66 $files = new Finder();

67 $files->files()->name('*Controller.php')->in($dir);

68

69 foreach ($files as $file) {

70 if ('Controller.php' !== $controllerName = $file->getBasename('Controller.php')) {

71 $ns = $class->getNamespace().'\\Controller';

72

73 if ($relativePath = $file->getRelativePath()) {

74 $ns .= '\\'.strtr($relativePath, array('/' => '\\'));

75 }

76

Url.php (https://bitbucket.org/acidel/buykoala.git) PHP · 131 lines

1 <?php

2 /**

3 * Magento

8 * that is bundled with this package in the file LICENSE.txt.

9 * It is also available through the world-wide-web at this URL:

10 * http://opensource.org/licenses/osl-3.0.php

11 * If you did not receive a copy of the license and are unable to

12 * obtain it through the world-wide-web, please send an email

22 * @package Mage_Catalog

23 * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)

24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)

25 */

26

127 public function format($string)

128 {

129 return strtr($string, $this->getConvertTable());

130 }

131 }

calendar.php (https://gitlab.com/x33n/ProjectPier-Core) PHP · 178 lines

18 ?>

19 <div class="calendar">

20 <h2><?php echo clean(lang(sprintf('month %u', $month))); ?> <?php echo $year; ?></h2>

21 <?php

76 }

77 ?>

78 <th class="<?php echo $dow_class; ?>"><?php echo clean(lang(sprintf('weekday short %u', $dow ))); ?></th>

79 <?php

119 ?>

120 <ul class="entries">

121 <?php

122 foreach ($calendar[$dom] as $obj) {

123 if (use_permitted(logged_user(), active_project(), 'tasks')) {

175 <div class="prev-month"><a href="<?php echo get_url('milestone', 'calendar', gmdate('Ym', $prevMonth)); ?>"><?php echo clean(lang(sprintf('month %u', gmdate('m', $prevMonth)))); ?> <?php echo gmdate('Y', $prevMonth); ?></a></div>

176 <div class="next-month"><a href="<?php echo get_url('milestone', 'calendar', gmdate('Ym', $nextMonth)); ?>"><?php echo clean(lang(sprintf('month %u', gmdate('m', $nextMonth)))); ?> <?php echo gmdate('Y', $nextMonth); ?></a></div>

177 </div>

178 </div>

ClassNotFoundFatalErrorHandler.php (https://gitlab.com/ealexis.t/trends) PHP · 206 lines

1 <?php

2

3 /*

134 private function findClassInPath($path, $class, $prefix)

135 {

136 if (!$path = realpath($path.'/'.strtr($prefix, '\\_', '//')) ?: realpath($path.'/'.dirname(strtr($prefix, '\\_', '//'))) ?: realpath($path)) {

137 return array();

138 }

139

140 $classes = array();

141 $filename = $class.'.php';

142 foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path, \RecursiveDirectoryIterator::SKIP_DOTS), \RecursiveIteratorIterator::LEAVES_ONLY) as $file) {

143 if ($filename == $file->getFileName() && $class = $this->convertFileToClass($path, $file->getPathName(), $prefix)) {

160 $candidates = array(

161 // namespaced class

162 $namespacedClass = str_replace(array($path.DIRECTORY_SEPARATOR, '.php', '/'), array('', '', '\\'), $file),

163 // namespaced class (with target dir)

164 $prefix.$namespacedClass,

Translator.php (https://github.com/stedekay/symfony.git) PHP · 212 lines

1 <?php

2

3 /*

126 }

127

128 return strtr($this->catalogues[$locale]->get((string) $id, $domain), $parameters);

129 }

130

156 }

157

158 return strtr($this->selector->choose($catalogue->get($id, $domain), (int) $number, $locale), $parameters);

159 }

160

TemplateListener.php (https://github.com/proclamo/txinbometro.git) PHP · 160 lines

1 <?php

2

3 namespace Sensio\Bundle\FrameworkExtraBundle\EventListener;

149 protected function getBundleForClass($class)

150 {

151 $namespace = strtr(dirname(strtr($class, '\\', '/')), '/', '\\');

152 foreach ($this->container->get('kernel')->getBundles() as $bundle) {

153 if (0 === strpos($namespace, $bundle->getNamespace())) {

ArchiveClassLoader.class.php (https://github.com/ghiata/xp-framework.git) PHP · 226 lines

1 <?php

2 /* This class is part of the XP framework

3 *

53 */

54 public function loadClassBytes($name) {

55 return file_get_contents($this->archive.strtr($name, '.', '/').xp::CLASS_FILE_EXT);

56 }

57

63 */

64 protected function classUri($class) {

65 return $this->archive.strtr($class, '.', '/').xp::CLASS_FILE_EXT;

66 }

67

75 if (0 !== substr_compare($uri, xp::CLASS_FILE_EXT, -strlen(xp::CLASS_FILE_EXT))) return NULL;

76

77 // Absolute URIs have the form "xar://containing.xar?the/classes/Name.class.php"

78 if ((DIRECTORY_SEPARATOR === $uri{0} || (':' === $uri{1} && '\\' === $uri{2}))) {

79 return NULL;

Request.php (https://github.com/papousek/zimodej-utils.git) PHP · 358 lines

1 <?php

2

3 /**

336

337 $s = strtolower($header); // case insensitive

338 $s = strtr($s, '_', '-'); // cs_CZ means cs-CZ

339 rsort($langs); // first more specific

340 preg_match_all('#(' . implode('|', $langs) . ')(?:-[^\s,;=]+)?\s*(?:;\s*q=([0-9.]+))?#', $s, $matches);

MssqlPlatform.php (https://github.com/coleHafner/coleandheather_dabl.git) PHP · 185 lines

1 <?php

2

3 /**

9 */

10

11 require_once dirname(__FILE__) . '/DefaultPlatform.php';

12 require_once dirname(__FILE__) . '/../model/Domain.php';

45 $this->setSchemaDomainMapping(new Domain(PropelTypes::BLOB, "VARBINARY(MAX)"));

46 $this->setSchemaDomainMapping(new Domain(PropelTypes::OBJECT, "VARCHAR(MAX)"));

47 $this->setSchemaDomainMapping(new Domain(PropelTypes::PHP_ARRAY, "VARCHAR(MAX)"));

48 $this->setSchemaDomainMapping(new Domain(PropelTypes::ENUM, "TINYINT"));

49 }

175 public function quoteIdentifier($text)

176 {

177 return $this->isIdentifierQuotingEnabled ? '[' . strtr($text, array('.' => '].[')) . ']' : $text;

178 }

179

AsseticNode.php (https://github.com/nattaphat/hgis.git) PHP · 166 lines

1 <?php

2

3 /*

142

143 $compiler

144 ->raw("strtr(")

145 ->string($asset->getTargetPath())

146 ->raw(", array(");

Exception.php (https://github.com/ratbird/hope.git) PHP · 382 lines

1 <?php

2

3 /*

304

305 // when in cli or not accessible via filesystem, don't generate links

306 if (PHP_SAPI == 'cli' || !Util::isPathAbsolute($path)) {

307 return $path;

308 }

309

310 return sprintf('<a href="%s" class="file-edit">%s</a>', htmlspecialchars(strtr(self::$fileEditUrlFormat, [

311 // allow more formats

312 '%f' => $path,

324 public function __toString()

325 {

326 return $this->toString(true, php_sapi_name() !== 'cli');

327 }

328

r8msgb.pas (https://github.com/r8/spacetoss.git) Pascal · 323 lines

224 begin

225 sTemp:=StrPas(pTemp);

226 sTemp:=strTrimL(sTemp,[#1]);

227

228 Kludge:=strUpper(strParser(sTemp,1,[#32]));

Set.php (https://bitbucket.org/pastor399/newcastleunifc.git) PHP · 106 lines

1 <?php

2 /*

3 * $Id: Set.php 48519 2012-02-03 23:18:52Z btowles $

25 * @package Doctrine

26 * @subpackage Query

27 * @license http://www.opensource.org/licenses/lgpl-license.php LGPL

28 * @link www.doctrine-project.org

29 * @since 1.0

75 }

76

77 return strtr($dql, $termsTranslation);

78 }

79

sfWidgetFormSelectRadio.class.php (https://github.com/frhumanes/PLM.git) PHP · 122 lines

1 <?php

2

3 /*

15 * @subpackage widget

16 * @author Fabien Potencier <fabien.potencier@symfony-project.com>

17 * @version SVN: $Id: sfWidgetFormSelectRadio.class.php 27738 2010-02-08 15:07:33Z Kris.Wallsmith $

18 */

19 class sfWidgetFormSelectRadio extends sfWidgetFormChoiceBase

73 foreach ($choices as $key => $option)

74 {

75 $parts[] = strtr($this->getOption('template'), array('%group%' => $key, '%options%' => $this->formatChoices($name, $value, $option, $attributes)));

76 }

77

File.php (https://gitlab.com/szlongshu/manaphp) PHP · 79 lines

1 <?php

2 namespace ManaPHP\Log\Adapter {

3

4 use ManaPHP\Log\AdapterInterface;

5

6 class File implements AdapterInterface

23

24 /**

25 * \ManaPHP\Log\Adapter\File constructor.

26 *

27 * @param string $file

68 }

69

70 $replaced['%message%'] = $message . PHP_EOL;

71

72 $log = strtr($this->_options['format'], $replaced);

CBreadcrumbs.php (https://bitbucket.org/rezanachmad/php-selenium-training.git) PHP · 132 lines

1 <?php

2 /**

3 * CBreadcrumbs class file.

73 *

74 * The following example will generate breadcrumbs as "Home > Sample post > Edit", where "Home" points to the homepage,

75 * "Sample post" points to the "index.php?r=post/view&id=12" page, and "Edit" is a label. Note that the "Home" link

76 * is specified via {@link homeLink} separately.

77 *

120 {

121 if(is_string($label) || is_array($url))

122 $links[]=strtr($this->activeLinkTemplate,array(

123 '{url}'=>CHtml::normalizeUrl($url),

124 '{label}'=>$this->encodeLabel ? CHtml::encode($label) : $label,

sfWidgetFormSchemaFormatter.class.php (https://github.com/bheneka/gitta.git) PHP · 346 lines

1 <?php

2

3 /*

45 public function formatRow($label, $field, $errors = array(), $help = '', $hiddenFields = null)

46 {

47 return strtr($this->getRowFormat(), array(

48 '%label%' => $label,

49 '%field%' => $field,

79 }

80

81 return strtr($subject, $parameters);

82 }

83

107 * @param mixed $callable

108 *

109 * @throws InvalidArgumentException if an invalid php callable or sfCallable has been provided

110 */

111 static public function setTranslationCallable($callable)

ClassDoc.class.php (https://github.com/oanas/xp-framework.git) PHP · 215 lines

1 <?php

2 /* This class is part of the XP framework

3 *

71 public function sourceFile() {

72 return $this->loader

73 ? $this->loader->getResourceAsStream(strtr($this->qualifiedName, '.', '/').xp::CLASS_FILE_EXT)

74 : NULL

75 ;

TTranslate.php (https://bitbucket.org/volatileeight/prado.git) PHP · 254 lines

1 <?php

2 /**

3 * TTranslate, I18N translation component.

236 //no translation handler provided

237 if(($config = $app->getTranslationConfiguration())===null)

238 return strtr($text, $subs);

239

240 $catalogue = $this->getCatalogue();

ErrorMessageTrait.php (https://github.com/inhere/php-validate.git) PHP · 461 lines

1 <?php declare(strict_types=1);

2

3 namespace Inhere\Validate\Traits;

16 use function is_string;

17 use function strpos;

18 use function strtr;

19

20 /**

322

323 if (!$message) { // use default

324 return strtr(GlobalMessage::getDefault(), $params);

325 }

326 } else {

344 }

345

346 return strtr($message, $params);

347 }

348

TbBaseMenu.php (https://bitbucket.org/sonnylazuardi/arta.git) PHP · 195 lines

1 <?php

2 /**

3 * TbBaseMenu class file.

4 * @author Christoffer Niska <ChristofferNiska@gmail.com>

5 * @copyright Copyright &copy; Christoffer Niska 2012-

6 * @license http://www.opensource.org/licenses/bsd-license.php New BSD License

7 * @package bootstrap.widgets

8 */

89 {

90 $template = isset($item['template']) ? $item['template'] : $this->itemTemplate;

91 echo strtr($template, array('{menu}' => $menu));

92 }

93 else

sfWidgetFormSelectCheckbox.class.php (https://github.com/yuya-takeyama/symfony-hackathon-20110924.git) PHP · 129 lines

1 <?php

2

3 /*

15 * @subpackage widget

16 * @author Fabien Potencier <fabien.potencier@symfony-project.com>

17 * @version SVN: $Id: sfWidgetFormSelectCheckbox.class.php 30762 2010-08-25 12:33:33Z fabien $

18 */

19 class sfWidgetFormSelectCheckbox extends sfWidgetFormChoiceBase

80 foreach ($choices as $key => $option)

81 {

82 $parts[] = strtr($this->getOption('template'), array('%group%' => $key, '%options%' => $this->formatChoices($name, $value, $option, $attributes)));

83 }

84

CHANGELOG.md (https://github.com/Cacti/cacti.git) Markdown · 135 lines

15 - Multiline extractions in jsCode [#200]

16 - Support for js template literals [#214]

17 - Fixed tabs in PHP comments [#215]

18

19 ## [4.6.2] - 2019-01-12

22

23 ### Fixed

24 - Added php-7.3 to travis

25 - Added VueJS extractor method docblocks for IDEs [#191]

26

43

44 ### Fixed

45 - Added php-7.2 to travis

46 - Fixed po tests on bigendian [#159]

47 - Improved comment estraction [#166]

sanitize.inc.php (http://myrpm.googlecode.com/svn/trunk/) PHP · 160 lines

1 <?php

2 ///////////////////////////////////////

3 // sanitize.inc.php

4 // Sanitization functions for PHP

5 // by: Gavin Zuchlinski, Jamie Pratt, Hokkaido

6 // webpage: http://libox.net

36

37 // internal function for utf8 decoding

38 // thanks to Jamie Pratt for noticing that PHP's function is a little

39 // screwy

40 function my_utf8_decode($string)

41 {

42 return strtr($string,

43 "??????????ÁÂ?Ä??Ç?É?Ë?ÍÎ????ÓÔ?Ö??Ú?ÜÝß?áâ?ä??ç?é?ë?íî????óô?ö??ú?üý?",

44 "SOZsozYYuAAAAAAACEEEEIIIIDNOOOOOOUUUUYsaaaaaaaceeeeiiiionoooooouuuuyy");

CustomController.php (https://github.com/rgranadino/magento-mirror.git) PHP · 206 lines

1 <?php

2 /**

3 * Magento

8 * that is bundled with this package in the file LICENSE.txt.

9 * It is also available through the world-wide-web at this URL:

10 * http://opensource.org/licenses/osl-3.0.php

11 * If you did not receive a copy of the license and are unable to

12 * obtain it through the world-wide-web, please send an email

22 * @package Mage_Connect

23 * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)

24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)

25 */

26

80 public function loadAction()

81 {

82 $packageName = base64_decode(strtr($this->getRequest()->getParam('id'), '-_,', '+/='));

83 if ($packageName) {

84 $session = Mage::getSingleton('connect/session');

livejournal.php (http://core.svn.wordpress.org/) PHP · 172 lines

1 <?php

2

3 class LJ_Import {

14 }

15

16 function unhtmlentities($string) { // From php.net for < 4.3 compat

17 $trans_tbl = get_html_translation_table(HTML_ENTITIES);

18 $trans_tbl = array_flip($trans_tbl);

19 return strtr($string, $trans_tbl);

20 }

21

22 function greet() {

23 echo '<p>'.__('Howdy! This importer allows you to extract posts from LiveJournal XML export file into your blog. Pick a LiveJournal file to upload and click Import.').'</p>';

24 wp_import_upload_form("admin.php?import=livejournal&amp;step=1");

25 }

26

RegistrationController.php (https://github.com/LosYear/FluentCMS.git) PHP · 56 lines

1 <?php

2 Yii::import('application.modules.registration.controllers.YumRegistrationController');

3 class RegistrationController extends YumRegistrationController

36

37 if (is_object($content)) {

38 $body = strtr('Hi, {email}, your new password is {password}. Please activate your account by clicking this link: {activation_url}', array(

39 '{email}' => $user->profile->email,

40 '{password}' => $password,

gravatar.php (https://github.com/mintbridge/kohana-gravatar.git) PHP · 282 lines

1 <?php defined('SYSPATH') or die('No direct script access.');

2 /**

3 * [Gravatar's](http://en.gravatar.com) are universal avatars available to all web sites and services.

11 * @author Kohana Team

12 * @copyright (c) 2009-2010 Kohana Team

13 * @license http://kohanaphp.com/license

14 */

15 class Kohana_Gravatar {

202 * Renders the Gravatar using supplied configuration and attributes. Can use custom view.

203 *

204 * @param string view [Optional] a kohana PHP

205 * @param string email [Optional] the valid email of a Gravatar user

206 * @return string the rendered Gravatar output

250 if ($this->_config['alt'])

251 {

252 $alt = strtr($this->_config['alt'], $keys);

253 }

254 else

fckeditor_php5.php (https://github.com/viglesiasce/testlink.git) PHP · 257 lines

1 <?php

2 /*

3 * FCKeditor - The text editor for Internet - http://www.fckeditor.net

20 * == END LICENSE ==

21 *

22 * This is the integration file for PHP 5.

23 *

24 * It defines the FCKeditor class that can be used to create editor

25 * instances in PHP pages on server side.

26 */

27

124 /**

125 * Main Constructor.

126 * Refer to the _samples/php directory for examples.

127 *

128 * @param string $instanceName

drupal.php (https://gitlab.com/ptisky/API_prestashop) PHP · 134 lines

1 <?php

2 /**

3 * Store Commander

112

113 global $user;

114 $_SESSION['KCFINDER']['uploadURL'] = strtr(variable_get('kcfinder_upload_url', 'sites/default/files/kcfinder'), array('%u' => $user->uid, '%n' => $user->name));

115 $_SESSION['KCFINDER']['uploadDir'] = strtr(variable_get('kcfinder_upload_dir', ''), array('%u' => $user->uid, '%n' => $user->name));

Git.php (https://github.com/ewandor/horde.git) PHP · 183 lines

1 <?php

2 /**

3 * Horde_Pear_Package_Contents_Ignore_Git:: indicates which files in a content

4 * listing should be ignored based on the contents from a .gitignore file.

5 *

6 * PHP version 5

7 *

8 * @category Horde

10 * @author Gunnar Wrobel <wrobel@pardus.de>

11 * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1

12 * @link http://pear.horde.org/index.php?package=Pear

13 */

14

26 * @author Gunnar Wrobel <wrobel@pardus.de>

27 * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1

28 * @link http://pear.horde.org/index.php?package=Pear

29 */

30 class Horde_Pear_Package_Contents_Ignore_Git

controller.php (https://bitbucket.org/pastor399/newcastleunifc.git) PHP · 129 lines

1 <?php

2 /**

3 * @version $Id$

11

12 jimport('joomla.application.component.controller');

13 include_once(JPATH_COMPONENT_ADMINISTRATOR.'/helpers/legacy_class.php');

14

15

54 public function display($cachable = false, $urlparams = false)

55 {

56 require_once JPATH_ADMINISTRATOR.'/components/com_modules/helpers/modules.php';

57

58 // Load the submenu.

68 $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id));

69 $this->setMessage($this->getError(), 'error');

70 $this->setRedirect(JRoute::_(sprintf('index.php?option=%s&view=modules',RokSprocket_Helper::getRedirectionOption()), false));

71

72 return false;

Mandango.php (https://github.com/brikou/mandango.git) PHP · 76 lines

1 <?php

2

3 /*

35 'mandango_id_generator' => new \Twig_Function_Method($this, 'mandangoIdGenerator'),

36 'mandango_type_to_mongo' => new \Twig_Function_Method($this, 'mandangoTypeToMongo'),

37 'mandango_type_to_php' => new \Twig_Function_Method($this, 'mandangoTypeToPHP'),

38 );

39 }

51 public function mandangoTypeToMongo($type, $from, $to)

52 {

53 return strtr(TypeContainer::get($type)->toMongoInString(), array(

54 '%from%' => $from,

55 '%to%' => $to,

59 public function mandangoTypeToPHP($type, $from, $to)

60 {

61 return strtr(TypeContainer::get($type)->toPHPInString(), array(

62 '%from%' => $from,

63 '%to%' => $to,

functions.php (https://github.com/Asherontas/Active-CMS.git) PHP · 167 lines

1 <?php

2 /**

3 * Functions

6 * @author wojoscripts.com

7 * @copyright 2010

8 * @version $Id: functions.php,v 1.00 2010-07-20 10:12:05 gewa Exp $

9 */

10

21 function iseditable($str)

22 {

23 $edit_file = array("php", "txt", "htm", "html", "php3", "asp", "xml", "css", "inc", "js");

24 for ($f = 0; $f < count($edit_file); $f++) {

25 if ($str == $edit_file[$f])

31 function isviewable($str)

32 {

33 $edit_file = array("php", "txt", "htm", "html", "php3", "asp", "xml", "css", "inc", "js");

34 for ($f = 0; $f < count($edit_file); $f++) {

35 if ($str == $edit_file[$f])

date.php (https://github.com/Canuckaholic/Pop-Digital.git) PHP · 206 lines

170 <input type="text" name="id" class="idvalue oneline option" /></td>

171

172 <td><code>class</code> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br />

173 <input type="text" name="class" class="classvalue oneline option" /></td>

174 </tr>

188

189 <tr>

190 <td><?php echo esc_html( __( 'Default value', 'contact-form-7' ) ); ?> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br /><input type="text" name="values" class="oneline" /></td>

191

192 <td>

196 </table>

197

198 <div class="tg-tag"><?php echo esc_html( __( "Copy this code and paste it into the form left.", 'contact-form-7' ) ); ?><br /><input type="text" name="<?php echo $type; ?>" class="tag wp-ui-text-highlight code" readonly="readonly" onfocus="this.select()" /></div>

199

200 <div class="tg-mail-tag"><?php echo esc_html( __( "And, put this code into the Mail fields below.", 'contact-form-7' ) ); ?><br /><input type="text" class="mail-tag wp-ui-text-highlight code" readonly="readonly" onfocus="this.select()" /></div>

MessageFormatter.php (https://github.com/livinglab/openlab.git) PHP · 49 lines

1 <?php

2

3 /*

38 return $this->translator->trans($message, $parameters, null, $locale);

39 }

40 return \strtr($message, $parameters);

41 }

42 /**

fckeditor_php5.php (https://github.com/Jonay/proyectinix.git) PHP · 211 lines

1 <?php

2 /*

3 * FCKeditor - The text editor for Internet - http://www.fckeditor.net

20 * == END LICENSE ==

21 *

22 * This is the integration file for PHP 5.

23 *

24 * It defines the FCKeditor class that can be used to create editor

25 * instances in PHP pages on server side.

26 */

27

78 /**

79 * Main Constructor.

80 * Refer to the _samples/php directory for examples.

81 *

82 * @param string $instanceName

TAP.php (https://gitlab.com/virtualrealms/d7civicrm) PHP · 256 lines

27 namespace Civi\Test;

28

29 class TAP extends \PHPUnit\Util\Printer implements \PHPUnit\Framework\TestListener {

30

31 /**

78 * @param float $time

79 */

80 public function addFailure(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\AssertionFailedError $e, $time) {

81 $this

82 ->writeNotOk($test, 'Failure');

170 * @since Method available since Release 3.0.0

171 */

172 public function addWarning(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\Warning $e, $time) {

173 $this

174 ->write(sprintf("ok %d - # Warning%s\n", $this->testNumber, $e

FormElement.php (https://bitbucket.org/khuongduybui/openfisma.git) PHP · 204 lines

1 <?php

2 /**

3 * Zend Framework

24 * @see Zend_View_Helper_HtmlElement

25 */

26 // require_once 'Zend/View/Helper/HtmlElement.php';

27

28 /**

67 $this->_translator = $translator->getAdapter();

68 } else {

69 // require_once 'Zend/View/Exception.php';

70 $e = new Zend_View_Exception('Invalid translator specified');

71 $e->setView($this->view);

144 $info['id'] = (string)$attribs['id'];

145 } else if ('' !== $info['name']) {

146 $info['id'] = trim(strtr($info['name'],

147 array('[' => '-', ']' => '')), '-');

148 }

FileResource.php (https://github.com/zeopix/TaskBoxx.git) PHP · 78 lines

1 <?php

2

3 /*

71 static private function createTemplateReference($bundle, $file)

72 {

73 $parts = explode('/', strtr($file, '\\', '/'));

74 $elements = explode('.', array_pop($parts));

75

Helper.php (https://github.com/soitun/minify.git) PHP · 250 lines

1 <?php

2 /**

3 * Class Minify_HTML_Helper

103 $file = substr($file, strlen(self::app()->env->getDocRoot()) + 1);

104 }

105 $file = strtr($file, '\\', '/');

106 $files[$k] = $file;

107 }

173 }

174 if ($cached === null) {

175 $cached = (require __DIR__ . '/../../../bootstrap.php');

176 }

177

Crypt.php (https://gitlab.com/leoplanxxi/dr7-web-buap-2016) PHP · 143 lines

1 <?php

2

3 /**

19 *

20 * This function is better than simply calling mt_rand() or any other built-in

21 * PHP function because it can return a long string of bytes (compared to < 4

22 * bytes normally from mt_rand()) and uses the best available pseudo-random

23 * source.

45 // systems and is considered cryptographically secure.

46 elseif ($fh = @fopen('/dev/urandom', 'rb')) {

47 // PHP only performs buffered reads, so in reality it will always read

48 // at least 4096 bytes. Thus, it costs nothing extra to read and store

49 // that much so as to speed any additional invocations.

67 $random_state = print_r($_SERVER, TRUE);

68 if (function_exists('getmypid')) {

69 // Further initialize with the somewhat random PHP process ID.

70 $random_state .= getmypid();

71 }

functions.php (https://bitbucket.org/pombredanne/spip-zone-treemap.git) PHP · 60 lines

1 <?php

2 /***********************************************************************

3 ** Title.........: Insert File Dialog, File Manager

5 ** Authors.......: Al Rashid <alrashid@klokan.sk>

6 ** Xiang Wei ZHUO <wei@zhuo.org>

7 ** Filename......: functions.php

8 ** URL...........: http://alrashid.klokan.sk/insFile/

9 ** Last changed..: 23 July 2004

38 $accent = ' "&()[]$%,?;:!\'';

39 $noaccent='AAAAAAaaaaaaOOOOOOooooooEEEEeeeeCcIIIIiiiiUUUUuuuuyNn-----------------';

40 $name = strtr($name,$accent,$noaccent);

41 $name = stripslashes($name);

42 return $name;

PwTenpay.php (https://gitlab.com/wuhang2003/phpwind) PHP · 73 lines

1 <?php

2 defined('WEKIT_VERSION') || exit('Forbidden');

3

8 *

9 * @author Jianmin Chen <sky_hold@163.com>

10 * @copyright ©2003-2103 phpwind.com

11 * @license http://www.phpwind.com

12 * @version $Id: PwTenpay.php 24975 2013-02-27 09:24:54Z jieyin $

13 * @package forum

14 */

40

41 public function getUrl(PwPayVo $vo) {

42 $strTransactionId = $vo->getOrderNo();

43 $strBillDate = substr($strTransactionId, 10, 8);

CacheProvider.php (https://github.com/israelnoguera/parejas.git) PHP · 189 lines

1 <?php

2

3 /*

134 $namespaceCacheKey = sprintf(self::DOCTRINE_NAMESPACE_CACHEKEY, $this->namespace);

135 $namespaceVersion = ($this->doContains($namespaceCacheKey)) ? $this->doFetch($namespaceCacheKey) : 1;

136 $idCacheKey = strtr($id, array('[' => '', ']' => ''));

137

138 return sprintf('%s[%s][%s]', $this->namespace, $id, $namespaceVersion);

Loader.php (https://github.com/jonathanslenders/balancirk-website.git) PHP · 147 lines

1 <?php

2

3 /**

49

50 // include class paths or rebuild paths if the cache file isn't there

51 $cacheFile = $this->cacheDir.'classpath.cache.d'.Dwoo::RELEASE_TAG.'.php';

52 if (file_exists($cacheFile)) {

53 $classpath = file_get_contents($cacheFile);

78 $this->rebuildClassPathCache($f, false);

79 } else {

80 $this->classPath[str_replace(array('function.','block.','modifier.','outputfilter.','filter.','prefilter.','postfilter.','pre.','post.','output.','shared.','helper.'), '', basename($f, '.php'))] = $f;

81 }

82 }

136 throw new Dwoo_Exception('Plugin directory does not exist or can not be read : '.$pluginDirectory);

137 }

138 $cacheFile = $this->cacheDir . 'classpath-'.substr(strtr($pluginDir, '/\\:'.PATH_SEPARATOR, '----'), strlen($pluginDir) > 80 ? -80 : 0).'.d'.Dwoo::RELEASE_TAG.'.php';

139 $this->paths[$pluginDir] = $cacheFile;

140 if (file_exists($cacheFile)) {

modifiercompiler.escape.php (https://github.com/usualoma/movabletype.git) PHP · 112 lines

1 <?php

2 /**

3 * Smarty plugin

29 array(

30 'function' => 'smarty_literal_compiler_param',

31 'file' => SMARTY_PLUGINS_DIR . 'shared.literal_compiler_param.php'

32 )

33 )

34 );

35 if ($_double_encode === null) {

36 $_double_encode = version_compare(PHP_VERSION, '5.2.3', '>=');

37 }

38 try {

51 return 'htmlspecialchars(' . $params[ 0 ] . ', ENT_QUOTES, ' . var_export($char_set, true) . ')';

52 } else {

53 // fall back to modifier.escape.php

54 }

55 // no break

form-tags-manager.php (https://gitlab.com/pankajmohale/chef2go) PHP · 355 lines

1 <?php

2

3 function wpcf7_add_form_tag( $tag, $func, $features = '' ) {

149

150 $attr = trim( preg_replace( '/[\r\n\t ]+/', ' ', $m[3] ) );

151 $attr = strtr( $attr, array( '<' => '&lt;', '>' => '&gt;' ) );

152

153 $content = trim( $m[5] );

SecurityPolicy.php (https://gitlab.com/dcnf/dcbase.org) PHP · 126 lines

1 <?php

2

3 /*

51 $this->allowedMethods = [];

52 foreach ($methods as $class => $m) {

53 $this->allowedMethods[$class] = array_map(function ($value) { return strtr($value, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'); }, \is_array($m) ? $m : [$m]);

54 }

55 }

93

94 $allowed = false;

95 $method = strtr($method, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz');

96 foreach ($this->allowedMethods as $class => $methods) {

97 if ($obj instanceof $class) {

FileLoader.php (https://gitlab.com/adam.kvita/MI-VMM-SIFT) PHP · 100 lines

1 <?php

2

3 /**

78 public function getUniqueId($file)

79 {

80 return $this->baseDir . strtr($file, '/', DIRECTORY_SEPARATOR);

81 }

82

88 {

89 $res = [];

90 foreach (explode('/', strtr($path, '\\', '/')) as $part) {

91 if ($part === '..' && $res) {

92 array_pop($res);

Language.php (https://github.com/bouthors/gallery3-contrib.git) PHP · 163 lines

1 <?php defined("SYSPATH") or die("No direct script access.");

2

3 /**

78 /**

79 * Retrieves a localised error name.

80 * @param $int integer error number, corresponding to PHP's error

81 * reporting

82 * @return string localised message

156 $subst['$' . $i] = $value;

157 }

158 return strtr($raw, $subst);

159 }

160

Builder.php (https://gitlab.com/milton2913/myBlog) PHP · 244 lines

1 <?php

2 /*

3 * This file is part of the php-code-coverage package.

4 *

5 * (c) Sebastian Bergmann <sebastian@phpunit.de>

6 *

7 * For the full copyright and license information, please view the LICENSE

69 * Array

70 * (

71 * [Money.php] => Array

72 * (

73 * ...

74 * )

75 *

76 * [MoneyBag.php] => Array

77 * (

78 * ...

Sogo.php (https://gitlab.com/rsilveira1987/Expresso) PHP · 152 lines

1 <?php

2 /**

3 * Tine 2.0

80

81 /**

82 * (non-PHPdoc)

83 * @see Addressbook_Convert_Contact_VCard_Abstract::toTine20Model()

84 */

88

89 if (!empty($contact->url)) {

90 $contact->url = strtr($contact->url, array('http\:' => 'http:'));

91 }

92 if (!empty($contact->url_home)) {

93 $contact->url_home = strtr($contact->url_home, array('http\:' => 'http:'));

94 }

95

ListProductTest.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 171 lines

1 <?php

2 /**

3 * Copyright © 2016 Magento. All rights reserved.

6 namespace Magento\Catalog\Test\Unit\Block\Product;

7

8 class ListProductTest extends \PHPUnit_Framework_TestCase

9 {

10 /**

14

15 /**

16 * @var \Magento\Framework\Registry|\PHPUnit_Framework_MockObject_MockObject

17 */

18 protected $registryMock;

19

20 /**

21 * @var \PHPUnit_Framework_MockObject_MockObject

22 */

23 protected $layerMock;

Template.php (https://gitlab.com/vanafroo/landingpage) PHP · 86 lines

1 <?php

2 /**

3 * Class MPCETemplate

59 }

60 } else {

61 $this->addError('content', strtr($motopressCELang->CEInvalidArgumentType, array('%name%' => gettype($content))));

62 }

63 }

xml_saxy_shared.php (https://github.com/MaBelleEcole/Main.git) PHP · 294 lines

1 <?php

2 /**

3 * SAXY_Parser_Base is a base class for SAXY and SAXY Lite

183 // Joomla! hack

184 if (isset( $this ) && $this->convertEntities && $maybeEntity) {

185 $valueDump = strtr($valueDump, $this->predefinedEntities);

186 $valueDump = strtr($valueDump, $this->definedEntities);

208 // Joomla! hack

209 if (isset( $this ) && $this->convertEntities && $maybeEntity) {

210 $valueDump = strtr($valueDump, $this->predefinedEntities);

211 $valueDump = strtr($valueDump, $this->definedEntities);

276 function fireCharacterDataEvent($data) {

277 if ($this->convertEntities && ((strpos($data, "&") != -1))) {

278 $data = strtr($data, $this->predefinedEntities);

279 $data = strtr($data, $this->definedEntities);

SystemAuthorizeTest.php (https://gitlab.com/geeta7/drupal) PHP · 65 lines

1 <?php

2

3 /**

11

12 /**

13 * Tests the authorize.php script and related API.

14 *

15 * @group system

32

33 /**

34 * Helper function to initialize authorize.php and load it via drupalGet().

35 *

36 * Initializing authorize.php needs to happen in the child Drupal

53 $this->drupalGetAuthorizePHP($page_title);

54 $this->assertTitle(strtr('@title | Drupal', array('@title' => $page_title)), 'authorize.php page title is correct.');

55 $this->assertNoText('It appears you have reached this page in error.');

56 $this->assertText('To continue, provide your server connection details');

plugin.php (https://gitlab.com/itlboy/yii2-starter-installed) PHP · 172 lines

1 <?php

2 /**

3 * elFinder Plugin Normalizer

7 * nfkc(NFKC): Compatibility Decomposition followed by Canonical

8 *

9 * This plugin require Class "Normalizer" (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)

10 * or PEAR package "I18N_UnicodeNormalizer"

11 *

147 } else {

148 if (! class_exists('I18N_UnicodeNormalizer', false)) {

149 include_once 'I18N/UnicodeNormalizer.php';

150 }

151 if (class_exists('I18N_UnicodeNormalizer', false)) {

159 }

160 if ($opts['convmap'] && is_array($opts['convmap'])) {

161 $str = strtr($str, $opts['convmap']);

162 }

163 if ($opts['lowercase']) {

format.php (https://bitbucket.org/ciceidev/cicei_moodle_conditional_activities.git) PHP · 151 lines

1 <?php // $Id$

2 // Alton College, Hampshire, UK - Tom Flannaghan, Andrew Walker

3 // Imports learnwise multiple choice quizzes (single and multiple answers)

5 // deductions are currently simply found by dividing the award for the incorrect

6 // answer by the total number of options

7 // Based on format.php, included by ../../import.php

8 /**

9 * @package questionbank

144 $transtable = get_html_translation_table(HTML_ENTITIES);

145 $transtable = array_flip($transtable);

146 return strtr($string, $transtable);

147 }

148

sfWidgetFormTime.class.php (https://github.com/yuya-takeyama/symfony-hackathon-20110924.git) PHP · 107 lines

1 <?php

2

3 /*

15 * @subpackage widget

16 * @author Fabien Potencier <fabien.potencier@symfony-project.com>

17 * @version SVN: $Id: sfWidgetFormTime.class.php 30762 2010-08-25 12:33:33Z fabien $

18 */

19 class sfWidgetFormTime extends sfWidgetForm

103 }

104

105 return strtr($this->getOption('with_seconds') ? $this->getOption('format') : $this->getOption('format_without_seconds'), $time);

106 }

107 }

Csrf.php (https://github.com/tmccormi/openemr.git) PHP · 378 lines

1 <?php

2 /**

3 * Zend Framework (http://framework.zend.com/)

240 return str_replace('\\', '_', __CLASS__) . '_'

241 . $this->getSalt() . '_'

242 . strtr($this->getName(), ['[' => '_', ']' => '']);

243 }

244

xpdoobject.class.php (https://github.com/esche/revolution.git) PHP · 73 lines

1 <?php

2 /*

3 * Copyright 2006-2010 by Jason Coward <xpdo@opengeek.com>

32 if (!class_exists('xPDOObject')) {

33 /** Include the parent {@link xPDOObject} class. */

34 include_once (strtr(realpath(dirname(__FILE__)), '\\', '/') . '/../xpdoobject.class.php');

35 }

36

Filesystem.php (https://bitbucket.org/prauscher/att.git) PHP · 221 lines

1 <?php

2

3 /*

167

168 // normalize name

169 $name = preg_replace('#/{2,}#', '/', strtr($name, '\\', '/'));

170

171 if (isset($this->cache[$name])) {

HttpContext.php (https://github.com/GunioRobot/IconStore.git) PHP · 103 lines

1 <?php

2

3 /**

50 $etag = $response->getHeader('ETag');

51

52 if ($etag == NULL || strpos(' ' . strtr($ifNoneMatch, ",\t", ' '), ' ' . $etag) === FALSE) {

53 return TRUE;

54

XmlDriver.php (https://github.com/simensen/symfony-cmf.git) PHP · 137 lines

1 <?php

2

3 namespace Symfony\Bundle\DoctrinePHPCRBundle\Mapping\Driver;

4

5 use Doctrine\ODM\PHPCR\Mapping\MappingException;

6 use Doctrine\ODM\PHPCR\Mapping\Driver\XmlDriver as BaseXmlDriver;

16 protected $globalBasename;

17 protected $classCache;

18 protected $fileExtension = '.phpcr.xml';

19

20 public function setGlobalBasename($file)

125 }

126

127 $filename = $path.'/'.strtr(substr($className, strlen($prefix)+1), '\\', '.').$this->fileExtension;

128 if (file_exists($filename)) {

129 return $filename;

Inflector.php (https://github.com/benjamindulau/AnoSystemBundle.git) PHP · 147 lines

1 <?php

2

3 namespace Ano\Bundle\SystemBundle;

143

144 // transliterate

145 return strtr($input, $charmap);

146 }

147 }

JStringTest.php (https://github.com/orware/joomla-platform.git) PHP · 439 lines

1 <?php

2 /**

3 * @package Joomla.UnitTest

8 */

9

10 require_once JPATH_PLATFORM.'/joomla/utilities/string.php';

11 require_once 'TestHelpers/JString-helper-dataset.php';

13 /**

14 * Test class for JString.

15 * Generated by PHPUnit on 2009-10-26 at 22:29:34.

16 */

17 class JStringTest extends PHPUnit_Framework_TestCase

223 public function testStrcasecmp($string1, $string2, $locale, $expect)

224 {

225 if (substr(php_uname(), 0, 6) == 'Darwin' &&

226 $locale != false) {

227 $this->markTestSkipped('Darwin bug prevents foreign conversion from working properly');

do_updatetask.php (https://bitbucket.org/isaaczhang/dotproject.git) PHP · 129 lines

1 <?php /* TASKS $Id: do_updatetask.php 6149 2012-01-09 11:58:40Z ajdonnison $ */

2 if (!defined('DP_BASE_DIR')) {

3 die('You should not access this file directly.');

35 '�'=>'U','�'=>'U',

36 '�'=>'N','�'=>'n');

37 $text = strtr($text,$trade);

38 $text = utf8_encode($text);

39

mysql4-upgrade-0.1.12-0.1.13.php (https://github.com/edmondscommerce/XAMPP-Magento-Demo-Site.git) PHP · 53 lines

1 <?php

2 /**

3 * Magento

8 * that is bundled with this package in the file LICENSE.txt.

9 * It is also available through the world-wide-web at this URL:

10 * http://opensource.org/licenses/osl-3.0.php

11 * If you did not receive a copy of the license and are unable to

12 * obtain it through the world-wide-web, please send an email

22 * @package Mage_Downloadable

23 * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)

24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)

25 */

26

46 $installer->getConnection()->update(

47 $installer->getTable('downloadable/link_purchased_item'),

48 array('link_hash' => strtr(base64_encode(microtime() . $row['purchased_id'] . $row['order_item_id'] . $row['product_id']), '+/=', '-_,')),

49 $installer->getConnection()->quoteInto('item_id = ?', $row['item_id'])

50 );

replaceMarkup.php (https://github.com/lapistano/FluentDOM.git) PHP · 156 lines

1 <?php

2

3 require('../../src/FluentDOM.php');

116 FluentDOM($node)

117 ->text(

118 strtr(FluentDOM($node)->text(), $this->_escapings

119 )

120 );

151 }

152 return $dom->createTextNode(

153 strtr($string, $this->_escapings)

154 );

155 }

Translator.php (https://gitlab.com/hoangduys4k5/laravelproject) PHP · 434 lines

1 <?php

2

3 namespace Illuminate\Translation;

223 }

224

225 return strtr($line, $shouldReplace);

226 }

227

mysql4-upgrade-0.1.12-0.1.13.php (https://github.com/tuteke/isaved.git) PHP · 53 lines

1 <?php

2 /**

3 * Magento

8 * that is bundled with this package in the file LICENSE.txt.

9 * It is also available through the world-wide-web at this URL:

10 * http://opensource.org/licenses/osl-3.0.php

11 * If you did not receive a copy of the license and are unable to

12 * obtain it through the world-wide-web, please send an email

22 * @package Mage_Downloadable

23 * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com)

24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)

25 */

26

46 $installer->getConnection()->update(

47 $installer->getTable('downloadable/link_purchased_item'),

48 array('link_hash' => strtr(base64_encode(microtime() . $row['purchased_id'] . $row['order_item_id'] . $row['product_id']), '+/=', '-_,')),

49 $installer->getConnection()->quoteInto('item_id = ?', $row['item_id'])

50 );

Context.php (https://gitlab.com/kubinos/writeoff) PHP · 103 lines

1 <?php

2

3 /**

56 $etag = $this->response->getHeader('ETag');

57

58 if ($etag == NULL || strpos(' ' . strtr($ifNoneMatch, ",\t", ' '), ' ' . $etag) === FALSE) {

59 return TRUE;

60

control.php (https://github.com/tomaszeman/ASPPHP.git) PHP · 303 lines

1 <?php

2

3 class Control

37 return $id;

38 //translate

39 return strtr($id, $sep, $csep);

40 }

41

query.php (https://github.com/leonardteo/INSE6530.git) PHP · 236 lines

1 <?php

2 /**

3 * Database query wrapper.

7 * @author Kohana Team

8 * @copyright (c) 2008-2009 Kohana Team

9 * @license http://kohanaphp.com/license

10 */

11

172

173 // Replace the values in the SQL

174 $sql = strtr($sql, $values);

175 }

176

AllClassesIterator.class.php (https://github.com/thekid/xp-experiments.git) PHP · 79 lines

1 <?php

2 /* This class is part of the XP framework

3 *

44 while (FALSE !== ($pos= strrpos($path, DIRECTORY_SEPARATOR))) {

45 if (isset($this->classpath[$path])) {

46 return strtr(substr($uri, strlen($path)+ 1, -10), DIRECTORY_SEPARATOR, '.');

47 }

48

SimplifiedYamlDriver.php (https://github.com/israelnoguera/parejas.git) PHP · 182 lines

1 <?php

2 /*

3 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS

170 }

171

172 $filename = $path.'/'.strtr(substr($className, strlen($prefix)+1), '\\', '.').$this->_fileExtension;

173 if (is_file($filename)) {

174 return $filename;

ArchiveClassLoader.class.php (https://github.com/treuter/xp-framework.git) PHP · 186 lines

1 <?php

2 /* This class is part of the XP framework

3 *

52 */

53 public function loadClassBytes($name) {

54 return file_get_contents($this->archive.strtr($name, '.', '/').xp::CLASS_FILE_EXT);

55 }

56

62 */

63 protected function classUri($class) {

64 return $this->archive.strtr($class, '.', '/').xp::CLASS_FILE_EXT;

65 }

66

99 */

100 public function providesClass($class) {

101 return file_exists($this->archive.strtr($class, '.', '/').xp::CLASS_FILE_EXT);

102 }

103