100+ results for 'php rtrim'
Not the results you expected?
ReleaseController.php (https://gitlab.com/brucealdridge/yii2) PHP · 211 lines
1 <?php
2 /**
3 * @link http://www.yiiframework.com/
149 // cleanup whitespace
150 foreach($changelog as $i => $line) {
151 $changelog[$i] = rtrim($line);
152 }
200 '/function getVersion\(\)\n \{\n return \'(.+?)\';/',
201 "function getVersion()\n {\n return '$version';",
202 YII2_PATH . '/BaseYii.php');
203 }
fpdi_bridge.php (https://github.com/pauln/moodle.git) PHP · 208 lines
ListenerOptions.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 396 lines
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
268 {
269 if ($this->getConfigCacheKey()) {
270 return $this->getCacheDir() . '/module-config-cache.' . $this->getConfigCacheKey().'.php';
271 }
273 return $this->getCacheDir() . '/module-config-cache.php';
274 }
352 {
353 if ($this->getModuleMapCacheKey()) {
354 return $this->getCacheDir() . '/module-classmap-cache.' . $this->getModuleMapCacheKey() . '.php';
355 }
class.router.php (https://github.com/SteveBomber/Garden.git) PHP · 208 lines
index.php (https://bitbucket.org/jose_everson2013/wally-consultoria.git) PHP · 207 lines
1 <?php
2 ini_set("allow_url_fopen", true);
3 ini_set("allow_url_include", true);
82 * --------------------------------------------------------------------
83 *
84 * Normally you will set your default controller in the routes.php file.
85 * You can, however, force a custom routing by hard-coding a
86 * specific controller class/function here. For most applications, you
115 * The $assign_to_config array below will be passed dynamically to the
116 * config class when initialized. This allows you to set custom config
117 * items or override any default config values found in the config.php file.
118 * This can be handy as it permits you to share one application between
119 * multiple front controller files, with each file containing different
150 // ensure there's a trailing slash
151 $system_path = rtrim($system_path, '/').'/';
153 // Is the system path correct?
index.php (https://github.com/DiliCMS/DiliCMS.git) PHP · 206 lines
1 <?php
3 /*
80 * --------------------------------------------------------------------
81 *
82 * Normally you will set your default controller in the routes.php file.
83 * You can, however, force a custom routing by hard-coding a
84 * specific controller class/function here. For most applications, you
113 * The $assign_to_config array below will be passed dynamically to the
114 * config class when initialized. This allows you to set custom config
115 * items or override any default config values found in the config.php file.
116 * This can be handy as it permits you to share one application between
117 * multiple front controller files, with each file containing different
148 // ensure there's a trailing slash
149 $system_path = rtrim($system_path, '/').'/';
151 // Is the system path correct?
index.php (https://gitlab.com/zanderwong/admin) PHP · 195 lines
1 <?php
3 /*
78 * --------------------------------------------------------------------
79 *
80 * Normally you will set your default controller in the routes.php file.
81 * You can, however, force a custom routing by hard-coding a
82 * specific controller class/function here. For most applications, you
111 * The $assign_to_config array below will be passed dynamically to the
112 * config class when initialized. This allows you to set custom config
113 * items or override any default config values found in the config.php file.
114 * This can be handy as it permits you to share one application between
115 * multiple front controller files, with each file containing different
143 // ensure there's a trailing slash
144 $system_path = rtrim($system_path, '/') . '/';
146 // Is the system path correct?
Statement.php (https://github.com/Amleth/Patchwork-Doctrine.git) PHP · 194 lines
1 <?php
3 /*
26 * Portability Wrapper for a Statement
27 *
28 * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
29 * @link www.doctrine-project.com
30 * @since 2.0
121 $row = $this->fixRow($row,
122 $this->portability & (Connection::PORTABILITY_EMPTY_TO_NULL|Connection::PORTABILITY_RTRIM),
123 !is_null($this->case) && ($fetchStyle == PDO::FETCH_ASSOC || $fetchStyle == PDO::FETCH_BOTH) && ($this->portability & Connection::PORTABILITY_FIX_CASE)
124 );
137 }
139 $iterateRow = $this->portability & (Connection::PORTABILITY_EMPTY_TO_NULL|Connection::PORTABILITY_RTRIM);
140 $fixCase = !is_null($this->case) && ($fetchStyle == PDO::FETCH_ASSOC || $fetchStyle == PDO::FETCH_BOTH) && ($this->portability & Connection::PORTABILITY_FIX_CASE);
141 if (!$iterateRow && !$fixCase) {
ListClassFunction.filter.php (https://gitlab.com/virtualrealms/d7civicrm) PHP · 150 lines
19 * @link http://beautifyphp.sourceforge.net
20 * @license http://www.php.net/license/3_0.txt PHP License 3.0
21 * @version CVS: $Id:$
22 */
38 * @author Claudio Bustos <cdx@users.sourceforge.com>
39 * @copyright 2004-2006 Claudio Bustos
40 * @link http://pear.php.net/package/PHP_Beautifier
41 * @link http://beautifyphp.sourceforge.net
42 * @license http://www.php.net/license/3_0.txt PHP License 3.0
43 * @version Release: 0.1.14
44 */
45 class PHP_Beautifier_Filter_ListClassFunction extends PHP_Beautifier_Filter
46 {
47 protected $aFilterTokenFunctions = array(
cache_files_cleaner.php (https://gitlab.com/neuser/bitrix-core) PHP · 324 lines
files.php (https://gitlab.com/webbroteam/satisfaction-mvc) PHP · 306 lines
13 */
15 namespace phpFastCache\Drivers;
17 use phpFastCache\Core\DriverAbstract;
18 use phpFastCache\Exceptions\phpFastCacheDriverException;
20 /**
28 * phpFastCache_files constructor.
29 * @param array $config
30 * @throws phpFastCacheDriverException
31 */
32 public function __construct($config = array())
57 * @param bool $skip
58 * @return string
59 * @throws phpFastCacheDriverException
60 */
61 private function getFilePath($keyword, $skip = false)
CodeFile.php (https://gitlab.com/isdzulqor/Slis-Dev) PHP · 194 lines
1 <?php
2 /**
3 * @link http://www.yiiframework.com/
18 * @property string $relativePath The code file path relative to the application base path. This property is
19 * read-only.
20 * @property string $type The code file extension (e.g. php, txt). This property is read-only.
21 *
22 * @author Qiang Xue <qiang.xue@gmail.com>
116 /**
117 * @return string the code file extension (e.g. php, txt)
118 */
119 public function getType()
139 }
141 if ($type === 'php') {
142 return highlight_string($this->content, true);
143 } elseif (!in_array($type, ['jpg', 'gif', 'png', 'exe'])) {
helper_dir.php (https://github.com/idler/limb.git) PHP · 174 lines
1 <?php
3 /** This file is part of KCFinder project
8 * @author Pavel Tzonkov <pavelc@users.sourceforge.net>
9 * @copyright 2010 KCFinder Project
10 * @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2
11 * @license http://www.opensource.org/licenses/lgpl-2.1.php LGPLv2
15 class dir {
17 /** Checks if the given directory is really writable. The standard PHP
18 * function is_writable() does not work properly on Windows servers
19 * @param string $dir
113 return false;
115 if (strtoupper(substr(PHP_OS, 0, 3)) == "WIN")
116 $dir = str_replace("\\", "/", $dir);
117 $dir = rtrim($dir, "/");
utils.php (https://gitlab.com/Rad1calDreamer/honey) PHP · 225 lines
5 {
6 $arServices = Array();
7 include($servicePath.".services.php");
9 if (empty($arServices))
116 $arTemplate = Array();
117 if (is_file($themePath."/".$file."/description.php"))
118 @include($themePath."/".$file."/description.php");
150 $documentRoot = CSite::GetSiteDocRoot($site);
152 $path = rtrim($path, "/");
154 if (strlen($path) <= 0)
168 $PERM = Array();
169 if(file_exists($documentRoot.$pathDir."/.access.php"))
170 @include($documentRoot.$pathDir."/.access.php");
DirectFilesystem.php (https://github.com/ChuguluGames/mediawiki-svn.git) PHP · 500 lines
1 <?php
3 /**
4 * File holding the DirectFilesystem class.
5 *
6 * @file DirectFilesystem.php
7 * @ingroup Deployment
8 * @ingroup Filesystem
17 /**
18 * Filesystem class for direct PHP file and folder manipulation.
19 *
20 * @author Jeroen De Dauw
66 // Recursive approach required.
67 $file = rtrim( $file, '/' ) . '/';
68 $files = $this->listDir( $file );
Database.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 336 lines
1 <?php
2 /**
3 * Copyright © 2016 Magento. All rights reserved.
292 {
293 if ($this->checkDbUsage()) {
294 $path = rtrim(str_replace(['\\', '/'], '/', $result['path']), '/');
295 $file = '/' . ltrim($result['file'], '\\/');
330 if (null === $this->_mediaBaseDirectory) {
331 $mediaDir = $this->_filesystem->getDirectoryRead(DirectoryList::MEDIA)->getAbsolutePath();
332 $this->_mediaBaseDirectory = rtrim($mediaDir, '/');
333 }
334 return $this->_mediaBaseDirectory;
TextDataTest.php (https://gitlab.com/Zinnurain/destination_finder_beta) PHP · 365 lines
13 define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
14 }
15 require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
17 PHPExcel_Calculation_Functions::setCompatibilityMode(PHPExcel_Calculation_Functions::COMPATIBILITY_EXCEL);
201 $args = func_get_args();
202 $expectedResult = array_pop($args);
203 $result = call_user_func_array(array('PHPExcel_Calculation_TextData','SEARCHSENSITIVE'),$args);
204 $this->assertEquals($expectedResult, $result);
205 }
217 $args = func_get_args();
218 $expectedResult = array_pop($args);
219 $result = call_user_func_array(array('PHPExcel_Calculation_TextData','REPLACE'),$args);
220 $this->assertEquals($expectedResult, $result);
221 }
Controller.php (https://gitlab.com/rsilveira1987/Expresso) PHP · 184 lines
UniformResourceLocator.php (https://github.com/massiveart-webservices/ZOOLU.git) PHP · 465 lines
1 <?php
2 /**
3 * ZOOLU - Content Management System
28 * @copyright Copyright (c) 2008-2012 HID GmbH (http://www.hid.ag)
29 * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License, Version 3
30 * @version $Id: version.php
31 */
163 public function makeUnique($url, $addon = 0)
164 {
165 if (rtrim($url, '/') != $url) {
166 $newUrl = ($addon > 0) ? rtrim($url, '/') . '-' . $addon . '/' : $url;
261 // is folder
262 if ($this->isStartElement && !empty($this->parentId)) {
263 $this->path = rtrim($this->path, '/') . '/';
264 }
smarty_internal_cacheresource_file.php (https://github.com/GuessWho/don-t-enter.git) PHP · 259 lines
1 <?php
2 /**
3 * Smarty Internal Plugin CacheResource File
55 // relative file name?
56 if (!preg_match('/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/', $_cache_dir)) {
57 $_lock_dir = rtrim(getcwd(), '/\\') . DS . $_cache_dir;
58 } else {
59 $_lock_dir = $_cache_dir;
61 $cached->lock_id = $_lock_dir.sha1($_cache_id.$_compile_id.$_template->source->uid).'.lock';
62 }
63 $cached->filepath = $_cache_dir . $_cache_id . $_compile_id . $_filepath . '.' . basename($_source_file_path) . '.php';
64 Smarty::muteExpectedErrors();
65 $cached->timestamp = @filemtime($cached->filepath);
223 public function hasLock(Smarty $smarty, Smarty_Template_Cached $cached)
224 {
225 if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
226 clearstatcache(true, $cached->lock_id);
227 } else {
smarty_internal_cacheresource_file.php (https://github.com/SquattingSasquatches/Lucidity.git) PHP · 264 lines
1 <?php
2 /**
3 * Smarty Internal Plugin CacheResource File
55 // relative file name?
56 if (!preg_match('/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/', $_cache_dir)) {
57 $_lock_dir = rtrim(getcwd(), '/\\') . DS . $_cache_dir;
58 } else {
59 $_lock_dir = $_cache_dir;
61 $cached->lock_id = $_lock_dir.sha1($_cache_id.$_compile_id.$_template->source->uid).'.lock';
62 }
63 $cached->filepath = $_cache_dir . $_cache_id . $_compile_id . $_filepath . '.' . basename($_source_file_path) . '.php';
64 $cached->timestamp = @filemtime($cached->filepath);
65 $cached->exists = !!$cached->timestamp;
228 public function hasLock(Smarty $smarty, Smarty_Template_Cached $cached)
229 {
230 if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
231 clearstatcache(true, $cached->lock_id);
232 } else {
Curl.class.php (https://gitlab.com/fangjianwei/weifenxiao) PHP · 186 lines
Uses.php (https://github.com/studioskylab/Docblox.git) PHP · 175 lines
1 <?php
2 /**
3 * DocBlox
4 *
5 * PHP 5
6 *
7 * @category DocBlox
9 * @subpackage Behaviour
10 * @author Mike van Riel <mike.vanriel@naenius.com>
11 * @license http://www.opensource.org/licenses/mit-license.php MIT
12 * @link http://docblox-project.org
13 */
20 * @subpackage Behaviour
21 * @author Mike van Riel <mike.vanriel@naenius.com>
22 * @license http://www.opensource.org/licenses/mit-license.php MIT
23 * @link http://docblox-project.org
24 */
MySqlGrammar.php (https://gitlab.com/mdabutaleb/bitm-laravel-1) PHP · 257 lines
class-avada-blog.php (https://gitlab.com/webkod3r/tripolis) PHP · 236 lines
1 <?php
3 class Avada_Blog {
141 if ( $post->post_excerpt || false !== $pos ) {
142 $raw_content = ( ! $pos ) ? wp_strip_all_tags( rtrim( get_the_excerpt(), '[…]' ), '<p>' ) . $read_more : $raw_content;
143 $custom_excerpt = true;
144 }
149 $raw_content = get_the_content( $readmore );
150 if ( $post->post_excerpt || false !== $pos ) {
151 $raw_content = ( ! $pos ) ? rtrim( get_the_excerpt(), '[…]' ) . $readmore : $raw_content;
152 $custom_excerpt = true;
153 }
234 }
236 // Omit closing PHP tag to avoid "Headers already sent" issues.
transport_connection.php (https://github.com/kamarulismail/kamarul-playground.git) PHP · 257 lines
1 <?php
2 /**
3 * File containing the ezcMailTransportConnection class
48 * transport connection.
49 *
50 * @todo The @ should be removed when PHP doesn't throw warnings for connect problems.
51 *
52 * @throws ezcMailTransportException
78 if ( ezcBaseFeatures::hasExtensionSupport( 'openssl' ) !== true )
79 {
80 throw new ezcBaseExtensionNotFoundException( 'openssl', null, "PHP not configured --with-openssl." );
81 }
82 $this->connection = @stream_socket_client( "ssl://{$server}:{$port}",
227 else
228 {
229 return rtrim( $data, "\r\n" );
230 }
231 }
ModuleAutoloader.php (https://github.com/stoefln/zf2.git) PHP · 188 lines
1 <?php
3 namespace Zend\Loader;
57 return false;
58 }
59 $moduleClassPath = str_replace('\\', DIRECTORY_SEPARATOR, $class) . '.php';
61 foreach ($this->paths as $path) {
62 $file = new SplFileInfo($path . $moduleClassPath);
63 if ($file->isReadable()) {
64 // Found directory with Module.php in it
65 require_once $file->getRealPath();
66 return $class;
67 }
68 // No directory with Module.php, searching for phars
69 $moduleName = substr($class, 0, strpos($class, '\\'));
Link.php (https://gitlab.com/billyprice1/bdApi) PHP · 183 lines
1 <?php
3 /* @var $app XenForo_Application */
4 $app = XenForo_Application::getInstance();
5 $xenforoLinkPath = $app->getRootDir() . '/library/XenForo/Link.php';
6 $xenforoLinkContents = file_get_contents($xenforoLinkPath);
8 // remove <?php
9 $xenforoLinkContents = substr($xenforoLinkContents, 5);
122 $outputLink = $append;
123 } else {
124 $outputLink = 'index.php' . $append;
125 }
CodeUnitFindingVisitor.php (https://gitlab.com/jjpa2018/dashboard) PHP · 323 lines
1 <?php declare(strict_types=1);
2 /*
3 * This file is part of phpunit/php-code-coverage.
4 *
5 * (c) Sebastian Bergmann <sebastian@phpunit.de>
13 use function rtrim;
14 use function trim;
15 use PhpParser\Node;
16 use PhpParser\Node\ComplexType;
20 use PhpParser\Node\NullableType;
21 use PhpParser\Node\Stmt\Class_;
22 use PhpParser\Node\Stmt\ClassMethod;
32 /**
33 * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage
34 */
35 final class CodeUnitFindingVisitor extends NodeVisitorAbstract
Helper.php (https://github.com/soitun/minify.git) PHP · 250 lines
1 <?php
2 /**
3 * Class Minify_HTML_Helper
65 public function getRawUri($farExpires = true, $debug = false)
66 {
67 $path = rtrim($this->minAppUri, '/') . '/';
68 if (! $this->rewriteWorks) {
69 $path .= '?';
173 }
174 if ($cached === null) {
175 $cached = (require __DIR__ . '/../../../bootstrap.php');
176 }
Offset.php (https://github.com/Nycto/Round-Eights.git) PHP · 151 lines
1 <?php
2 /**
3 * Unit Test File
18 *
19 * You should have received a copy of the Artistic License
20 * along with Round Eights. If not, see <http://www.RoundEights.com/license.php>
21 * or <http://www.opensource.org/licenses/artistic-license-2.0.php>.
26 */
28 require_once rtrim( __DIR__, "/" ) ."/../../general.php";
30 /**
31 * unit tests
32 */
33 class classes_Iterator_Offset extends PHPUnit_Framework_TestCase
34 {
index.php (https://github.com/chamnan/ionize.git) PHP · 220 lines
1 <?php
3 /*
94 * --------------------------------------------------------------------
95 *
96 * Normally you will set your default controller in the routes.php file.
97 * You can, however, force a custom routing by hard-coding a
98 * specific controller class/function here. For most applications, you
113 // $routing['directory'] = '';
115 // The controller class file name. Example: Mycontroller.php
116 // $routing['controller'] = '';
127 * The $assign_to_config array below will be passed dynamically to the
128 * config class when initialized. This allows you to set custom config
129 * items or override any default config values found in the config.php file.
130 * This can be handy as it permits you to share one application between
131 * multiple front controller files, with each file containing different
worktree.c (https://gitlab.com/181gaming/git) C · 303 lines
TextDataTest.php (https://gitlab.com/techniconline/kmc) PHP · 364 lines
12 define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
13 }
14 require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
16 PHPExcel_Calculation_Functions::setCompatibilityMode(PHPExcel_Calculation_Functions::COMPATIBILITY_EXCEL);
200 $args = func_get_args();
201 $expectedResult = array_pop($args);
202 $result = call_user_func_array(array('PHPExcel_Calculation_TextData', 'SEARCHSENSITIVE'), $args);
203 $this->assertEquals($expectedResult, $result);
204 }
216 $args = func_get_args();
217 $expectedResult = array_pop($args);
218 $result = call_user_func_array(array('PHPExcel_Calculation_TextData', 'REPLACE'), $args);
219 $this->assertEquals($expectedResult, $result);
220 }
Proxy.php (https://github.com/swoole/ide-helper.git) PHP · 205 lines
1 <?php
2 /**
3 * This file is part of Swoole.
36 /* @var string */
37 protected $index = 'index.php';
39 /* @var array */
119 $extension = pathinfo($pathInfo, PATHINFO_EXTENSION);
120 if (empty($extension)) {
121 $pathInfo = rtrim($pathInfo, '/') . '/' . $this->index;
122 }
123 }
190 if ($userResponse instanceof \Swoole\Http\Response) {
191 $extension = pathinfo($request->getScriptFilename(), PATHINFO_EXTENSION);
192 if ($extension !== 'php') {
193 $realPath = realpath($request->getScriptFilename());
194 if (!$realPath || strpos($realPath, $this->documentRoot) !== 0 || !is_file($realPath)) {
package.archive.zip.php (https://github.com/Canuckaholic/Pop-Digital.git) PHP · 144 lines
1 <?php
2 if ( ! defined( 'DUPLICATOR_VERSION' ) ) exit; // Exit if accessed directly
3 require_once (DUPLICATOR_PLUGIN_PATH . 'classes/package.archive.php');
5 /**
6 * DUP_ZIP
7 * Creates a zip file using the built in PHP ZipArchive class
8 */
9 class DUP_Zip extends DUP_Archive {
32 $package_zip_flush = DUP_Settings::Get('package_zip_flush');
34 self::$compressDir = rtrim(DUP_Util::SafePath($archive->PackDir), '/');
35 self::$sqlPath = DUP_Util::SafePath("{$archive->Package->StorePath}/{$archive->Package->Database->File}");
36 self::$zipPath = DUP_Util::SafePath("{$archive->Package->StorePath}/{$archive->File}");
51 $isZipOpen = (self::$zipArchive->open(self::$zipPath, ZIPARCHIVE::CREATE) === TRUE);
52 if (! $isZipOpen){
53 DUP_Log::Error("Cannot open zip file with PHP ZipArchive.", "Path location [" . self::$zipPath . "]");
54 }
55 DUP_Log::Info("ARCHIVE DIR: " . self::$compressDir);
citext.sql.in (https://github.com/gurjeet/postgres.git) Autoconf · 488 lines
SplFileInfo.php (https://gitlab.com/iranjith4/hhvm) PHP · 444 lines
3 // This doc comment block generated by idl/sysdoc.php
4 /**
5 * ( excerpt from http://php.net/manual/en/class.splfileinfo.php )
6 *
7 * The SplFileInfo class offers a high-level object oriented interface to
229 // This doc comment block generated by idl/sysdoc.php
230 /**
231 * ( excerpt from http://php.net/manual/en/splfileinfo.getextension.php )
232 *
233 * Retrieves the file extension.
292 // This doc comment block generated by idl/sysdoc.php
293 /**
294 * ( excerpt from http://php.net/manual/en/splfileinfo.isdir.php )
295 *
296 * This method can be used to determine if the file is a directory.
list_bullet_image_frame_decorator.cls.php (https://gitlab.com/techniconline/kmc) PHP · 151 lines
1 <?php
2 /**
3 * @package dompdf
55 // Resample the bullet image to be consistent with 'auto' sized images
56 // See also Image_Frame_Reflower::get_min_max_width
57 // Tested php ver: value measured in px, suffix "px" not in value: rtrim unnecessary.
58 $dpi = $this->_dompdf->get_option("dpi");
59 $this->_width = ((float)rtrim($width, "px") * 72) / $dpi;
60 $this->_height = ((float)rtrim($height, "px") * 72) / $dpi;
62 //If an image is taller as the containing block/box, the box should be extended.
appProdUrlMatcher.php (https://gitlab.com/mohamedchiheb.bida/workshopFOS) PHP · 232 lines
1 <?php
3 use Symfony\Component\Routing\Exception\MethodNotAllowedException;
35 // homepage
36 if (rtrim($pathinfo, '/') === '') {
37 if (substr($pathinfo, -1) !== '/') {
38 return $this->redirect($pathinfo.'/', 'homepage');
83 if (0 === strpos($pathinfo, '/profile')) {
84 // fos_user_profile_show
85 if (rtrim($pathinfo, '/') === '/profile') {
86 if (!in_array($this->context->getMethod(), array('GET', 'HEAD'))) {
87 $allow = array_merge($allow, array('GET', 'HEAD'));
113 if (0 === strpos($pathinfo, '/register')) {
114 // fos_user_registration_register
115 if (rtrim($pathinfo, '/') === '/register') {
116 if (!in_array($this->context->getMethod(), array('GET', 'POST', 'HEAD'))) {
117 $allow = array_merge($allow, array('GET', 'POST', 'HEAD'));
LockClient.php (https://github.com/Erika31/phpdaemon.git) PHP · 200 lines
SetCookie.php (https://gitlab.com/wuhang2003/rainloop-webmail) PHP · 410 lines
PluginLoader.php (https://github.com/bhaumik25/zend-framework.git) PHP · 339 lines
ServerShell.php (https://github.com/LubosRemplik/cakephp.git) PHP · 181 lines
1 <?php
2 /**
3 * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
4 * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
5 *
9 *
10 * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
11 * @link https://cakephp.org CakePHP(tm) Project
12 * @since 2.3.0
13 * @license https://opensource.org/licenses/mit-license.php MIT License
162 $parser->setDescription([
163 'PHP Built-in Server for CakePHP',
164 '<warning>[WARN] Don\'t use this in a production environment</warning>',
165 ])->addOption('host', [
BBDumper.class.php (https://github.com/Ralle/BBCode-Parser.git) PHP · 298 lines
1 <?php
3 require_once __DIR__ . '/BBCode.class.php';
4 require_once __DIR__ . '/BBCodeReplace.class.php';
5 require_once __DIR__ . '/BBCodeDefault.class.php';
6 require_once __DIR__ . '/BBCodeRoot.class.php';
7 require_once __DIR__ . '/BBCodeCallback.class.php';
207 }
209 // if the last child is a BBText, call rtrim on it.
210 public function trimInsideRight(BBNode $node)
211 {
213 if ($last !== false && $last instanceof BBText)
214 {
215 $last->text = rtrim($last->text);
216 }
217 }
BuilderTest.php (https://gitlab.com/mdabutaleb/bitm-laravel-1) PHP · 212 lines
27 $root = $this->getCoverageForBankAccount()->getReport();
29 $expectedPath = rtrim(TEST_FILES_PATH, DIRECTORY_SEPARATOR);
30 $this->assertEquals($expectedPath, $root->getName());
31 $this->assertEquals($expectedPath, $root->getPath());
138 [
139 'src' => [
140 'Money.php/f' => [],
141 'MoneyBag.php/f' => []
144 $method->invoke(
145 $this->factory,
146 ['src/Money.php' => [], 'src/MoneyBag.php' => []]
147 )
148 );
172 [
173 [
174 'Money.php' => [],
175 'MoneyBag.php' => []
extend.php (https://gitlab.com/valced/anchor-cms) PHP · 260 lines
db_config.test.php (https://github.com/cgajardo/repositorium.git) PHP · 155 lines
1 <?php
2 /**
3 * DBConfigTask Test Case
5 * PHP versions 4 and 5
6 *
7 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
8 * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
9 *
12 *
13 * @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
14 * @link http://cakephp.org CakePHP(tm) Project
15 * @package cake
16 * @subpackage cake.tests.cases.console.libs.tasks
17 * @since CakePHP(tm) v 1.3
18 * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
Archive.php (https://github.com/rgranadino/magento-mirror.git) PHP · 222 lines
1 <?php
2 /**
3 * Magento
8 * that is bundled with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://opensource.org/licenses/osl-3.0.php
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
22 * @package Mage_Archive
23 * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25 */
156 }
157 if ($i == 0) {
158 $packed = rtrim($destination, DS) . DS;
159 } else {
160 $packed = rtrim($destination, DS) . DS . '~tmp-'. microtime(true) . $archivers[$i-1] . '.' . $archivers[$i-1];
add_command_methods.php (https://github.com/netweaver/Rediska.git) PHP · 116 lines
1 <?php
3 /**
5 */
7 define('REDISKA', __DIR__ . '/../library/Rediska.php');
8 define('DOCBLOCK', "/**
9 * Generated command methods by 'scripts/add_command_methods.php'
21 function getParams($classReflection, $class)
22 {
23 $command = file_get_contents(__DIR__ . '/../library/Rediska/Command/' . substr($class, 16) . '.php');
24 preg_match('/public function create\((.+)/i', $command, $matches);
71 $createReflection = $classReflection->getMethod('create');
72 $createDocBlockLines = explode("\n", $createReflection->getDocComment());
73 $createDocBlockLines[1] = rtrim($description);
74 unset($createDocBlockLines[2]);
75 $createDocBlock = implode("\n", $createDocBlockLines);
HttpClient.php (https://github.com/rithis-archive/oauth2.git) PHP · 180 lines
1 <?php
2 /**
3 * Copyright (c) 2010 VZnet Netzwerke Ltd.
141 $this->_response = '';
142 }
143 $headers = rtrim(substr($fullResponse, 0, $this->_info['header_size']));
145 $this->_headers = static::parseStringToArray($headers, PHP_EOL, ':');
148 echo "<pre>";
149 print_r($this->_url);
150 echo PHP_EOL;
151 print_r($this->_headers);
152 echo PHP_EOL;
db_config.test.php (https://github.com/rasmusbergpalm/AESpad.git) PHP · 155 lines
1 <?php
2 /**
3 * DBConfigTask Test Case
5 * PHP versions 4 and 5
6 *
7 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
8 * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org)
9 *
12 *
13 * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org)
14 * @link http://cakephp.org CakePHP(tm) Project
15 * @package cake
16 * @subpackage cake.tests.cases.console.libs.tasks
17 * @since CakePHP(tm) v 1.3
18 * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
db_config.test.php (https://github.com/rasmusbergpalm/nomnom.git) PHP · 155 lines
1 <?php
2 /**
3 * DBConfigTask Test Case
5 * PHP versions 4 and 5
6 *
7 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
8 * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
9 *
12 *
13 * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
14 * @link http://cakephp.org CakePHP(tm) Project
15 * @package cake
16 * @subpackage cake.tests.cases.console.libs.tasks
17 * @since CakePHP(tm) v 1.3
18 * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
cleanup.php (https://bitbucket.org/anneivycat/ebcookhouse.git) PHP · 224 lines
1 <?php
2 /*************************************************************
3 *
10 * www.prelovac.com
11 **************************************************************/
12 if(basename($_SERVER['SCRIPT_FILENAME']) == "cleanup.php"):
13 exit;
14 endif;
174 $table_string = substr($table_string, 0, strlen($table_string) - 1); //remove last ,
176 $table_string = rtrim($table_string);
178 $query = "OPTIMIZE TABLE $table_string";
HelperBroker.php (https://gitlab.com/devtoannh/cafe) PHP · 381 lines
1 <?php
2 /**
3 * Zend Framework
18 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id: HelperBroker.php 23775 2011-03-01 17:25:24Z ralph $
21 */
24 * @see Zend_Controller_Action_HelperBroker_PriorityStack
25 */
26 require_once 'Zend/Controller/Action/HelperBroker/PriorityStack.php';
28 /**
29 * @see Zend_Loader
30 */
31 require_once 'Zend/Loader.php';
33 /**
account.php (https://gitlab.com/x33n/platform) PHP · 110 lines
1 <?php
2 if (isset($_POST['doaccountchange'])) {
3 $valid_user_response = $cash_admin->requestAndStore(
100 // get page url
101 if (SUBDOMAIN_USERNAMES) {
102 $cash_admin->page_data['user_page_uri'] = str_replace('https','http',rtrim(str_replace('admin', '', CASH_ADMIN_URL),'/'));
103 $cash_admin->page_data['user_page_uri'] = str_replace('://','://' . $current_username . '.',$cash_admin->page_data['user_page_uri']);
104 } else {
105 $cash_admin->page_data['user_page_uri'] = str_replace('https','http',rtrim(str_replace('admin', $current_username, CASH_ADMIN_URL),'/'));
106 }
107 $cash_admin->page_data['user_page_display_uri'] = str_replace('http://','',$cash_admin->page_data['user_page_uri']);
JwtVerifierBuilder.php (https://github.com/UMMS-Biocore/dolphinnext.git) PHP · 183 lines
UnusedUseFixer.php (https://gitlab.com/I-NOZex/quiz) PHP · 240 lines
ReflectionDocblock.php (https://github.com/sidealice/zf2.git) PHP · 292 lines
1 <?php
2 /**
3 * Zend Framework
94 public function __toString()
95 {
96 $str = "Docblock [ /* Docblock */ ] {".PHP_EOL.PHP_EOL;
97 $str .= " - Tags [".count($this->_tags)."] {".PHP_EOL;
101 }
103 $str .= " }".PHP_EOL;
104 $str .= "}".PHP_EOL;
287 }
289 $this->_shortDescription = rtrim($this->_shortDescription);
290 $this->_longDescription = rtrim($this->_longDescription);
index.php (https://gitlab.com/fbi/socialtools) PHP · 207 lines
1 <?php
2 $current_time = time();
3 define('BI_TIME', $current_time);
82 * --------------------------------------------------------------------
83 *
84 * Normally you will set your default controller in the routes.php file.
85 * You can, however, force a custom routing by hard-coding a
86 * specific controller class/function here. For most applications, you
115 * The $assign_to_config array below will be passed dynamically to the
116 * config class when initialized. This allows you to set custom config
117 * items or override any default config values found in the config.php file.
118 * This can be handy as it permits you to share one application between
119 * multiple front controller files, with each file containing different
150 // ensure there's a trailing slash
151 $system_path = rtrim($system_path, '/').'/';
153 // Is the system path correct?
Security.php (https://bitbucket.org/allanxyh/project.git) PHP · 188 lines
1 <?php
2 /**
3 * Core Security
5 * PHP 5
6 *
7 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
8 * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
9 *
12 *
13 * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
14 * @link http://cakephp.org CakePHP(tm) Project
15 * @package Cake.Utility
16 * @since CakePHP(tm) v .0.10.0.1233
17 * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
18 */
FilesystemOptions.php (https://bitbucket.org/alexandretaz/maniac_divers.git) PHP · 458 lines
226 * @see setUmask
227 * @see setFilePermission
228 * @link http://php.net/manual/function.chmod.php
229 */
230 public function setDirPermission($dirPermission)
294 * @see setUmask
295 * @see setDirPermission
296 * @link http://php.net/manual/function.chmod.php
297 */
298 public function setFilePermission($filePermission)
416 * @see setFilePermission
417 * @see setDirPermission
418 * @link http://php.net/manual/function.umask.php
419 * @link http://en.wikipedia.org/wiki/Umask
420 */
admin.php (https://github.com/gtenaschuk/pyrocms.git) PHP · 259 lines
1 <?php
2 /**
3 * Modules controller, lists all installed modules
27 // Check the referrer
28 parse_url($this->input->server('HTTP_REFERER'), PHP_URL_HOST) == parse_url(BASE_URL, PHP_URL_HOST) or show_error('Invalid Referrer');
29 }
81 // Now try to unzip
82 $this->load->library('unzip');
83 $this->unzip->allow(array('xml', 'html', 'css', 'js', 'png', 'gif', 'jpeg', 'jpg', 'swf', 'ico', 'php'));
85 // Try and extract
247 elseif (is_dir($str))
248 {
249 $scan = glob(rtrim($str,'/').'/*');
251 foreach($scan as $index => $path)
Stack.php (https://github.com/ggunlugu/ornekler.git) PHP · 353 lines
1 <?php
2 /**
3 *
11 * @package Solar
12 *
13 * @author Paul M. Jones <pmjones@solarphp.com>
14 *
15 * @license http://opensource.org/licenses/bsd-license.php BSD
16 *
17 * @version $Id: Stack.php 4533 2010-04-23 16:35:15Z pmjones $
18 *
19 */
45 * Adds one or more classes to the stack.
46 *
47 * {{code: php
48 *
49 * // add by array
Magic.php (https://github.com/ewandor/horde.git) PHP · 232 lines
1 <?php
2 /**
3 * The Horde_Mime_Magic:: class provides an interface to determine a MIME type
32 {
33 if (is_null(self::$_map)) {
34 require dirname(__FILE__) . '/mime.mapping.php';
35 self::$_map = $mime_extension_map;
36 }
166 foreach (array(';', ',', '\\0') as $separator) {
167 if (($pos = strpos($type, $separator)) !== false) {
168 $type = rtrim(substr($type, 0, $pos));
169 }
170 }
200 $opts = array())
201 {
202 /* If the PHP Mimetype extension is available, use that. */
203 if (Horde_Util::extensionExists('fileinfo')) {
204 $res = empty($magic_db)
ConfigurableTestCase.php (https://github.com/xdade/doctrine1.git) PHP · 222 lines
1 <?php
2 class Doctrine_Configurable_TestCase extends Doctrine_UnitTestCase
3 {
160 public function testPortabilityAttributeAcceptsPortabilityConstants()
161 {
162 $this->manager->setAttribute(Doctrine_Core::ATTR_PORTABILITY, Doctrine_Core::PORTABILITY_RTRIM | Doctrine_Core::PORTABILITY_FIX_CASE);
164 $this->assertEqual($this->manager->getAttribute(Doctrine_Core::ATTR_PORTABILITY),
165 Doctrine_Core::PORTABILITY_RTRIM | Doctrine_Core::PORTABILITY_FIX_CASE);
166 $this->manager->setAttribute(Doctrine_Core::ATTR_PORTABILITY, Doctrine_Core::PORTABILITY_ALL);
167 }
Innovative.php (https://github.com/dswalker/xerxes.git) PHP · 211 lines
MY_Pagination.php (https://github.com/picoder/Deltus.git) PHP · 148 lines
1 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
3 class MY_Pagination extends CI_Pagination
83 // Add a trailing slash to the base URL if needed
84 $this->base_url = rtrim($this->base_url, '/') .'/';
86 // And here we go...
146 // END Pagination Class
148 /* End of file MY_Pagination.php */
ModuleAutoloader.php (https://github.com/leerbag/zf2.git) PHP · 304 lines
1 <?php
3 namespace Zend\Loader;
5 // Grab SplAutoloader interface
6 require_once __DIR__ . '/SplAutoloader.php';
8 use SplFileInfo,
103 return $classLoaded;
104 }
105 // No directory with Module.php, searching for phars
106 //$moduleName = substr($class, 0, strpos($class, '\\'));
128 protected function loadModuleFromDir($dirPath, $class)
129 {
130 $file = new SplFileInfo($dirPath . '/Module.php');
131 if ($file->isReadable() && $file->isFile()) {
132 // Found directory with Module.php in it
Request.php (https://bitbucket.org/helfreire/tccsite.git) PHP · 505 lines
Connection.php (https://gitlab.com/techniconline/kmc) PHP · 145 lines
HelperBroker.php (https://github.com/praveensingh85/MyEventDashboard1.git) PHP · 381 lines
1 <?php
2 /**
3 * Zend Framework
18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id: HelperBroker.php 20096 2010-01-06 02:05:09Z bkarwin $
21 */
24 * @see Zend_Controller_Action_HelperBroker_PriorityStack
25 */
26 require_once 'Zend/Controller/Action/HelperBroker/PriorityStack.php';
28 /**
29 * @see Zend_Loader
30 */
31 require_once 'Zend/Loader.php';
33 /**
database.php (https://github.com/baijiacms/baijiacmsV3.git) PHP · 251 lines
1 <?php
2 defined('SYSTEM_IN') or exit('Access Denied');
3 $operation = !empty($_GP['op']) ? $_GP['op'] : 'display';
77 $tmp .= "'" . dump_escape_mimic($v) . "',";
78 }
79 $tmp = rtrim($tmp, ',');
80 $tmp .= "),\n";
81 }
82 $tmp = rtrim($tmp, ",\n");
83 $dump .= "INSERT INTO {$t} VALUES \n{$tmp};\n";
84 if(strlen($dump) > $volumn) {
Maildir.php (https://gitlab.com/Ltaimao/wecenter) PHP · 265 lines
1 <?php
2 /**
3 * Zend Framework
25 * @see Zend_Mail_Storage_Folder
26 */
27 //require_once 'Zend/Mail/Storage/Folder.php';
29 /**
30 * @see Zend_Mail_Storage_Folder_Interface
31 */
32 //require_once 'Zend/Mail/Storage/Folder/Interface.php';
34 /**
35 * @see Zend_Mail_Storage_Maildir
36 */
37 //require_once 'Zend/Mail/Storage/Maildir.php';
spiplistes_listes_forcer_abonnement.php (https://bitbucket.org/pombredanne/spip-zone-treemap.git) PHP · 136 lines
1 <?php
2 /**
3 * @version Original From SPIP-Listes-V :: Id: spiplistes_listes_forcer_abonnement.php paladin@quesaco.org
85 if(!empty($sql_values)) {
86 $sql_values = rtrim($sql_values, ",");
87 $sql_result = sql_insert('spip_auteurs_listes'
88 , "(id_auteur, id_liste, date_inscription" . ($forcer_format_reception ? ",format" : "") . ")"
class.nextgen_style_manager.php (https://github.com/livinglab/openlab.git) PHP · 302 lines
1 <?php
3 class C_NextGen_Style_Manager
19 $this->new_dir = implode(DIRECTORY_SEPARATOR, array(
20 rtrim(WP_CONTENT_DIR, "/\\"),
21 'ngg_styles'
22 ));
35 // We check the parent theme directory. Needed for child themes
36 $this->add_directory(rtrim(get_template_directory(), "/\\"), TRUE);
38 // We also check parent_theme/nggallery
39 $this->add_directory(implode(DIRECTORY_SEPARATOR, array(
40 rtrim(get_template_directory(), "/\\"),
41 'nggallery'
42 )), TRUE);
Folder.php (https://gitlab.com/x33n/grav) PHP · 303 lines
appdevUrlMatcher.php (https://bitbucket.org/AdriVanHoudt/school.git) PHP · 198 lines
1 <?php
3 use Symfony\Component\Routing\Exception\MethodNotAllowedException;
34 if (0 === strpos($pathinfo, '/_profiler')) {
35 // _profiler_home
36 if (rtrim($pathinfo, '/') === '/_profiler') {
37 if (substr($pathinfo, -1) !== '/') {
38 return $this->redirect($pathinfo.'/', '_profiler_home');
78 }
80 // _profiler_phpinfo
81 if ($pathinfo === '/_profiler/phpinfo') {
82 return array ( '_controller' => 'web_profiler.controller.profiler:phpinfoAction', '_route' => '_profiler_phpinfo',);
83 }
UrlPackage.php (https://gitlab.com/pr0055/symfonypizza) PHP · 135 lines
Config.php (https://github.com/jeffmay/Bonfire.git) PHP · 321 lines
1 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
2 /**
3 * CodeIgniter
4 *
5 * An open source application development framework for PHP 5.1.6 or newer
6 *
7 * @package CodeIgniter
36 * Constructor
37 *
38 * Sets the $config data from the primary config.php file as a class variable
39 *
40 * @access public
212 }
214 return rtrim($this->config[$item], '/').'/';
215 }
db_config.test.php (https://github.com/andrerezende/SIE-2.0.git) PHP · 155 lines
1 <?php
2 /**
3 * DBConfigTask Test Case
5 * PHP versions 4 and 5
6 *
7 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
8 * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
9 *
12 *
13 * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
14 * @link http://cakephp.org CakePHP(tm) Project
15 * @package cake
16 * @subpackage cake.tests.cases.console.libs.tasks
17 * @since CakePHP(tm) v 1.3
18 * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
MessageBody.php (https://github.com/kiranatama/sagalaya.git) PHP · 183 lines
install.php (https://github.com/arimogi/Chimera.git) PHP · 112 lines
1 <?php (defined('BASEPATH')) OR exit('No direct script access allowed');
3 if ( ! class_exists('Controller'))
47 //if correct, install, else, redirect to index
48 if($correct){
49 //config.php
50 $str = file_get_contents('./application/modules/install/assets/config.php');
51 file_put_contents('./application/config/config.php', $str);
53 //database.php
57 $port = $this->session->userdata('port');
58 $database = $this->session->userdata('database');
59 $str = file_get_contents('./application/modules/install/assets/database.php');
60 $str = str_replace('@SERVER', "$server:$port", $str);
61 $str = str_replace('@DATABASE', $database, $str);
InstallCommand.php (https://gitlab.com/3dplex/3d-plex-main-site) PHP · 190 lines
1 <?php
2 <<<<<<< HEAD
3 =======
75 // fix trailing slash
76 $this->destination = rtrim($this->destination, DS) . DS;
77 $this->user_path = $this->destination . USER_PATH;
129 $this->output->writeln('<green>SUCCESS</green> cloned <magenta>' . $data['url'] . '</magenta> -> <cyan>' . $path . '</cyan>');
130 =======
131 $this->destination = rtrim($this->destination, DS);
132 $path = $this->destination . DS . $data['path'];
133 if (!file_exists($path)) {
lmbMysqliRecordSet.class.php (https://github.com/kugu/limb.git) PHP · 168 lines
1 <?php
2 /*
3 * Limb PHP Framework
7 * @license LGPL http://www.gnu.org/copyleft/lesser.html
8 */
9 lmb_require('limb/dbal/src/drivers/lmbDbBaseRecordSet.class.php');
10 lmb_require('limb/dbal/src/drivers/mysqli/lmbMysqliRecord.class.php');
14 *
15 * @package dbal
16 * @version $Id: lmbMysqliRecordSet.class.php 6891 2008-04-01 21:44:38Z pachanga $
17 */
18 class lmbMysqliRecordSet extends lmbDbBaseRecordSet
68 $query .= $this->connection->quoteIdentifier($field) . " $order,";
70 $query = rtrim($query, ',');
71 }
smarty_internal_compile_insert.php (https://gitlab.com/staging06/myproject) PHP · 140 lines
1 <?php
3 /**
59 $_script = null;
61 $_output = '<?php ';
62 // save possible attributes
63 eval('$_name = ' . $_attr['name'] . ';');
84 if (!empty($_dir)) {
85 foreach ((array) $_dir as $_script_dir) {
86 $_script_dir = rtrim($_script_dir, '/\\') . DS;
87 if (file_exists($_script_dir . $_script)) {
88 $_filepath = $_script_dir . $_script;
104 $_filepath = 'null';
105 $_function = "insert_{$_name}";
106 // function in PHP script ?
107 if (!is_callable($_function)) {
108 // try plugin
sfPropelDatabase.class.php (https://github.com/bheneka/gitta.git) PHP · 189 lines
1 <?php
3 /*
98 $params = $this->parseDsn($dsn);
100 $options = array('dsn', 'phptype', 'hostspec', 'database', 'username', 'password', 'port', 'protocol', 'encoding', 'persistent', 'socket', 'compat_assoc_lower', 'compat_rtrim_string');
101 foreach ($options as $option)
102 {
129 $event = new sfEvent($propelConfiguration, 'propel.filter_connection_config', array('name' => $this->getParameter('datasource'), 'database' => $this));
130 $event = sfProjectConfiguration::getActive()->getEventDispatcher()->filter($event, array(
131 'adapter' => $this->getParameter('phptype'),
132 'connection' => array(
133 'dsn' => $this->getParameter('dsn'),
185 protected function parseDsn($dsn)
186 {
187 return array('phptype' => substr($dsn, 0, strpos($dsn, ':')));
188 }
189 }
Zip.php (https://gitlab.com/virtualrealms/d7civicrm) PHP · 155 lines
Slider.php (https://github.com/ftaiolivista/Zend-Framework-Namespaced-.git) PHP · 257 lines
1 <?php
2 /**
3 * Zend Framework
18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id: Slider.php 20096 2010-01-06 02:05:09Z bkarwin $
21 */
29 /** Zend_Dojo_View_Helper_Dijit */
30 require_once 'Zend/Dojo/View/Helper/Dijit.php';
32 /**
78 foreach ($this->_requiredParams as $param) {
79 if (!array_key_exists($param, $params)) {
80 require_once 'Zend/Dojo/View/Exception.php';
81 throw new View\Exception('prepareSlider() requires minimally the "minimum", "maximum", and "discreteValues" parameters');
82 }
Mbox.php (https://github.com/kiranatama/sagalaya.git) PHP · 213 lines
OutputFormatter.php (https://gitlab.com/ealexis.t/trends) PHP · 240 lines
UploadField.php (https://github.com/SmallRuralDog/cloud-doc-server.git) PHP · 298 lines
1 <?php
3 namespace Encore\Admin\Form\Field;
108 * Set disk for storage.
109 *
110 * @param string $disk Disks defined in `config/filesystems.php`.
111 *
112 * @return $this
117 $error = new MessageBag([
118 'title' => 'Config error.',
119 'message' => "Disk [$disk] not configured, please add a disk config in `config/filesystems.php`.",
120 ]);
270 }
272 return rtrim(config('admin.upload.host'), '/').'/'.trim($path, '/');
273 }
RConv.cpp (https://github.com/rti7743/rtilabs.git) C++ · 200 lines
103 //E폜.
104 string RConv::rtrim(const string inStr)
105 {
106 int size = inStr.size();
122 }
124 //�^�O���G�X�P�[�v ���{�I�� PHP �� htmlspecialchars �Ɠ���.
125 //http://search.net-newbie.com/php/function.htmlspecialchars.html
133 //\n��<br>�� ���{�I�� PHP �� nl2br �Ɠ���.
134 string RConv::nl2br(const string inStr)
135 {
181 ASSERT( RConv::Replace("ABCDEFGH" , "DEF" , "XYZ2") == "ABCXYZ2GH");
183 ASSERT( RConv::rtrim("ABCDEFGH") == "ABCDEFGH");
184 ASSERT( RConv::rtrim("ABCDEFGH ") == "ABCDEFGH");
Standards.php (git://github.com/jonswar/perl-code-tidyall.git) PHP · 326 lines
1 <?php
2 /**
3 * Functions for helping process standards.
5 * @author Greg Sherwood <gsherwood@squiz.net>
6 * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600)
7 * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
8 */
10 namespace PHP_CodeSniffer\Util;
12 use PHP_CodeSniffer\Config;
65 * if installed.
66 * @param string $standardsDir A specific directory to look for standards
67 * in. If not specified, PHP_CodeSniffer will
68 * look in its default locations.
69 *
addresshandler.php (https://gitlab.com/wuhang2003/core) PHP · 184 lines
1 <?php
2 /**
3 * @author Björn Schießle <schiessle@owncloud.com>
123 $normalizedServer2 = strtolower($this->removeProtocolFromUrl($server2));
125 if (rtrim($normalizedServer1, '/') === rtrim($normalizedServer2, '/')) {
126 // FIXME this should be a method in the user management instead
127 \OCP\Util::emitHook(
164 * - http://localhost
165 * - http://localhost/
166 * - http://localhost/index.php
167 * - http://localhost/index.php/s/{shareToken}
174 protected function fixRemoteURL($remote) {
175 $remote = str_replace('\\', '/', $remote);
176 if ($fileNamePosition = strpos($remote, '/index.php')) {
177 $remote = substr($remote, 0, $fileNamePosition);
178 }
start.php (https://github.com/wangaiying/elgg4ysu.git) PHP · 140 lines
100 phpinfo();
101 $phpinfo = array('phpinfo' => array());
103 if (preg_match_all('#(?:<h2>(?:<a name=".*?">)?(.*?)(?:</a>)?</h2>)|(?:<tr(?: class=".*?")?><t[hd](?: class=".*?")?>(.*?)\s*</t[hd]>(?:<t[hd](?: class=".*?")?>(.*?)\s*</t[hd]>(?:<t[hd](?: class=".*?")?>(.*?)\s*</t[hd]>)?)?</tr>)#s', ob_get_clean(), $matches, PREG_SET_ORDER)) {
109 $phpinfo[end(array_keys($phpinfo))][$match[2]] = isset($match[4]) ? array($match[3], $match[4]) : $match[3];
110 } else {
111 $phpinfo[end(array_keys($phpinfo))][] = $match[2];
112 }
113 }
114 }
116 $returnvalue .= elgg_echo('diagnostics:report:php', array(print_r($phpinfo, true)));
118 return $returnvalue;
139 elgg_register_plugin_hook_handler("diagnostics:report", "system", "diagnostics_globals_hook"); // Global variables
140 elgg_register_plugin_hook_handler("diagnostics:report", "system", "diagnostics_phpinfo_hook"); // PHP info
coldfusion.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 645 lines
350 <FUNCTION>Right</FUNCTION>
351 <FUNCTION>RJustify</FUNCTION>
352 <FUNCTION>RTrim</FUNCTION>
353 <FUNCTION>SpanExcluding</FUNCTION>
354 <FUNCTION>SpanIncluding</FUNCTION>
589 <KEYWORD2>Right</KEYWORD2>
590 <KEYWORD2>RJustify</KEYWORD2>
591 <KEYWORD2>RTrim</KEYWORD2>
592 <KEYWORD2>SpanExcluding</KEYWORD2>
593 <KEYWORD2>SpanIncluding</KEYWORD2>