100+ results for 'php realpath'
Not the results you expected?
categories.php (https://github.com/mcmurdok/oscommerce.git) PHP · 247 lines
1 <?php
2 /*
3 $Id: $
84 if ( $error === false ) {
85 $categories_image = new upload($data['image'], realpath('../' . DIR_WS_IMAGES . 'categories'));
87 if ( $categories_image->exists() && $categories_image->parse() && $categories_image->save() ) {
193 if ( $Qcheck->numberOfRows() === 0 ) {
194 if (file_exists(realpath('../' . DIR_WS_IMAGES . 'categories/' . $Qimage->value('categories_image')))) {
195 @unlink(realpath('../' . DIR_WS_IMAGES . 'categories/' . $Qimage->value('categories_image')));
Set.php (https://github.com/eexit/Smak.git) PHP · 362 lines
1 <?php
3 namespace Smak\Portfolio\tests\units;
8 use tests\units\Smak\Portfolio\Fs;
10 require_once __DIR__ . '/../../../../vendor/autoload.php';
12 class Set extends Fs\FsAdapter
221 ->isEqualTo('Chile');
223 $this->string($set->getSplInfo()->getRealPath())
224 ->isEqualTo($set_root);
225 }
314 );
316 $set_root = $set->getSplInfo()->getRealPath();
317 $set_name = $set->name;
FinderTest.php (https://github.com/Yrwein/symfony.git) PHP · 333 lines
131 $finder = new Finder();
132 $this->assertSame($finder, $finder->ignoreVCS(false));
133 $this->assertIterator($this->toAbsolute(array('.git', 'foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto')), $finder->in(self::$tmpDir)->getIterator());
135 $finder = new Finder();
188 {
189 $finder = new Finder();
190 $this->assertSame($finder, $finder->sort(function (\SplFileInfo $a, \SplFileInfo $b) { return strcmp($a->getRealpath(), $b->getRealpath()); }));
191 $this->assertIterator($this->toAbsolute(array('foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto')), $finder->in(self::$tmpDir)->getIterator());
196 $finder = new Finder();
197 $this->assertSame($finder, $finder->filter(function (\SplFileInfo $f) { return preg_match('/test/', $f) > 0; }));
198 $this->assertIterator($this->toAbsolute(array('test.php', 'test.py')), $finder->in(self::$tmpDir)->getIterator());
199 }
223 $iterator = $finder->files()->name('*.php')->depth('< 1')->in(array(self::$tmpDir, __DIR__))->getIterator();
225 $this->assertIterator(array(self::$tmpDir.DIRECTORY_SEPARATOR.'test.php', __DIR__.DIRECTORY_SEPARATOR.'FinderTest.php', __DIR__.DIRECTORY_SEPARATOR.'bootstrap.php', __DIR__.DIRECTORY_SEPARATOR.'GlobTest.php'), $iterator);
226 }
OS_NS_stdlib.h (https://gitlab.com/Kanedias/MangosDeprecated) C Header · 332 lines
8 *
9 * @author Douglas C. Schmidt <schmidt@cs.wustl.edu>
10 * @author Jesper S. M|ller<stophph@diku.dk>
11 * @author and a cast of thousands...
12 *
204 #if !defined (ACE_HAS_WINCE)
205 # if !defined (ACE_LACKS_REALPATH)
206 ACE_NAMESPACE_INLINE_FUNCTION
207 # else
208 extern ACE_Export
209 # endif /* !ACE_LACKS_REALPATH */
210 char *realpath (const char *file_name, char *resolved_name);
212 # if defined (ACE_HAS_WCHAR)
213 ACE_NAMESPACE_INLINE_FUNCTION
214 wchar_t *realpath (const wchar_t *file_name, wchar_t *resolved_name);
215 # endif /* ACE_HAS_WCHAR */
216 #endif /* ACE_HAS_WINCE */
categories.php (https://github.com/azouts/oscommerce.git) PHP · 270 lines
SplFileInfo.php (https://gitlab.com/Blueprint-Marketing/hhvm) PHP · 444 lines
1 <?php
3 // This doc comment block generated by idl/sysdoc.php
4 /**
5 * ( excerpt from http://docs.hhvm.com/manual/en/class.splfileinfo.php )
6 *
7 * The SplFileInfo class offers a high-level object oriented interface to
15 private $infoClass = "SplFileInfo";
17 // This doc comment block generated by idl/sysdoc.php
18 /**
19 * ( excerpt from http://docs.hhvm.com/manual/en/splfileinfo.construct.php )
338 // This doc comment block generated by idl/sysdoc.php
339 /**
340 * ( excerpt from http://docs.hhvm.com/manual/en/splfileinfo.getrealpath.php )
341 *
342 * This method expands all symbolic links, resolves relative references
AddressTest.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 298 lines
Configuration.php (https://gitlab.com/CORP-RESELLER/shopping-cart-lite) PHP · 346 lines
Config.php (https://gitlab.com/x33n/ImpressPages) PHP · 172 lines
1 <?php
2 /**
3 * @package ImpressPages
42 if (strpos($server['REQUEST_URI'], $baseUrl) !== 0) {
43 // show instructions how to set baseUrl manually
44 include __DIR__ . '/Internal/Config/view/couldNotDetectBaseUrl.php';
45 exit();
46 }
48 if (strpos(strtolower($server['REQUEST_URI']), strtolower($baseUrl)) !== 0) {
49 // show instructions how to set baseUrl manually
50 include __DIR__ . '/Internal/Config/view/couldNotDetectBaseUrl.php';
51 exit();
52 }
58 if (empty($this->config['baseDir'])) {
59 $this->config['baseDir'] = realpath(dirname($server['SCRIPT_FILENAME']));
60 }
axModuleManager.class.php (https://github.com/bdelespierre/php-axiom.git) PHP · 271 lines
BrokerTest.php (https://github.com/bhaumik25/zend-framework.git) PHP · 299 lines
4 define("PHPUnit_MAIN_METHOD", "Zend_Controller_Plugin_BrokerTest::main");
6 $basePath = realpath(dirname(__FILE__) . str_repeat(DIRECTORY_SEPARATOR . '..', 3));
8 set_include_path(
13 }
15 require_once "PHPUnit/Framework/TestCase.php";
16 require_once "PHPUnit/Framework/TestSuite.php";
18 require_once 'Zend/Controller/Front.php';
19 require_once 'Zend/Controller/Action/HelperBroker.php';
33 public static function main()
34 {
35 require_once "PHPUnit/TextUI/TestRunner.php";
37 $suite = new PHPUnit_Framework_TestSuite("Zend_Controller_Plugin_BrokerTest");
cache_manager_test.php (https://github.com/activeingredient/ezComponents.git) PHP · 246 lines
1 <?php
2 /**
3 * @copyright Copyright (C) 2005-2010 eZ Systems AS. All rights reserved.
9 */
11 require "db_cache_manager.php";
12 require "fetch.php";
24 public static function suite()
25 {
26 return new PHPUnit_Framework_TestSuite( __CLASS__ );
27 }
40 $this->markTestSkipped( 'No database handler defined' );
41 }
42 $this->basePath = realpath( dirname( __FILE__ ) ) . '/';
44 // Setup the template engine
FinderTest.php (https://github.com/l3l0/BehatExamples.git) PHP · 274 lines
81 $finder->name('test.ph*');
82 $finder->name('test.py');
83 $this->assertIterator($this->toAbsolute(array('test.php', 'test.py')), $finder->in(self::$tmpDir)->getIterator());
84 }
107 $finder = new Finder();
108 $this->assertSame($finder, $finder->files()->size('< 1K')->size('> 500'));
109 $this->assertIterator($this->toAbsolute(array('test.php')), $finder->in(self::$tmpDir)->getIterator());
110 }
152 {
153 $finder = new Finder();
154 $this->assertSame($finder, $finder->sort(function (\SplFileInfo $a, \SplFileInfo $b) { return strcmp($a->getRealpath(), $b->getRealpath()); }));
155 $this->assertIterator($this->toAbsolute(array('foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto')), $finder->in(self::$tmpDir)->getIterator());
187 $iterator = $finder->files()->name('*.php')->depth('< 1')->in(array(self::$tmpDir, __DIR__))->getIterator();
189 $this->assertIterator(array(self::$tmpDir.DIRECTORY_SEPARATOR.'test.php', __DIR__.DIRECTORY_SEPARATOR.'FinderTest.php', __DIR__.DIRECTORY_SEPARATOR.'GlobTest.php'), $iterator);
190 }
FilesystemLoaderTest.php (https://github.com/israelnoguera/parejas.git) PHP · 87 lines
52 $path = self::$fixturesPath.'/templates';
53 $loader = new ProjectTemplateLoader2($pathPattern);
54 $storage = $loader->load(new TemplateReference($path.'/foo.php', 'php'));
55 $this->assertInstanceOf('Symfony\Component\Templating\Storage\FileStorage', $storage, '->load() returns a FileStorage if you pass an absolute path');
56 $this->assertEquals($path.'/foo.php', (string) $storage, '->load() returns a FileStorage pointing to the passed absolute path');
58 $this->assertFalse($loader->load(new TemplateReference('bar', 'php')), '->load() returns false if the template is not found');
60 $storage = $loader->load(new TemplateReference('foo.php', 'php'));
61 $this->assertInstanceOf('Symfony\Component\Templating\Storage\FileStorage', $storage, '->load() returns a FileStorage if you pass a relative template that exists');
62 $this->assertEquals($path.'/foo.php', (string) $storage, '->load() returns a FileStorage pointing to the absolute path of the template');
69 $loader = new ProjectTemplateLoader2(array(self::$fixturesPath.'/null/%name%', $pathPattern));
70 $loader->setDebugger($debugger = new \ProjectTemplateDebugger());
71 $loader->load(new TemplateReference('foo.php', 'php'));
72 $this->assertTrue($debugger->hasMessage('Loaded template file'), '->load() logs a "Loaded template file" message if the template is found');
73 }
Configuration.php (https://github.com/GunioRobot/phpca.git) PHP · 444 lines
1 <?php
2 /**
3 * Copyright (c) 2009 Stefan Priebsch <stefan@priebsch.de>
30 * POSSIBILITY OF SUCH DAMAGE.
31 *
32 * @package PHPca
33 * @author Stefan Priebsch <stefan@priebsch.de>
34 * @copyright Stefan Priebsch <stefan@priebsch.de>. All rights reserved.
36 */
38 namespace spriebsch\PHPca;
40 /**
41 * The PHPca configuration.
42 *
43 * @author Stefan Priebsch <stefan@priebsch.de>
UpdateCommand.php (https://github.com/genemu/GenemuDoctrineExtraBundle.git) PHP · 290 lines
1 <?php
3 /*
64 $controllers = array();
65 if ($dir = realpath($class->getPath().'/Controller')) {
66 $files = new Finder();
67 $files->files()->name('*Controller.php')->in($dir);
69 foreach ($files as $file) {
70 if ('Controller.php' !== $controllerName = $file->getBasename('Controller.php')) {
71 $ns = $class->getNamespace().'\\Controller';
75 }
77 $reflection = new \ReflectionClass($ns.'\\'.$file->getBasename('.php'));
79 $methods = array();
UtilTest.php (https://github.com/peteboere/css-crush.git) PHP · 135 lines
1 <?php
3 namespace CssCrush\UnitTest;
7 use CssCrush\Url;
9 class UtilTest extends \PHPUnit\Framework\TestCase
10 {
11 public function setUp(): void
89 {
90 $path1 = __DIR__;
91 $path2 = realpath(__DIR__ . '/../../');
92 $this->assertEquals('../../', Util::getLinkBetweenPaths($path1, $path2));
93 $this->assertEqualsIgnoringCase('Unit/CssCrush/', Util::getLinkBetweenPaths($path2, $path1));
121 {
122 $contents = <<<'NOW_DOC'
123 <?php
125 $plugins = ['svg', 'px2em'];
SplFileInfo.php (https://gitlab.com/iranjith4/hhvm) PHP · 444 lines
87 // This doc comment block generated by idl/sysdoc.php
88 /**
89 * ( excerpt from http://php.net/manual/en/splfileinfo.getpathname.php )
90 *
91 * Returns the path to the file.
129 // This doc comment block generated by idl/sysdoc.php
130 /**
131 * ( excerpt from http://php.net/manual/en/splfileinfo.getinode.php )
132 *
133 * Gets the inode number for the filesystem object.
338 // This doc comment block generated by idl/sysdoc.php
339 /**
340 * ( excerpt from http://php.net/manual/en/splfileinfo.getrealpath.php )
341 *
342 * This method expands all symbolic links, resolves relative references
FilesystemAdapter.php (https://gitlab.com/pr0055/symfonypizza) PHP · 158 lines
host.d.ts (https://gitlab.com/girmayegebremedhin/student_managment) TypeScript Typings · 76 lines
41 readDirectory: ((rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[], depth?: number | undefined) => string[]) | undefined;
42 readFile: (fileName: string) => string | undefined;
43 realpath: ((path: string) => string) | undefined;
44 resolveModuleNames: ((moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ts.ResolvedProjectReference | undefined, options: ts.CompilerOptions) => (ts.ResolvedModule | undefined)[]) | undefined;
45 resolveTypeReferenceDirectives: ((typeReferenceDirectiveNames: string[], containingFile: string, redirectedReference: ts.ResolvedProjectReference | undefined, options: ts.CompilerOptions) => (ts.ResolvedTypeReferenceDirective | undefined)[]) | undefined;
TransparentRedirectTest.php (https://github.com/99designs/braintree_php.git) PHP · 261 lines
splfileinfo.getperms.html (https://bitbucket.org/thncr/manuals.git) HTML · 76 lines
8 <body><div class="manualnavbar" style="text-align: center;">
9 <div class="prev" style="text-align: left; float: left;"><a href="splfileinfo.getpathname.html">SplFileInfo::getPathname</a></div>
10 <div class="next" style="text-align: right; float: right;"><a href="splfileinfo.getrealpath.html">SplFileInfo::getRealPath</a></div>
11 <div class="up"><a href="class.splfileinfo.html">SplFileInfo</a></div>
12 <div class="home"><a href="index.html">PHP Manual</a></div>
14 <div class="refnamediv">
15 <h1 class="refname">SplFileInfo::getPerms</h1>
16 <p class="verinfo">(PHP 5 >= 5.1.2)</p><p class="refpurpose"><span class="refname">SplFileInfo::getPerms</span> — <span class="dc-title">Gets file permissions</span></p>
18 </div>
71 </div><hr /><div class="manualnavbar" style="text-align: center;">
72 <div class="prev" style="text-align: left; float: left;"><a href="splfileinfo.getpathname.html">SplFileInfo::getPathname</a></div>
73 <div class="next" style="text-align: right; float: right;"><a href="splfileinfo.getrealpath.html">SplFileInfo::getRealPath</a></div>
74 <div class="up"><a href="class.splfileinfo.html">SplFileInfo</a></div>
75 <div class="home"><a href="index.html">PHP Manual</a></div>
contact.modul.php (https://github.com/pschichtel/Infected-CMS.git) PHP · 302 lines
Minifier.php (https://gitlab.com/juanito.abelo/nlmobile) PHP · 280 lines
dfs.php (https://github.com/edorfaus/ezpublish.git) PHP · 342 lines
1 <?php
2 /**
3 * File containing the eZDFSFileHandlerDFSBackend class.
15 $mountPointPath = eZINI::instance( 'file.ini' )->variable( 'eZDFSClusteringSettings', 'MountPointPath' );
17 if ( !$mountPointPath = realpath( $mountPointPath ) )
18 throw new eZDFSFileHandlerNFSMountPointNotFoundException( $mountPointPath );
Renderer.php (https://gitlab.com/szlongshu/manaphp) PHP · 174 lines
9 {
10 /**
11 * @var \ManaPHP\Mvc\View\Renderer\EngineInterface[]
12 */
13 protected $_resolvedEngines = [];
20 public function __construct()
21 {
22 $this->_registeredEngines['.phtml'] = 'ManaPHP\Mvc\View\Renderer\Engine\Php';
23 $this->_registeredEngines['.tpl'] = 'ManaPHP\Mvc\View\Renderer\Engine\Smarty';
70 if (file_exists($file)) {
71 if (DIRECTORY_SEPARATOR === '\\') {
72 $realPath = str_replace('\\', '/', realpath($file));
73 if ($file !== $realPath) {
146 *<code>
147 *$renderer->registerEngines(array(
148 * ".phtml" => "ManaPHP\Mvc\View\Renderer\Engine\Php",
149 * ".html" => "ManaPHP\Mvc\View\Renderer\Engine\Html",
generate-standalone.php (https://github.com/mgifford/Government-of-Canada-Drupal.git) PHP · 152 lines
85 /**
86 * Copies a file to another location recursively, if it is a PHP file
87 * remove includes
88 * @param string $file Original file
103 $preserve = array(
104 // PEAR (external)
105 'XML/HTMLSax3.php' => 1
106 );
107 if (isset($preserve[$file])) {
115 echo 'Generating includes file... ';
116 shell_exec('php generate-includes.php');
117 echo "done!\n";
Admin_course.php (https://github.com/caesarjuly/flowertime.git) PHP · 346 lines
1 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
2 class Admin_course extends MY_Controller {
147 else
148 {
149 $this->gallery_path = realpath(APPPATH . '../top');
150 $config = array(
151 'allowed_types' => 'jpg|jpeg|png|gif',
296 else
297 {
298 $this->gallery_path = realpath(APPPATH . '../top');
299 $config = array(
300 'allowed_types' => 'jpg|jpeg|png|gif',
Doctrine.php (https://github.com/leadhome/handmade.git) PHP · 345 lines
MaildirStore.class.php (https://github.com/ghiata/xp-framework.git) PHP · 323 lines
LC_Page_Test.php (https://github.com/hatone/EC-CUBE-Ver2.11.3.git) PHP · 158 lines
25 require_once(realpath(dirname(__FILE__)) . '/../../require.php');
26 require_once(realpath(dirname(__FILE__)) . '/../../../data/class/pages/LC_Page.php');
28 /**
31 * @package Page
32 * @author LOCKON CO.,LTD.
33 * @version $Id:LC_Page_Test.php 15116 2007-07-23 11:32:53Z nanasess $
34 */
35 class LC_Page_Test extends PHPUnit_Framework_TestCase {
40 /*
41 * FIXME LC_Page::sendRedirect() は, リダイレクトしてしまうため,
42 * PHPUnit3 ではテストできない...
43 */
103 $_SERVER['DOCUMENT_ROOT'] = realpath(dirname(__FILE__) . "/../../../html");
104 $url = $objPage->getLocation(ROOT_URLPATH . 'abouts/index.php');
106 $this->assertEquals(HTTP_URL . "abouts/index.php", $url);
xls.php (https://gitlab.com/phamngsinh/baitaplon_sinhvien) PHP · 195 lines
1 <?php
2 /* $Id: xls.php 8964 2006-04-26 19:16:52Z nijel $ */
5 // Check if we have native MS Excel export using PEAR class Spreadsheet_Excel_Writer
6 if (!empty($GLOBALS['cfg']['TempDir'])) {
7 @include_once('Spreadsheet/Excel/Writer.php');
8 if (class_exists('Spreadsheet_Excel_Writer')) {
9 $xls = TRUE;
88 return FALSE;
89 }
90 $tmp_filename = tempnam(realpath($GLOBALS['cfg']['TempDir']), 'pma_xls_');
91 $workbook = new Spreadsheet_Excel_Writer($tmp_filename);
156 $worksheet =& $workbook->addWorksheet($table);
157 $workbook->setTempDir(realpath($GLOBALS['cfg']['TempDir']));
159 // Gets the data from the database
file-folder.rst (https://github.com/jamiemill/docs.git) ReStructuredText · 436 lines
TianQiKeyService.java (https://gitlab.com/spiderworts/ab_weixin_cms) Java · 132 lines
ClassFileLocator.php (https://github.com/obias/zf2.git) PHP · 155 lines
1 <?php
3 /** @namespace */
13 /**
14 * Locate files containing PHP classes, interfaces, or abstracts
15 *
16 * @package Zend_File
53 /**
54 * Filter for files containing PHP classes, interfaces, or abstracts
55 *
56 * @return bool
71 }
73 // If not a PHP file, skip
74 if ($file->getBasename('.php') == $file->getBasename()) {
requirejs.php (https://gitlab.com/unofficial-mirrors/moodle) PHP · 135 lines
gallery.php (https://github.com/kelios/imshop.git) PHP · 306 lines
1 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
3 /**
271 ));
273 $file = realpath(dirname(__FILE__)).'/templates/public/main.tpl';
274 $this->template->display('file:' . $file);
275 }
280 ));
282 if (file_exists(realpath(dirname(__FILE__)).'/templates/public/main.tpl'))
283 {
284 $file = realpath(dirname(__FILE__)).'/templates/public/main.tpl';
298 private function fetch_tpl($file = '')
299 {
300 $file = realpath(dirname(__FILE__)).'/templates/public/'.$file.'.tpl';
301 return $this->template->fetch('file:'.$file);
302 }
FinderTest.php (https://github.com/stedekay/symfony.git) PHP · 313 lines
82 $this->assertSame($finder, $finder->name('*.php'));
83 $this->assertIterator($this->toAbsolute(array('test.php')), $finder->in(self::$tmpDir)->getIterator());
85 $finder = new Finder();
168 {
169 $finder = new Finder();
170 $this->assertSame($finder, $finder->sort(function (\SplFileInfo $a, \SplFileInfo $b) { return strcmp($a->getRealpath(), $b->getRealpath()); }));
171 $this->assertIterator($this->toAbsolute(array('foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto')), $finder->in(self::$tmpDir)->getIterator());
187 $finder = new Finder();
188 $this->assertSame($finder, $finder->followLinks());
189 $this->assertIterator($this->toAbsolute(array('foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto')), $finder->in(self::$tmpDir)->getIterator());
190 }
203 $iterator = $finder->files()->name('*.php')->depth('< 1')->in(array(self::$tmpDir, __DIR__))->getIterator();
205 $this->assertIterator(array(self::$tmpDir.DIRECTORY_SEPARATOR.'test.php', __DIR__.DIRECTORY_SEPARATOR.'FinderTest.php', __DIR__.DIRECTORY_SEPARATOR.'GlobTest.php'), $iterator);
206 }
ezimagefont.php (https://github.com/GunioRobot/ezpublish.git) PHP · 230 lines
file_temp_cleanup_task.php (https://github.com/markn86/moodle.git) PHP · 122 lines
1 <?php
2 // This file is part of Moodle - http://moodle.org/
3 //
59 // once a file is deleted, so we need a list of the original values.
60 for ($iter->rewind(); $iter->valid(); $iter->next()) {
61 $node = $iter->getRealPath();
62 if (!is_readable($node)) {
63 continue;
68 // Now loop through again and remove old files and directories.
69 for ($iter->rewind(); $iter->valid(); $iter->next()) {
70 $node = $iter->getRealPath();
71 if (!isset($modifieddateobject[$node]) || !is_readable($node)) {
72 continue;
116 // Run on $CFG->backuptempdir too, if different from the default one, '$CFG->tempdir/backup'.
117 if (realpath(dirname($CFG->backuptempdir)) !== realpath($CFG->tempdir)) {
118 // The $CFG->backuptempdir setting is different from the default '$CFG->tempdir/backup'.
119 $this->execute_on($CFG->backuptempdir);
Error.class.php (https://github.com/BenBE/ispCP.git) PHP · 417 lines
Loader.php (https://github.com/kazy111/g_feeder.git) PHP · 147 lines
1 <?php
3 /**
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 }
86 if ($cacheFile!==false) {
87 if (!file_put_contents($cacheFile, serialize($this->classPath))) {
88 throw new Dwoo_Exception('Could not write into '.$cacheFile.', either because the folder is not there (create it) or because of the chmod configuration (please ensure this directory is writable by php), alternatively you can change the directory used with $dwoo->setCompileDir() or provide a custom loader object with $dwoo->setLoader()');
89 }
90 $this->classPath += $tmp;
Console.php (https://github.com/GunioRobot/madeam.git) PHP · 206 lines
1 <?php
2 namespace madeam;
3 /**
4 * Madeam PHP Framework <http://madeam.com>
5 * Copyright (c) 2009, Joshua Davey
6 * 202-212 Adeliade St. W, Toronto, Ontario, Canada
12 * @link http://www.madeam.com
13 * @package madeam
14 * @license http://www.opensource.org/licenses/mit-license.php The MIT License
15 * @author Joshua Davey
16 */
99 // If we aren't in the applicatin's root path then tell the user and exit
100 if ($scriptName != 'make') {
101 if (!file_exists(realpath('application/vendor/Madeam.php'))) {
102 console\CLI::outError('Please point Madeam Console to the root directory of your application.');
103 exit();
File.php (https://gitlab.com/hwmack/LibtorrentPHP) PHP · 201 lines
1 <?php
3 namespace CWE\Libraries\LibtorrentPHP\File;
5 use CWE\Libraries\LibtorrentPHP\File\Error\UnreadableError;
6 use CWE\Libraries\LibtorrentPHP\File\Error\NotExistsError;
10 * torrent file generation and serving.
11 *
12 * @package PHPTracker
13 * @subpackage File
14 */
40 $this->shouldExist();
42 $this->path = realpath( $this->path );
43 }
MediaTest.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 238 lines
1 <?php
2 /**
3 * Copyright © 2016 Magento. All rights reserved.
10 /**
11 * Test class for \Magento\Catalog\Model\Product\Attribute\Backend\Media.
12 * @magentoDataFixture Magento/Catalog/_files/product_simple.php
13 */
14 class MediaTest extends \PHPUnit_Framework_TestCase
42 self::$_mediaTmpDir = $mediaDirectory->getAbsolutePath($config->getBaseTmpMediaPath());
43 self::$_mediaDir = $mediaDirectory->getAbsolutePath($config->getBaseMediaPath());
44 $fixtureDir = realpath(__DIR__ . '/../../../../_files');
46 $mediaDirectory->create($config->getBaseTmpMediaPath());
setup.sh (https://gitlab.com/lisit1003/TTAutoDeploy) Shell · 616 lines
10 NGINX_PHP=nginx_php
11 NGINX=nginx
12 PHP=php
13 JDK=jdk
105 else
106 # LINK is relative.
107 REALPATH="`dirname "$REALPATH"`""/$LINK"
108 fi
109 done
467 #php
468 check_module $PHP $PHP_SETUP_BEGIN $PHP_SETUP_SUCCESS
469 if [ $? -eq 1 ]; then
470 exit 1
557 #php
558 build_module $PHP $PHP_SETUP_BEGIN $PHP_SETUP_SUCCESS
559 if [ $? -eq 1 ]; then
560 exit 1
WebTestCase.php (https://github.com/fernanDOTdo/symfony.git) PHP · 154 lines
1 <?php
3 /*
48 /**
49 * Finds the directory where the phpunit.xml(.dist) is stored.
50 *
51 * If you run tests with the PHPUnit CLI tool, everything will work as expected.
52 * If not, override this method in your test classes.
53 *
54 * @return string The directory where phpunit.xml(.dist) is stored
55 */
56 protected function getPhpUnitXmlDir()
57 {
58 $dir = null;
59 if (!isset($_SERVER['argv']) || false === strpos($_SERVER['argv'][0], 'phpunit')) {
60 throw new \RuntimeException('You must override the WebTestCase::createKernel() method.');
61 }
ImageUploadServiceTest.php (https://gitlab.com/dayitv89/laravel-tricks) PHP · 244 lines
Iterator.php (https://bitbucket.org/rybadour/todo_list_site.git) PHP · 196 lines
1 <?php
2 /**
3 * php-file-iterator
50 * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
51 * @version Release: @package_version@
52 * @link http://github.com/sebastianbergmann/php-file-iterator/tree
53 * @since Class available since Release 1.0.0
54 */
116 $current = $this->getInnerIterator()->current();
117 $filename = $current->getFilename();
118 $realpath = $current->getRealPath();
120 if ($this->basepath !== NULL) {
121 $realpath = str_replace($this->basepath, '', $realpath);
122 }
register-in.inc.php (https://gitlab.com/Gashler/dp) PHP · 104 lines
ErrorHandlerTest.php (https://github.com/bhaumik25/zend-framework.git) PHP · 257 lines
12 }
14 require_once "PHPUnit/Framework/TestCase.php";
15 require_once "PHPUnit/Framework/TestSuite.php";
18 require_once 'Zend/Controller/Request/Http.php';
19 require_once 'Zend/Controller/Response/Http.php';
21 require_once 'Zend/Controller/Dispatcher/Exception.php';
22 require_once 'Zend/Controller/Action/Exception.php';
24 require_once 'Zend/Controller/Front.php';
56 public static function main()
57 {
58 require_once "PHPUnit/TextUI/TestRunner.php";
60 $suite = new PHPUnit_Framework_TestSuite("Zend_Controller_Plugin_ErrorHandlerTest");
DumpCompletionCommand.php (https://gitlab.com/hoangduys4k5/laravelproject) PHP · 133 lines
splfileinfo.getpath.html (https://bitbucket.org/stillzhl/manuals.git) HTML · 88 lines
10 <div class="next" style="text-align: right; float: right;"><a href="splfileinfo.getpathinfo.html">SplFileInfo::getPathInfo</a></div>
11 <div class="up"><a href="class.splfileinfo.html">SplFileInfo</a></div>
12 <div class="home"><a href="index.html">PHP Manual</a></div>
13 </div><hr /><div id="splfileinfo.getpath" class="refentry">
14 <div class="refnamediv">
15 <h1 class="refname">SplFileInfo::getPath</h1>
16 <p class="verinfo">(PHP 5 >= 5.1.2)</p><p class="refpurpose"><span class="refname">SplFileInfo::getPath</span> — <span class="dc-title">Gets the path without filename</span></p>
18 </div>
53 <div class="phpcode"><code><span style="color: #000000">
54 <span style="color: #0000BB"><?php<br />$info </span><span style="color: #007700">= new </span><span style="color: #0000BB">SplFileInfo</span><span style="color: #007700">(</span><span style="color: #DD0000">'/usr/bin/php'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$info</span><span style="color: #007700">-></span><span style="color: #0000BB">getPath</span><span style="color: #007700">());<br /><br /><br /></span><span style="color: #0000BB">$info </span><span style="color: #007700">= new </span><span style="color: #0000BB">SplFileInfo</span><span style="color: #007700">(</span><span style="color: #DD0000">'/usr/'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$info</span><span style="color: #007700">-></span><span style="color: #0000BB">getPath</span><span style="color: #007700">());</span><span style="color: #0000BB">?></span>
55 </span>
56 </code></div>
73 <p class="para">
74 <ul class="simplelist">
75 <li class="member"> <span class="methodname"><a href="splfileinfo.getrealpath.html" class="methodname" rel="rdfs-seeAlso">SplFileInfo::getRealPath()</a> - Gets absolute path to file</span></li>
76 <li class="member"> <span class="methodname"><a href="splfileinfo.getfilename.html" class="methodname" rel="rdfs-seeAlso">SplFileInfo::getFilename()</a> - Gets the filename</span></li>
77 <li class="member"> <span class="methodname"><a href="splfileinfo.getpathinfo.html" class="methodname" rel="rdfs-seeAlso">SplFileInfo::getPathInfo()</a> - Gets an SplFileInfo object for the path</span></li>
HelperBrokerTest.php (https://github.com/bhaumik25/zend-framework.git) PHP · 248 lines
13 }
15 require_once "PHPUnit/Framework/TestCase.php";
16 require_once "PHPUnit/Framework/TestSuite.php";
19 require_once 'Zend/Controller/Request/Http.php';
20 require_once 'Zend/Controller/Response/Cli.php';
22 require_once 'Zend/Controller/Action/HelperBroker.php';
23 require_once 'Zend/Controller/Action/Helper/ViewRenderer.php';
24 require_once 'Zend/Controller/Action/Helper/Redirector.php';
34 public static function main()
35 {
36 require_once "PHPUnit/TextUI/TestRunner.php";
38 $suite = new PHPUnit_Framework_TestSuite("Zend_Controller_Action_HelperBrokerTest");
FilterPluginManager.php (https://bitbucket.org/alexandretaz/maniac_divers.git) PHP · 118 lines
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
61 'numberformat' => 'Zend\I18n\Filter\NumberFormat',
62 'pregreplace' => 'Zend\Filter\PregReplace',
63 'realpath' => 'Zend\Filter\RealPath',
64 'stringtolower' => 'Zend\Filter\StringToLower',
65 'stringtoupper' => 'Zend\Filter\StringToUpper',
config.php (https://gitlab.com/daniruizcamacho/pfcascensores) PHP · 117 lines
1 <?php
3 $basePath = $app['path.base'];
5 return array_map('realpath', array(
6 $basePath.'/vendor/laravel/framework/src/Illuminate/Support/ClassLoader.php',
7 $basePath.'/vendor/laravel/framework/src/Illuminate/Container/Container.php',
8 $basePath.'/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernelInterface.php',
9 $basePath.'/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/TerminableInterface.php',
10 $basePath.'/vendor/laravel/framework/src/Illuminate/Support/Contracts/ResponsePreparerInterface.php',
11 $basePath.'/vendor/laravel/framework/src/Illuminate/Foundation/Application.php',
12 $basePath.'/vendor/laravel/framework/src/Illuminate/Foundation/EnvironmentDetector.php',
Log.php (https://github.com/bireme/isis-oai-provider.git) PHP · 159 lines
Error.class.php (https://github.com/jackygrahamez/DrugDiscovery-Home.git) PHP · 440 lines
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Holds class PMA_Error
5 *
6 * @version $Id: Error.class.php 12202 2009-01-20 18:04:20Z lem9 $
7 * @package phpMyAdmin
11 * base class
12 */
13 require_once './libraries/Message.class.php';
15 /**
16 * a single error
17 *
18 * @package phpMyAdmin
19 */
20 class PMA_Error extends PMA_Message
Memcache.php (https://gitlab.com/bhargavi_dcw/dflocal) PHP · 178 lines
JFolderTest.php (https://github.com/Paladin/joomla-platform.git) PHP · 409 lines
1 <?php
2 /**
3 * @package Joomla.UnitTest
7 */
9 JLoader::register('JFolder', JPATH_PLATFORM . '/joomla/filesystem/folder.php');
11 /**
12 * Test class for JFolder.
13 * Generated by PHPUnit on 2011-10-26 at 19:32:37.
14 *
15 * @package Joomla.UnitTest
134 file_put_contents(JPath::clean(JPATH_TESTS . '/tmp/test/test/index.txt'), 'test');
136 // Use of realpath to ensure test works for on all platforms
137 $result = JFolder::files(JPath::clean(JPATH_TESTS . '/tmp/test'), 'index.*', true, true, array('index.html'));
138 $result[0] = realpath($result[0]);
OrientDBRecordSpeedTest.php (https://github.com/davidino/OrientDB-PHP.git) PHP · 145 lines
1 <?php
3 /**
4 * @author Anton Terekhov <anton@netmonsters.ru>
5 * @copyright Copyright Anton Terekhov, NetMonsters LLC, 2011
6 * @license https://github.com/AntonTerekhov/OrientDB-PHP/blob/master/LICENSE
7 * @link https://github.com/AntonTerekhov/OrientDB-PHP
8 * @package OrientDB-PHP
9 */
11 require_once 'OrientDB/OrientDB.php';
13 /**
DefaultListenerAggregateTest.php (https://github.com/zucchi/zf2.git) PHP · 118 lines
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
13 use InvalidArgumentException;
14 use PHPUnit_Framework_TestCase as TestCase;
15 use Zend\EventManager\EventManager;
16 use Zend\Loader\ModuleAutoloader;
38 new ListenerOptions(array(
39 'module_paths' => array(
40 realpath(__DIR__ . '/TestAsset'),
41 ),
42 ))
AutoloaderTest.php (https://github.com/devilsansclue/ZendFramework.git) PHP · 190 lines
1 <?php
2 /**
3 * Zend Framework
21 */
23 if (!defined('PHPUnit_MAIN_METHOD')) {
24 define('PHPUnit_MAIN_METHOD', 'Zend_Application_Module_AutoloaderTest::main');
28 * @see Zend_Loader_Autoloader
29 */
30 require_once 'Zend/Loader/Autoloader.php';
32 /**
33 * @see Zend_Application_Module_Autoloader
34 */
35 require_once 'Zend/Loader/Autoloader/Resource.php';
37 /**
ext_fb.h (https://bitbucket.org/gnanakeethan/hiphop-php.git) C Header · 101 lines
1 /*
2 +----------------------------------------------------------------------+
3 | HipHop for PHP |
4 +----------------------------------------------------------------------+
5 | Copyright (c) 2010- Facebook, Inc. (http://www.facebook.com) |
6 | Copyright (c) 1997-2010 The PHP Group |
7 +----------------------------------------------------------------------+
8 | This source file is subject to version 3.01 of the PHP license, |
9 | that is bundled with this package in the file LICENSE, and is |
10 | available through the world-wide-web at the following url: |
11 | http://www.php.net/license/3_01.txt |
12 | If you did not receive a copy of the PHP license and are unable to |
13 | obtain it through the world-wide-web, please send a note to |
14 | license@php.net so we can mail you a copy immediately. |
15 +----------------------------------------------------------------------+
16 */
view.php (https://bitbucket.org/tumivn/phpexamples.git) PHP · 437 lines
1 <?php
2 /**
3 *
4 * @View Class
5 *
6 * @copyright Copyright (C) 2009 PHPRO.ORG. All rights reserved.
7 *
8 * @license new bsd http://www.opensource.org/licenses/bsd-license.php
136 if (!empty($this->template_dir))
137 {
138 $template_file = realpath($this->template_dir) . '/' . $template_file;
139 }
196 public function setTemplateDir($dir)
197 {
198 $template_dir = realpath($dir);
199 if (is_dir($template_dir))
200 {
FileTraits.php (https://gitlab.com/nitm/yii2-filemanager) PHP · 206 lines
1 <?php
3 namespace nitm\filemanager\traits;
59 public function exists()
60 {
61 return file_exists($this->getRealPath());
62 }
64 public function getRealPath()
65 {
66 try {
79 public function getContents()
80 {
81 if (Storage::exists($this->getRealPath())) {
82 return Storage::getContents($this->getRealPath());
AppNameCommand.php (https://gitlab.com/pomirleanu.florentin/SMS-Client) PHP · 306 lines
1 <?php namespace Illuminate\Foundation\Console;
3 use Illuminate\Console\Command;
79 $this->setComposerNamespace();
81 $this->setPhpSpecNamespace();
83 $this->info('Application namespace set!');
97 $files = Finder::create()
98 ->in($this->laravel['path'])
99 ->name('*.php');
101 foreach ($files as $file)
102 {
103 $this->replaceNamespace($file->getRealPath());
104 }
105 }
PluginLoaderTest.php (https://github.com/bhaumik25/zend-framework.git) PHP · 348 lines
1 <?php
2 // Call Zend_Loader_PluginLoaderTest::main() if this source file is executed directly.
3 if (!defined('PHPUnit_MAIN_METHOD')) {
4 define('PHPUnit_MAIN_METHOD', 'Zend_Loader_PluginLoaderTest::main');
5 }
8 * Test helper
9 */
10 require_once dirname(__FILE__) . '/../../TestHelper.php';
12 require_once 'Zend/Loader/PluginLoader.php';
24 public static function main()
25 {
26 require_once "PHPUnit/TextUI/TestRunner.php";
28 $suite = new PHPUnit_Framework_TestSuite("Zend_Loader_PluginLoaderTest");
ShowAuditTrail.php (https://github.com/CoreyTisdale/YiiAuditTrail.git) PHP · 166 lines
forms_pipeline.php (https://bitbucket.org/pombredanne/spip-zone-treemap.git) PHP · 129 lines
ApacheMatcherDumperTest.php (https://github.com/ivebeenlinuxed/Boiler.git) PHP · 196 lines
1 <?php
3 /*
16 use Symfony\Component\Routing\Matcher\Dumper\ApacheMatcherDumper;
18 class ApacheMatcherDumperTest extends \PHPUnit_Framework_TestCase
19 {
20 protected static $fixturesPath;
22 public static function setUpBeforeClass()
23 {
24 self::$fixturesPath = realpath(__DIR__.'/../../Fixtures/');
25 }
58 $collection->add('foo', new Route('/foo'));
59 $dumper = new ApacheMatcherDumper($collection);
60 $this->assertStringEqualsFile(self::$fixturesPath.'/dumper/url_matcher2.apache', $dumper->dump(array('script_name' => 'ap p_d\ ev.php')));
61 }
XsdTest.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 277 lines
1 <?php
2 /**
3 * Copyright © 2016 Magento. All rights reserved.
9 * Test for validation rules implemented by XSD schema for API integration configuration.
10 */
11 class XsdTest extends \PHPUnit_Framework_TestCase
12 {
13 /**
22 }
23 $urnResolver = new \Magento\Framework\Config\Dom\UrnResolver();
24 $this->_schemaFile = $urnResolver->getRealPath(
25 'urn:magento:module:Magento_Integration:etc/integration/api.xsd'
26 );
46 /**
47 * @return array
48 * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
49 */
50 public function exemplarXmlDataProvider()
index.php (https://bitbucket.org/denisOg/soft-site.git) PHP · 161 lines
1 <?php
2 error_reporting(E_ALL | E_STRICT);
3 ini_set('display_errors', 'On');
4 ini_set('short_open_tag', 'On');
5 include_once(__DIR__ . '/config.php');
6 $PAGE = !empty($_GET['page']) ? $_GET['page'] : 'list';
7 $data = array('test' => 'Success');
14 $data['title'] = 'Список программ';
15 $data['aResult'] = $oMySQL->Select('soft');
16 render('_list.php', $data);
17 }
22 $data['title'] = 'Список программ';
23 $data['aResult'] = $oMySQL->Select('soft');
24 render('_admin_list.php', $data);
25 }
FileSystem.php (https://bitbucket.org/khuongduybui/openfisma.git) PHP · 267 lines
1 <?php
2 /**
3 * LICENSE
18 */
20 // require_once 'Zend/Cloud/StorageService/Adapter.php';
21 // require_once 'Zend/Cloud/StorageService/Exception.php';
63 $this->_directory = $options[self::LOCAL_DIRECTORY];
64 } else {
65 $this->_directory = realpath(sys_get_temp_dir());
66 }
67 }
79 {
80 $filepath = $this->_getFullPath($path);
81 $path = realpath($filepath);
83 if (!$path) {
InfBinarySectionTest.py (https://gitlab.com/envieidoc/Clover) Python · 386 lines
7 # under the terms and conditions of the BSD License which accompanies this
8 # distribution. The full text of the license may be found at
9 # http://opensource.org/licenses/bsd-license.php
10 #
11 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
267 # Create a temp file for test.
268 #
269 FileName = os.path.normpath(os.path.realpath(ValueList[1].strip()))
270 try:
271 TempFile = open (FileName, "w")
File.php (https://bitbucket.org/rybadour/todo_list_site.git) PHP · 241 lines
1 <?php defined('SYSPATH') OR die('No direct script access.');
2 /**
3 * File helper class.
13 /**
14 * Attempt to get the mime type from a file. This method is horribly
15 * unreliable, due to PHP being horribly unreliable when it comes to
16 * determining the mime type of a file.
17 *
25 {
26 // Get the complete path to the file
27 $filename = realpath($filename);
29 // Get the extension from the filename
67 * $mime = File::mime_by_ext('png'); // "image/png"
68 *
69 * @param string $extension php, pdf, txt, etc
70 * @return string mime type on success
71 * @return FALSE on failure
CITestBase.php (https://github.com/rickogden/joind.in.git) PHP · 216 lines
17 /*
18 |---------------------------------------------------------------
19 | PHP ERROR REPORTING LEVEL
20 |---------------------------------------------------------------
21 |
22 | By default CI runs with error reporting set to ALL. For security
23 | reasons you are encouraged to change this when your site goes live.
24 | For more info visit: http://www.php.net/error_reporting
25 |
26 */
75 */
77 if (function_exists('realpath') AND @realpath(dirname(__FILE__)) !== FALSE)
78 {
79 $system_folder = realpath(dirname(__FILE__)).'/'.$system_folder;
85 |---------------------------------------------------------------
86 |
87 | EXT - The file extension. Typically ".php"
88 | SELF - The name of THIS file (typically "index.php")
generator.php (https://github.com/Hywan/atoum.git) PHP · 239 lines
1 <?php
3 namespace mageekguy\atoum\tests\units\test;
8 use mageekguy\atoum\test\generator as testedClass;
10 require_once __DIR__ . '/../../runner.php';
12 class generator extends atoum\test
212 ->and($testClassesDirectoryPath = new \mock\mageekguy\atoum\fs\path(DIRECTORY_SEPARATOR . implode(DIRECTORY_SEPARATOR, ['a', 'b', 'c'])))
213 ->and($this->calling($testClassesDirectoryPath)->exists = true)
214 ->and($this->calling($testClassesDirectoryPath)->getRealPath = $testClassesDirectoryPath)
215 ->and($testedClassPath = new \mock\mageekguy\atoum\fs\path(DIRECTORY_SEPARATOR . implode(DIRECTORY_SEPARATOR, ['x', 'y', 'z', 'f.php'])))
216 ->and($this->calling($testedClassPath)->putContents = $testedClassPath)
217 ->and($testClassPath = new \mock\mageekguy\atoum\fs\path(DIRECTORY_SEPARATOR . implode(DIRECTORY_SEPARATOR, ['a', 'b', 'c', 'd', 'e', 'f.php'])))
218 ->and($this->calling($testClassPath)->getRealParentDirectoryPath = new \mock\mageekguy\atoum\fs\path(DIRECTORY_SEPARATOR . implode(DIRECTORY_SEPARATOR, ['a', 'b', 'c', 'd', 'e'])))
219 ->and($this->calling($testClassPath)->getRealPath = $testClassPath)
gift.php (https://github.com/pinhao/giftweb.git) PHP · 171 lines
1 <?php
2 defined('BASEPATH') OR exit('No direct script access allowed');
9 *
10 */
11 require APPPATH.'/libraries/REST_Controller.php';
12 require APPPATH.'/libraries/GIFTLib.php';
23 $port = $this->config->item('gift_port');
24 $this->GIFTLib = new GIFTLib($host, $port);
25 $this->rootWebPath = rtrim(realpath('.'), '/').'/';
26 }
file.php (https://github.com/akutaktau/feedmalaya.git) PHP · 351 lines
1 <?php
2 /**
3 * Fuel
4 *
5 * Fuel is a fast, lightweight, community driven PHP5 framework.
6 *
7 * @package Fuel
10 * @license MIT License
11 * @copyright 2010 - 2011 Fuel Development Team
12 * @link http://fuelphp.com
13 */
321 }
322 // update the path, and add the trailing slash
323 $item = realpath($item).'/';
324 break;
Map.php (https://github.com/ggunlugu/ornekler.git) PHP · 143 lines
1 <?php
2 /**
3 *
42 {
43 $dir = Solar_Class::dir('Solar', '../tests');
44 $base = realpath($dir);
46 $map = Solar::factory('Solar_Class_Map');
49 $actual = $map->fetch('Mock_Solar');
50 $expect = array(
51 "Mock_Solar_Controller_Page" => "$base/Mock/Solar/Controller/Page.php",
52 "Mock_Solar_Example" => "$base/Mock/Solar/Example.php",
53 "Mock_Solar_Exception" => "$base/Mock/Solar/Exception.php",
54 "Mock_Solar_Exception_CustomCondition" => "$base/Mock/Solar/Exception/CustomCondition.php",
SetupInfo.php (https://gitlab.com/crazybutterfly815/magento2) PHP · 165 lines
AppNameCommand.php (https://gitlab.com/Sigpot/AirSpot) PHP · 286 lines
1 <?php
3 namespace Illuminate\Foundation\Console;
97 ->in($this->laravel['path'])
98 ->contains($this->currentRoot)
99 ->name('*.php');
101 foreach ($files as $file) {
102 $this->replaceNamespace($file->getRealPath());
103 }
104 }
225 {
226 $this->replaceIn(
227 $this->laravel->databasePath().'/factories/ModelFactory.php', $this->currentRoot, $this->argument('name')
228 );
229 }
FileReflection.php (https://github.com/zucchi/zf2.git) PHP · 313 lines
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
78 public function __construct($filename)
79 {
80 if (($fileRealPath = realpath($filename)) === false) {
81 $fileRealPath = stream_resolve_include_path($filename);
82 }
84 if (!$fileRealPath || !in_array($fileRealPath, get_included_files())) {
85 throw new Exception\RuntimeException('File ' . $filename . ' must be required before it can be reflected');
86 }
88 $this->filePath = $fileRealPath;
89 $this->reflect();
90 }
JsPush.php (https://bitbucket.org/Dal-Papa/is-340-publish-base.git) PHP · 165 lines
1 <?php
2 /**
3 * Zend Framework
26 if (isset($_GET['progress'])) {
27 set_include_path(realpath(dirname(__FILE__) . '/../../../library')
28 . PATH_SEPARATOR . get_include_path());
30 require_once 'Zend/ProgressBar.php';
31 require_once 'Zend/ProgressBar/Adapter/JsPush.php';
131 var iFrame = document.createElement('iframe');
132 document.getElementsByTagName('body')[0].appendChild(iFrame);
133 iFrame.src = 'JsPush.php?progress';
134 }
Minifier.php (https://github.com/elleeott/WPOC-boilerplate.git) PHP · 287 lines
ClassNotFoundFatalErrorHandler.php (https://gitlab.com/ealexis.t/trends) PHP · 206 lines
1 <?php
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 }
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,
ProcessorTest.php (https://gitlab.com/axeltizon/magento-demopoweraccess) PHP · 173 lines
1 <?php
2 /**
3 * Copyright © 2016 Magento. All rights reserved.
10 /**
11 * Test class for \Magento\Catalog\Model\Product\Gallery\Processor.
12 * @magentoDataFixture Magento/Catalog/_files/product_simple.php
13 */
14 class ProcessorTest extends \PHPUnit_Framework_TestCase
42 self::$_mediaTmpDir = $mediaDirectory->getAbsolutePath($config->getBaseTmpMediaPath());
43 self::$_mediaDir = $mediaDirectory->getAbsolutePath($config->getBaseMediaPath());
44 $fixtureDir = realpath(__DIR__ . '/../../../_files');
46 $mediaDirectory->create($config->getBaseTmpMediaPath());
config.php (https://bitbucket.org/ccromos/zusammenspiel2.git) PHP · 117 lines
1 <?php
3 $basePath = $app['path.base'];
5 return array_map('realpath', array(
6 $basePath.'/vendor/laravel/framework/src/Illuminate/Support/ClassLoader.php',
7 $basePath.'/vendor/laravel/framework/src/Illuminate/Container/Container.php',
8 $basePath.'/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernelInterface.php',
9 $basePath.'/vendor/laravel/framework/src/Illuminate/Support/Contracts/ResponsePreparerInterface.php',
10 $basePath.'/vendor/laravel/framework/src/Illuminate/Foundation/Application.php',
11 $basePath.'/vendor/laravel/framework/src/Illuminate/Http/Request.php',
12 $basePath.'/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Request.php',
ClassMapAutoloader.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 248 lines
1 <?php
2 /**
3 * Zend Framework
21 // Grab SplAutoloader interface
22 #require_once dirname(__FILE__) . '/SplAutoloader.php';
24 /**
97 if (!is_array($map)) {
98 #require_once dirname(__FILE__) . '/Exception/InvalidArgumentException.php';
99 throw new Zend_Loader_Exception_InvalidArgumentException('Map file provided does not return a map');
100 }
199 * Resolve the real_path() to a file within a phar.
200 *
201 * @see https://bugs.php.net/bug.php?id=52769
202 * @param string $path
203 * @return string
LegacyApacheMatcherDumperTest.php (https://gitlab.com/techniconline/kmc) PHP · 204 lines
1 <?php
3 /*
19 * @group legacy
20 */
21 class LegacyApacheMatcherDumperTest extends \PHPUnit_Framework_TestCase
22 {
23 protected static $fixturesPath;
25 public static function setUpBeforeClass()
26 {
27 self::$fixturesPath = realpath(__DIR__ . '/../../Fixtures/');
28 }
66 $collection->add('foo', new Route('/foo'));
67 $dumper = new ApacheMatcherDumper($collection);
68 $this->assertStringEqualsFile(self::$fixturesPath . '/dumper/url_matcher2.apache', $dumper->dump(array('script_name' => 'ap p_d\ ev.php')));
69 }
filestore_funcs.php
(http://enginey.googlecode.com/svn/trunk/)
PHP · 363 lines
✨ Summary
This PHP code is a file search engine that matches files against a query based on various attributes such as name, directory, and content. It uses regular expressions to filter results and can recurse into subdirectories. The code returns an array of matching files, which can be used for further processing or display.
This PHP code is a file search engine that matches files against a query based on various attributes such as name, directory, and content. It uses regular expressions to filter results and can recurse into subdirectories. The code returns an array of matching files, which can be used for further processing or display.
1 <?php
2 /**
3 * Helper function to convert a simple pattern to a regular expression for matching.
130 $atts = stat($fullPath);
132 $rootPath = realPath($rootDir);
133 $resolvedDir = realPath($rootDir."/".$dir);
134 $resolvedFullPath = realPath($fullPath);
136 //Try to normalize down the paths so it does a consistent return.
360 return $matched;
361 }
362 // No closing PHP tag on purpose. Do not want it to print whitepace and thus not allow setting headers later.
LegacyApacheMatcherDumperTest.php (https://gitlab.com/mohamedchiheb.bida/workshopFOS) PHP · 204 lines
1 <?php
3 /*
19 * @group legacy
20 */
21 class LegacyApacheMatcherDumperTest extends \PHPUnit_Framework_TestCase
22 {
23 protected static $fixturesPath;
25 public static function setUpBeforeClass()
26 {
27 self::$fixturesPath = realpath(__DIR__.'/../../Fixtures/');
28 }
66 $collection->add('foo', new Route('/foo'));
67 $dumper = new ApacheMatcherDumper($collection);
68 $this->assertStringEqualsFile(self::$fixturesPath.'/dumper/url_matcher2.apache', $dumper->dump(array('script_name' => 'ap p_d\ ev.php')));
69 }
Client.php (https://gitlab.com/xolotsoft/pumasruiz) PHP · 228 lines
1 <?php
3 /*
102 $r = new \ReflectionClass('\\Symfony\\Component\\ClassLoader\\ClassLoader');
103 $requirePath = str_replace("'", "\\'", $r->getFileName());
104 $symfonyPath = str_replace("'", "\\'", realpath(__DIR__.'/../../..'));
105 $errorReporting = error_reporting();
107 $code = <<<EOF
108 <?php
110 error_reporting($errorReporting);
160 * method can be called on those instances.
161 *
162 * If the size of a file is greater than the allowed size (from php.ini) then
163 * an invalid UploadedFile is returned with an error set to UPLOAD_ERR_INI_SIZE.
164 *
ArchiveManager.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 171 lines
1 <?php
3 /*
21 /**
22 * @author Matthieu Moquet <matthieu@moquet.net>
23 * @author Till Klampaeckel <till@php.net>
24 */
25 class ArchiveManager
127 // Archive filename
128 $filesystem->ensureDirectoryExists($targetDir);
129 $target = realpath($targetDir).'/'.$packageName.'.'.$format;
130 $filesystem->ensureDirectoryExists(dirname($target));
136 if ($package instanceof RootPackageInterface) {
137 $sourcePath = realpath('.');
138 } else {
139 // Directory used to download the sources
AppNameCommand.php (https://gitlab.com/techniconline/kmc) PHP · 327 lines
1 <?php namespace Illuminate\Foundation\Console;
3 use Illuminate\Console\Command;
80 $this->setComposerNamespace();
82 $this->setPhpSpecNamespace();
84 $this->info('Application namespace set!');
98 $files = Finder::create()
99 ->in($this->laravel['path'])
100 ->name('*.php');
102 foreach ($files as $file) {
103 $this->replaceNamespace($file->getRealPath());
104 }
105 }
Tools.php (https://github.com/Slaver/kohana-wordpress.git) PHP · 187 lines
1 <?php defined('SYSPATH') OR die('No direct access allowed.');
3 class Wordpress_Tools {
91 $select = (isset($select) && is_numeric($select)) ? $select : rand(0, $count);
92 $image_url = ltrim($images[1][$select], '/');
93 $image_path = realpath($image_url);
95 if ( ! empty($image_url))
99 {
100 $tmp_dir = $image_root.'/cache';
101 $tmp_path = realpath($tmp_dir);
102 $tmp_name = substr(md5($image_url.'-'.$sizes[0].'-'.$sizes[1]), 0, 7).'.jpg';
103 $tmp_file = $tmp_path.'/'.$tmp_name;
143 if ( ! empty($file)) {
144 $home = Wordpress_Options::instance()->get_option('siteurl').'/';
145 $file_path = realpath(str_replace($home, '', $file));
147 if ( ! empty($file_path)) {
update_po_templates.php (https://gitlab.com/BeS/io.schiessle.org) PHP · 181 lines
1 #!/usr/bin/env php
2 <?php
25 }
27 define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
29 function update_core($dir, $domain)
36 --default-domain=$domain \
37 --output=locale/$domain.pot \
38 --language=PHP \
39 --add-comments=TRANS \
40 --keyword="_m:1,1t" \
44 --keyword="pgettext:1c,2" \
45 --keyword="npgettext:1c,2,3" \
46 index.php \
47 actions/*.php \
EditorUploadImageScaleTest.php (https://gitlab.com/andecode/theme-spark) PHP · 234 lines
index.php (https://github.com/Maigre/SupAir.git) PHP · 222 lines
1 <?php
3 define('APP_NAME','SupAir');
5 define('CLIENT_NAME','Client1'); //TODO find a way to choose client !
7 if (is_file('../'.APP_NAME.'_'.CLIENT_NAME.'_seed.php'))
8 {
9 define('APP_TYPE','local');
10 require_once('../'.APP_NAME.'_'.CLIENT_NAME.'_seed.php');
11 }
12 elseif (is_file('../'.APP_NAME.'_'.CLIENT_NAME.'.php'))
13 {
14 define('APP_TYPE','server');
15 require_once('../'.APP_NAME.'_'.CLIENT_NAME.'.php');
16 }
CWebModule.php (https://bitbucket.org/rezanachmad/php-selenium-training.git) PHP · 202 lines
1 <?php
2 /**
3 * CWebModule class file.
112 public function setControllerPath($value)
113 {
114 if(($this->_controllerPath=realpath($value))===false || !is_dir($this->_controllerPath))
115 throw new CException(Yii::t('yii','The controller path "{path}" is not a valid directory.',
116 array('{path}'=>$value)));
135 public function setViewPath($path)
136 {
137 if(($this->_viewPath=realpath($path))===false || !is_dir($this->_viewPath))
138 throw new CException(Yii::t('yii','The view path "{path}" is not a valid directory.',
139 array('{path}'=>$path)));
158 public function setLayoutPath($path)
159 {
160 if(($this->_layoutPath=realpath($path))===false || !is_dir($this->_layoutPath))
161 throw new CException(Yii::t('yii','The layout path "{path}" is not a valid directory.',
162 array('{path}'=>$path)));
yaf-application.environ.html (https://bitbucket.org/stillzhl/manuals.git) HTML · 77 lines
10 <div class="next" style="text-align: right; float: right;"><a href="yaf-application.execute.html">Yaf_Application::execute</a></div>
11 <div class="up"><a href="class.yaf-application.html">Yaf_Application</a></div>
12 <div class="home"><a href="index.html">PHP Manual</a></div>
13 </div><hr /><div id="yaf-application.environ" class="refentry">
14 <div class="refnamediv">
56 <div class="phpcode"><code><span style="color: #000000">
57 <span style="color: #0000BB"><?php<br />$config </span><span style="color: #007700">= array(<br /> </span><span style="color: #DD0000">"application" </span><span style="color: #007700">=> array(<br /> </span><span style="color: #DD0000">"directory" </span><span style="color: #007700">=> </span><span style="color: #0000BB">realpath</span><span style="color: #007700">(</span><span style="color: #0000BB">dirname</span><span style="color: #007700">(</span><span style="color: #0000BB">__FILE__</span><span style="color: #007700">)) . </span><span style="color: #DD0000">"/application"</span><span style="color: #007700">,<br /> ),<br />);<br /><br /></span><span style="color: #FF8000">/** Yaf_Application */<br /></span><span style="color: #0000BB">$application </span><span style="color: #007700">= new </span><span style="color: #0000BB">Yaf_Application</span><span style="color: #007700">(</span><span style="color: #0000BB">$config</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">$application</span><span style="color: #007700">-></span><span style="color: #0000BB">environ</span><span style="color: #007700">());<br /></span><span style="color: #0000BB">?></span>
58 </span>
59 </code></div>
74 <div class="next" style="text-align: right; float: right;"><a href="yaf-application.execute.html">Yaf_Application::execute</a></div>
75 <div class="up"><a href="class.yaf-application.html">Yaf_Application</a></div>
76 <div class="home"><a href="index.html">PHP Manual</a></div>
77 </div></body></html>
darcs.py (https://bitbucket.org/nbargnesi/idea.git) Python · 167 lines
ScriptingCore.cpp (https://bitbucket.org/Tsiannian/cocos2d-x.git) C++ · 882 lines
303 cocos2d::CCFileUtils *futil = cocos2d::CCFileUtils::sharedFileUtils();
305 const char *realPath = futil->fullPathFromRelativePath(path);
307 if (!realPath) {
308 CCLOG("!realPath. returning JS_FALSE");
309 return JS_FALSE;
310 }
313 unsigned long contentSize = 0;
315 content = (unsigned char*)CCString::createWithContentsOfFile(realPath)->getCString();
316 contentSize = strlen((char*)content);
execute.c
(https://swig.svn.sourceforge.net/svnroot/swig)
C · 287 lines
✨ Summary
This C code is part of a caching compiler for C programs, ccache. It provides functions to execute compilers and find executables by name in the system’s PATH environment variable. The execute
function runs a compiler with output redirected to specified files, while find_executable
searches for an executable by name, excluding links to a specific excluded name.
This C code is part of a caching compiler for C programs, ccache. It provides functions to execute compilers and find executables by name in the system’s PATH environment variable. The execute
function runs a compiler with output redirected to specified files, while find_executable
searches for an executable by name, excluding links to a specific excluded name.