100+ results for 'php getopt'
Not the results you expected?
FormErrors.php (https://github.com/jtai/zf2.git) PHP · 466 lines
1 <?php
2 /**
3 * Zend Framework
140 {
141 if (null === $this->_markupElementLabelStart) {
142 if (null === ($markupElementLabelStart = $this->getOption('markupElementLabelStart'))) {
143 $this->setMarkupElementLabelStart($this->_defaults['markupElementLabelStart']);
144 } else {
171 {
172 if (null === $this->_markupElementLabelEnd) {
173 if (null === ($markupElementLabelEnd = $this->getOption('markupElementLabelEnd'))) {
174 $this->setMarkupElementLabelEnd($this->_defaults['markupElementLabelEnd']);
175 } else {
202 {
203 if (null === $this->_markupListStart) {
204 if (null === ($markupListStart = $this->getOption('markupListStart'))) {
205 $this->setMarkupListStart($this->_defaults['markupListStart']);
206 } else {
ucal.P (https://github.com/JTroniks/CyanogenMod-7.git) Prolog · 219 lines
74 /usr/include/bits/setjmp.h /usr/include/unistd.h \
75 /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
76 /usr/include/bits/confname.h /usr/include/getopt.h \
77 /usr/include/c++/4.5/x86_64-linux-gnu/32/bits/atomic_word.h \
78 /usr/include/c++/4.5/initializer_list \
183 /usr/include/bits/setjmp.h /usr/include/unistd.h :
184 /usr/include/bits/posix_opt.h /usr/include/bits/environments.h :
185 /usr/include/bits/confname.h /usr/include/getopt.h :
186 /usr/include/c++/4.5/x86_64-linux-gnu/32/bits/atomic_word.h :
187 /usr/include/c++/4.5/initializer_list :
FormErrors.php (https://bitbucket.org/mercysam/zfs.git) PHP · 397 lines
1 <?php
2 /**
3 * Zend Framework
22 /** Zend_Form_Decorator_Abstract */
23 require_once 'Zend/Form/Decorator/Abstract.php';
25 /**
129 {
130 if (null === $this->_markupElementLabelStart) {
131 if (null === ($markupElementLabelStart = $this->getOption('markupElementLabelStart'))) {
132 $this->setMarkupElementLabelStart($this->_defaults['markupElementLabelStart']);
133 } else {
160 {
161 if (null === $this->_markupElementLabelEnd) {
162 if (null === ($markupElementLabelEnd = $this->getOption('markupElementLabelEnd'))) {
163 $this->setMarkupElementLabelEnd($this->_defaults['markupElementLabelEnd']);
164 } else {
sfValidatorBaseTest.php (https://github.com/StefanRHRO/SCRM.git) PHP · 246 lines
1 <?php
3 /*
9 */
11 require_once(dirname(__FILE__).'/../../bootstrap/unit.php');
13 $t = new lime_test(47);
48 $t->diag('->configure()');
49 $v = new ValidatorIdentity();
50 $t->is($v->getOption('foo'), 'bar', '->configure() can add some options');
51 $v = new ValidatorIdentity(array('foo' => 'foobar'));
52 $t->is($v->getOption('foo'), 'foobar', '->configure() takes an options array as its first argument and values override default option values');
151 $t->diag('->getOption()');
152 $t->is($v->getOption('required'), false, '->getOption() returns the value of an option');
153 $t->is($v->getOption('nonexistant'), null, '->getOption() returns null if the option does not exist');
FormErrors.php (https://github.com/lboaretto/magento-pt_br.git) PHP · 397 lines
1 <?php
2 /**
3 * Zend Framework
22 /** Zend_Form_Decorator_Abstract */
23 #require_once 'Zend/Form/Decorator/Abstract.php';
25 /**
129 {
130 if (null === $this->_markupElementLabelStart) {
131 if (null === ($markupElementLabelStart = $this->getOption('markupElementLabelStart'))) {
132 $this->setMarkupElementLabelStart($this->_defaults['markupElementLabelStart']);
133 } else {
160 {
161 if (null === $this->_markupElementLabelEnd) {
162 if (null === ($markupElementLabelEnd = $this->getOption('markupElementLabelEnd'))) {
163 $this->setMarkupElementLabelEnd($this->_defaults['markupElementLabelEnd']);
164 } else {
ZendQueue.php (https://github.com/jtai/zf2.git) PHP · 303 lines
sfValidatorDateTest.php (https://github.com/frhumanes/PLM.git) PHP · 246 lines
1 <?php
3 /*
9 */
11 require_once(dirname(__FILE__).'/../../bootstrap/unit.php');
13 $t = new lime_test(52);
100 {
101 $t->pass('->clean() throws a sfValidatorError if the date does not match the regex');
102 $t->like($e->getMessage(), '/'.preg_quote(htmlspecialchars($v->getOption('date_format'), ENT_QUOTES, 'UTF-8'), '/').'/', '->clean() returns the expected date format in the error message');
103 $t->is($e->getCode(), 'bad_format', '->clean() throws a sfValidatorError');
104 }
Chain.php (https://github.com/nationalfield/symfony.git) PHP · 422 lines
1 <?php
2 /*
3 * $Id$
28 * @subpackage Record
29 * @author Konsta Vesterinen <kvesteri@cc.hut.fi>
30 * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
31 * @link www.doctrine-project.org
32 * @since 1.0
63 /**
64 * getOption
65 * returns the value of given option
66 *
68 * @return mixed the value of given option
69 */
70 public function getOption($name)
71 {
72 if (isset($this->_options[$name])) {
SupplyForm.php (https://gitlab.com/mnomansheikh/ampuz) PHP · 363 lines
1 <?php
2 namespace Supply\Form;
110 'options' => array(
111 'label' => 'Company',
112 //'value_options' => $this->getOptionsForSelect(),
113 'value_options' => $Companies,
114 ),
126 'options' => array(
127 'label' => 'Country',
128 //'value_options' => $this->getOptionsForSelect(),
129 'value_options' => $Regions,
130 ),
140 'options' => array(
141 'label' => 'Country',
142 //'value_options' => $this->getOptionsForSelect(),
143 'value_options' => $Countries,
144 ),
HealthForm.php (https://gitlab.com/mnomansheikh/ampuz) PHP · 363 lines
1 <?php
2 namespace Health\Form;
110 'options' => array(
111 'label' => 'Company',
112 //'value_options' => $this->getOptionsForSelect(),
113 'value_options' => $Companies,
114 ),
126 'options' => array(
127 'label' => 'Country',
128 //'value_options' => $this->getOptionsForSelect(),
129 'value_options' => $Regions,
130 ),
140 'options' => array(
141 'label' => 'Country',
142 //'value_options' => $this->getOptionsForSelect(),
143 'value_options' => $Countries,
144 ),
Outline.php (https://github.com/MontmereLimited/ZendFramework-v1.git) PHP · 373 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: Outline.php 23775 2011-03-01 17:25:24Z ralph $
21 */
154 * @return array
155 */
156 public function getOptions()
157 {
158 return array('title' => $this->_title,
200 default:
201 // // // // // // // // // // require_once 'Zend/Pdf/Exception.php';
202 throw new Zend_Pdf_Exception("Unknown option name - '$key'.");
203 break;
XmlDescriptor.php (https://github.com/stof/symfony.git) PHP · 247 lines
Driver.php (https://bitbucket.org/pastor399/newcastleunifc.git) PHP · 280 lines
1 <?php
2 /*
3 * $Id: Driver.php 48519 2012-02-03 23:18:52Z btowles $
25 * @package Doctrine
26 * @subpackage Cache
27 * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
28 * @link www.doctrine-project.org
29 * @since 1.0
71 * @return mixed option value
72 */
73 public function getOption($option)
74 {
75 if ( ! isset($this->_options[$option])) {
140 /**
141 * Delete cache entries where the key matches a PHP regular expressions
142 *
143 * @param string $regex
Driver.php (https://github.com/yuya-takeyama/symfony-hackathon-20110924.git) PHP · 280 lines
1 <?php
2 /*
3 * $Id: Driver.php 7490 2010-03-29 19:53:27Z jwage $
25 * @package Doctrine
26 * @subpackage Cache
27 * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
28 * @link www.doctrine-project.org
29 * @since 1.0
71 * @return mixed option value
72 */
73 public function getOption($option)
74 {
75 if ( ! isset($this->_options[$option])) {
140 /**
141 * Delete cache entries where the key matches a PHP regular expressions
142 *
143 * @param string $regex
RouteTest.php (https://github.com/jdewit/symfony.git) PHP · 201 lines
1 <?php
3 /*
14 use Symfony\Component\Routing\Route;
16 class RouteTest extends \PHPUnit_Framework_TestCase
17 {
18 public function testConstructor()
22 $this->assertEquals(array('foo' => 'bar'), $route->getDefaults(), '__construct() takes defaults as its second argument');
23 $this->assertEquals(array('foo' => '\d+'), $route->getRequirements(), '__construct() takes requirements as its third argument');
24 $this->assertEquals('bar', $route->getOption('foo'), '__construct() takes options as its fourth argument');
25 $this->assertEquals('{locale}.example.com', $route->getHost(), '__construct() takes a host pattern as its fifth argument');
55 $this->assertEquals(array_merge(array(
56 'compiler_class' => 'Symfony\\Component\\Routing\\RouteCompiler',
57 ), array('foo' => 'bar')), $route->getOptions(), '->setOptions() sets the options');
58 $this->assertEquals($route, $route->setOptions(array()), '->setOptions() implements a fluent interface');
Liquid.php (https://gitlab.com/Skull3x/ClearSky) PHP · 437 lines
1 <?php
2 namespace pocketmine\block;
250 }
251 }elseif($decay >= 0 and ($decay === 0 or !$bottomBlock->canBeFlowedInto())){
252 $flags = $this->getOptimalFlowDirections();
254 $l = $decay + $multiplier;
348 }
350 private function getOptimalFlowDirections(){
351 if($this->temporalVector === null){
352 $this->temporalVector = new Vector3(0, 0, 0);
ConfigListener.php (https://bitbucket.org/zbahij/eprojets_app.git) PHP · 383 lines
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
72 $this->setMergedConfig($this->getCachedConfig());
73 } else {
74 $this->addConfigGlobPaths($this->getOptions()->getConfigGlobPaths());
75 $this->addConfigStaticPaths($this->getOptions()->getConfigStaticPaths());
150 // Merge all of the collected configs
151 $this->mergedConfig = $this->getOptions()->getExtraConfig() ?: array();
152 foreach ($this->configs as $config) {
153 $this->mergedConfig = ArrayUtils::merge($this->mergedConfig, $config);
156 // If enabled, update the config cache
157 if (
158 $this->getOptions()->getConfigCacheEnabled()
159 && false === $this->skipConfig
160 ) {
InstallCommandTest.php (https://gitlab.com/crazybutterfly815/magento2) PHP · 270 lines
1 <?php
2 /**
3 * Copyright © 2016 Magento. All rights reserved.
16 /**
17 * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
18 */
19 class InstallCommandTest extends \PHPUnit_Framework_TestCase
26 /**
27 * @var \PHPUnit_Framework_MockObject_MockObject|InstallCommand
28 */
29 private $command;
31 /**
32 * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Setup\Model\InstallerFactory
33 */
34 private $installerFactory;
ClientInterface.php (https://gitlab.com/ntphuc/BackendFeedy) PHP · 230 lines
Form.php (https://github.com/tquensen/MiniMVC.git) PHP · 363 lines
1 <?php
3 class MiniMVC_Form
38 public function getFormToken()
39 {
40 if (!$this->getOption('useFormToken')) {
41 return false;
42 }
46 public function checkFormToken()
47 {
48 if (!$this->getOption('useFormToken')) {
49 return false;
50 }
94 }
96 public function getOption($option)
97 {
98 return (isset($this->options[$option])) ? $this->options[$option] : null;
SetAccessPermissionsRequestDetailsType.php (https://github.com/AMSGWeblinks/prestaPaypalPlugin.git) PHP · 359 lines
1 <?php
2 /**
3 * @package PayPal
7 * Make sure our parent class is defined.
8 */
9 require_once 'PayPal/Type/XSDSimpleType.php';
11 /**
267 $this->_elements['RequiredAccessPermissions']['charset'] = $charset;
268 }
269 function getOptionalAccessPermissions()
270 {
271 return $this->OptionalAccessPermissions;
Group.php (https://gitlab.com/hatemdigify/digifyblog) PHP · 472 lines
1 <?php
2 namespace Former\Form;
147 // Required state
148 if ($this->app->bound('former.field') and $this->app['former.field']->isRequired()) {
149 $this->addClass($this->app['former']->getOption('required_class'));
150 }
433 // Replace help text with error if any found
434 $errors = $this->app['former']->getErrors();
435 if ($errors and $this->app['former']->getOption('error_messages')) {
436 $inline = $this->app['former.framework']->createHelp($errors);
437 }
ViewModel.php (https://github.com/christeredvartsen/zf2.git) PHP · 439 lines
BlackHole.php (https://gitlab.com/faisaliqbal/mytripsorter) PHP · 502 lines
Serializer.php (https://github.com/udotelaar/zf2.git) PHP · 352 lines
1 <?php
2 /**
3 * Zend Framework
134 public function onReadItemPost(PostEvent $event)
135 {
136 $options = $this->getOptions();
137 $serializer = $options->getSerializer();
138 $result = $event->getResult();
149 public function onReadItemsPost(PostEvent $event)
150 {
151 $options = $this->getOptions();
152 $serializer = $options->getSerializer();
153 $result = $event->getResult();
166 public function onFetchPost(PostEvent $event)
167 {
168 $options = $this->getOptions();
169 $serializer = $options->getSerializer();
170 $item = $event->getResult();
authentication_session.php (https://bitbucket.org/ericsagnes/ezpublish-multisite.git) PHP · 273 lines
1 <?php
2 /**
3 * File containing the ezcAuthenticationSession class.
15 *
16 * Contains the methods:
17 * - start - starts the session, calling the PHP function session_start()
18 * - load - returns the information stored in the session key ezcAuth_id
19 * - save - saves information in the session key ezcAuth_id and also saves
21 * - destroy - deletes the information stored in the session keys ezcAuth_id
22 * and ezcAuth_timestamp
23 * - regenerateId - regenerates the PHPSESSID value
24 *
25 * Example of use (combined with the Htpasswd filter):
200 public function start()
201 {
202 if ( session_id() === '' && PHP_SAPI !== 'cli' )
203 {
204 session_start();
Option.php (https://bitbucket.org/dnejedly/eaparts.git) PHP · 277 lines
1 <?php
2 /**
3 * Magento
8 * that is bundled with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://opensource.org/licenses/osl-3.0.php
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
22 * @package Mage_Bundle
23 * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25 */
57 {
58 if (is_null($this->_showSingle)) {
59 $_option = $this->getOption();
60 $_selections = $_option->getSelections();
SkinzamTablePager.php (https://github.com/Seizam/seizamcore.git) PHP · 353 lines
1 <?php
3 if (!defined('MEDIAWIKI')) {
20 protected $defaultSort; # String (field)
21 public $mDefaultDirection = true; # Boolean (true=decrescent)
22 public $forceDefaultLimit = 10; # if > 0 use instead of $wgUser->getOption( 'rclimit' )
23 protected $messagesPrefix = 'sz-'; # String
24 # Do not redeclare
Route.php (https://bitbucket.org/laborautonomo/laborautonomo-site.git) PHP · 594 lines
1 <?php
3 /*
284 * @return array The options
285 */
286 public function getOptions()
287 {
288 return $this->options;
353 * @return mixed The option value or null when not given
354 */
355 public function getOption($name)
356 {
357 return isset($this->options[$name]) ? $this->options[$name] : null;
560 }
562 $class = $this->getOption('compiler_class');
564 return $this->compiled = $class::compile($this);
getOptions.php (https://gitlab.com/morganestes/wordpress-develop) PHP · 211 lines
1 <?php
3 /**
4 * @group xmlrpc
5 */
6 class Tests_XMLRPC_wp_getOptions extends WP_XMLRPC_UnitTestCase {
8 function test_invalid_username_password() {
9 $result = $this->myxmlrpcserver->wp_getOptions( array( 1, 'username', 'password' ) );
10 $this->assertIXRError( $result );
11 $this->assertEquals( 403, $result->code );
15 $this->make_user_by_role( 'subscriber' );
17 $result = $this->myxmlrpcserver->wp_getOptions( array( 1, 'subscriber', 'subscriber' ) );
18 $this->assertInternalType( 'array', $result );
19 $this->assertEquals( 'WordPress', $result['software_name']['value'] );
get.rb
(git://github.com/IronLanguages/main.git)
Ruby · 76 lines
✨ Summary
This Ruby code uses the GetoptLong
class to parse command-line options and arguments. It defines a set of options with their corresponding argument types, such as required or optional. The code then iterates through the ARGV array, parsing each option and its argument using the getoptlong_get
method. If an option requires an argument but none is given, it raises an error. The code also checks for the --
option, which terminates option processing and shifts any remaining arguments to the end of the ARGV array.
This Ruby code uses the GetoptLong
class to parse command-line options and arguments. It defines a set of options with their corresponding argument types, such as required or optional. The code then iterates through the ARGV array, parsing each option and its argument using the getoptlong_get
method. If an option requires an argument but none is given, it raises an error. The code also checks for the --
option, which terminates option processing and shifts any remaining arguments to the end of the ARGV array.
1 describe :getoptlong_get, :shared => true do
2 before(:each) do
3 @opts = GetoptLong.new(
4 [ '--size', '-s', GetoptLong::REQUIRED_ARGUMENT ],
5 [ '--verbose', '-v', GetoptLong::NO_ARGUMENT ],
6 [ '--query', '-q', GetoptLong::NO_ARGUMENT ],
7 [ '--check', '--valid', '-c', GetoptLong::NO_ARGUMENT ]
68 ARGV = [ "--size" ]
70 lambda { @opts.send(@method) }.should raise_error(GetoptLong::MissingArgument)
71 ensure
72 ARGV = old_argv
monitoring_result.php (https://gitlab.com/Rad1calDreamer/honey) PHP · 394 lines
1 <?php
2 interface CBitrixCloudMonitoring_Access extends Iterator, ArrayAccess
3 {
302 public static function isExpired()
303 {
304 $time = CBitrixCloudOption::getOption("monitoring_expire_time")->getIntegerValue();
305 return ($time < time());
306 }
307 public static function getExpirationTime()
308 {
309 return CBitrixCloudOption::getOption("monitoring_expire_time")->getIntegerValue();
310 }
311 public static function setExpirationTime($time)
312 {
313 $time = intval($time);
314 CBitrixCloudOption::getOption("monitoring_expire_time")->setStringValue($time);
315 return $time;
316 }
ZendQueue.php (https://github.com/praveensingh85/MyEventDashboard1.git) PHP · 301 lines
1 <?php
2 /**
3 * LICENSE
18 */
20 require_once 'Zend/Cloud/QueueService/Adapter/AbstractAdapter.php';
21 require_once 'Zend/Cloud/QueueService/Exception.php';
22 require_once 'Zend/Queue.php';
24 /**
158 }
159 try {
160 return $this->_queues[$queueId]->getOptions();
161 } catch (Zend_Queue_Exception $e) {
162 throw new Zend_Cloud_QueueService_Exception('Error on fetching queue metadata: '.$e->getMessage(), $e->getCode(), $e);
TbxTest.php (https://github.com/bruisedlee/zf2.git) PHP · 241 lines
1 <?php
2 /**
3 * Zend Framework
34 /**
35 * PHPUnit test case
36 */
44 * @group Zend_Translator
45 */
46 class TbxTest extends \PHPUnit_Framework_TestCase
47 {
48 public function testCreate()
131 'reload' => false,
132 );
133 $options = $adapter->getOptions();
135 foreach ($expected as $key => $value) {
ChoiceTypeTest.php (https://github.com/proclamo/txinbometro.git) PHP · 439 lines
lmbCliInputTest.class.php (https://github.com/limb-php-framework/limb-app-buildman.git) PHP · 256 lines
1 <?php
2 /**
3 * Limb Web Application Framework
7 * @copyright Copyright © 2004-2007 BIT
8 * @license LGPL http://www.gnu.org/copyleft/lesser.html
9 * @version $Id: lmbCliInputTest.class.php 4988 2007-02-08 15:35:19Z pachanga $
10 * @package cli
11 */
12 lmb_require('limb/cli/src/lmbCliInput.class.php');
13 lmb_require('limb/cli/src/lmbCliOption.class.php');
19 {
20 $cli = new lmbCliInput();
21 $this->assertEqual($cli->getOptions(), array());
22 $this->assertEqual($cli->getArguments(), array());
SiteController.php (https://gitlab.com/x33n/ImpressPages) PHP · 291 lines
1 <?php
2 namespace Ip\Internal\Admin;
17 if (empty($administrators)) {
18 $adminUsername = 'admin';
19 $adminEmail = ipGetOptionLang('Config.websiteEmail');
20 $adminPassword = Model::randString(8);
39 }
41 $content = ipView('view/login.php', array('loginForm' => FormHelper::getLoginForm()));
42 ipAddJs('Ip/Internal/Admin/assets/login.js');
43 $response = ipResponse();
44 $response->setLayout('Ip/Internal/Admin/view/loginLayout.php');
45 $response->setLayoutVariable('content', $content);
46 ipAddJs('assets/languageSelect.js');
Base.php (https://github.com/finger2000/horde.git) PHP · 438 lines
1 <?php
2 /**
3 * Represents base functionality for a component.
4 *
5 * PHP version 5
6 *
7 * @category Horde
9 * @author Gunnar Wrobel <wrobel@pardus.de>
10 * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
11 * @link http://pear.horde.org/index.php?package=Components
12 */
24 * @author Gunnar Wrobel <wrobel@pardus.de>
25 * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
26 * @link http://pear.horde.org/index.php?package=Components
27 */
28 abstract class Components_Component_Base implements Components_Component
sfValidatorBase.class.php (https://github.com/bheneka/gitta.git) PHP · 498 lines
1 <?php
3 /*
56 $this->configure($options, $messages);
58 $this->setDefaultOptions($this->getOptions());
59 $this->setDefaultMessages($this->getMessages());
181 * @return mixed The option value
182 */
183 public function getOption($name)
184 {
185 return isset($this->options[$name]) ? $this->options[$name] : null;
238 * @return array An array of options
239 */
240 public function getOptions()
241 {
242 return $this->options;
ReCaptchaTest.php (https://github.com/rettal/zf2.git) PHP · 284 lines
1 <?php
2 /**
3 * Zend Framework
38 * @group Zend_Service_ReCaptcha
39 */
40 class ReCaptchaTest extends \PHPUnit_Framework_TestCase
41 {
42 protected $_publicKey = TESTS_ZEND_SERVICE_RECAPTCHA_PUBLIC_KEY;
96 $this->_reCaptcha->setOption($key, $value);
97 $this->assertSame($value, $this->_reCaptcha->getOption($key));
98 }
100 public function tetsGetNonExistingOption() {
101 $this->assertNull($this->_reCaptcha->getOption('foobar'));
102 }
FormErrors.php (https://github.com/eschabell/openshift-zendframework.git) PHP · 465 lines
1 <?php
2 /**
3 * Zend Framework
22 /** Zend_Form_Decorator_Abstract */
23 require_once 'Zend/Form/Decorator/Abstract.php';
25 /**
35 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
36 * @license http://framework.zend.com/license/new-bsd New BSD License
37 * @version $Id: FormErrors.php 23853 2011-04-10 16:06:30Z ramon $
38 */
39 class Zend_Form_Decorator_FormErrors extends Zend_Form_Decorator_Abstract
135 {
136 if (null === $this->_markupElementLabelStart) {
137 if (null === ($markupElementLabelStart = $this->getOption('markupElementLabelStart'))) {
138 $this->setMarkupElementLabelStart($this->_defaults['markupElementLabelStart']);
139 } else {
Adapter.php (https://github.com/bradley-holt/zf2.git) PHP · 426 lines
InternalApi.md (https://github.com/deribit/deribit-api-clients.git) Markdown · 458 lines
13 [**PrivateToggleDepositAddressCreationGet**](InternalApi.md#PrivateToggleDepositAddressCreationGet) | **GET** /private/toggle_deposit_address_creation | Enable or disable deposit address creation
14 [**PublicGetFooterGet**](InternalApi.md#PublicGetFooterGet) | **GET** /public/get_footer | Get information to be displayed in the footer of the website.
15 [**PublicGetOptionMarkPricesGet**](InternalApi.md#PublicGetOptionMarkPricesGet) | **GET** /public/get_option_mark_prices | Retrives market prices and its implied volatility of options instruments
16 [**PublicValidateFieldGet**](InternalApi.md#PublicValidateFieldGet) | **GET** /public/validate_field | Method used to introduce the client software connected to Deribit platform over websocket. Provided data may have an impact on the maintained connection and will be collected for internal statistical purposes. In response, Deribit will also introduce itself.
373 # **PublicGetOptionMarkPricesGet**
374 > object PublicGetOptionMarkPricesGet(currency)
387 api.instance$apiClient$username <- 'TODO_YOUR_USERNAME';
388 api.instance$apiClient$password <- 'TODO_YOUR_PASSWORD';
389 result <- api.instance$PublicGetOptionMarkPricesGet(var.currency)
390 dput(result)
391 ```
getOptions.php (https://gitlab.com/Blueprint-Marketing/wordpress-unit-tests) PHP · 211 lines
1 <?php
3 /**
4 * @group xmlrpc
5 */
6 class Tests_XMLRPC_wp_getOptions extends WP_XMLRPC_UnitTestCase {
8 function test_invalid_username_password() {
9 $result = $this->myxmlrpcserver->wp_getOptions( array( 1, 'username', 'password' ) );
10 $this->assertInstanceOf( 'IXR_Error', $result );
11 $this->assertEquals( 403, $result->code );
15 $this->make_user_by_role( 'subscriber' );
17 $result = $this->myxmlrpcserver->wp_getOptions( array( 1, 'subscriber', 'subscriber' ) );
18 $this->assertInternalType( 'array', $result );
19 $this->assertEquals( 'WordPress', $result['software_name']['value'] );
FormErrors.php (https://bitbucket.org/khuongduybui/openfisma.git) PHP · 465 lines
1 <?php
2 /**
3 * Zend Framework
22 /** Zend_Form_Decorator_Abstract */
23 // require_once 'Zend/Form/Decorator/Abstract.php';
25 /**
135 {
136 if (null === $this->_markupElementLabelStart) {
137 if (null === ($markupElementLabelStart = $this->getOption('markupElementLabelStart'))) {
138 $this->setMarkupElementLabelStart($this->_defaults['markupElementLabelStart']);
139 } else {
166 {
167 if (null === $this->_markupElementLabelEnd) {
168 if (null === ($markupElementLabelEnd = $this->getOption('markupElementLabelEnd'))) {
169 $this->setMarkupElementLabelEnd($this->_defaults['markupElementLabelEnd']);
170 } else {
CsvTest.php (https://github.com/bruisedlee/zf2.git) PHP · 249 lines
1 <?php
2 /**
3 * Zend Framework
34 /**
35 * PHPUnit test case
36 */
44 * @group Zend_Translator
45 */
46 class CsvTest extends \PHPUnit_Framework_TestCase
47 {
48 public function setUp()
143 'reload' => false,
144 );
145 $options = $adapter->getOptions();
147 foreach ($expected as $key => $value) {
Session.php (https://github.com/EvanDotPro/zf2.git) PHP · 547 lines
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
29 * @param array|\Traversable|SessionOptions $options
30 * @return Memory
31 * @see getOptions()
32 */
33 public function setOptions($options)
46 * @see setOptions()
47 */
48 public function getOptions()
49 {
50 if (!$this->options) {
61 protected function getSessionContainer()
62 {
63 $sessionContainer = $this->getOptions()->getSessionContainer();
64 if (!$sessionContainer) {
65 throw new Exception\RuntimeException("No session container configured");
encryption.php (https://gitlab.com/Red54/core) PHP · 368 lines
1 <?php
3 namespace Test\Files\Storage\Wrapper;
15 /**
16 * @var \OC\Files\Storage\Wrapper\Encryption | \PHPUnit_Framework_MockObject_MockObject
17 */
18 protected $instance;
20 /**
21 * @var \OC\Encryption\Keys\Storage | \PHPUnit_Framework_MockObject_MockObject
22 */
23 private $keyStore;
25 /**
26 * @var \OC\Encryption\Util | \PHPUnit_Framework_MockObject_MockObject
27 */
28 private $util;
Getopt.php (https://gitlab.com/Pasantias/pasantiasASLG) PHP · 163 lines
1 <?php
2 /*
3 * This file is part of PHPUnit.
4 *
5 * (c) Sebastian Bergmann <sebastian@phpunit.de>
6 *
7 * For the full copyright and license information, please view the LICENSE
14 * @since Class available since Release 3.0.0
15 */
16 class PHPUnit_Util_Getopt
17 {
18 public static function getopt(array $args, $short_options, $long_options = null)
80 if (($spec = strstr($short_options, $opt)) === false ||
81 $arg[$i] == ':') {
82 throw new PHPUnit_Framework_Exception(
83 "unrecognized option -- $opt"
84 );
FormErrors.php (https://github.com/rocknoon/Stack.git) PHP · 465 lines
1 <?php
2 /**
3 * Zend Framework
22 /** Zend_Form_Decorator_Abstract */
23 require_once 'Zend/Form/Decorator/Abstract.php';
25 /**
35 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
36 * @license http://framework.zend.com/license/new-bsd New BSD License
37 * @version $Id: FormErrors.php 23775 2011-03-01 17:25:24Z ralph $
38 */
39 class Zend_Form_Decorator_FormErrors extends Zend_Form_Decorator_Abstract
135 {
136 if (null === $this->_markupElementLabelStart) {
137 if (null === ($markupElementLabelStart = $this->getOption('markupElementLabelStart'))) {
138 $this->setMarkupElementLabelStart($this->_defaults['markupElementLabelStart']);
139 } else {
ArrayInput.php (https://github.com/Faianca/symfony.git) PHP · 190 lines
ProductExternalTest.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 321 lines
1 <?php
2 /**
3 * Copyright © 2016 Magento. All rights reserved.
12 * @see \Magento\Catalog\Model\ProductTest
13 * @see \Magento\Catalog\Model\ProductPriceTest
14 * @magentoDataFixture Magento/Catalog/_files/categories.php
15 */
16 class ProductExternalTest extends \PHPUnit_Framework_TestCase
251 /**
252 * @covers \Magento\Catalog\Model\Product::addOption
253 * @covers \Magento\Catalog\Model\Product::getOptionById
254 * @covers \Magento\Catalog\Model\Product::getOptions
256 public function testOptionApi()
257 {
258 $this->assertEquals([], $this->_model->getOptions());
260 $optionId = uniqid();
Renderer.php (https://github.com/alexandresalome/Magento.git) PHP · 262 lines
1 <?php
2 /**
3 * Magento
8 * that is bundled with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://opensource.org/licenses/osl-3.0.php
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
22 * @package Mage_XmlConnect
23 * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25 */
46 $productXmlObj->addCustomChild('name', $this->escapeHtml($this->getProductName()));
48 if ($_options = $this->getOptionList()) {
49 $optionsXmlObj = $productXmlObj->addChild('options');
50 foreach ($_options as $_option) {
sfValidatorDate.class.php (https://github.com/yuya-takeyama/symfony-hackathon-20110924.git) PHP · 261 lines
1 <?php
3 /*
15 * @subpackage validator
16 * @author Fabien Potencier <fabien.potencier@symfony-project.com>
17 * @version SVN: $Id: sfValidatorDate.class.php 28959 2010-04-01 14:10:24Z fabien $
18 */
19 class sfValidatorDate extends sfValidatorBase
72 if (!preg_match($regex, $value, $match))
73 {
74 throw new sfValidatorError($this, 'bad_format', array('value' => $value, 'date_format' => $this->getOption('date_format_error') ? $this->getOption('date_format_error') : $this->getOption('date_format')));
75 }
156 }
158 $format = $this->getOption('with_time') ? $this->getOption('datetime_output') : $this->getOption('date_output');
160 return isset($date) ? $date->format($format) : date($format, $cleanTime);
Config.php (https://github.com/ronseigel/agent-ohm.git) PHP · 318 lines
1 <?php
2 /**
3 * Magento
8 * that is bundled with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://opensource.org/licenses/osl-3.0.php
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
22 * @package Mage_Catalog
23 * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25 */
177 */
178 $productTypeCollection = AO::getModel('catalog/product_type')
179 ->getOptionArray();
181 $this->_productTypesById = array();
AssociationTest.php (https://gitlab.com/vannh/portal_training) PHP · 329 lines
1 <?php
2 /**
3 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
4 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
5 *
9 *
10 * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
11 * @link http://cakephp.org CakePHP(tm) Project
12 * @since 3.0.0
13 * @license http://www.opensource.org/licenses/mit-license.php MIT License
324 $this->assertEquals(
325 ['this' => 'worked'],
326 $this->association->find()->getOptions()
327 );
328 }
CartSessionOption.php (https://github.com/seosamba/ecommerce.git) PHP · 325 lines
1 <?php
2 /**
3 *
77 * @return string
78 */
79 public function getOptionId()
80 {
81 return $this->_optionId;
96 * @return string
97 */
98 public function getOptionTitle()
99 {
100 return $this->_optionTitle;
115 * @return string
116 */
117 public function getOptionType()
118 {
119 return $this->_optionType;
DelayedDefinition_body.php (https://github.com/ChuguluGames/mediawiki-svn.git) PHP · 174 lines
1 <?php
3 class ExtDelayedDefinition {
54 global $wgParser;
56 $opt =& $wgParser->getOptions();
57 $orig = $opt->getIsSectionPreview();
146 // On section preview, kill extra markers. Assumed to be defined on the
147 // rest of the page.
148 if ( $parser->getOptions()->getIsSectionPreview() ) {
149 $regex = "/" . $this->mMarkerHead . "\d+" . $this->mMarkerTail . "/";
150 $text = preg_replace( $regex, "", $text );
JFormFieldCheckboxesTest.php (https://github.com/Hackwar/joomla-platform.git) PHP · 366 lines
1 <?php
2 /**
3 * @package Joomla.UnitTest
26 protected function setUp()
27 {
28 require_once JPATH_PLATFORM . '/joomla/form/fields/checkboxes.php';
29 }
38 public function testGetInputNoValueNoChecked()
39 {
40 $formFieldCheckboxes = $this->getMock('JFormFieldCheckboxes', array('getOptions'));
42 $option1 = new JObject;
50 $optionsReturn = array($option1, $option2);
51 $formFieldCheckboxes->expects($this->any())
52 ->method('getOptions')
53 ->will($this->returnValue($optionsReturn));
gtTestCase.php (https://gitlab.com/envieidoc/tomato) PHP · 230 lines
1 <?php
3 /**
99 public function fileOpening() {
100 $this->testCase[] = "--FILE--";
101 $this->testCase[] = "<?php";
102 $this->testCase = gtCodeSnippet::appendBlankLines(2, $this->testCase );
103 }
155 public function addSkipif() {
156 $this->testCase[] = "--SKIPIF--";
157 $this->testCase[] = "<?php";
158 if($this->optionalSections->hasSkipifKey()) {
159 $key = $this->optionalSections->getSkipifKey();
199 public function addClean() {
200 $this->testCase[] = "--CLEAN--";
201 $this->testCase[] = "<?php";
202 $this->testCase[] = "?>";
203 }
libipt_ECN.c (https://gitlab.com/envieidoc/tomato) C · 185 lines
RateRequest.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 114 lines
1 <?php
2 /**
3 * Copyright © 2016 Magento. All rights reserved.
98 *
99 * @method \Magento\Quote\Model\Quote\Address\RateRequest setOptionInsurance(boolean $value)
100 * @method boolean getOptionInsurance()
101 * @method \Magento\Quote\Model\Quote\Address\RateRequest setOptionHandling(float $flag)
102 * @method float getOptionHandling()
AbstractOptions.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 184 lines
1 <?php
2 /**
3 * Copyright © 2016 Magento. All rights reserved.
96 * @return \Magento\Catalog\Model\Product\Option
97 */
98 public function getOption()
99 {
100 return $this->_option;
106 public function getFormatedPrice()
107 {
108 if ($option = $this->getOption()) {
109 return $this->_formatPrice(
110 [
Bootstrap.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 168 lines
adsense.php (https://github.com/pjwiseman/joomla-cms.git) PHP · 419 lines
dashboard.php (https://gitlab.com/alexprowars/bitrix) PHP · 163 lines
1 <?php
2 namespace Bitrix\Report\VisualConstructor\Helper;
108 public static function getBoardModeIsDemo($boardKey)
109 {
110 $boardModes = \CUserOptions::GetOption('report_dashboard', 'IS_DEMO_MODE_MARKERS', array());
111 if (isset($boardModes[$boardKey]))
112 {
118 public static function setBoardModeIsDemo($boardKey, $mode)
119 {
120 $boardModes = \CUserOptions::GetOption('report_dashboard', 'IS_DEMO_MODE_MARKERS', array());
121 $boardModes[$boardKey] = $mode;
122 \CUserOptions::SetOption('report_dashboard', 'IS_DEMO_MODE_MARKERS', $boardModes);
FormInspectors.php (https://github.com/dextercowley/joomla-cms.git) PHP · 293 lines
BaseaMediaComponents.class.php (https://github.com/malacon/pprl.git) PHP · 160 lines
Range.php (https://bitbucket.org/pastor399/newcastleunifc.git) PHP · 170 lines
1 <?php
2 /*
3 * $Id: Range.php 48519 2012-02-03 23:18:52Z btowles $
26 * @package Doctrine
27 * @subpackage Pager
28 * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
29 * @version $Revision$
30 * @link www.doctrine-project.org
94 /**
95 * getOptions
96 *
97 * Returns the custom Doctrine_Pager_Range implementation options
99 * @return array Custom Doctrine_Pager_Range implementation options
100 */
101 public function getOptions()
102 {
103 return $this->_options;
FormErrors.php (https://bitbucket.org/jfrubiom/zendframework-1.x.git) PHP · 465 lines
1 <?php
2 /**
3 * Zend Framework
22 /** Zend_Form_Decorator_Abstract */
23 require_once 'Zend/Form/Decorator/Abstract.php';
25 /**
35 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
36 * @license http://framework.zend.com/license/new-bsd New BSD License
37 * @version $Id: FormErrors.php 24593 2012-01-05 20:35:02Z matthew $
38 */
39 class Zend_Form_Decorator_FormErrors extends Zend_Form_Decorator_Abstract
135 {
136 if (null === $this->_markupElementLabelStart) {
137 if (null === ($markupElementLabelStart = $this->getOption('markupElementLabelStart'))) {
138 $this->setMarkupElementLabelStart($this->_defaults['markupElementLabelStart']);
139 } else {
CakeAdapter.php (https://gitlab.com/vannh/portal_training) PHP · 586 lines
1 <?php
2 /**
3 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
7 *
8 * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
9 * @link http://cakephp.org CakePHP(tm) Project
10 * @license http://www.opensource.org/licenses/mit-license.php MIT License
82 * @return array
83 */
84 public function getOptions()
85 {
86 return $this->adapter->getOptions();
104 * @return mixed
105 */
106 public function getOption($name)
107 {
108 return $this->adapter->getOption($name);
component.php (https://gitlab.com/Rad1calDreamer/honey) PHP · 314 lines
ExceptionHandler.php (https://github.com/jtai/zf2.git) PHP · 155 lines
ConfigOptionsList.php (https://gitlab.com/axeltizon/magento-demopoweraccess) PHP · 360 lines
1 <?php
2 /**
3 * Copyright © 2016 Magento. All rights reserved.
20 * Deployment configuration options needed for Setup application
21 *
22 * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
23 */
24 class ConfigOptionsList implements ConfigOptionsListInterface
54 /**
55 * {@inheritdoc}
56 * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
57 */
58 public function getOptions()
EducationForm.php (https://gitlab.com/mnomansheikh/ampuz) PHP · 176 lines
1 <?php
2 namespace Education\Form;
40 'options' => array(
41 'label' => 'Company',
42 //'value_options' => $this->getOptionsForSelect(),
43 'value_options' => $Companies,
44 ),
55 'options' => array(
56 'label' => 'Country',
57 //'value_options' => $this->getOptionsForSelect(),
58 'value_options' => $Regions,
59 ),
69 'options' => array(
70 'label' => 'Country',
71 //'value_options' => $this->getOptionsForSelect(),
72 'value_options' => $Countries,
73 ),
music_genre_filter.php (https://github.com/ZenMagick/zc-base.git) PHP · 219 lines
1 <?php
2 /**
3 * music_genre_filter.php for index filters
11 * @todo Need to add/fine-tune ability to override or insert entry-points on a per-product-type basis
12 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
13 * @version $Id: music_genre_filter.php 15628 2010-03-07 01:21:55Z drbyte $
14 */
15 if (!defined('IS_ADMIN_FLAG')) {
198 order by m.music_genre_name";
199 }
200 $getoption_set = false;
201 $filterlist = $db->Execute($filterlist_sql);
202 $do_filter_list = false;
206 if (isset($_GET['music_genre_id']))
207 {
208 $getoption_set = true;
209 $get_option_variable = 'music_genre_id';
210 $options = array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES));
FormErrors.php (https://bitbucket.org/ksekar/campus.git) PHP · 465 lines
1 <?php
2 /**
3 * Zend Framework
22 /** Zend_Form_Decorator_Abstract */
23 require_once 'Zend/Form/Decorator/Abstract.php';
25 /**
35 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
36 * @license http://framework.zend.com/license/new-bsd New BSD License
37 * @version $Id: FormErrors.php 24594 2012-01-05 21:27:01Z matthew $
38 */
39 class Zend_Form_Decorator_FormErrors extends Zend_Form_Decorator_Abstract
135 {
136 if (null === $this->_markupElementLabelStart) {
137 if (null === ($markupElementLabelStart = $this->getOption('markupElementLabelStart'))) {
138 $this->setMarkupElementLabelStart($this->_defaults['markupElementLabelStart']);
139 } else {
pbliteserializer_test.html (https://github.com/illandril/box2dweb-closure.git) HTML · 267 lines
237 assertEquals(0, messageCopy.repeatedNestedEnumCount());
239 assertEquals(101, messageCopy.getOptionalInt32());
240 assertEquals('102', messageCopy.getOptionalInt64());
241 assertEquals(103, messageCopy.getOptionalUint32());
242 assertEquals('104', messageCopy.getOptionalUint64());
243 assertEquals(105, messageCopy.getOptionalSint32());
244 assertEquals('106', messageCopy.getOptionalSint64());
245 assertEquals(107, messageCopy.getOptionalFixed32());
246 assertEquals('108', messageCopy.getOptionalFixed64());
247 assertEquals(109, messageCopy.getOptionalSfixed32());
248 assertEquals('110', messageCopy.getOptionalSfixed64());
sfCommandManager.class.php (https://github.com/proyectoalba/alba.git) PHP · 381 lines
1 <?php
3 /*
15 * @subpackage command
16 * @author Fabien Potencier <fabien.potencier@symfony-project.com>
17 * @version SVN: $Id: sfCommandManager.class.php 17858 2009-05-01 21:22:50Z FabianLange $
18 */
19 class sfCommandManager
84 * @return sfCommandOptionSet A sfCommandOptionSet object
85 */
86 public function getOptionSet()
87 {
88 return $this->optionSet;
225 * @return array An array of option values
226 */
227 public function getOptionValues()
228 {
229 return $this->optionValues;
SelectionTest.php (https://gitlab.com/mohamed_hussein/prodt) PHP · 124 lines
1 <?php
3 namespace Drupal\Tests\field\Functional\EntityReference\Views;
90 // Enable the display of the 'type' field so we can test that the output
91 // does not contain only the entity label.
92 $fields = $view->displayHandlers->get('entity_reference_1')->getOption('fields');
93 $fields['type']['exclude'] = FALSE;
94 $view->displayHandlers->get('entity_reference_1')->setOption('fields', $fields);
RouteCollectionBuilder.php (https://gitlab.com/ealexis.t/trends) PHP · 372 lines
FormErrors.php (https://github.com/MontmereLimited/ZendFramework-v1.git) PHP · 465 lines
1 <?php
2 /**
3 * Zend Framework
22 /** Zend_Form_Decorator_Abstract */
23 // // // // // // // // require_once 'Zend/Form/Decorator/Abstract.php';
25 /**
35 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
36 * @license http://framework.zend.com/license/new-bsd New BSD License
37 * @version $Id: FormErrors.php 23853 2011-04-10 16:06:30Z ramon $
38 */
39 class Zend_Form_Decorator_FormErrors extends Zend_Form_Decorator_Abstract
135 {
136 if (null === $this->_markupElementLabelStart) {
137 if (null === ($markupElementLabelStart = $this->getOption('markupElementLabelStart'))) {
138 $this->setMarkupElementLabelStart($this->_defaults['markupElementLabelStart']);
139 } else {
RouteCollectionTest.php (https://github.com/societies/SOCIETIES-Platform.git) PHP · 291 lines
1 <?php
3 /*
16 use Symfony\Component\Config\Resource\FileResource;
18 class RouteCollectionTest extends \PHPUnit_Framework_TestCase
19 {
20 public function testRoute()
126 $this->assertEquals(
127 array('foo' => 'bar', 'compiler_class' => 'Symfony\\Component\\Routing\\RouteCompiler'),
128 $collection->get('foo')->getOptions(), '->addCollection() can add an option to all merged routes'
129 );
151 $this->assertEquals(
152 array('foo' => 'bar', 'compiler_class' => 'Symfony\\Component\\Routing\\RouteCompiler'),
153 $collection->get('foo')->getOptions(), '->addPrefix() adds an option to all routes'
154 );
155 $this->assertEquals(
Item.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 203 lines
1 <?php
2 /**
3 * Copyright © 2016 Magento. All rights reserved.
194 * @return \Magento\Catalog\Model\Product\Configuration\Item\Option\OptionInterface|null
195 */
196 public function getOptionBycode($code)
197 {
198 if ($this->getQuoteItem()) {
199 return $this->getQuoteItem()->getOptionBycode($code);
200 }
201 return null;
complete.php (https://gitlab.com/blueprintmrk/bladencountyrecords) PHP · 206 lines
1 <?php
2 require( 'common.php' );
111 return $m;
112 } else if ( preg_match( '#^:set #', $string ) ) {
113 foreach ( PHP_Shell_Options::getInstance()->getOptions() as $v ) {
114 $m[] = $v;
115 }
140 }
142 /* taken from http://de3.php.net/manual/en/reserved.php */
143 $m[] = 'abstract';
144 $m[] = 'and';
ItemTest.php (https://gitlab.com/crazybutterfly815/magento2) PHP · 155 lines
1 <?php
2 /**
3 * Copyright © 2016 Magento. All rights reserved.
7 namespace Magento\Customer\Test\Unit\Block\Adminhtml\Edit\Tab\View\Grid\Renderer;
9 class ItemTest extends \PHPUnit_Framework_TestCase
10 {
11 /** @var \PHPUnit_Framework_MockObject_MockObject */
52 $helper = $this->getMock(
53 \Magento\Bundle\Helper\Catalog\Product\Configuration::class,
54 ['getOptions'],
55 [],
56 '',
61 $helper
62 ->expects($this->once())
63 ->method('getOptions')
64 ->will($this->returnValue(null));
65 $escaper
sfDoctrineFormGeneratedTemplate.php (https://github.com/bheneka/gitta.git) PHP · 127 lines
18 <?php foreach ($this->getColumns() as $column): ?>
19 '<?php echo $column->getFieldName() ?>'<?php echo str_repeat(' ', $this->getColumnNameMaxLength() - strlen($column->getFieldName())) ?> => new <?php echo $this->getWidgetClassForColumn($column) ?>(<?php echo $this->getWidgetOptionsForColumn($column) ?>),
20 <?php endforeach; ?>
21 <?php foreach ($this->getManyToManyRelations() as $relation): ?>
22 '<?php echo $this->underscore($relation['alias']) ?>_list'<?php echo str_repeat(' ', $this->getColumnNameMaxLength() - strlen($this->underscore($relation['alias']).'_list')) ?> => new sfWidgetFormDoctrineChoice(array('multiple' => true, 'model' => '<?php echo $relation['table']->getOption('name') ?>')),
23 <?php endforeach; ?>
27 <?php foreach ($this->getColumns() as $column): ?>
28 '<?php echo $column->getFieldName() ?>'<?php echo str_repeat(' ', $this->getColumnNameMaxLength() - strlen($column->getFieldName())) ?> => new <?php echo $this->getValidatorClassForColumn($column) ?>(<?php echo $this->getValidatorOptionsForColumn($column) ?>),
29 <?php endforeach; ?>
30 <?php foreach ($this->getManyToManyRelations() as $relation): ?>
31 '<?php echo $this->underscore($relation['alias']) ?>_list'<?php echo str_repeat(' ', $this->getColumnNameMaxLength() - strlen($this->underscore($relation['alias']).'_list')) ?> => new sfValidatorDoctrineChoice(array('multiple' => true, 'model' => '<?php echo $relation['table']->getOption('name') ?>', 'required' => false)),
32 <?php endforeach; ?>
43 <?php else: ?>
44 new sfValidatorDoctrineUnique(array('model' => '<?php echo $this->table->getOption('name') ?>', 'column' => array('<?php echo implode("', '", $uniqueColumns[0]) ?>')))
45 <?php endif; ?>
ArgvInput.php (https://github.com/nicnocquee/PPION-Website.git) PHP · 255 lines
1 <?php
3 namespace Symfony\Component\Console\Input;
90 if (strlen($name) > 1) {
91 if ($this->definition->hasShortcut($name[0]) && $this->definition->getOptionForShortcut($name[0])->acceptValue()) {
92 // an option with a value (with no space)
93 $this->addShortOption($name[0], substr($name, 1));
115 }
117 $option = $this->definition->getOptionForShortcut($name[$i]);
118 if ($option->acceptValue()) {
119 $this->addLongOption($option->getName(), $i === $len - 1 ? null : substr($name, $i + 1));
172 }
174 $this->addLongOption($this->definition->getOptionForShortcut($shortcut)->getName(), $value);
175 }
Locale.php (https://bitbucket.org/jokusafet/magento2.git) PHP · 167 lines
1 <?php
2 /**
3 * Magento
8 * that is bundled with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://opensource.org/licenses/osl-3.0.php
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
22 * @package Mage_Install
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 */
104 ->setClass('required-entry')
105 ->setValue($this->getTimezone())
106 ->setOptions(Mage::app()->getLocale()->getOptionTimezones())
107 ->getHtml();
108 return $html;
Attribute.php (https://bitbucket.org/jokusafet/magento2.git) PHP · 152 lines
1 <?php
2 /**
3 * Magento
8 * that is bundled with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://opensource.org/licenses/osl-3.0.php
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
22 * @package Mage_Catalog
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 */
72 * @return string|bool
73 */
74 protected function _getOptionText($optionId)
75 {
76 return $this->getAttributeModel()->getFrontend()->getOption($optionId);
OctoberMirror.php (https://gitlab.com/gideonmarked/yovelife) PHP · 174 lines
ResolvedFormTypeTest.php (https://gitlab.com/Marwamimo/Crowdrise_Web) PHP · 360 lines
1 <?php
3 /*
21 * @author Bernhard Schussek <bschussek@gmail.com>
22 */
23 class ResolvedFormTypeTest extends \PHPUnit_Framework_TestCase
24 {
25 /**
26 * @var \PHPUnit_Framework_MockObject_MockObject
27 */
28 private $dispatcher;
30 /**
31 * @var \PHPUnit_Framework_MockObject_MockObject
32 */
33 private $factory;
sfCommandManager.class.php (https://github.com/makerlabs/Symfohub.git) PHP · 381 lines
1 <?php
3 /*
15 * @subpackage command
16 * @author Fabien Potencier <fabien.potencier@symfony-project.com>
17 * @version SVN: $Id: sfCommandManager.class.php 21908 2009-09-11 12:06:21Z fabien $
18 */
19 class sfCommandManager
84 * @return sfCommandOptionSet A sfCommandOptionSet object
85 */
86 public function getOptionSet()
87 {
88 return $this->optionSet;
225 * @return array An array of option values
226 */
227 public function getOptionValues()
228 {
229 return $this->optionValues;
ezsqldiff.php (https://github.com/GunioRobot/ezpublish.git) PHP · 225 lines
1 #!/usr/bin/env php
2 <?php
3 /**
4 * File containing the ezsqldiff.php script.
5 *
6 * @copyright Copyright (C) 1999-2011 eZ Systems AS. All rights reserved.
10 */
12 require 'autoload.php';
14 $cli = eZCLI::instance();
17 "and sets exit code based whether there is a difference or not\n" .
18 "\n" .
19 "ezsqldiff.php --type mysql --user=root stable32 stable33" ),
20 'use-session' => false,
21 'use-modules' => true,
Collection.php (https://bitbucket.org/acidel/buykoala.git) PHP · 197 lines
1 <?php
2 /**
3 * Magento
8 * that is bundled with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://opensource.org/licenses/osl-3.0.php
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
22 * @package Mage_Catalog
23 * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25 */
49 * @return Mage_Catalog_Model_Resource_Product_Option_Collection
50 */
51 public function getOptions($storeId)
52 {
53 $this->addPriceToResult($storeId)
InputDefinition.php (https://gitlab.com/guillaumev/alkarama) PHP · 460 lines
1 <?php
3 /*
183 public function getArgumentCount()
184 {
185 return $this->hasAnArrayArgument ? PHP_INT_MAX : count($this->arguments);
186 }
273 * @throws InvalidArgumentException When option given doesn't exist
274 */
275 public function getOption($name)
276 {
277 if (!$this->hasOption($name)) {
286 *
287 * This method can't be used to check if the user included the option when
288 * executing the command (use getOption() instead).
289 *
290 * @param string $name The InputOption name
OS_NS_unistd.h (https://gitlab.com/mohsencs/SunWellCore) C Header · 373 lines
libip6t_limit.c (https://github.com/MIPS/external-iptables.git) C · 195 lines
RouteListCommand.php (https://gitlab.com/mdabutaleb/bitm-laravel-1) PHP · 246 lines
Select.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 359 lines
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
332 if (is_array($optionSpec) && array_key_exists('options', $optionSpec)) {
333 foreach ($optionSpec['options'] as $nestedKey => $nestedOptionSpec) {
334 $values[] = $this->getOptionValue($nestedKey, $nestedOptionSpec);
335 }
336 continue;
337 }
339 $values[] = $this->getOptionValue($key, $optionSpec);
340 }
341 return $values;
342 }
344 protected function getOptionValue($key, $optionSpec)
345 {
346 return is_array($optionSpec) ? $optionSpec['value'] : $key;
package_test.pb.js
(https://code.google.com/p/plovr/)
JavaScript · 166 lines
✨ Summary
This JavaScript code defines a Protocol Buffer message type TestPackageTypes
for a Google Closure Library project. It extends the goog.proto2.Message
class and adds methods to access and manipulate its fields, including an optional integer field and another field of type proto2.TestAllTypes
. The code is generated from a .proto
file and provides a way to serialize and deserialize messages in this format.
This JavaScript code defines a Protocol Buffer message type TestPackageTypes
for a Google Closure Library project. It extends the goog.proto2.Message
class and adds methods to access and manipulate its fields, including an optional integer field and another field of type proto2.TestAllTypes
. The code is generated from a .proto
file and provides a way to serialize and deserialize messages in this format.
50 * @return {?number} The value.
51 */
52 someprotopackage.TestPackageTypes.prototype.getOptionalInt32 = function() {
53 return /** @type {?number} */ (this.get$Value(1));
54 };
59 * @return {number} The value.
60 */
61 someprotopackage.TestPackageTypes.prototype.getOptionalInt32OrDefault = function() {
62 return /** @type {number} */ (this.get$ValueOrDefault(1));
63 };
bannerclient.php (https://bitbucket.org/kraymitchell/fcd.git) PHP · 41 lines
1 <?php
2 /**
3 * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
9 JFormHelper::loadFieldClass('list');
11 require_once dirname(__FILE__) . '/../../helpers/banners.php';
13 /**
34 * @since 1.6
35 */
36 public function getOptions()
37 {
38 return BannersHelper::getClientOptions();
VcsChangeDetailsManager.java (https://bitbucket.org/nbargnesi/idea.git) Java · 365 lines
174 myPanel.enableToolbar(false);
175 myPanel.removeStatusBar();
176 DiffPanelOptions o = ((DiffPanelEx)myPanel).getOptions();
177 o.setRequestFocusOnNewContent(false);
178 }
217 myPanel.setContents(contents.get(0).getBefore(), contents.get(0).getAfter());
218 ((DiffPanelImpl)myPanel).getOptions().setRequestFocusOnNewContent(false);
220 final JPanel wholeWrapper = new JPanel(new BorderLayout());
SystemShellBuiltIn.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 732 lines
✨ Summary
This Java code defines a set of shell commands for a console plugin, including cd
, pwd
, pushd
, popd
, and others. It provides basic directory navigation functionality, allowing users to change directories, print their current working directory, and manage aliases and variables. The commands are designed to work within the context of a text editor or IDE, likely for a Java-based project.
This Java code defines a set of shell commands for a console plugin, including cd
, pwd
, pushd
, popd
, and others. It provides basic directory navigation functionality, allowing users to change directories, print their current working directory, and manage aliases and variables. The commands are designed to work within the context of a text editor or IDE, likely for a Java-based project.
ScriptingCore.cpp (https://bitbucket.org/Tsiannian/cocos2d-x.git) C++ · 882 lines
install-templates-xcode.sh (https://bitbucket.org/Tsiannian/cocos2d-x.git) Shell · 247 lines
env.c
(https://bitbucket.org/freebsd/freebsd-head/)
C · 145 lines
✨ Summary
This C code implements a command-line utility called env
that allows users to manipulate environment variables and execute shell commands. It accepts various options, such as setting verbosity level, clearing environment variables, and specifying alternative paths for utilities. The program then executes the specified command with the modified environment.
This C code implements a command-line utility called env
that allows users to manipulate environment variables and execute shell commands. It accepts various options, such as setting verbosity level, clearing environment variables, and specifying alternative paths for utilities. The program then executes the specified command with the modified environment.