100+ results for 'php get_class'

Not the results you expected?

Factory.php (https://github.com/kiranatama/sagalaya.git) PHP · 297 lines

1 <?php

2 /**

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

102 '%s expects an array or Traversable; received "%s"',

103 __METHOD__,

104 (is_object($inputSpecification) ? get_class($inputSpecification) : gettype($inputSpecification))

105 ));

106 }

162 '%s expects the value associated with "filters" to be an array/Traversable of filters or filter specifications; received "%s"',

163 __METHOD__,

164 (is_object($value) ? get_class($value) : gettype($value))

165 ));

166 }

172 '%s expects the value associated with "validators" to be an array/Traversable of validators or validator specifications; received "%s"',

173 __METHOD__,

174 (is_object($value) ? get_class($value) : gettype($value))

175 ));

176 }

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

1 <?php namespace Illuminate\Events;

2

3 use Exception;

202 if (is_object($event))

203 {

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

205 }

206

sfValidatorBase.class.php (https://github.com/makerlabs/Symfohub.git) PHP · 498 lines

1 <?php

2

3 /*

17 * @subpackage validator

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

19 * @version SVN: $Id: sfValidatorBase.class.php 23922 2009-11-14 14:58:38Z fabien $

20 */

21 abstract class sfValidatorBase

65 if ($diff = array_diff($optionKeys, array_merge($currentOptionKeys, $this->requiredOptions)))

66 {

67 throw new InvalidArgumentException(sprintf('%s does not support the following options: \'%s\'.', get_class($this), implode('\', \'', $diff)));

68 }

69

71 if ($diff = array_diff(array_keys($messages), array_keys($this->messages)))

72 {

73 throw new InvalidArgumentException(sprintf('%s does not support the following error codes: \'%s\'.', get_class($this), implode('\', \'', $diff)));

74 }

75

reflection_php5.php (https://github.com/nigeldaley/moodle.git) PHP · 380 lines

1 <?php

2 /**

3 * base include file for SimpleTest

26 /**

27 * Checks that a class has been declared. Versions

28 * before PHP5.0.2 need a check that it's not really

29 * an interface.

30 * @return boolean True if defined.

40

41 /**

42 * Needed to kill the autoload feature in PHP5

43 * for classes created dynamically.

44 * @return boolean True if defined.

60

61 /**

62 * Needed to kill the autoload feature in PHP5

63 * for classes created dynamically.

64 * @return boolean True if defined.

class-wp-customize-setting.php (https://gitlab.com/Blueprint-Marketing/WordPress-1) PHP · 439 lines

1 <?php

2 /**

3 * Customize Setting Class.

35 */

36 function __construct( $manager, $id, $args = array() ) {

37 $keys = array_keys( get_class_vars( __CLASS__ ) );

38 foreach ( $keys as $key ) {

39 if ( isset( $args[ $key ] ) )

EmbeddedTest.php (https://bitbucket.org/paulscott56/c4-framework.git) PHP · 426 lines

1 <?php

2

3 namespace Doctrine\ODM\MongoDB\Tests\Functional;

154

155 // retrieve test

156 $test = $this->dm->createQueryBuilder(get_class($test))

157 ->field('id')->equals($test->id)

158 ->getQuery()

189

190 // retrieve test

191 $test = $this->dm->createQueryBuilder(get_class($test))

192 ->field('id')->equals($test->id)

193 ->getQuery()

206

207 // retrieve test

208 $test = $this->dm->createQueryBuilder(get_class($test))

209 ->field('id')->equals($test->id)

210 ->getQuery()

program.php (https://bitbucket.org/crevillo/enetcall.git) PHP · 298 lines

1 <?php

2 /**

3 * File containing the ezcTemplateProgramSourceToTstParser class

104 {

105 if ( $element === $elements[$i] )

106 throw new ezcTemplateInternalException( "Received element list with duplicate objects from parser " . get_class( $this->lastParser ) );

107 }

108 ++$offset;

158 if ( $block === $block->parentBlock )

159 {

160 throw new ezcTemplateInternalException( "Infinite recursion found in parser element " . get_class( $block ) );

161 }

162

173 if ( $block === $block->parentBlock )

174 {

175 throw new ezcTemplateInternalException( "Infinite recursion found in parser element " . get_class( $block ) );

176 }

177

function.html_options.php (https://gitlab.com/adamlwalker/generatedata) PHP · 174 lines

1 <?php

2 /**

3 * Smarty plugin

25 * </pre>

26 *

27 * @link http://www.smarty.net/manual/en/language.function.html.options.php {html_image}

28 * (Smarty online manual)

29 * @author Monte Ohrt <monte at ohrt dot com>

36 function smarty_function_html_options($params, $template)

37 {

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

39

40 $name = null;

73 $_sel = smarty_function_escape_special_chars((string) $_sel->__toString());

74 } else {

75 trigger_error("html_options: selected attribute contains an object of class '". get_class($_sel) ."' without __toString() method", E_USER_NOTICE);

76 continue;

77 }

DataFacade.php (https://github.com/danielvaleradp/--ngara.git) PHP · 228 lines

1 <?php

2 class DataFacade {

3 protected static function dolar($i) { return '$' . $i; }

41 global $pqs;

42

43 $ec = get_class($entity);

44 $en = $ec::table();

45 $ef = $ec::fields();

104 global $pqs;

105

106 $ec = get_class($entity);

107 $en = $ec::table();

108 $ef = $ec::fields();

147 global $pqs;

148

149 $ec = get_class($entity);

150 $en = $ec::table();

151 $ef = $ec::fields();

HasRoleAndPermission.php (https://gitlab.com/puleeno/fiona-fashion) PHP · 397 lines

1 <?php

2

3 namespace Bican\Roles\Traits;

286 {

287 foreach ($this->getPermissions() as $permission) {

288 if ($permission->model != '' && get_class($entity) == $permission->model

289 && ($permission->id == $providedPermission || $permission->slug === $providedPermission)

290 ) {

AbstractWriter.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 353 lines

1 <?php

2 /**

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

133 'Filter must implement %s\Filter\FilterInterface; received "%s"',

134 __NAMESPACE__,

135 is_object($filter) ? get_class($filter) : gettype($filter)

136 ));

137 }

170 'Writer plugin manager must extend %s\FilterPluginManager; received %s',

171 __NAMESPACE__,

172 is_object($plugins) ? get_class($plugins) : gettype($plugins)

173 ));

174 }

220 'Writer plugin manager must extend %s\FormatterPluginManager; received %s',

221 __NAMESPACE__,

222 is_object($plugins) ? get_class($plugins) : gettype($plugins)

223 )

224 );

Class.php (https://github.com/ggunlugu/ornekler.git) PHP · 283 lines

1 <?php

2 /**

3 *

8 * @package Solar

9 *

10 * @author Paul M. Jones <pmjones@solarphp.com>

11 *

12 * @license http://opensource.org/licenses/bsd-license.php BSD

13 *

14 * @version $Id: Class.php 4370 2010-02-11 15:41:19Z pmjones $

15 *

16 */

92 * Converts a namespace-and-classname to a file path.

93 *

94 * Implements PSR-0 as defined by the PHP Project Interoperability Group.

95 *

96 * <http://groups.google.com/group/php-standards/web/final-proposal>

ValidatorTypeGuesser.php (https://github.com/israelnoguera/parejas.git) PHP · 364 lines

1 <?php

2

3 /*

85 public function guessTypeForConstraint(Constraint $constraint)

86 {

87 switch (get_class($constraint)) {

88 case 'Symfony\Component\Validator\Constraints\Type':

89 switch ($constraint->type) {

246 public function guessRequiredForConstraint(Constraint $constraint)

247 {

248 switch (get_class($constraint)) {

249 case 'Symfony\Component\Validator\Constraints\NotNull':

250 return new ValueGuess(

274 public function guessMaxLengthForConstraint(Constraint $constraint)

275 {

276 switch (get_class($constraint)) {

277 case 'Symfony\Component\Validator\Constraints\MaxLength':

278 return new ValueGuess(

Policy.php (https://github.com/rodrigowebe/FUEL-CMS.git) PHP · 304 lines

18 {

19 /**#@+

20 * php handling constants, defaults to PHP_REMOVE

21 *

22 * PHP_REMOVE : remove all <?php ?> (+ short tags if your short tags option is on) from the input template

83 * @var int

84 */

85 protected $phpHandling = self::PHP_REMOVE;

86

87 /**

223 * @param int $level one of the Dwoo_Security_Policy::PHP_* constants

224 */

225 public function setPhpHandling($level = self::PHP_REMOVE)

226 {

227 $this->phpHandling = $level;

BaseNotStorageEntityModel.php (https://github.com/sergiygladkyy/OEF.git) PHP · 401 lines

1 <?php

2

3 require_once('lib/model/base/BaseModel.php');

245 if (!is_a($val, 'BaseEntityModel'))

246 {

247 throw new Exception(__METHOD__.': not supported model class "'.get_class($val).'"');

248 }

249

ActionControllerTest.php (https://github.com/leerbag/zf2.git) PHP · 173 lines

1 <?php

2

3 namespace ZendTest\Mvc\Controller;

4

5 use PHPUnit_Framework_TestCase as TestCase,

6 Zend\EventManager\StaticEventManager,

7 Zend\Http\Request,

114 $response->setContent('short circuited!');

115 $events = StaticEventManager::getInstance();

116 $events->attach(get_class($this->controller), 'dispatch', function($e) use ($response) {

117 return $response;

118 }, 10);

exception.php (https://github.com/Yacodo/atoum.git) PHP · 310 lines

49 'file' => __FILE__,

50 'line' => $line,

51 'asserter' => get_class($asserter) . '::setWith()',

52 'fail' => sprintf($this->getLocale()->_('%s is not an exception'), $asserter->getTypeOf($value))

53 )

127 ->boolean($asserter->wasSet())->isFalse()

128 ->exception(function() use ($asserter) {

129 $asserter->hasCode(rand(- PHP_INT_MAX, PHP_INT_MAX));

130 }

131 )

134 ;

135

136 $asserter->setWith(new atoum\exceptions\runtime(uniqid(), $code = rand(2, PHP_INT_MAX)));

137

138 $score->reset();

subpaneldefs.php (https://bitbucket.org/cviolette/sugarcrm.git) PHP · 341 lines

1 <?php

2 if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');

3 /*********************************************************************************

44 'subpanel_title' => 'LBL_DEFAULT_SUBPANEL_TITLE',

45 'top_buttons' => array(

46 array('widget_class' => 'SubPanelTopCreateNoteButton'),

47 array('widget_class' => 'SubPanelTopArchiveEmailButton'),

48 array('widget_class' => 'SubPanelTopSummaryButton'),

49 ),

50

55 array(

56 'name' => 'nothing',

57 'widget_class' => 'SubPanelIcon',

58 'module' => 'Meetings',

59 'width' => '2%',

Navigation.php (https://github.com/eschabell/openshift-zendframework.git) PHP · 338 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: Navigation.php 23953 2011-05-03 05:47:39Z ralph $

21 */

22

24 * @see Zend_View_Helper_Navigation_HelperAbstract

25 */

26 require_once 'Zend/View/Helper/Navigation/HelperAbstract.php';

27

28 /**

175 if (!$helper instanceof Zend_View_Helper_Navigation_Helper) {

176 if ($strict) {

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

178 $e = new Zend_View_Exception(sprintf(

179 'Proxy helper "%s" is not an instance of ' .

function.html_radios.php (https://gitlab.com/fangfangchen/xianpipa) PHP · 200 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';

Debug.php (https://gitlab.com/LisovyiEvhenii/ismextensions) PHP · 204 lines

1 <?php

2 /**

3 * Magento

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

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

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

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

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

22 * @package Varien_Debug

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

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

25 */

26

105 // prepare method's name

106 if (isset($data['class']) && isset($data['function'])) {

107 if (isset($data['object']) && get_class($data['object']) != $data['class']) {

108 $className = get_class($data['object']) . '[' . $data['class'] . ']';

Guard.php (https://bitbucket.org/helfreire/tccsite.git) PHP · 557 lines

1 <?php namespace Illuminate\Auth;

2

3 use Illuminate\Cookie\CookieJar;

542 public function getName()

543 {

544 return 'login_'.md5(get_class($this));

545 }

546

552 public function getRecallerName()

553 {

554 return 'remember_'.md5(get_class($this));

555 }

556

Navigation.php (https://bitbucket.org/DragonBe/zfform.git) PHP · 346 lines

1 <?php

2 /**

3 * Zend Framework

24 * @see Zend_View_Helper_Navigation_HelperAbstract

25 */

26 require_once 'Zend/View/Helper/Navigation/HelperAbstract.php';

27

28 /**

183 if (!$helper instanceof Zend_View_Helper_Navigation_Helper) {

184 if ($strict) {

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

186 $e = new Zend_View_Exception(sprintf(

187 'Proxy helper "%s" is not an instance of ' .

188 'Zend_View_Helper_Navigation_Helper',

189 get_class($helper)));

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

191 throw $e;

ErrorHandler.php (https://gitlab.com/rsilveira1987/Expresso) PHP · 257 lines

1 <?php

2 /**

3 * Zend Framework

21

22 /** Zend_Controller_Plugin_Abstract */

23 require_once 'Zend/Controller/Plugin/Abstract.php';

24

25 /**

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

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

35 * @version $Id: ErrorHandler.php 10020 2009-08-18 14:34:09Z j.fischer@metaways.de $

36 */

37 class Zend_Controller_Plugin_ErrorHandler extends Zend_Controller_Plugin_Abstract

223 $exceptions = $response->getException();

224 $exception = $exceptions[0];

225 $exceptionType = get_class($exception);

226 $error->exception = $exception;

227 switch ($exceptionType) {

AbstractCriteria.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 304 lines

1 <?php

2 /**

3 * Copyright © 2016 Magento. All rights reserved.

40 (string)new \Magento\Framework\Phrase(

41 'Missed Mapper Interface for Criteria Interface: %1',

42 [get_class($this)]

43 )

44 );

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

22

23 /** requires here */

24 require_once 'Zend/CodeGenerator/Php/File.php';

25 require_once 'Zend/Reflection/File.php';

43 $file = new Zend_CodeGenerator_Php_File();

44 $this->assertEquals(get_class($file), 'Zend_CodeGenerator_Php_File');

45 }

46

301 */

302 public function testNewMethodKeepDocBlock(){

303 $codeGenFile = Zend_CodeGenerator_Php_File::fromReflectedFileName(dirname(__FILE__).'/_files/zf-11703.php', true, true);

304 $target = <<<EOS

305 <?php

340 */

341 public function testNewMethodKeepTwoDocBlock(){

342 $codeGenFile = Zend_CodeGenerator_Php_File::fromReflectedFileName(dirname(__FILE__).'/_files/zf-11703_1.php', true, true);

343 $target = <<<EOS

344 <?php

array.php (https://bitbucket.org/matyhaty/senses-thwaites.git) PHP · 290 lines

1 <?php

2

3 /**

4 * Array Extension for DataMapper classes.

5 *

6 * Quickly convert DataMapper models to-and-from PHP arrays.

7 *

8 * @license MIT License

154 {

155 // Store $has_one relationships

156 $c = get_class($object->{$f});

157 $rel = new $c();

158 $id = isset($data[$f]) ? $data[$f] : 0;

172 {

173 // Store $has_many relationships

174 $c = get_class($object->{$f});

175 $rels = new $c();

176 $ids = isset($data[$f]) ? $data[$f] : FALSE;

Binary.php (https://gitlab.com/billyprice1/app-download.org) PHP · 423 lines

1 <?php

2

3 namespace DrSlump\Protobuf\Codec;

79 if ($field->isRequired() && $empty) {

80 throw new \UnexpectedValueException(

81 'Message ' . get_class($message) . '\'s field tag ' . $tag . '(' . $field->getName() . ') is required but has no value'

82 );

83 }

subpaneldefs.php (https://github.com/jacknicole/sugarcrm_dev.git) PHP · 175 lines

1 <?php

2 if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');

3 /*********************************************************************************

68 'title_key' => 'LBL_ACCOUNTS_SUBPANEL_TITLE',

69 'top_buttons' => array(

70 array('widget_class' => 'SubPanelTopCreateButton'),

71 array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect')

82 'title_key' => 'LBL_CONTACTS_SUBPANEL_TITLE',

83 'top_buttons' => array(

84 array('widget_class' => 'SubPanelTopCreateButton'),

85 array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect')

96 'title_key' => 'LBL_OPPORTUNITY_SUBPANEL_TITLE',

97 'top_buttons' => array(

98 array('widget_class' => 'SubPanelTopCreateButton'),

99 array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect')

Serializer.php (https://github.com/ap0ught/symfony.git) PHP · 328 lines

1 <?php

2

3 /*

229 private function getNormalizer($data, ?string $format, array $context): ?NormalizerInterface

230 {

231 $type = \is_object($data) ? \get_class($data) : 'native-'.\gettype($data);

232

233 if (!isset($this->normalizerCache[$format][$type])) {

module.php (https://github.com/harriswong/ATutor.git) PHP · 173 lines

94 $this->_pages[AT_SOCIAL_BASENAME.'edit_profile.php']['title_var'] = 'edit_profile';

95 $this->_pages[AT_SOCIAL_BASENAME.'edit_profile.php']['parent'] = AT_SOCIAL_BASENAME.'sprofile.php';

96 $this->_pages[AT_SOCIAL_BASENAME.'sprofile.php']['guide'] = 'general/?p=my_profile.php';

142 $this->_pages[AT_SOCIAL_BASENAME.'groups/list.php']['title_var'] = 'group_members';

143 $this->_pages[AT_SOCIAL_BASENAME.'groups/list.php']['parent'] = AT_SOCIAL_BASENAME.'groups/index.php';

144

145 /* public pages */

154 $this->_pages[AT_SOCIAL_BASENAME.'index_mystart.php']['title_var'] = 'social';

155 $this->_pages[AT_SOCIAL_BASENAME.'index_mystart.php']['guide'] = 'general/?p=my_network.php';

156 $this->_pages[AT_SOCIAL_BASENAME.'index_mystart.php']['parent'] = AT_NAV_START;

163 AT_SOCIAL_BASENAME.'settings.php'),

164 isset($_pages[AT_SOCIAL_BASENAME.'index_mystart.php']['children']) ? $_pages[AT_SOCIAL_BASENAME.'index_mystart.php']['children'] : array());

165

166 $this->_pages[AT_SOCIAL_BASENAME.'index.php']['title_var'] = 'social';

167 $this->_pages[AT_SOCIAL_BASENAME.'index.php']['guide'] = 'general/?p=my_network.php';

168 }

169

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

1 <?php

2 /**

3 * Magento

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

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

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

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

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

22 * @package Varien_Debug

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

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

25 */

26

105 // prepare method's name

106 if (isset($data['class']) && isset($data['function'])) {

107 if (isset($data['object']) && get_class($data['object']) != $data['class']) {

108 $className = get_class($data['object']) . '[' . $data['class'] . ']';

12-toggles.php (https://github.com/Canuckaholic/Pop-Digital.git) PHP · 248 lines

1 <?php

2 /**

3 *

225 $shortcode = array();

226

227 $class_methods = get_class_methods( $class );

228

229 foreach( $class_methods as $method ) {

Imap.php (https://github.com/medieteknik/Medieteknik.nu.git) PHP · 260 lines

1 <?php

2

3 /**

18 * limitations under the License.

19 *

20 * PHP Version 5

21 *

22 * @file CAS/ProxiedService/Imap.php

23 * @category Authentication

24 * @package PhpCAS

25 * @author Adam Franco <afranco@middlebury.edu>

26 * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0

27 * @link https://wiki.jasig.org/display/CASC/phpCAS

28 */

29

LogExecutedActionsExtensionTest.php (https://gitlab.com/cuitianze/eduwind) PHP · 434 lines

1 <?php

2 namespace Payum\Tests\Bridge\Psr\Log;

3

9 use Psr\Log\LoggerInterface;

10

11 class LogExecutedActionsExtensionTest extends \PHPUnit_Framework_TestCase

12 {

13 public static function setUpBeforeClass()

14 {

15 if (false == interface_exists('Psr\Log\LoggerInterface')) {

16 throw new \PHPUnit_Framework_SkippedTestError('To run these tests install psr log lib.');

17 }

18 }

223 ->expects($this->at(0))

224 ->method('debug')

225 ->with('[Payum] 1# '.get_class($action).'::execute(string)')

226 ;

227 $logger

ViewModel.php (https://github.com/Thinkscape/zf2.git) PHP · 492 lines

1 <?php

2 /**

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

187 '%s: expects an array, or Traversable argument; received "%s"',

188 __METHOD__,

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

190 ));

191 }

262 '%s: expects an array, or Traversable argument; received "%s"',

263 __METHOD__,

264 (is_object($variables) ? get_class($variables) : gettype($variables))

265 ));

266 }

IdentityMapTest.php (https://github.com/jaikdean/doctrine2.git) PHP · 255 lines

1 <?php

2

3 declare(strict_types=1);

10 use Doctrine\Tests\Models\CMS\CmsUser;

11 use Doctrine\Tests\OrmFunctionalTestCase;

12 use function get_class;

13

14 /**

44 $this->em->clear();

45

46 $user2 = $this->em->find(get_class($user), $user->getId());

47 self::assertNotSame($user2, $user);

48 $user3 = $this->em->find(get_class($user), $user->getId());

49 self::assertSame($user2, $user3);

50

51 $address2 = $this->em->find(get_class($address), $address->getId());

52 self::assertNotSame($address2, $address);

53 $address3 = $this->em->find(get_class($address), $address->getId());

ValidatorFieldFactoryGuesser.php (https://github.com/l3l0/BehatExamples.git) PHP · 310 lines

1 <?php

2

3 /*

108 public function guessClassForConstraint(Constraint $constraint)

109 {

110 switch (get_class($constraint)) {

111 case 'Symfony\Component\Validator\Constraints\AssertType':

112 switch ($constraint->type) {

268 public function guessRequiredForConstraint(Constraint $constraint)

269 {

270 switch (get_class($constraint)) {

271 case 'Symfony\Component\Validator\Constraints\NotNull':

272 return new FieldFactoryGuess(

295 public function guessMaxLengthForConstraint(Constraint $constraint)

296 {

297 switch (get_class($constraint)) {

298 case 'Symfony\Component\Validator\Constraints\MaxLength':

299 return new FieldFactoryGuess(

Docblock.php (https://github.com/Riges/KawaiViewModel.git) PHP · 294 lines

1 <?php

2 /**

3 * Zend Framework

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

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

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

20 */

21

23 * @see Zend_Reflection_Docblock_Tag

24 */

25 require_once 'Zend/Reflection/Docblock/Tag.php';

26

27 /**

93 public function __toString()

94 {

95 $str = "Docblock [ /* Docblock */ ] {".PHP_EOL.PHP_EOL;

96 $str .= " - Tags [".count($this->_tags)."] {".PHP_EOL;

Element.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 510 lines

1 <?php

2 /**

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

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

252 __METHOD__,

253 (is_object($arrayOrTraversable) ? get_class($arrayOrTraversable) : gettype($arrayOrTraversable))

254 ));

255 }

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

381 __METHOD__,

382 (is_object($arrayOrTraversable) ? get_class($arrayOrTraversable) : gettype($arrayOrTraversable))

383 ));

384 }

489 '%s expects an array or Traversable object of validation error messages; received "%s"',

490 __METHOD__,

491 (is_object($messages) ? get_class($messages) : gettype($messages))

492 ));

493 }

category_widget.php (https://github.com/Matmon/WP-e-Commerce.git) PHP · 180 lines

140

141 <p>

142 <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('grid'); ?>" name="<?php echo $this->get_field_name('grid'); ?>"<?php checked( $grid ); ?> />

143 <label for="<?php echo $this->get_field_id('grid'); ?>"><?php _e('Use Category Grid View', 'wpsc'); ?></label><br />

149 <p>

150

151 <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('show_name'); ?>" name="<?php echo $this->get_field_name('show_name'); ?>"<?php checked( $show_name ); ?> /><label for="<?php echo $this->get_field_id('show_name'); ?>"><?php _e(' Show N/A when No Image Available', 'wpsc'); ?></label>

152 </p>

153 <p>

156 <label for="<?php echo $this->get_field_id('height'); ?>"><?php _e('Height:', 'wpsc'); ?></label>

157 <input type="text" id="<?php echo $this->get_field_id('height'); ?>" name="<?php echo $this->get_field_name('height'); ?>" value="<?php echo $height ; ?>" size="3" />

158 </p>

159 </div>

174 $checked = ''; ?>

175

176 <input type="checkbox" class="checkbox" id="<?php echo $fieldconfig['id']; ?>-<?php echo $category->term_id; ?>" name="<?php echo $fieldconfig['name']; ?>[<?php echo $category->term_id; ?>]" <?php echo $checked; ?>></input> <label for="<?php echo $fieldconfig['id']; ?>-<?php echo $category->term_id; ?>"><?php echo htmlentities($category->name, ENT_QUOTES, 'UTF-8' ); ?></label><br />

177

178 <?php

function.html_options.php (https://github.com/xkz0001/agentbox.git) PHP · 174 lines

1 <?php

2 /**

3 * Smarty plugin

25 * </pre>

26 *

27 * @link http://www.smarty.net/manual/en/language.function.html.options.php {html_image}

28 * (Smarty online manual)

29 * @author Monte Ohrt <monte at ohrt dot com>

36 function smarty_function_html_options($params, $template)

37 {

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

39

40 $name = null;

73 $selected = smarty_function_escape_special_chars((string) $_sel->__toString());

74 } else {

75 trigger_error("html_options: selected attribute contains an object of class '". get_class($_sel) ."' without __toString() method", E_USER_NOTICE);

76 continue;

77 }

StandardServiceContainer.php (https://github.com/fabienpomerol/Propel2.git) PHP · 487 lines

1 <?php

2

3 /**

168 {

169 $this->adapters[$name] = $adapter;

170 $this->adapterClasses[$name] = get_class($adapter);

171 }

172

ExceptionListener.php (https://github.com/Exercise/symfony.git) PHP · 186 lines

1 <?php

2

3 /*

134 } catch (\Exception $e) {

135 if (null !== $this->logger) {

136 $this->logger->err(sprintf('Exception thrown when handling an exception (%s: %s)', get_class($e), $e->getMessage()));

137 }

138

Cache.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 476 lines

1 <?php

2 /**

3 * Copyright © 2016 Magento. All rights reserved.

124 * @return string

125 * @throws \Magento\Framework\Exception\LocalizedException

126 * @SuppressWarnings(PHPMD.CyclomaticComplexity)

127 * @SuppressWarnings(PHPMD.NPathComplexity)

154 new \Magento\Framework\Phrase(

155 'Object already exists in registry (%1). Old object class: %2, new object class: %3',

156 [$idx, get_class($this->_objects[$idx]), get_class($object)]

157 )

158 );

274 * @param array|string $tags

275 * @return true

276 * @SuppressWarnings(PHPMD.UnusedLocalVariable)

277 */

278 public function deleteByTags($tags)

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

1 <?php

2

3 /**

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: Sreg.php 23775 2011-03-01 17:25:24Z ralph $

21 */

22

24 * @see Zend_OpenId_Extension

25 */

26 // // // // // // // // require_once "Zend/OpenId/Extension.php";

27

28 /**

262 public function getTrustData(&$data)

263 {

264 $data[get_class()] = $this->getProperties();

265 return true;

266 }

AppInstance.php (https://github.com/max-shamaev/phpdaemon.git) PHP · 277 lines

1 <?php

2

3 /**

24 $this->name = $name;

25

26 $appName = get_class($this);

27 $appNameLower = strtolower($appName);

28 $fullname = Daemon::$appResolver->getAppFullName($appName, $this->name);

106 public function broadcastCall($method, $args = array(), $cb = NULL) {

107 return Daemon::$process->IPCManager->sendBroadcastCall(

108 get_class($this) . ($this->name !== '' ? '-' . $this->name : ''),

109 $method,

110 $args,

208 */

209 public function log($message) {

210 Daemon::log(get_class($this) . ': ' . $message);

211 }

212

ControllerResolverTest.php (https://gitlab.com/Isaki/le331.fr) PHP · 180 lines

1 <?php

2

3 /*

82 $controller = $resolver->getController($request);

83

84 $this->assertInstanceOf(get_class($this), $controller[0]);

85 $this->assertSame('controllerMethod1', $controller[1]);

86 }

106 $controller = $resolver->getController($request);

107

108 $this->assertInstanceOf(get_class($this), $controller);

109 }

110

plugin.class.php (https://github.com/dataview/Moodle2_NZ_Schools.git) PHP · 279 lines

1 <?php

2 /**

3 *

11 if (false) $DB = new moodle_database();

12

13 require_once "$CFG->dirroot/local/moodlectl_utils.php";

14

15 /**

190 $userparams = array('userid' => 'id', 'username' => 'username', 'emailaddress' => 'email');

191 $user = find_matching_record('user', $userparams, $options);

192 if (is_object($user) && get_class($user) == 'Exception') {

193 return $user;

194 }

196 $courseparams = array('courseid' => 'id', 'coursename' => 'shortname');

197 $course = find_matching_record('course', $courseparams, $options);

198 if (is_object($course) && get_class($course) == 'Exception') {

199 return $course;

200 }

ResolveChildDefinitionsPassTest.php (https://github.com/gimler/symfony.git) PHP · 399 lines

1 <?php

2

3 /*

12 namespace Symfony\Component\DependencyInjection\Tests\Compiler;

13

14 use PHPUnit\Framework\TestCase;

15 use Symfony\Component\DependencyInjection\ChildDefinition;

16 use Symfony\Component\DependencyInjection\Compiler\ResolveChildDefinitionsPass;

260

261 $configurator = $container->getDefinition('sibling')->getConfigurator();

262 $this->assertSame('Symfony\Component\DependencyInjection\Definition', \get_class($configurator));

263 $this->assertSame('parentClass', $configurator->getClass());

264

265 $factory = $container->getDefinition('sibling')->getFactory();

266 $this->assertSame('Symfony\Component\DependencyInjection\Definition', \get_class($factory[0]));

267 $this->assertSame('parentClass', $factory[0]->getClass());

268

Asserts.php (https://gitlab.com/panace/public) PHP · 396 lines

1 <?php

2 namespace Codeception\Module;

3

337 * Either exception class name or exception instance should be provided.

338 *

339 * ```php

340 * <?php

348 * ```

349 * If you want to check message or exception code, you can pass them with exception instance:

350 * ```php

351 * <?php

365 if (is_object($exception)) {

366 /** @var $exception \Exception **/

367 $class = get_class($exception);

368 $msg = $exception->getMessage();

369 $code = $exception->getCode();

session_test.php (https://github.com/xmak/ezComponents.git) PHP · 807 lines

1 <?php

2 /**

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

9 */

10

11 require_once 'testfiles/article.php';

12 require_once 'testfiles/test-classes.php';

22 public static function suite()

23 {

24 return new PHPUnit_Framework_TestSuite( "ezcSearchSessionTest" );

25 }

26

58 {

59 $session = new ezcSearchSession( $this->backend, new ezcSearchXmlManager( $this->testFilesDir ) );

60 self::assertEquals( 'ezcSearchSolrHandler', get_class( $session->handler ) );

61 self::assertEquals( 'ezcSearchXmlManager', get_class( $session->definitionManager ) );

widget-featured-services.php (https://gitlab.com/luyxtran264/myproject) PHP · 185 lines

143 <label for="<?php echo esc_attr( $this->get_field_id( 'number_of_services' ) ); ?>"><?php esc_html_e('How many services do you want to display?', 'transfers') ?></label>

144 <select id="<?php echo esc_attr( $this->get_field_id( 'number_of_services' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'number_of_services' ) ); ?>">

145 <?php for ($i=1;$i<13;$i++) { ?>

146 <option <?php echo ($i == $instance['number_of_services'] ? 'selected="selected"' : ''); ?> value="<?php echo esc_attr ( $i ); ?>"><?php echo esc_html($i); ?></option>

147 <?php } ?>

156 <option <?php echo 'rand' == $instance['sort_by'] ? 'selected="selected"' : ''; ?> value="rand"><?php esc_html_e('Random', 'transfers') ?></option>

157 <option <?php echo 'date' == $instance['sort_by'] ? 'selected="selected"' : ''; ?> value="date"><?php esc_html_e('Publish Date', 'transfers') ?></option>

158 <option <?php echo 'comment_count' == $instance['sort_by'] ? 'selected="selected"' : ''; ?> value="comment_count"><?php esc_html_e('Comment Count', 'transfers') ?></option>

163 <label for="<?php echo esc_attr( $this->get_field_id( 'sort_descending' ) ); ?>"><?php esc_html_e('Sort services in descending order?', 'transfers') ?></label>

164 <input type="checkbox" <?php echo ($instance['sort_descending'] == '1' ? 'checked="checked"' : ''); ?> class="checkbox" id="<?php echo esc_attr( $this->get_field_id( 'sort_descending' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'sort_descending') ); ?>" value="1" />

165 </p>

166

178 <?php for ($i=1;$i<6;$i++) { ?>

179 <option <?php echo ($i == $instance['services_per_row'] ? 'selected="selected"' : ''); ?> value="<?php echo esc_attr ( $i ); ?>"><?php echo esc_html($i); ?></option>

180 <?php } ?>

katb_user_styles.css (https://bitbucket.org/murtuza88/carolina-home-stone.git) CSS · 497 lines

2 * Styles for Testimonial Basics Plugin

3 *

4 * Note that custom styles are in katb_display_custom_style.php ans katb_widget_custom_style.php

5 *

6 * @package Testimonial Basics WordPress Plugin

126 * ------ Widget Basic Display Styles ----------------------- */

127

128 .katb_display_widget_class h2,.katb_multiple_display_widget_class h2,

129 .katb_display_widget_class h3,.katb_multiple_display_widget_class h3

Cloud.php (https://github.com/kiranatama/sagalaya.git) PHP · 330 lines

1 <?php

2 /**

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

136 'Tag must be an instance of %s\TaggableInterface or an array; received "%s"',

137 __NAMESPACE__,

138 (is_object($tag) ? get_class($tag) : gettype($tag))

139 ));

140 }

analyzer.php (https://github.com/agallou/atoum.git) PHP · 223 lines

1 <?php

2

3 namespace mageekguy\atoum\tests\units\tools\variable;

4

5 require_once __DIR__ . '/../../../runner.php';

6

7 use

36 ->if(

37 $this->function->gettype = 'object',

38 $this->function->get_class = $class = uniqid()

39 )

40 ->then

54 ->if(

55 $this->function->gettype = 'array',

56 $this->function->sizeof = $size = rand(1, PHP_INT_MAX)

57 )

58 ->then

MenuType.php (https://bitbucket.org/ke2083/transfans.co.uk-website.git) PHP · 288 lines

1 <?php

2 /**

3 * Joomla! Content Management System

110 {

111 $this->setError(

112 \JText::sprintf('JLIB_DATABASE_ERROR_STORE_FAILED', get_class($this), \JText::_('JLIB_DATABASE_ERROR_MENUTYPE_CHECKOUT'))

113 );

114

129 {

130 $this->setError(

131 \JText::sprintf('JLIB_DATABASE_ERROR_STORE_FAILED', get_class($this), \JText::_('JLIB_DATABASE_ERROR_MENUTYPE_CHECKOUT'))

132 );

133

193 if ($this->_db->loadRowList())

194 {

195 $this->setError(\JText::sprintf('JLIB_DATABASE_ERROR_DELETE_FAILED', get_class($this), \JText::_('JLIB_DATABASE_ERROR_MENUTYPE')));

196

197 return false;

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

1 <?php

2 /**

3 * base include file for SimpleTest

26 /**

27 * Checks that a class has been declared. Versions

28 * before PHP5.0.2 need a check that it's not really

29 * an interface.

30 * @return boolean True if defined.

40

41 /**

42 * Needed to kill the autoload feature in PHP5

43 * for classes created dynamically.

44 * @return boolean True if defined.

60

61 /**

62 * Needed to kill the autoload feature in PHP5

63 * for classes created dynamically.

64 * @return boolean True if defined.

RecordList.php (https://gitlab.com/gideonmarked/wellmarketing) PHP · 335 lines

1 <?php namespace RainLab\Builder\Components;

2

3 use Lang;

201 ];

202 try {

203 $methods = get_class_methods($modelClass);

204

205 foreach ($methods as $method) {

reflection_php5.php (https://bitbucket.org/volatileeight/prado.git) PHP · 274 lines

1 <?php

2 /**

3 * base include file for SimpleTest

4 * @package SimpleTest

5 * @subpackage UnitTester

6 * @version $Id: reflection_php5.php 1398 2006-09-08 19:31:03Z xue $

7 */

8

26 /**

27 * Checks that a class has been declared. Versions

28 * before PHP5.0.2 need a check that it's not really

29 * an interface.

30 * @return boolean True if defined.

40

41 /**

42 * Needed to kill the autoload feature in PHP5

43 * for classes created dynamically.

44 * @return boolean True if defined.

MailFake.php (https://gitlab.com/jjpa2018/dashboard) PHP · 433 lines

1 <?php

2

3 namespace Illuminate\Support\Testing\Fakes;

10 use Illuminate\Contracts\Queue\ShouldQueue;

11 use Illuminate\Support\Traits\ReflectsClosures;

12 use PHPUnit\Framework\Assert as PHPUnit;

13

14 class MailFake implements Factory, Mailer, MailQueue

58 }

59

60 PHPUnit::assertTrue(

61 $this->sent($mailable, $callback)->count() > 0,

62 $message

75 $count = $this->sent($mailable)->count();

76

77 PHPUnit::assertSame(

78 $times, $count,

79 "The expected [{$mailable}] mailable was sent {$count} times instead of {$times} times."

Component.php (https://bitbucket.org/iiic/iszp.git) PHP · 351 lines

1 <?php

2

3 /**

336 final public function __sleep()

337 {

338 throw new Nette\NotImplementedException('Object serialization is not supported by class ' . get_class($this));

339 }

340

346 final public function __wakeup()

347 {

348 throw new Nette\NotImplementedException('Object unserialization is not supported by class ' . get_class($this));

349 }

350

ErrorHandler.php (https://github.com/richhl/kalturaCE.git) PHP · 257 lines

1 <?php

2 /**

3 * Zend Framework

21

22 /** Zend_Controller_Plugin_Abstract */

23 require_once 'Zend/Controller/Plugin/Abstract.php';

24

25 /**

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

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

35 * @version $Id: ErrorHandler.php 16202 2009-06-21 18:53:49Z thomas $

36 */

37 class Zend_Controller_Plugin_ErrorHandler extends Zend_Controller_Plugin_Abstract

223 $exceptions = $response->getException();

224 $exception = $exceptions[0];

225 $exceptionType = get_class($exception);

226 $error->exception = $exception;

227 switch ($exceptionType) {

Enum.php (https://github.com/markn86/moodle.git) PHP · 250 lines

1 <?php

2 /**

3 * @link http://github.com/myclabs/php-enum

4 * @license http://www.opensource.org/licenses/mit-license.php MIT (see the LICENSE file)

5 */

6

106 * Returns false if an argument is an object of different class or not an object.

107 *

108 * This method is final, for more information read https://github.com/myclabs/php-enum/issues/4

109 *

110 * @psalm-pure

241 *

242 * @return mixed

243 * @link http://php.net/manual/en/jsonserializable.jsonserialize.php

244 * @psalm-pure

245 */

Visitors.php (https://gitlab.com/oytunistrator/snowscript) PHP · 230 lines

1 <?php

2 function rpl($string, $search, $replace)

3 {

25 echo sprintf("%s%s: %s\n", str_repeat(" ", $indent * 2), (string) $k, $v ? "true" : "false");

26 } elseif (\snow_eq($type, "object")) {

27 echo sprintf("%s%s - %s\n", str_repeat(" ", $indent * 2), $k, get_class($v));

28 pp($v, $indent + 1);

29 } elseif (\snow_eq($type, "array")) {

41 var_dump($x);

42 };

43 class Snowscript_Visitors_Scope extends PHPParser_NodeVisitorAbstract

44 {

45

93 $this->scopes[$scope_index]->names[$name]->new_name = $new_name;

94 foreach ($this->scopes[$scope_index]->names[$name]->nodes as $node) {

95 if (($node instanceof PHPParser_Node_Expr_Assign)) {

96 $node->var->name = $new_name;

97 } elseif (($node instanceof PHPParser_Node_Stmt_Function)) {

testlib.php (https://github.com/nigeldaley/moodle.git) PHP · 264 lines

1 <?php

2

3 // This file is part of Moodle - http://moodle.org/

28

29 // Include the code to test

30 require_once($CFG->dirroot . '/mod/workshop/locallib.php');

31 require_once($CFG->dirroot . '/mod/workshop/form/numerrors/lib.php');

32

33 global $DB;

34 Mock::generate(get_class($DB), 'mockDB');

35

36 /**

Navigation.php (https://bitbucket.org/jfrubiom/zendframework-1.x.git) PHP · 338 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: Navigation.php 24593 2012-01-05 20:35:02Z matthew $

21 */

22

24 * @see Zend_View_Helper_Navigation_HelperAbstract

25 */

26 require_once 'Zend/View/Helper/Navigation/HelperAbstract.php';

27

28 /**

175 if (!$helper instanceof Zend_View_Helper_Navigation_Helper) {

176 if ($strict) {

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

178 $e = new Zend_View_Exception(sprintf(

179 'Proxy helper "%s" is not an instance of ' .

MethodProphecy.php (https://gitlab.com/Laolballs/cbtapp) PHP · 407 lines

1 <?php

2

3 /*

48 if (!method_exists($double, $methodName)) {

49 throw new MethodNotFoundException(sprintf(

50 'Method `%s::%s()` is not defined.', get_class($double), $methodName

51 ), get_class($double), $methodName);

60 "Can not add prophecy for a method `%s::%s()`\n".

61 "as it is a final method.",

62 get_class($double),

63 $methodName

64 ), $this);

Abstract.php (https://bitbucket.org/Sinfin/pawtucket.git) PHP · 424 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: Abstract.php 22616 2010-07-17 15:53:16Z ramon $

21 */

22

107 if (isset($config['table'])) {

108 $this->_table = $config['table'];

109 $this->_tableClass = get_class($this->_table);

110 }

111 if (isset($config['rowClass'])) {

113 }

114 if (!class_exists($this->_rowClass)) {

115 require_once 'Zend/Loader.php';

116 Zend_Loader::loadClass($this->_rowClass);

117 }

Container.class.php (https://github.com/mikesir87/PHP-Container.git) PHP · 250 lines

1 <?php

2

3 /**

62 public function injectDependencies($object) {

63 $classInfo = new ClassInfo();

64 $classInfo->setClassName(get_class($object));

65 $classInfo->setAutowiringProperties($this->getManagedProperties(new ReflectionClass(get_class($object))));

ValidatorTypeGuesser.php (https://github.com/Exercise/symfony.git) PHP · 273 lines

1 <?php

2

3 /*

87 public function guessTypeForConstraint(Constraint $constraint)

88 {

89 switch (get_class($constraint)) {

90 case 'Symfony\Component\Validator\Constraints\Type':

91 switch ($constraint->type) {

166 public function guessRequiredForConstraint(Constraint $constraint)

167 {

168 switch (get_class($constraint)) {

169 case 'Symfony\Component\Validator\Constraints\NotNull':

170 case 'Symfony\Component\Validator\Constraints\NotBlank':

182 public function guessMaxLengthForConstraint(Constraint $constraint)

183 {

184 switch (get_class($constraint)) {

185 case 'Symfony\Component\Validator\Constraints\MaxLength':

186 return new ValueGuess($constraint->limit, Guess::HIGH_CONFIDENCE);

MocksApplicationServices.php (https://gitlab.com/madwanz64/laravel) PHP · 286 lines

1 <?php

2

3 namespace Illuminate\Foundation\Testing\Concerns;

273 if (($notified === $notifiable ||

274 $notified->getKey() == $notifiable->getKey()) &&

275 get_class($dispatched['instance']) === $notification

276 ) {

277 return $this;

Navigation.php (https://bitbucket.org/ksekar/campus.git) PHP · 338 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: Navigation.php 24594 2012-01-05 21:27:01Z matthew $

21 */

22

24 * @see Zend_View_Helper_Navigation_HelperAbstract

25 */

26 require_once 'Zend/View/Helper/Navigation/HelperAbstract.php';

27

28 /**

175 if (!$helper instanceof Zend_View_Helper_Navigation_Helper) {

176 if ($strict) {

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

178 $e = new Zend_View_Exception(sprintf(

179 'Proxy helper "%s" is not an instance of ' .

Navigation.php (https://bitbucket.org/sauron07/friend_social.git) PHP · 338 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: Navigation.php 24594 2012-01-05 21:27:01Z matthew $

21 */

22

24 * @see Zend_View_Helper_Navigation_HelperAbstract

25 */

26 //require_once 'Zend/View/Helper/Navigation/HelperAbstract.php';

27

28 /**

175 if (!$helper instanceof Zend_View_Helper_Navigation_Helper) {

176 if ($strict) {

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

178 $e = new Zend_View_Exception(sprintf(

179 'Proxy helper "%s" is not an instance of ' .

fachadaBD.php (https://github.com/danielvaleradp/--ngara.git) PHP · 172 lines

1 <?php

2 class fachadaBD {

3 private static $instancia;

18 $link = pg_connect('host='.self::$hostname.' dbname='.self::$database.' user='.self::$username.' password='.self::$password);

19

20 $query = "INSERT INTO \"Fantasy\".\"".get_class($obj)."\" ( ";

21

22 $vars_clase = $obj->get();

52 $link = pg_connect('host='.self::$hostname.' dbname='.self::$database.' user='.self::$username.' password='.self::$password);

53

54 $query = "UPDATE \"Fantasy\".\"".get_class($obj)."\" SET ";

55 $vars_clase = $obj->get();

56 $i=0;

74 $link = pg_connect('host='.self::$hostname.' dbname='.self::$database.' user='.self::$username.' password='.self::$password);

75

76 $query = "DELETE FROM \"Fantasy\".\"".get_class($obj)."\" WHERE ";

77

78 $i=0;

XmlDescriptor.php (https://github.com/jdewit/symfony.git) PHP · 343 lines

1 <?php

2

3 namespace Symfony\Bundle\FrameworkBundle\Console\Descriptor;

129 }

130

131 $routeXML->setAttribute('class', get_class($route));

132

133 $routeXML->appendChild($pathXML = $dom->createElement('path'));

243 $dom->appendChild($serviceXML = $dom->createElement('service'));

244 $serviceXML->setAttribute('id', $id);

245 $serviceXML->setAttribute('class', get_class($service));

246 }

247

CurrencyServerWebService.php (https://github.com/pedrocadena/Prueba.git) PHP · 447 lines

1 <?php

2

3 if (!class_exists("getDataSet")) {

220 class CurrencyServerWebService extends SoapClient {

221 /**

222 * Default class map for wsdl=>php

223 * @access private

224 * @var array

249 */

250 public function __construct($wsdl="http://www.currencyserver.de/webservice/currencyserverwebservice.asmx?WSDL", $options=array()) {

251 foreach(self::$classmap as $wsdlClassName => $phpClassName) {

252 if(!isset($options['classmap'][$wsdlClassName])) {

253 $options['classmap'][$wsdlClassName] = $phpClassName;

269 $type = gettype($arg);

270 if ($type == "object") {

271 $type = get_class($arg);

272 }

273 $variables .= "(".$type.")";

ErrorHandler.php (https://github.com/grandison/budo16.git) PHP · 257 lines

1 <?php

2 /**

3 * Zend Framework

21

22 /** Zend_Controller_Plugin_Abstract */

23 // require_once 'Zend/Controller/Plugin/Abstract.php';

24

25 /**

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

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

35 * @version $Id: ErrorHandler.php 16202 2009-06-21 18:53:49Z thomas $

36 */

37 class Zend_Controller_Plugin_ErrorHandler extends Zend_Controller_Plugin_Abstract

223 $exceptions = $response->getException();

224 $exception = $exceptions[0];

225 $exceptionType = get_class($exception);

226 $error->exception = $exception;

227 switch ($exceptionType) {

Broker.php (https://github.com/ftaiolivista/Zend-Framework-Namespaced-.git) PHP · 371 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: Broker.php 20255 2010-01-13 13:23:36Z matthew $

21 */

22

30

31 /** Zend_Controller_Plugin_Abstract */

32 require_once 'Zend/Controller/Plugin/Abstract.php';

33

34 /**

60 {

61 if (false !== array_search($plugin, $this->_plugins, true)) {

62 require_once 'Zend/Controller/Exception.php';

63 throw new Controller\Exception('Plugin already registered');

64 }

Navigation.php (https://bitbucket.org/hmancvs/farmis.git) PHP · 338 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: Navigation.php,v 1.1 2011/11/03 08:29:10 smusoke Exp $

21 */

22

24 * @see Zend_View_Helper_Navigation_HelperAbstract

25 */

26 require_once 'Zend/View/Helper/Navigation/HelperAbstract.php';

27

28 /**

175 if (!$helper instanceof Zend_View_Helper_Navigation_Helper) {

176 if ($strict) {

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

178 $e = new Zend_View_Exception(sprintf(

179 'Proxy helper "%s" is not an instance of ' .

exception.php (https://github.com/kevlund/hiphop-php.git) PHP · 321 lines

3 // Do NOT modifiy this doc comment block generated by idl/sysdoc.php

4 /**

5 * ( excerpt from http://php.net/manual/en/class.exception.php )

6 *

7 * Exception is the base class for all Exceptions.

194 // Do NOT modifiy this doc comment block generated by idl/sysdoc.php

195 /**

196 * ( excerpt from http://php.net/manual/en/class.domainexception.php )

197 *

198 * Exception thrown if a value does not adhere to a defined valid data

236 // Do NOT modifiy this doc comment block generated by idl/sysdoc.php

237 /**

238 * ( excerpt from http://php.net/manual/en/class.outofboundsexception.php )

239 *

240 * Exception thrown if a value is not a valid key

reflection_php5.php (https://github.com/kennethjiang/Wolke.git) PHP · 366 lines

1 <?php

2 /**

3 * base include file for SimpleTest

4 * @package SimpleTest

5 * @subpackage UnitTester

6 * @version $Id: reflection_php5.php,v 1.32 2007/07/07 00:31:03 lastcraft Exp $

7 */

8

26 /**

27 * Checks that a class has been declared. Versions

28 * before PHP5.0.2 need a check that it's not really

29 * an interface.

30 * @return boolean True if defined.

40

41 /**

42 * Needed to kill the autoload feature in PHP5

43 * for classes created dynamically.

44 * @return boolean True if defined.

Order.php (https://github.com/markjaquith/woocommerce.git) PHP · 343 lines

1 <?php

2

3 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

163 public function add_item($name, $price=0, $quantity=1, $sku='') {

164 $item = '';

165 if(is_object($name) && get_class($name) == 'Mijireh_Item') {

166 $item = $name;

167 }

UnitTestCase.php (https://github.com/xdade/doctrine1.git) PHP · 252 lines

1 <?php

2 class UnitTestCase

3 {

37 } else {

38 $seperator = "<br>";

39 if (PHP_SAPI === "cli") {

40 $seperator = "\n";

41 }

110 public function pass()

111 {

112 $class = get_class($this);

113 if ( ! isset(self::$_passesAndFails['fails'][$class])) {

114 self::$_passesAndFails['passes'][$class] = $class;

143 }

144 $this->_failed++;

145 $class = get_class($this);

146 if (isset(self::$_passesAndFails['passes'][$class])) {

147 unset(self::$_passesAndFails['passes'][$class]);

SecondLevelCacheJoinTableInheritanceTest.php (https://github.com/jaikdean/doctrine2.git) PHP · 233 lines

1 <?php

2

3 declare(strict_types=1);

11 use Doctrine\Tests\Models\Cache\AttractionLocationInfo;

12 use function count;

13 use function get_class;

14

15 /**

56 foreach ($this->attractionsInfo as $info) {

57 self::assertTrue($this->cache->containsEntity(AttractionInfo::class, $info->getId()));

58 self::assertTrue($this->cache->containsEntity(get_class($info), $info->getId()));

59 }

60 }

link.class.php (https://github.com/nadavkav/MoodleTAO.git) PHP · 331 lines

1 <?php

2 /**

3 * Link class definition

66

67 // Get the last word in the classname

68 $this->type = get_class($this);

69 $this->type = explode('_', $this->type);

70 $this->type = end($this->type);

104

105 $classname = "mod_pagemenu_link_$type";

106 $classfile = "$CFG->dirroot/mod/pagemenu/links/$type.class.php";

107

108 // Get the class file if needed

272 $menuitem->title = '';

273 $menuitem->url = '';

274 $menuitem->class = 'link_'.get_class($this);

275 $menuitem->pre = '';

276 $menuitem->post = '';

OperationTest.php (https://gitlab.com/x33n/respond) PHP · 308 lines

1 <?php

2

3 namespace Guzzle\Tests\Service\Description;

288 return new Operation(array(

289 'name' => 'OperationTest',

290 'class' => get_class($this),

291 'parameters' => array(

292 'test' => array('type' => 'object'),

Abstract.php (https://github.com/srish/Music-Store.git) PHP · 419 lines

1 <?php

2 /**

3 * Zend Framework

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

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

20 * @version $Id: Abstract.php 5896 2007-07-27 20:04:24Z bkarwin $

21 */

22

107 if (isset($config['table'])) {

108 $this->_table = $config['table'];

109 $this->_tableClass = get_class($this->_table);

110 }

111 if (isset($config['rowClass'])) {

113 }

114 if (!class_exists($this->_rowClass)) {

115 require_once 'Zend/Loader.php';

116 Zend_Loader::loadClass($this->_rowClass);

117 }

ExtensionCompilerPassTest.php (https://github.com/dcsg/SonataAdminBundle.git) PHP · 328 lines

1 <?php

2

3 /*

17 use Sonata\AdminBundle\Admin\Admin;

18

19 class ExtensionCompilerPassTest extends \PHPUnit_Framework_TestCase

20 {

21 /** @var SonataAdminExtension $extension */

226 $this->assertCount(2, $extensions);

227

228 $this->assertInstanceOf(get_class($this->publishExtension), $extensions[0]);

229 $this->assertInstanceOf(get_class($this->historyExtension), $extensions[1]);

232 $extensions = $def->getExtensions();

233 $this->assertCount(2, $extensions);

234 $this->assertInstanceOf(get_class($this->publishExtension), $extensions[0]);

235 $this->assertInstanceOf(get_class($this->orderExtension), $extensions[1]);

NotificationFake.php (https://gitlab.com/hoangduys4k5/laravelproject) PHP · 355 lines

1 <?php

2

3 namespace Illuminate\Support\Testing\Fakes;

13 use Illuminate\Support\Traits\Macroable;

14 use Illuminate\Support\Traits\ReflectsClosures;

15 use PHPUnit\Framework\Assert as PHPUnit;

16

17 class NotificationFake implements NotificationDispatcher, NotificationFactory

79 }

80

81 PHPUnit::assertTrue(

82 $this->sent($notifiable, $notification, $callback)->count() > 0,

83 "The expected [{$notification}] notification was not sent."

317 }

318

319 $this->notifications[get_class($notifiable)][$notifiable->getKey()][get_class($notification)][] = [

320 'notification' => $notification,

321 'channels' => $notifiableChannels,

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

1 <?php

2 /**

3 * @version $Id: object.php 4266 2011-10-08 23:57:41Z johanjanssens $

107 {

108 if('_' == substr($property, 0, 1)) {

109 throw new KObjectException("Protected or private properties can't be set outside of object scope in ".get_class($this));

110 }

111

CustomMethods.php (https://gitlab.com/djpmedia/silverstripe-framework) PHP · 323 lines

1 <?php

2

3 namespace SilverStripe\Core;

138 * Return TRUE if a method exists on this object

139 *

140 * This should be used rather than PHP's inbuild method_exists() as it takes into account methods added via

141 * extensions

142 *

178 $class = static::class;

179 if (!isset(self::$built_in_methods[$class])) {

180 self::$built_in_methods[$class] = array_map('strtolower', get_class_methods($this));

181 }

182

206 }

207 } else {

208 $class = get_class($extension);

209 if (!isset(self::$built_in_methods[$class])) {

210 self::$built_in_methods[$class] = array_map('strtolower', get_class_methods($extension));

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

1 <?php

2 /**

3 * File containing the ezcTemplateOperatorTstNode class

223 {

224 if ( !is_object( $element ) )

225 throw new ezcTemplateInternalException( "Non-object <" . gettype( $element ) . "> add as parameter to <" . get_class( $this ) . ">" );

226 $this->parameters = array_merge( array( $element ),

227 $this->parameters );

237 {

238 if ( !is_object( $element ) )

239 throw new ezcTemplateInternalException( "Non-object <" . gettype( $element ) . "> add as parameter to <" . get_class( $this ) . ">" );

240 $this->parameters[] = $element;

241 }

320 public function canMergeParametersOf( ezcTemplateOperatorTstNode $operator )

321 {

322 return get_class( $operator ) == get_class( $this );

323 }

324

DeleteComment.php (https://gitlab.com/Blueprint-Marketing/wordpress-unit-tests) PHP · 355 lines

1 <?php

2

3 /**

4 * Admin ajax functions to be tested

5 */

6 require_once( ABSPATH . 'wp-admin/includes/ajax-actions.php' );

7

8 /**

70 $_POST['_per_page'] = 100;

71 $_POST['_page'] = 1;

72 $_POST['_url'] = admin_url( 'edit-comments.php' );

73

74 // Make the request

127 $_POST['_per_page'] = 100;

128 $_POST['_page'] = 1;

129 $_POST['_url'] = admin_url( 'edit-comments.php' );

130

131 // Make the request

Shipment.php (https://gitlab.com/raymund/addressTax) PHP · 292 lines

1 <?php

2

3 namespace EasyPost;

14 public static function retrieve($id, $apiKey = null)

15 {

16 return self::_retrieve(get_class(), $id, $apiKey);

17 }

18

26 public static function all($params = null, $apiKey = null)

27 {

28 return self::_all(get_class(), $params, $apiKey);

29 }

30

36 public function save()

37 {

38 return self::_save(get_class());

39 }

40

Source.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 258 lines

1 <?php

2 /**

3 * Copyright © 2016 Magento. All rights reserved.

14 * A service for preprocessing content of assets

15 *

16 * @SuppressWarnings(PHPMD.CouplingBetweenObjects)

17 */

18 class Source

173 $result = $this->findFile($asset, $context);

174 } else {

175 $type = get_class($context);

176 throw new \LogicException("Support for {$type} is not implemented.");

177 }

GridFieldPaginator.php (https://github.com/silverstripe-scienceninjas/sapphire.git) PHP · 214 lines

1 <?php

2 /**

3 * GridFieldPaginator paginates the gridfields list and adds controlls to the

63 } else {

64 if($this->throwExceptionOnBadDataType) {

65 throw new LogicException(get_class($this) . " expects an SS_Limitable list to be passed to the GridField.");

66 }

67 return false;

ObjectProphecy.php (https://gitlab.com/techniconline/kmc) PHP · 281 lines

1 <?php

2

3 /*

143 "Can not add prophecy for a method `%s::%s()`\n" .

144 "as you did not specify arguments wildcard for it.",

145 get_class($this->reveal()),

146 $methodProphecy->getMethodName()

147 ), $methodProphecy);

213 public function checkProphecyMethodsPredictions()

214 {

215 $exception = new AggregateException(sprintf("%s:\n", get_class($this->reveal())));

216 $exception->setObjectProphecy($this);

217

ext_reflection.h (https://gitlab.com/0072016/0072016-PHP.LLC) C Header · 282 lines

1 /*

2 +----------------------------------------------------------------------+

3 | HipHop for PHP |

4 +----------------------------------------------------------------------+

5 | Copyright (c) 2010-2015 Facebook, Inc. (http://www.facebook.com) |

6 | Copyright (c) 1997-2010 The PHP Group |

7 +----------------------------------------------------------------------+

8 | This source file is subject to version 3.01 of the PHP license, |

9 | that is bundled with this package in the file LICENSE, and is |

10 | available through the world-wide-web at the following url: |

11 | http://www.php.net/license/3_01.txt |

12 | If you did not receive a copy of the PHP license and are unable to |

13 | obtain it through the world-wide-web, please send a note to |

14 | license@php.net so we can mail you a copy immediately. |

15 +----------------------------------------------------------------------+

16 */

php.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 2590 lines

11 </PROPS>

12 <RULES IGNORE_CASE="TRUE">

13 <SPAN TYPE="MARKUP" DELEGATE="PHP">

14 <BEGIN>&lt;?php</BEGIN>

16 </SPAN>

17

18 <SPAN TYPE="MARKUP" DELEGATE="PHP">

19 <BEGIN>&lt;?</BEGIN>

20 <END>?&gt;</END>

21 </SPAN>

22

23 <SPAN TYPE="MARKUP" DELEGATE="PHP">

24 <BEGIN>&lt;%=</BEGIN>

25 <END>%&gt;</END>

64

65 <RULES SET="TAGS" DEFAULT="MARKUP">

66 <SPAN TYPE="MARKUP" DELEGATE="PHP">

67 <BEGIN>&lt;?php</BEGIN>

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

This PHP code is a comprehensive set of functions for validating and checking various aspects of PHP code, including classes, functions, globals, resources, and variables. It provides a robust framework for detecting errors, warnings, and potential issues in PHP code, making it useful for developers to ensure their code is correct and reliable.

1 <?php

2

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

73 if (!is_object($object))

74 return check::fail("The second argument is a " . gettype($object) . ", not an object.");

75 if (strtolower($string)!=strtolower($classname=get_class($object))) return check::fail("Object: \$object is of class %s not class %s",$classname,$string);

76 return TRUE;

77 }

78

79 function classmethods($classname,$methods) {

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

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

89 if ($missing) $message[]="does not have these methods:\n ".join(",",$missing);

90 if ($message) {

91 return check::fail("Class %s %s\nFull class list:\n %s\n",$classname,join("\nbut ",$message),join("\n ",get_class_methods($classname)));

92 }

93 if ($extra) $message[]="Class ".$classname." has these extra methods:\n ".join(",",$extra);

Preview_Javadoc_of_Buffer.bsh (https://jedit.svn.sourceforge.net/svnroot/jedit) Unknown · 609 lines

9 * - Includes the ability to use the Bouvard Doclet.

10 * Visit

11 * http://community.jedit.org/modules.php?

12 * op=modload&name=web_links&file=index&req=viewlink&cid=6

13 * for the Bouvard link

60 {

61 /*

62 * Get_Class_Name.bsh - a BeanShell macro script for the

63 * jEdit text editor - gets class name from buffer name

64 * Copyright (C) 2001 John Gellene

79 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

80 *

81 * Get_Class_Name.bsh,v 1.1.1.1 2001/09/02 05:39:29 spestov Exp $

82 */

83 name = buffer.getName();

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?

68

69 function classname($string,$object) {

70 if ($string!=($classname=get_class($object))) return check::fail("Object: $object is of class %s not class %s",$classname,$string);

71 return TRUE;

72 }

73

74 function classmethods($classname,$methods) {

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

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

84 if ($missing) $message[]="does not have these methods:\n ".join(",",$missing);

85 if ($message) {

86 return check::fail("Class %s %s\nFull class list:\n %s\n",$classname,join("\nbut ",$message),join("\n ",get_class_methods($classname)));

87 }

88 if ($extra) $message[]="Class ".$classname." has these extra methods:\n ".join(",",$extra);