100+ results for 'php is_object'

Not the results you expected?

Collection.php (https://gitlab.com/daniruizcamacho/pfcascensores) PHP · 705 lines

1 <?php namespace Illuminate\Support;

2

3 use Closure;

562 return function($item) use ($value)

563 {

564 return is_object($item) ? $item->{$value} : array_get($item, $value);

565 };

566 }

Protection.php (https://gitlab.com/ilyales/vigma) PHP · 581 lines

22 * @package PHPExcel_Worksheet

23 * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)

24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL

25 * @version ##VERSION##, ##DATE##

33 * @package PHPExcel_Worksheet

34 * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)

35 */

36 class PHPExcel_Worksheet_Protection

289 *

290 * @param boolean $pValue

291 * @return PHPExcel_Worksheet_Protection

292 */

293 public function setFormatColumns($pValue = false)

421 *

422 * @param boolean $pValue

423 * @return PHPExcel_Worksheet_Protection

424 */

425 public function setDeleteRows($pValue = false)

ServiceItem.php (https://bitbucket.org/211enterprises/laracing.git) PHP · 559 lines

1 <?php

2

3 /**

19 * QuickBooks object base class

20 */

21 QuickBooks_Loader::load('/QuickBooks/QBXML/Object.php');

22

23 /**

Properties.php (https://github.com/tmccormi/openemr.git) PHP · 629 lines

1 <?php

2

3 namespace PhpOffice\PhpSpreadsheet\Document;

4

5 class Properties

485

486 /**

487 * Implement PHP __clone to create a deep clone, not just a shallow copy.

488 */

489 public function __clone()

491 $vars = get_object_vars($this);

492 foreach ($vars as $key => $value) {

493 if (is_object($value)) {

494 $this->$key = clone $value;

495 } else {

weever.php (https://bitbucket.org/pastor399/newcastleunifc.git) PHP · 274 lines

1 <?php

2 /**

3 * @package EasyBlog

4 * @copyright Copyright (C) 2011 Stack Ideas Private Limited. All rights reserved.

5 * @license GNU/GPL, see LICENSE.php

6 *

7 * EasyBlog is free software. This version may have been modified pursuant

9 * is derivative of works licensed under the GNU General Public License or

10 * other free or open source software licenses.

11 * See COPYRIGHT.php for copyright notices and details.

12 */

13

49 public function toJSON( $exit = false , $callback = '' )

50 {

51 require_once( EBLOG_CLASSES . DIRECTORY_SEPARATOR . 'json.php' );

52 $json = new Services_JSON();

53

menu.php (https://github.com/katalystsol/joomla-platform.git) PHP · 353 lines

1 <?php

2 /**

3 * @package Joomla.Platform

95 $info = JApplicationHelper::getClientInfo($client, true);

96

97 $path = $info->path . '/includes/menu.php';

98 if (file_exists($path))

99 {

242 foreach ($this->_items as $item)

243 {

244 if (!is_object($item))

245 {

246 continue;

Component.php (https://gitlab.com/szlongshu/manaphp) PHP · 192 lines

7 namespace ManaPHP {

8

9 use ManaPHP\Event\Manager;

10

11 /**

12 * ManaPHP\Component

13 *

14 * @property \ManaPHP\Mvc\DispatcherInterface $dispatcher;

26 //* @property \ManaPHP\Security $security

27 * //* @property \ManaPHP\CryptInterface $crypt

28 * // * @property \ManaPHP\EscaperInterface $escaper

29 * @property \ManaPHP\Mvc\Model\ManagerInterface $modelsManager

30 * @property \ManaPHP\Mvc\Model\MetadataInterface $modelsMetadata

31 // * @property \ManaPHP\Assets\Manager $assets

32 * @property \ManaPHP\Di|\ManaPHP\DiInterface $di

33 * @property \ManaPHP\Http\Session\BagInterface $persistent

Hooks.php (https://github.com/covabars/Cova-Bars.git) PHP · 173 lines

1 <?php

2 /*

3 * CKFinder

60 }

61 //object

62 else if (is_object($hook)) {

63 $object = $hooks[$event][$i];

64 $method = "on" . $event;

69 if ($count) {

70 //...object

71 if (is_object($hook[0])) {

72 $object = $hooks[$event][$i][0];

73 if ($count < 2) {

159 {

160 if (is_array($callback)) {

161 if (is_object($callback[0])) {

162 $className = get_class($callback[0]);

163 } else {

Response.php (https://github.com/scy/val.git) PHP · 205 lines

1 <?php

2 /**

3 * Zend Framework

17 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)

18 * @license http://framework.zend.com/license/new-bsd New BSD License

19 * @version $Id: Response.php 23775 2011-03-01 17:25:24Z ralph $

20 */

21

22 /** @see Zend_Amf_Constants */

23 require_once 'Zend/Amf/Constants.php';

24

25 /** @see Zend_Amf_Parse_OutputStream */

26 require_once 'Zend/Amf/Parse/OutputStream.php';

27

28 /** @see Zend_Amf_Parse_Amf0_Serializer */

ClassRegistry.php (https://github.com/masihnewbie/cakephp.git) PHP · 341 lines

1 <?php

2 /**

3 * Class collections.

7 * PHP 5

8 *

9 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)

10 * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)

11 *

14 *

15 * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)

16 * @link http://cakephp.org CakePHP(tm) Project

17 * @package Cake.Utility

18 * @since CakePHP(tm) v 0.9.2

19 * @license MIT License (http://www.opensource.org/licenses/mit-license.php)

20 */

21

StreamResponse.php (https://github.com/leerbag/zf2.git) PHP · 208 lines

1 <?php

2 /**

3 * Zend Framework

30

31 /**

32 * Handles converting the PHP object ready for response back into AMF

33 *

34 * @uses \Zend\Amf\Constants

76

77 /**

78 * Serialize the PHP data types back into Actionscript and

79 * create and AMF stream.

80 *

98 $stream->writeByte($header->mustRead);

99 $stream->writeLong(Amf\Constants::UNKNOWN_CONTENT_LENGTH);

100 if (is_object($header->data)) {

101 // Workaround for PHP5 with E_STRICT enabled complaining about

FieldType.php (https://github.com/Kiruban2011/symfony.git) PHP · 182 lines

1 <?php

2

3 /*

137 // If no data class is set explicitly and an object is passed as data,

138 // use the class of that object as data class

139 if (!$class && isset($options['data']) && is_object($options['data'])) {

140 $defaultOptions['data_class'] = $class = get_class($options['data']);

141 }

dumper.php (https://github.com/quarkness/piwik.git) PHP · 360 lines

1 <?php

2 /**

3 * base include file for SimpleTest

4 * @package SimpleTest

5 * @subpackage UnitTester

6 * @version $Id: dumper.php 1723 2008-04-08 00:34:10Z lastcraft $

7 */

8 /**

66 } elseif (is_resource($value)) {

67 return "Resource";

68 } elseif (is_object($value)) {

69 return "Object";

70 }

181 */

182 function _describeStringDifference($first, $second, $identical) {

183 if (is_object($second) || is_array($second)) {

184 return $this->_describeGenericDifference($first, $second);

185 }

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

1 <?php

2 /**

3 * File containing the eZDateType class.

10

11 /*!

12 \class eZDateType ezdatetype.php

13 \ingroup eZDatatype

14 \brief Stores a date value

348 {

349 $dateNode = $attributeNode->getElementsByTagName( 'date' )->item( 0 );

350 if ( is_object( $dateNode ) )

351 {

352 $timestamp = eZDateUtils::textToDate( $dateNode->textContent );

CaseTrackerObject.php (https://bitbucket.org/ferOnti/processmaker.git) PHP · 164 lines

1 <?php

2 /**

3 * CaseTrackerObject.php

6 */

7

8 require_once 'classes/model/om/BaseCaseTrackerObject.php';

9

10 /**

101 try {

102 $oCaseTobj = CaseTrackerObjectPeer::retrieveByPK( $sCTOUID );

103 if (is_object( $oCaseTobj ) && get_class( $oCaseTobj ) == 'CaseTrackerObject') {

104 $oConnection->begin();

105 $iResult = $oCaseTobj->delete();

140 try {

141 $oObj = CaseTrackerObjectPeer::retrieveByPk( $Uid );

142 if (is_object( $oObj ) && get_class( $oObj ) == 'CaseTrackerObject') {

143 return true;

144 } else {

translated-object.php (https://gitlab.com/hop23typhu/bryepoxy) PHP · 272 lines

1 <?php

2

3 /**

242 // $lang is an object

243 // generally the case if the query is coming from Polylang

244 if ( is_object( $lang ) ) {

245 return $wpdb->prepare( ' AND pll_tr.term_taxonomy_id = %d', $lang->$tt_id );

246 }

dumper.php (https://github.com/greevex/mzz-framework-blank-application.git) PHP · 360 lines

1 <?php

2 /**

3 * base include file for SimpleTest

4 * @package SimpleTest

5 * @subpackage UnitTester

6 * @version $Id: dumper.php 2460 2008-04-08 21:03:22Z mz $

7 */

8 /**

66 } elseif (is_resource($value)) {

67 return "Resource";

68 } elseif (is_object($value)) {

69 return "Object";

70 }

181 */

182 function _describeStringDifference($first, $second, $identical) {

183 if (is_object($second) || is_array($second)) {

184 return $this->_describeGenericDifference($first, $second);

185 }

LoggerDataCollector.php (https://gitlab.com/ealexis.t/trends) PHP · 216 lines

1 <?php

2

3 /*

175 }

176

177 if (is_object($context)) {

178 return sprintf('Object(%s)', get_class($context));

179 }

HashMap.class.php (https://bitbucket.org/stk2k/charcoalphp2.1.git) PHP · 386 lines

1 <?php

2 /**

3 * 連想配列クラス

5 * キー、値ともに型は限定しない

6 *

7 * PHP version 5

8 *

9 * @package class.base

10 * @author CharcoalPHP Development Team

11 * @copyright 2008 stk2k, sazysoft

12 */

118 public function offsetGet($offset)

119 {

120 if ( is_object($offset) ){

121 $offset = $offset->__toString();

122 }

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

1 <?php

2 /**

3 * Part of the Joomla Framework Event Package

222 public function addListener($listener, array $events = array())

223 {

224 if (!is_object($listener))

225 {

226 throw new InvalidArgumentException('The given listener is not an object.');

Function.php (https://bitbucket.org/Ebozavrik/test-application.git) PHP · 183 lines

1 <?php

2 /**

3 * Zend Framework

18 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)

19 * @license http://framework.zend.com/license/new-bsd New BSD License

20 * @version $Id: Function.php 24593 2012-01-05 20:35:02Z matthew $

21 */

22

25 * @see Zend_Cache_Core

26 */

27 require_once 'Zend/Cache/Core.php';

28

29

146

147 // generate a unique id for object callbacks

148 if (is_object($callback)) { // Closures & __invoke

149 $object = $callback;

150 } elseif (isset( $callback[0] )) { // array($object, 'method')

functions.core.php (https://github.com/DatumDroid/DatumDroid-API.git) PHP · 254 lines

1 <?php

2

3 /**

139 */

140 function dd_load_service( $service = '' ) {

141 require_once( DD_DIR_INC . 'service.' . dd_get_service( $service ) . '.php' );

142 }

143

151 */

152 function dd_convert_url_query( $url = '' ) {

153 $query = parse_url( $url, PHP_URL_QUERY );

154 $query = html_entity_decode( $query );

155 $queryParts = explode( '&', $query );

175 */

176 function dd_parse_args( $args, $defaults = '' ) {

177 if ( is_object( $args ) ) {

178 $r = get_object_vars( $args );

179 } elseif ( is_array( $args ) ) {

registry.php (https://github.com/Paladin/joomla-platform.git) PHP · 472 lines

1 <?php

2 /**

3 * @package Joomla.Platform

48

49 // Optionally load supplied data.

50 if (is_array($data) || is_object($data))

51 {

52 $this->bindData($this->data, $data);

89 *

90 * @since 12.2

91 * @note The interface is only present in PHP 5.4 and up.

92 */

93 public function jsonSerialize()

420 {

421 // Ensure the input data is an array.

422 if (is_object($data))

423 {

424 $data = get_object_vars($data);

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

1 <?php

2

3 /**

176 if (is_string($callback) && strpos($callback, '::')) {

177 $callback = explode('::', $callback);

178 } elseif (is_object($callback)) {

179 $callback = [$callback, '__invoke'];

180 }

DelegatingValidator.php (https://github.com/xbojer/gfw.git) PHP · 259 lines

1 <?php

2

3 /*

107 static public function validateFormData(FormInterface $form, ExecutionContext $context)

108 {

109 if (is_object($form->getData()) || is_array($form->getData())) {

110 $propertyPath = $context->getPropertyPath();

111 $graphWalker = $context->getGraphWalker();

CallbackCache.php (https://github.com/zucchi/zf2.git) PHP · 209 lines

1 <?php

2 /**

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

145

146 // generate a unique key of object callbacks

147 if (is_object($callback)) { // Closures & __invoke

148 $object = $callback;

149 } elseif (isset($callback[0])) { // array($object, 'method')

TraceableEventDispatcher.php (https://gitlab.com/Blueprint-Marketing/solr-power) PHP · 320 lines

1 <?php

2

3 /*

293 'pretty' => $listener,

294 );

295 } elseif (is_array($listener) || (is_object($listener) && is_callable($listener))) {

296 if (!is_array($listener)) {

297 $listener = array($listener, '__invoke');

298 }

299 $class = is_object($listener[0]) ? get_class($listener[0]) : $listener[0];

300 try {

301 $r = new \ReflectionMethod($class, $listener[1]);

sfImageRectangleGD.class.php (https://github.com/AMSGWeblinks/sfImageTransformPlugin.git) PHP · 368 lines

1 <?php

2 /*

3 * This file is part of the sfImageTransform package.

277 public function setFill($fill)

278 {

279 if (preg_match('/#[\d\w]{6}/',$fill) || (is_object($fill) && class_name($fill) === 'sfImage'))

280 {

281 $this->fill = $fill;

343 if (!is_null($this->fill))

344 {

345 if (!is_object($this->fill))

346 {

347 imagefilledrectangle($resource, $this->x1, $this->y1, $this->x2, $this->y2, $image->getAdapter()->getColorByHex($resource, $this->fill));

353 }

354

355 if (is_object($this->fill))

356 {

357 $image->fill($this->x1 + $this->thickness, $this->y1 + $this->thickness, $this->fill);

orm.php (https://github.com/Sipcms/SipCMS.git) PHP · 283 lines

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

2 /**

3 * ORM Auth driver.

44 else

45 {

46 if ( ! is_object($role))

47 {

48 // Load the role

68 protected function _login($user, $password, $remember)

69 {

70 if ( ! is_object($user))

71 {

72 $username = $user;

123 public function force_login($user, $mark_session_as_forced = FALSE)

124 {

125 if ( ! is_object($user))

126 {

127 $username = $user;

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

1 <?php

2 /**

3 * File containing the eZKeywordType class.

10

11 /*!

12 \class eZKeywordType ezkeywordtype.php

13 \ingroup eZDatatype

14 \brief A content datatype which handles keyword indexes

46 // copy keywords links as well

47 $keyword = $originalContentObjectAttribute->content();

48 if ( is_object( $keyword ) )

49 {

50 $keyword->store( $contentObjectAttribute );

108 // create keyword index

109 $keyword = $attribute->content();

110 if ( is_object( $keyword ) )

111 {

112 $keyword->store( $attribute );

category.php (https://github.com/mhoofman/wordpress-heroku.git) PHP · 339 lines

1 <?php

2 /**

3 * WordPress Category API

311 * The parameter should only be passed a variable and not create the array or

312 * object inline to the parameter. The reason for this is that parameter is

313 * passed by reference and PHP will fail unless it has the variable.

314 *

315 * There is no return value, because everything is updated on the variable you

316 * pass to it. This is one of the features with using pass by reference in PHP.

317 *

318 * @since 2.3.0

322 */

323 function _make_cat_compat( &$category ) {

324 if ( is_object( $category ) ) {

325 $category->cat_ID = &$category->term_id;

326 $category->category_count = &$category->count;

freecharger.php (https://github.com/yama/zencart13x-ja.git) PHP · 133 lines

1 <?php

2 //

3 // +----------------------------------------------------------------------+

6 // | Copyright (c) 2003 The zen-cart developers |

7 // | |

8 // | http://www.zen-cart.com/index.php |

9 // | |

10 // | Portions Copyright (c) 2003 osCommerce |

18 // | license@zen-cart.com so we can mail you a copy immediately. |

19 // +----------------------------------------------------------------------+

20 // $Id: freecharger.php 1105 2005-04-04 22:05:35Z birdbrain $

21 //

22

42 }

43

44 if (is_object($order)) $this->update_status();

45

46 $this->email_footer = MODULE_PAYMENT_FREECHARGER_TEXT_EMAIL_FOOTER;

Form.php (https://github.com/tquensen/MiniMVC.git) PHP · 363 lines

1 <?php

2

3 class MiniMVC_Form

74 public function updateModel()

75 {

76 if (!is_object($this->model)) {

77 return false;

78 }

101 public function setElement($element)

102 {

103 if (!is_object($element)) {

104 return false;

105 }

129 public function setPostValidator($validator)

130 {

131 if (!is_object($validator)) {

132 return false;

133 }

MaterializedPathRepository.php (https://bitbucket.org/iiic/iszp.git) PHP · 210 lines

1 <?php

2

3 namespace Gedmo\Tree\Document\MongoDB\Repository;

18 * @subpackage MaterializedPathRepository

19 * @link http://www.gediminasm.org

20 * @license MIT License (http://www.opensource.org/licenses/mit-license.php)

21 */

22 class MaterializedPathRepository extends AbstractTreeRepository

89 $meta = $this->getClassMetadata();

90

91 if (is_object($node)) {

92 if (!($node instanceof $meta->name)) {

93 throw new InvalidArgumentException("Node is not related to this repository");

120 $regex = false;

121

122 if (is_object($node) && $node instanceof $meta->name) {

123 $node = new MongoDocumentWrapper($node, $this->dm);

124 $nodePath = preg_quote($node->getPropertyValue($config['path']));

test_pack.c (https://gitlab.com/Ornim/obs-old) C · 307 lines

142 /* empty object */

143 value = json_pack("{}", 1.0);

144 if(!json_is_object(value) || json_object_size(value) != 0)

145 fail("json_pack empty object failed");

146 if(value->refcount != (size_t)1)

175 /* simple object */

176 value = json_pack("{s:[]}", "foo");

177 if(!json_is_object(value) || json_object_size(value) != 1)

178 fail("json_pack array failed");

179 if(!json_is_array(json_object_get(value, "foo")))

185 /* object with complex key */

186 value = json_pack("{s+#+: []}", "foo", "barbar", 3, "baz");

187 if(!json_is_object(value) || json_object_size(value) != 1)

188 fail("json_pack array failed");

189 if(!json_is_array(json_object_get(value, "foobarbaz")))

Registry.php (https://github.com/ftaiolivista/Zend-Framework-Namespaced-.git) PHP · 431 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: Registry.php 20096 2010-01-06 02:05:09Z bkarwin $

21 */

22

36 * @see Zend_Tool_Framework_Registry_Interface

37 */

38 require_once 'Zend/Tool/Framework/Registry/Interface.php';

39

40 /**

155 {

156 if ($this->_config === null) {

157 require_once 'Zend/Tool/Framework/Client/Config.php';

158 $this->setConfig(new Client\Config());

159 }

GraphWalker.php (https://github.com/sebio/symfony.git) PHP · 169 lines

1 <?php

2

3 /*

141 $this->walkReference($element, $group, $propertyPath.'['.$key.']');

142 }

143 } else if (!is_object($value)) {

144 throw new UnexpectedTypeException($value, 'object or array');

145 } else {

BaseInputFilter.php (https://github.com/zucchi/zf2.git) PHP · 440 lines

1 <?php

2 /**

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

57 'Zend\InputFilter\InputInterface',

58 'Zend\InputFilter\InputFilterInterface',

59 (is_object($input) ? get_class($input) : gettype($input))

60 ));

61 }

130 '%s expects an array or Traversable argument; received %s',

131 __METHOD__,

132 (is_object($data) ? get_class($data) : gettype($data))

133 ));

134 }

135 if (is_object($data) && !$data instanceof ArrayAccess) {

136 $data = ArrayUtils::iteratorToArray($data);

137 }

dumper.php (https://github.com/idler/limb.git) PHP · 360 lines

1 <?php

2 /**

3 * base include file for SimpleTest

4 * @package SimpleTest

5 * @subpackage UnitTester

6 * @version $Id: dumper.php 7198 2008-11-01 11:57:17Z korchasa $

7 */

8 /**

66 } elseif (is_resource($value)) {

67 return "Resource";

68 } elseif (is_object($value)) {

69 return "Object";

70 }

181 */

182 function _describeStringDifference($first, $second, $identical) {

183 if (is_object($second) || is_array($second)) {

184 return $this->_describeGenericDifference($first, $second);

185 }

options.php (https://github.com/teamplus/teamplus.git) PHP · 366 lines

1 <?php

2 /**

3 * base include file for SimpleTest

4 * @package SimpleTest

5 * @version $Id: options.php 6354 2009-04-15 02:41:21Z mvdam $

6 */

7

206 /**

207 * Static methods for compatibility between different

208 * PHP versions.

209 * @package SimpleTest

210 */

241 return false;

242 }

243 if (is_object($first) && is_object($second)) {

244 if (get_class($first) != get_class($second)) {

245 return false;

CDFDataHelper.php (https://bitbucket.org/cleardemon/cdf.git) PHP · 228 lines

1 <?php

2

3 require_once 'CDFFormat.php';

4 require_once 'CDFExceptions.php';

5

6 /**

27 if(is_bool($value))

28 return $value === true ? "True" : "False";

29 if(is_object($value))

30 {

31 if(method_exists($value, '__toString'))

216 /**

217 * Returns true if the specified value is 'empty', i.e. an empty string, zero, false or null.

218 * @remarks This wraps the PHP empty function where before PHP 5.5, empty() only accepts a variable and not an expression.

219 * @param mixed $value

220 * @return bool

View.php (https://github.com/Shadez/Framework.git) PHP · 245 lines

1 <?php

2

3 /**

158 public function getRegion($region)

159 {

160 if (is_object($region) && isset($this->m_regions[$region->getName()]))

161 return $this->m_regions[$region->getName()];

162 elseif (is_string($region) && isset($this->m_regions[$region]))

163 return $this->m_regions[$region];

164 else

165 throw new \Exceptions\ViewCrash('region ' . (is_object($region) ? $region->getName() : $region) . ' was not found');

166

167 return null;

Dictionary.php (https://bitbucket.org/DragonBe/zfform.git) PHP · 236 lines

26

27 /** Zend_Pdf_Element */

28 require_once 'Zend/Pdf/Element.php';

29

30 /**

58 return;

59 } else if (!is_array($val)) {

60 require_once 'Zend/Pdf/Exception.php';

61 throw new Zend_Pdf_Exception('Argument must be an array');

62 }

151

152 foreach ($this->_items as $name => $element) {

153 if (!is_object($element)) {

154 require_once 'Zend/Pdf/Exception.php';

229

230 foreach ($this->_items as $itemName => $item) {

231 $phpArray[$itemName] = $item->toPhp();

232 }

233

class-wp-upgrader-skin.php (https://github.com/livinglab/openlab.git) PHP · 276 lines

1 <?php

2 /**

3 * Upgrader API: WP_Upgrader_Skin class

12 *

13 * @since 2.8.0

14 * @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader-skins.php.

15 */

16 class WP_Upgrader_Skin {

87 */

88 public function set_upgrader( &$upgrader ) {

89 if ( is_object( $upgrader ) ) {

90 $this->upgrader =& $upgrader;

91 }

function.html_radios.php (https://github.com/cabenitez/factuweb.git) PHP · 219 lines

1 <?php

2 /**

3 * Smarty plugin

10 * Smarty {html_radios} function plugin

11 *

12 * File: function.html_radios.php<br>

13 * Type: function<br>

14 * Name: html_radios<br>

33 * </pre>

34 *

35 * @link http://smarty.php.net/manual/en/language.function.html.radios.php {html_radios}

36 * (Smarty online manual)

37 * @author Christopher Kvarme <christopher.kvarme@flashjab.com>

45 function smarty_function_html_radios($params, $template)

46 {

47 require_once(SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php');

48

49 $name = 'radio';

toolset.settings.class.php (https://gitlab.com/Fraternal-Group/fraternal) PHP · 468 lines

1 <?php

2

3 /**

213

214 /**

215 * PHP dynamic setter.

216 *

217 * @param mixed $key

223

224 /**

225 * PHP dynamic setter.

226 *

227 * @param string $key

234

235 /**

236 * PHP dynamic fields unset() method support

237 * @param string $key

238 */

%%9C^9C8^9C8CAA4B%%sidebar.tpl.php (https://github.com/GunioRobot/Jobberbase.git) PHP · 124 lines

1 <?php /* Smarty version 2.6.26, created on 2009-12-01 09:02:15

2 compiled from sidebar.tpl */ ?>

3 <?php if ($this->_tpl_vars['CURRENT_PAGE'] != ''): ?>

4 <a href="<?php echo $this->_tpl_vars['BASE_URL']; ?>

5 " title="<?php echo $this->_tpl_vars['translations']['header']['title']; ?>

38 <?php if (@ENABLE_NEW_JOBS || ( ! @ENABLE_NEW_JOBS && $this->_tpl_vars['navigation']['secondary'][$this->_sections['tmp']['index']]['url'] != 'post' )): ?>

39 <li><a href="<?php if ($this->_tpl_vars['navigation']['secondary'][$this->_sections['tmp']['index']]['outside'] != 1): ?><?php echo $this->_tpl_vars['BASE_URL']; ?>

40 <?php endif; ?><?php echo $this->_tpl_vars['navigation']['secondary'][$this->_sections['tmp']['index']]['url']; ?>

91 <?php if (@SIDEBAR_SHOW_WHAT == 'categories'): ?>

92 <?php $_from = $this->_tpl_vars['jobs_count_all_categs']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):

93 foreach ($_from as $this->_tpl_vars['job']):

94 ?>

103 <?php else: ?>

104 <?php $_from = $this->_tpl_vars['jobs_count_per_city']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):

105 foreach ($_from as $this->_tpl_vars['job']):

106 ?>

cli.php (https://bitbucket.org/pastor399/newcastleunifc.git) PHP · 294 lines

1 <?php

2 /**

3 * @package Joomla.Platform

175 $this->config->loadArray($data);

176 }

177 elseif (is_object($data))

178 {

179 $this->config->loadObject($data);

233

234 /**

235 * Method to load a PHP configuration class file based on convention and return the instantiated data object. You

236 * will extend this method in child classes to provide configuration data from whatever data source is relevant

237 * for your specific application.

238 *

239 * @param string $file The path and filename of the configuration file. If not provided, configuration.php

240 * in JPATH_BASE will be used.

241 * @param string $class The class name to instantiate.

%%F3^F32^F3218F1A%%siteMap.tpl.php (https://github.com/mcrider/pkpUpgradeTestSuite.git) PHP · 122 lines

1 <?php /* Smarty version 2.6.12, created on 2006-07-17 16:34:26

2 compiled from about/siteMap.tpl */ ?>

3 <?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');

4 smarty_core_load_plugins(array('plugins' => array(array('function', 'url', 'about/siteMap.tpl', 19, false),array('function', 'translate', 'about/siteMap.tpl', 19, false),array('modifier', 'count', 'about/siteMap.tpl', 21, false),array('modifier', 'escape', 'about/siteMap.tpl', 23, false),array('modifier', 'assign', 'about/siteMap.tpl', 43, false),)), $this); ?>

5

18 <?php if (count($this->_tpl_vars['journals']) > 1 && ! $this->_tpl_vars['currentJournal']): ?>

19 <?php $_from = $this->_tpl_vars['journals']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):

20 foreach ($_from as $this->_tpl_vars['journal']):

21 ?>

50 <?php $this->assign('currentJournalId', $this->_tpl_vars['currentJournal']->getJournalId()); ?>

51 <?php $_from = $this->_tpl_vars['rolesByJournal'][$this->_tpl_vars['currentJournalId']]; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):

52 foreach ($_from as $this->_tpl_vars['role']):

53 ?>

92 </li>

93 </li>

94 <?php $_from = $this->_tpl_vars['currentJournal']->getSetting('navItems'); if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):

95 foreach ($_from as $this->_tpl_vars['navItem']):

96 ?>

eztemplatetextoperator.php (https://github.com/lserwatka/ezpublish.git) PHP · 307 lines

1 <?php

2 //

3 // Definition of eZTemplateTextOperator class

33

34 /*!

35 \class eZTemplateTextOperator eztemplatetextoperator.php

36 \brief The class eZTemplateTextOperator does

37

262 {

263 $operand = $tpl->elementValue( $operatorParameters[$i], $rootNamespace, $currentNamespace, $placement );

264 if ( !is_object( $operand ) )

265 $operands[] = $operand;

266 }

register.php (https://github.com/schoeller/ezteamroom.git) PHP · 156 lines

1 <?php

2 //

3 // Created on: <2008-09-15 16:13:42 ab>

36 $roomIdentifierMap = eZTeamroom::getRoomIdentifierList();

37 $teamroomObject = eZContentObject::fetch( (int) $teamroomID);

38 if ( !is_object( $teamroomObject ) || !in_array( $teamroomObject->attribute( 'class_identifier' ), $roomIdentifierMap ) )

39 {

40 return $Module->handleError( eZError::KERNEL_NOT_AVAILABLE, 'kernel' );

41 }

42 $teamroomNode = $teamroomObject->attribute('main_node');

43 if ( !is_object( $teamroomNode ) || !in_array( $teamroomNode->attribute( 'class_identifier' ), $roomIdentifierMap ) )

44 {

45 return $Module->handleError( eZError::KERNEL_NOT_AVAILABLE, 'kernel' );

Protection.php (https://github.com/libersoft/fengoffice-ls.git) PHP · 529 lines

1 <?php

2 /**

3 * PHPExcel

19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

20 *

21 * @category PHPExcel

22 * @package PHPExcel_Worksheet

23 * @copyright Copyright (c) 2006 - 2008 PHPExcel (http://www.codeplex.com/PHPExcel)

24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL

25 * @version 1.6.3, 2008-08-25

33 * @package PHPExcel_Worksheet

34 * @copyright Copyright (c) 2006 - 2008 PHPExcel (http://www.codeplex.com/PHPExcel)

35 */

36 class PHPExcel_Worksheet_Protection

Class.php (https://github.com/silverstripe-scienceninjas/sapphire.git) PHP · 265 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: Class.php 24032 2011-05-10 21:08:20Z mabe $

21 */

22

24 * @see Zend_Cache_Core

25 */

26 require_once 'Zend/Cache/Core.php';

27

28

168 public function setCachedEntity($cachedEntity)

169 {

170 if (!is_string($cachedEntity) && !is_object($cachedEntity)) {

171 Zend_Cache::throwException('cached_entity must be an object or a class name');

172 }

HookApi.php (https://gitlab.com/iamgraeme/royalmile) PHP · 337 lines

1 <?php

2 namespace WebSharks\HtmlCompressor;

3

106 return $function;

107 }

108 if (is_object($function)) {

109 $function = array($function, '');

110 } else {

112 }

113 if (isset($function[0], $function[1])) {

114 if (is_object($function[0])) {

115 return spl_object_hash($function[0]).$function[1];

116 } elseif (is_string($function[0])) {

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

1 <?php

2

3 /*

114 $errorData = array(

115 'message' => $error->getMessage(),

116 'origin' => is_object($error->getOrigin())

117 ? spl_object_hash($error->getOrigin())

118 : null,

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

1 <?php

2 /**

3 * Zend Framework

17 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)

18 * @license http://framework.zend.com/license/new-bsd New BSD License

19 * @version $Id: Response.php 23775 2011-03-01 17:25:24Z ralph $

20 */

21

22 /** @see Zend_Amf_Constants */

23 // // // // // // // // require_once 'Zend/Amf/Constants.php';

24

25 /** @see Zend_Amf_Parse_OutputStream */

26 // // // // // // // // require_once 'Zend/Amf/Parse/OutputStream.php';

27

28 /** @see Zend_Amf_Parse_Amf0_Serializer */

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

1 <?php

2

3 if (!isset($XMLFile_Included) || !$XMLFile_Included) {

16 function XMLTag(&$parent)

17 {

18 if (is_object( $parent ))

19 {

20 $this->parent = &$parent;

77 function remove_subtag($index)

78 {

79 if (is_object($this->tags[$index])) {

80 unset($this->tags[$index]->parent);

81 unset($this->tags[$index]);

196 function cleanup()

197 {

198 if (is_object( $this->roottag )) {

199 $this->roottag->clear_subtags();

200 }

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

1 <?php

2 /**

3 * File containing the ezcCacheMemcacheBackend class.

80 *

81 * @throws ezcBaseExtensionNotFoundException

82 * If the PHP memcache and zlib extensions are not installed.

83 * @throws ezcCacheMemcacheException

84 * If the connection to the Memcache host did not succeed.

90 if ( !ezcBaseFeatures::hasExtensionSupport( 'memcache' ) )

91 {

92 throw new ezcBaseExtensionNotFoundException( 'memcache', null, "PHP does not have Memcache support." );

93 }

94

95 if ( !ezcBaseFeatures::hasExtensionSupport( 'zlib' ) )

96 {

97 throw new ezcBaseExtensionNotFoundException( 'zlib', null, "PHP not configured with --with-zlib." );

98 }

99

eztemplateoptimizer.php (https://github.com/GunioRobot/ezpublish.git) PHP · 200 lines

1 <?php

2 /**

3 * File containing the eZTemplateOptimizer class.

10

11 /*!

12 \class eZTemplateOptimizer eztemplateoptimizer.php

13 \brief Analyses a compiled template tree and tries to optimize certain parts of it.

14

20 Optimizes a resource acquisition node and the variable data before it

21 */

22 static function optimizeResourceAcquisition( $useComments, &$php, $tpl, &$var, &$node, &$resourceData )

23 {

24 $data = $var[2];

69 Analyses function nodes and tries to optimize them

70 */

71 static function optimizeFunction( $useComments, &$php, $tpl, &$node, &$resourceData )

72 {

73 $ret = 0;

Submenu.php (https://bitbucket.org/dkrzos/phc.git) PHP · 319 lines

1 <?php

2

3

169 $submenu_item = $submenu;

170

171 if( !is_object($submenu) ) {

172

173 $submenu_item = $this->get_menu_item ($submenu, $menu_items);

GetSetMethodNormalizer.php (https://gitlab.com/matijabelec/bigpandadev) PHP · 179 lines

1 <?php

2

3 /*

129 public function supportsNormalization($data, $format = null)

130 {

131 return is_object($data) && !$data instanceof \Traversable && $this->supports(get_class($data));

132 }

133

Dispatcher.php (https://gitlab.com/kimting254/wbms) PHP · 486 lines

1 <?php namespace Illuminate\Events;

2

3 use Exception;

200 // object and use the class as the event name and this event itself as the

201 // payload to the handler, which makes object based events quite simple.

202 if (is_object($event))

203 {

204 list($payload, $event) = [[$event], get_class($event)];

417 protected function cloneArgumentsForQueueing(array $arguments)

418 {

419 return array_map(function($a) { return is_object($a) ? clone $a : $a; }, $arguments);

420 }

421

Assert.php (https://gitlab.com/komputer007123/cpulogger) PHP · 400 lines

15 * @author Sebastian Bergmann <sb@sebastian-bergmann.de>

16 * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de>

17 * @license http://www.php.net/license/3_0.txt PHP License 3.0

18 * @version CVS: $Id: Assert.php 2 2009-03-16 20:22:51Z ggiunta $

19 * @link http://pear.php.net/package/PHPUnit

20 * @since File available since Release 1.0.0

21 */

30 * @license http://www.php.net/license/3_0.txt PHP License 3.0

31 * @version Release: @package_version@

32 * @link http://pear.php.net/package/PHPUnit

33 * @since Class available since Release 1.0.0

34 */

97 function assertEquals($expected, $actual, $message = '', $delta = 0) {

98 if ((is_array($actual) && is_array($expected)) ||

99 (is_object($actual) && is_object($expected))) {

100 if (is_array($actual) && is_array($expected)) {

101 ksort($actual);

form.php (https://github.com/shlomsky/ivo.git) PHP · 252 lines

1 <?php

2 /**

3 * @package ZOO Component

4 * @file form.php

5 * @version 2.3.0 December 2010

6 * @author YOOtheme http://www.yootheme.com

56 $field->bind($value);

57 }

58 } else if(is_object($data)) {

59 foreach ($this as $name => $field) {

60 $value = isset($data->$name) ? $data->$name : null;

YamlDumper.php (https://gitlab.com/Marwamimo/Crowdrise_Web) PHP · 336 lines

1 <?php

2

3 /*

247 } elseif ($value instanceof Expression) {

248 return $this->getExpressionCall((string) $value);

249 } elseif (is_object($value) || is_resource($value)) {

250 throw new RuntimeException('Unable to dump a service container if a parameter is an object or a resource.');

251 }

Snapshot.php (https://gitlab.com/ppapadatis/products-management-platform) PHP · 419 lines

1 <?php

2 /*

3 * This file is part of the GlobalState package.

4 *

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

6 *

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

403 private function canBeSerialized($variable)

404 {

405 if (!is_object($variable)) {

406 return !is_resource($variable);

407 }

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

1 <?php

2 /**

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

76 public function getHeaders()

77 {

78 if (!is_object($this->_headers)) {

79 $headerCollection = new HeaderCollection();

80 if (is_array($this->_headers)) {

124 public function hasHeaders()

125 {

126 if (is_object($this->_headers)) {

127 return $this->_headers->getCount() > 0;

128 }

148 public function getCookies()

149 {

150 if (!is_object($this->_cookies)) {

151 $cookieCollection = new CookieCollection();

152 if (is_array($this->_cookies)) {

DateTypeTest.php (https://github.com/LubosRemplik/cakephp.git) PHP · 244 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 3.0.0

13 * @license https://opensource.org/licenses/mit-license.php MIT License

48

49 /**

50 * Test toPHP

51 *

52 * @return void

54 public function testToPHP()

55 {

56 $this->assertNull($this->type->toPHP(null, $this->driver));

57 $this->assertNull($this->type->toPHP('0000-00-00', $this->driver));

%%0C^0C4^0C47B79C%%layout.tpl.php (https://github.com/mcrider/pkpUpgradeTestSuite.git) PHP · 146 lines

1 <?php /* Smarty version 2.6.10, created on 2005-09-21 12:20:12

2 compiled from author/submission/layout.tpl */ ?>

3 <?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');

4 smarty_core_load_plugins(array('plugins' => array(array('function', 'translate', 'author/submission/layout.tpl', 15, false),array('function', 'icon', 'author/submission/layout.tpl', 94, false),array('modifier', 'escape', 'author/submission/layout.tpl', 19, false),array('modifier', 'date_format', 'author/submission/layout.tpl', 33, false),array('modifier', 'default', 'author/submission/layout.tpl', 39, false),)), $this); ?>

5

65 <td>&nbsp;</td>

66 </tr>

67 <?php $_from = $this->_tpl_vars['submission']->getGalleys(); if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['galleys'] = array('total' => count($_from), 'iteration' => 0);

68 if ($this->_foreach['galleys']['total'] > 0):

69 foreach ($_from as $this->_tpl_vars['galley']):

101 </td>

102 </tr>

103 <?php $_from = $this->_tpl_vars['submission']->getSuppFiles(); if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['suppFiles'] = array('total' => count($_from), 'iteration' => 0);

104 if ($this->_foreach['suppFiles']['total'] > 0):

105 foreach ($_from as $this->_tpl_vars['suppFile']):

content_actionhandler.php (https://github.com/SylvainGuittard/ezlightbox.git) PHP · 364 lines

1 <?php

2 //

3 // Created on: <2007-11-21 13:01:28 ab>

57 $itemType = $http->postVariable( 'ItemType' );

58 $itemObject = eZLightboxObjectItem::fetchByName( $itemType );

59 if ( !is_object( $itemObject ) )

60 {

61 $itemObject = eZLightboxObjectItem::fetchByID( $itemType );

62 }

63 if ( is_object( $itemObject ) )

64 {

65 $typeID = $itemObject->getID();

290 }

291 $lightboxObject = eZLightbox::fetch( $lightboxID );

292 if ( is_object( $lightboxObject ) )

293 {

294 $moveResult = $lightboxObject->moveItem( $direction, $itemID );

Twitter.php (https://bitbucket.org/mshmsh5000/wp-demo.git) PHP · 165 lines

1 <?php

2 /*!

3 * HybridAuth

39 }

40

41 if ( ! is_object( $response ) || ! isset( $response->id ) ){

42 throw new Exception( "User profile request failed! {$this->providerId} api returned an invalid response.", 6 );

43 }

YPFObject.php (https://github.com/yonpols/ypframework.git) PHP · 257 lines

1 <?php

2 class YPFObject implements YPFSerializable {

3 private static $__mixin_included = null;

207 foreach ($this as $k=>$v)

208 {

209 if (is_object($v) && ($v instanceof YPFSerializable))

210 {

211 if (!($v instanceof YPFNoJsonable))

233 $parent = $root->addChild($key);

234 foreach($val as $item)

235 if (is_object($item) && ($item instanceof YPFObject))

236 $item->__toXML($parent);

237 else

239 } elseif (is_scalar($val) or ($val == null))

240 $root->addChild($key, $val);

241 elseif (is_object($val) && ($val instanceof YPFObject))

242 $val->__toXML($root->addChild($key));

243 }

smarty_internal_data.php (https://github.com/ACCORD5/TrellisDesk.git) PHP · 413 lines

1 <?php

2

3 /**

289 public function createTemplate($template, $cache_id = null, $compile_id = null, $parent = null)

290 {

291 if (is_object($cache_id) || is_array($cache_id)) {

292 $parent = $cache_id;

293 $cache_id = null;

299 $data = null;

300 }

301 if (!is_object($template)) {

302 // we got a template resource

303 // already in template cache?

356 public function __construct ($_parent = null)

357 {

358 if (is_object($_parent)) {

359 // when object set up back pointer

360 $this->parent = $_parent;

FilterChain.php (https://github.com/pborreli/zf2.git) PHP · 227 lines

1 <?php

2 /**

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

55 throw new Exception\InvalidArgumentException(sprintf(

56 'Expected array or Traversable; received "%s"',

57 (is_object($options) ? get_class($options) : gettype($options))

58 ));

59 }

140 * Attach a filter to the chain

141 *

142 * @param callback|FilterInterface $callback A Filter implementation or valid PHP callback

143 * @param int $priority Priority at which to enqueue filter; defaults to 1000 (higher executes earlier)

144 * @return FilterChain

149 if (!$callback instanceof FilterInterface) {

150 throw new Exception\InvalidArgumentException(sprintf(

151 'Expected a valid PHP callback; received "%s"',

152 (is_object($callback) ? get_class($callback) : gettype($callback))

ActionController.php (https://github.com/intellix/zf2.git) PHP · 316 lines

1 <?php

2

3 namespace Zend\Mvc\Controller;

8 Zend\EventManager\EventDescription as Event,

9 Zend\EventManager\EventManager,

10 Zend\Http\PhpEnvironment\Response as HttpResponse,

11 Zend\Loader\Broker,

12 Zend\Loader\Pluggable,

109 $actionResponse = $this->$method();

110

111 if (!is_object($actionResponse)) {

112 if (IsAssocArray::test($actionResponse)) {

113 $actionResponse = new ArrayObject($actionResponse, ArrayObject::ARRAY_AS_PROPS);

Variables.php (https://github.com/leerbag/zf2.git) PHP · 337 lines

1 <?php

2 /**

3 * Zend Framework

217 public function assign($spec)

218 {

219 if (is_object($spec)) {

220 if (method_exists($spec, 'toArray')) {

221 $spec = $spec->toArray();

ConnectionManagerTest.php (https://gitlab.com/digaotinfo/agendaLegislativa) PHP · 346 lines

1 <?php

2 /**

3 * Connection Manager tests

4 *

5 * PHP 5

6 *

7 * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)

11 *

12 * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)

13 * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests

14 * @package Cake.Test.Case.Model

15 * @since CakePHP(tm) v 1.2.0.5550

16 * @license MIT License (http://www.opensource.org/licenses/mit-license.php)

17 */

18 App::uses('ConnectionManager', 'Model');

block.class.php (https://github.com/easysoft/zentaopms.git) PHP · 688 lines

1 <?php

2 class blockTest

3 {

335 foreach($params as $param => $paramValue)

336 {

337 if(is_object($paramValue))

338 {

339 foreach($paramValue as $key => $value) $return .= "$key=>$value,";

sfLogger.class.php (https://github.com/wboray/symfony.git) PHP · 271 lines

1 <?php

2

3 /*

25 * @subpackage log

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

27 * @version SVN: $Id: sfLogger.class.php 16344 2009-03-16 16:51:28Z fabien $

28 */

29 abstract class sfLogger

219

220 $subject = $event->getSubject();

221 $subject = is_object($subject) ? get_class($subject) : (is_string($subject) ? $subject : 'main');

222 foreach ($event->getParameters() as $key => $message)

223 {

smarty_resource.php (https://gitlab.com/flyhope/Hiblog) PHP · 284 lines

1 <?php

2 /**

3 * Smarty Resource Plugin

54 */

55 protected static $sysplugins = array(

56 'file' => 'smarty_internal_resource_file.php',

57 'string' => 'smarty_internal_resource_string.php',

58 'extends' => 'smarty_internal_resource_extends.php',

59 'stream' => 'smarty_internal_resource_stream.php',

60 'eval' => 'smarty_internal_resource_eval.php',

61 'php' => 'smarty_internal_resource_php.php'

62 );

63

199 if (in_array($type, $_known_stream)) {

200 // is known stream

201 if (is_object($smarty->security_policy)) {

202 $smarty->security_policy->isTrustedStream($type);

203 }

BaseDrawing.php (https://gitlab.com/techniconline/kmc) PHP · 515 lines

22 * @package PHPExcel_Worksheet

23 * @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)

24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL

25 * @version ##VERSION##, ##DATE##

34 * @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)

35 */

36 class PHPExcel_Worksheet_BaseDrawing implements PHPExcel_IComparable

37 {

38 /**

221 * @throws PHPExcel_Exception

222 * @return PHPExcel_Worksheet_BaseDrawing

223 */

224 public function setWorksheet(PHPExcel_Worksheet $pValue = null, $pOverrideOld = false)

245 $this->setWorksheet($pValue);

246 } else {

247 throw new PHPExcel_Exception("A PHPExcel_Worksheet has already been assigned. Drawings can only exist on one PHPExcel_Worksheet.");

248 }

249 }

Looper.php (https://gitlab.com/tekoestudio/capacitacion-tipsy) PHP · 280 lines

1 <?php

2

3 namespace Tipsy;

11 public function jsonSerialize() {

12 foreach ($this->_items as $key => $item) {

13 if (is_object($item) && method_exists($item, 'exports')) {

14 $items[$key] = $item->exports();

15 } else {

26

27 foreach ($args as $arg) {

28 if (is_object($arg) && (get_class($arg) == 'Tipsy\Looper' || is_subclass_of($arg, 'Tipsy\Looper'))) {

29 $arg = $arg->items();

30 } elseif (is_object($arg)) {

90 public function each($func, $params = []) {

91 foreach ($this->_items as $key => $item) {

92 $func = $func->bindTo(!is_object($item) ? (object)$item : $item);

93 $res = $func($key, $item);

94 $this->_items[$key] = $item;

Origins.php (https://github.com/livinglab/openlab.git) PHP · 275 lines

1 <?php

2 // Don't load directly

3 defined( 'WPINC' ) or die;

240 */

241 public function is_origin_available( $origin ) {

242 if ( is_object( $origin ) ) {

243 $origin = $origin->id;

244 }

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

1 <?php

2 /**

3 * File containing the ezcTemplateTreeOutput abstract class

217 // properties using $prefix for each line.

218 $textBlock = false;

219 if ( is_object( $property ) )

220 {

221 if ( $property instanceof $this->nodeClass )

Queue.php (https://gitlab.com/madwanz64/laravel) PHP · 280 lines

1 <?php

2

3 namespace Illuminate\Queue;

107 protected function createPayloadArray($job, $queue, $data = '')

108 {

109 return is_object($job)

110 ? $this->createObjectPayload($job, $queue)

111 : $this->createStringPayload($job, $queue, $data);

FilterChain.php (https://github.com/Rovak/zf2.git) PHP · 227 lines

1 <?php

2 /**

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

55 throw new Exception\InvalidArgumentException(sprintf(

56 'Expected array or Traversable; received "%s"',

57 (is_object($options) ? get_class($options) : gettype($options))

58 ));

59 }

140 * Attach a filter to the chain

141 *

142 * @param callable|FilterInterface $callback A Filter implementation or valid PHP callback

143 * @param int $priority Priority at which to enqueue filter; defaults to 1000 (higher executes earlier)

144 * @return FilterChain

149 if (!$callback instanceof FilterInterface) {

150 throw new Exception\InvalidArgumentException(sprintf(

151 'Expected a valid PHP callback; received "%s"',

152 (is_object($callback) ? get_class($callback) : gettype($callback))

wpmdb-replace.php (https://gitlab.com/haque.mdmanzurul/wp-harpar-carolyn) PHP · 213 lines

1 <?php

2

3 final class WPMDB_Replace {

92 try {

93 if ( is_string( $data ) && ( $unserialized = @unserialize( $data ) ) !== false ) {

94 // PHP currently has a bug that doesn't allow you to clone the DateInterval / DatePeriod classes.

95 // We skip them here as they probably won't need data to be replaced anyway

96 if ( is_object( $unserialized ) ) {

108 $data = $_tmp;

109 unset( $_tmp );

110 } elseif ( is_object( $data ) ) { // Submitted by Tina Matter

111 $_tmp = clone $data;

112 foreach ( $data as $key => $value ) {

class-yikes-inc-easy-mailchimp-api.php (https://github.com/yikesinc/yikes-inc-easy-mailchimp-extender.git) PHP · 383 lines

1 <?php

2

3 /**

290

291 // If we have body data, maybe convert it to JSON.

292 if ( isset( $params['body'] ) && ( is_array( $params['body'] ) || is_object( $params['body'] ) ) ) {

293 $params['body'] = json_encode( wp_parse_args( $authorized_args['body'], $params['body'] ) );

294 $headers['Content-Type'] = 'application/json';

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

1 <?php

2 /**

3 * @package Joomla.Platform

53

54 // Build the template and base path for the layout

55 $tPath = JPATH_THEMES . '/' . $template . '/html/plg_' . $type . '_' . $name . '/' . $layout . '.php';

56 $bPath = JPATH_BASE . '/plugins/' . $type . '/' . $name . '/tmpl/' . $defaultLayout . '.php';

57 $dPath = JPATH_BASE . '/plugins/' . $type . '/' . $name . '/tmpl/default.php';

58

59 // If the template has a layout override use it

204 $plugin->name = preg_replace('/[^A-Z0-9_\.-]/i', '', $plugin->name);

205

206 $path = JPATH_PLUGINS . '/' . $plugin->type . '/' . $plugin->name . '/' . $plugin->name . '.php';

207

208 if (!isset($paths[$path]))

PropertyPath.php (https://gitlab.com/matijabelec/bigpandadev) PHP · 235 lines

1 <?php

2

3 /*

92 '"Symfony\Component\PropertyAccess\PropertyPath". '.

93 'Got: "%s"',

94 is_object($propertyPath) ? get_class($propertyPath) : gettype($propertyPath)

95 ));

96 }

AclBehaviorTest.php (https://gitlab.com/digaotinfo/agendaLegislativa) PHP · 490 lines

1 <?php

2 /**

3 * AclBehaviorTest file

7 * PHP 5

8 *

9 * CakePHP : Rapid Development Framework (http://cakephp.org)

10 * Copyright 2005-2012, Cake Software Foundation, Inc.

11 *

14 *

15 * @copyright Copyright 2005-2012, Cake Software Foundation, Inc.

16 * @link http://cakephp.org CakePHP Project

17 * @package Cake.Test.Case.Model.Behavior

18 * @since CakePHP v 1.2.0.4487

19 * @license MIT License (http://www.opensource.org/licenses/mit-license.php)

20 */

21

login.php (https://github.com/gregorysmart/MODx.git) PHP · 178 lines

1 <?php

2 /**

3 * Properly log in the user and set up the session.

6 * @subpackage processors.security

7 */

8 if (!isset($modx->lexicon) || !is_object($modx->lexicon)) {

9 $modx->getService('lexicon','modLexicon');

10 }

36 /* If the event fired, loop through the event array and fail if there's an error message */

37 if (is_array($rt)) {

38 foreach ($rt as $key => $value) { /* php4 compatible */

39 if ($value !== true) {

40 return $modx->error->failure($value);

59 if (!empty($ru)) {

60 foreach ($ru as $obj) {

61 if (is_object($obj) && $obj instanceof modUser) {

62 $user = $obj;

63 break;

aa_item.php (https://github.com/harz87/Amazon-Affialiate.git) PHP · 227 lines

1 <?php

2 /*

3 * To change this template, choose Tools | Templates

182

183 function item2Array($item) {

184 if (is_object($item)) {

185 foreach ($item as $key => $value) {

186 if( substr($key, 0, 5) == 'item_' && $key != 'item_id'){

common.php (https://bitbucket.org/lishnih/phpndt.yii2.git) PHP · 171 lines

1 <?php // Stan 2004-08-09

2

3 /**

4 * @package PHP_Common

5 * @version 0.26

6 * @date 2011-02-16

12

13 // Скрипт объявляет глобальные переменные:

14 // $phpcommon_errors

15 // $phpcommon_old_error_handler

16

17 // Функции:

18 // phpCommonExitHandler phpCommonErrorHandler

19 // print_rb print_ra print_rt print_sh

20 // sprint_ra sprint_rt

Type.php (https://github.com/cheungyang/Utopia2.git) PHP · 197 lines

45 */

46

47 require_once DIR_LIB_ROOT. 'vendor/PHPUnit/PHPUnit/Util/Filter.php';

48

49 PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');

53 *

54 * @category Testing

55 * @package PHPUnit

56 * @author Sebastian Bergmann <sb@sebastian-bergmann.de>

57 * @copyright 2002-2009 Sebastian Bergmann <sb@sebastian-bergmann.de>

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

59 * @version Release: 3.3.16

60 * @link http://www.phpunit.de/

function.html_checkboxes.php (https://github.com/exponentcms/exponent-cms.git) PHP · 286 lines

1 <?php

2 /**

3 * Smarty plugin

8 /**

9 * Smarty {html_checkboxes} function plugin

10 * File: function.html_checkboxes.php

11 * Type: function

12 * Name: html_checkboxes

30 * - escape (optional) - escape the content (not value), defaults to true

31 *

32 * @link https://www.smarty.net/manual/en/language.function.html.checkboxes.php {html_checkboxes}

33 * (Smarty online manual)

34 * @author Christopher Kvarme <christopher.kvarme@flashjab.com>

49 array(

50 'function' => 'smarty_function_escape_special_chars',

51 'file' => SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php'

52 )

53 )

nodeGen.cpp (git://github.com/ticking/self.git) C++ · 469 lines ✨ Summary

This C++ code is part of a compiler implementation, specifically responsible for generating branch instructions (if-else statements) in machine code. It creates nodes and merges them to represent conditional branches, allowing the compiler to decide which path to take based on the program’s logic. The generated code is optimized for performance and minimizes unnecessary operations.

86 COMMENT("Begin slot assignment");

87 int32 offset = smiOop(path->desc->data)->byte_count() - Mem_Tag;

88 if (path->holder->is_object_or_map()) {

89 PReg* t = new TempPReg(currentScope());

90 t = loadPath(path->holder, rcvr, t);

102 return receiver;

103 } else {

104 assert(target->is_object(), "must be an object path search");

105 objectLookupTarget* otarget = (objectLookupTarget*) target;

106 if (otarget->prevTargetSlot) {

114

115 void NodeGen::pathLookup(realSlotRef* path, PReg* receiver, PReg* dest) {

116 if (path->holder->is_object_or_map()) {

117 PReg* base = loadPath(path->holder, receiver, dest);

118 fint offset = smiOop(path->desc->data)->byte_count() - Mem_Tag;

view.php (git://github.com/ezsystems/ezpublish.git) PHP · 58 lines ✨ Summary

This PHP code generates a view for an eZ Systems content management system state page. It retrieves a group and state object by their identifiers, sets the current language if provided, and renders a template with the group and state information. The rendered template includes links to navigate back to the group or state pages.

1 <?php

2 /**

3 * @copyright Copyright (C) eZ Systems AS. All rights reserved.

14 $group = eZContentObjectStateGroup::fetchByIdentifier( $GroupIdentifier );

15

16 if ( !is_object( $group ) )

17 {

18 return $Module->handleError( eZError::KERNEL_NOT_FOUND, 'kernel' );

21 $state = $group->stateByIdentifier( $StateIdentifier );

22

23 if ( !is_object( $state ) )

24 {

25 return $Module->handleError( eZError::KERNEL_NOT_FOUND, 'kernel' );

sanitize.php (https://bitbucket.org/AzuiSleet/cdr-web/) PHP · 349 lines ✨ Summary

This PHP code provides a set of utility functions for sanitizing and formatting data, including HTML escaping, string manipulation, and database connection management. It also includes functions for cleaning and formatting column data in a model, likely used in a database-driven application. The code appears to be part of a larger framework or library, providing a foundation for building robust and secure applications.

7 * PHP versions 4 and 5

8 *

9 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)

10 * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)

11 *

14 *

15 * @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)

16 * @link http://cakephp.org CakePHP(tm) Project

17 * @package cake

18 * @subpackage cake.cake.libs

89 * - remove (boolean) if true strips all HTML tags before encoding

90 * - charset (string) the charset used to encode the string

91 * - quotes (int) see http://php.net/manual/en/function.htmlentities.php

92 *

93 * @param string $string String from where to strip tags

tests.php4 (https://swig.svn.sourceforge.net/svnroot/swig) PHP · 228 lines ✨ Summary

This PHP code is a comprehensive class for validating and checking various aspects of PHP code, including classes, functions, variables, resources, and more. It provides methods to check for existence, type, equality, nullness, and resource status, as well as warning and failure messages. The class can be used to ensure the integrity and consistency of PHP code before execution.

1 <?php

2

3 // do we have true global vars or just GETSET functions?

73

74 function classmethods($classname,$methods) {

75 if (is_object($classname)) $classname=get_class($classname);

76 $classmethods=array_flip(get_class_methods($classname));

77 $missing=array();

104

105 function is_a($a,$b) {

106 if (is_object($a)) $a=strtolower(get_class($a));

107 if (is_object($b)) $a=strtolower(get_class($b));

117

118 function classparent($a,$b) {

119 if (is_object($a)) $a=get_class($a);

120 if (is_object($b)) $a=get_class($b);