100+ results for '$PATH repo:enurkov/prestashop'

Not the results you expected?

PropertyPathCollectionTest.php (https://github.com/Exercise/symfony.git) PHP · 185 lines

77 $axesAfter = $this->getCollection(array(0 => 'first', 1 => 'second', 2 => 'third'));

78

79 $path = new PropertyPath('axes');

80

81 $car->expects($this->at(0))

92 ->with('third');

93

94 $path->setValue($car, $axesAfter);

95 }

96

102 $axesAfter = $this->getCollection(array(0 => 'first', 1 => 'second', 2 => 'third'));

103

104 $path = new PropertyPath('structure.axes');

105

106 $car->expects($this->any())

Link.php (https://gitlab.com/judielsm/Handora) PHP · 232 lines

127 $path = parse_url(substr($this->currentUri, strlen($baseUri)), PHP_URL_PATH);

128 $path = $this->canonicalizePath(substr($path, 0, strrpos($path, '/')).'/'.$uri);

129

130 return $baseUri.('' === $path || '/' !== $path[0] ? '/' : '').$path;

144 * Returns the canonicalized URI path (see RFC 3986, section 5.2.4).

145 *

146 * @param string $path URI path

147 *

148 * @return string

150 protected function canonicalizePath($path)

151 {

152 if ('' === $path || '/' === $path) {

153 return $path;

154 }

155

156 if ('.' === substr($path, -1)) {

157 $path .= '/';

fn.filter.html (https://github.com/RubyLouvre/mass-Framework.git) HTML · 149 lines

7 <title>$.fn.filter</title>

8 <script>

9 window.$$path = location.protocol + "//" + location.host;

10 document.write('<script src="' + $$path + '/mass_merge.js"><\/script>')

11 document.write('<script src="' + $$path + '/doc/scripts/common.js"><\/script>')

12 </script>

13 </head>

automatic.php (https://github.com/kamarulismail/kamarul-playground.git) PHP · 168 lines

12 *

13 * An object of this class is meant to be used in {@link

14 * ezcWebdavTransportOptions} as the $pathFactory property. The instance of

15 * {@link ezcWebdavTransport} utilizes the path factory to translate between

16 * external paths/URIs and internal path representations.

124 else

125 {

126 $path = $requestPath;

127 $this->serverFile = '';

128 }

130 if ( substr( $path, -1, 1 ) === '/' )

131 {

132 $path = substr( $path, 0, -1 );

133 $this->collectionPathes[$path] = true;

138 }

139

140 return ( is_string( $path ) && $path !== '' ? $path : '/' );

141 }

142

Logger.php (https://gitlab.com/Erdrix/overviewCompanies) PHP · 186 lines

18 * @var mixed

19 */

20 private $path;

21

22 //////////////////////////

76 // Log error here

77 if ($this->path) {

78 $path = $this->path . DS . date('m-d-Y') . '.log';

79 file_put_contents($path,

80 '[' . date('H:i:s') . '] Erreur dans le fichier ' . $e->getFile() . ' a la ligne ' . $e->getLine() . "\n " . $e->getMessage() . "\n",

81 FILE_APPEND);

82 chmod($path, octdec('0' . $this->permission));

83 }

84

ConvertCurrency.php (https://gitlab.com/CORP-RESELLER/codesamples-php) PHP · 156 lines

1 <?php

2 $path = '../../lib';

3 set_include_path(get_include_path() . PATH_SEPARATOR . $path);

Chain.php (https://github.com/MontmereLimited/ZendFramework-v1.git) PHP · 173 lines

73 public function match($request, $partial = null)

74 {

75 $path = trim($request->getPathInfo(), self::URI_DELIMITER);

76 $subPath = $path;

115 }

116

117 $request->setPathInfo($path);

118

119 if ($subPath !== '' && $subPath !== false) {

Page.php (https://bitbucket.org/acidel/buykoala.git) PHP · 168 lines

86 }

87

88 protected function _buildMenuArray(Varien_Simplexml_Element $parent=null, $path='', $level=0)

89 {

90 if (is_null($parent)) {

112

113 $menuArr['level'] = $level;

114 $menuArr['path'] = $path . $childName;

115

116 if ($child->children) {

117 $menuArr['children'] = $this->_buildMenuArray($child->children, $path.$childName.'/', $level+1);

118 }

119 $parentArr[$childName] = $menuArr;

viewdiff.sh (https://bitbucket.org/vrrm/brl-cad-copy-for-fast-history-browsing-in-git.git) Shell · 183 lines

60 # it is. PIX environment variable overrides

61 if test "x${PIX}" = "x" ; then

62 if test -f "$path_to_this/../pix/sphflake.pix" ; then

63 echo ...found .pix image files in $path_to_this/../pix

64 PIX="$path_to_this/../pix"

65 elif test -f "$path_to_this/sphflake.pix" ; then

66 echo ...found .pix image files in $path_to_this

67 PIX="$path_to_this"

68 elif test -f "$path_to_this/../share/brlcad/pix/sphflake.pix" ; then

69 echo ...found .pix image files in $path_to_this/../share/brlcad/pix

70 PIX="$path_to_this/../share/brlcad/pix"

71 fi

72 else

ZipStreamWrapper.php (https://gitlab.com/team_fsn/fsn-php) PHP · 201 lines

74 * Implements support for fopen().

75 *

76 * @param string $path resource name including scheme, e.g.

77 * @param string $mode only "r" is supported

78 * @param int $options mask of STREAM_REPORT_ERRORS and STREAM_USE_PATH

80 * @return bool true on success

81 */

82 public function stream_open($path, $mode, $options, &$opened_path) {

83 // Check for mode

84 if ($mode{0} != 'r') {

86 }

87

88 $pos = strrpos($path, '#');

89 $url['host'] = substr($path, 6, $pos - 6); // 6: strlen('zip://')

90 $url['fragment'] = substr($path, $pos + 1);

91

92 // Open archive

dashboard.php (https://bitbucket.org/prat_h/rakbuku.git) PHP · 161 lines

122 ------------------------------------------------------------------------*/

123

124 public function paginating($mdl, $path, $urisegment, $perpage)

125 {

126 $config['base_url'] = site_url($path);

139 }

140

141 public function paginating_project($mdl, $path, $urisegment, $perpage) {

142 $config['base_url'] = site_url($path);

CreateCustomTargetingKeysAndValues.php (https://github.com/markvince/CakePHP-GAStats-Plugin.git) PHP · 147 lines

33 // You can set the include path to src directory or reference

34 // DfpUser.php directly via require_once.

35 // $path = '/path/to/dfp_api_php_lib/src';

36 $path = dirname(__FILE__) . '/../../../../src';

37 set_include_path(get_include_path() . PATH_SEPARATOR . $path);

38

39 require_once 'Google/Api/Ads/Dfp/Lib/DfpUser.php';

class.session.php (https://github.com/picoder/Deltus.git) PHP · 229 lines

117 if($file != '.' && $file != '..' && $file != $this->gcCounterFileName && $file != $this->gcLogFileName && $file != session_id() )

118 {

119 $path=$this->dir.$file;

120 $output .= $path ;

121 //check if this is a expired session file

122 if(filemtime($path) + $this->lifeTime < time())

123 {

124 if($fo->delete($path))

155 if($file != '.' && $file != '..')

156 {

157 $path=CONFIG_SYS_ROOT_PATH.$file;

158 $output .= $path ;

159 //check if this is a expired session file

160 if(filemtime($path) + $this->lifeTime < time())

161 {

162 if($fo->delete($path))

Minify.php (https://github.com/picoder/Deltus.git) PHP · 235 lines

165 }

166

167 $path_info = pathinfo($file, PATHINFO_BASENAME); // Referal File and path

168

169 if ($type == 'css')

176 $contents .= '@charset "'.$css_charset.'";'."\n";

177 }

178 $contents .= "\n".'/* @fileRef '.$path_info.' */'."\n";

179 $contents .= $this->css->min($file, $compact, $is_aggregated = TRUE);

180 }

182 {

183 unset($css_charset);

184 $contents .= "\n".'// @fileRef '.$path_info.' '."\n";

185 $contents .= $this->js->min($file, $compact);

186 }

IOStat.pm (https://github.com/frett/MogileFS-Server.git) Perl · 157 lines

101 # returns hashref of { 5 => dev_t device } # mog_devid -> os_devid

102 sub mog_sysid_map {

103 my $path = $docroot;

104 $path =~ s!/$!!;

106 # find all devices below us

107 my @devnum; # integer ids

108 opendir(my $d, $path) or die "Failed to open docroot: $path: $!";

109 @devnum = map { /^dev(\d+)$/ ? $1 : () } readdir($d);

110

111 my $map = {};

112 foreach my $mogdevid (@devnum) {

113 my ($osdevid) = (stat("$path/dev$mogdevid"))[0];

114 $map->{$mogdevid} = $osdevid;

115 }

TwigExtension.php (https://gitlab.com/mohamedchiheb.bida/workshopFOS) PHP · 153 lines

61

62 // register user-configured paths

63 foreach ($config['paths'] as $path => $namespace) {

64 if (!$namespace) {

65 $twigFilesystemLoaderDefinition->addMethodCall('addPath', array($path));

66 } else {

67 $twigFilesystemLoaderDefinition->addMethodCall('addPath', array($path, $namespace));

68 }

69 }

Controller.php (https://github.com/volcanicpixels/Lava.git) PHP · 179 lines

76

77 function _load_extension( $extension_id ) {

78 $path = $this->_get_extension_path( $extension_id );

79 //check whether an extension.php file exists

80

81 $args = array(

82 $this,

83 $path,

84 $extension_id

85 );

131 if( file_exists( $path . '/' . $this->_get_controller_namespace() . '.yaml' ) ) {

132

133 $path_debris = explode( '/', $this->_path( $path ) );

134 $extension_dir_name = end( $path_debris );

149 foreach( $custom_extension_paths as $path ) {

150 $path = explode( '/', $this->_path( $path ) );

151 $extension_id = 'custom.' . end( $path );

MemberRepository.php (https://gitlab.com/tetrapak07/vimm-me) PHP · 194 lines

111 public function makeUserDir($param = '') {

112 $memberId = $this->getThisMember()[0]['id'];

113 $path = 'uploads/' . $memberId . $param;

114 if (!File::exists($path)) {

115 File::makeDirectory($path, $mode = 0777, true, true);

116 File::makeDirectory($path . '/tmp', $mode = 0777, true, true);

117 }

118 if (!File::exists($path)) {

119 return false;

120 } else {

121 return $path;

122 }

123 }

Markdown.hs (https://github.com/roman/noomii-crawler.git) Haskell · 173 lines

34 instance Show PandocMissingException where

35 show PandocMissingException =

36 "Cannot find the \"pandoc\" executable; is it on your $PATH?"

37

38 instance Exception PandocMissingException

TemplateNameParserTest.php (https://gitlab.com/cuza/Clinic_Recods) PHP · 89 lines

46 * @dataProvider parseProvider

47 */

48 public function testParse($name, $logicalName, $path, $ref)

49 {

50 $template = $this->parser->parse($name);

52 $this->assertSame($ref->getLogicalName(), $template->getLogicalName());

53 $this->assertSame($logicalName, $template->getLogicalName());

54 $this->assertSame($path, $template->getPath());

55 }

56

Driver.php (https://bitbucket.org/myockey/clearcreek-chapel-website.git) PHP · 229 lines

51 {

52 // check application path first

53 foreach (get_instance()->load->get_package_paths(TRUE) as $path)

54 {

55 // and check for case sensitivity of both the parent and child libs

59 foreach (array(ucfirst($child_class), strtolower($child_class)) as $class)

60 {

61 $filepath = $path.'libraries/'.$this->lib_name.'/drivers/'.$child_class.'.php';

62

63 if (file_exists($filepath))

Chain.php (https://github.com/orchestra-io/sample-openx.git) PHP · 168 lines

72 public function match($request, $partial = null)

73 {

74 $path = trim($request->getPathInfo(), '/');

75 $subPath = $path;

110 }

111

112 $request->setPathInfo($path);

113

114 if ($subPath !== '' && $subPath !== false) {

Object.php (https://github.com/gryzz/crystal_magento.git) PHP · 262 lines

14 * Constructor

15 *

16 * @param string $path - path to directory

17 * @return none

18 */

19 public function __construct($path)

20 {

21 parent::__construct($path);

22 $this->_path=$path;

23 $this->_filename=basename($path);

50 * add file path to array

51 *

52 * @param array &$paths - array of paths

53 * @return none

54 */

Router.php (https://github.com/deviantintegral/symfony.git) PHP · 384 lines

244 * {@inheritdoc}

245 */

246 public function match($pathinfo)

247 {

248 return $this->getMatcher()->match($pathinfo);

Cookie.php (https://gitlab.com/x33n/respond) PHP · 513 lines

160 * Set the path of the cookie

161 *

162 * @param string $path Path of the cookie

163 *

164 * @return Cookie

165 */

166 public function setPath($path)

167 {

168 return $this->setData('path', $path);

407 * Check if the cookie matches a path value

408 *

409 * @param string $path Path to check against

410 *

411 * @return bool

ms-settings.php (https://github.com/meanlumberjack/First-Estate.git) PHP · 132 lines

43 $path = preg_replace( '|([a-z0-9-]+.php.*)|', '', $_SERVER['REQUEST_URI'] );

44 $path = str_replace ( '/wp-admin/', '/', $path );

45 $path = preg_replace( '|(/[a-z0-9-]+?/).*|', '$1', $path );

63 $blogname = substr( $domain, 0, strpos( $domain, '.' ) );

64 } else {

65 $blogname = htmlspecialchars( substr( $_SERVER[ 'REQUEST_URI' ], strlen( $path ) ) );

66 if ( false !== strpos( $blogname, '/' ) )

67 $blogname = substr( $blogname, 0, strpos( $blogname, '/' ) );

70 $reserved_blognames = array( 'page', 'comments', 'blog', 'wp-admin', 'wp-includes', 'wp-content', 'files', 'feed' );

71 if ( $blogname != '' && ! in_array( $blogname, $reserved_blognames ) && ! is_file( $blogname ) )

72 $path .= $blogname . '/';

73 $current_blog = wp_cache_get( 'current_blog_' . $domain . $path, 'site-options' );

74 if ( ! $current_blog ) {

75 $current_blog = get_blog_details( array( 'domain' => $domain, 'path' => $path ), false );

76 if ( $current_blog )

77 wp_cache_set( 'current_blog_' . $domain . $path, $current_blog, 'site-options' );

NestedArrayAccess.php (https://gitlab.com/ricardosanchez/prueba) PHP · 190 lines

27 public function get($name, $default = null, $separator = null)

28 {

29 $path = explode($separator ?: $this->nestedSeparator, $name);

30 $current = $this->items;

31 foreach ($path as $field) {

54 public function set($name, $value, $separator = null)

55 {

56 $path = explode($separator ?: $this->nestedSeparator, $name);

57 $current = &$this->items;

58 foreach ($path as $field) {

96 }

97

98 $path = explode($separator ?: $this->nestedSeparator, $name);

99 $var = array_pop($path);

100 $current = &$this->items;

101

102 foreach ($path as $field) {

103 if (is_object($current)) {

104 // Handle objects.

Category.php (https://github.com/pabloveintimilla/core.git) PHP · 275 lines

94 * @var string

95 */

96 private $path;

97

98 /**

227 }

228

229 public function setPath($path)

230 {

231 $this->path = $path;

html.php (https://github.com/andreatarr/joomla-cms.git) PHP · 224 lines

53 *

54 * @param JModel $model The model object.

55 * @param SplPriorityQueue $paths The paths queue.

56 *

57 * @since 3.2

58 */

59 public function __construct(JModel $model, SplPriorityQueue $paths = null)

60 {

61 $app = JFactory::getApplication();

63 $component = preg_replace('/[^A-Z0-9_\.-]/i', '', $component);

64

65 if (isset($paths))

66 {

67 $paths->insert(JPATH_THEMES . '/' . $app->getTemplate() . '/html/' . $component . '/' . $this->getName(), 2);

keychain.php (https://github.com/andreatarr/joomla-cms.git) PHP · 200 lines

64 * Delete a registry value (very simple method)

65 *

66 * @param string $path Registry Path (e.g. joomla.content.showauthor)

67 *

68 * @return mixed Value of old value or boolean false if operation failed

70 * @since 12.3

71 */

72 public function deleteValue($path)

73 {

74 $result = null;

75

76 // Explode the registry path into an array

77 $nodes = explode('.', $path);

78

79 if ($nodes)

UnregisteredLocalFile.php (https://gitlab.com/link233/bootmw) PHP · 227 lines

39

40 /** @var string */

41 protected $path;

42

43 /** @var bool|string */

54

55 /**

56 * @param string $path Storage path

57 * @param string $mime

58 * @return UnregisteredLocalFile

59 */

60 static function newFromPath( $path, $mime ) {

61 return new self( false, false, $path, $mime );

78 * @param Title|bool $title

79 * @param FileRepo|bool $repo

80 * @param string|bool $path

81 * @param string|bool $mime

82 */

Assets.php (https://github.com/ChuguluGames/mediawiki-svn.git) PHP · 414 lines

128 public function history( $path ) {

129 $asset = DataCenterDB::getAsset( $path['type'], $path['id'] );

130 return DataCenterUI::renderLayout(

131 'columns',

185 }

186 // Gets asset from database

187 $asset = DataCenterDB::getAsset( $path['type'], $path['id'] );

188 // Gets location asset is in from database

189 $location = $asset->getLocation();

250 }

251

252 public function design( $path ) {

253 $options = DataCenterViewModels::$options[$path['type']];

326 } else {

327 // Gets asset from database

328 $asset = DataCenterDB::getAsset( $path['type'], $path['id'] );

329 // Sets 'do' specific parameters

330 $formParameters = array(

ConfigurationTest.php (https://github.com/asm89/doctrine2.git) PHP · 288 lines

63 public function testNewDefaultAnnotationDriver()

64 {

65 $paths = array(__DIR__);

66 $reflectionClass = new ReflectionClass(__NAMESPACE__ . '\ConfigurationTestAnnotationReaderChecker');

67

68 $annotationDriver = $this->configuration->newDefaultAnnotationDriver($paths, false);

69 $reader = $annotationDriver->getReader();

70 $annotation = $reader->getMethodAnnotation(

74 $this->assertInstanceOf('Doctrine\ORM\Mapping\PrePersist', $annotation);

75

76 $annotationDriver = $this->configuration->newDefaultAnnotationDriver($paths);

77 $reader = $annotationDriver->getReader();

78 $annotation = $reader->getMethodAnnotation(

Config.php (https://github.com/mrclay/Elgg-leaf.git) PHP · 259 lines

12 class Config {

13 private $baseUrl = '';

14 private $paths = [];

15 private $shim = [];

16 private $dependencies = [];

45 *

46 * @param string $name Module name

47 * @param string $path Full URL of the module

48 * @return void

49 */

51 if (preg_match("/\.js$/", $path)) {

52 $path = preg_replace("/\.js$/", '', $path);

53 }

54

73 if (preg_match("/\.js$/", $path)) {

74 $path = preg_replace("/\.js$/", '', $path);

75 }

76

template.php (https://github.com/discoverygarden/coalliance-theme.git) PHP · 156 lines

67 * Implementation of HOOK_theme().

68 */

69 function pjcpl_theme(&$existing, $type, $theme, $path) {

70 $hooks = coalliance_theme($existing, $type, $theme, $path);

template.php (https://github.com/discoverygarden/coalliance-theme.git) PHP · 156 lines

67 * Implementation of HOOK_theme().

68 */

69 function pdacc_theme(&$existing, $type, $theme, $path) {

70 $hooks = coalliance_theme($existing, $type, $theme, $path);

template.php (https://github.com/discoverygarden/coalliance-theme.git) PHP · 156 lines

67 * Implementation of HOOK_theme().

68 */

69 function mscdr_theme(&$existing, $type, $theme, $path) {

70 $hooks = coalliance_theme($existing, $type, $theme, $path);

template.php (https://github.com/discoverygarden/coalliance-theme.git) PHP · 156 lines

67 * Implementation of HOOK_theme().

68 */

69 function gopig_theme(&$existing, $type, $theme, $path) {

70 $hooks = coalliance_theme($existing, $type, $theme, $path);

template.php (https://github.com/discoverygarden/coalliance-theme.git) PHP · 156 lines

67 * Implementation of HOOK_theme().

68 */

69 function cdpsm_theme(&$existing, $type, $theme, $path) {

70 $hooks = coalliance_theme($existing, $type, $theme, $path);

grade-lab6.sh (https://github.com/sandesh247/cse506-lab.git) Shell · 253 lines

4 . ./grade-functions.sh

5

6 TCPDUMP=`PATH=$PATH:/usr/sbin:/sbin which tcpdump`

7 if [ x$TCPDUMP = x ]; then

8 echo "Unable to find tcpdump in path, /usr/sbin, or /sbin" >&2

string.php (https://bitbucket.org/pastor399/newcastleunifc.git) PHP · 298 lines

39 * @since 12.1

40 */

41 protected $path;

42

43 /**

98 * Method to open a file or URL.

99 *

100 * @param string $path The stream path.

101 * @param string $mode Not used.

102 * @param integer $options Not used.

107 * @since 11.1

108 */

109 public function stream_open($path, $mode, $options, &$opened_path)

110 {

111 $this->currentString = &JStringController::getRef(str_replace('string://', '', $path));

converterhelper_test.php (https://bitbucket.org/kudutest1/moodlegit.git) PHP · 145 lines

49 // no converters available

50 $descriptions = array();

51 $path = testable_convert_helper::choose_conversion_path(backup::FORMAT_MOODLE1, $descriptions);

52 $this->assertEquals($path, array());

67 ),

68 );

69 $path = testable_convert_helper::choose_conversion_path(backup::FORMAT_MOODLE1, $descriptions);

70 $this->assertEquals($path, array());

71

72 $path = testable_convert_helper::choose_conversion_path('some_other_custom_format', $descriptions);

73 $this->assertEquals($path, array());

74

75 // single step conversion

76 $path = testable_convert_helper::choose_conversion_path('yet_another_crazy_custom_format', $descriptions);

77 $this->assertEquals($path, array('converter'));

Util.php (https://github.com/silexlabs/amfphp-2.0.git) PHP · 166 lines

132 if ($item != '.' && $item != '..') {

133 // we build the new path to delete

134 $path = $directory . '/' . $item;

135

136 // if the new path is a directory

137 if (is_dir($path)) {

138 // we call this function with the new path

139 self::recursive_remove_directory($path);

142 } else {

143 // we remove the file

144 unlink($path);

145 }

146 }

S3.php (https://bitbucket.org/Dal-Papa/is-340-publish-base.git) PHP · 332 lines

101 * @TODO Support streams

102 *

103 * @param string $path

104 * @param array $options

105 * @return string

106 */

107 public function fetchItem($path, $options = array())

108 {

109 $fullPath = $this->_getFullPath($path, $options);

149 * Delete an item in the storage service.

150 *

151 * @param string $path

152 * @param array $options

153 * @return void

template.php (https://github.com/roblib/cairntheme.git) PHP · 156 lines

67 * Implementation of HOOK_theme().

68 */

69 function unbsj_theme(&$existing, $type, $theme, $path) {

70 $hooks = cairntheme_theme($existing, $type, $theme, $path);

template.php (https://github.com/roblib/cairntheme.git) PHP · 156 lines

67 * Implementation of HOOK_theme().

68 */

69 function nscad_theme(&$existing, $type, $theme, $path) {

70 $hooks = cairntheme_theme($existing, $type, $theme, $path);

template.php (https://github.com/roblib/cairntheme.git) PHP · 156 lines

67 * Implementation of HOOK_theme().

68 */

69 function cairn_theme(&$existing, $type, $theme, $path) {

70 $hooks = cairntheme_theme($existing, $type, $theme, $path);

HttpRequest.pm (https://github.com/yizumi/zbserver.git) Perl · 212 lines

7 my $init = 0;

8 my $cache_subscription_header = "Content-Type: application/json\nCache-Control: non-cache\nProgma: no-cache\n\n";

9 my $path = "./htdocs";

10

11 my $MIME = {

24 sub init

25 {

26 open FH, "< $path/SubscriptionHeader.html";

27 while( <FH> ) {

28 $cache_subscription_header .= $_;

171 my( $self, $file ) = @_;

172 my( $ext ) = $file =~ /\.([A-Z0-9]+)$/i;

173 my $size = -s "$path/$file";

174 my $data = "HTTP/".$self->{http_version}." 200 OK\nContent-Type: ".

175 $MIME->{$ext}."\nContent-Length: $size\nCache-Control: non-cache\nProgma: no-chace\nExpires: Thu, 01 Dec 1994 16:00:00 GMT\n\n";

broken_testfiltermanager.php (https://github.com/nigeldaley/moodle.git) PHP · 134 lines

75

76 /** Basically does file_put_contents, but ensures the directory exists first. */

77 protected function write_file($path, $content) {

78 global $CFG;

79 make_upload_directory(str_replace($CFG->dataroot . '/', '', dirname($path)));

80 file_put_contents($path, $content);

81 }

82

cuztom.class.php (https://bitbucket.org/yoan_marchal/wordpress-cuztom-helper.git) PHP · 274 lines

231 * Recursive method to determine the path to the Cuztom folder

232 *

233 * @param string $path

234 * @return string

235 *

238 *

239 */

240 function _determine_cuztom_url( $path = __FILE__ )

241 {

242 if( defined( 'CUZTOM_URL' ) && CUZTOM_URL != '' )

246 else

247 {

248 $path = dirname( $path );

249 $path = str_replace( '\\', '/', $path );

261 foreach( $directories as $dir )

262 {

263 $path = $path . '/' . $dir;

264 }

265

Cookie.php (https://gitlab.com/szlongshu/manaphp) PHP · 251 lines

43 * @param mixed $value

44 * @param int $expire

45 * @param string $path

46 * @param boolean $secure

47 * @param string $domain

52 $value = null,

53 $expire = null,

54 $path = null,

55 $secure = null,

56 $domain = null,

60 $this->_value = $value;

61 $this->_expire = $expire;

62 $this->_path = $path;

63 $this->_secure = $secure;

64 $this->_domain = $domain;

url_matcher1.php (https://github.com/Faianca/symfony.git) PHP · 169 lines

24 {

25 $allow = array();

26 $pathinfo = urldecode($pathinfo);

27

28 // foo

29 if (0 === strpos($pathinfo, '/foo') && preg_match('#^/foo/(?P<bar>baz|symfony)$#xs', $pathinfo, $matches)) {

30 return array_merge($this->mergeDefaults($matches, array ( 'def' => 'test',)), array('_route' => 'foo'));

31 }

69

70 // baz4

71 if (0 === strpos($pathinfo, '/test') && preg_match('#^/test/(?P<foo>[^/]+?)/$#xs', $pathinfo, $matches)) {

72 $matches['_route'] = 'baz4';

73 return $matches;

Css2Xpath.php (https://github.com/eschabell/openshift-zendframework.git) PHP · 169 lines

38 public static function transform($path)

39 {

40 $path = (string) $path;

41 if (strstr($path, ',')) {

61 if (0 === strpos($pathSegment, '[contains(')) {

62 $paths[0] .= '*' . ltrim($pathSegment, '*');

63 } else {

64 $paths[0] .= $pathSegment;

70 $paths[$key] .= '//*' . ltrim($pathSegment, '*');

71 $paths[] = $xpath . $pathSegment;

72 }

73 } else {

74 foreach ($paths as $key => $xpath) {

75 $paths[$key] .= '//' . $pathSegment;

76 }

77 }

Driver.php (https://gitlab.com/lisit1003/TTPHPServer) PHP · 227 lines

55 {

56 // check application path first

57 foreach (get_instance()->load->get_package_paths(TRUE) as $path)

58 {

59 // loves me some nesting!

60 foreach (array(ucfirst($driver_name), $driver_name) as $class)

61 {

62 $filepath = $path.'libraries/'.$lib_name.'/drivers/'.$class.'.php';

63

64 if (file_exists($filepath))

squeezebox_.in (https://bitbucket.org/schatt/munin.git) Autoconf · 213 lines

20 non-default configuration, please use the environment variables

21 'squeezebox_host' and 'squeezebox_port' to connect. Also, if your

22 nc(1) binary is not called "nc", or not the one in $PATH, please define it

23 in the plugin's environment file (@@CONFDIR@@/squeezebox or similar).

24

modules.php (https://github.com/ot2sen/Molajo.git) PHP · 191 lines

157 foreach ($modules as $i=>$module) {

158 $extension = $module->value;

159 $path = $applicationId ? JPATH_ADMINISTRATOR : JPATH_SITE;

160 $source = $path . "/modules/$extension";

161 $lang->load("$extension.sys", $path, null, false, false)

162 || $lang->load("$extension.sys", $source, null, false, false)

163 || $lang->load("$extension.sys", $path, $lang->getDefault(), false, false)

category.php (https://gitlab.com/hazelnuts23/unitedfoodstuff) PHP · 196 lines

78 $this->load->language('product/category');

79 if (isset($this->request->get['path'])) {

80 $path = (int)$this->request->get['path'];

81 } else {

82 $path = 0;

83 }

84 $data['heading_title'] = 'PRODUCTS';

85 $data['path'] = $path;

86 $data['name'] = 'All Products';

87 $data['href'] = $this->url->link('product/category', 'path=' . $path);

97 $this->load->language('product/category');

98 if (isset($this->request->get['path'])) {

99 $path = (int)$this->request->get['path'];

100 } else {

101 $path = 0;

PropertyPathTest.php (https://github.com/Faianca/symfony.git) PHP · 394 lines

25 $array = array('firstName' => 'Bernhard');

26

27 $path = new PropertyPath('firstName');

28

29 $this->assertEquals('Bernhard', $path->getValue($array));

34 $array = array('Bernhard');

35

36 $path = new PropertyPath('0');

37

38 $this->assertEquals('Bernhard', $path->getValue($array));

43 $array = array('#!@$.' => 'Bernhard');

44

45 $path = new PropertyPath('[#!@$.]');

46

47 $this->assertEquals('Bernhard', $path->getValue($array));

view.php (https://github.com/pjwiseman/joomla-cms.git) PHP · 279 lines

92 if (isset($viewobj))

93 {

94 $path = array_reverse($viewobj->path);

95 $start = true;

96 $childkey = false;

97

98 foreach ($path as $element)

99 {

100 $view = $views[$element];

IncludePathTestCollector.php (https://github.com/grjones/qframe.git) PHP · 166 lines

85 * @access protected

86 */

87 protected $paths;

88

89 /**

94

95 /**

96 * @param array $paths

97 * @param string $suffix

98 * @access public

99 */

100 public function __construct(array $paths = array(), $suffix = 'Test.php')

101 {

102 if (!empty($paths)) {

SessionManager.php (https://gitlab.com/milton2913/myBlog) PHP · 212 lines

58 protected function createNativeDriver()

59 {

60 $path = $this->app['config']['session.files'];

61

62 $lifetime = $this->app['config']['session.lifetime'];

63

64 return $this->buildSession(new FileSessionHandler($this->app['files'], $path, $lifetime));

65 }

66

CMB2_Utils.php (https://gitlab.com/hunt9310/ras) PHP · 188 lines

157 * @return string URL to CMB2 resources

158 */

159 public function url( $path = '' ) {

160 if ( $this->url ) {

161 return $this->url . $path;

183 $this->url = trailingslashit( apply_filters( 'cmb2_meta_box_url', set_url_scheme( $cmb2_url ), CMB2_VERSION ) );

184

185 return $this->url . $path;

186 }

187

PropertyPathTest.php (https://gitlab.com/martinstti/silex-microframework-rest) PHP · 203 lines

18 public function testToString()

19 {

20 $path = new PropertyPath('reference.traversable[index].property');

21

22 $this->assertEquals('reference.traversable[index].property', $path->__toString());

56 * @expectedException \Symfony\Component\PropertyAccess\Exception\InvalidPropertyPathException

57 */

58 public function testUnexpectedCharacters($path)

59 {

60 new PropertyPath($path);

Category.php (https://gitlab.com/LisovyiEvhenii/ismextensions) PHP · 183 lines

70 $pathIds = array_reverse($this->_appliedCategory->getPathIds());

71 $curCategoryId = $this->getLayer()->getCurrentCategory()->getId();

72 if (isset($pathIds[1]) && $pathIds[1] != $curCategoryId) {

73 return $pathIds[1];

ValidatorFactoryTest.php (https://github.com/Exercise/symfony.git) PHP · 193 lines

113 public function testBuildDefaultFromXml()

114 {

115 $path = __DIR__.'/Mapping/Loader/constraint-mapping.xml';

116 $factory = ValidatorFactory::buildDefault(array($path), false);

118 $context = new ValidatorContext();

119 $context

120 ->setClassMetadataFactory(new ClassMetadataFactory(new XmlFilesLoader(array($path))))

121 ->setConstraintValidatorFactory(new ConstraintValidatorFactory());

122

126 public function testBuildDefaultFromYaml()

127 {

128 $path = __DIR__.'/Mapping/Loader/constraint-mapping.yml';

129 $factory = ValidatorFactory::buildDefault(array($path), false);

131 $context = new ValidatorContext();

132 $context

133 ->setClassMetadataFactory(new ClassMetadataFactory(new YamlFilesLoader(array($path))))

134 ->setConstraintValidatorFactory(new ConstraintValidatorFactory());

135

Config.php (https://bitbucket.org/acidel/buykoala.git) PHP · 169 lines

101 $this->_types[$storeId] = array();

102 foreach ($this->getNode('formats')->children() as $typeCode => $typeConfig) {

103 $path = sprintf('%s%s', self::XML_PATH_ADDRESS_TEMPLATE, $typeCode);

104 $type = new Varien_Object();

105 $htmlEscape = strtolower($typeConfig->htmlEscape);

108 $type->setCode($typeCode)

109 ->setTitle((string)$typeConfig->title)

110 ->setDefaultFormat(Mage::getStoreConfig($path, $store))

111 ->setHtmlEscape($htmlEscape);

112

S3.php (https://github.com/kervin/kyzstudio.git) PHP · 327 lines

101 * @TODO Support streams

102 *

103 * @param string $path

104 * @param array $options

105 * @return string

106 */

107 public function fetchItem($path, $options = array())

108 {

109 $fullPath = $this->_getFullPath($path, $options);

149 * Delete an item in the storage service.

150 *

151 * @param string $path

152 * @param array $options

153 * @return void

MigrateUpgradeFormStepsTest.php (https://gitlab.com/mohamed_hussein/prodt) PHP · 147 lines

132 */

133 protected function assertFirstForm(WebAssert $session, string $expected): void {

134 $paths = [

135 '',

136 '/incremental',

139 '/review',

140 ];

141 foreach ($paths as $path) {

142 $this->drupalGet('/upgrade' . $path);

BrowseServer.php (https://github.com/Koc/core.git) PHP · 202 lines

84 * @since 1.0.7

85 */

86 public static function getNormalizedPath($path)

87 {

88 $filesCatalog = \XLite\View\BrowseServer::getFilesCatalog();

89

90 $path = \Includes\Utils\FileManager::getRealPath(

91 $filesCatalog . LC_DS . $path

92 );

93

94 return ($filesCatalog !== substr($path, 0, strlen($filesCatalog)))

95 ? $filesCatalog

96 : $path;

174

175 foreach ($iterator as $file) {

176 $path = $file->getPathname();

177

178 $info = pathinfo($path);

PluginTask.php (https://github.com/suzuki/candycane.git) PHP · 196 lines

33 * @var array

34 */

35 public $path = null;

36

37 /**

87 */

88 public function bake($plugin) {

89 $pathOptions = App::path('plugins');

90 if (count($pathOptions) > 1) {

91 $this->findPath($pathOptions);

92 }

93 $this->hr();

160 public function findPath($pathOptions) {

161 $valid = false;

162 foreach ($pathOptions as $i => $path) {

163 if (!is_dir($path)) {

Tlsecurity.php (https://github.com/10layer/10Layer-CMS.git) PHP · 199 lines

36 }

37 //Check if this path is available without logging in

38 $path=$this->ci->uri->segment_array(0);

39 if ($this->ci->model_user->security_check_exclude_path($path)) {

107 }

108

109 protected function checkExcludePath($path) {

110 $paths=$this->ci->model_user->security_exclude_paths();

Client.php (https://bitbucket.org/kudutest1/moodlegit.git) PHP · 258 lines

99 * @return void

100 */

101 final private function _prepareRest($path)

102 {

103 // Get the URI object and configure it

111 if ($path[0] != '/' && $uri[strlen($uri)-1] != '/') {

112 $path = '/' . $path;

113 }

114

115 $this->_uri->setPath($path);

116

117 /**

163 * Performs an HTTP POST request to $path.

164 *

165 * @param string $path

166 * @param mixed $data Raw data to send

167 * @throws Zend_Http_Client_Exception

abstract_refactoring.dart (https://github.com/dart-lang/sdk.git) Dart · 145 lines

45 // prepare FileEdit

46 var fileEdit = refactoringChange.getFileEdit(convertPath(path));

47 expect(fileEdit, isNotNull, reason: 'No file edit for $path');

48 // validate resulting code

49 var file = getFile(path);

CookieJar.php (https://gitlab.com/x33n/respond) PHP · 248 lines

85 }

86

87 public function clear($domain = null, $path = null, $name = null)

88 {

89 if (!$domain) {

90 $this->cookies = [];

91 return;

92 } elseif (!$path) {

93 $this->cookies = array_filter(

94 $this->cookies,

95 function (SetCookie $cookie) use ($path, $domain) {

96 return !$cookie->matchesDomain($domain);

97 }

FileDownloaderTest.php (https://github.com/ecoleman/composer.git) PHP · 163 lines

50 ;

51

52 $path = tempnam(sys_get_temp_dir(), 'c');

53

54 $downloader = $this->getDownloader();

55 try {

56 $downloader->download($packageMock, $path);

57 $this->fail();

58 } catch (\Exception $e) {

59 if (is_dir($path)) {

60 $fs = new Filesystem();

61 $fs->removeDirectory($path);

PluginList.php (https://gitlab.com/gideonmarked/newlifetrainingcenter-v2) PHP · 206 lines

61 if (strlen($pluginCode)) {

62 $pluginCodeObj = new PluginCode($pluginCode);

63 $path = $pluginCodeObj->toPluginInformationFilePath();

64 if (!File::isFile(File::symbolizePath($path))) {

ImportModel.php (https://gitlab.com/fbi/october) PHP · 211 lines

67 {

68 $sessionKey = array_get($options, 'sessionKey');

69 $path = $this->getImportFilePath($sessionKey);

70 $data = $this->processImportData($path, $matches, $options);

mustache_template_finder_test.php (https://github.com/markn86/moodle.git) PHP · 198 lines

86 * @param string $component

87 * @param string $theme

88 * @param array $paths

89 */

90 public function test_get_template_directories_for_component(string $component, string $theme, array $paths): void {

92

93 // Test a plugin.

94 $dirs = mustache_template_finder::get_template_directories_for_component($component, $theme, $paths);

95

96 $correct = array_map(function($path) use ($CFG) {

97 return implode('/', [$CFG->dirroot, $path]);

98 }, $paths);

extensions_themes_controller.php (https://github.com/ShadowCross/croogo.git) PHP · 195 lines

114 $zipEntryNameE = explode($themeAlias . '/', $zipEntryName);

115 if (isset($zipEntryNameE['1'])) {

116 $path = APP . 'views' . DS . 'themed' . DS . $themeAlias . DS . str_replace('/', DS, $zipEntryNameE['1']);

117 } else {

118 $path = APP . 'views' . DS . 'themed' . DS . $themeAlias . DS;

119 }

120

121 if (substr($path, strlen($path) - 1) == DS) {

122 // create directory

123 mkdir($path);

126 if (zip_entry_open($zip, $zip_entry, 'r')) {

127 $fileContent = zip_entry_read($zip_entry, zip_entry_filesize($zip_entry));

128 touch($path);

129 $fh = fopen($path, 'w');

175 $error = 0;

176 $folder =& new Folder;

177 foreach ($paths AS $path) {

178 if (is_dir($path)) {

ModelDefinition.php (https://gitlab.com/fsavina/finncds-temporary) PHP · 436 lines

422 public function getStorageFilePath ()

423 {

424 $path = $this->get ( 'storage.file' );

425 if ( is_array ( $path ) )

426 {

427 $path = Arr::get ( $path, 'path' );

428 }

429 return $path ?: "finnegan/{$this->name}.json";

AclNode.php (https://github.com/gfarrell/KORDS.git) PHP · 182 lines

73 return null;

74 } elseif (is_string($ref)) {

75 $path = explode('/', $ref);

76 $start = $path[0];

77 unset($path[0]);

78

79 $queryData = array(

112 }

113 $result = $db->read($this, $queryData, -1);

114 $path = array_values($path);

115

116 if (

117 !isset($result[0][$type]) ||

118 (!empty($path) && $result[0][$type]['alias'] != $path[count($path) - 1]) ||

119 (empty($path) && $result[0][$type]['alias'] != $start)

Client.php (https://gitlab.com/pr0055/symfonypizza) PHP · 204 lines

174 }

175

176 $path = str_replace("'", "\\'", $r->getFileName());

177

178 $profilerCode = '';

191 require_once '$autoloader';

192 }

193 require_once '$path';

194

195 \$kernel = unserialize('$kernel');

DefaultWriter.php (git://github.com/josegonzalez/upload.git) PHP · 193 lines

86 $filesystem = $this->getFilesystem($this->field, $this->settings);

87 $results = [];

88 foreach ($files as $file => $path) {

89 $results[] = $this->writeFile($filesystem, $file, $path);

103 $filesystem = $this->getFilesystem($this->field, $this->settings);

104 $results = [];

105 foreach ($files as $path) {

106 $results[] = $this->deletePath($filesystem, $path);

115 * @param \League\Flysystem\FilesystemOperator $filesystem a filesystem wrapper

116 * @param string $file a full path to a temp file

117 * @param string $path that path to which the file should be written

118 * @return bool

119 */

120 public function writeFile(FilesystemOperator $filesystem, $file, $path): bool

121 {

122 // phpcs:ignore

PageController.class.php (https://gitlab.com/x33n/ProjectPier-Core) PHP · 337 lines

295 // Prepare path...

296 if (is_file($this->getTemplate())) {

297 $path = $this->getTemplate();

298 } else {

299 $path = get_template_path($template, $this->getControllerName());

301

302 // Template dnx?

303 if (!is_file($path)) {

304 throw new FileDnxError($path);

306

307 // Return path

308 return $path;

309 } // getTemplatePath

310

322

323 // Path of the layout

324 $path = Env::getLayoutPath($layout_name);

325

326 // File dnx? Throw exception

helper.php (https://bitbucket.org/pastor399/newcastleunifc.git) PHP · 315 lines

210 // Try to find the class file.

211 $type = strtolower($type) . '.php';

212 foreach ($paths as $path)

213 {

214 if ($file = JPath::find($path, $type))

282 {

283 // Reference to an array with paths for current entity

284 $paths = &self::$paths[$entity];

285

286 // Add the default entity's search path if not set.

307 if (!in_array($path, $paths))

308 {

309 array_unshift($paths, trim($path));

310 }

311 }

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

19 */

20 abstract class SearchDocument extends Zend_Search_Lucene_Document {

21 public function __construct(&$doc, &$data, $course_id, $group_id, $user_id, $path, $additional_keyset = null) {

22

23 $encoding = 'UTF-8';

54 // be responsible to bring back to that call sufficient and consistent information

55 // in order to perform the check.

56 $this->addField(Zend_Search_Lucene_Field::UnIndexed('path', $path, $encoding));

57 /*

58 // adding a capability set required for viewing. -1 if no capability required.

79 /*

80 abstract class SearchDocument extends Zend_Search_Lucene_Document {

81 public function __construct(&$doc, &$data, $course_id, $group_id, $user_id, $path, $additional_keyset = null) {

82 //document identification and indexing

83 $this->addField(Zend_Search_Lucene_Field::Keyword('docid', $doc->docid));

SystemTest.php (https://gitlab.com/gricelya/Blog-Merry) PHP · 89 lines

17 $this->assertFalse(System::isExecutable('somethingtotallynotexisting something totally strange and this should be ignored'));

18

19 // executable files not in $PATH

20 $this->assertTrue(System::isExecutable(TEST_ROOT_ETC . '/system/executable.sh'));

21 $this->assertTrue(System::isExecutable(TEST_ROOT_ETC . '/system/executable.sh something totally strange and this should be ignored'));

t7407-submodule-foreach.sh (https://gitlab.com/oyvholm/git) Shell · 382 lines

74 cd clone &&

75 git submodule update --init -- sub1 sub3 &&

76 git submodule foreach "echo \$toplevel-\$name-\$path-\$sha1" > ../actual &&

77 git config foo.bar zar &&

78 git submodule foreach "git config --file \"\$toplevel/.git/config\" foo.bar"

211 (

212 cd clone2 &&

213 git submodule foreach -q --recursive "echo \$name-\$path" > ../actual

214 ) &&

215 test_cmp expect actual

XmlFileLoader.php (https://github.com/israelnoguera/parejas.git) PHP · 228 lines

40 public function load($file, $type = null)

41 {

42 $path = $this->locator->locate($file);

43

44 $xml = $this->loadFile($path);

45

46 $collection = new RouteCollection();

47 $collection->addResource(new FileResource($path));

48

49 // process routes and imports

53 }

54

55 $this->parseNode($collection, $node, $path, $file);

56 }

57

stream.php (https://bitbucket.org/nlabyt/bcf-ball-4eb2.git) PHP · 227 lines

71 * @return boolean

72 */

73 public function stream_open($path)

74 {

75 //Get the view script source

76 $identifier = str_replace('tmpl://', '', $path);

77

78 //Get the template object from the template stack and parse it

221 * @return array

222 */

223 public function url_stat($path, $flags)

224 {

225 return $this->_stat;

block.php (https://github.com/DoFken/forkcms.git) PHP · 537 lines

312 * Set the path for the template

313 *

314 * @param string $path The path to set.

315 */

316 private function setTemplatePath($path)

317 {

318 $this->templatePath = FrontendTheme::getPath($path);

319 }

320 }

ClassLoader.php (https://gitlab.com/megathrone86/SoftwareProjects) PHP · 199 lines

71 public function addPrefixes(array $prefixes)

72 {

73 foreach ($prefixes as $prefix => $path) {

74 $this->addPrefix($prefix, $path);

80 *

81 * @param string $prefix The classes prefix

82 * @param array|string $paths The location(s) of the classes

83 */

84 public function addPrefix($prefix, $paths)

85 {

86 if (!$prefix) {

87 foreach ((array) $paths as $path) {

88 $this->fallbackDirs[] = $path;

94 $this->prefixes[$prefix] = array_merge(

95 $this->prefixes[$prefix],

96 (array) $paths

97 );

98 } else {

UrlMatcher.php (https://gitlab.com/Pasantias/pasantiasASLG) PHP · 251 lines

86 * {@inheritdoc}

87 */

88 public function match($pathinfo)

89 {

90 $this->allow = array();

91

92 if ($ret = $this->matchCollection(rawurldecode($pathinfo), $this->routes)) {

93 return $ret;

94 }

96 throw 0 < count($this->allow)

97 ? new MethodNotAllowedException(array_unique($this->allow))

98 : new ResourceNotFoundException(sprintf('No routes found for "%s".', $pathinfo));

99 }

100

AppNameCommand.php (https://gitlab.com/Pasantias/pasantiasASLG) PHP · 329 lines

108 * Replace the App namespace at the given path.

109 *

110 * @param string $path

111 * @return void

112 */

113 protected function replaceNamespace($path)

114 {

115 $search = [

252 protected function replaceIn($path, $search, $replace)

253 {

254 $this->files->put($path, str_replace($search, $replace, $this->files->get($path)));

255 }

256

Router.php (https://github.com/Hackwar/joomla-cms.git) PHP · 299 lines

116 if ($category)

117 {

118 $path = array_reverse($category->getPath(), true);

119 $path[0] = '1:root';

121 if ($this->noIDs)

122 {

123 foreach ($path as &$segment)

124 {

125 list($id, $segment) = explode(':', $segment, 2);

127 }

128

129 return $path;

130 }

131

AmazonS3.php (https://github.com/qpleple/Gaufrette.git) PHP · 214 lines

160 * Computes the key for the specified path

161 *

162 * @param string $path for which to compute the key

163 */

164 public function computeKey($path)

165 {

166 if (0 !== strpos($path, $this->bucket . '/')) {

167 throw new \InvalidArgumentException(sprintf('The specified path \'%s\' is out of the bucket \'%s\'.', $path, $this->bucket));

168 }

169

170 return ltrim(substr($path, strlen($this->bucket)), '/');

171 }

172

astyle.html (https://jedit.svn.sourceforge.net/svnroot/jedit) HTML · 1480 lines ✨ Summary

This HTML code outputs a manual page for Artistic Style, a source code formatter. It provides information on options and usage, including explanations of various flags and their effects. The output includes acknowledgments to contributors and beta-testers, as well as a call to action to enjoy the program. The text is formatted in a traditional manual page style, with sections and paragraphs that resemble those found in printed documentation.

224 color="#000080" size="3"><strong>HOME</strong></font><font

225 color="#000000" size="3"> system variable (i.e. </font><font

226 color="#000080" size="3"><strong>$PATH</strong></font><font

227

228 color="#000000" size="3"><strong>/.astylerc</strong>)<br>

UnixFileSystem.php (git://github.com/alexgorbatchev/SyntaxHighlighter.git) text · 0 lines

105 * $offset; everything before this offset is already normal.

106 */

107 protected function normalizer($pathname, $len, $offset) {

108 if ($len === 0) {

109 return $pathname;

110 }

111 $n = (int) $len;

112 while (($n > 0) && ($pathname{$n-1} === '/')) {

113 $n--;

114 }

119

120 if ($offset > 0) {

121 $sb .= substr($pathname, 0, $offset);

122 }

123 $prevChar = 0;

configure (http://google-perftools.googlecode.com/svn/trunk/) Shell · 19833 lines ✨ Summary

This shell script generates a configuration file for a build system, likely Autotools. It defines various settings and options for building a library or executable, such as compiler flags, library search paths, and export symbols. The script also handles silent mode, error checking, and output redirection to ensure proper configuration and build process.

77 if test "${PATH_SEPARATOR+set}" != set; then

78 PATH_SEPARATOR=:

79 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {

80 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||

94 case $0 in #((

95 *[\\/]* ) as_myself=$0 ;;

96 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR

97 for as_dir in $PATH

185 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR

186 as_found=false

187 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH

188 do

189 IFS=$as_save_IFS

593 # So, first we look for a working echo in the user's PATH.

594

595 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR

596 for dir in $PATH /usr/ucb; do

lexers.mli (git://github.com/bmeurer/ocaml.git) OCaml · 48 lines ✨ Summary

This is a collection of functions and data types for parsing and manipulating configuration files, specifically for the ocamlbuild tool. It includes functions to parse environment paths, extract configuration values from lines, query ocamlfind, and generate tags. The code appears to be part of a larger system for managing build configurations in OCaml projects.

28 val trim_blanks : Loc.source -> Lexing.lexbuf -> string

29

30 (* Parse an environment path (i.e. $PATH).

31 This is a colon separated string.

32 Note: successive colons means an empty string.