query
stringlengths 7
5.25k
| document
stringlengths 15
1.06M
| metadata
dict | negatives
sequencelengths 3
101
| negative_scores
sequencelengths 3
101
| document_score
stringlengths 3
10
| document_rank
stringclasses 102
values |
---|---|---|---|---|---|---|
Gets the private 'security.firewall' shared service. | protected function getSecurity_FirewallService()
{
return $this->services['security.firewall'] = new \Symfony\Bundle\SecurityBundle\Debug\TraceableFirewallListener(new \Symfony\Bundle\SecurityBundle\Security\FirewallMap(new \Symfony\Component\DependencyInjection\ServiceLocator(array('security.firewall.map.context.api' => function () {
return ${($_ = isset($this->services['security.firewall.map.context.api']) ? $this->services['security.firewall.map.context.api'] : $this->load('getSecurity_Firewall_Map_Context_ApiService.php')) && false ?: '_'};
}, 'security.firewall.map.context.login' => function () {
return ${($_ = isset($this->services['security.firewall.map.context.login']) ? $this->services['security.firewall.map.context.login'] : $this->load('getSecurity_Firewall_Map_Context_LoginService.php')) && false ?: '_'};
})), new RewindableGenerator(function () {
yield 'security.firewall.map.context.login' => ${($_ = isset($this->services['security.request_matcher.yg2ff4m']) ? $this->services['security.request_matcher.yg2ff4m'] : $this->services['security.request_matcher.yg2ff4m'] = new \Symfony\Component\HttpFoundation\RequestMatcher('^/api/login')) && false ?: '_'};
yield 'security.firewall.map.context.api' => ${($_ = isset($this->services['security.request_matcher.x1icpav']) ? $this->services['security.request_matcher.x1icpav'] : $this->services['security.request_matcher.x1icpav'] = new \Symfony\Component\HttpFoundation\RequestMatcher('^/api')) && false ?: '_'};
}, 2)), ${($_ = isset($this->services['event_dispatcher']) ? $this->services['event_dispatcher'] : $this->getEventDispatcherService()) && false ?: '_'}, ${($_ = isset($this->services['security.logout_url_generator']) ? $this->services['security.logout_url_generator'] : $this->getSecurity_LogoutUrlGeneratorService()) && false ?: '_'});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getSecurity_FirewallService()\n {\n return $this->services['security.firewall'] = new \\Symfony\\Component\\Security\\Http\\Firewall(new \\Symfony\\Bundle\\SecurityBundle\\Security\\FirewallMap($this, array('security.firewall.map.context.dev' => new \\Symfony\\Component\\HttpFoundation\\RequestMatcher('^/(_(profiler|wdt)|css|images|js)/'), 'security.firewall.map.context.main' => new \\Symfony\\Component\\HttpFoundation\\RequestMatcher('^/'))), $this->get('event_dispatcher'));\n }",
"protected function getSecurity_Firewall_Map_Context_MainService()\n {\n $a = $this->get('monolog.logger.security', ContainerInterface::NULL_ON_INVALID_REFERENCE);\n $b = $this->get('security.token_storage');\n $c = ${($_ = isset($this->services['fos_user.user_provider.username']) ? $this->services['fos_user.user_provider.username'] : $this->getFosUser_UserProvider_UsernameService()) && false ?: '_'};\n $d = $this->get('event_dispatcher', ContainerInterface::NULL_ON_INVALID_REFERENCE);\n $e = ${($_ = isset($this->services['security.authentication.trust_resolver']) ? $this->services['security.authentication.trust_resolver'] : $this->getSecurity_Authentication_TrustResolverService()) && false ?: '_'};\n $f = $this->get('router', ContainerInterface::NULL_ON_INVALID_REFERENCE);\n $g = $this->get('http_kernel');\n $h = ${($_ = isset($this->services['security.authentication.manager']) ? $this->services['security.authentication.manager'] : $this->getSecurity_Authentication_ManagerService()) && false ?: '_'};\n $i = ${($_ = isset($this->services['security.access.decision_manager']) ? $this->services['security.access.decision_manager'] : $this->getSecurity_Access_DecisionManagerService()) && false ?: '_'};\n\n $j = new \\Symfony\\Component\\HttpFoundation\\RequestMatcher('^/login');\n\n $k = new \\Symfony\\Component\\HttpFoundation\\RequestMatcher('^/victoire-dcms');\n\n $l = new \\Symfony\\Component\\Security\\Http\\AccessMap();\n $l->add($j, array(0 => 'IS_AUTHENTICATED_ANONYMOUSLY'), NULL);\n $l->add($k, array(0 => 'ROLE_VICTOIRE'));\n\n $m = new \\Symfony\\Component\\Security\\Http\\HttpUtils($f, $f);\n\n $n = new \\Symfony\\Component\\Security\\Http\\Firewall\\LogoutListener($b, $m, new \\Symfony\\Component\\Security\\Http\\Logout\\DefaultLogoutSuccessHandler($m, '/'), array('csrf_parameter' => '_csrf_token', 'csrf_token_id' => 'logout', 'logout_path' => '/logout'));\n $n->addHandler(new \\Symfony\\Component\\Security\\Http\\Logout\\SessionLogoutHandler());\n\n $o = new \\Symfony\\Component\\Security\\Http\\Authentication\\DefaultAuthenticationSuccessHandler($m, array());\n $o->setOptions(array('default_target_path' => '/', 'always_use_default_target_path' => false, 'login_path' => '/login', 'target_path_parameter' => '_target_path', 'use_referer' => false));\n $o->setProviderKey('main');\n\n $p = new \\Symfony\\Component\\Security\\Http\\Authentication\\DefaultAuthenticationFailureHandler($g, $m, array(), $a);\n $p->setOptions(array('failure_path' => '/login', 'login_path' => '/login', 'failure_forward' => false, 'failure_path_parameter' => '_failure_path'));\n\n return $this->services['security.firewall.map.context.main'] = new \\Symfony\\Bundle\\SecurityBundle\\Security\\FirewallContext(array(0 => new \\Symfony\\Component\\Security\\Http\\Firewall\\ChannelListener($l, new \\Symfony\\Component\\Security\\Http\\EntryPoint\\RetryAuthenticationEntryPoint(80, 443), $a), 1 => new \\Symfony\\Component\\Security\\Http\\Firewall\\ContextListener($b, array(0 => $c), 'main', $a, $d, $e), 2 => $n, 3 => new \\Symfony\\Component\\Security\\Http\\Firewall\\UsernamePasswordFormAuthenticationListener($b, $h, ${($_ = isset($this->services['security.authentication.session_strategy']) ? $this->services['security.authentication.session_strategy'] : $this->getSecurity_Authentication_SessionStrategyService()) && false ?: '_'}, $m, 'main', $o, $p, array('check_path' => '/login_check', 'use_forward' => false, 'require_previous_session' => true, 'username_parameter' => '_username', 'password_parameter' => '_password', 'csrf_parameter' => '_csrf_token', 'csrf_token_id' => 'authenticate', 'post_only' => true), $a, $d, $this->get('security.csrf.token_manager')), 4 => new \\Symfony\\Component\\Security\\Http\\Firewall\\AnonymousAuthenticationListener($b, '594831ac756863.97507592', $a, $h), 5 => new \\Symfony\\Component\\Security\\Http\\Firewall\\SwitchUserListener($b, $c, ${($_ = isset($this->services['security.user_checker']) ? $this->services['security.user_checker'] : $this->getSecurity_UserCheckerService()) && false ?: '_'}, 'main', $i, $a, '_switch_user', 'ROLE_ALLOWED_TO_SWITCH', $d), 6 => new \\Symfony\\Component\\Security\\Http\\Firewall\\AccessListener($b, $i, $l, $h)), new \\Symfony\\Component\\Security\\Http\\Firewall\\ExceptionListener($b, $e, $m, 'main', new \\Symfony\\Component\\Security\\Http\\EntryPoint\\FormAuthenticationEntryPoint($g, $m, '/login', false), NULL, NULL, $a, false), new \\Symfony\\Bundle\\SecurityBundle\\Security\\FirewallConfig('main', 'security.user_checker', 'security.request_matcher.a64d671f18e5575531d76c1d1154fdc4476cb8a79c02ed7a3469178c6d7b96b5ed4e60db', true, false, 'fos_user.user_provider.username', 'main', 'security.authentication.form_entry_point.main', NULL, NULL, array(0 => 'logout', 1 => 'switch_user', 2 => 'form_login', 3 => 'anonymous')));\n }",
"public function getFirewallName(): string;",
"private function registerFirewall()\n {\n $this->app->singleton('firewall', function ($app) {\n $app['firewall.loaded'] = true;\n\n $this->firewall = new Firewall(\n $app['firewall.config'],\n $app['firewall.datarepository'],\n $app['request'],\n $attackBlocker = $app['firewall.attackBlocker'],\n $app['firewall.messages']\n );\n\n $attackBlocker->setFirewall($this->firewall);\n\n return $this->firewall;\n });\n }",
"protected function getSensioFrameworkExtra_Security_ListenerService()\n {\n return $this->services['sensio_framework_extra.security.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\SecurityListener(NULL, new \\Sensio\\Bundle\\FrameworkExtraBundle\\Security\\ExpressionLanguage(), ${($_ = isset($this->services['security.authentication.trust_resolver']) ? $this->services['security.authentication.trust_resolver'] : $this->getSecurity_Authentication_TrustResolverService()) && false ?: '_'}, ${($_ = isset($this->services['security.role_hierarchy']) ? $this->services['security.role_hierarchy'] : $this->getSecurity_RoleHierarchyService()) && false ?: '_'}, $this->get('security.token_storage', ContainerInterface::NULL_ON_INVALID_REFERENCE), $this->get('security.authorization_checker', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"public function getSecurityHandler() {\n return $this->securityHandler;\n }",
"public function getFirewallConnection()\n {\n return new AccessRules($this->apiEmail, $this->apiKey);\n }",
"public function getSecurityProvider()\n {\n return $this->securityProvider;\n }",
"protected function getSecurity_Firewall_Map_Context_DevService()\n {\n return $this->services['security.firewall.map.context.dev'] = new \\Symfony\\Bundle\\SecurityBundle\\Security\\FirewallContext(array(), NULL, new \\Symfony\\Bundle\\SecurityBundle\\Security\\FirewallConfig('dev', 'security.user_checker', 'security.request_matcher.5314eeb91110adf24b9b678372bb11bbe00e8858c519c088bfb65f525181ad3bf573fd1d', false, '', '', '', '', '', '', array()));\n }",
"private function getFirewallModel()\n {\n if (!$firewallModel = $this->getConfig('firewall_model')) {\n throw new ConfigurationOptionNotAvailable('Config option \"firewall_model\" is not available, please publish/check your configuration.');\n }\n\n return new $firewallModel();\n }",
"public function getSecurity()\n {\n return $this->get('security');\n }",
"private static function getService()\n {\n return self::$app->get(static::SERVICE_NAME);\n }",
"public function get_service() {\n\n\t\treturn $this->provider_instance;\n\t}",
"protected function getSecurityManager() {\n return $this->dependencyInjector->get('ride\\\\library\\\\security\\\\SecurityManager');\n }",
"private function _getAuthService()\n {\n if(!isset($this->authservice)) {\n $this->authservice = \\Application\\Util\\ServicesUtil::getAuthService($this->getServiceLocator());\n }\n return $this->authservice;\n }",
"public function getService()\n {\n return null;\n }",
"protected function getMonolog_Logger_SecurityService()\n {\n $this->services['monolog.logger.security'] = $instance = new \\Symfony\\Bridge\\Monolog\\Logger('security');\n\n $instance->pushHandler($this->get('monolog.handler.console'));\n $instance->pushHandler($this->get('monolog.handler.main'));\n\n return $instance;\n }",
"protected function getDispatcherListener()\n {\n return $this->di->getShared('dispatcherListener');\n }",
"public function getService()\n {\n return $this->_service;\n }",
"protected function getTemplating_Helper_SecurityService()\n {\n return $this->services['templating.helper.security'] = new \\Symfony\\Bundle\\SecurityBundle\\Templating\\Helper\\SecurityHelper($this->get('security.authorization_checker', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"public function siteService() {\n return StatusBoard_SiteService::fromId($this->siteservice);\n }",
"protected function getWorkspaceService() {}",
"protected function getWorkspaceService() {}",
"public function getService() {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"protected function getFilesystemService()\n {\n return $this->services['filesystem'] = new \\phpbb\\filesystem\\filesystem();\n }",
"protected function getSecurity_AuthenticationUtilsService()\n {\n return $this->services['security.authentication_utils'] = new \\Symfony\\Component\\Security\\Http\\Authentication\\AuthenticationUtils($this->get('request_stack'));\n }",
"private function get_service_consumer() {\r\n global $USER;\r\n $usrprefs = get_field('usr_account_preference', 'value', 'usr', $USER->get('id'), 'field', 'linkedinprofile');\r\n $service = new StdClass();\r\n $service->ssl = true;\r\n $service->apiurl = 'https://api.linkedin.com/v1/';\r\n $service->oauthurl = 'https://www.linkedin.com/uas/oauth2/';\r\n $service->key = get_config_plugin('blocktype', 'linkedinprofile', 'apikey');\r\n $service->secret = get_config_plugin('blocktype', 'linkedinprofile', 'secretkey');\r\n $service->callback = get_config('wwwroot') . 'blocktype/linkedinprofile/callback.php';\r\n $service->usrprefs = (!empty($userprefs) ? unserialize($usrprefs) : null );\r\n return $service;\r\n }",
"public static function service() {\n return self::$app->serviceContainer;\n }",
"public function getService()\n\t{\n\t\treturn $this->_service;\n\t}",
"protected function getAdfsServer()\n {\n return config('services.Adfs.adfs_server');\n }",
"public function getService()\n {\n if (!$this->service) {\n /** @var \\OAuth\\ServiceFactory $serviceFactory */\n $serviceFactory = $this->app->make('oauth/factory/service');\n $this->service = $this->factory->createService($serviceFactory);\n }\n\n return $this->service;\n }",
"public function &getServiceConfig($serviceName) {\n $app =& Dataface_Application::getInstance();\n if (isset($app->_conf['oauth_'.$serviceName])) {\n return $app->_conf['oauth_'.$serviceName];\n }\n $null = null;\n return $null;\n }",
"public function getService()\n\t{\n\t\treturn $this->service;\n\t}",
"protected function getSecurity_AuthorizationCheckerService()\n {\n return $this->services['security.authorization_checker'] = new \\Symfony\\Component\\Security\\Core\\Authorization\\AuthorizationChecker($this->get('security.token_storage'), ${($_ = isset($this->services['security.authentication.manager']) ? $this->services['security.authentication.manager'] : $this->getSecurity_Authentication_ManagerService()) && false ?: '_'}, ${($_ = isset($this->services['security.access.decision_manager']) ? $this->services['security.access.decision_manager'] : $this->getSecurity_Access_DecisionManagerService()) && false ?: '_'}, false);\n }",
"protected function getSecurity_Authentication_ManagerService()\n {\n $this->services['security.authentication.manager'] = $instance = new \\Symfony\\Component\\Security\\Core\\Authentication\\AuthenticationProviderManager(array(0 => new \\Symfony\\Component\\Security\\Core\\Authentication\\Provider\\DaoAuthenticationProvider(${($_ = isset($this->services['fos_user.user_provider.username']) ? $this->services['fos_user.user_provider.username'] : $this->getFosUser_UserProvider_UsernameService()) && false ?: '_'}, ${($_ = isset($this->services['security.user_checker']) ? $this->services['security.user_checker'] : $this->getSecurity_UserCheckerService()) && false ?: '_'}, 'main', $this->get('security.encoder_factory'), true), 1 => new \\Symfony\\Component\\Security\\Core\\Authentication\\Provider\\AnonymousAuthenticationProvider('594831ac756863.97507592')), true);\n\n $instance->setEventDispatcher($this->get('event_dispatcher'));\n\n return $instance;\n }",
"protected function getService()\n {\n return $this->service;\n }",
"protected function getService()\n {\n return $this->service;\n }",
"public function service()\r\n {\r\n return $this->service;\r\n }",
"public function service() {\n return $this->service;\n }",
"function getService() {\n return $this->service;\n }",
"public function service()\n {\n return $this->service;\n }",
"static private function getWSDL() {\n\t\ttry {\n\t\t\t\n\t\t\tif (!isset($_SESSION['vcddb-wsdl'])) {\n\t\t\t\tthrow new Exception('No Service Endpoint has been specified');\n\t\t\t} else {\n\t\t\t\treturn $_SESSION['vcddb-wsdl'];\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception $ex) {\n\t\t\tthrow $ex;\n\t\t}\n\t}",
"public static function getShared()\r\n\t{\r\n\t\treturn self::$shared;\r\n\t}",
"public function getSecHandler() {}",
"public function get($project, $firewall, $optParams = array()) {\n $params = array('project' => $project, 'firewall' => $firewall);\n $params = array_merge($params, $optParams);\n $data = $this->__call('get', array($params));\n if ($this->useObjects()) {\n return new Google_Firewall($data);\n } else {\n return $data;\n }\n }",
"protected function getTokenService(){\n\t\tif ($this->token_service == null) {\n\t\t\t$this->token_service = new \\Wallee\\Sdk\\Service\\TokenService(\\WalleeHelper::instance($this->registry)->getApiClient());\n\t\t}\n\t\t\n\t\treturn $this->token_service;\n\t}",
"public function getFirewallEnabled()\n {\n if (array_key_exists(\"firewallEnabled\", $this->_propDict)) {\n if (is_a($this->_propDict[\"firewallEnabled\"], \"\\Microsoft\\Graph\\Model\\StateManagementSetting\") || is_null($this->_propDict[\"firewallEnabled\"])) {\n return $this->_propDict[\"firewallEnabled\"];\n } else {\n $this->_propDict[\"firewallEnabled\"] = new StateManagementSetting($this->_propDict[\"firewallEnabled\"]);\n return $this->_propDict[\"firewallEnabled\"];\n }\n }\n return null;\n }",
"private function getSharedCatalog()\n {\n if (!isset($this->sharedCatalog)) {\n $sharedCatalogId = (int)$this->request->getParam(SharedCatalogInterface::SHARED_CATALOG_ID_URL_PARAM);\n $this->sharedCatalog = $this->sharedCatalogRepository->get($sharedCatalogId);\n }\n\n return $this->sharedCatalog;\n }",
"protected function getAuth_Provider_LdapService()\n {\n return $this->services['auth.provider.ldap'] = new \\phpbb\\auth\\provider\\ldap(${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['dbal.conn']) ? $this->services['dbal.conn'] : ($this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this))) && false ?: '_'}, ${($_ = isset($this->services['language']) ? $this->services['language'] : $this->getLanguageService()) && false ?: '_'}, ${($_ = isset($this->services['user']) ? $this->services['user'] : $this->getUserService()) && false ?: '_'});\n }",
"function getFilesystemService() {\n\t// $this->app->make('filesystem');\n\t// - or -\n\t// app('filesystem')\n\t// - or -\n\t// App::make('filesystem');\n\t// - or -\n\treturn $this->app['filesystem'];\n}",
"public function getAppService()\n {\n return $this->getController()->getServiceLocator()->get('Application\\Service\\Service');\n }",
"public function getSharedManager();",
"public static function getInstance()\n {\n\t\tif (self::$instance == null) {\n\t\t\tself::$instance = new ServiceProvider();\n\t\t}\n\t\treturn self::$instance;\n\t}",
"function ldap_auth_get_server() {\n\t$settings = elgg_get_plugin_from_id('ldap_auth');\n\n\tstatic $server;\n\n\tif (!$server) {\n\t\ttry {\n\t\t\t$server = new LdapServer($settings);\n\t\t} catch (Exception $e) {\n\t\t\telgg_log($e->getMessage());\n\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn $server;\n}",
"public static function getInstance(){\n\t\tif( !is_object(self::$_instance) ) //or if( is_null(self::$_instance) ) or if( self::$_instance == null )\n\t\tself::$_instance = new Engine_Vault_Security();\n\t\treturn self::$_instance;\n\t}",
"public function getServer()\n\t{\n\t\tif (self::$_serverInstance === false)\n\t\t{\n\t\t\tself::$_serverInstance = new bdApi_OAuth2($this);\n\t\t}\n\t\t\n\t\treturn self::$_serverInstance;\n\t}",
"public function getSecureController() {\n\t\treturn $this->_secureController;\n\t}",
"protected function getShareByMailProvider() {\n\t\tif ($this->shareByMailProvider === null) {\n\t\t\t/*\n\t\t\t * Check if the app is enabled\n\t\t\t */\n\t\t\t$appManager = $this->serverContainer->getAppManager();\n\t\t\tif (!$appManager->isEnabledForUser('sharebymail')) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t$settingsManager = new SettingsManager($this->serverContainer->getConfig());\n\n\t\t\t$this->shareByMailProvider = new ShareByMailProvider(\n\t\t\t\t$this->serverContainer->getDatabaseConnection(),\n\t\t\t\t$this->serverContainer->getSecureRandom(),\n\t\t\t\t$this->serverContainer->getUserManager(),\n\t\t\t\t$this->serverContainer->getLazyRootFolder(),\n\t\t\t\t$this->serverContainer->getL10N('sharebymail'),\n\t\t\t\t$this->serverContainer->getLogger(),\n\t\t\t\t$this->serverContainer->getMailer(),\n\t\t\t\t$this->serverContainer->getURLGenerator(),\n\t\t\t\t$this->serverContainer->getActivityManager(),\n\t\t\t\t$settingsManager,\n\t\t\t\t$this->serverContainer->query(Defaults::class),\n\t\t\t\t$this->serverContainer->getHasher(),\n\t\t\t\t$this->serverContainer->get(IEventDispatcher::class)\n\t\t\t);\n\t\t}\n\n\t\treturn $this->shareByMailProvider;\n\t}",
"protected function getSessionListenerService()\n {\n return $this->services['session_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\SessionListener(new \\Symfony\\Component\\DependencyInjection\\ServiceLocator(array('session' => function () {\n return ${($_ = isset($this->services['session']) ? $this->services['session'] : $this->load('getSessionService.php')) && false ?: '_'};\n })));\n }",
"protected function getAuthService()\n {\n return $this->services['auth'] = new \\phpbb\\auth\\auth();\n }",
"protected function getSensioFrameworkExtra_Cache_ListenerService()\n {\n return $this->services['sensio_framework_extra.cache.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\HttpCacheListener();\n }",
"private function getLayoutZoneService()\n {\n if (null === $this->layoutZoneService) {\n $this->setLayoutZoneService($this->getServiceManager()->get('playgroundcms_layoutzone_service'));\n }\n\n return $this->layoutZoneService;\n }",
"public function getService()\n {\n return $this->getKey('Service');\n }",
"protected function getService()\n {\n return $this\n ->getLocator()->get('api')\n ->setUserCredentials(\n $this->getRequest()->server()->get('PHP_AUTH_USER', null),\n $this->getRequest()->server()->get('PHP_AUTH_PW', null)\n );\n }",
"private function getServiceFcm()\n {\n return $this->container->get('fcm');\n }",
"public function getService()\n {\n if (isset($this->data['ShippingService'])) {\n return $this->data['ShippingService'];\n } else {\n return false;\n }\n }",
"public static function inst()\n {\n if (!self::$inst) {\n self::$inst = new SecurityToken();\n }\n\n return self::$inst;\n }",
"public function getUpdater()\n {\n\t return new FirewallUpdater($this);\n }",
"private static function getSystemSecurityPolicyCached()\n {\n get_instance()->load->library('Cachedobjectmanager');\n\n $policy_name = '_system_security_policy';\n return get_instance()->cachedobjectmanager->get($policy_name, self::$cached_objects_collection_name, 3600 * 24,\n function () {\n get_instance()->load->library('SecurityPolicy');\n return get_instance()->securitypolicy->getSystemSecurityPolicy();\n }\n );\n }",
"public function getSocialShareLinkManager() {\n if (empty($this->socialShareLinkManager)) {\n $this->socialShareLinkManager = \\Drupal::service('social_share.link_manager');\n }\n\n return $this->socialShareLinkManager;\n }",
"protected function getRouter_ListenerService()\n {\n return $this->services['router.listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener(${($_ = isset($this->services['router']) ? $this->services['router'] : $this->getRouterService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : ($this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack())) && false ?: '_'});\n }",
"private static function getServiceEntry($service)\n {\n # Get the entry in the list of services\n global $wgEmbedVideoServiceList;\n return $wgEmbedVideoServiceList[$service];\n }",
"private function getSecurityModel() {\n if ($this->security === null) {\n $this->security = $this->getContext()\n ->getModel('Provider.CronksSecurity', 'Cronks', array(\n 'security_only' => true\n ));\n }\n \n return $this->security;\n }",
"public function getService(): ?string\n {\n return $this->service;\n }",
"static function getServiceList()\n {\n return session::get('ServerService');\n }",
"public function getService()\n {\n\n if (preg_match('/^2\\./', $this->getVersion())) {\n $service = 'get';\n } else {\n $service = 'objects';\n }\n\n return $service;\n\n }",
"public function getSecurityOpenshiftIo()\n {\n return Controllers\\SecurityOpenshiftIoController::getInstance();\n }",
"public function getService ()\n {\n if (null === $this->_service) {\n $this->setService('Default_Service_Spirit');\n }\n return $this->_service;\n }",
"public final function getSystemDoctrineService(): DoctrineService\n {\n return $this->systemDoctrineService;\n }",
"protected function getFilesystemService()\n {\n return $this->services['filesystem'] = new \\Symfony\\Component\\Filesystem\\Filesystem();\n }",
"function getFactory(){\n\treturn $_SESSION[ SESSION_NAME_SPACE ][ 'factory' ];\n}",
"public function getSharedSecret()\n {\n if (array_key_exists(\"sharedSecret\", $this->_propDict)) {\n return $this->_propDict[\"sharedSecret\"];\n } else {\n return null;\n }\n }",
"public function setFirewall($value)\n {\n return $this->set('Firewall', $value);\n }",
"public function getServiceManager ()\n {\n return $this->serviceManager;\n }",
"protected function getFosUser_Listener_AuthenticationService()\n {\n return $this->services['fos_user.listener.authentication'] = new \\FOS\\UserBundle\\EventListener\\AuthenticationListener($this->get('fos_user.security.login_manager'), 'main');\n }",
"public function setFirewall($value)\n {\n return $this->set('Firewall', $value);\n }",
"public function setFirewall($value)\n {\n return $this->set('Firewall', $value);\n }",
"protected function getAcl_PermissionsService()\n {\n return $this->services['acl.permissions'] = new \\phpbb\\permissions(${($_ = isset($this->services['dispatcher']) ? $this->services['dispatcher'] : $this->getDispatcherService()) && false ?: '_'}, ${($_ = isset($this->services['user']) ? $this->services['user'] : $this->getUserService()) && false ?: '_'});\n }",
"protected function federatedShareProvider() {\n\t\tif ($this->federatedProvider === null) {\n\t\t\t/*\n\t\t\t * Check if the app is enabled\n\t\t\t */\n\t\t\t$appManager = $this->serverContainer->getAppManager();\n\t\t\tif (!$appManager->isEnabledForUser('federatedfilesharing')) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t/*\n\t\t\t * TODO: add factory to federated sharing app\n\t\t\t */\n\t\t\t$l = $this->serverContainer->getL10N('federatedfilesharing');\n\t\t\t$addressHandler = new AddressHandler(\n\t\t\t\t$this->serverContainer->getURLGenerator(),\n\t\t\t\t$l,\n\t\t\t\t$this->serverContainer->getCloudIdManager()\n\t\t\t);\n\t\t\t$notifications = new Notifications(\n\t\t\t\t$addressHandler,\n\t\t\t\t$this->serverContainer->getHTTPClientService(),\n\t\t\t\t$this->serverContainer->query(\\OCP\\OCS\\IDiscoveryService::class),\n\t\t\t\t$this->serverContainer->getJobList(),\n\t\t\t\t\\OC::$server->getCloudFederationProviderManager(),\n\t\t\t\t\\OC::$server->getCloudFederationFactory(),\n\t\t\t\t$this->serverContainer->query(IEventDispatcher::class)\n\t\t\t);\n\t\t\t$tokenHandler = new TokenHandler(\n\t\t\t\t$this->serverContainer->getSecureRandom()\n\t\t\t);\n\n\t\t\t$this->federatedProvider = new FederatedShareProvider(\n\t\t\t\t$this->serverContainer->getDatabaseConnection(),\n\t\t\t\t$addressHandler,\n\t\t\t\t$notifications,\n\t\t\t\t$tokenHandler,\n\t\t\t\t$l,\n\t\t\t\t$this->serverContainer->getLogger(),\n\t\t\t\t$this->serverContainer->getLazyRootFolder(),\n\t\t\t\t$this->serverContainer->getConfig(),\n\t\t\t\t$this->serverContainer->getUserManager(),\n\t\t\t\t$this->serverContainer->getCloudIdManager(),\n\t\t\t\t$this->serverContainer->getGlobalScaleConfig(),\n\t\t\t\t$this->serverContainer->getCloudFederationProviderManager()\n\t\t\t);\n\t\t}\n\n\t\treturn $this->federatedProvider;\n\t}",
"protected function getHookFinderService()\n {\n return $this->services['hook_finder'] = new \\phpbb\\hook\\finder('./../', 'php', ${($_ = isset($this->services['cache.driver']) ? $this->services['cache.driver'] : ($this->services['cache.driver'] = new \\phpbb\\cache\\driver\\file())) && false ?: '_'});\n }",
"private function getRessourceService()\n {\n if (!$this->ressourceService) {\n $this->ressourceService = $this->getServiceManager()->get('playgroundcms_ressource_service');\n }\n\n return $this->ressourceService;\n }",
"public function getServiceManager()\n {\n return $this->sm;\n }",
"protected function _getUserService() {\n \tif(null === $this->userService) {\n \t\t$sm = $this->getServiceLocator();\n \t\t$this->userService = ServicesUtil::getUserUtil($sm);\n \t}\n \treturn $this->userService;\n }"
] | [
"0.7632931",
"0.6013259",
"0.57017845",
"0.57015216",
"0.56986797",
"0.56626725",
"0.5647969",
"0.55708706",
"0.54786897",
"0.5465613",
"0.53859884",
"0.5366292",
"0.53347784",
"0.5327251",
"0.5272802",
"0.51747155",
"0.51740646",
"0.5158551",
"0.5153504",
"0.51518106",
"0.51323074",
"0.51227593",
"0.51227593",
"0.50837564",
"0.5081046",
"0.5081046",
"0.5081046",
"0.5081046",
"0.5081046",
"0.5081046",
"0.5081046",
"0.5077599",
"0.5075242",
"0.50752205",
"0.5064166",
"0.50605273",
"0.5055033",
"0.5051437",
"0.50338864",
"0.50304615",
"0.5004428",
"0.5003622",
"0.50011194",
"0.50011194",
"0.49873793",
"0.49796283",
"0.49757478",
"0.49575943",
"0.49546975",
"0.49528006",
"0.49363634",
"0.49199817",
"0.49182856",
"0.49165678",
"0.48865625",
"0.48862544",
"0.48826733",
"0.48723292",
"0.48704517",
"0.48613468",
"0.48602238",
"0.48435017",
"0.48377863",
"0.48282024",
"0.48258704",
"0.4825133",
"0.48199004",
"0.48148823",
"0.48132375",
"0.47904855",
"0.47871485",
"0.47781676",
"0.47627228",
"0.47623056",
"0.47496834",
"0.4736064",
"0.47247052",
"0.4700651",
"0.46957374",
"0.46934327",
"0.4685312",
"0.46844915",
"0.4671981",
"0.46697187",
"0.4668273",
"0.46643594",
"0.46544385",
"0.46493205",
"0.4647695",
"0.46453035",
"0.46428114",
"0.46427882",
"0.4642559",
"0.4642559",
"0.4637539",
"0.4635072",
"0.46343416",
"0.46309337",
"0.46285325",
"0.46203902"
] | 0.7082073 | 1 |
Gets the private 'security.logout_url_generator' shared service. | protected function getSecurity_LogoutUrlGeneratorService()
{
return $this->services['security.logout_url_generator'] = new \Symfony\Component\Security\Http\Logout\LogoutUrlGenerator(${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->services['request_stack'] = new \Symfony\Component\HttpFoundation\RequestStack()) && false ?: '_'}, ${($_ = isset($this->services['router']) ? $this->services['router'] : $this->getRouterService()) && false ?: '_'}, ${($_ = isset($this->services['security.token_storage']) ? $this->services['security.token_storage'] : $this->services['security.token_storage'] = new \Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage()) && false ?: '_'});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getSecurity_LogoutUrlGeneratorService()\n {\n $this->services['security.logout_url_generator'] = $instance = new \\Symfony\\Component\\Security\\Http\\Logout\\LogoutUrlGenerator($this->get('request_stack', ContainerInterface::NULL_ON_INVALID_REFERENCE), $this->get('router', ContainerInterface::NULL_ON_INVALID_REFERENCE), $this->get('security.token_storage', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n\n $instance->registerListener('main', '/logout', 'logout', '_csrf_token', NULL);\n\n return $instance;\n }",
"protected function getTemplating_Helper_LogoutUrlService()\n {\n return $this->services['templating.helper.logout_url'] = new \\Symfony\\Bundle\\SecurityBundle\\Templating\\Helper\\LogoutUrlHelper(${($_ = isset($this->services['security.logout_url_generator']) ? $this->services['security.logout_url_generator'] : $this->getSecurity_LogoutUrlGeneratorService()) && false ?: '_'});\n }",
"public function getLogoutURL()\n {\n return Config::get('URL') . 'logout/';\n }",
"public function getLogoutUrl()\n {\n if (array_key_exists(\"logoutUrl\", $this->_propDict)) {\n return $this->_propDict[\"logoutUrl\"];\n } else {\n return null;\n }\n }",
"public function logout_url() \n\t{\n\t\treturn $this->logout_url = urldecode($this->fb->getLogoutUrl(array(\n\t\t\t'next' => $this->config->next,\n\t\t)));\n }",
"public function getLogoutURL(){\r\n\t\treturn $this->facebook_obj->getLogoutURL(array('next' => Config::$url));\r\n\t}",
"function get_logout_url() {\r\n $logout_url = ( '' != wpc_client_get_slug( 'login_page_id' ) ) ? add_query_arg( array( 'logout' => 'true' ), wpc_client_get_slug( 'login_page_id' ) ) : wp_logout_url();\r\n return $logout_url;\r\n }",
"public static function GetLogoutURL()\n\t{\n\t\tinclude 'config.php';\n\t\t\n\t\t$params = array();\n\t\t$params['next'] = $facebookSettings['logoutRedirect'];\n\t\t\n\t\treturn self::GetFB()->getLogoutUrl($params);\n\t}",
"public function get_log_out_URL(){\n\t\tif(isset($_SESSION[FB_ACCESS_TOKEN]))\n\t\t\treturn $this->facebookLogin->get_Facebook_Logout_URL();\n\t\telse\n\t\t\treturn LOGOUT_URL;\n\t}",
"public static function getServerLogoutURL() \n\t{\n\t\tacPhpCas::setReporting();\n\t\treturn phpCAS::getServerLogoutURL();\t\t\n\t}",
"function b2c_get_logout_endpoint() {\n\n\t// If no empty policy provided then do nothing;\n\tif ( empty( B2C_Settings::$subscriber_policy ) ) {\n\t\treturn false;\n\t}\n\n\ttry {\n\t\t$signout_endpoint_handler = new B2C_Endpoint_Handler( B2C_Settings::$subscriber_policy );\n\t\treturn $signout_endpoint_handler->get_end_session_endpoint();\n\t} catch ( Exception $e ) {\n\t\techo $e->getMessage();\n\t}\n}",
"public static function getLogoutPage() {\r\n return self::LOGOUT_PAGE;\r\n }",
"public function getLinkLogout($format = UrlGeneratorInterface::RELATIVE_PATH)\n {\n return $this->generator->generate('authenticationLogout', [], $format);\n }",
"public function getUrlGenerator(): UrlGenerator|null;",
"function wp_logout_url($redirect = '')\n {\n }",
"function cover_logout_url($next_url=null) {\n return _cover_session_url(COVER_LOGOUT_URL, $next_url);\n}",
"public function getUrlGenerator() {\n\t\tif ($this->urlGenerator === null) {\n\t\t\t$discovery = $this->getResourceDiscovery();\n\t\t\t$this->urlGenerator = $this->getPuliFactory()->createUrlGenerator($discovery);\n\t\t}\n\n\t\treturn $this->urlGenerator;\n\t}",
"function logout_url()\n{\n // Add a logout query string parameter\n $params = $_GET;\n $params['logout'] = '';\n\n // Add logout param to current page URL.\n $logout_url = htmlspecialchars($_SERVER['PHP_SELF']) . '?' . http_build_query($params);\n\n return $logout_url;\n}",
"public function getLogoutRedirect()\n {\n return $this->_protocol->getLogoutRedirect();\n }",
"static function logoutLink() {\n return ( \"<td>\" . self::genericLink(\"reg=deact\",l(\"Log out\")).\"</td>\" );\n }",
"public function getLogout()\n {\n $this->auth->logout();\n return redirect(property_exists($this, 'redirectAfterLogout') ? $this->redirectAfterLogout : '/');\n }",
"public function setLogoutUrl($val)\n {\n $this->_propDict[\"logoutUrl\"] = $val;\n return $this;\n }",
"protected function getLoginUrl(): string\n {\n return $this->urlGenerator->generate(self::LOGIN_ROUTE);\n }",
"public function getLogoutUrl($params = array()) {\r\n\t\t$params = array_merge ( array ('access_token' => $this->get_access_token (), 'next' => $this->getCurrentUrl () ), $params );\r\n\t\treturn self::$BD_OAUTH2_ENDPOINTS ['logout'] . '?' . http_build_query ( $params, '', '&' );\r\n\t}",
"public function &setExternalLogoutUrl($value);",
"public function getLogoutLinkXpath()\n {\n return '//a[@class=\"link-logout\"]';\n }",
"public function getLogoutLinkXpath()\n {\n return '//a[@class=\"link-logout\"]';\n }",
"function umnshib_buildLogoutURL(array $options = array())\n{\n $shib = new BasicAuthenticator();\n return $shib->buildLogoutURL($options);\n}",
"public function getDefaultUrlGenerator(): UrlGenerator|null;",
"public function getLogout()\n {\n return $this->logout();\n }",
"public function getLogout()\n {\n \\Session::flush();\n \n Auth::logout();\n \n return redirect(property_exists($this, 'redirectAfterLogout') ? $this->redirectAfterLogout : '/');\n }",
"function get_dologout()\n {\n // If not logged in then this does nothing\n $this->auth->logout();\n\n return \"see:/\";\n }",
"static public function disconnect_url() {\n\t\treturn Controller::join_links(\"facebook\", \"disconnect\");\n\t}",
"public function getLogoutUrl( $params=array() ) \n {\n $session = $this->getSession();\n return $this->getUrl(\n 'www',\n 'logout.php',\n array_merge( array(\n 'api_key' => $this->getAppId(),\n 'next' => URL_PUBLIC . 'logout/',\n 'session_key' => $session['session_key'],\n ), $params)\n );\n }",
"public function getLogout()\n {\n $this->auth->logout();\n\t\t\n $intendedUrl = Session::get('url.intended');\n\t\tSession::forget('url.intended');\n\t\treturn redirect($intendedUrl);\n }",
"public function getUnRegisterUrl()\n {\n return $this->UnRegisterUrl;\n }",
"protected function url()\n {\n if (! $this->url) {\n $this->url = Mockery::mock(UrlGenerator::class);\n }\n\n return $this->url;\n }",
"function generateSubTokenUrl($nextUrl = null)\n{\n $secure = false;\n $session = true;\n\n if (!$nextUrl) {\n $nextUrl = OPERATIONS_URL;\n }\n\n $url = Zend_Gdata_AuthSub::getAuthSubTokenUri($nextUrl, GDATA_SCOPE, $secure, $session);\n \n return $url;\n}",
"function getLoginLogoutUrlLinks() {\r\n $facebook = $this->facebook;\r\n $user = $this->user;\r\n if ($user) {\r\n $this->logInLogOutLink = $facebook->getLogoutUrl();\r\n echo ' <strong><em>You are not Connected.</em></strong>';\r\n } else {\r\n $this->logInLogOutLink = $facebook->getLoginUrl(\r\n array(\r\n 'scope' => 'email,offline_access,publish_stream,user_photos,offline_access',\r\n 'redirect_uri' => $pageURL\r\n )\r\n );\r\n echo \"<a href='$this->logInLogOutLink'>Facebook Login</a>\";\r\n }\r\n }",
"protected function getc9f84ddda9d00c1b7a3d422c26b92c3f7acb8604c9d7c3c5ca1e13e1367f8e4a(): \\Viserio\\Component\\Routing\\Generator\\UrlGenerator\n {\n return $this->services[\\Viserio\\Contract\\Routing\\UrlGenerator::class] = new \\Viserio\\Component\\Routing\\Generator\\UrlGenerator(($this->services[\\Viserio\\Contract\\Routing\\Router::class] ?? $this->get410eb27931e780eeccc23e52a6c17e0e6e2e1827d28f90c4254c8f4111788d4e())->getRoutes(), ($this->services[\\Psr\\Http\\Message\\ServerRequestInterface::class] ?? $this->get(\\Psr\\Http\\Message\\ServerRequestInterface::class)), ($this->services[\\Psr\\Http\\Message\\UriFactoryInterface::class] ?? $this->get(\\Psr\\Http\\Message\\UriFactoryInterface::class)));\n }",
"function loginLogoutLink(){\n\tif ( is_user_logged_in() ) {\n\t\t$link = \"<a href='/my-account/customer-logout'>Log Out</a>\";\n\t} else {\n\t\t$link = \"<a href='/my-account'>Log In</a>\";\n\t}\n\treturn $link;\n}",
"public function getURL()\n {\n return Config::get('URL') . 'auth/unl/';\n }",
"public function getTokenUrl();",
"public static function generateURL()\n {\n return $_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];\n }",
"public function getLogout() {\n \\Sentry::logout();\n return Redirect::route('admin.bejelentkezes');\n }",
"public static function logout()\n {\n return self::getInstance()->_logout();\n }",
"public function show_logoutLink($redirect_to = '', $output_method = 'echo')\n {\n return $this->call_method(\"show/logoutLink\",\n array('redirect_to' => $redirect_to,\n 'output_method' => $output_method,\n )\n );\n }",
"public function getLogout() {\n\t\t# Log out\n\t\tAuth::logout();\n\n\t\t# Send them to the homepage\n\t\treturn Redirect::to('/');\n\t}",
"abstract protected function getTokenUrl(): string;",
"public function getSessionCheckUrl()\n {\n $url = Maestrano::with($this->_preset)->sso()->getSessionCheckUrl($this->uid, $this->sessionToken);\n return $url;\n }",
"public function generate_url()\n {\n }",
"abstract protected function getTokenUrl();",
"public function getUnsubscribeUrl() : string\n\t{\n\t\t$utils = $this->getUtilsObj();\n\n\t\treturn $utils->getUnsubscribeUrl($this);\n\t}",
"public function get_logout()\n\t{\n\t\tAuth::logout();\n\t\treturn Redirect::route('home')->with('message', 'You are now logged out!'); \n\t}",
"public function getLogout()\n {\n Confide::logout();\n\n return Redirect::to('/');\n }",
"public function getAuthUrl();",
"public function getLogout() {\n\t\tAuth::logout();\n\t\treturn Redirect::intended('/');\n\t}",
"function listo_logout_redirect( $url ) {\n return home_url( '' );\n}",
"function fsl_gauth_getauthurl()\n\t{\n\t\n\t$gClient = new Google_Client();\n $gClient->setApplicationName('Login');\n $gClient->setClientId(option('clientId'));\n $gClient->setClientSecret(option('clientSecret'));\n $gClient->setRedirectUri(option('redirectURL')); \n\t//\t$gClient->setHd(option('hd')); \n $google_oauthV2 = new Google_Oauth2Service($gClient);\n $authUrl = $gClient->createAuthUrl();\n return $authUrl;\n}",
"public function getLogout()\n {\n \tAuth::logout();\n \n \treturn Redirect::route('auth.getLogin');\n }",
"public function getLogout(){\n Auth::logout();\n return redirect()->route('home-page');\n }",
"public static function logout();",
"public function getLogout()\n {\n \\Auth::logout();\n\n return redirect()->to('/');\n }",
"public function route_logout() {\n\t\t$core = self::$core;\n\t\t$retval = self::$ctrl->logout();\n\t\tif ($retval[0] === 0) {\n\t\t\t$core::send_cookie_with_opts($this->token_name, '', [\n\t\t\t\t'path' => '/',\n\t\t\t\t'expires' => 1,\n\t\t\t\t'httponly' => true,\n\t\t\t\t'samesite' => 'Lax',\n\t\t\t]);\n\t\t}\n\t\treturn $core::pj($retval);\n\t}",
"public function url()\n {\n return $this->factory->getUrl($this->handle);\n }",
"public function getURLLogin() {\r\n $this->initGoogleClient();\r\n $url = $this->client->createAuthUrl();\r\n Log::message(Language::getMessage('log', 'debug_google_get_url', array('url' => $url)), 2);\r\n return $url;\r\n }",
"public function getAuthUrl()\n\t{\n\t\treturn $this->createAuthUrl();\n\t}",
"public function getBaseRevokeTokenUrl()\n {\n return 'https://oauth.accounting.sage.com/revoke';\n }",
"protected function getTokenUrl()\n\t{\n\t\t$this->initConfig();\n\t\treturn $this->config['access_token_url'];\n\t}",
"public function getGeneratedUrl()\n {\n return $this->generated_url;\n }",
"public function getUrl()\n {\n if (!$this->url) {\n if (!$this->url = env('AUTH0_OAUTH_URL')) {\n throw new Exception(\"Auth0 OAuth URL not set\");\n }\n }\n\n return $this->url;\n }",
"public function getLogoutUrl(FacebookSession $session, $next)\n {\n if ($session->getAccessToken()->isAppSession()) {\n throw new FacebookSDKException(\n 'Cannot generate a Logout URL with an App Session.', 722\n );\n }\n $params = array(\n 'next' => $next,\n 'access_token' => $session->getToken()\n );\n return 'https://www.facebook.com/logout.php?' . http_build_query($params, null, '&');\n }",
"public function getSignOut()\n\t{\n\t\t$this->users->getSignOut(); \n\t}",
"static function getSsoUrlRoot(){\n $url = '';\n if( \\Audit::instance()->url(self::getEnvironmentData('CCP_SSO_URL')) ){\n $url = self::getEnvironmentData('CCP_SSO_URL');\n }else{\n $error = sprintf(self::ERROR_CCP_SSO_URL, __METHOD__);\n self::getSSOLogger()->write($error);\n \\Base::instance()->error(502, $error);\n }\n\n return $url;\n }",
"public static function getURL()\r\n {\r\n $url = 'https://accounts.google.com/o/oauth2/auth?client_id=' . self::$details['client_id'] . '&redirect_uri=' . self::$details['redirect'] . '&scope=https://www.google.com/m8/feeds/&response_type=code';\r\n return $url;\r\n }",
"public function getAuthUrl()\n {\n return $this->client->createAuthUrl();\n }",
"public function getLoginUrl() {\n return $this->client->createAuthUrl();\n }",
"public function getLoginUrl();",
"public function getHomeUrlWithoutScheme()\n {\n return preg_replace('#^https?://#', '', rtrim($this->url, '/'));\n }",
"public function get_revoke_url() {\n\n $url = new moodle_url('/repository/repository_callback.php');\n $url->param('callback', 'yes');\n $url->param('repo_id', $this->id);\n $url->param('revoke', 'yes');\n $url->param('reloadparentpage', true);\n $url->param('sesskey', sesskey());\n return '<a target=\"_blank\" href=\"'.$url->out(false).'\">'.get_string('revokeyourgoogleaccount', 'repository_googledrive').'</a>';\n }",
"public function generateLoginUrl(): string\n {\n // This is why we 'fake' the username to a uniqid, to use the test system's token storage.\n return sprintf(\n '%s/login/%s',\n $this->accountEndpoint,\n $this->generateToken(\"login\" . uniqid())\n );\n }",
"public function getLogout()\n {\n if (!Sentry::check())\n {\n // user is not logged in, why to logout again, hacker?\n return Redirect::to('/');\n }\n\n Sentry::logout();\n return Redirect::to('/');\n }",
"public function getInstanceUrl(): string\n {\n return $this->instanceUrl;\n }",
"protected function getTokenUrl()\n {\n return $this->baseUrl.'/oauth2.0/token';\n }",
"public function get_signout()\n\t{\n\t\tService\\Security::logout();\n\n\t\treturn Redirect::home();\n\t}",
"public function getLogout()\n {\n\n // If login correct\n Auth::logout();\n Session::flush();\n\n // Todo return something;\n }",
"public function getUrl(): string\n {\n return self::URL;\n }",
"public function getUrl()\n {\n return $this->createUrl();\n }",
"public function logout()\n {\n // fonction qui ne fait rien car c'est le composant de securité qui s'en occupe. Cette fonction me sert a créer une route logout pour le transmettre dans le security.yaml\n }",
"public static function logout() {\n // We want to log out\n //FIXME: ImbaAuthBase::writeAuthLog(\"Logging out (Redirecting)\", 2);\n\n if (empty($_POST['imbaSsoOpenIdLogoutReferer'])) {\n $targetUrl = ImbaSharedFunctions::getTrustRoot();\n } else {\n $targetUrl = $_POST['imbaSsoOpenIdLogoutReferer'];\n }\n\n ImbaAuthBase::killAndRedirect($targetUrl);\n exit;\n }",
"public function getLogout() {\n\t\tSentry::logout();\n\t\t\n\t\t//then, we return to the index route with a success message\n\t\treturn Redirect::to('/')\n\t\t\t\t->with('success','You\\'ve successfully signed out');\n\t}",
"public static function logoffURL($target = null)\n {\n $class = self::loadDelegationClass();\n \n return call_user_func($class.'::logoffURL', $target);\n }",
"public function generateUUID(): string\n {\n return $this->stringHelper->generateUUID($this->urlInterface->getBaseUrl());\n }",
"abstract public function logoutResponseProvider();",
"public function getLogOut() {\n\n\t\t// Call static logout method on Auth\n\t\tAuth::logout();\n\t\treturn Redirect::route('home');\n\t}",
"public function guestStyleUrlRoute() {\n return $this->app[\"config\"]->get(\"laravel-admin::guest_style_url_route\");\n }",
"public function provideUrl(): Generator\n {\n yield [''];\n yield ['/'];\n yield ['/products/123'];\n }",
"public function logout()\n {\n return $this->_user->logout('/inloggen');\n }",
"public function getUrl()\n {\n return rtrim(empty($this->_config['url']) ? self::URL : $this->_config['url'], '/') . '/';\n }",
"public function getLogout()\n {\n Auth::logout();\n return redirect('login');\n }"
] | [
"0.85819894",
"0.80964446",
"0.6951211",
"0.6837144",
"0.6588155",
"0.65787697",
"0.65088797",
"0.64163136",
"0.63358444",
"0.62621814",
"0.62448835",
"0.6154229",
"0.60733163",
"0.60431445",
"0.6020845",
"0.59701246",
"0.5965806",
"0.59387827",
"0.59384555",
"0.59226066",
"0.5855501",
"0.58269274",
"0.58243126",
"0.58214736",
"0.5763345",
"0.5744533",
"0.5744533",
"0.5744296",
"0.57268625",
"0.5724434",
"0.56154424",
"0.5541649",
"0.5540806",
"0.55135804",
"0.5508142",
"0.54936033",
"0.54899365",
"0.5453534",
"0.54514194",
"0.5420643",
"0.54167086",
"0.54059917",
"0.53996104",
"0.5399379",
"0.5380873",
"0.5346954",
"0.5333541",
"0.5330836",
"0.5317794",
"0.53135264",
"0.53002334",
"0.5292496",
"0.5270692",
"0.52526724",
"0.5235224",
"0.52296454",
"0.5224296",
"0.52177197",
"0.5187208",
"0.5184038",
"0.5182826",
"0.51665497",
"0.5164619",
"0.5157457",
"0.5146188",
"0.5144546",
"0.5142039",
"0.5132543",
"0.5129224",
"0.5129196",
"0.5109606",
"0.5102538",
"0.5092551",
"0.50910723",
"0.5075313",
"0.5070061",
"0.5069588",
"0.50642306",
"0.5063786",
"0.50633883",
"0.50630444",
"0.506045",
"0.5057936",
"0.5055292",
"0.5052776",
"0.50458205",
"0.50457793",
"0.50429064",
"0.5040021",
"0.5036135",
"0.50229377",
"0.50172347",
"0.50131124",
"0.5008713",
"0.5007139",
"0.5000647",
"0.4996279",
"0.49944988",
"0.49923193",
"0.4980216"
] | 0.87888914 | 0 |
Gets the private 'security.rememberme.response_listener' shared service. | protected function getSecurity_Rememberme_ResponseListenerService()
{
return $this->services['security.rememberme.response_listener'] = new \Symfony\Component\Security\Http\RememberMe\ResponseListener();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getResponseListenerService()\n {\n return $this->services['response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener('UTF-8');\n }",
"protected function getResponseListenerService()\n {\n return $this->services['response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener('UTF-8');\n }",
"protected function getSymfonyResponseListenerService()\n {\n return $this->services['symfony_response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener('UTF-8');\n }",
"protected function getSessionListenerService()\n {\n return $this->services['session_listener'] = new \\Symfony\\Bundle\\FrameworkBundle\\EventListener\\SessionListener($this);\n }",
"protected function getSessionListenerService()\n {\n return $this->services['session_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\SessionListener(new \\Symfony\\Component\\DependencyInjection\\ServiceLocator(array('session' => function () {\n return ${($_ = isset($this->services['session']) ? $this->services['session'] : $this->load('getSessionService.php')) && false ?: '_'};\n })));\n }",
"protected function getTranslatorListenerService()\n {\n return $this->services['translator_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\TranslatorListener(${($_ = isset($this->services['translator.default']) ? $this->services['translator.default'] : $this->getTranslator_DefaultService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack()) && false ?: '_'});\n }",
"public function getListener(/* ... */)\n {\n return $this->_listener;\n }",
"protected function getStreamedResponseListenerService()\n {\n return $this->services['streamed_response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\StreamedResponseListener();\n }",
"protected function getStreamedResponseListenerService()\n {\n return $this->services['streamed_response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\StreamedResponseListener();\n }",
"protected function getTranslatorListenerService()\n {\n return $this->services['translator_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\TranslatorListener($this->get('translator.default'), $this->get('request_stack'));\n }",
"function responseManager()\n {\n /** @var \\Phanda\\Contracts\\Http\\ResponseManager $responseManager */\n $responseManager = phanda()->create(\\Phanda\\Contracts\\Http\\ResponseManager::class);\n return $responseManager;\n }",
"protected function getSensioFrameworkExtra_Cache_ListenerService()\n {\n return $this->services['sensio_framework_extra.cache.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\HttpCacheListener();\n }",
"public function remember(ResponseInterface $response, AccessToken $token)\n {\n if (! ($token instanceof RememberAccessToken)) {\n trigger_error('Parameter $token of type AccessToken is deprecated in beta 16, must be instance of RememberAccessToken in beta 17', E_USER_DEPRECATED);\n\n $token->type = 'session_remember';\n $token->save();\n }\n\n return FigResponseCookies::set(\n $response,\n $this->cookie->make(self::COOKIE_NAME, $token->token, RememberAccessToken::rememberCookieLifeTime())\n );\n }",
"protected function getSession_SaveListenerService()\n {\n return $this->services['session.save_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\SaveSessionListener();\n }",
"protected function getSession_SaveListenerService()\n {\n return $this->services['session.save_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\SaveSessionListener();\n }",
"protected function getFosUser_Listener_ResettingService()\n {\n return $this->services['fos_user.listener.resetting'] = new \\FOS\\UserBundle\\EventListener\\ResettingListener($this->get('router'), 86400);\n }",
"public function hookManager()\n {\n return $this->hookManager;\n }",
"protected function getPhpbb_Viglink_ListenerService()\n {\n return $this->services['phpbb.viglink.listener'] = new \\phpbb\\viglink\\event\\listener(${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['template']) ? $this->services['template'] : $this->getTemplateService()) && false ?: '_'});\n }",
"public function listener() {\n\t\treturn $this->_runtime['listener'];\n\t}",
"public function onKernelResponse(ResponseEvent $event): void\n {\n if (!$event->isMainRequest()) {\n return;\n }\n\n $request = $event->getRequest();\n\n if (!$request->hasSession() || $request->attributes->get('_security_firewall_run') !== $this->sessionKey) {\n return;\n }\n\n $this->dispatcher?->removeListener(KernelEvents::RESPONSE, $this->onKernelResponse(...));\n $this->registered = false;\n $session = $request->getSession();\n $sessionId = $session->getId();\n $usageIndexValue = $session instanceof Session ? $usageIndexReference = &$session->getUsageIndex() : null;\n $token = $this->tokenStorage->getToken();\n\n if (!$this->trustResolver->isAuthenticated($token)) {\n if ($request->hasPreviousSession()) {\n $session->remove($this->sessionKey);\n }\n } else {\n $session->set($this->sessionKey, serialize($token));\n\n $this->logger?->debug('Stored the security token in the session.', ['key' => $this->sessionKey]);\n }\n\n if ($this->sessionTrackerEnabler && $session->getId() === $sessionId) {\n $usageIndexReference = $usageIndexValue;\n }\n }",
"protected function getLocaleListenerService()\n {\n return $this->services['locale_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener($this->get('request_stack'), 'en', $this->get('router', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"protected function getSensioFrameworkExtra_Security_ListenerService()\n {\n return $this->services['sensio_framework_extra.security.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\SecurityListener(NULL, new \\Sensio\\Bundle\\FrameworkExtraBundle\\Security\\ExpressionLanguage(), ${($_ = isset($this->services['security.authentication.trust_resolver']) ? $this->services['security.authentication.trust_resolver'] : $this->getSecurity_Authentication_TrustResolverService()) && false ?: '_'}, ${($_ = isset($this->services['security.role_hierarchy']) ? $this->services['security.role_hierarchy'] : $this->getSecurity_RoleHierarchyService()) && false ?: '_'}, $this->get('security.token_storage', ContainerInterface::NULL_ON_INVALID_REFERENCE), $this->get('security.authorization_checker', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"static function viaRemember()\n\t{\n\t\treturn self::$cookie;\n\t}",
"protected function getLocaleListenerService()\n {\n return $this->services['locale_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener(${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack()) && false ?: '_'}, 'en', ${($_ = isset($this->services['router']) ? $this->services['router'] : $this->getRouterService()) && false ?: '_'});\n }",
"private function processRememberDirective() {\n // if the user is not signed in yet\n if (!$this->isLoggedIn()) {\n // if there is currently no cookie for the 'remember me' feature\n if (!isset($_COOKIE[$this->rememberCookieName])) {\n // if an old cookie for that feature from versions v1.x.x to v6.x.x has been found\n if (isset($_COOKIE['auth_remember'])) {\n // use the value from that old cookie instead\n $_COOKIE[$this->rememberCookieName] = $_COOKIE['auth_remember'];\n }\n }\n\n // if a remember cookie is set\n if (isset($_COOKIE[$this->rememberCookieName])) {\n // assume the cookie and its contents to be invalid until proven otherwise\n $valid = false;\n\n // split the cookie's content into selector and token\n $parts = \\explode(self::COOKIE_CONTENT_SEPARATOR, $_COOKIE[$this->rememberCookieName], 2);\n\n // if both selector and token were found\n if (!empty($parts[0]) && !empty($parts[1])) {\n $rememberData = $this->CI->db\n ->query(\n 'SELECT a.user, a.token, a.expires, b.email, b.username, b.status, b.roles_mask, b.force_logout\n FROM ' . $this->makeTableName('users_remembered') . ' AS a\n JOIN ' . $this->makeTableName('users') . ' AS b ON a.user = b.id\n WHERE a.selector = ?',\n [ $parts[0] ]\n )\n ->row_array();\n\n if (!empty($rememberData)) {\n if ($rememberData['expires'] >= \\time()) {\n if (\\password_verify($parts[1], $rememberData['token'])) {\n // the cookie and its contents have now been proven to be valid\n $valid = true;\n\n $this->onLoginSuccessful($rememberData['user'], $rememberData['email'], $rememberData['username'], $rememberData['status'], $rememberData['roles_mask'], $rememberData['force_logout'], true);\n }\n }\n }\n }\n\n // if the cookie or its contents have been invalid\n if (!$valid) {\n // mark the cookie as such to prevent any further futile attempts\n $this->setRememberCookie('', '', \\time() + 60 * 60 * 24 * 365.25);\n }\n }\n }\n }",
"protected function registerResponseBindings()\n {\n $this->app->singleton(FailedPasswordConfirmationResponseContract::class, FailedPasswordConfirmationResponse::class);\n $this->app->singleton(FailedPasswordResetLinkRequestResponseContract::class, FailedPasswordResetLinkRequestResponse::class);\n $this->app->singleton(FailedPasswordResetResponseContract::class, FailedPasswordResetResponse::class);\n $this->app->singleton(FailedTwoFactorLoginResponseContract::class, FailedTwoFactorLoginResponse::class);\n $this->app->singleton(LockoutResponseContract::class, LockoutResponse::class);\n $this->app->singleton(LoginResponseContract::class, LoginResponse::class);\n $this->app->singleton(LogoutResponseContract::class, LogoutResponse::class);\n $this->app->singleton(PasswordConfirmedResponseContract::class, PasswordConfirmedResponse::class);\n $this->app->singleton(PasswordResetResponseContract::class, PasswordResetResponse::class);\n $this->app->singleton(PasswordUpdateResponseContract::class, PasswordUpdateResponse::class);\n $this->app->singleton(ProfileInformationUpdatedResponseContract::class, ProfileInformationUpdatedResponse::class);\n $this->app->singleton(RecoveryCodesGeneratedResponseContract::class, RecoveryCodesGeneratedResponse::class);\n $this->app->singleton(RegisterResponseContract::class, RegisterResponse::class);\n $this->app->singleton(SuccessfulPasswordResetLinkRequestResponseContract::class, SuccessfulPasswordResetLinkRequestResponse::class);\n $this->app->singleton(TwoFactorConfirmedResponseContract::class, TwoFactorConfirmedResponse::class);\n $this->app->singleton(TwoFactorDisabledResponseContract::class, TwoFactorDisabledResponse::class);\n $this->app->singleton(TwoFactorEnabledResponseContract::class, TwoFactorEnabledResponse::class);\n $this->app->singleton(TwoFactorLoginResponseContract::class, TwoFactorLoginResponse::class);\n $this->app->singleton(VerifyEmailResponseContract::class, VerifyEmailResponse::class);\n }",
"public function getRememberToken()\n {\n }",
"public function getRememberToken()\n {\n }",
"protected function getDispatcherListener()\n {\n return $this->di->getShared('dispatcherListener');\n }",
"public function getRememberToken()\n {\n return $this->remember_token;\n }",
"public function getRememberToken()\n {\n return $this->remember_token;\n }",
"public function getRememberToken()\n {\n return $this->remember_token;\n }",
"public function getRememberToken()\n {\n return $this->remember_token;\n }",
"public function getRememberToken()\n {\n return $this->remember_token;\n }",
"public function getRememberToken()\n {\n return $this->remember_token;\n }",
"public function getRememberToken()\n {\n return $this->remember_token;\n }",
"public function getRememberToken()\n\t{\n\t\treturn $this->remember_token;\n\t}",
"public function getRememberToken()\n\t{\n\t\treturn $this->remember_token;\n\t}",
"public function getRememberToken()\n\t{\n\t\treturn $this->remember_token;\n\t}",
"public function getRememberToken()\n\t{\n\t\treturn $this->remember_token;\n\t}",
"public function getRememberToken()\n\t{\n\t\treturn $this->remember_token;\n\t}",
"protected function getRouter_ListenerService()\n {\n return $this->services['router.listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener(${($_ = isset($this->services['router']) ? $this->services['router'] : $this->getRouterService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : ($this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack())) && false ?: '_'});\n }",
"protected function getValidateRequestListenerService()\n {\n return $this->services['validate_request_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener();\n }",
"protected function getValidateRequestListenerService()\n {\n return $this->services['validate_request_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener();\n }",
"public function getRememberToken() {\n return $this->remember_token;\n }",
"public function getRememberToken() {\n return $this->remember_token;\n }",
"public function getRememberToken()\n {\n // TODO: Implement getRememberToken() method.\n }",
"public function getRememberToken()\n {\n // TODO: Implement getRememberToken() method.\n }",
"public function getRememberToken()\n {\n // TODO: Implement getRememberToken() method.\n }",
"public function getCookieManager()\n {\n return $this->_cookieManager;\n }",
"public function listener($name) {\n\t\treturn $this->_loadListener($name);\n\t}",
"protected function getFosUser_Listener_FlashService()\n {\n return $this->services['fos_user.listener.flash'] = new \\FOS\\UserBundle\\EventListener\\FlashListener($this->get('session'), $this->get('translator.default'));\n }",
"function phpbb_user_session_handler()\n{\n\tglobal $phpbb_hook;\n\n\tif (!empty($phpbb_hook) && $phpbb_hook->call_hook(__FUNCTION__))\n\t{\n\t\tif ($phpbb_hook->hook_return(__FUNCTION__))\n\t\t{\n\t\t\treturn $phpbb_hook->hook_return_result(__FUNCTION__);\n\t\t}\n\t}\n\n\treturn;\n}",
"public function onResponse()\n {\n if ($this->event->getCode() != Phergie_Event_Response::RPL_NAMREPLY) {\n return;\n }\n\n $array = explode(' ', $this->event->getDescription());\n $chan = trim(strtolower($array[1]));\n $count = count($array);\n\n for ($i = 3; $i < $count; $i++) {\n\n if (empty($array[$i])) {\n continue;\n }\n\n $user = trim($array[$i]);\n\n $flag = self::REGULAR;\n if ($user[0] == '~') {\n $flag |= self::OWNER;\n } else if ($user[0] == '&') {\n $flag |= self::ADMIN;\n } else if ($user[0] == '@') {\n $flag |= self::OP;\n } else if ($user[0] == '%') {\n $flag |= self::HALFOP;\n } else if ($user[0] == '+') {\n $flag |= self::VOICE;\n }\n\n if ($flag != self::REGULAR) {\n $user = substr($user, 1);\n }\n\n $this->store[$chan][$user] = $flag;\n }\n }",
"public function getRememberToken()\n {\n return $this->rememberToken;\n }",
"public function handle_response () {\n // callback URL: https://{service}.e-com.plus/session/sso_login\n // call this function on route specified above\n if (isset($_GET['sso']) && isset($_GET['sig'])) {\n // get user object\n return $this->user_info($_GET['sso'], $_GET['sig']);\n } else {\n // invalid URL query string\n return null;\n }\n }",
"function get_response() {\n return $this->response;\n }",
"function getRememberMeCookieData()\n {\n // no 'remember me' cookie found\n if (!isset($_COOKIE['SGL_REMEMBER_ME'])) {\n return false;\n }\n $cookie = $_COOKIE['SGL_REMEMBER_ME'];\n list($username, $cookieValue) = @unserialize($cookie);\n // wrong cookie value was saved\n if (!$username || !$cookieValue) {\n return false;\n }\n // get UID by cookie value\n require_once SGL_MOD_DIR . '/user/classes/UserDAO.php';\n $da = &UserDAO::singleton();\n $uid = $da->getUserIdByCookie($username, $cookieValue);\n if ($uid) {\n $ret = array('uid' => $uid, 'cookieVal' => $cookieValue);\n } else {\n $ret = false;\n }\n return $ret;\n }",
"private function setResponse($msg){\n $_SESSION[self::RESPONSE_SESSION] = $msg;\n }",
"public static function getResponse(){\n $msg = isset($_SESSION[self::RESPONSE_SESSION]) ? $_SESSION[self::RESPONSE_SESSION] : \"\";\n unset($_SESSION[self::RESPONSE_SESSION]);\n return $msg;\n }",
"public function isRemembered() {\n if (isset($_SESSION) && isset($_SESSION[self::SESSION_FIELD_REMEMBERED])) {\n return $_SESSION[self::SESSION_FIELD_REMEMBERED];\n } else {\n return null;\n }\n }",
"public function supportsRememberMe()\n {\n }",
"protected function getFragment_ListenerService()\n {\n return $this->services['fragment.listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\FragmentListener($this->get('uri_signer'), '/_fragment');\n }",
"function &singleton()\n {\n if (!isset($GLOBALS['_PHP_PARSER_MSGSERVER_INSTANCE'])) {\n $GLOBALS['_PHP_PARSER_MSGSERVER_INSTANCE'] = &new PHP_Parser_MsgServer;\n }\n return $GLOBALS['_PHP_PARSER_MSGSERVER_INSTANCE'];\n }",
"public function getRememberToken(){\n return $this->token;\n }",
"protected function response(): ResponseInterface\n {\n return Context::get(ResponseInterface::class);\n }",
"protected function getPasswords_ManagerService()\n {\n return $this->services['passwords.manager'] = new \\phpbb\\passwords\\manager(${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['passwords.driver_collection']) ? $this->services['passwords.driver_collection'] : $this->getPasswords_DriverCollectionService()) && false ?: '_'}, ${($_ = isset($this->services['passwords.helper']) ? $this->services['passwords.helper'] : ($this->services['passwords.helper'] = new \\phpbb\\passwords\\helper())) && false ?: '_'}, $this->parameters['passwords.algorithms']);\n }",
"protected function getRouterListenerService()\n {\n return $this->services['router_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener($this->get('router'), $this->get('request_stack'), ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'}, $this->get('monolog.logger.request', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"public function & GetResponse ();",
"function listen($listener)\n{\n return XPSPL::instance()->listen($listener);\n}",
"public function &getResponse() : ResponseInterface\n {\n return $this->response;\n }",
"public static function viaRemember(){\n return \\Illuminate\\Auth\\Guard::viaRemember();\n }",
"private function manageCookieResponse(\n ServerRequestInterface $request,\n ResponseInterface $response,\n string $token\n ): ResponseInterface {\n $domain = $this->fromAllowedDomains($request);\n\n if ($domain !== null) {\n $response = $this->add30MinCookieToResponse($response, $token, $domain);\n }\n\n return $response;\n }",
"protected function _listener($name) {\n\t\treturn $this->_crud()->listener($name);\n\t}",
"public function getRememberToken()\n {\n return $this->_token;\n }",
"public static function response()\n {\n $container = Container::instance();\n if (!$container->has('response')) {\n $container->register('response', new Response());\n }\n return $container->get('response');\n }",
"protected function getNotificationManagerService()\n {\n return $this->services['notification_manager'] = new \\phpbb\\notification\\manager(${($_ = isset($this->services['notification.type_collection']) ? $this->services['notification.type_collection'] : $this->getNotification_TypeCollectionService()) && false ?: '_'}, ${($_ = isset($this->services['notification.method_collection']) ? $this->services['notification.method_collection'] : $this->getNotification_MethodCollectionService()) && false ?: '_'}, $this, ${($_ = isset($this->services['user_loader']) ? $this->services['user_loader'] : $this->getUserLoaderService()) && false ?: '_'}, ${($_ = isset($this->services['dispatcher']) ? $this->services['dispatcher'] : $this->getDispatcherService()) && false ?: '_'}, ${($_ = isset($this->services['dbal.conn']) ? $this->services['dbal.conn'] : ($this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this))) && false ?: '_'}, ${($_ = isset($this->services['cache']) ? $this->services['cache'] : $this->getCacheService()) && false ?: '_'}, ${($_ = isset($this->services['language']) ? $this->services['language'] : $this->getLanguageService()) && false ?: '_'}, ${($_ = isset($this->services['user']) ? $this->services['user'] : $this->getUserService()) && false ?: '_'}, 'phpbb_notification_types', 'phpbb_user_notifications');\n }",
"abstract public function logoutResponseProvider();",
"public function getResponse()\n {\n return $this->getService('response');\n }",
"public function registerResponseEvent(Response $response)\n {\n if (!$this->enabled) {\n return;\n }\n if (!$this->getConfigValue('response', 'bool')) {\n return;\n }\n\n $data = [];\n $statusCode = '0';\n\n if (method_exists($response, 'getStatusCode')) {\n $statusCode = $response->getStatusCode();\n }\n if ($length=$this->getConfigValue('response_content', 'int') && method_exists($response, 'getContent')) {\n $cnt = mb_check_encoding($response->getContent(), 'UTF-8') ?\n $response->getContent() : 'Content omitted, since it is not utf-8';\n $data['content'] = ($length==1) ? $cnt : substr($cnt, 0, $length);\n }\n if ($this->getConfigValue('response_content', 'bool')) {\n $data['header'] = $response->headers->all();\n }\n\n $request = $this->requestStack->getCurrentRequest();\n\n /** @var AuditTracking $audit */\n $audit = new $this->documentName();\n $audit->setAction('response');\n $audit->setType($statusCode);\n $audit->setData((object) $data);\n $audit->setLocation($request->attributes->get('selfLink'));\n $audit->setCreatedAt(new \\DateTime());\n $this->events[] = $audit;\n }",
"public function findRememberedUser() {\n\t\tif (session('user')) {\n\t\t\t//echo \"REMEMBERED SESSION!<br>\";die();\n\t\t\tif (session('reviewcycle')) {\n\t\t\t\t$this->loadUser(session('user'), null);\n\t\t\t}\n\t\t\t$this->loadUser(session('user'));\n\t\t} elseif (!$this->loggedin && cookie('rememberme')) {\n\t\t\t//echo \"REMEMBERED TOKEN!<br>\";\n\t\t\t$rememberme = cookie('rememberme');\n\t\t\t$id = substr($rememberme, strrpos($rememberme, ':') + 1);\n\t\t\t$token = $rememberme;\n\t\t\t$this->loadUser($id, $token);\n\t\t\tif ($this->loggedin) {\n\t\t\t\tsession('user', $id);\n\t\t\t}\n\t\t}\n\t}",
"protected function getPhpbb_Help_ManagerService()\n {\n return $this->services['phpbb.help.manager'] = new \\phpbb\\help\\manager(${($_ = isset($this->services['dispatcher']) ? $this->services['dispatcher'] : $this->getDispatcherService()) && false ?: '_'}, ${($_ = isset($this->services['language']) ? $this->services['language'] : $this->getLanguageService()) && false ?: '_'}, ${($_ = isset($this->services['template']) ? $this->services['template'] : $this->getTemplateService()) && false ?: '_'});\n }",
"public function get_response()\n {\n return $this->response; \n }",
"protected function getFosUser_Listener_AuthenticationService()\n {\n return $this->services['fos_user.listener.authentication'] = new \\FOS\\UserBundle\\EventListener\\AuthenticationListener($this->get('fos_user.security.login_manager'), 'main');\n }",
"public function getSessionStorage()\n {\n if (! $this->storage) {\n $this->storage = $this->getServiceLocator()\n ->get('Application\\Event\\MyAuthStorage');\n }\n return $this->storage;\n }",
"public function getRememberToken(): ?string;",
"public function onKernelResponse(FlashMessageResponseEvent $event)\n {\n if (HttpKernel::MASTER_REQUEST !== $event->getRequestType()) {\n return;\n }\n\n // Flash messages are stored in the session. If there is none, there\n // can't be any flash messages in it. $session->getFlashBag() would\n // create a session, we need to avoid that.\n if (!$this->session->isStarted()) {\n return;\n }\n\n $flashBag = $this->session->getFlashBag();\n $flashes = $flashBag->all();\n\n if (empty($flashes)) {\n return;\n }\n\n $response = $event->getResponse();\n\n $cookies = $response->headers->getCookies(ResponseHeaderBag::COOKIES_ARRAY);\n $host = (null === $this->options['host']) ? '' : $this->options['host'];\n if (isset($cookies[$host][$this->options['path']][$this->options['name']])) {\n $rawCookie = $cookies[$host][$this->options['path']][$this->options['name']]->getValue();\n $flashes = array_merge($flashes, json_decode($rawCookie));\n }\n\n $cookie = new Cookie(\n $this->options['name'],\n json_encode($flashes),\n 0,\n $this->options['path'],\n $this->options['host'],\n $this->options['secure'],\n false\n );\n\n $response->headers->setCookie($cookie);\n }",
"protected function getExt_ManagerService()\n {\n return $this->services['ext.manager'] = new \\phpbb\\extension\\manager($this, ${($_ = isset($this->services['dbal.conn']) ? $this->services['dbal.conn'] : ($this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this))) && false ?: '_'}, ${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['filesystem']) ? $this->services['filesystem'] : ($this->services['filesystem'] = new \\phpbb\\filesystem\\filesystem())) && false ?: '_'}, 'phpbb_ext', './../', 'php', ${($_ = isset($this->services['cache']) ? $this->services['cache'] : $this->getCacheService()) && false ?: '_'});\n }",
"public function get_response()\n\t{\n\t\treturn $this->response;\n\t}",
"public function get_response()\n\t{\n\t\treturn $this->response;\n\t}",
"public function getRememberToken()\n {\n return null;\n }",
"public function getRememberToken()\n {\n return null;\n }",
"public function getRememberToken()\n {\n return null;\n }",
"public static function getCurrentResponse() {\r\n if (self::$response == NULL) {\r\n self::$response = new self();\r\n }\r\n return self::$response;\r\n }",
"public function listen($listener);",
"public function CallBack($response);",
"protected function getRouterListenerService()\n {\n return $this->services['router_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener(${($_ = isset($this->services['router']) ? $this->services['router'] : $this->getRouterService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack()) && false ?: '_'}, ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'}, ${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->services['logger'] = new \\Symfony\\Component\\HttpKernel\\Log\\Logger()) && false ?: '_'}, $this->targetDirs[3], true);\n }",
"function last_response() {\n\t\treturn $this->last_response;\n\t}",
"protected function registerResponseFactory()\n {\n $this->app->singleton('api.http.response', static function ($app) {\n return new ResponseFactory($app[Factory::class]);\n });\n }"
] | [
"0.6281826",
"0.6281826",
"0.5595383",
"0.55235827",
"0.54999614",
"0.5439218",
"0.535383",
"0.53421855",
"0.53421855",
"0.53097177",
"0.5270848",
"0.52513707",
"0.521899",
"0.51879483",
"0.51879483",
"0.5129571",
"0.5090823",
"0.50110465",
"0.4958566",
"0.4956837",
"0.49239117",
"0.49147806",
"0.48685822",
"0.48246247",
"0.47986463",
"0.4786022",
"0.47810823",
"0.47810823",
"0.4778101",
"0.47182128",
"0.47182128",
"0.47182128",
"0.47182128",
"0.47182128",
"0.47182128",
"0.47182128",
"0.47128284",
"0.47128284",
"0.47128284",
"0.47128284",
"0.47128284",
"0.47103065",
"0.47028074",
"0.47028074",
"0.46938473",
"0.46938473",
"0.46884707",
"0.46884707",
"0.46884707",
"0.46830517",
"0.46747497",
"0.46700108",
"0.46659902",
"0.46652287",
"0.4663624",
"0.46635965",
"0.46413392",
"0.46347594",
"0.46330965",
"0.46323687",
"0.4631752",
"0.46210286",
"0.46090302",
"0.46017307",
"0.45950693",
"0.4590001",
"0.4589617",
"0.45724985",
"0.45699307",
"0.45649087",
"0.45601654",
"0.45300528",
"0.45298964",
"0.45249847",
"0.45112893",
"0.45066747",
"0.44971895",
"0.44947237",
"0.44834605",
"0.4478448",
"0.4458757",
"0.44486448",
"0.4444541",
"0.4443375",
"0.4414544",
"0.44056535",
"0.43990695",
"0.4396132",
"0.43914947",
"0.43914947",
"0.43863764",
"0.43863764",
"0.43863764",
"0.4384602",
"0.4381962",
"0.4378309",
"0.43775636",
"0.4363593",
"0.43580627"
] | 0.8791988 | 1 |
Gets the private 'session.save_listener' shared service. | protected function getSession_SaveListenerService()
{
return $this->services['session.save_listener'] = new \Symfony\Component\HttpKernel\EventListener\SaveSessionListener();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getSessionListenerService()\n {\n return $this->services['session_listener'] = new \\Symfony\\Bundle\\FrameworkBundle\\EventListener\\SessionListener($this);\n }",
"protected function getSessionListenerService()\n {\n return $this->services['session_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\SessionListener(new \\Symfony\\Component\\DependencyInjection\\ServiceLocator(array('session' => function () {\n return ${($_ = isset($this->services['session']) ? $this->services['session'] : $this->load('getSessionService.php')) && false ?: '_'};\n })));\n }",
"public function getListener(/* ... */)\n {\n return $this->_listener;\n }",
"protected function getSensioFrameworkExtra_Security_ListenerService()\n {\n return $this->services['sensio_framework_extra.security.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\SecurityListener(NULL, new \\Sensio\\Bundle\\FrameworkExtraBundle\\Security\\ExpressionLanguage(), ${($_ = isset($this->services['security.authentication.trust_resolver']) ? $this->services['security.authentication.trust_resolver'] : $this->getSecurity_Authentication_TrustResolverService()) && false ?: '_'}, ${($_ = isset($this->services['security.role_hierarchy']) ? $this->services['security.role_hierarchy'] : $this->getSecurity_RoleHierarchyService()) && false ?: '_'}, $this->get('security.token_storage', ContainerInterface::NULL_ON_INVALID_REFERENCE), $this->get('security.authorization_checker', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"public function getSessionStorage()\n {\n if (! $this->storage) {\n $this->storage = $this->getServiceLocator()\n ->get('Application\\Event\\MyAuthStorage');\n }\n return $this->storage;\n }",
"protected function getTranslatorListenerService()\n {\n return $this->services['translator_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\TranslatorListener(${($_ = isset($this->services['translator.default']) ? $this->services['translator.default'] : $this->getTranslator_DefaultService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack()) && false ?: '_'});\n }",
"public function listener() {\n\t\treturn $this->_runtime['listener'];\n\t}",
"protected function getTranslatorListenerService()\n {\n return $this->services['translator_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\TranslatorListener($this->get('translator.default'), $this->get('request_stack'));\n }",
"protected function getDispatcherListener()\n {\n return $this->di->getShared('dispatcherListener');\n }",
"protected function getSensioFrameworkExtra_Cache_ListenerService()\n {\n return $this->services['sensio_framework_extra.cache.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\HttpCacheListener();\n }",
"protected function getPhpbb_Viglink_ListenerService()\n {\n return $this->services['phpbb.viglink.listener'] = new \\phpbb\\viglink\\event\\listener(${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['template']) ? $this->services['template'] : $this->getTemplateService()) && false ?: '_'});\n }",
"protected function getSession_HandlerService()\n {\n return $this->services['session.handler'] = new \\Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NativeFileSessionHandler(($this->targetDirs[3].'/app/../var/sessions/prod'));\n }",
"public function getSessionStore()\n {\n return $this->session;\n }",
"protected function getSession_Storage_PhpBridgeService()\n {\n return $this->services['session.storage.php_bridge'] = new \\Symfony\\Component\\HttpFoundation\\Session\\Storage\\PhpBridgeSessionStorage($this->get('session.handler'), ${($_ = isset($this->services['session.storage.metadata_bag']) ? $this->services['session.storage.metadata_bag'] : $this->getSession_Storage_MetadataBagService()) && false ?: '_'});\n }",
"function saveSession() {}",
"protected function getCron_EventListenerService()\n {\n return $this->services['cron.event_listener'] = new \\phpbb\\cron\\event\\cron_runner_listener(${($_ = isset($this->services['cron.lock_db']) ? $this->services['cron.lock_db'] : $this->getCron_LockDbService()) && false ?: '_'}, ${($_ = isset($this->services['cron.manager']) ? $this->services['cron.manager'] : $this->getCron_ManagerService()) && false ?: '_'}, ${($_ = isset($this->services['request']) ? $this->services['request'] : ($this->services['request'] = new \\phpbb\\request\\request(NULL, true))) && false ?: '_'});\n }",
"protected function getSessionService()\n {\n return $this->services['session'] = new \\Symfony\\Component\\HttpFoundation\\Session\\Session($this->get('session.storage.native'), new \\Symfony\\Component\\HttpFoundation\\Session\\Attribute\\AttributeBag(), new \\Symfony\\Component\\HttpFoundation\\Session\\Flash\\FlashBag());\n }",
"public function setSaveHandler()\n {\n function open($savePath, $sessionName){ // open\n }\n function close(){ // close\n }\n function read($sessionId){ // read\n return $this->get($sessionId);\n }\n function write($sessionId, $data){ // write\n return $this->set($sessionId, $data);\n }\n function destroy($sessionId){ // destroy\n $this->delete($sessionId);\n }\n function gc($lifetime) { // gc\n }\n session_set_save_handler(\"open\", \"close\",\"read\",\"write\",\"destroy\",\"gc\");\n }",
"protected function getRouter_ListenerService()\n {\n return $this->services['router.listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener(${($_ = isset($this->services['router']) ? $this->services['router'] : $this->getRouterService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : ($this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack())) && false ?: '_'});\n }",
"protected function getVictoireCore_BackendMenuListenerService()\n {\n return $this->services['victoire_core.backend_menu_listener'] = new \\Victoire\\Bundle\\CoreBundle\\Listener\\BackendMenuListener($this->get('victoire_core.admin_menu_builder'));\n }",
"protected function getSwiftmailer_EmailSender_ListenerService()\n {\n return $this->services['swiftmailer.email_sender.listener'] = new \\Symfony\\Bundle\\SwiftmailerBundle\\EventListener\\EmailSenderListener($this, $this->get('logger', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"protected function getSessionStorage()\n {\n if (! $this->storage) {\n $this->storage = $this->getServiceLocator()\n ->get('cp_user_auth_storage');\n }\n\n return $this->storage;\n }",
"function listen($listener)\n{\n return XPSPL::instance()->listen($listener);\n}",
"public function listener(Listener $listener);",
"protected function getSecurity_Rememberme_ResponseListenerService()\n {\n return $this->services['security.rememberme.response_listener'] = new \\Symfony\\Component\\Security\\Http\\RememberMe\\ResponseListener();\n }",
"protected function getSecurity_Rememberme_ResponseListenerService()\n {\n return $this->services['security.rememberme.response_listener'] = new \\Symfony\\Component\\Security\\Http\\RememberMe\\ResponseListener();\n }",
"protected function getTroopersAlertifybundle_EventListenerService()\n {\n return $this->services['troopers_alertifybundle.event_listener'] = new \\Troopers\\AlertifyBundle\\EventListener\\AlertifyListener($this->get('session'), $this->get('troopers_alertifybundle.session_handler'));\n }",
"protected function getFosUser_Listener_FlashService()\n {\n return $this->services['fos_user.listener.flash'] = new \\FOS\\UserBundle\\EventListener\\FlashListener($this->get('session'), $this->get('translator.default'));\n }",
"protected function getLocaleListenerService()\n {\n return $this->services['locale_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener(${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack()) && false ?: '_'}, 'en', ${($_ = isset($this->services['router']) ? $this->services['router'] : $this->getRouterService()) && false ?: '_'});\n }",
"protected function getDebug_DebugHandlersListenerService()\n {\n return $this->services['debug.debug_handlers_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\DebugHandlersListener(NULL, ${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->services['logger'] = new \\Symfony\\Component\\HttpKernel\\Log\\Logger()) && false ?: '_'}, -1, -1, true, new \\Symfony\\Component\\HttpKernel\\Debug\\FileLinkFormatter(NULL), true);\n }",
"protected function getLocaleListenerService()\n {\n return $this->services['locale_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener($this->get('request_stack'), 'en', $this->get('router', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"protected function getFosUser_Listener_ResettingService()\n {\n return $this->services['fos_user.listener.resetting'] = new \\FOS\\UserBundle\\EventListener\\ResettingListener($this->get('router'), 86400);\n }",
"protected function getDebug_DebugHandlersListenerService()\n {\n return $this->services['debug.debug_handlers_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\DebugHandlersListener(NULL, $this->get('monolog.logger.php', ContainerInterface::NULL_ON_INVALID_REFERENCE), -1, 0, false, ${($_ = isset($this->services['debug.file_link_formatter']) ? $this->services['debug.file_link_formatter'] : $this->getDebug_FileLinkFormatterService()) && false ?: '_'}, false);\n }",
"public function saveSession(): void {\n\t\t$_SESSION[self::SESSION_NAME] = $this;\n\t}",
"protected function getFosUser_Security_InteractiveLoginListenerService()\n {\n return $this->services['fos_user.security.interactive_login_listener'] = new \\FOS\\UserBundle\\EventListener\\LastLoginListener($this->get('fos_user.user_manager'));\n }",
"protected function getRouterListenerService()\n {\n return $this->services['router_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener($this->get('router'), $this->get('request_stack'), ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'}, $this->get('monolog.logger.request', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"protected function getSession_Storage_NativeService()\n {\n return $this->services['session.storage.native'] = new \\Symfony\\Component\\HttpFoundation\\Session\\Storage\\NativeSessionStorage(array('cookie_httponly' => true, 'gc_probability' => 1), $this->get('session.handler'), ${($_ = isset($this->services['session.storage.metadata_bag']) ? $this->services['session.storage.metadata_bag'] : $this->getSession_Storage_MetadataBagService()) && false ?: '_'});\n }",
"protected function getRouterListenerService()\n {\n return $this->services['router_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener(${($_ = isset($this->services['router']) ? $this->services['router'] : $this->getRouterService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack()) && false ?: '_'}, ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'}, ${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->services['logger'] = new \\Symfony\\Component\\HttpKernel\\Log\\Logger()) && false ?: '_'}, $this->targetDirs[3], true);\n }",
"protected function getValidateRequestListenerService()\n {\n return $this->services['validate_request_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener();\n }",
"protected function getValidateRequestListenerService()\n {\n return $this->services['validate_request_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener();\n }",
"protected function getSensioFrameworkExtra_Converter_ListenerService()\n {\n return $this->services['sensio_framework_extra.converter.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\ParamConverterListener($this->get('sensio_framework_extra.converter.manager'), true);\n }",
"public function &getSessione() {\n \n return $_SESSION;\n }",
"protected function getStreamedResponseListenerService()\n {\n return $this->services['streamed_response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\StreamedResponseListener();\n }",
"protected function getStreamedResponseListenerService()\n {\n return $this->services['streamed_response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\StreamedResponseListener();\n }",
"protected function getSecurity_Authentication_SessionStrategyService()\n {\n return $this->services['security.authentication.session_strategy'] = new \\Symfony\\Component\\Security\\Http\\Session\\SessionAuthenticationStrategy('migrate');\n }",
"public function getConfigListener()\n {\n if (!$this->configListener instanceof ConfigMerger) {\n $this->setConfigListener(new ConfigListener($this->getOptions()));\n }\n return $this->configListener;\n }",
"protected function getEventDispatcherService()\n {\n if (isset($this->shared['event_dispatcher'])) return $this->shared['event_dispatcher'];\n\n $class = $this->getParameter('event_dispatcher.class');\n $instance = new $class($this);\n $this->shared['event_dispatcher'] = $instance;\n\n return $instance;\n }",
"public function listen($listener);",
"protected function getVictoireSitemap_SitemapMenuListenerService()\n {\n return $this->services['victoire_sitemap.sitemap_menu_listener'] = new \\Victoire\\Bundle\\SitemapBundle\\Listener\\SiteMapMenuListener($this->get('victoire_core.admin_menu_builder'));\n }",
"function hook_session() {\n session_set_save_handler(array($this, '_open'),\n array($this, '_close'),\n array($this, '_read'),\n array($this, '_write'),\n array($this, '_destroy'),\n array($this, '_clean'));\n }",
"protected function _listener($name) {\n\t\treturn $this->_crud()->listener($name);\n\t}",
"public function listener($name) {\n\t\treturn $this->_loadListener($name);\n\t}",
"public function saveOAuthSession($session);",
"protected function _getSession()\n {\n return Mage::getSingleton('adminhtml/session');\n }",
"protected function _getSession()\n {\n return Mage::getSingleton('adminhtml/session');\n }",
"protected function _getSession()\n {\n return Mage::getSingleton('adminhtml/session');\n }",
"protected function _getSession()\n {\n return Mage::getSingleton('adminhtml/session');\n }",
"protected function getListenerId()\n {\n return 'security.authentication.listener.symfony_connect';\n }",
"protected function getFragment_ListenerService()\n {\n return $this->services['fragment.listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\FragmentListener($this->get('uri_signer'), '/_fragment');\n }",
"public function getSaver()\n {\n return $this->saver;\n }",
"public function getStorageService()\n {\n $class = $this->app['config']->get('shoppingcart.storage','session');\n\n switch ($class)\n {\n case 'session':\n return 'session';\n break;\n case 'database':\n return 'database';\n break;\n default:\n return 'session';\n break;\n }\n }",
"function HTTP_SessionServer_SaveHandler_read($id)\n{\n $GLOBALS['__session']->open($id);\n return $GLOBALS['__session']->get($GLOBALS['__sessionName']);\n}",
"protected function getStorage()\n {\n return unserialize(Session::retrieve(__NAMESPACE__));\n }",
"protected function getDispatcherService()\n {\n $this->services['dispatcher'] = $instance = new \\phpbb\\event\\dispatcher($this);\n\n $instance->addListener('core.viewtopic_post_row_after', [0 => function () {\n return ${($_ = isset($this->services['phpbb.viglink.listener']) ? $this->services['phpbb.viglink.listener'] : $this->getPhpbb_Viglink_ListenerService()) && false ?: '_'};\n }, 1 => 'display_viglink'], 0);\n $instance->addListener('core.acp_main_notice', [0 => function () {\n return ${($_ = isset($this->services['phpbb.viglink.acp_listener']) ? $this->services['phpbb.viglink.acp_listener'] : $this->getPhpbb_Viglink_AcpListenerService()) && false ?: '_'};\n }, 1 => 'set_viglink_services'], 0);\n $instance->addListener('core.acp_help_phpbb_submit_before', [0 => function () {\n return ${($_ = isset($this->services['phpbb.viglink.acp_listener']) ? $this->services['phpbb.viglink.acp_listener'] : $this->getPhpbb_Viglink_AcpListenerService()) && false ?: '_'};\n }, 1 => 'update_viglink_settings'], 0);\n $instance->addListener('console.exception', [0 => function () {\n return ${($_ = isset($this->services['console.exception_subscriber']) ? $this->services['console.exception_subscriber'] : $this->getConsole_ExceptionSubscriberService()) && false ?: '_'};\n }, 1 => 'on_exception'], 0);\n $instance->addListener('kernel.terminate', [0 => function () {\n return ${($_ = isset($this->services['cron.event_listener']) ? $this->services['cron.event_listener'] : $this->getCron_EventListenerService()) && false ?: '_'};\n }, 1 => 'on_kernel_terminate'], 0);\n $instance->addListener('kernel.exception', [0 => function () {\n return ${($_ = isset($this->services['kernel_exception_subscriber']) ? $this->services['kernel_exception_subscriber'] : $this->getKernelExceptionSubscriberService()) && false ?: '_'};\n }, 1 => 'on_kernel_exception'], 0);\n $instance->addListener('kernel.terminate', [0 => function () {\n return ${($_ = isset($this->services['kernel_terminate_subscriber']) ? $this->services['kernel_terminate_subscriber'] : ($this->services['kernel_terminate_subscriber'] = new \\phpbb\\event\\kernel_terminate_subscriber())) && false ?: '_'};\n }, 1 => 'on_kernel_terminate'], -9223372036854775807-1);\n $instance->addListener('kernel.response', [0 => function () {\n return ${($_ = isset($this->services['symfony_response_listener']) ? $this->services['symfony_response_listener'] : ($this->services['symfony_response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener('UTF-8'))) && false ?: '_'};\n }, 1 => 'onKernelResponse'], 0);\n $instance->addListener('kernel.request', [0 => function () {\n return ${($_ = isset($this->services['router.listener']) ? $this->services['router.listener'] : $this->getRouter_ListenerService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'], 32);\n $instance->addListener('kernel.finish_request', [0 => function () {\n return ${($_ = isset($this->services['router.listener']) ? $this->services['router.listener'] : $this->getRouter_ListenerService()) && false ?: '_'};\n }, 1 => 'onKernelFinishRequest'], 0);\n $instance->addListener('kernel.exception', [0 => function () {\n return ${($_ = isset($this->services['router.listener']) ? $this->services['router.listener'] : $this->getRouter_ListenerService()) && false ?: '_'};\n }, 1 => 'onKernelException'], -64);\n\n return $instance;\n }",
"public function getListeningToGlobalEvents()\n\t{\n\t\treturn $this->_listeningenabled;\n\t}",
"protected function _getSession()\n {\n return $this->_objectManager->get(\\Magento\\Customer\\Model\\Session::class);\n }",
"private static function getSession()\n {\n static $session;\n\n if (! $session) {\n $session = new \\Zend_Session_Namespace('mutil.' . __CLASS__ . '.session');\n }\n\n return $session;\n }",
"public function getSavePath(): string\n {\n return session_save_path();\n }",
"protected function getDoctrine_Orm_DefaultListeners_AttachEntityListenersService()\n {\n return $this->services['doctrine.orm.default_listeners.attach_entity_listeners'] = new \\Doctrine\\ORM\\Tools\\AttachEntityListenersListener();\n }",
"protected function getDoctrine_Orm_DefaultListeners_AttachEntityListenersService()\n {\n return $this->services['doctrine.orm.default_listeners.attach_entity_listeners'] = new \\Doctrine\\ORM\\Tools\\AttachEntityListenersListener();\n }",
"protected function _save()\n\t{\n\t\treturn Session::instance()->set(Filter::$session_key, $this->_filters);\n\t}",
"function getSession() {\n\t\treturn $this->get('_session', $this->get('session'));\n\t}",
"protected function resolveListener(string $listener)\n {\n return Container::getInstance()->make($listener);\n }",
"function session_set_save_handler()\n {\n global $mockPHPFunctions;\n if ($mockPHPFunctions) {\n SessionManagerTest::$isSessionSetSaveHandlerInvoked = true;\n return true;\n }\n return call_user_func_array('\\session_set_save_handler', func_get_args());\n }",
"public static function saved(callable $listener, $priority = 0)\n {\n static::listen(ModelEvent::CREATED, $listener, $priority);\n static::listen(ModelEvent::UPDATED, $listener, $priority);\n }",
"public function getSessionManager();",
"public function registering()\n {\n $di = $this->getDI();\n\n $di->set(Services::SESSION_BAG, Bag::class);\n\n $di->setShared(Services::SESSION, function () {\n /** @var \\Phalcon\\DiInterface $this */\n\n $sessionConfig = $this->getShared(Services::CONFIG)->session;\n\n if (!isset($sessionConfig->adapter)) {\n if (!isset($sessionConfig->stores[$sessionConfig->default])) {\n throw new \\RuntimeException(\"Session store {$sessionConfig->default} not found in stores\");\n }\n\n $sessionConfig = $sessionConfig->stores[$sessionConfig->default];\n }\n\n $adapter = $sessionConfig->adapter;\n\n switch ($adapter){\n case 'Aerospike':\n case 'Database':\n case 'HandlerSocket':\n case 'Mongo':\n case 'Files':\n case 'Libmemcached':\n case 'Memcache':\n case 'Redis':\n $class = 'Phalcon\\Session\\Adapter\\\\' . $adapter;\n break;\n case FilesAdapter::class:\n case LibmemcachedAdapter::class:\n case MemcacheAdapter::class:\n case RedisAdapter::class:\n $class = $adapter;\n break;\n default:\n $class = $adapter;\n\n if(!class_exists($adapter)){\n throw new \\RuntimeException(\"Session Adapter $class not found.\");\n }\n }\n\n try {\n $options = [];\n if (!empty($sessionConfig->options)) {\n $options = $sessionConfig->options->toArray();\n }\n /** @var \\Phalcon\\Session\\Adapter|\\Phalcon\\Session\\AdapterInterface $session */\n $session = new $class($options);\n } catch (\\Throwable $e) {\n throw new \\RuntimeException(\"Session Adapter $class construction fail.\", $e);\n }\n\n $session->start();\n\n return $session;\n });\n }",
"private function getSessionSavePath() {}",
"public function onAfterSave(AccountServiceManagerInterface $sm) { }",
"public static function saving(callable $listener, $priority = 0)\n {\n static::listen(ModelEvent::CREATING, $listener, $priority);\n static::listen(ModelEvent::UPDATING, $listener, $priority);\n }",
"private function _getSession()\n {\n return Mage::getSingleton('payone_core/session');\n }",
"protected function getResponseListenerService()\n {\n return $this->services['response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener('UTF-8');\n }",
"protected function getResponseListenerService()\n {\n return $this->services['response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener('UTF-8');\n }",
"protected function getKernelTerminateSubscriberService()\n {\n return $this->services['kernel_terminate_subscriber'] = new \\phpbb\\event\\kernel_terminate_subscriber();\n }",
"public function session() {\n return $this->session;\n }",
"function get_session()\n{\n static $session;\n if (!$session) {\n $session = new session_class();\n }\n return $session;\n}",
"public function getServiceManager()\n {\n return $this->sm;\n }",
"protected function getSensioFrameworkExtra_Controller_ListenerService()\n {\n return $this->services['sensio_framework_extra.controller.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\ControllerListener($this->get('annotation_reader'));\n }",
"public function getSession()\n {\n return $this->session;\n }",
"public function getSession()\n {\n return $this->session;\n }",
"public function getSession()\n {\n return Mage::getSingleton('paystation/session');\n }",
"protected function getSymfonyResponseListenerService()\n {\n return $this->services['symfony_response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener('UTF-8');\n }",
"public function getSession() {\n return Mage::getSingleton('payupl/session');\n }",
"public static function saved($callback)\n {\n self::listenEvent('saved', $callback);\n }",
"public function getSession()\n {\n return $this['session'];\n }",
"public function getGoogleSession()\n\t{\n\t\treturn \\Session::get('google.session');\n\t}",
"public function getAddOnManagerService() {\n\t\treturn $this->get('sly-service-addon-manager');\n\t}",
"public function getSessionManager(): ?SessionInterface\n {\n return $this->h(SessionInterface::class) ? $this->g(SessionInterface::class) : null;\n }",
"public function getSession() {\n return $this->session;\n }"
] | [
"0.71934307",
"0.70844615",
"0.63576585",
"0.617447",
"0.6145519",
"0.59975874",
"0.597419",
"0.5769014",
"0.5704673",
"0.5678744",
"0.56208915",
"0.56163603",
"0.55713034",
"0.55548275",
"0.5543441",
"0.5534325",
"0.55169547",
"0.5489803",
"0.5390698",
"0.5373917",
"0.53106",
"0.5292907",
"0.5292411",
"0.528679",
"0.5277592",
"0.5277592",
"0.52702695",
"0.52331704",
"0.5233096",
"0.52166826",
"0.5207469",
"0.51779395",
"0.5177202",
"0.5174855",
"0.51615",
"0.5156371",
"0.5145217",
"0.5144422",
"0.5121829",
"0.5121829",
"0.51127976",
"0.50901586",
"0.5078955",
"0.5078955",
"0.50785327",
"0.50756234",
"0.5071849",
"0.50679153",
"0.5065142",
"0.5060433",
"0.50581574",
"0.50406265",
"0.5032939",
"0.5026845",
"0.5026845",
"0.5026845",
"0.5026845",
"0.50252235",
"0.5024127",
"0.50209516",
"0.50031835",
"0.4997158",
"0.49909663",
"0.49797422",
"0.49755198",
"0.49658614",
"0.4943802",
"0.49418005",
"0.49391964",
"0.49391964",
"0.49176586",
"0.49033785",
"0.48997235",
"0.48971325",
"0.48900077",
"0.48855633",
"0.48824766",
"0.48798507",
"0.48774564",
"0.48770687",
"0.48745486",
"0.48729232",
"0.48729232",
"0.48629794",
"0.4861486",
"0.485865",
"0.485634",
"0.48531982",
"0.48531604",
"0.48531604",
"0.4852736",
"0.48525342",
"0.48504916",
"0.48359755",
"0.48336658",
"0.48300022",
"0.4822059",
"0.48182893",
"0.48172772"
] | 0.8417319 | 1 |
Gets the private 'session_listener' shared service. | protected function getSessionListenerService()
{
return $this->services['session_listener'] = new \Symfony\Component\HttpKernel\EventListener\SessionListener(new \Symfony\Component\DependencyInjection\ServiceLocator(array('session' => function () {
return ${($_ = isset($this->services['session']) ? $this->services['session'] : $this->load('getSessionService.php')) && false ?: '_'};
})));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getSessionListenerService()\n {\n return $this->services['session_listener'] = new \\Symfony\\Bundle\\FrameworkBundle\\EventListener\\SessionListener($this);\n }",
"protected function getSession_SaveListenerService()\n {\n return $this->services['session.save_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\SaveSessionListener();\n }",
"protected function getSession_SaveListenerService()\n {\n return $this->services['session.save_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\SaveSessionListener();\n }",
"public function getListener(/* ... */)\n {\n return $this->_listener;\n }",
"protected function getSensioFrameworkExtra_Security_ListenerService()\n {\n return $this->services['sensio_framework_extra.security.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\SecurityListener(NULL, new \\Sensio\\Bundle\\FrameworkExtraBundle\\Security\\ExpressionLanguage(), ${($_ = isset($this->services['security.authentication.trust_resolver']) ? $this->services['security.authentication.trust_resolver'] : $this->getSecurity_Authentication_TrustResolverService()) && false ?: '_'}, ${($_ = isset($this->services['security.role_hierarchy']) ? $this->services['security.role_hierarchy'] : $this->getSecurity_RoleHierarchyService()) && false ?: '_'}, $this->get('security.token_storage', ContainerInterface::NULL_ON_INVALID_REFERENCE), $this->get('security.authorization_checker', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"protected function getSessionService()\n {\n return $this->services['session'] = new \\Symfony\\Component\\HttpFoundation\\Session\\Session($this->get('session.storage.native'), new \\Symfony\\Component\\HttpFoundation\\Session\\Attribute\\AttributeBag(), new \\Symfony\\Component\\HttpFoundation\\Session\\Flash\\FlashBag());\n }",
"private static function getSession()\n {\n static $session;\n\n if (! $session) {\n $session = new \\Zend_Session_Namespace('mutil.' . __CLASS__ . '.session');\n }\n\n return $session;\n }",
"public function listener() {\n\t\treturn $this->_runtime['listener'];\n\t}",
"protected function getSession_HandlerService()\n {\n return $this->services['session.handler'] = new \\Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NativeFileSessionHandler(($this->targetDirs[3].'/app/../var/sessions/prod'));\n }",
"protected function getDispatcherListener()\n {\n return $this->di->getShared('dispatcherListener');\n }",
"function get_session()\n{\n static $session;\n if (!$session) {\n $session = new session_class();\n }\n return $session;\n}",
"protected function getTranslatorListenerService()\n {\n return $this->services['translator_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\TranslatorListener(${($_ = isset($this->services['translator.default']) ? $this->services['translator.default'] : $this->getTranslator_DefaultService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack()) && false ?: '_'});\n }",
"protected function getSensioFrameworkExtra_Cache_ListenerService()\n {\n return $this->services['sensio_framework_extra.cache.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\HttpCacheListener();\n }",
"protected function getPhpbb_Viglink_ListenerService()\n {\n return $this->services['phpbb.viglink.listener'] = new \\phpbb\\viglink\\event\\listener(${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['template']) ? $this->services['template'] : $this->getTemplateService()) && false ?: '_'});\n }",
"public function getSessionStorage()\n {\n if (! $this->storage) {\n $this->storage = $this->getServiceLocator()\n ->get('Application\\Event\\MyAuthStorage');\n }\n return $this->storage;\n }",
"function getSession() {\n\t\treturn $this->get('_session', $this->get('session'));\n\t}",
"public function getSessionManager();",
"public function getSession()\n {\n return $this->session;\n }",
"public function getSession()\n {\n return $this->session;\n }",
"public function getSession()\r\n {\r\n return $this->sessionID;\r\n }",
"public function &getSessione() {\n \n return $_SESSION;\n }",
"public function getSession()\n {\n return $this['session'];\n }",
"protected function _getSession()\n {\n return Mage::getSingleton('adminhtml/session');\n }",
"protected function _getSession()\n {\n return Mage::getSingleton('adminhtml/session');\n }",
"protected function _getSession()\n {\n return Mage::getSingleton('adminhtml/session');\n }",
"protected function _getSession()\n {\n return Mage::getSingleton('adminhtml/session');\n }",
"function getSession() {\n\t\treturn $this->getParam(self::PARAM_REQUEST_SESSION);\n\t}",
"protected function getSecurity_Authentication_SessionStrategyService()\n {\n return $this->services['security.authentication.session_strategy'] = new \\Symfony\\Component\\Security\\Http\\Session\\SessionAuthenticationStrategy('migrate');\n }",
"protected function getRouter_ListenerService()\n {\n return $this->services['router.listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener(${($_ = isset($this->services['router']) ? $this->services['router'] : $this->getRouterService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : ($this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack())) && false ?: '_'});\n }",
"public function getSession() {\n return $this->session;\n }",
"protected function getTranslatorListenerService()\n {\n return $this->services['translator_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\TranslatorListener($this->get('translator.default'), $this->get('request_stack'));\n }",
"protected function getSession() {\n return $this->_session;\n }",
"public function getSession()\n\t{\n\t\treturn $this->session;\n\t}",
"protected function getSession () {\n\t\treturn $this->session;\n\t}",
"private function &getNamespace() {\r\n\t\t$ns = self::SESSION_NAMESPACE;\r\n\t\tif(!isset($_SESSION[$ns])) {\r\n\t\t\t$_SESSION[$ns] = array();\r\n\t\t}\r\n\t\treturn $_SESSION[$ns];\r\n\t}",
"public function getSessionManager(): ?SessionInterface\n {\n return $this->h(SessionInterface::class) ? $this->g(SessionInterface::class) : null;\n }",
"public function getSession()\n\t{\n\t\treturn $this->getContext()->getSession();\n\t}",
"public function session() {\n return $this->session;\n }",
"function session(): Session\n\t{\n\t\tstatic $session;\n\n\t\tif($session === null)\n\t\t{\n\t\t\t$session = Application::instance()->getContainer()->get(Session::class);\n\t\t}\n\n\t\treturn $session;\n\t}",
"protected function _getSession()\n {\n return $this->_objectManager->get(\\Magento\\Customer\\Model\\Session::class);\n }",
"protected function _getSession()\n {\n return Mage::getSingleton('mbiz_cc/session');\n }",
"protected function getSession_Storage_PhpBridgeService()\n {\n return $this->services['session.storage.php_bridge'] = new \\Symfony\\Component\\HttpFoundation\\Session\\Storage\\PhpBridgeSessionStorage($this->get('session.handler'), ${($_ = isset($this->services['session.storage.metadata_bag']) ? $this->services['session.storage.metadata_bag'] : $this->getSession_Storage_MetadataBagService()) && false ?: '_'});\n }",
"protected function getRouterListenerService()\n {\n return $this->services['router_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener($this->get('router'), $this->get('request_stack'), ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'}, $this->get('monolog.logger.request', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"public function getSession(): object\n {\n return SessionTrait::sessionFromGlobal();\n }",
"private function _getSession()\n {\n return Mage::getSingleton('payone_core/session');\n }",
"protected function getLocaleListenerService()\n {\n return $this->services['locale_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener($this->get('request_stack'), 'en', $this->get('router', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"protected function getSwiftmailer_EmailSender_ListenerService()\n {\n return $this->services['swiftmailer.email_sender.listener'] = new \\Symfony\\Bundle\\SwiftmailerBundle\\EventListener\\EmailSenderListener($this, $this->get('logger', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"function &singleton()\n {\n if (!isset($GLOBALS['_PHP_PARSER_MSGSERVER_INSTANCE'])) {\n $GLOBALS['_PHP_PARSER_MSGSERVER_INSTANCE'] = &new PHP_Parser_MsgServer;\n }\n return $GLOBALS['_PHP_PARSER_MSGSERVER_INSTANCE'];\n }",
"public function session()\n\t\t{\n\t\t\treturn $this->get_session();\n\t\t}",
"protected function getFosUser_Listener_AuthenticationService()\n {\n return $this->services['fos_user.listener.authentication'] = new \\FOS\\UserBundle\\EventListener\\AuthenticationListener($this->get('fos_user.security.login_manager'), 'main');\n }",
"public function getSession()\n {\n $session = $this->setSession(self::getHash($this->_optionsSession['session_name']));\n return $session;\n }",
"public static function getInstance()\n {\n\n if (self::$_instance == null) {\n self::$_instance = new Session();\n }\n\n return self::$_instance;\n }",
"public function getSession(){\r\n return $this->session;\r\n }",
"protected function _getSession()\n\t{\n\t\treturn Mage::getSingleton('customer/session');\n\t}",
"public function getSession()\n {\n return Mage::getSingleton('paystation/session');\n }",
"public static function getInstance()\r\n {\r\n static $instance;\r\n if (!is_object($instance)) $instance = new Session();\r\n return $instance;\r\n }",
"function getUserFromSession() {\n\tsession_start();\n\treturn $_SESSION;\n}",
"public function getSessionStore()\n {\n return $this->session;\n }",
"public function getSession()\n {\n return isset($this->Session) ? $this->Session : null;\n }",
"public function getSession()\n {\n return isset($this->Session) ? $this->Session : null;\n }",
"protected function _getSession() {\n return Mage::getSingleton ( 'customer/session' );\n }",
"function getSession() {\n\t\treturn Cgn_Session::getSessionObj();\n\t}",
"protected function getSession()\n {\n return Mage::getSingleton('adminhtml/session');\n }",
"protected function _getSession() {\n /**\n * Return session value\n */\n return Mage::getSingleton ( 'core/session' );\n }",
"protected function getLocaleListenerService()\n {\n return $this->services['locale_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener(${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack()) && false ?: '_'}, 'en', ${($_ = isset($this->services['router']) ? $this->services['router'] : $this->getRouterService()) && false ?: '_'});\n }",
"protected function getSession()\n {\n return $this->getMinkContext()->getSession();\n }",
"protected function getRouterListenerService()\n {\n return $this->services['router_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener(${($_ = isset($this->services['router']) ? $this->services['router'] : $this->getRouterService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack()) && false ?: '_'}, ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'}, ${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->services['logger'] = new \\Symfony\\Component\\HttpKernel\\Log\\Logger()) && false ?: '_'}, $this->targetDirs[3], true);\n }",
"protected function _getSession()\n {\n return Mage::getSingleton('customer/session');\n }",
"protected function _getSession()\n {\n return Mage::getSingleton('customer/session');\n }",
"protected function _getSession()\n {\n return Mage::getSingleton('customer/session');\n }",
"public function getSession()\r\n\t{\t\r\n\t\treturn Mage::getSingleton('core/session');\r\n\t}",
"public function getGoogleSession()\n\t{\n\t\treturn \\Session::get('google.session');\n\t}",
"public function getSession(){\n if ($this->_session instanceof Session) {\n return $this->_session;\n }\n return $this->_createSession();\n }",
"public function getSSessionKey()\n {\n return isset($this->sSessionKey) ? $this->sSessionKey : null;\n }",
"function getSession() {\n\t\treturn $this->getSessionRelatedBySessionId();\n\t}",
"protected function _getSession() {\n return Mage::getSingleton('customer/session');\n }",
"public function getSession() {\n return Mage::getSingleton('payupl/session');\n }",
"protected function getSecurity_Rememberme_ResponseListenerService()\n {\n return $this->services['security.rememberme.response_listener'] = new \\Symfony\\Component\\Security\\Http\\RememberMe\\ResponseListener();\n }",
"protected function getSecurity_Rememberme_ResponseListenerService()\n {\n return $this->services['security.rememberme.response_listener'] = new \\Symfony\\Component\\Security\\Http\\RememberMe\\ResponseListener();\n }",
"protected function getCron_EventListenerService()\n {\n return $this->services['cron.event_listener'] = new \\phpbb\\cron\\event\\cron_runner_listener(${($_ = isset($this->services['cron.lock_db']) ? $this->services['cron.lock_db'] : $this->getCron_LockDbService()) && false ?: '_'}, ${($_ = isset($this->services['cron.manager']) ? $this->services['cron.manager'] : $this->getCron_ManagerService()) && false ?: '_'}, ${($_ = isset($this->services['request']) ? $this->services['request'] : ($this->services['request'] = new \\phpbb\\request\\request(NULL, true))) && false ?: '_'});\n }",
"public function getSessionID()\n {\n return $this->_session;\n }",
"public function getCourseCatalogNotificationSession() {\n \treturn $this->manager->getCourseCatalogNotificationSession();\n\t}",
"public static function getInstance()\n {\n $session = new Session();\n\n self::$instancia = $session;\n\n return $session;\n }",
"protected function _getSession()\n\t{\n\t\treturn Mage::getSingleton('checkout/session');\n\t}",
"public function getUserSession()\n {\n $sessionUser = new Container('user_session');\n return $sessionUser;\n }",
"abstract protected function retrieveSessionToken() ;",
"public function getSession()\n {\n $session = new Zend_Session_Namespace(\"e-restaurant.eu\");\n\n if (! isset($session->sess_id) || null == $session->sess_id) {\n /* New session */\n Zend_Session::regenerateId();\n $session->sess_id = Zend_Session::getId(); \n }\n\n return $session;\n }",
"protected function _getSession ()\n {\n return Mage::getSingleton('customer/session');\n }",
"public function get($key) {\n\t\t$sessionData = $this->getFrontendUser()->getKey('ses', self::SESSIONNAMESPACE.$key);\n\t\treturn $sessionData;\n\t}",
"public function getTermNotificationSession() {\n \treturn $this->manager->getTermNotificationSession();\n\t}",
"public function getCourseNotificationSession() {\n \treturn $this->manager->getCourseNotificationSession();\n\t}",
"public function sharedInstance() {\n\t\tif (!self::$popServerInstance) {\n\t\t\tself::$popServerInstance = new PopServer();\n\t\t}\n\t\treturn self::$popServerInstance;\n\t}",
"public function getTopicNotificationSession() {\n \treturn $this->manager->getTopicNotificationSession();\n\t}",
"public static function getInstance(): Session\n {\n if (!isset(static::$instance)) {\n $class = __CLASS__;\n static::$instance = new $class;\n }\n return static::$instance;\n }",
"public function getSession()\r\n {\r\n return Mage::getSingleton('firstdatae4/session');\r\n }",
"private function get_session($key = null)\n\t{\n\t\tif (session_status() == PHP_SESSION_NONE) {\n\t\t session_start();\n\t\t}\n\t\tif($key == null)\n\t\t{\n\t\t\treturn $_SESSION;\n\t\t}else\n\t\t{\n\t\t\tif(isset($_SESSION[$key]))\n\t\t\t\treturn $_SESSION[$key];\n\t\t\telse\n\t\t\t\treturn null;\n\t\t}\n\n\t}",
"public function getSessionConfig()\n {\n return $this->app['config']['staff_session'];\n }",
"private static function getService()\n {\n return self::$app->get(static::SERVICE_NAME);\n }",
"public function getPhpSession(){\n\t\treturn ($this->getObject('PhpSession') instanceof PhpSession)\n\t\t\t?$this->_data['PhpSession']\n\t\t\t:new PhpSession();\n\t}",
"public function listener($name) {\n\t\treturn $this->_loadListener($name);\n\t}"
] | [
"0.7906166",
"0.6913504",
"0.6913504",
"0.6668468",
"0.6476957",
"0.63308644",
"0.61534315",
"0.6152553",
"0.6119494",
"0.6093838",
"0.6055146",
"0.5999446",
"0.5961343",
"0.5928969",
"0.5917099",
"0.5865591",
"0.5863194",
"0.58018684",
"0.58018684",
"0.5799536",
"0.57886904",
"0.5784626",
"0.57748234",
"0.57748234",
"0.57748234",
"0.57748234",
"0.5772366",
"0.57667404",
"0.57594293",
"0.57528734",
"0.5739527",
"0.57387644",
"0.5675535",
"0.566917",
"0.5657154",
"0.56560564",
"0.56537706",
"0.56531173",
"0.5609968",
"0.5603488",
"0.559042",
"0.5567465",
"0.5563596",
"0.554716",
"0.55345744",
"0.5527753",
"0.55276257",
"0.5525588",
"0.5518737",
"0.55177444",
"0.5501061",
"0.55010486",
"0.5500037",
"0.54991055",
"0.549895",
"0.5493825",
"0.54860836",
"0.54853994",
"0.5477972",
"0.5477972",
"0.547483",
"0.5468136",
"0.5468076",
"0.54659593",
"0.54585546",
"0.54555583",
"0.54419285",
"0.5435085",
"0.5435085",
"0.5435085",
"0.54346275",
"0.54293275",
"0.5428776",
"0.54257905",
"0.54256785",
"0.5423804",
"0.54183245",
"0.5417296",
"0.5417296",
"0.5414977",
"0.5409599",
"0.54005855",
"0.53858304",
"0.537957",
"0.53753364",
"0.53702116",
"0.536321",
"0.53613704",
"0.53529847",
"0.5346617",
"0.53422636",
"0.5341327",
"0.53391385",
"0.5338196",
"0.5332992",
"0.53316176",
"0.5327168",
"0.5322125",
"0.5313804",
"0.5306504"
] | 0.7960047 | 0 |
Gets the private 'streamed_response_listener' shared service. | protected function getStreamedResponseListenerService()
{
return $this->services['streamed_response_listener'] = new \Symfony\Component\HttpKernel\EventListener\StreamedResponseListener();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getResponseListenerService()\n {\n return $this->services['response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener('UTF-8');\n }",
"protected function getResponseListenerService()\n {\n return $this->services['response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener('UTF-8');\n }",
"protected function getSymfonyResponseListenerService()\n {\n return $this->services['symfony_response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener('UTF-8');\n }",
"protected function getSecurity_Rememberme_ResponseListenerService()\n {\n return $this->services['security.rememberme.response_listener'] = new \\Symfony\\Component\\Security\\Http\\RememberMe\\ResponseListener();\n }",
"protected function getSecurity_Rememberme_ResponseListenerService()\n {\n return $this->services['security.rememberme.response_listener'] = new \\Symfony\\Component\\Security\\Http\\RememberMe\\ResponseListener();\n }",
"protected function getDispatcherListener()\n {\n return $this->di->getShared('dispatcherListener');\n }",
"public function getListener(/* ... */)\n {\n return $this->_listener;\n }",
"protected function getTranslatorListenerService()\n {\n return $this->services['translator_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\TranslatorListener(${($_ = isset($this->services['translator.default']) ? $this->services['translator.default'] : $this->getTranslator_DefaultService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack()) && false ?: '_'});\n }",
"protected function getTranslatorListenerService()\n {\n return $this->services['translator_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\TranslatorListener($this->get('translator.default'), $this->get('request_stack'));\n }",
"protected function getSessionListenerService()\n {\n return $this->services['session_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\SessionListener(new \\Symfony\\Component\\DependencyInjection\\ServiceLocator(array('session' => function () {\n return ${($_ = isset($this->services['session']) ? $this->services['session'] : $this->load('getSessionService.php')) && false ?: '_'};\n })));\n }",
"protected function getRouterListenerService()\n {\n return $this->services['router_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener($this->get('router'), $this->get('request_stack'), ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'}, $this->get('monolog.logger.request', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"protected function getRouter_ListenerService()\n {\n return $this->services['router.listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener(${($_ = isset($this->services['router']) ? $this->services['router'] : $this->getRouterService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : ($this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack())) && false ?: '_'});\n }",
"protected function getSessionListenerService()\n {\n return $this->services['session_listener'] = new \\Symfony\\Bundle\\FrameworkBundle\\EventListener\\SessionListener($this);\n }",
"protected function getDispatcherService()\n {\n $this->services['dispatcher'] = $instance = new \\phpbb\\event\\dispatcher($this);\n\n $instance->addListener('core.viewtopic_post_row_after', [0 => function () {\n return ${($_ = isset($this->services['phpbb.viglink.listener']) ? $this->services['phpbb.viglink.listener'] : $this->getPhpbb_Viglink_ListenerService()) && false ?: '_'};\n }, 1 => 'display_viglink'], 0);\n $instance->addListener('core.acp_main_notice', [0 => function () {\n return ${($_ = isset($this->services['phpbb.viglink.acp_listener']) ? $this->services['phpbb.viglink.acp_listener'] : $this->getPhpbb_Viglink_AcpListenerService()) && false ?: '_'};\n }, 1 => 'set_viglink_services'], 0);\n $instance->addListener('core.acp_help_phpbb_submit_before', [0 => function () {\n return ${($_ = isset($this->services['phpbb.viglink.acp_listener']) ? $this->services['phpbb.viglink.acp_listener'] : $this->getPhpbb_Viglink_AcpListenerService()) && false ?: '_'};\n }, 1 => 'update_viglink_settings'], 0);\n $instance->addListener('console.exception', [0 => function () {\n return ${($_ = isset($this->services['console.exception_subscriber']) ? $this->services['console.exception_subscriber'] : $this->getConsole_ExceptionSubscriberService()) && false ?: '_'};\n }, 1 => 'on_exception'], 0);\n $instance->addListener('kernel.terminate', [0 => function () {\n return ${($_ = isset($this->services['cron.event_listener']) ? $this->services['cron.event_listener'] : $this->getCron_EventListenerService()) && false ?: '_'};\n }, 1 => 'on_kernel_terminate'], 0);\n $instance->addListener('kernel.exception', [0 => function () {\n return ${($_ = isset($this->services['kernel_exception_subscriber']) ? $this->services['kernel_exception_subscriber'] : $this->getKernelExceptionSubscriberService()) && false ?: '_'};\n }, 1 => 'on_kernel_exception'], 0);\n $instance->addListener('kernel.terminate', [0 => function () {\n return ${($_ = isset($this->services['kernel_terminate_subscriber']) ? $this->services['kernel_terminate_subscriber'] : ($this->services['kernel_terminate_subscriber'] = new \\phpbb\\event\\kernel_terminate_subscriber())) && false ?: '_'};\n }, 1 => 'on_kernel_terminate'], -9223372036854775807-1);\n $instance->addListener('kernel.response', [0 => function () {\n return ${($_ = isset($this->services['symfony_response_listener']) ? $this->services['symfony_response_listener'] : ($this->services['symfony_response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener('UTF-8'))) && false ?: '_'};\n }, 1 => 'onKernelResponse'], 0);\n $instance->addListener('kernel.request', [0 => function () {\n return ${($_ = isset($this->services['router.listener']) ? $this->services['router.listener'] : $this->getRouter_ListenerService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'], 32);\n $instance->addListener('kernel.finish_request', [0 => function () {\n return ${($_ = isset($this->services['router.listener']) ? $this->services['router.listener'] : $this->getRouter_ListenerService()) && false ?: '_'};\n }, 1 => 'onKernelFinishRequest'], 0);\n $instance->addListener('kernel.exception', [0 => function () {\n return ${($_ = isset($this->services['router.listener']) ? $this->services['router.listener'] : $this->getRouter_ListenerService()) && false ?: '_'};\n }, 1 => 'onKernelException'], -64);\n\n return $instance;\n }",
"public function listener() {\n\t\treturn $this->_runtime['listener'];\n\t}",
"protected function getSensioFrameworkExtra_Cache_ListenerService()\n {\n return $this->services['sensio_framework_extra.cache.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\HttpCacheListener();\n }",
"protected function getRouterListenerService()\n {\n return $this->services['router_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener(${($_ = isset($this->services['router']) ? $this->services['router'] : $this->getRouterService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack()) && false ?: '_'}, ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'}, ${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->services['logger'] = new \\Symfony\\Component\\HttpKernel\\Log\\Logger()) && false ?: '_'}, $this->targetDirs[3], true);\n }",
"protected function getEventDispatcherService()\n {\n $this->services['event_dispatcher'] = $instance = new \\Symfony\\Component\\EventDispatcher\\ContainerAwareEventDispatcher($this);\n\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['App\\EventSubscriber\\RestSubscriber']) ? $this->services['App\\EventSubscriber\\RestSubscriber'] : $this->getRestSubscriberService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 0);\n $instance->addListener('kernel.controller', array(0 => function () {\n return ${($_ = isset($this->services['App\\EventSubscriber\\RestSubscriber']) ? $this->services['App\\EventSubscriber\\RestSubscriber'] : $this->getRestSubscriberService()) && false ?: '_'};\n }, 1 => 'onKernelController'), 0);\n $instance->addListener('kernel.view', array(0 => function () {\n return ${($_ = isset($this->services['App\\EventSubscriber\\RestSubscriber']) ? $this->services['App\\EventSubscriber\\RestSubscriber'] : $this->getRestSubscriberService()) && false ?: '_'};\n }, 1 => 'onKernelView'), 0);\n $instance->addListener('kernel.exception', array(0 => function () {\n return ${($_ = isset($this->services['App\\EventSubscriber\\RestSubscriber']) ? $this->services['App\\EventSubscriber\\RestSubscriber'] : $this->getRestSubscriberService()) && false ?: '_'};\n }, 1 => 'onKernelException'), 0);\n $instance->addListener('kernel.response', array(0 => function () {\n return ${($_ = isset($this->services['response_listener']) ? $this->services['response_listener'] : $this->services['response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener('UTF-8')) && false ?: '_'};\n }, 1 => 'onKernelResponse'), 0);\n $instance->addListener('kernel.response', array(0 => function () {\n return ${($_ = isset($this->services['streamed_response_listener']) ? $this->services['streamed_response_listener'] : $this->services['streamed_response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\StreamedResponseListener()) && false ?: '_'};\n }, 1 => 'onKernelResponse'), -1024);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['locale_listener']) ? $this->services['locale_listener'] : $this->getLocaleListenerService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 16);\n $instance->addListener('kernel.finish_request', array(0 => function () {\n return ${($_ = isset($this->services['locale_listener']) ? $this->services['locale_listener'] : $this->getLocaleListenerService()) && false ?: '_'};\n }, 1 => 'onKernelFinishRequest'), 0);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['validate_request_listener']) ? $this->services['validate_request_listener'] : $this->services['validate_request_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 256);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['resolve_controller_name_subscriber']) ? $this->services['resolve_controller_name_subscriber'] : $this->getResolveControllerNameSubscriberService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 24);\n $instance->addListener('console.error', array(0 => function () {\n return ${($_ = isset($this->services['console.error_listener']) ? $this->services['console.error_listener'] : $this->load('getConsole_ErrorListenerService.php')) && false ?: '_'};\n }, 1 => 'onConsoleError'), -128);\n $instance->addListener('console.terminate', array(0 => function () {\n return ${($_ = isset($this->services['console.error_listener']) ? $this->services['console.error_listener'] : $this->load('getConsole_ErrorListenerService.php')) && false ?: '_'};\n }, 1 => 'onConsoleTerminate'), -128);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['session_listener']) ? $this->services['session_listener'] : $this->getSessionListenerService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 128);\n $instance->addListener('kernel.response', array(0 => function () {\n return ${($_ = isset($this->services['session_listener']) ? $this->services['session_listener'] : $this->getSessionListenerService()) && false ?: '_'};\n }, 1 => 'onKernelResponse'), -1000);\n $instance->addListener('kernel.finish_request', array(0 => function () {\n return ${($_ = isset($this->services['session_listener']) ? $this->services['session_listener'] : $this->getSessionListenerService()) && false ?: '_'};\n }, 1 => 'onFinishRequest'), 0);\n $instance->addListener('kernel.response', array(0 => function () {\n return ${($_ = isset($this->services['session.save_listener']) ? $this->services['session.save_listener'] : $this->services['session.save_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\SaveSessionListener()) && false ?: '_'};\n }, 1 => 'onKernelResponse'), -1000);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['translator_listener']) ? $this->services['translator_listener'] : $this->getTranslatorListenerService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 10);\n $instance->addListener('kernel.finish_request', array(0 => function () {\n return ${($_ = isset($this->services['translator_listener']) ? $this->services['translator_listener'] : $this->getTranslatorListenerService()) && false ?: '_'};\n }, 1 => 'onKernelFinishRequest'), 0);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['debug.debug_handlers_listener']) ? $this->services['debug.debug_handlers_listener'] : $this->getDebug_DebugHandlersListenerService()) && false ?: '_'};\n }, 1 => 'configure'), 2048);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['router_listener']) ? $this->services['router_listener'] : $this->getRouterListenerService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 32);\n $instance->addListener('kernel.finish_request', array(0 => function () {\n return ${($_ = isset($this->services['router_listener']) ? $this->services['router_listener'] : $this->getRouterListenerService()) && false ?: '_'};\n }, 1 => 'onKernelFinishRequest'), 0);\n $instance->addListener('kernel.exception', array(0 => function () {\n return ${($_ = isset($this->services['router_listener']) ? $this->services['router_listener'] : $this->getRouterListenerService()) && false ?: '_'};\n }, 1 => 'onKernelException'), -64);\n $instance->addListener('console.error', array(0 => function () {\n return ${($_ = isset($this->services['maker.console_error_listener']) ? $this->services['maker.console_error_listener'] : $this->services['maker.console_error_listener'] = new \\Symfony\\Bundle\\MakerBundle\\Event\\ConsoleErrorSubscriber()) && false ?: '_'};\n }, 1 => 'onConsoleError'), 0);\n $instance->addListener('console.terminate', array(0 => function () {\n return ${($_ = isset($this->services['maker.console_error_listener']) ? $this->services['maker.console_error_listener'] : $this->services['maker.console_error_listener'] = new \\Symfony\\Bundle\\MakerBundle\\Event\\ConsoleErrorSubscriber()) && false ?: '_'};\n }, 1 => 'onConsoleTerminate'), 0);\n $instance->addListener('kernel.response', array(0 => function () {\n return ${($_ = isset($this->services['security.rememberme.response_listener']) ? $this->services['security.rememberme.response_listener'] : $this->services['security.rememberme.response_listener'] = new \\Symfony\\Component\\Security\\Http\\RememberMe\\ResponseListener()) && false ?: '_'};\n }, 1 => 'onKernelResponse'), 0);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['security.firewall']) ? $this->services['security.firewall'] : $this->getSecurity_FirewallService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 8);\n $instance->addListener('kernel.finish_request', array(0 => function () {\n return ${($_ = isset($this->services['security.firewall']) ? $this->services['security.firewall'] : $this->getSecurity_FirewallService()) && false ?: '_'};\n }, 1 => 'onKernelFinishRequest'), 0);\n\n return $instance;\n }",
"function listen($listener)\n{\n return XPSPL::instance()->listen($listener);\n}",
"function &singleton()\n {\n if (!isset($GLOBALS['_PHP_PARSER_MSGSERVER_INSTANCE'])) {\n $GLOBALS['_PHP_PARSER_MSGSERVER_INSTANCE'] = &new PHP_Parser_MsgServer;\n }\n return $GLOBALS['_PHP_PARSER_MSGSERVER_INSTANCE'];\n }",
"protected function getPhpbb_Viglink_ListenerService()\n {\n return $this->services['phpbb.viglink.listener'] = new \\phpbb\\viglink\\event\\listener(${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['template']) ? $this->services['template'] : $this->getTemplateService()) && false ?: '_'});\n }",
"protected function getDebug_DebugHandlersListenerService()\n {\n return $this->services['debug.debug_handlers_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\DebugHandlersListener(NULL, $this->get('monolog.logger.php', ContainerInterface::NULL_ON_INVALID_REFERENCE), -1, 0, false, ${($_ = isset($this->services['debug.file_link_formatter']) ? $this->services['debug.file_link_formatter'] : $this->getDebug_FileLinkFormatterService()) && false ?: '_'}, false);\n }",
"function responseManager()\n {\n /** @var \\Phanda\\Contracts\\Http\\ResponseManager $responseManager */\n $responseManager = phanda()->create(\\Phanda\\Contracts\\Http\\ResponseManager::class);\n return $responseManager;\n }",
"protected function getDebug_DebugHandlersListenerService()\n {\n return $this->services['debug.debug_handlers_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\DebugHandlersListener(NULL, ${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->services['logger'] = new \\Symfony\\Component\\HttpKernel\\Log\\Logger()) && false ?: '_'}, -1, -1, true, new \\Symfony\\Component\\HttpKernel\\Debug\\FileLinkFormatter(NULL), true);\n }",
"protected function getLocaleListenerService()\n {\n return $this->services['locale_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener($this->get('request_stack'), 'en', $this->get('router', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"protected function response(): ResponseInterface\n {\n return Context::get(ResponseInterface::class);\n }",
"protected function getSensioFrameworkExtra_Security_ListenerService()\n {\n return $this->services['sensio_framework_extra.security.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\SecurityListener(NULL, new \\Sensio\\Bundle\\FrameworkExtraBundle\\Security\\ExpressionLanguage(), ${($_ = isset($this->services['security.authentication.trust_resolver']) ? $this->services['security.authentication.trust_resolver'] : $this->getSecurity_Authentication_TrustResolverService()) && false ?: '_'}, ${($_ = isset($this->services['security.role_hierarchy']) ? $this->services['security.role_hierarchy'] : $this->getSecurity_RoleHierarchyService()) && false ?: '_'}, $this->get('security.token_storage', ContainerInterface::NULL_ON_INVALID_REFERENCE), $this->get('security.authorization_checker', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"protected function getEventDispatcherService()\n {\n if (isset($this->shared['event_dispatcher'])) return $this->shared['event_dispatcher'];\n\n $class = $this->getParameter('event_dispatcher.class');\n $instance = new $class($this);\n $this->shared['event_dispatcher'] = $instance;\n\n return $instance;\n }",
"public function &getResponse() : ResponseInterface\n {\n return $this->response;\n }",
"protected function getLocaleListenerService()\n {\n return $this->services['locale_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener(${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack()) && false ?: '_'}, 'en', ${($_ = isset($this->services['router']) ? $this->services['router'] : $this->getRouterService()) && false ?: '_'});\n }",
"protected function getFragment_ListenerService()\n {\n return $this->services['fragment.listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\FragmentListener($this->get('uri_signer'), '/_fragment');\n }",
"public function getResponse()\n {\n return new StreamedResponse(\n [$this, 'streamCallback'],\n Response::HTTP_OK,\n [\n 'Content-Type' => 'text/event-stream',\n 'Access-Control-Allow-Origin' => '*',\n 'Cache-Control' => 'no-cache',\n 'X-Accel-Buffering' => 'no',\n ]\n );\n }",
"public function listen($listener);",
"protected function getTroopersAlertifybundle_EventListenerService()\n {\n return $this->services['troopers_alertifybundle.event_listener'] = new \\Troopers\\AlertifyBundle\\EventListener\\AlertifyListener($this->get('session'), $this->get('troopers_alertifybundle.session_handler'));\n }",
"public function listener()\n {\n /** @var \\Illuminate\\Redis\\Connections\\PhpRedisConnection|\\Illuminate\\Redis\\Connections\\PredisConnection $connection */\n $connection = Redis::connection($this->connection());\n\n register_shutdown_function(function () use ($connection) {\n $connection->disconnect();\n abort(200);\n });\n\n return response()->stream(function () use ($connection) {\n\n // Send the message with a retry timer\n $this->message()->retry($this->timeRetry())->send();\n\n // If the Last-Event-Id header is set, restore the connection with the last message id.\n if (request()->hasHeader('Last-Event-Id')) {\n $this->restore(request()->header('Last-Event-Id'));\n }\n\n // Listen for new messages\n $connection->subscribe([$this->channel()], fn (string $message) => $this->handler($message));\n\n }, Response::HTTP_OK, $this->headers());\n }",
"protected function getRestSubscriberService()\n {\n return $this->services['App\\EventSubscriber\\RestSubscriber'] = new \\App\\EventSubscriber\\RestSubscriber(${($_ = isset($this->services['annotation_reader']) ? $this->services['annotation_reader'] : $this->getAnnotationReaderService()) && false ?: '_'}, ${($_ = isset($this->services['doctrine.orm.default_entity_manager']) ? $this->services['doctrine.orm.default_entity_manager'] : $this->getDoctrine_Orm_DefaultEntityManagerService()) && false ?: '_'});\n }",
"public function getService()\n {\n return $this->_service;\n }",
"protected function getSwiftmailer_EmailSender_ListenerService()\n {\n return $this->services['swiftmailer.email_sender.listener'] = new \\Symfony\\Bundle\\SwiftmailerBundle\\EventListener\\EmailSenderListener($this, $this->get('logger', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"protected function getValidateRequestListenerService()\n {\n return $this->services['validate_request_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener();\n }",
"protected function getValidateRequestListenerService()\n {\n return $this->services['validate_request_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener();\n }",
"protected function getSession_SaveListenerService()\n {\n return $this->services['session.save_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\SaveSessionListener();\n }",
"protected function getSession_SaveListenerService()\n {\n return $this->services['session.save_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\SaveSessionListener();\n }",
"protected function getEventDispatcherService()\n {\n $this->services['event_dispatcher'] = $instance = new \\Symfony\\Component\\EventDispatcher\\ContainerAwareEventDispatcher($this);\n\n $instance->addListenerService('kernel.request', array(0 => 'knp_menu.listener.voters', 1 => 'onKernelRequest'), 0);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_blog.blog_menu_listener', 1 => 'addGlobal'), 90);\n $instance->addListenerService('victoire_core.article_menu.contextual', array(0 => 'victoire_blog.article_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('victoire_core.article_menu.contextual', array(0 => 'victoire_blog.article_settings_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('victoire_core.blog_menu.contextual', array(0 => 'victoire_blog.blog_menu.contextual', 1 => 'addBlogContextual'), 0);\n $instance->addListenerService('victoire_core.article_template_menu.contextual', array(0 => 'victoire_blog.article_template_menu.menu_listener.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('victoire_core.blog_menu.contextual', array(0 => 'victoire_blog.blog_page_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('victoire.widget_filter.form.pre_set_data', array(0 => 'victoire.widget_filter.form.listener.presetdata', 1 => 'manageExtraFiltersFields'), 1);\n $instance->addListenerService('victoire.widget_filter.form.pre_submit', array(0 => 'victoire.widget_filter.form.listener.presubmit', 1 => 'manageExtraFiltersFields'), 1);\n $instance->addListenerService('victoire.widget_filter.form.date.set_default_value', array(0 => 'victoire.widget_filter.blog.set.default.values.form.listener', 1 => 'setDefaultDateValue'), 1);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_business_page.business_template_menu_listener', 1 => 'addGlobal'), 50);\n $instance->addListenerService('victoire_core.business_template_menu.contextual', array(0 => 'victoire_core.business_template_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('kernel.request', array(0 => 'victoire_core.menu_dispatcher', 1 => 'onKernelRequest'), 0);\n $instance->addListenerService('victoire_core.backend_menu.global', array(0 => 'victoire_core.backend_menu_listener', 1 => 'addGlobal'), 100);\n $instance->addListenerService('kernel.controller', array(0 => 'victoire_core.listener.controller_listener', 1 => 'preExecuteAutorun'), 0);\n $instance->addListenerService('victoire.on_render_page', array(0 => 'victoire_core.view_css_listener', 1 => 'onRenderPage'), 0);\n $instance->addListenerService('kernel.request', array(0 => 'victoire_i18n.kernelrequest.listener', 1 => 'onKernelRequest'), 0);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_core.media_menu_listener', 1 => 'addGlobal'), 60);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_core.page_menu_listener', 1 => 'addGlobal'), 100);\n $instance->addListenerService('victoire_core.page_menu.contextual', array(0 => 'victoire_core.page_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_sitemap.sitemap_menu_listener', 1 => 'addGlobal'), 70);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_core.template_menu_listener', 1 => 'addGlobal'), 80);\n $instance->addListenerService('victoire_core.template_menu.contextual', array(0 => 'victoire_core.template_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('kernel.request', array(0 => 'victoire_twig.kernelrequest.listener', 1 => 'onKernelRequest'), 0);\n $instance->addListenerService('kernel.request', array(0 => 'victoire_view_reference.cache_warmer', 1 => 'warmUp'), 0);\n $instance->addSubscriberService('response_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\ResponseListener');\n $instance->addSubscriberService('streamed_response_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\StreamedResponseListener');\n $instance->addSubscriberService('locale_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\LocaleListener');\n $instance->addSubscriberService('validate_request_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\ValidateRequestListener');\n $instance->addSubscriberService('translator_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\TranslatorListener');\n $instance->addSubscriberService('session_listener', 'Symfony\\\\Bundle\\\\FrameworkBundle\\\\EventListener\\\\SessionListener');\n $instance->addSubscriberService('session.save_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\SaveSessionListener');\n $instance->addSubscriberService('fragment.listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\FragmentListener');\n $instance->addSubscriberService('debug.debug_handlers_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\DebugHandlersListener');\n $instance->addSubscriberService('router_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\RouterListener');\n $instance->addSubscriberService('security.firewall', 'Symfony\\\\Component\\\\Security\\\\Http\\\\Firewall');\n $instance->addSubscriberService('security.rememberme.response_listener', 'Symfony\\\\Component\\\\Security\\\\Http\\\\RememberMe\\\\ResponseListener');\n $instance->addSubscriberService('twig.exception_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\ExceptionListener');\n $instance->addSubscriberService('monolog.handler.console', 'Symfony\\\\Bridge\\\\Monolog\\\\Handler\\\\ConsoleHandler');\n $instance->addSubscriberService('swiftmailer.email_sender.listener', 'Symfony\\\\Bundle\\\\SwiftmailerBundle\\\\EventListener\\\\EmailSenderListener');\n $instance->addSubscriberService('sensio_framework_extra.controller.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\ControllerListener');\n $instance->addSubscriberService('sensio_framework_extra.converter.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\ParamConverterListener');\n $instance->addSubscriberService('sensio_framework_extra.view.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\TemplateListener');\n $instance->addSubscriberService('sensio_framework_extra.cache.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\HttpCacheListener');\n $instance->addSubscriberService('sensio_framework_extra.security.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\SecurityListener');\n $instance->addSubscriberService('troopers_alertifybundle.event_listener', 'Troopers\\\\AlertifyBundle\\\\EventListener\\\\AlertifyListener');\n $instance->addSubscriberService('fos_user.security.interactive_login_listener', 'FOS\\\\UserBundle\\\\EventListener\\\\LastLoginListener');\n $instance->addSubscriberService('fos_user.listener.authentication', 'FOS\\\\UserBundle\\\\EventListener\\\\AuthenticationListener');\n $instance->addSubscriberService('fos_user.listener.flash', 'FOS\\\\UserBundle\\\\EventListener\\\\FlashListener');\n $instance->addSubscriberService('fos_user.listener.resetting', 'FOS\\\\UserBundle\\\\EventListener\\\\ResettingListener');\n $instance->addSubscriberService('victoire_core.cache_subscriber', 'Victoire\\\\Bundle\\\\CoreBundle\\\\EventSubscriber\\\\CacheSubscriber');\n $instance->addSubscriberService('victoire_i18n.locale_subscriber', 'Victoire\\\\Bundle\\\\I18nBundle\\\\Subscriber\\\\LocaleSubscriber');\n $instance->addSubscriberService('victoire_view_reference.listener', 'Victoire\\\\Bundle\\\\ViewReferenceBundle\\\\Listener\\\\ViewReferenceListener');\n\n return $instance;\n }",
"protected function getVictoireSitemap_SitemapMenuListenerService()\n {\n return $this->services['victoire_sitemap.sitemap_menu_listener'] = new \\Victoire\\Bundle\\SitemapBundle\\Listener\\SiteMapMenuListener($this->get('victoire_core.admin_menu_builder'));\n }",
"public function getListeningToGlobalEvents()\n\t{\n\t\treturn $this->_listeningenabled;\n\t}",
"public static function getSubscribedEvents()\n {\n return array(\n KernelEvents::RESPONSE => array('onResponse', 200)\n );\n }",
"protected function getVictoireCore_MediaMenuListenerService()\n {\n return $this->services['victoire_core.media_menu_listener'] = new \\Victoire\\Bundle\\MediaBundle\\EventListener\\MediaMenuListener($this->get('victoire_core.admin_menu_builder'));\n }",
"protected function getKernelTerminateSubscriberService()\n {\n return $this->services['kernel_terminate_subscriber'] = new \\phpbb\\event\\kernel_terminate_subscriber();\n }",
"public function getService()\n\t{\n\t\treturn $this->_service;\n\t}",
"protected function resolveListener(string $listener)\n {\n return Container::getInstance()->make($listener);\n }",
"protected function _listener($name) {\n\t\treturn $this->_crud()->listener($name);\n\t}",
"public function getEventSubscriber();",
"public function listener($name) {\n\t\treturn $this->_loadListener($name);\n\t}",
"function getService() {\n return $this->service;\n }",
"public function getServiceManager()\n {\n return $this->sm;\n }",
"protected function getDispatcher()\n {\n return $this->di->getShared('dispatcher');\n }",
"public static function service() {\n return self::$app->serviceContainer;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"protected abstract function service(Response $response);",
"public function & GetResponse ();",
"public function getServiceManager ()\n {\n return $this->serviceManager;\n }",
"protected function getVictoireCore_PageMenuListenerService()\n {\n return $this->services['victoire_core.page_menu_listener'] = new \\Victoire\\Bundle\\PageBundle\\Listener\\PageMenuListener($this->get('victoire_core.admin_menu_builder'));\n }",
"function get_response() {\n return $this->response;\n }",
"public function getService() {\n return $this->service;\n }",
"public function getResponse(): ResponseInterface\n {\n return $this->response;\n }",
"private static function getService()\n {\n return self::$app->get(static::SERVICE_NAME);\n }",
"public function service()\r\n {\r\n return $this->service;\r\n }",
"public function sharedInstance() {\n\t\tif (!self::$popServerInstance) {\n\t\t\tself::$popServerInstance = new PopServer();\n\t\t}\n\t\treturn self::$popServerInstance;\n\t}",
"public function service(): SpanContextServiceInterface;",
"public function getService()\n\t{\n\t\treturn $this->service;\n\t}",
"protected function getService()\n {\n return $this->service;\n }",
"protected function getService()\n {\n return $this->service;\n }",
"public function _getServTranslator() {\n if (!$this->_servTranslator) {\n $this->_servTranslator = $this->getServiceLocator()->get('translator');\n }\n return $this->_servTranslator;\n }",
"public static function getSharedDispatcher()\n {\n if (!self::$sharedDispatcher) {\n /** @var ObjectManagerInterface $objectManager */\n $objectManager = GeneralUtility::makeInstance(ObjectManager::class);\n $requestFactory = $objectManager->getRequestFactory();\n $responseFactory = $objectManager->getResponseFactory();\n /** @var LoggerInterface $logger */\n $logger = $objectManager->get(LoggerInterface::class);\n new static($objectManager, $requestFactory, $responseFactory, $logger);\n }\n\n return self::$sharedDispatcher;\n }",
"public function hookManager()\n {\n return $this->hookManager;\n }",
"public function _getServTranslator()\n {\n if (!$this->_servTranslator) {\n $this->_servTranslator = $this->getServiceLocator()->get('translator');\n }\n return $this->_servTranslator;\n }",
"protected function getServiceManager()\n {\n return $this->serviceManager;\n }",
"public function getSharedManager();",
"public function getResponse()\n {\n return $this->getService('response');\n }",
"public function service()\n {\n return $this->service;\n }",
"private function getEventManager()\n {\n return $this->container->get('event_manager');\n }",
"public function service() {\n return $this->service;\n }",
"public function getEventsManager() : ManagerInterface;",
"public function getServiceManager()\n {\n return $this->serviceManager;\n }",
"public function getServiceManager()\n {\n return $this->serviceManager;\n }",
"public function getServiceManager()\n {\n return $this->serviceManager;\n }",
"public function getServiceManager()\n {\n return $this->serviceManager;\n }",
"public function getServiceManager()\n {\n return $this->serviceManager;\n }",
"public function getServiceManager()\n {\n return $this->serviceManager;\n }",
"public function getServiceManager()\n {\n return $this->serviceManager;\n }",
"protected function getSensioFrameworkExtra_Converter_ListenerService()\n {\n return $this->services['sensio_framework_extra.converter.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\ParamConverterListener($this->get('sensio_framework_extra.converter.manager'), true);\n }",
"public function getServiceManager()\n\t{\n\t\treturn $this->serviceManager;\n\t}",
"protected function getSensioFrameworkExtra_View_ListenerService()\n {\n return $this->services['sensio_framework_extra.view.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\TemplateListener($this);\n }"
] | [
"0.6964602",
"0.6964602",
"0.6646084",
"0.6445306",
"0.6445306",
"0.6370569",
"0.6245782",
"0.6130004",
"0.60417694",
"0.59607446",
"0.59505457",
"0.5903538",
"0.5880026",
"0.58570784",
"0.58344215",
"0.57355744",
"0.5716154",
"0.5657327",
"0.5654008",
"0.55570143",
"0.5510694",
"0.54874",
"0.5469266",
"0.54420686",
"0.5432619",
"0.5377751",
"0.5332994",
"0.5316771",
"0.5281793",
"0.52431786",
"0.5240783",
"0.5228373",
"0.5219967",
"0.5216202",
"0.5216167",
"0.5202332",
"0.51882875",
"0.517415",
"0.51709014",
"0.51709014",
"0.51704705",
"0.51704705",
"0.5165219",
"0.51593184",
"0.5130859",
"0.51293343",
"0.51259726",
"0.51032996",
"0.50798374",
"0.50754803",
"0.5068286",
"0.5037312",
"0.5032485",
"0.50137043",
"0.5010758",
"0.50105375",
"0.5009341",
"0.50002706",
"0.50002706",
"0.50002706",
"0.50002706",
"0.50002706",
"0.50002706",
"0.50002706",
"0.49955952",
"0.49892992",
"0.49871522",
"0.49857786",
"0.49847716",
"0.4973216",
"0.49730888",
"0.49687073",
"0.49624702",
"0.49593636",
"0.49538922",
"0.49519587",
"0.49504095",
"0.49504095",
"0.49394137",
"0.49368978",
"0.49311167",
"0.49286172",
"0.49234608",
"0.4920652",
"0.4912378",
"0.49114412",
"0.49094522",
"0.49046108",
"0.4879095",
"0.4876573",
"0.4876573",
"0.4876573",
"0.4876573",
"0.4876573",
"0.4876573",
"0.4876573",
"0.48687646",
"0.48656777",
"0.48536664"
] | 0.7617495 | 1 |
Gets the private 'translator.default' shared service. | protected function getTranslator_DefaultService()
{
$this->services['translator.default'] = $instance = new \Symfony\Bundle\FrameworkBundle\Translation\Translator(new \Symfony\Component\DependencyInjection\ServiceLocator(array('translation.loader.csv' => function () {
return ${($_ = isset($this->services['translation.loader.csv']) ? $this->services['translation.loader.csv'] : $this->services['translation.loader.csv'] = new \Symfony\Component\Translation\Loader\CsvFileLoader()) && false ?: '_'};
}, 'translation.loader.dat' => function () {
return ${($_ = isset($this->services['translation.loader.dat']) ? $this->services['translation.loader.dat'] : $this->services['translation.loader.dat'] = new \Symfony\Component\Translation\Loader\IcuDatFileLoader()) && false ?: '_'};
}, 'translation.loader.ini' => function () {
return ${($_ = isset($this->services['translation.loader.ini']) ? $this->services['translation.loader.ini'] : $this->services['translation.loader.ini'] = new \Symfony\Component\Translation\Loader\IniFileLoader()) && false ?: '_'};
}, 'translation.loader.json' => function () {
return ${($_ = isset($this->services['translation.loader.json']) ? $this->services['translation.loader.json'] : $this->services['translation.loader.json'] = new \Symfony\Component\Translation\Loader\JsonFileLoader()) && false ?: '_'};
}, 'translation.loader.mo' => function () {
return ${($_ = isset($this->services['translation.loader.mo']) ? $this->services['translation.loader.mo'] : $this->services['translation.loader.mo'] = new \Symfony\Component\Translation\Loader\MoFileLoader()) && false ?: '_'};
}, 'translation.loader.php' => function () {
return ${($_ = isset($this->services['translation.loader.php']) ? $this->services['translation.loader.php'] : $this->services['translation.loader.php'] = new \Symfony\Component\Translation\Loader\PhpFileLoader()) && false ?: '_'};
}, 'translation.loader.po' => function () {
return ${($_ = isset($this->services['translation.loader.po']) ? $this->services['translation.loader.po'] : $this->services['translation.loader.po'] = new \Symfony\Component\Translation\Loader\PoFileLoader()) && false ?: '_'};
}, 'translation.loader.qt' => function () {
return ${($_ = isset($this->services['translation.loader.qt']) ? $this->services['translation.loader.qt'] : $this->services['translation.loader.qt'] = new \Symfony\Component\Translation\Loader\QtFileLoader()) && false ?: '_'};
}, 'translation.loader.res' => function () {
return ${($_ = isset($this->services['translation.loader.res']) ? $this->services['translation.loader.res'] : $this->services['translation.loader.res'] = new \Symfony\Component\Translation\Loader\IcuResFileLoader()) && false ?: '_'};
}, 'translation.loader.xliff' => function () {
return ${($_ = isset($this->services['translation.loader.xliff']) ? $this->services['translation.loader.xliff'] : $this->services['translation.loader.xliff'] = new \Symfony\Component\Translation\Loader\XliffFileLoader()) && false ?: '_'};
}, 'translation.loader.yml' => function () {
return ${($_ = isset($this->services['translation.loader.yml']) ? $this->services['translation.loader.yml'] : $this->services['translation.loader.yml'] = new \Symfony\Component\Translation\Loader\YamlFileLoader()) && false ?: '_'};
})), new \Symfony\Component\Translation\Formatter\MessageFormatter(new \Symfony\Component\Translation\MessageSelector()), 'en', array('translation.loader.php' => array(0 => 'php'), 'translation.loader.yml' => array(0 => 'yaml', 1 => 'yml'), 'translation.loader.xliff' => array(0 => 'xlf', 1 => 'xliff'), 'translation.loader.po' => array(0 => 'po'), 'translation.loader.mo' => array(0 => 'mo'), 'translation.loader.qt' => array(0 => 'ts'), 'translation.loader.csv' => array(0 => 'csv'), 'translation.loader.res' => array(0 => 'res'), 'translation.loader.dat' => array(0 => 'dat'), 'translation.loader.ini' => array(0 => 'ini'), 'translation.loader.json' => array(0 => 'json')), array('cache_dir' => ($this->targetDirs[0].'/translations'), 'debug' => true, 'resource_files' => array('af' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.af.xlf')), 'ar' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.ar.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.ar.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.ar.xlf')), 'az' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.az.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.az.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.az.xlf')), 'bg' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.bg.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.bg.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.bg.xlf')), 'ca' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.ca.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.ca.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.ca.xlf')), 'cs' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.cs.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.cs.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.cs.xlf')), 'cy' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.cy.xlf')), 'da' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.da.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.da.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.da.xlf')), 'de' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.de.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.de.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.de.xlf')), 'el' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.el.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.el.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.el.xlf')), 'en' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.en.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.en.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.en.xlf')), 'es' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.es.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.es.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.es.xlf')), 'et' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.et.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.et.xlf')), 'eu' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.eu.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.eu.xlf')), 'fa' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.fa.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.fa.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.fa.xlf')), 'fi' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.fi.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.fi.xlf')), 'fr' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.fr.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.fr.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.fr.xlf')), 'gl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.gl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.gl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.gl.xlf')), 'he' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.he.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.he.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.he.xlf')), 'hr' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.hr.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.hr.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.hr.xlf')), 'hu' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.hu.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.hu.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.hu.xlf')), 'hy' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.hy.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.hy.xlf')), 'id' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.id.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.id.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.id.xlf')), 'it' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.it.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.it.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.it.xlf')), 'ja' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.ja.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.ja.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.ja.xlf')), 'lb' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.lb.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.lb.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.lb.xlf')), 'lt' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.lt.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.lt.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.lt.xlf')), 'lv' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.lv.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.lv.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.lv.xlf')), 'mn' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.mn.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.mn.xlf')), 'nb' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.nb.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.nb.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.nb.xlf')), 'nl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.nl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.nl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.nl.xlf')), 'nn' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.nn.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.nn.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.nn.xlf')), 'no' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.no.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.no.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.no.xlf')), 'pl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.pl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.pl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.pl.xlf')), 'pt' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.pt.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.pt.xlf')), 'pt_BR' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.pt_BR.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.pt_BR.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.pt_BR.xlf')), 'ro' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.ro.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.ro.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.ro.xlf')), 'ru' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.ru.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.ru.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.ru.xlf')), 'sk' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.sk.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.sk.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.sk.xlf')), 'sl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.sl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.sl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.sl.xlf')), 'sq' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.sq.xlf')), 'sr_Cyrl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.sr_Cyrl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.sr_Cyrl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.sr_Cyrl.xlf')), 'sr_Latn' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.sr_Latn.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.sr_Latn.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.sr_Latn.xlf')), 'sv' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.sv.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.sv.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.sv.xlf')), 'th' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.th.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.th.xlf')), 'tl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.tl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.tl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.tl.xlf')), 'tr' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.tr.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.tr.xlf')), 'uk' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.uk.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.uk.xlf')), 'vi' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.vi.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.vi.xlf')), 'zh_CN' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.zh_CN.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.zh_CN.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.zh_CN.xlf')), 'zh_TW' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.zh_TW.xlf')), 'pt_PT' => array(0 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.pt_PT.xlf')), 'ua' => array(0 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.ua.xlf')))));
$instance->setConfigCacheFactory(${($_ = isset($this->services['config_cache_factory']) ? $this->services['config_cache_factory'] : $this->getConfigCacheFactoryService()) && false ?: '_'});
$instance->setFallbackLocales(array(0 => 'en'));
return $instance;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getTranslator_DefaultService()\n {\n $this->services['translator.default'] = $instance = new \\Victoire\\Bundle\\I18nBundle\\Translation\\Translator($this, ${($_ = isset($this->services['translator.selector']) ? $this->services['translator.selector'] : $this->getTranslator_SelectorService()) && false ?: '_'}, array('translation.loader.php' => array(0 => 'php'), 'translation.loader.yml' => array(0 => 'yml'), 'translation.loader.xliff' => array(0 => 'xlf', 1 => 'xliff'), 'translation.loader.po' => array(0 => 'po'), 'translation.loader.mo' => array(0 => 'mo'), 'translation.loader.qt' => array(0 => 'ts'), 'translation.loader.csv' => array(0 => 'csv'), 'translation.loader.res' => array(0 => 'res'), 'translation.loader.dat' => array(0 => 'dat'), 'translation.loader.ini' => array(0 => 'ini'), 'translation.loader.json' => array(0 => 'json')), array('cache_dir' => (__DIR__.'/translations'), 'debug' => false, 'resource_files' => array('sr_Latn' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sr_Latn.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.sr_Latn.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.sr_Latn.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.sr_Latn.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.sr_Latn.yml')), 'pl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.pl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.pl.xlf'), 3 => ($this->targetDirs[3].'/vendor/troopers/alertify-bundle/Troopers/AlertifyBundle/Resources/translations/alertify.pl.xliff'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.pl.yml'), 5 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.pl.yml')), 'he' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.he.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.he.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.he.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.he.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.he.yml')), 'ro' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ro.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.ro.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.ro.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.ro.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.ro.yml')), 'et' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.et.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.et.xlf'), 2 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.et.yml')), 'fa' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.fa.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.fa.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.fa.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.fa.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.fa.yml')), 'ar' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ar.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.ar.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.ar.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.ar.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.ar.yml')), 'cy' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.cy.xlf')), 'gl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.gl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.gl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.gl.xlf')), 'th' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.th.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.th.xlf'), 2 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.th.yml'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.th.yml')), 'ru' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ru.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.ru.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.ru.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.ru.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.ru.yml')), 'sv' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sv.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.sv.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.sv.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.sv.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.sv.yml')), 'da' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.da.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.da.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.da.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.da.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.da.yml')), 'fi' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.fi.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.fi.xlf'), 2 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.fi.yml'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.fi.yml')), 'lb' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.lb.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.lb.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.lb.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.lb.yml')), 'zh_CN' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.zh_CN.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.zh_CN.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.zh_CN.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.zh_CN.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.zh_CN.yml')), 'nl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.nl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.nl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.nl.xlf'), 3 => ($this->targetDirs[3].'/vendor/troopers/alertify-bundle/Troopers/AlertifyBundle/Resources/translations/alertify.nl.xliff'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.nl.yml'), 5 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.nl.yml')), 'fr' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.fr.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.fr.xlf'), 3 => ($this->targetDirs[3].'/vendor/troopers/alertify-bundle/Troopers/AlertifyBundle/Resources/translations/alertify.fr.xliff'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.fr.yml'), 5 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.fr.yml'), 6 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BlogBundle/Resources/translations/messages.fr.xliff'), 7 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BlogBundle/Resources/translations/victoire.fr.xliff'), 8 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessEntityBundle/Resources/translations/victoire.fr.xliff'), 9 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessPageBundle/Resources/translations/messages.fr.xliff'), 10 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessPageBundle/Resources/translations/victoire.fr.xliff'), 11 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/CoreBundle/Resources/translations/victoire.fr.xliff'), 12 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/CriteriaBundle/Resources/translations/victoire.fr.xliff'), 13 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/FormBundle/Resources/translations/victoire.fr.xliff'), 14 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/I18nBundle/Resources/translations/victoire.fr.xliff'), 15 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/MediaBundle/Resources/translations/messages.fr.xliff'), 16 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/MediaBundle/Resources/translations/victoire.fr.xliff'), 17 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/PageBundle/Resources/translations/messages.fr.xliff'), 18 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/PageBundle/Resources/translations/victoire.fr.xliff'), 19 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/SeoBundle/Resources/translations/victoire.fr.xliff'), 20 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/SitemapBundle/Resources/translations/victoire.fr.xliff'), 21 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/TemplateBundle/Resources/translations/victoire.fr.xliff'), 22 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/TemplateBundle/Resources/translations/messages.fr.xlf'), 23 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/UserBundle/Resources/translations/victoire.fr.xliff'), 24 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/WidgetBundle/Resources/translations/victoire.fr.xliff')), 'mn' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.mn.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.mn.xlf')), 'af' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.af.xlf'), 1 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.af.yml')), 'hr' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.hr.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.hr.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.hr.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.hr.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.hr.yml')), 'tr' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.tr.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.tr.xlf'), 2 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.tr.yml'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.tr.yml')), 'az' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.az.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.az.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.az.xlf')), 'no' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.no.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.no.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.no.xlf')), 'hy' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.hy.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.hy.xlf')), 'sq' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sq.xlf')), 'zh_TW' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.zh_TW.xlf')), 'en' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.en.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.en.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.en.xlf'), 3 => ($this->targetDirs[3].'/vendor/troopers/alertify-bundle/Troopers/AlertifyBundle/Resources/translations/alertify.en.xliff'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.en.yml'), 5 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.en.yml'), 6 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BlogBundle/Resources/translations/messages.en.xliff'), 7 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BlogBundle/Resources/translations/victoire.en.xliff'), 8 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessEntityBundle/Resources/translations/victoire.en.xliff'), 9 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessPageBundle/Resources/translations/messages.en.xliff'), 10 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessPageBundle/Resources/translations/victoire.en.xliff'), 11 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/CoreBundle/Resources/translations/victoire.en.xliff'), 12 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/CriteriaBundle/Resources/translations/victoire.en.xliff'), 13 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/FormBundle/Resources/translations/victoire.en.xliff'), 14 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/I18nBundle/Resources/translations/victoire.en.xliff'), 15 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/MediaBundle/Resources/translations/messages.en.xliff'), 16 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/MediaBundle/Resources/translations/victoire.en.xliff'), 17 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/PageBundle/Resources/translations/victoire.en.xliff'), 18 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/SeoBundle/Resources/translations/victoire.en.xliff'), 19 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/SitemapBundle/Resources/translations/victoire.en.xliff'), 20 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/TemplateBundle/Resources/translations/victoire.en.xliff'), 21 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/UserBundle/Resources/translations/victoire.en.xliff'), 22 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/WidgetBundle/Resources/translations/victoire.en.xliff')), 'lv' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.lv.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.lv.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.lv.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.lv.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.lv.yml')), 'pt' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.pt.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.pt.xlf'), 2 => ($this->targetDirs[3].'/vendor/troopers/alertify-bundle/Troopers/AlertifyBundle/Resources/translations/alertify.pt.xliff'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.pt.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.pt.yml')), 'ca' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ca.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.ca.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.ca.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.ca.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.ca.yml')), 'lt' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.lt.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.lt.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.lt.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.lt.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.lt.yml')), 'id' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.id.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.id.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.id.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.id.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.id.yml')), 'eu' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.eu.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.eu.xlf'), 2 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.eu.yml'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.eu.yml')), 'bg' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.bg.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.bg.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.bg.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.bg.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.bg.yml')), 'ja' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ja.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.ja.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.ja.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.ja.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.ja.yml')), 'sr_Cyrl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sr_Cyrl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.sr_Cyrl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.sr_Cyrl.xlf')), 'nn' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.nn.xlf')), 'sl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.sl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.sl.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.sl.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.sl.yml')), 'uk' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.uk.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.uk.xlf'), 2 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.uk.yml'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.uk.yml')), 'cs' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.cs.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.cs.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.cs.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.cs.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.cs.yml')), 'el' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.el.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.el.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.el.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.el.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.el.yml')), 'vi' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.vi.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.vi.xlf'), 2 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.vi.yml'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.vi.yml')), 'de' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.de.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.de.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.de.xlf'), 3 => ($this->targetDirs[3].'/vendor/troopers/alertify-bundle/Troopers/AlertifyBundle/Resources/translations/alertify.de.xliff'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.de.yml'), 5 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.de.yml')), 'it' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.it.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.it.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.it.xlf'), 3 => ($this->targetDirs[3].'/vendor/troopers/alertify-bundle/Troopers/AlertifyBundle/Resources/translations/alertify.it.xliff'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.it.yml'), 5 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.it.yml')), 'sk' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sk.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.sk.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.sk.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.sk.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.sk.yml')), 'hu' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.hu.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.hu.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.hu.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.hu.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.hu.yml')), 'es' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.es.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.es.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.es.xlf'), 3 => ($this->targetDirs[3].'/vendor/troopers/alertify-bundle/Troopers/AlertifyBundle/Resources/translations/alertify.es.xliff'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.es.yml'), 5 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.es.yml'), 6 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BlogBundle/Resources/translations/victoire.es.xliff'), 7 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BlogBundle/Resources/translations/messages.es.xliff'), 8 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessEntityBundle/Resources/translations/victoire.es.xliff'), 9 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessPageBundle/Resources/translations/victoire.es.xliff'), 10 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessPageBundle/Resources/translations/messages.es.xliff'), 11 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/CoreBundle/Resources/translations/victoire.es.xliff'), 12 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/CriteriaBundle/Resources/translations/victoire.es.xliff'), 13 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/FormBundle/Resources/translations/victoire.es.xliff'), 14 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/I18nBundle/Resources/translations/victoire.es.xliff'), 15 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/MediaBundle/Resources/translations/victoire.es.xliff'), 16 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/MediaBundle/Resources/translations/messages.es.xliff'), 17 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/PageBundle/Resources/translations/victoire.es.xliff'), 18 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/SeoBundle/Resources/translations/victoire.es.xliff'), 19 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/SitemapBundle/Resources/translations/victoire.es.xliff'), 20 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/TemplateBundle/Resources/translations/victoire.es.xliff'), 21 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/UserBundle/Resources/translations/victoire.es.xliff'), 22 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/WidgetBundle/Resources/translations/victoire.es.xliff')), 'pt_BR' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.pt_BR.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.pt_BR.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.pt_BR.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.pt_BR.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.pt_BR.yml')), 'pt_PT' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.pt_PT.xlf')), 'ua' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.ua.xlf')), 'ky' => array(0 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.ky.yml'), 1 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.ky.yml')), 'eo' => array(0 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.eo.yml'), 1 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.eo.yml')), 'nb' => array(0 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.nb.yml'), 1 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.nb.yml')))), array());\n\n $instance->setConfigCacheFactory($this->get('config_cache_factory'));\n $instance->setFallbackLocales(array(0 => 'en'));\n\n return $instance;\n }",
"protected function getA2lixTranslationForm_Default_Service_TranslationService()\n {\n return $this->services['a2lix_translation_form.default.service.translation'] = new \\A2lix\\TranslationFormBundle\\TranslationForm\\TranslationForm($this->get('form.registry'), $this->get('doctrine'));\n }",
"protected function _getTranslator() {\n \tif(null == $this->translator) {\n \t\t$sm = $this->getServiceLocator();\n \t\t$this->translator = \\Application\\Util\\ServicesUtil::getTranslatorService($sm);\n \t}\n \treturn $this->translator;\n }",
"public static function getDefaultTranslator()\n {\n if (null === self::$_translatorDefault) {\n require_once 'Zend/Registry.php';\n if (Zend_Registry::isRegistered('Zend_Translate')) {\n $translator = Zend_Registry::get('Zend_Translate');\n if ($translator instanceof Zend_Translate_Adapter) {\n return $translator;\n } elseif ($translator instanceof Zend_Translate) {\n return $translator->getAdapter();\n }\n } else {\n \t$front = Zend_Controller_Front::getInstance();\n \t$bootstrap = $front->getParam('bootstrap');\n \t\t$translator = $bootstrap->getResource('translate');\n \tif ($translator instanceof Zend_Translate_Adapter) {\n return $translator;\n } elseif ($translator instanceof Zend_Translate) {\n return $translator->getAdapter();\n }\n }\n }\n return self::$_translatorDefault;\n }",
"public function _getServTranslator() {\n if (!$this->_servTranslator) {\n $this->_servTranslator = $this->getServiceLocator()->get('translator');\n }\n return $this->_servTranslator;\n }",
"public function _getServTranslator()\n {\n if (!$this->_servTranslator) {\n $this->_servTranslator = $this->getServiceLocator()->get('translator');\n }\n return $this->_servTranslator;\n }",
"public static function getDefaultTranslator()\n {\n if (null === self::$_translatorDefault) {\n // require_once 'Zend/Registry.php';\n if (Zend_Registry::isRegistered('translator')) {\n $translator = Zend_Registry::get('translator');\n if ($translator instanceof Zend_Translate_Adapter) {\n return $translator;\n } elseif ($translator instanceof Zend_Translate) {\n return $translator->getAdapter();\n }\n }\n }\n return self::$_translatorDefault;\n }",
"public static function getDefaultTranslator()\n\t{\n\t\tif (null === self::$_defaultTranslator) {\n\t\t\trequire_once 'Zend/Registry.php';\n\t\t\tif (Zend_Registry::isRegistered('Zend_Translate')) {\n\t\t\t\t$translator = Zend_Registry::get('Zend_Translate');\n\t\t\t\tif ($translator instanceof Zend_Translate_Adapter) {\n\t\t\t\t\treturn $translator;\n\t\t\t\t} elseif ($translator instanceof Zend_Translate) {\n\t\t\t\t\treturn $translator->getAdapter();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\treturn self::$_defaultTranslator;\n\t}",
"public static function getDefaultTranslator()\n {\n if (null === self::$_translatorDefault) {\n require_once 'Zend/Registry.php';\n if (Zend_Registry::isRegistered('Zend_Translate')) {\n $translator = Zend_Registry::get('Zend_Translate');\n if ($translator instanceof Zend_Translate_Adapter) {\n return $translator;\n } elseif ($translator instanceof Zend_Translate) {\n return $translator->getAdapter();\n }\n }\n }\n return self::$_translatorDefault;\n }",
"protected function getA2lixTranslationForm_Default_Type_TranslationsService()\n {\n return $this->services['a2lix_translation_form.default.type.translations'] = new \\A2lix\\TranslationFormBundle\\Form\\Type\\TranslationsType($this->get('a2lix_translation_form.default.listener.translations'), $this->get('a2lix_translation_form.default.service.parameter_locale_provider'));\n }",
"public static function get()\n {\n return new TranslationsService();\n }",
"protected function getVictoireI18n_TranslatorService()\n {\n return $this->services['victoire_i18n.translator'] = new \\Victoire\\Bundle\\I18nBundle\\Translation\\Translator($this, ${($_ = isset($this->services['translator.selector']) ? $this->services['translator.selector'] : $this->getTranslator_SelectorService()) && false ?: '_'}, array(), array('cache_dir' => (__DIR__.'/translations%'), 'debug' => false));\n }",
"protected function getA2lixTranslationForm_Default_Listener_TranslationsService()\n {\n return $this->services['a2lix_translation_form.default.listener.translations'] = new \\A2lix\\TranslationFormBundle\\Form\\EventListener\\TranslationsListener($this->get('a2lix_translation_form.default.service.translation'));\n }",
"private function getTranslator()\n {\n if (!$this->app->translator instanceof Translator) {\n $this->app->translator = new Translator($this->locale, new MessageSelector());\n $this->app->translator->addLoader('array', new ArrayLoader());\n $this->app->translator->addLoader('xliff', new XliffFileLoader());\n }\n\n return $this->app->translator;\n }",
"protected function getRouting_ResourcesLocator_DefaultService()\n {\n return $this->services['routing.resources_locator.default'] = new \\phpbb\\routing\\resources_locator\\default_resources_locator('./../', 'production', ${($_ = isset($this->services['ext.manager']) ? $this->services['ext.manager'] : $this->getExt_ManagerService()) && false ?: '_'});\n }",
"public function getTranslator() \n {\n if (!$this->translator) {\n //$this->setTranslator($this->getServiceLocator()->get('translator'));\n $this->setTranslator(\\Application\\Module::getService('translator'));\n }\n return $this->translator;\n }",
"protected static function getLanguageService() {}",
"public function getDefaultImportTranslator()\n {\n return $this->loader->getImportLoader()->getDefaultTranslator($this->getRequest()->getControllerName());\n }",
"protected function getA2lixTranslationForm_Default_Type_TranslatedentityService()\n {\n $this->services['a2lix_translation_form.default.type.translatedentity'] = $instance = new \\A2lix\\TranslationFormBundle\\Form\\Type\\TranslatedEntityType();\n\n $instance->setRequest(NULL);\n\n return $instance;\n }",
"protected function getA2lixTranslationForm_Default_Type_TranslationsformsService()\n {\n return $this->services['a2lix_translation_form.default.type.translationsforms'] = new \\A2lix\\TranslationFormBundle\\Form\\Type\\TranslationsFormsType($this->get('a2lix_translation_form.default.service.translation'), $this->get('a2lix_translation_form.default.listener.translationsforms'), $this->get('a2lix_translation_form.default.service.parameter_locale_provider'));\n }",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getA2lixTranslationForm_Default_Type_TranslationslocalesselectorService()\n {\n return $this->services['a2lix_translation_form.default.type.translationslocalesselector'] = new \\A2lix\\TranslationFormBundle\\Form\\Type\\TranslationsLocalesSelectorType($this->get('a2lix_translation_form.default.service.parameter_locale_provider'));\n }",
"public function getTranslator()\n {\n if (!$this->translator) {\n $this->setTranslator($this->getServiceManager()->get('translator'));\n }\n return $this->translator;\n }",
"protected function getLanguageService()\n {\n return $GLOBALS['LANG'];\n }",
"protected function getLanguageService()\n {\n return $GLOBALS['LANG'];\n }",
"protected function getLanguageService()\n {\n return $GLOBALS['LANG'];\n }",
"protected function getMonolog_Logger_TranslationService()\n {\n $this->services['monolog.logger.translation'] = $instance = new \\Symfony\\Bridge\\Monolog\\Logger('translation');\n\n $instance->pushHandler($this->get('monolog.handler.console'));\n $instance->pushHandler($this->get('monolog.handler.main'));\n\n return $instance;\n }",
"protected function getTranslator_SelectorService()\n {\n return $this->services['translator.selector'] = new \\Symfony\\Component\\Translation\\MessageSelector();\n }",
"protected function getSwiftmailer_Mailer_DefaultService()\n {\n return $this->services['swiftmailer.mailer.default'] = new \\Swift_Mailer($this->get('swiftmailer.mailer.default.transport'));\n }",
"protected function get_translator()\n\t{\n\t\treturn Translator::get($this->id);\n\t}",
"protected function getA2lixTranslationForm_Default_Listener_TranslationsformsService()\n {\n return $this->services['a2lix_translation_form.default.listener.translationsforms'] = new \\A2lix\\TranslationFormBundle\\Form\\EventListener\\TranslationsFormsListener();\n }",
"protected function getTranslatorListenerService()\n {\n return $this->services['translator_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\TranslatorListener(${($_ = isset($this->services['translator.default']) ? $this->services['translator.default'] : $this->getTranslator_DefaultService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack()) && false ?: '_'});\n }",
"public function getService ()\n {\n if (null === $this->_service) {\n $this->setService('Default_Service_Spirit');\n }\n return $this->_service;\n }",
"protected function getTranslation_Loader_PoService()\n {\n return $this->services['translation.loader.po'] = new \\Symfony\\Component\\Translation\\Loader\\PoFileLoader();\n }",
"protected function getI18nService()\n {\n $class = $this->getParameter('i18n.class');\n $instance = new $class($this->getParameter('i18n.path'));\n\n return $instance;\n }",
"protected function getTranslatorListenerService()\n {\n return $this->services['translator_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\TranslatorListener($this->get('translator.default'), $this->get('request_stack'));\n }",
"function &getTranslator()\n {\n return $this->_translator;\n }",
"protected function getLanguageService()\n {\n return $this->services['language'] = new \\phpbb\\language\\language(${($_ = isset($this->services['language.loader']) ? $this->services['language.loader'] : $this->getLanguage_LoaderService()) && false ?: '_'});\n }",
"protected function getStringTranslation() {\n if (!$this->stringTranslation) {\n $this->stringTranslation = \\Drupal::service('string_translation');\n }\n\n return $this->stringTranslation;\n }",
"public function getTranslationManager()\n {\n return $this->getKernel()->getContainer()->get('worldia.textmaster.manager.translation');\n }",
"public static function default(): string\n {\n $default = Cache::get('locale_default');\n\n if ($default === null) {\n $default = static::select('locale')->where('is_default', '=', true)->first();\n $default = ! empty($default) ? $default->locale : config('contentful.default_locale');\n\n // Cache is cleaned in Console\\Commands\\SyncLocales (run at least daily)\n Cache::forever('locale_default', $default);\n }\n\n return $default;\n }",
"protected function getTranslation_LoaderService()\n {\n $a = $this->get('translation.loader.xliff');\n\n $this->services['translation.loader'] = $instance = new \\Symfony\\Bundle\\FrameworkBundle\\Translation\\TranslationLoader();\n\n $instance->addLoader('php', $this->get('translation.loader.php'));\n $instance->addLoader('yml', $this->get('translation.loader.yml'));\n $instance->addLoader('xlf', $a);\n $instance->addLoader('xliff', $a);\n $instance->addLoader('po', $this->get('translation.loader.po'));\n $instance->addLoader('mo', $this->get('translation.loader.mo'));\n $instance->addLoader('ts', $this->get('translation.loader.qt'));\n $instance->addLoader('csv', $this->get('translation.loader.csv'));\n $instance->addLoader('res', $this->get('translation.loader.res'));\n $instance->addLoader('dat', $this->get('translation.loader.dat'));\n $instance->addLoader('ini', $this->get('translation.loader.ini'));\n $instance->addLoader('json', $this->get('translation.loader.json'));\n\n return $instance;\n }",
"public static function getDefault()\r\n {\r\n return self::get('default');\r\n }",
"protected function getTranslation_Loader_MoService()\n {\n return $this->services['translation.loader.mo'] = new \\Symfony\\Component\\Translation\\Loader\\MoFileLoader();\n }",
"public static function get_translate(){\n return self::$translate;\n }",
"static public function getTranslate()\r\n {\r\n return Warecorp_Translate::getTranslate();\r\n }",
"protected function getSwiftmailer_Mailer_Default_TransportService()\n {\n return $this->services['swiftmailer.mailer.default.transport'] = new \\Swift_Transport_SpoolTransport(${($_ = isset($this->services['swiftmailer.mailer.default.transport.eventdispatcher']) ? $this->services['swiftmailer.mailer.default.transport.eventdispatcher'] : $this->getSwiftmailer_Mailer_Default_Transport_EventdispatcherService()) && false ?: '_'}, $this->get('swiftmailer.mailer.default.spool'));\n }",
"protected function translator()\n {\n if (! $this->translator) {\n $this->translator = Mockery::mock(Translator::class);\n }\n\n return $this->translator;\n }",
"protected function getTranslation_Loader_IniService()\n {\n return $this->services['translation.loader.ini'] = new \\Symfony\\Component\\Translation\\Loader\\IniFileLoader();\n }",
"public function getTranslator()\n {\n return $this->translator;\n }",
"public function getTranslator()\n {\n return $this->translator;\n }",
"protected function getLiipImagine_Cache_Resolver_DefaultService()\n {\n return $this->services['liip_imagine.cache.resolver.default'] = new \\Liip\\ImagineBundle\\Imagine\\Cache\\Resolver\\WebPathResolver($this->get('filesystem'), ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'}, ($this->targetDirs[3].'/app/../web'), 'media/cache');\n }",
"public function getTranslator() {\n\t\treturn $this->translator;\n\t}",
"private static function getService()\n {\n return self::$app->get(static::SERVICE_NAME);\n }",
"protected function getA2lixTranslationForm_Default_Service_ParameterLocaleProviderService()\n {\n return $this->services['a2lix_translation_form.default.service.parameter_locale_provider'] = new \\A2lix\\TranslationFormBundle\\Locale\\DefaultProvider(array(0 => 'fr', 1 => 'en'), 'en', array());\n }",
"public static function hasDefaultTranslator()\n {\n return (bool)self::$_translatorDefault;\n }",
"public function getTranslator()\n {\n return $this['translator'];\n }",
"public function getLocaleService()\n {\n if (null === $this->localeService) {\n $this->localeService = $this->getServiceManager()->get('playgroundcore_locale_service');\n }\n\n return $this->localeService;\n }",
"protected function getA2lixTranslationForm_Default_Type_TranslationsfieldsService()\n {\n return $this->services['a2lix_translation_form.default.type.translationsfields'] = new \\A2lix\\TranslationFormBundle\\Form\\Type\\TranslationsFieldsType();\n }",
"public function getTranslationGenerator()\n {\n return $this->getKernel()->getContainer()->get('worldia.textmaster.generator.translation');\n }",
"protected function getTranslation_Loader_PhpService()\n {\n return $this->services['translation.loader.php'] = new \\Symfony\\Component\\Translation\\Loader\\PhpFileLoader();\n }",
"protected function getTranslation_WriterService()\n {\n $this->services['translation.writer'] = $instance = new \\Symfony\\Component\\Translation\\Writer\\TranslationWriter();\n\n $instance->addDumper('php', $this->get('translation.dumper.php'));\n $instance->addDumper('xlf', $this->get('translation.dumper.xliff'));\n $instance->addDumper('po', $this->get('translation.dumper.po'));\n $instance->addDumper('mo', $this->get('translation.dumper.mo'));\n $instance->addDumper('yml', $this->get('translation.dumper.yml'));\n $instance->addDumper('ts', $this->get('translation.dumper.qt'));\n $instance->addDumper('csv', $this->get('translation.dumper.csv'));\n $instance->addDumper('ini', $this->get('translation.dumper.ini'));\n $instance->addDumper('json', $this->get('translation.dumper.json'));\n $instance->addDumper('res', $this->get('translation.dumper.res'));\n\n return $instance;\n }",
"public function getTranslate()\n {\n if (! $this->translate) {\n if (\\Zend_Registry::isRegistered('Zend_Translate')) {\n $translate = \\Zend_Registry::get('Zend_Translate');\n } else {\n // Make sure there always is a translator\n //$translate = new \\MUtil_Translate_Adapter_Potemkin();\n //\\Zend_Registry::set('Zend_Translate', $translate);\n $translate = \\MUtil_Translate_Adapter_Potemkin::create();\n }\n\n $this->setTranslate($translate);\n }\n if (! $this->translateAdapter) {\n $this->translateAdapter = $this->translate->getAdapter();\n }\n\n return $this->translate;\n }",
"protected function getTranslation_ExtractorService()\n {\n $this->services['translation.extractor'] = $instance = new \\Symfony\\Component\\Translation\\Extractor\\ChainExtractor();\n\n $instance->addExtractor('php', $this->get('translation.extractor.php'));\n $instance->addExtractor('twig', $this->get('twig.translation.extractor'));\n\n return $instance;\n }",
"function i18n(): I18n\n\t{\n\t\tstatic $i18n;\n\n\t\tif($i18n === null)\n\t\t{\n\t\t\t$i18n = Application::instance()->getContainer()->get(I18n::class);\n\t\t}\n\n\t\treturn $i18n;\n\t}",
"protected function getMiconStringTranslation() {\n if (!$this->stringTranslation) {\n $this->stringTranslation = \\Drupal::service('string_translation');\n }\n return $this->stringTranslation;\n }",
"protected function getTranslation_Extractor_PhpService()\n {\n return $this->services['translation.extractor.php'] = new \\Symfony\\Bundle\\FrameworkBundle\\Translation\\PhpExtractor();\n }",
"public static function hasDefaultTranslator()\n\t{\n\t\treturn (bool)self::$_defaultTranslator;\n\t}",
"static public function getInstance() {\n\t\treturn GeneralUtility::makeInstance('Fab\\Messenger\\Service\\Html2Text');\n\t}",
"public static function getInstance()\n {\n return Doctrine_Core::getTable('Default_Model_Doctrine_Service');\n }",
"public static function getDefault()\n {\n return self::$default;\n }",
"public function translator(): Translator;",
"protected function getTwig_Translation_ExtractorService()\n {\n return $this->services['twig.translation.extractor'] = new \\Symfony\\Bridge\\Twig\\Translation\\TwigExtractor($this->get('twig'));\n }",
"public function getSiteDefaultLanguage();",
"public function defaultLocale()\n {\n $locales = $this->app('locales');\n\n foreach ($locales as $locale)\n {\n if( isset( $locale['default'] ) )\n return $locale['key'];\n }\n\n return false;\n }",
"private function getSystemTranslationObject()\n {\n if(!is_object($this->systemTranslationObj) && !($this->systemTranslationObj instanceof Translations)) {\n $this->systemTranslationObj = GeneralUtility::makeInstance('PITS\\\\Snowbabel\\\\Service\\\\Translations');\n }\n }",
"public function getDefault()\n {\n $this->_currentLocale = \\Locale::getDefault();\n return $this->_currentLocale;\n }",
"protected function getTemplating_LocatorService()\n {\n return $this->services['templating.locator'] = new \\Symfony\\Bundle\\FrameworkBundle\\Templating\\Loader\\TemplateLocator($this->get('file_locator'), __DIR__);\n }",
"protected function getTranslation_Dumper_PoService()\n {\n return $this->services['translation.dumper.po'] = new \\Symfony\\Component\\Translation\\Dumper\\PoFileDumper();\n }",
"static function getDefaultLocale()\r\n {\r\n return self::$defaultLocale;\r\n }",
"public function default(): Locale\n {\n return $this->defaultLocale;\n }",
"protected function getTranslation_Dumper_MoService()\n {\n return $this->services['translation.dumper.mo'] = new \\Symfony\\Component\\Translation\\Dumper\\MoFileDumper();\n }",
"protected function getSwiftmailer_Mailer_Default_Transport_EventdispatcherService()\n {\n return $this->services['swiftmailer.mailer.default.transport.eventdispatcher'] = new \\Swift_Events_SimpleEventDispatcher();\n }"
] | [
"0.7794712",
"0.71553725",
"0.70864004",
"0.70750856",
"0.7064083",
"0.7053452",
"0.7004476",
"0.69586575",
"0.6952777",
"0.6881039",
"0.6728637",
"0.6568065",
"0.65642715",
"0.65399647",
"0.6455868",
"0.6447735",
"0.64358634",
"0.64052016",
"0.6398615",
"0.6304873",
"0.6237617",
"0.6237617",
"0.6236606",
"0.6236606",
"0.6236606",
"0.6236606",
"0.6236606",
"0.6236606",
"0.6236606",
"0.62354773",
"0.62354773",
"0.62354773",
"0.62354773",
"0.62354773",
"0.62354773",
"0.62354773",
"0.62354773",
"0.62354773",
"0.62326074",
"0.62261677",
"0.6210639",
"0.6210639",
"0.6210639",
"0.6192354",
"0.61867553",
"0.6170108",
"0.61246884",
"0.6116558",
"0.6078689",
"0.60771483",
"0.60268587",
"0.60230005",
"0.600309",
"0.59523934",
"0.59444475",
"0.5929984",
"0.591971",
"0.59096515",
"0.5901335",
"0.5879739",
"0.587653",
"0.5870079",
"0.58686364",
"0.5851078",
"0.5847297",
"0.5829087",
"0.58180076",
"0.58180076",
"0.58083075",
"0.5807721",
"0.57828707",
"0.5770395",
"0.57298464",
"0.5728262",
"0.57122934",
"0.5702719",
"0.5702708",
"0.56884426",
"0.56743246",
"0.56427246",
"0.5639675",
"0.5638147",
"0.56344885",
"0.5617764",
"0.5598933",
"0.5577931",
"0.5568996",
"0.55609953",
"0.5549783",
"0.554232",
"0.5534379",
"0.5505202",
"0.5482631",
"0.54747975",
"0.54717904",
"0.5471496",
"0.5423555",
"0.54232436",
"0.5419871",
"0.5410898"
] | 0.7827094 | 0 |
Gets the private 'translator_listener' shared service. | protected function getTranslatorListenerService()
{
return $this->services['translator_listener'] = new \Symfony\Component\HttpKernel\EventListener\TranslatorListener(${($_ = isset($this->services['translator.default']) ? $this->services['translator.default'] : $this->getTranslator_DefaultService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->services['request_stack'] = new \Symfony\Component\HttpFoundation\RequestStack()) && false ?: '_'});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getTranslatorListenerService()\n {\n return $this->services['translator_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\TranslatorListener($this->get('translator.default'), $this->get('request_stack'));\n }",
"public function _getServTranslator() {\n if (!$this->_servTranslator) {\n $this->_servTranslator = $this->getServiceLocator()->get('translator');\n }\n return $this->_servTranslator;\n }",
"public function _getServTranslator()\n {\n if (!$this->_servTranslator) {\n $this->_servTranslator = $this->getServiceLocator()->get('translator');\n }\n return $this->_servTranslator;\n }",
"protected function getLocaleListenerService()\n {\n return $this->services['locale_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener(${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack()) && false ?: '_'}, 'en', ${($_ = isset($this->services['router']) ? $this->services['router'] : $this->getRouterService()) && false ?: '_'});\n }",
"protected function getLocaleListenerService()\n {\n return $this->services['locale_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener($this->get('request_stack'), 'en', $this->get('router', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"protected function _getTranslator() {\n \tif(null == $this->translator) {\n \t\t$sm = $this->getServiceLocator();\n \t\t$this->translator = \\Application\\Util\\ServicesUtil::getTranslatorService($sm);\n \t}\n \treturn $this->translator;\n }",
"public function getListener(/* ... */)\n {\n return $this->_listener;\n }",
"protected function getA2lixTranslationForm_Default_Listener_TranslationsService()\n {\n return $this->services['a2lix_translation_form.default.listener.translations'] = new \\A2lix\\TranslationFormBundle\\Form\\EventListener\\TranslationsListener($this->get('a2lix_translation_form.default.service.translation'));\n }",
"protected function getDispatcherListener()\n {\n return $this->di->getShared('dispatcherListener');\n }",
"protected function getRouter_ListenerService()\n {\n return $this->services['router.listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener(${($_ = isset($this->services['router']) ? $this->services['router'] : $this->getRouterService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : ($this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack())) && false ?: '_'});\n }",
"private function getTranslator()\n {\n if (!$this->app->translator instanceof Translator) {\n $this->app->translator = new Translator($this->locale, new MessageSelector());\n $this->app->translator->addLoader('array', new ArrayLoader());\n $this->app->translator->addLoader('xliff', new XliffFileLoader());\n }\n\n return $this->app->translator;\n }",
"protected function getRouterListenerService()\n {\n return $this->services['router_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener($this->get('router'), $this->get('request_stack'), ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'}, $this->get('monolog.logger.request', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"protected function getVictoireI18n_TranslatorService()\n {\n return $this->services['victoire_i18n.translator'] = new \\Victoire\\Bundle\\I18nBundle\\Translation\\Translator($this, ${($_ = isset($this->services['translator.selector']) ? $this->services['translator.selector'] : $this->getTranslator_SelectorService()) && false ?: '_'}, array(), array('cache_dir' => (__DIR__.'/translations%'), 'debug' => false));\n }",
"protected function getPhpbb_Viglink_ListenerService()\n {\n return $this->services['phpbb.viglink.listener'] = new \\phpbb\\viglink\\event\\listener(${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['template']) ? $this->services['template'] : $this->getTemplateService()) && false ?: '_'});\n }",
"public function getTranslationManager()\n {\n return $this->getKernel()->getContainer()->get('worldia.textmaster.manager.translation');\n }",
"protected function getRouterListenerService()\n {\n return $this->services['router_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener(${($_ = isset($this->services['router']) ? $this->services['router'] : $this->getRouterService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack()) && false ?: '_'}, ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'}, ${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->services['logger'] = new \\Symfony\\Component\\HttpKernel\\Log\\Logger()) && false ?: '_'}, $this->targetDirs[3], true);\n }",
"function &getTranslator()\n {\n return $this->_translator;\n }",
"protected function getSessionListenerService()\n {\n return $this->services['session_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\SessionListener(new \\Symfony\\Component\\DependencyInjection\\ServiceLocator(array('session' => function () {\n return ${($_ = isset($this->services['session']) ? $this->services['session'] : $this->load('getSessionService.php')) && false ?: '_'};\n })));\n }",
"protected function getMonolog_Logger_TranslationService()\n {\n $this->services['monolog.logger.translation'] = $instance = new \\Symfony\\Bridge\\Monolog\\Logger('translation');\n\n $instance->pushHandler($this->get('monolog.handler.console'));\n $instance->pushHandler($this->get('monolog.handler.main'));\n\n return $instance;\n }",
"public function getTranslator() \n {\n if (!$this->translator) {\n //$this->setTranslator($this->getServiceLocator()->get('translator'));\n $this->setTranslator(\\Application\\Module::getService('translator'));\n }\n return $this->translator;\n }",
"protected function getDispatcherService()\n {\n $this->services['dispatcher'] = $instance = new \\phpbb\\event\\dispatcher($this);\n\n $instance->addListener('core.viewtopic_post_row_after', [0 => function () {\n return ${($_ = isset($this->services['phpbb.viglink.listener']) ? $this->services['phpbb.viglink.listener'] : $this->getPhpbb_Viglink_ListenerService()) && false ?: '_'};\n }, 1 => 'display_viglink'], 0);\n $instance->addListener('core.acp_main_notice', [0 => function () {\n return ${($_ = isset($this->services['phpbb.viglink.acp_listener']) ? $this->services['phpbb.viglink.acp_listener'] : $this->getPhpbb_Viglink_AcpListenerService()) && false ?: '_'};\n }, 1 => 'set_viglink_services'], 0);\n $instance->addListener('core.acp_help_phpbb_submit_before', [0 => function () {\n return ${($_ = isset($this->services['phpbb.viglink.acp_listener']) ? $this->services['phpbb.viglink.acp_listener'] : $this->getPhpbb_Viglink_AcpListenerService()) && false ?: '_'};\n }, 1 => 'update_viglink_settings'], 0);\n $instance->addListener('console.exception', [0 => function () {\n return ${($_ = isset($this->services['console.exception_subscriber']) ? $this->services['console.exception_subscriber'] : $this->getConsole_ExceptionSubscriberService()) && false ?: '_'};\n }, 1 => 'on_exception'], 0);\n $instance->addListener('kernel.terminate', [0 => function () {\n return ${($_ = isset($this->services['cron.event_listener']) ? $this->services['cron.event_listener'] : $this->getCron_EventListenerService()) && false ?: '_'};\n }, 1 => 'on_kernel_terminate'], 0);\n $instance->addListener('kernel.exception', [0 => function () {\n return ${($_ = isset($this->services['kernel_exception_subscriber']) ? $this->services['kernel_exception_subscriber'] : $this->getKernelExceptionSubscriberService()) && false ?: '_'};\n }, 1 => 'on_kernel_exception'], 0);\n $instance->addListener('kernel.terminate', [0 => function () {\n return ${($_ = isset($this->services['kernel_terminate_subscriber']) ? $this->services['kernel_terminate_subscriber'] : ($this->services['kernel_terminate_subscriber'] = new \\phpbb\\event\\kernel_terminate_subscriber())) && false ?: '_'};\n }, 1 => 'on_kernel_terminate'], -9223372036854775807-1);\n $instance->addListener('kernel.response', [0 => function () {\n return ${($_ = isset($this->services['symfony_response_listener']) ? $this->services['symfony_response_listener'] : ($this->services['symfony_response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener('UTF-8'))) && false ?: '_'};\n }, 1 => 'onKernelResponse'], 0);\n $instance->addListener('kernel.request', [0 => function () {\n return ${($_ = isset($this->services['router.listener']) ? $this->services['router.listener'] : $this->getRouter_ListenerService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'], 32);\n $instance->addListener('kernel.finish_request', [0 => function () {\n return ${($_ = isset($this->services['router.listener']) ? $this->services['router.listener'] : $this->getRouter_ListenerService()) && false ?: '_'};\n }, 1 => 'onKernelFinishRequest'], 0);\n $instance->addListener('kernel.exception', [0 => function () {\n return ${($_ = isset($this->services['router.listener']) ? $this->services['router.listener'] : $this->getRouter_ListenerService()) && false ?: '_'};\n }, 1 => 'onKernelException'], -64);\n\n return $instance;\n }",
"public function listener() {\n\t\treturn $this->_runtime['listener'];\n\t}",
"public function getTranslator()\n {\n if (!$this->translator) {\n $this->setTranslator($this->getServiceManager()->get('translator'));\n }\n return $this->translator;\n }",
"public static function get()\n {\n return new TranslationsService();\n }",
"protected function getTranslator_SelectorService()\n {\n return $this->services['translator.selector'] = new \\Symfony\\Component\\Translation\\MessageSelector();\n }",
"protected function getSwiftmailer_EmailSender_ListenerService()\n {\n return $this->services['swiftmailer.email_sender.listener'] = new \\Symfony\\Bundle\\SwiftmailerBundle\\EventListener\\EmailSenderListener($this, $this->get('logger', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"protected function getSessionListenerService()\n {\n return $this->services['session_listener'] = new \\Symfony\\Bundle\\FrameworkBundle\\EventListener\\SessionListener($this);\n }",
"protected function getResponseListenerService()\n {\n return $this->services['response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener('UTF-8');\n }",
"protected function getResponseListenerService()\n {\n return $this->services['response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener('UTF-8');\n }",
"protected function getA2lixTranslationForm_Default_Listener_TranslationsformsService()\n {\n return $this->services['a2lix_translation_form.default.listener.translationsforms'] = new \\A2lix\\TranslationFormBundle\\Form\\EventListener\\TranslationsFormsListener();\n }",
"protected function getSensioFrameworkExtra_Converter_ListenerService()\n {\n return $this->services['sensio_framework_extra.converter.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\ParamConverterListener($this->get('sensio_framework_extra.converter.manager'), true);\n }",
"protected function getSensioFrameworkExtra_Security_ListenerService()\n {\n return $this->services['sensio_framework_extra.security.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\SecurityListener(NULL, new \\Sensio\\Bundle\\FrameworkExtraBundle\\Security\\ExpressionLanguage(), ${($_ = isset($this->services['security.authentication.trust_resolver']) ? $this->services['security.authentication.trust_resolver'] : $this->getSecurity_Authentication_TrustResolverService()) && false ?: '_'}, ${($_ = isset($this->services['security.role_hierarchy']) ? $this->services['security.role_hierarchy'] : $this->getSecurity_RoleHierarchyService()) && false ?: '_'}, $this->get('security.token_storage', ContainerInterface::NULL_ON_INVALID_REFERENCE), $this->get('security.authorization_checker', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"protected function getTranslator_DefaultService()\n {\n $this->services['translator.default'] = $instance = new \\Symfony\\Bundle\\FrameworkBundle\\Translation\\Translator(new \\Symfony\\Component\\DependencyInjection\\ServiceLocator(array('translation.loader.csv' => function () {\n return ${($_ = isset($this->services['translation.loader.csv']) ? $this->services['translation.loader.csv'] : $this->services['translation.loader.csv'] = new \\Symfony\\Component\\Translation\\Loader\\CsvFileLoader()) && false ?: '_'};\n }, 'translation.loader.dat' => function () {\n return ${($_ = isset($this->services['translation.loader.dat']) ? $this->services['translation.loader.dat'] : $this->services['translation.loader.dat'] = new \\Symfony\\Component\\Translation\\Loader\\IcuDatFileLoader()) && false ?: '_'};\n }, 'translation.loader.ini' => function () {\n return ${($_ = isset($this->services['translation.loader.ini']) ? $this->services['translation.loader.ini'] : $this->services['translation.loader.ini'] = new \\Symfony\\Component\\Translation\\Loader\\IniFileLoader()) && false ?: '_'};\n }, 'translation.loader.json' => function () {\n return ${($_ = isset($this->services['translation.loader.json']) ? $this->services['translation.loader.json'] : $this->services['translation.loader.json'] = new \\Symfony\\Component\\Translation\\Loader\\JsonFileLoader()) && false ?: '_'};\n }, 'translation.loader.mo' => function () {\n return ${($_ = isset($this->services['translation.loader.mo']) ? $this->services['translation.loader.mo'] : $this->services['translation.loader.mo'] = new \\Symfony\\Component\\Translation\\Loader\\MoFileLoader()) && false ?: '_'};\n }, 'translation.loader.php' => function () {\n return ${($_ = isset($this->services['translation.loader.php']) ? $this->services['translation.loader.php'] : $this->services['translation.loader.php'] = new \\Symfony\\Component\\Translation\\Loader\\PhpFileLoader()) && false ?: '_'};\n }, 'translation.loader.po' => function () {\n return ${($_ = isset($this->services['translation.loader.po']) ? $this->services['translation.loader.po'] : $this->services['translation.loader.po'] = new \\Symfony\\Component\\Translation\\Loader\\PoFileLoader()) && false ?: '_'};\n }, 'translation.loader.qt' => function () {\n return ${($_ = isset($this->services['translation.loader.qt']) ? $this->services['translation.loader.qt'] : $this->services['translation.loader.qt'] = new \\Symfony\\Component\\Translation\\Loader\\QtFileLoader()) && false ?: '_'};\n }, 'translation.loader.res' => function () {\n return ${($_ = isset($this->services['translation.loader.res']) ? $this->services['translation.loader.res'] : $this->services['translation.loader.res'] = new \\Symfony\\Component\\Translation\\Loader\\IcuResFileLoader()) && false ?: '_'};\n }, 'translation.loader.xliff' => function () {\n return ${($_ = isset($this->services['translation.loader.xliff']) ? $this->services['translation.loader.xliff'] : $this->services['translation.loader.xliff'] = new \\Symfony\\Component\\Translation\\Loader\\XliffFileLoader()) && false ?: '_'};\n }, 'translation.loader.yml' => function () {\n return ${($_ = isset($this->services['translation.loader.yml']) ? $this->services['translation.loader.yml'] : $this->services['translation.loader.yml'] = new \\Symfony\\Component\\Translation\\Loader\\YamlFileLoader()) && false ?: '_'};\n })), new \\Symfony\\Component\\Translation\\Formatter\\MessageFormatter(new \\Symfony\\Component\\Translation\\MessageSelector()), 'en', array('translation.loader.php' => array(0 => 'php'), 'translation.loader.yml' => array(0 => 'yaml', 1 => 'yml'), 'translation.loader.xliff' => array(0 => 'xlf', 1 => 'xliff'), 'translation.loader.po' => array(0 => 'po'), 'translation.loader.mo' => array(0 => 'mo'), 'translation.loader.qt' => array(0 => 'ts'), 'translation.loader.csv' => array(0 => 'csv'), 'translation.loader.res' => array(0 => 'res'), 'translation.loader.dat' => array(0 => 'dat'), 'translation.loader.ini' => array(0 => 'ini'), 'translation.loader.json' => array(0 => 'json')), array('cache_dir' => ($this->targetDirs[0].'/translations'), 'debug' => true, 'resource_files' => array('af' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.af.xlf')), 'ar' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.ar.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.ar.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.ar.xlf')), 'az' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.az.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.az.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.az.xlf')), 'bg' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.bg.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.bg.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.bg.xlf')), 'ca' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.ca.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.ca.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.ca.xlf')), 'cs' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.cs.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.cs.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.cs.xlf')), 'cy' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.cy.xlf')), 'da' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.da.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.da.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.da.xlf')), 'de' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.de.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.de.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.de.xlf')), 'el' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.el.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.el.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.el.xlf')), 'en' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.en.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.en.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.en.xlf')), 'es' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.es.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.es.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.es.xlf')), 'et' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.et.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.et.xlf')), 'eu' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.eu.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.eu.xlf')), 'fa' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.fa.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.fa.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.fa.xlf')), 'fi' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.fi.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.fi.xlf')), 'fr' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.fr.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.fr.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.fr.xlf')), 'gl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.gl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.gl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.gl.xlf')), 'he' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.he.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.he.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.he.xlf')), 'hr' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.hr.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.hr.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.hr.xlf')), 'hu' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.hu.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.hu.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.hu.xlf')), 'hy' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.hy.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.hy.xlf')), 'id' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.id.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.id.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.id.xlf')), 'it' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.it.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.it.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.it.xlf')), 'ja' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.ja.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.ja.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.ja.xlf')), 'lb' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.lb.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.lb.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.lb.xlf')), 'lt' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.lt.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.lt.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.lt.xlf')), 'lv' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.lv.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.lv.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.lv.xlf')), 'mn' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.mn.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.mn.xlf')), 'nb' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.nb.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.nb.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.nb.xlf')), 'nl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.nl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.nl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.nl.xlf')), 'nn' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.nn.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.nn.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.nn.xlf')), 'no' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.no.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.no.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.no.xlf')), 'pl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.pl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.pl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.pl.xlf')), 'pt' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.pt.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.pt.xlf')), 'pt_BR' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.pt_BR.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.pt_BR.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.pt_BR.xlf')), 'ro' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.ro.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.ro.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.ro.xlf')), 'ru' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.ru.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.ru.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.ru.xlf')), 'sk' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.sk.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.sk.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.sk.xlf')), 'sl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.sl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.sl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.sl.xlf')), 'sq' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.sq.xlf')), 'sr_Cyrl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.sr_Cyrl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.sr_Cyrl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.sr_Cyrl.xlf')), 'sr_Latn' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.sr_Latn.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.sr_Latn.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.sr_Latn.xlf')), 'sv' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.sv.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.sv.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.sv.xlf')), 'th' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.th.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.th.xlf')), 'tl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.tl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.tl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.tl.xlf')), 'tr' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.tr.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.tr.xlf')), 'uk' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.uk.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.uk.xlf')), 'vi' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.vi.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.vi.xlf')), 'zh_CN' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.zh_CN.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.zh_CN.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.zh_CN.xlf')), 'zh_TW' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.zh_TW.xlf')), 'pt_PT' => array(0 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.pt_PT.xlf')), 'ua' => array(0 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.ua.xlf')))));\n\n $instance->setConfigCacheFactory(${($_ = isset($this->services['config_cache_factory']) ? $this->services['config_cache_factory'] : $this->getConfigCacheFactoryService()) && false ?: '_'});\n $instance->setFallbackLocales(array(0 => 'en'));\n\n return $instance;\n }",
"protected function getSymfonyResponseListenerService()\n {\n return $this->services['symfony_response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener('UTF-8');\n }",
"protected function getVictoireI18n_Kernelrequest_ListenerService()\n {\n return $this->services['victoire_i18n.kernelrequest.listener'] = new \\Victoire\\Bundle\\I18nBundle\\Listener\\KernelRequestListener($this->get('twig'), array(0 => 'fr', 1 => 'en'));\n }",
"protected function getTranslation_Loader_PhpService()\n {\n return $this->services['translation.loader.php'] = new \\Symfony\\Component\\Translation\\Loader\\PhpFileLoader();\n }",
"protected function getSensioFrameworkExtra_Cache_ListenerService()\n {\n return $this->services['sensio_framework_extra.cache.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\HttpCacheListener();\n }",
"protected function getTranslation_LoaderService()\n {\n $a = $this->get('translation.loader.xliff');\n\n $this->services['translation.loader'] = $instance = new \\Symfony\\Bundle\\FrameworkBundle\\Translation\\TranslationLoader();\n\n $instance->addLoader('php', $this->get('translation.loader.php'));\n $instance->addLoader('yml', $this->get('translation.loader.yml'));\n $instance->addLoader('xlf', $a);\n $instance->addLoader('xliff', $a);\n $instance->addLoader('po', $this->get('translation.loader.po'));\n $instance->addLoader('mo', $this->get('translation.loader.mo'));\n $instance->addLoader('ts', $this->get('translation.loader.qt'));\n $instance->addLoader('csv', $this->get('translation.loader.csv'));\n $instance->addLoader('res', $this->get('translation.loader.res'));\n $instance->addLoader('dat', $this->get('translation.loader.dat'));\n $instance->addLoader('ini', $this->get('translation.loader.ini'));\n $instance->addLoader('json', $this->get('translation.loader.json'));\n\n return $instance;\n }",
"public function getTranslator() {\n\t\treturn $this->translator;\n\t}",
"public function getTranslator()\n {\n return $this->translator;\n }",
"public function getTranslator()\n {\n return $this->translator;\n }",
"protected function getTranslator_DefaultService()\n {\n $this->services['translator.default'] = $instance = new \\Victoire\\Bundle\\I18nBundle\\Translation\\Translator($this, ${($_ = isset($this->services['translator.selector']) ? $this->services['translator.selector'] : $this->getTranslator_SelectorService()) && false ?: '_'}, array('translation.loader.php' => array(0 => 'php'), 'translation.loader.yml' => array(0 => 'yml'), 'translation.loader.xliff' => array(0 => 'xlf', 1 => 'xliff'), 'translation.loader.po' => array(0 => 'po'), 'translation.loader.mo' => array(0 => 'mo'), 'translation.loader.qt' => array(0 => 'ts'), 'translation.loader.csv' => array(0 => 'csv'), 'translation.loader.res' => array(0 => 'res'), 'translation.loader.dat' => array(0 => 'dat'), 'translation.loader.ini' => array(0 => 'ini'), 'translation.loader.json' => array(0 => 'json')), array('cache_dir' => (__DIR__.'/translations'), 'debug' => false, 'resource_files' => array('sr_Latn' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sr_Latn.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.sr_Latn.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.sr_Latn.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.sr_Latn.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.sr_Latn.yml')), 'pl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.pl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.pl.xlf'), 3 => ($this->targetDirs[3].'/vendor/troopers/alertify-bundle/Troopers/AlertifyBundle/Resources/translations/alertify.pl.xliff'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.pl.yml'), 5 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.pl.yml')), 'he' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.he.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.he.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.he.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.he.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.he.yml')), 'ro' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ro.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.ro.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.ro.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.ro.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.ro.yml')), 'et' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.et.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.et.xlf'), 2 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.et.yml')), 'fa' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.fa.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.fa.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.fa.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.fa.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.fa.yml')), 'ar' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ar.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.ar.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.ar.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.ar.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.ar.yml')), 'cy' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.cy.xlf')), 'gl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.gl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.gl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.gl.xlf')), 'th' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.th.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.th.xlf'), 2 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.th.yml'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.th.yml')), 'ru' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ru.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.ru.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.ru.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.ru.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.ru.yml')), 'sv' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sv.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.sv.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.sv.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.sv.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.sv.yml')), 'da' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.da.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.da.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.da.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.da.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.da.yml')), 'fi' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.fi.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.fi.xlf'), 2 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.fi.yml'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.fi.yml')), 'lb' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.lb.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.lb.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.lb.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.lb.yml')), 'zh_CN' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.zh_CN.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.zh_CN.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.zh_CN.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.zh_CN.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.zh_CN.yml')), 'nl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.nl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.nl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.nl.xlf'), 3 => ($this->targetDirs[3].'/vendor/troopers/alertify-bundle/Troopers/AlertifyBundle/Resources/translations/alertify.nl.xliff'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.nl.yml'), 5 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.nl.yml')), 'fr' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.fr.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.fr.xlf'), 3 => ($this->targetDirs[3].'/vendor/troopers/alertify-bundle/Troopers/AlertifyBundle/Resources/translations/alertify.fr.xliff'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.fr.yml'), 5 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.fr.yml'), 6 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BlogBundle/Resources/translations/messages.fr.xliff'), 7 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BlogBundle/Resources/translations/victoire.fr.xliff'), 8 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessEntityBundle/Resources/translations/victoire.fr.xliff'), 9 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessPageBundle/Resources/translations/messages.fr.xliff'), 10 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessPageBundle/Resources/translations/victoire.fr.xliff'), 11 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/CoreBundle/Resources/translations/victoire.fr.xliff'), 12 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/CriteriaBundle/Resources/translations/victoire.fr.xliff'), 13 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/FormBundle/Resources/translations/victoire.fr.xliff'), 14 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/I18nBundle/Resources/translations/victoire.fr.xliff'), 15 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/MediaBundle/Resources/translations/messages.fr.xliff'), 16 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/MediaBundle/Resources/translations/victoire.fr.xliff'), 17 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/PageBundle/Resources/translations/messages.fr.xliff'), 18 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/PageBundle/Resources/translations/victoire.fr.xliff'), 19 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/SeoBundle/Resources/translations/victoire.fr.xliff'), 20 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/SitemapBundle/Resources/translations/victoire.fr.xliff'), 21 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/TemplateBundle/Resources/translations/victoire.fr.xliff'), 22 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/TemplateBundle/Resources/translations/messages.fr.xlf'), 23 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/UserBundle/Resources/translations/victoire.fr.xliff'), 24 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/WidgetBundle/Resources/translations/victoire.fr.xliff')), 'mn' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.mn.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.mn.xlf')), 'af' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.af.xlf'), 1 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.af.yml')), 'hr' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.hr.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.hr.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.hr.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.hr.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.hr.yml')), 'tr' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.tr.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.tr.xlf'), 2 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.tr.yml'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.tr.yml')), 'az' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.az.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.az.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.az.xlf')), 'no' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.no.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.no.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.no.xlf')), 'hy' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.hy.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.hy.xlf')), 'sq' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sq.xlf')), 'zh_TW' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.zh_TW.xlf')), 'en' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.en.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.en.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.en.xlf'), 3 => ($this->targetDirs[3].'/vendor/troopers/alertify-bundle/Troopers/AlertifyBundle/Resources/translations/alertify.en.xliff'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.en.yml'), 5 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.en.yml'), 6 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BlogBundle/Resources/translations/messages.en.xliff'), 7 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BlogBundle/Resources/translations/victoire.en.xliff'), 8 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessEntityBundle/Resources/translations/victoire.en.xliff'), 9 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessPageBundle/Resources/translations/messages.en.xliff'), 10 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessPageBundle/Resources/translations/victoire.en.xliff'), 11 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/CoreBundle/Resources/translations/victoire.en.xliff'), 12 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/CriteriaBundle/Resources/translations/victoire.en.xliff'), 13 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/FormBundle/Resources/translations/victoire.en.xliff'), 14 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/I18nBundle/Resources/translations/victoire.en.xliff'), 15 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/MediaBundle/Resources/translations/messages.en.xliff'), 16 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/MediaBundle/Resources/translations/victoire.en.xliff'), 17 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/PageBundle/Resources/translations/victoire.en.xliff'), 18 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/SeoBundle/Resources/translations/victoire.en.xliff'), 19 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/SitemapBundle/Resources/translations/victoire.en.xliff'), 20 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/TemplateBundle/Resources/translations/victoire.en.xliff'), 21 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/UserBundle/Resources/translations/victoire.en.xliff'), 22 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/WidgetBundle/Resources/translations/victoire.en.xliff')), 'lv' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.lv.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.lv.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.lv.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.lv.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.lv.yml')), 'pt' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.pt.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.pt.xlf'), 2 => ($this->targetDirs[3].'/vendor/troopers/alertify-bundle/Troopers/AlertifyBundle/Resources/translations/alertify.pt.xliff'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.pt.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.pt.yml')), 'ca' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ca.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.ca.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.ca.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.ca.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.ca.yml')), 'lt' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.lt.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.lt.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.lt.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.lt.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.lt.yml')), 'id' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.id.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.id.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.id.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.id.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.id.yml')), 'eu' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.eu.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.eu.xlf'), 2 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.eu.yml'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.eu.yml')), 'bg' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.bg.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.bg.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.bg.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.bg.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.bg.yml')), 'ja' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ja.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.ja.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.ja.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.ja.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.ja.yml')), 'sr_Cyrl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sr_Cyrl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.sr_Cyrl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.sr_Cyrl.xlf')), 'nn' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.nn.xlf')), 'sl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.sl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.sl.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.sl.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.sl.yml')), 'uk' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.uk.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.uk.xlf'), 2 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.uk.yml'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.uk.yml')), 'cs' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.cs.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.cs.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.cs.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.cs.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.cs.yml')), 'el' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.el.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.el.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.el.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.el.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.el.yml')), 'vi' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.vi.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.vi.xlf'), 2 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.vi.yml'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.vi.yml')), 'de' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.de.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.de.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.de.xlf'), 3 => ($this->targetDirs[3].'/vendor/troopers/alertify-bundle/Troopers/AlertifyBundle/Resources/translations/alertify.de.xliff'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.de.yml'), 5 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.de.yml')), 'it' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.it.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.it.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.it.xlf'), 3 => ($this->targetDirs[3].'/vendor/troopers/alertify-bundle/Troopers/AlertifyBundle/Resources/translations/alertify.it.xliff'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.it.yml'), 5 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.it.yml')), 'sk' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sk.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.sk.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.sk.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.sk.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.sk.yml')), 'hu' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.hu.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.hu.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.hu.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.hu.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.hu.yml')), 'es' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.es.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.es.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.es.xlf'), 3 => ($this->targetDirs[3].'/vendor/troopers/alertify-bundle/Troopers/AlertifyBundle/Resources/translations/alertify.es.xliff'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.es.yml'), 5 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.es.yml'), 6 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BlogBundle/Resources/translations/victoire.es.xliff'), 7 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BlogBundle/Resources/translations/messages.es.xliff'), 8 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessEntityBundle/Resources/translations/victoire.es.xliff'), 9 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessPageBundle/Resources/translations/victoire.es.xliff'), 10 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessPageBundle/Resources/translations/messages.es.xliff'), 11 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/CoreBundle/Resources/translations/victoire.es.xliff'), 12 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/CriteriaBundle/Resources/translations/victoire.es.xliff'), 13 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/FormBundle/Resources/translations/victoire.es.xliff'), 14 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/I18nBundle/Resources/translations/victoire.es.xliff'), 15 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/MediaBundle/Resources/translations/victoire.es.xliff'), 16 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/MediaBundle/Resources/translations/messages.es.xliff'), 17 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/PageBundle/Resources/translations/victoire.es.xliff'), 18 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/SeoBundle/Resources/translations/victoire.es.xliff'), 19 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/SitemapBundle/Resources/translations/victoire.es.xliff'), 20 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/TemplateBundle/Resources/translations/victoire.es.xliff'), 21 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/UserBundle/Resources/translations/victoire.es.xliff'), 22 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/WidgetBundle/Resources/translations/victoire.es.xliff')), 'pt_BR' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.pt_BR.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.pt_BR.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.pt_BR.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.pt_BR.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.pt_BR.yml')), 'pt_PT' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.pt_PT.xlf')), 'ua' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.ua.xlf')), 'ky' => array(0 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.ky.yml'), 1 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.ky.yml')), 'eo' => array(0 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.eo.yml'), 1 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.eo.yml')), 'nb' => array(0 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.nb.yml'), 1 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.nb.yml')))), array());\n\n $instance->setConfigCacheFactory($this->get('config_cache_factory'));\n $instance->setFallbackLocales(array(0 => 'en'));\n\n return $instance;\n }",
"private static function getService()\n {\n return self::$app->get(static::SERVICE_NAME);\n }",
"protected function get_translator()\n\t{\n\t\treturn Translator::get($this->id);\n\t}",
"protected function getLanguageService()\n {\n return $this->services['language'] = new \\phpbb\\language\\language(${($_ = isset($this->services['language.loader']) ? $this->services['language.loader'] : $this->getLanguage_LoaderService()) && false ?: '_'});\n }",
"protected static function getLanguageService() {}",
"protected function getLanguageService()\n {\n return $GLOBALS['LANG'];\n }",
"protected function getLanguageService()\n {\n return $GLOBALS['LANG'];\n }",
"protected function getLanguageService()\n {\n return $GLOBALS['LANG'];\n }",
"protected function getVictoireCore_BackendMenuListenerService()\n {\n return $this->services['victoire_core.backend_menu_listener'] = new \\Victoire\\Bundle\\CoreBundle\\Listener\\BackendMenuListener($this->get('victoire_core.admin_menu_builder'));\n }",
"protected function getTranslation_Extractor_PhpService()\n {\n return $this->services['translation.extractor.php'] = new \\Symfony\\Bundle\\FrameworkBundle\\Translation\\PhpExtractor();\n }",
"protected function getVictoireCore_TemplateMenuListenerService()\n {\n return $this->services['victoire_core.template_menu_listener'] = new \\Victoire\\Bundle\\TemplateBundle\\Listener\\TemplateMenuListener($this->get('victoire_core.admin_menu_builder'));\n }",
"protected function getVictoireSitemap_SitemapMenuListenerService()\n {\n return $this->services['victoire_sitemap.sitemap_menu_listener'] = new \\Victoire\\Bundle\\SitemapBundle\\Listener\\SiteMapMenuListener($this->get('victoire_core.admin_menu_builder'));\n }",
"protected function resolveListener(string $listener)\n {\n return Container::getInstance()->make($listener);\n }",
"public function getTranslator()\n {\n return $this['translator'];\n }",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getVictoireI18n_LocaleSubscriberService()\n {\n return $this->services['victoire_i18n.locale_subscriber'] = new \\Victoire\\Bundle\\I18nBundle\\Subscriber\\LocaleSubscriber('en', $this->get('victoire_i18n.locale_resolver'));\n }",
"protected function getTranslation_ExtractorService()\n {\n $this->services['translation.extractor'] = $instance = new \\Symfony\\Component\\Translation\\Extractor\\ChainExtractor();\n\n $instance->addExtractor('php', $this->get('translation.extractor.php'));\n $instance->addExtractor('twig', $this->get('twig.translation.extractor'));\n\n return $instance;\n }",
"protected function getTwig_Translation_ExtractorService()\n {\n return $this->services['twig.translation.extractor'] = new \\Symfony\\Bridge\\Twig\\Translation\\TwigExtractor($this->get('twig'));\n }",
"protected function getStreamedResponseListenerService()\n {\n return $this->services['streamed_response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\StreamedResponseListener();\n }",
"protected function getStreamedResponseListenerService()\n {\n return $this->services['streamed_response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\StreamedResponseListener();\n }",
"protected function getValidateRequestListenerService()\n {\n return $this->services['validate_request_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener();\n }",
"protected function getValidateRequestListenerService()\n {\n return $this->services['validate_request_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener();\n }",
"protected function getRestSubscriberService()\n {\n return $this->services['App\\EventSubscriber\\RestSubscriber'] = new \\App\\EventSubscriber\\RestSubscriber(${($_ = isset($this->services['annotation_reader']) ? $this->services['annotation_reader'] : $this->getAnnotationReaderService()) && false ?: '_'}, ${($_ = isset($this->services['doctrine.orm.default_entity_manager']) ? $this->services['doctrine.orm.default_entity_manager'] : $this->getDoctrine_Orm_DefaultEntityManagerService()) && false ?: '_'});\n }",
"protected function getTranslation_WriterService()\n {\n $this->services['translation.writer'] = $instance = new \\Symfony\\Component\\Translation\\Writer\\TranslationWriter();\n\n $instance->addDumper('php', $this->get('translation.dumper.php'));\n $instance->addDumper('xlf', $this->get('translation.dumper.xliff'));\n $instance->addDumper('po', $this->get('translation.dumper.po'));\n $instance->addDumper('mo', $this->get('translation.dumper.mo'));\n $instance->addDumper('yml', $this->get('translation.dumper.yml'));\n $instance->addDumper('ts', $this->get('translation.dumper.qt'));\n $instance->addDumper('csv', $this->get('translation.dumper.csv'));\n $instance->addDumper('ini', $this->get('translation.dumper.ini'));\n $instance->addDumper('json', $this->get('translation.dumper.json'));\n $instance->addDumper('res', $this->get('translation.dumper.res'));\n\n return $instance;\n }",
"public function getService()\n {\n return $this->_service;\n }",
"protected function getDebug_DebugHandlersListenerService()\n {\n return $this->services['debug.debug_handlers_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\DebugHandlersListener(NULL, $this->get('monolog.logger.php', ContainerInterface::NULL_ON_INVALID_REFERENCE), -1, 0, false, ${($_ = isset($this->services['debug.file_link_formatter']) ? $this->services['debug.file_link_formatter'] : $this->getDebug_FileLinkFormatterService()) && false ?: '_'}, false);\n }",
"protected function getEventDispatcherService()\n {\n $this->services['event_dispatcher'] = $instance = new \\Symfony\\Component\\EventDispatcher\\ContainerAwareEventDispatcher($this);\n\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['App\\EventSubscriber\\RestSubscriber']) ? $this->services['App\\EventSubscriber\\RestSubscriber'] : $this->getRestSubscriberService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 0);\n $instance->addListener('kernel.controller', array(0 => function () {\n return ${($_ = isset($this->services['App\\EventSubscriber\\RestSubscriber']) ? $this->services['App\\EventSubscriber\\RestSubscriber'] : $this->getRestSubscriberService()) && false ?: '_'};\n }, 1 => 'onKernelController'), 0);\n $instance->addListener('kernel.view', array(0 => function () {\n return ${($_ = isset($this->services['App\\EventSubscriber\\RestSubscriber']) ? $this->services['App\\EventSubscriber\\RestSubscriber'] : $this->getRestSubscriberService()) && false ?: '_'};\n }, 1 => 'onKernelView'), 0);\n $instance->addListener('kernel.exception', array(0 => function () {\n return ${($_ = isset($this->services['App\\EventSubscriber\\RestSubscriber']) ? $this->services['App\\EventSubscriber\\RestSubscriber'] : $this->getRestSubscriberService()) && false ?: '_'};\n }, 1 => 'onKernelException'), 0);\n $instance->addListener('kernel.response', array(0 => function () {\n return ${($_ = isset($this->services['response_listener']) ? $this->services['response_listener'] : $this->services['response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener('UTF-8')) && false ?: '_'};\n }, 1 => 'onKernelResponse'), 0);\n $instance->addListener('kernel.response', array(0 => function () {\n return ${($_ = isset($this->services['streamed_response_listener']) ? $this->services['streamed_response_listener'] : $this->services['streamed_response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\StreamedResponseListener()) && false ?: '_'};\n }, 1 => 'onKernelResponse'), -1024);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['locale_listener']) ? $this->services['locale_listener'] : $this->getLocaleListenerService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 16);\n $instance->addListener('kernel.finish_request', array(0 => function () {\n return ${($_ = isset($this->services['locale_listener']) ? $this->services['locale_listener'] : $this->getLocaleListenerService()) && false ?: '_'};\n }, 1 => 'onKernelFinishRequest'), 0);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['validate_request_listener']) ? $this->services['validate_request_listener'] : $this->services['validate_request_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 256);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['resolve_controller_name_subscriber']) ? $this->services['resolve_controller_name_subscriber'] : $this->getResolveControllerNameSubscriberService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 24);\n $instance->addListener('console.error', array(0 => function () {\n return ${($_ = isset($this->services['console.error_listener']) ? $this->services['console.error_listener'] : $this->load('getConsole_ErrorListenerService.php')) && false ?: '_'};\n }, 1 => 'onConsoleError'), -128);\n $instance->addListener('console.terminate', array(0 => function () {\n return ${($_ = isset($this->services['console.error_listener']) ? $this->services['console.error_listener'] : $this->load('getConsole_ErrorListenerService.php')) && false ?: '_'};\n }, 1 => 'onConsoleTerminate'), -128);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['session_listener']) ? $this->services['session_listener'] : $this->getSessionListenerService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 128);\n $instance->addListener('kernel.response', array(0 => function () {\n return ${($_ = isset($this->services['session_listener']) ? $this->services['session_listener'] : $this->getSessionListenerService()) && false ?: '_'};\n }, 1 => 'onKernelResponse'), -1000);\n $instance->addListener('kernel.finish_request', array(0 => function () {\n return ${($_ = isset($this->services['session_listener']) ? $this->services['session_listener'] : $this->getSessionListenerService()) && false ?: '_'};\n }, 1 => 'onFinishRequest'), 0);\n $instance->addListener('kernel.response', array(0 => function () {\n return ${($_ = isset($this->services['session.save_listener']) ? $this->services['session.save_listener'] : $this->services['session.save_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\SaveSessionListener()) && false ?: '_'};\n }, 1 => 'onKernelResponse'), -1000);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['translator_listener']) ? $this->services['translator_listener'] : $this->getTranslatorListenerService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 10);\n $instance->addListener('kernel.finish_request', array(0 => function () {\n return ${($_ = isset($this->services['translator_listener']) ? $this->services['translator_listener'] : $this->getTranslatorListenerService()) && false ?: '_'};\n }, 1 => 'onKernelFinishRequest'), 0);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['debug.debug_handlers_listener']) ? $this->services['debug.debug_handlers_listener'] : $this->getDebug_DebugHandlersListenerService()) && false ?: '_'};\n }, 1 => 'configure'), 2048);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['router_listener']) ? $this->services['router_listener'] : $this->getRouterListenerService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 32);\n $instance->addListener('kernel.finish_request', array(0 => function () {\n return ${($_ = isset($this->services['router_listener']) ? $this->services['router_listener'] : $this->getRouterListenerService()) && false ?: '_'};\n }, 1 => 'onKernelFinishRequest'), 0);\n $instance->addListener('kernel.exception', array(0 => function () {\n return ${($_ = isset($this->services['router_listener']) ? $this->services['router_listener'] : $this->getRouterListenerService()) && false ?: '_'};\n }, 1 => 'onKernelException'), -64);\n $instance->addListener('console.error', array(0 => function () {\n return ${($_ = isset($this->services['maker.console_error_listener']) ? $this->services['maker.console_error_listener'] : $this->services['maker.console_error_listener'] = new \\Symfony\\Bundle\\MakerBundle\\Event\\ConsoleErrorSubscriber()) && false ?: '_'};\n }, 1 => 'onConsoleError'), 0);\n $instance->addListener('console.terminate', array(0 => function () {\n return ${($_ = isset($this->services['maker.console_error_listener']) ? $this->services['maker.console_error_listener'] : $this->services['maker.console_error_listener'] = new \\Symfony\\Bundle\\MakerBundle\\Event\\ConsoleErrorSubscriber()) && false ?: '_'};\n }, 1 => 'onConsoleTerminate'), 0);\n $instance->addListener('kernel.response', array(0 => function () {\n return ${($_ = isset($this->services['security.rememberme.response_listener']) ? $this->services['security.rememberme.response_listener'] : $this->services['security.rememberme.response_listener'] = new \\Symfony\\Component\\Security\\Http\\RememberMe\\ResponseListener()) && false ?: '_'};\n }, 1 => 'onKernelResponse'), 0);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['security.firewall']) ? $this->services['security.firewall'] : $this->getSecurity_FirewallService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 8);\n $instance->addListener('kernel.finish_request', array(0 => function () {\n return ${($_ = isset($this->services['security.firewall']) ? $this->services['security.firewall'] : $this->getSecurity_FirewallService()) && false ?: '_'};\n }, 1 => 'onKernelFinishRequest'), 0);\n\n return $instance;\n }",
"protected function getVictoireCore_MediaMenuListenerService()\n {\n return $this->services['victoire_core.media_menu_listener'] = new \\Victoire\\Bundle\\MediaBundle\\EventListener\\MediaMenuListener($this->get('victoire_core.admin_menu_builder'));\n }",
"function &singleton()\n {\n if (!isset($GLOBALS['_PHP_PARSER_MSGSERVER_INSTANCE'])) {\n $GLOBALS['_PHP_PARSER_MSGSERVER_INSTANCE'] = &new PHP_Parser_MsgServer;\n }\n return $GLOBALS['_PHP_PARSER_MSGSERVER_INSTANCE'];\n }",
"protected function getTranslation_Loader_PoService()\n {\n return $this->services['translation.loader.po'] = new \\Symfony\\Component\\Translation\\Loader\\PoFileLoader();\n }",
"protected function getEventDispatcherService()\n {\n $this->services['event_dispatcher'] = $instance = new \\Symfony\\Component\\EventDispatcher\\ContainerAwareEventDispatcher($this);\n\n $instance->addListenerService('kernel.request', array(0 => 'knp_menu.listener.voters', 1 => 'onKernelRequest'), 0);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_blog.blog_menu_listener', 1 => 'addGlobal'), 90);\n $instance->addListenerService('victoire_core.article_menu.contextual', array(0 => 'victoire_blog.article_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('victoire_core.article_menu.contextual', array(0 => 'victoire_blog.article_settings_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('victoire_core.blog_menu.contextual', array(0 => 'victoire_blog.blog_menu.contextual', 1 => 'addBlogContextual'), 0);\n $instance->addListenerService('victoire_core.article_template_menu.contextual', array(0 => 'victoire_blog.article_template_menu.menu_listener.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('victoire_core.blog_menu.contextual', array(0 => 'victoire_blog.blog_page_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('victoire.widget_filter.form.pre_set_data', array(0 => 'victoire.widget_filter.form.listener.presetdata', 1 => 'manageExtraFiltersFields'), 1);\n $instance->addListenerService('victoire.widget_filter.form.pre_submit', array(0 => 'victoire.widget_filter.form.listener.presubmit', 1 => 'manageExtraFiltersFields'), 1);\n $instance->addListenerService('victoire.widget_filter.form.date.set_default_value', array(0 => 'victoire.widget_filter.blog.set.default.values.form.listener', 1 => 'setDefaultDateValue'), 1);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_business_page.business_template_menu_listener', 1 => 'addGlobal'), 50);\n $instance->addListenerService('victoire_core.business_template_menu.contextual', array(0 => 'victoire_core.business_template_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('kernel.request', array(0 => 'victoire_core.menu_dispatcher', 1 => 'onKernelRequest'), 0);\n $instance->addListenerService('victoire_core.backend_menu.global', array(0 => 'victoire_core.backend_menu_listener', 1 => 'addGlobal'), 100);\n $instance->addListenerService('kernel.controller', array(0 => 'victoire_core.listener.controller_listener', 1 => 'preExecuteAutorun'), 0);\n $instance->addListenerService('victoire.on_render_page', array(0 => 'victoire_core.view_css_listener', 1 => 'onRenderPage'), 0);\n $instance->addListenerService('kernel.request', array(0 => 'victoire_i18n.kernelrequest.listener', 1 => 'onKernelRequest'), 0);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_core.media_menu_listener', 1 => 'addGlobal'), 60);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_core.page_menu_listener', 1 => 'addGlobal'), 100);\n $instance->addListenerService('victoire_core.page_menu.contextual', array(0 => 'victoire_core.page_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_sitemap.sitemap_menu_listener', 1 => 'addGlobal'), 70);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_core.template_menu_listener', 1 => 'addGlobal'), 80);\n $instance->addListenerService('victoire_core.template_menu.contextual', array(0 => 'victoire_core.template_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('kernel.request', array(0 => 'victoire_twig.kernelrequest.listener', 1 => 'onKernelRequest'), 0);\n $instance->addListenerService('kernel.request', array(0 => 'victoire_view_reference.cache_warmer', 1 => 'warmUp'), 0);\n $instance->addSubscriberService('response_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\ResponseListener');\n $instance->addSubscriberService('streamed_response_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\StreamedResponseListener');\n $instance->addSubscriberService('locale_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\LocaleListener');\n $instance->addSubscriberService('validate_request_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\ValidateRequestListener');\n $instance->addSubscriberService('translator_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\TranslatorListener');\n $instance->addSubscriberService('session_listener', 'Symfony\\\\Bundle\\\\FrameworkBundle\\\\EventListener\\\\SessionListener');\n $instance->addSubscriberService('session.save_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\SaveSessionListener');\n $instance->addSubscriberService('fragment.listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\FragmentListener');\n $instance->addSubscriberService('debug.debug_handlers_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\DebugHandlersListener');\n $instance->addSubscriberService('router_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\RouterListener');\n $instance->addSubscriberService('security.firewall', 'Symfony\\\\Component\\\\Security\\\\Http\\\\Firewall');\n $instance->addSubscriberService('security.rememberme.response_listener', 'Symfony\\\\Component\\\\Security\\\\Http\\\\RememberMe\\\\ResponseListener');\n $instance->addSubscriberService('twig.exception_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\ExceptionListener');\n $instance->addSubscriberService('monolog.handler.console', 'Symfony\\\\Bridge\\\\Monolog\\\\Handler\\\\ConsoleHandler');\n $instance->addSubscriberService('swiftmailer.email_sender.listener', 'Symfony\\\\Bundle\\\\SwiftmailerBundle\\\\EventListener\\\\EmailSenderListener');\n $instance->addSubscriberService('sensio_framework_extra.controller.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\ControllerListener');\n $instance->addSubscriberService('sensio_framework_extra.converter.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\ParamConverterListener');\n $instance->addSubscriberService('sensio_framework_extra.view.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\TemplateListener');\n $instance->addSubscriberService('sensio_framework_extra.cache.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\HttpCacheListener');\n $instance->addSubscriberService('sensio_framework_extra.security.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\SecurityListener');\n $instance->addSubscriberService('troopers_alertifybundle.event_listener', 'Troopers\\\\AlertifyBundle\\\\EventListener\\\\AlertifyListener');\n $instance->addSubscriberService('fos_user.security.interactive_login_listener', 'FOS\\\\UserBundle\\\\EventListener\\\\LastLoginListener');\n $instance->addSubscriberService('fos_user.listener.authentication', 'FOS\\\\UserBundle\\\\EventListener\\\\AuthenticationListener');\n $instance->addSubscriberService('fos_user.listener.flash', 'FOS\\\\UserBundle\\\\EventListener\\\\FlashListener');\n $instance->addSubscriberService('fos_user.listener.resetting', 'FOS\\\\UserBundle\\\\EventListener\\\\ResettingListener');\n $instance->addSubscriberService('victoire_core.cache_subscriber', 'Victoire\\\\Bundle\\\\CoreBundle\\\\EventSubscriber\\\\CacheSubscriber');\n $instance->addSubscriberService('victoire_i18n.locale_subscriber', 'Victoire\\\\Bundle\\\\I18nBundle\\\\Subscriber\\\\LocaleSubscriber');\n $instance->addSubscriberService('victoire_view_reference.listener', 'Victoire\\\\Bundle\\\\ViewReferenceBundle\\\\Listener\\\\ViewReferenceListener');\n\n return $instance;\n }",
"public function getService()\n\t{\n\t\treturn $this->_service;\n\t}",
"protected function getConsole_ExceptionSubscriberService()\n {\n return $this->services['console.exception_subscriber'] = new \\phpbb\\console\\exception_subscriber(${($_ = isset($this->services['language']) ? $this->services['language'] : $this->getLanguageService()) && false ?: '_'});\n }",
"protected function getTranslation_Loader_YmlService()\n {\n return $this->services['translation.loader.yml'] = new \\Symfony\\Component\\Translation\\Loader\\YamlFileLoader();\n }",
"function listen($listener)\n{\n return XPSPL::instance()->listen($listener);\n}",
"protected function getTextReparser_ManagerService()\n {\n return $this->services['text_reparser.manager'] = new \\phpbb\\textreparser\\manager(${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['config_text']) ? $this->services['config_text'] : $this->getConfigTextService()) && false ?: '_'}, ${($_ = isset($this->services['text_reparser_collection']) ? $this->services['text_reparser_collection'] : $this->getTextReparserCollectionService()) && false ?: '_'});\n }",
"protected function getTranslation_Loader_ResService()\n {\n return $this->services['translation.loader.res'] = new \\Symfony\\Component\\Translation\\Loader\\IcuResFileLoader();\n }",
"function getService() {\n return $this->service;\n }",
"public function listener($name) {\n\t\treturn $this->_loadListener($name);\n\t}",
"protected function getEventDispatcherService()\n {\n if (isset($this->shared['event_dispatcher'])) return $this->shared['event_dispatcher'];\n\n $class = $this->getParameter('event_dispatcher.class');\n $instance = new $class($this);\n $this->shared['event_dispatcher'] = $instance;\n\n return $instance;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }"
] | [
"0.83105755",
"0.7376979",
"0.7368228",
"0.7240916",
"0.7240371",
"0.72346175",
"0.69821835",
"0.6775994",
"0.6753803",
"0.669038",
"0.66442525",
"0.6635897",
"0.6575431",
"0.65557075",
"0.6499195",
"0.6497636",
"0.64452547",
"0.63993",
"0.63869196",
"0.6373831",
"0.6367928",
"0.6366147",
"0.63565165",
"0.6314596",
"0.6312922",
"0.6310063",
"0.6297623",
"0.6297369",
"0.6297369",
"0.62864625",
"0.62334144",
"0.6233349",
"0.6152696",
"0.6130275",
"0.61118686",
"0.6088839",
"0.60696524",
"0.6056838",
"0.60396355",
"0.60050344",
"0.60050344",
"0.60036707",
"0.59868354",
"0.59858006",
"0.5977791",
"0.59643626",
"0.595423",
"0.595423",
"0.595423",
"0.5943005",
"0.593276",
"0.59160787",
"0.5915408",
"0.58915836",
"0.5888199",
"0.58623296",
"0.58623296",
"0.58623296",
"0.58623296",
"0.58623296",
"0.58623296",
"0.58623296",
"0.5861739",
"0.5861739",
"0.58605736",
"0.58605736",
"0.58605736",
"0.58605736",
"0.58605736",
"0.58605736",
"0.58605736",
"0.58605736",
"0.58605736",
"0.5854647",
"0.5850506",
"0.5830071",
"0.58257246",
"0.58257246",
"0.5822919",
"0.5822919",
"0.5794399",
"0.5780535",
"0.57538044",
"0.57230747",
"0.5707769",
"0.57000667",
"0.56979036",
"0.56935656",
"0.56932586",
"0.56889266",
"0.5688171",
"0.568686",
"0.5675432",
"0.56753343",
"0.56746024",
"0.56663746",
"0.5658697",
"0.5655844",
"0.56350875",
"0.56350875"
] | 0.8392903 | 0 |
Gets the private 'validate_request_listener' shared service. | protected function getValidateRequestListenerService()
{
return $this->services['validate_request_listener'] = new \Symfony\Component\HttpKernel\EventListener\ValidateRequestListener();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getListener(/* ... */)\n {\n return $this->_listener;\n }",
"public function getValidatorService()\n {\n return $this->validatorService;\n }",
"protected function getVictoireI18n_Kernelrequest_ListenerService()\n {\n return $this->services['victoire_i18n.kernelrequest.listener'] = new \\Victoire\\Bundle\\I18nBundle\\Listener\\KernelRequestListener($this->get('twig'), array(0 => 'fr', 1 => 'en'));\n }",
"protected function getValidatorService()\n {\n return $this->services['validator'] = $this->get('validator.builder')->getValidator();\n }",
"public function listener() {\n\t\treturn $this->_runtime['listener'];\n\t}",
"protected function getLocaleListenerService()\n {\n return $this->services['locale_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener($this->get('request_stack'), 'en', $this->get('router', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"public function getValidatorService();",
"protected function getTranslatorListenerService()\n {\n return $this->services['translator_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\TranslatorListener(${($_ = isset($this->services['translator.default']) ? $this->services['translator.default'] : $this->getTranslator_DefaultService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack()) && false ?: '_'});\n }",
"protected function getDispatcherListener()\n {\n return $this->di->getShared('dispatcherListener');\n }",
"protected function getRouterListenerService()\n {\n return $this->services['router_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener($this->get('router'), $this->get('request_stack'), ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'}, $this->get('monolog.logger.request', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"protected function getTranslatorListenerService()\n {\n return $this->services['translator_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\TranslatorListener($this->get('translator.default'), $this->get('request_stack'));\n }",
"protected function getRequestService()\n {\n return $this->services['request'] = new \\phpbb\\request\\request(NULL, true);\n }",
"public function addRequestCreateListener($listener);",
"protected function getSensioFrameworkExtra_Cache_ListenerService()\n {\n return $this->services['sensio_framework_extra.cache.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\HttpCacheListener();\n }",
"protected function getSensioFrameworkExtra_Security_ListenerService()\n {\n return $this->services['sensio_framework_extra.security.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\SecurityListener(NULL, new \\Sensio\\Bundle\\FrameworkExtraBundle\\Security\\ExpressionLanguage(), ${($_ = isset($this->services['security.authentication.trust_resolver']) ? $this->services['security.authentication.trust_resolver'] : $this->getSecurity_Authentication_TrustResolverService()) && false ?: '_'}, ${($_ = isset($this->services['security.role_hierarchy']) ? $this->services['security.role_hierarchy'] : $this->getSecurity_RoleHierarchyService()) && false ?: '_'}, $this->get('security.token_storage', ContainerInterface::NULL_ON_INVALID_REFERENCE), $this->get('security.authorization_checker', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"protected function getLocaleListenerService()\n {\n return $this->services['locale_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener(${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack()) && false ?: '_'}, 'en', ${($_ = isset($this->services['router']) ? $this->services['router'] : $this->getRouterService()) && false ?: '_'});\n }",
"protected function getVictoireTwig_Kernelrequest_ListenerService()\n {\n return $this->services['victoire_twig.kernelrequest.listener'] = new \\Victoire\\Bundle\\TwigBundle\\Listener\\KernelRequestListener($this->get('twig'), array('xs' => array('min' => 0, 'max' => 767), 'sm' => array('min' => 768, 'max' => 991), 'md' => array('min' => 992, 'max' => 1199), 'lg' => array('min' => 1200)));\n }",
"protected function getRouter_ListenerService()\n {\n return $this->services['router.listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener(${($_ = isset($this->services['router']) ? $this->services['router'] : $this->getRouterService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : ($this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack())) && false ?: '_'});\n }",
"public function getValidator() {}",
"protected function getSymfonyRequestService()\n {\n return $this->services['symfony_request'] = new \\phpbb\\symfony_request(${($_ = isset($this->services['request']) ? $this->services['request'] : ($this->services['request'] = new \\phpbb\\request\\request(NULL, true))) && false ?: '_'});\n }",
"protected function getCache_ValidatorService()\n {\n return $this->services['cache.validator'] = \\Symfony\\Component\\Cache\\Adapter\\AbstractAdapter::createSystemCache('k0V7XpDK96', 0, 'MYfBg2oUlptyQ7C3Ob4WQe', (__DIR__.'/pools'), $this->get('monolog.logger.cache', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"protected function getResponseListenerService()\n {\n return $this->services['response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener('UTF-8');\n }",
"protected function getResponseListenerService()\n {\n return $this->services['response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener('UTF-8');\n }",
"protected function getSessionListenerService()\n {\n return $this->services['session_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\SessionListener(new \\Symfony\\Component\\DependencyInjection\\ServiceLocator(array('session' => function () {\n return ${($_ = isset($this->services['session']) ? $this->services['session'] : $this->load('getSessionService.php')) && false ?: '_'};\n })));\n }",
"protected function getValidatorInstance()\n {\n return app(ValidationFactory::class);\n }",
"protected function getRouterListenerService()\n {\n return $this->services['router_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener(${($_ = isset($this->services['router']) ? $this->services['router'] : $this->getRouterService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack()) && false ?: '_'}, ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'}, ${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->services['logger'] = new \\Symfony\\Component\\HttpKernel\\Log\\Logger()) && false ?: '_'}, $this->targetDirs[3], true);\n }",
"public function getValidator()\n {\n return $this->validator;\n }",
"public function getValidator()\n {\n return $this->validator;\n }",
"public function getValidator()\n {\n return $this->validator;\n }",
"protected function getSwiftmailer_EmailSender_ListenerService()\n {\n return $this->services['swiftmailer.email_sender.listener'] = new \\Symfony\\Bundle\\SwiftmailerBundle\\EventListener\\EmailSenderListener($this, $this->get('logger', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"public function getValidator() {\n return $this->__validator;\n }",
"protected function getSessionListenerService()\n {\n return $this->services['session_listener'] = new \\Symfony\\Bundle\\FrameworkBundle\\EventListener\\SessionListener($this);\n }",
"public static function GetValidateServer ()\n {\n\t\treturn self::GetServer('forceValidateServer', 'validate');\n }",
"protected function getPhpbb_Viglink_ListenerService()\n {\n return $this->services['phpbb.viglink.listener'] = new \\phpbb\\viglink\\event\\listener(${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['template']) ? $this->services['template'] : $this->getTemplateService()) && false ?: '_'});\n }",
"private function getHttpRequestVerifier()\n {\n return $this->get('payum.security.http_request_verifier');\n }",
"public static function getSubscribedEvents()\n {\n return [\n 'request.before_send' => 'validateRequest'\n ];\n }",
"public function requestServiceValidate(\n ServerRequestInterface $request,\n array $parameters = []\n ): ResponseInterface;",
"protected function getMonolog_Logger_RequestService()\n {\n $this->services['monolog.logger.request'] = $instance = new \\Symfony\\Bridge\\Monolog\\Logger('request');\n\n $instance->pushHandler($this->get('monolog.handler.console'));\n $instance->pushHandler($this->get('monolog.handler.main'));\n\n return $instance;\n }",
"protected function getSymfonyResponseListenerService()\n {\n return $this->services['symfony_response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener('UTF-8');\n }",
"protected function getForm_TypeExtension_Form_ValidatorService()\n {\n return $this->services['form.type_extension.form.validator'] = new \\Symfony\\Component\\Form\\Extension\\Validator\\Type\\FormTypeValidatorExtension($this->get('validator'));\n }",
"public function getValidator();",
"public function getValidator();",
"public function getValidator() \n {//--------------->> getValidator()\n return $this->_validator;\n }",
"protected function getValidator(): void\n {\n // TODO: Implement getValidator() method.\n }",
"protected function get9c2345652e8ae3f87ba009d0f8fedee27bb751398014908e9ab2fb6d5bf1300f(): \\Viserio\\Component\\Validation\\Validator\n {\n return $this->services[\\Viserio\\Contract\\Validation\\Validator::class] = new \\Viserio\\Component\\Validation\\Validator();\n }",
"public function getValidator()\n {\n if ($this->_validator === null) {\n\n if (class_exists('\\Klikasi\\\\Validator\\Newsletter')) {\n\n $this->setValidator(new \\Klikasi\\Validator\\Newsletter);\n }\n }\n\n return $this->_validator;\n }",
"public function getListeners(Request $request);",
"public static function getServerRequest() {\n\t\tif (is_null(self::$serverRequest)) {\n\t\t\tself::$serverRequest = ServerRequest::fromGlobals();\n\t\t}\n\t\t\n\t\treturn self::$serverRequest;\n\t}",
"protected function getSensioFrameworkExtra_Controller_ListenerService()\n {\n return $this->services['sensio_framework_extra.controller.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\ControllerListener($this->get('annotation_reader'));\n }",
"protected function getValidator_EmailService()\n {\n return $this->services['validator.email'] = new \\Symfony\\Component\\Validator\\Constraints\\EmailValidator(false);\n }",
"private function getValidator()\n {\n return Validation::createValidatorBuilder()->enableAnnotationMapping()->getValidator();\n }",
"function getValidator() {\n\t\tif ( !$this->_Validator instanceof utilityValidator ) {\n\t\t\t$this->_Validator = new utilityValidator();\n\t\t}\n\t\treturn $this->_Validator;\n\t}",
"function getValidator() {\n\t\tif ( !$this->_Validator instanceof utilityValidator ) {\n\t\t\t$this->_Validator = new utilityValidator();\n\t\t}\n\t\treturn $this->_Validator;\n\t}",
"function getValidator() {\n\t\tif ( !$this->_Validator instanceof utilityValidator ) {\n\t\t\t$this->_Validator = new utilityValidator();\n\t\t}\n\t\treturn $this->_Validator;\n\t}",
"public function getValidator()\n\t{\n\t\treturn $this->validation->validator->validator;\n\t}",
"protected function _listener($name) {\n\t\treturn $this->_crud()->listener($name);\n\t}",
"protected function getCron_EventListenerService()\n {\n return $this->services['cron.event_listener'] = new \\phpbb\\cron\\event\\cron_runner_listener(${($_ = isset($this->services['cron.lock_db']) ? $this->services['cron.lock_db'] : $this->getCron_LockDbService()) && false ?: '_'}, ${($_ = isset($this->services['cron.manager']) ? $this->services['cron.manager'] : $this->getCron_ManagerService()) && false ?: '_'}, ${($_ = isset($this->services['request']) ? $this->services['request'] : ($this->services['request'] = new \\phpbb\\request\\request(NULL, true))) && false ?: '_'});\n }",
"protected function registerHttpValidation()\n {\n $this->app->singleton('api.http.validator', static function ($app) {\n return new RequestValidator($app);\n });\n\n $this->app->singleton(Domain::class, function ($app) {\n return new Validation\\Domain($this->config('domain'));\n });\n\n $this->app->singleton(Prefix::class, function ($app) {\n return new Validation\\Prefix($this->config('prefix'));\n });\n\n $this->app->singleton(Accept::class, function ($app) {\n return new Validation\\Accept(\n $app[AcceptParser::class], $this->config('strict')\n );\n });\n }",
"protected function getStreamedResponseListenerService()\n {\n return $this->services['streamed_response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\StreamedResponseListener();\n }",
"protected function getStreamedResponseListenerService()\n {\n return $this->services['streamed_response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\StreamedResponseListener();\n }",
"public function validateRequest();",
"protected function getSensioFrameworkExtra_Converter_ListenerService()\n {\n return $this->services['sensio_framework_extra.converter.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\ParamConverterListener($this->get('sensio_framework_extra.converter.manager'), true);\n }",
"protected function getFragment_ListenerService()\n {\n return $this->services['fragment.listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\FragmentListener($this->get('uri_signer'), '/_fragment');\n }",
"protected function createValidator() {\n return $this->validator;\n }",
"public function listener($name) {\n\t\treturn $this->_loadListener($name);\n\t}",
"public static function getApplicableListener(): array;",
"public function getValidator()\n\t{\n\t\tif (!is_object($this->_validator)) {\n\t\t\t$validatorClass = $this->xpdo->loadClass('validation.xPDOValidator', XPDO_CORE_PATH, true, true);\n\t\t\tif ($derivedClass = $this->getOption(xPDO::OPT_VALIDATOR_CLASS, null, '')) {\n\t\t\t\tif ($derivedClass = $this->xpdo->loadClass($derivedClass, '', false, true)) {\n\t\t\t\t\t$validatorClass = $derivedClass;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($profitClass = $this->getOption('mlmsystem_handler_class_profit_validator', null, '')) {\n\t\t\t\tif ($profitClass = $this->xpdo->loadClass($profitClass, $this->getOption('mlmsystem_core_path', null, MODX_CORE_PATH . 'components/mlmsystem/') . 'handlers/validations/', false, true)) {\n\t\t\t\t\t$validatorClass = $profitClass;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($validatorClass) {\n\t\t\t\t$this->_validator = new $validatorClass($this);\n\t\t\t}\n\t\t}\n\t\treturn $this->_validator;\n\t}",
"protected function _request() {\n\t\treturn $this->_container->request;\n\t}",
"public static function getValidatorInstance()\n {\n if (static::$validator === null)\n {\n static::$validator = new Validator();\n }\n\n return static::$validator;\n }",
"public function validatedBy()\n {\n return $this->service;\n }",
"public function validatedBy()\n {\n return $this->service;\n }",
"public function validatedBy()\n {\n return $this->service;\n }",
"public function createValidator()\n {\n $validator = Validation::createValidatorBuilder()\n ->setMetadataFactory(new ClassMetadataFactory(new StaticMethodLoader()))\n ->setConstraintValidatorFactory(new ConstraintValidatorFactory($this->app))\n ->setTranslator($this->getTranslator())\n ->setApiVersion(Validation::API_VERSION_2_5)\n ->getValidator();\n\n return $validator;\n }",
"public function getDelegatedValidator()\n {\n return $this->validator;\n }",
"protected function getForm_TypeExtension_Upload_ValidatorService()\n {\n return $this->services['form.type_extension.upload.validator'] = new \\Symfony\\Component\\Form\\Extension\\Validator\\Type\\UploadValidatorExtension($this->get('translator.default'), 'validators');\n }",
"function listen($listener)\n{\n return XPSPL::instance()->listen($listener);\n}",
"function validator() {\n if ($this->validator) return $this->validator;\n $options = array();\n foreach ($this->fields_options as $field => $field_options) {\n if (!@$field_options['validation']) continue;\n $options[$field] = $field_options['validation'];\n }\n return $this->validator = new xValidatorStore($options, $_REQUEST);\n }",
"protected function getValidationFactory()\n {\n return app('validator');\n }",
"protected function getSecurity_Rememberme_ResponseListenerService()\n {\n return $this->services['security.rememberme.response_listener'] = new \\Symfony\\Component\\Security\\Http\\RememberMe\\ResponseListener();\n }",
"protected function getSecurity_Rememberme_ResponseListenerService()\n {\n return $this->services['security.rememberme.response_listener'] = new \\Symfony\\Component\\Security\\Http\\RememberMe\\ResponseListener();\n }",
"public function & GetRequest ();",
"public function getRequest()\n {\n return $this->getService('request');\n }",
"protected function getForm_TypeGuesser_ValidatorService()\n {\n return $this->services['form.type_guesser.validator'] = new \\Symfony\\Component\\Form\\Extension\\Validator\\ValidatorTypeGuesser($this->get('validator'));\n }",
"protected function getTwig_ExceptionListenerService()\n {\n return $this->services['twig.exception_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ExceptionListener('twig.controller.exception:showAction', $this->get('monolog.logger.request', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"protected function getDebug_DebugHandlersListenerService()\n {\n return $this->services['debug.debug_handlers_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\DebugHandlersListener(NULL, $this->get('monolog.logger.php', ContainerInterface::NULL_ON_INVALID_REFERENCE), -1, 0, false, ${($_ = isset($this->services['debug.file_link_formatter']) ? $this->services['debug.file_link_formatter'] : $this->getDebug_FileLinkFormatterService()) && false ?: '_'}, false);\n }",
"protected function resolveListener(string $listener)\n {\n return Container::getInstance()->make($listener);\n }",
"protected function getDispatcherService()\n {\n $this->services['dispatcher'] = $instance = new \\phpbb\\event\\dispatcher($this);\n\n $instance->addListener('core.viewtopic_post_row_after', [0 => function () {\n return ${($_ = isset($this->services['phpbb.viglink.listener']) ? $this->services['phpbb.viglink.listener'] : $this->getPhpbb_Viglink_ListenerService()) && false ?: '_'};\n }, 1 => 'display_viglink'], 0);\n $instance->addListener('core.acp_main_notice', [0 => function () {\n return ${($_ = isset($this->services['phpbb.viglink.acp_listener']) ? $this->services['phpbb.viglink.acp_listener'] : $this->getPhpbb_Viglink_AcpListenerService()) && false ?: '_'};\n }, 1 => 'set_viglink_services'], 0);\n $instance->addListener('core.acp_help_phpbb_submit_before', [0 => function () {\n return ${($_ = isset($this->services['phpbb.viglink.acp_listener']) ? $this->services['phpbb.viglink.acp_listener'] : $this->getPhpbb_Viglink_AcpListenerService()) && false ?: '_'};\n }, 1 => 'update_viglink_settings'], 0);\n $instance->addListener('console.exception', [0 => function () {\n return ${($_ = isset($this->services['console.exception_subscriber']) ? $this->services['console.exception_subscriber'] : $this->getConsole_ExceptionSubscriberService()) && false ?: '_'};\n }, 1 => 'on_exception'], 0);\n $instance->addListener('kernel.terminate', [0 => function () {\n return ${($_ = isset($this->services['cron.event_listener']) ? $this->services['cron.event_listener'] : $this->getCron_EventListenerService()) && false ?: '_'};\n }, 1 => 'on_kernel_terminate'], 0);\n $instance->addListener('kernel.exception', [0 => function () {\n return ${($_ = isset($this->services['kernel_exception_subscriber']) ? $this->services['kernel_exception_subscriber'] : $this->getKernelExceptionSubscriberService()) && false ?: '_'};\n }, 1 => 'on_kernel_exception'], 0);\n $instance->addListener('kernel.terminate', [0 => function () {\n return ${($_ = isset($this->services['kernel_terminate_subscriber']) ? $this->services['kernel_terminate_subscriber'] : ($this->services['kernel_terminate_subscriber'] = new \\phpbb\\event\\kernel_terminate_subscriber())) && false ?: '_'};\n }, 1 => 'on_kernel_terminate'], -9223372036854775807-1);\n $instance->addListener('kernel.response', [0 => function () {\n return ${($_ = isset($this->services['symfony_response_listener']) ? $this->services['symfony_response_listener'] : ($this->services['symfony_response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener('UTF-8'))) && false ?: '_'};\n }, 1 => 'onKernelResponse'], 0);\n $instance->addListener('kernel.request', [0 => function () {\n return ${($_ = isset($this->services['router.listener']) ? $this->services['router.listener'] : $this->getRouter_ListenerService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'], 32);\n $instance->addListener('kernel.finish_request', [0 => function () {\n return ${($_ = isset($this->services['router.listener']) ? $this->services['router.listener'] : $this->getRouter_ListenerService()) && false ?: '_'};\n }, 1 => 'onKernelFinishRequest'], 0);\n $instance->addListener('kernel.exception', [0 => function () {\n return ${($_ = isset($this->services['router.listener']) ? $this->services['router.listener'] : $this->getRouter_ListenerService()) && false ?: '_'};\n }, 1 => 'onKernelException'], -64);\n\n return $instance;\n }",
"public function listener(Listener $listener);",
"protected function getDebug_DebugHandlersListenerService()\n {\n return $this->services['debug.debug_handlers_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\DebugHandlersListener(NULL, ${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->services['logger'] = new \\Symfony\\Component\\HttpKernel\\Log\\Logger()) && false ?: '_'}, -1, -1, true, new \\Symfony\\Component\\HttpKernel\\Debug\\FileLinkFormatter(NULL), true);\n }",
"public function validators()\n {\n if (is_null($this->validatorRequests)) {\n $this->validatorRequests = new ValidatorRequests($this->client);\n }\n\n return $this->validatorRequests;\n }",
"protected function getValidator($request)\n {\n $rules = [\n 'page_title' => 'required',\n 'status' => 'required|integer|between:0,1'\n ];\n \n $customMessages = [\n 'page_title.required' => __('admin.pages.field_validation.title_field_required_msg'),\n 'status.required' => __('admin.pages.field_validation.status_field_required_msg')\n ];\n\n return Validator::make($request->all(), $rules, $customMessages);\n }",
"protected function getForm_TypeExtension_Submit_ValidatorService()\n {\n return $this->services['form.type_extension.submit.validator'] = new \\Symfony\\Component\\Form\\Extension\\Validator\\Type\\SubmitTypeValidatorExtension();\n }",
"protected function getValidation()\n {\n return $this->validation;\n }",
"public function validator()\n {\n return $this->validator;\n }",
"public function getFromRequest(ServerRequestInterface $request);",
"public static function getRequestValidators()\n {\n if (isset(static::$validators)) {\n return static::$validators;\n }\n\n // To match the route, we will use a chain of responsibility pattern with the\n // validator implementations. We will spin through each one making sure it\n // passes and then we will know if the route as a whole matches request.\n return static::$validators = [\n new ValidateAgainstUri(),\n new ValidateAgainstHost(),\n new ValidateAgainstScheme(),\n new ValidateAgainstMethod()\n ];\n }",
"protected function getNotification_Type_GroupRequestService()\n {\n $instance = new \\phpbb\\notification\\type\\group_request(${($_ = isset($this->services['dbal.conn']) ? $this->services['dbal.conn'] : ($this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this))) && false ?: '_'}, ${($_ = isset($this->services['language']) ? $this->services['language'] : $this->getLanguageService()) && false ?: '_'}, ${($_ = isset($this->services['user']) ? $this->services['user'] : $this->getUserService()) && false ?: '_'}, ${($_ = isset($this->services['auth']) ? $this->services['auth'] : ($this->services['auth'] = new \\phpbb\\auth\\auth())) && false ?: '_'}, './../', 'php', 'phpbb_user_notifications');\n\n $instance->set_user_loader(${($_ = isset($this->services['user_loader']) ? $this->services['user_loader'] : $this->getUserLoaderService()) && false ?: '_'});\n\n return $instance;\n }",
"function request(): Request\n\t{\n\t\tstatic $request;\n\n\t\tif($request === null)\n\t\t{\n\t\t\t$request = Application::instance()->getContainer()->get(Request::class);\n\t\t}\n\n\t\treturn $request;\n\t}",
"public function listen($listener);"
] | [
"0.66137916",
"0.6396105",
"0.6364457",
"0.61866176",
"0.61820257",
"0.6032988",
"0.60188395",
"0.5995926",
"0.5994554",
"0.59464383",
"0.5937568",
"0.590241",
"0.58865523",
"0.58669937",
"0.58431375",
"0.58279085",
"0.57887363",
"0.5788313",
"0.567367",
"0.5650776",
"0.5630373",
"0.5606366",
"0.5606366",
"0.55516475",
"0.55413383",
"0.55149907",
"0.5490163",
"0.5490163",
"0.5490163",
"0.5488845",
"0.54687613",
"0.5434868",
"0.5431866",
"0.5426388",
"0.54030484",
"0.5375147",
"0.5367375",
"0.53538483",
"0.5347977",
"0.5330641",
"0.5320463",
"0.5320463",
"0.5292266",
"0.5285632",
"0.5267012",
"0.5247868",
"0.5241872",
"0.5236651",
"0.5220241",
"0.52172035",
"0.5216422",
"0.5215588",
"0.5215588",
"0.5215588",
"0.5214557",
"0.5204259",
"0.519471",
"0.518679",
"0.5186608",
"0.5186608",
"0.5186132",
"0.518507",
"0.51843166",
"0.5162171",
"0.5156929",
"0.51489085",
"0.5142231",
"0.51421654",
"0.5142063",
"0.51410186",
"0.51410186",
"0.51410186",
"0.51253533",
"0.5124138",
"0.510982",
"0.51074797",
"0.51006305",
"0.5098348",
"0.5091797",
"0.5091797",
"0.50875175",
"0.50579876",
"0.50519484",
"0.50237435",
"0.5022265",
"0.500903",
"0.5001792",
"0.4995123",
"0.49866465",
"0.49864972",
"0.49772567",
"0.49711633",
"0.49519956",
"0.4951755",
"0.49514967",
"0.49421078",
"0.49416527",
"0.49352172",
"0.4931434"
] | 0.8275839 | 1 |
Computes a dynamic parameter. | private function getDynamicParameter($name)
{
switch ($name) {
case 'kernel.root_dir': $value = ($this->targetDirs[3].'/src'); break;
case 'kernel.project_dir': $value = $this->targetDirs[3]; break;
case 'kernel.cache_dir': $value = $this->targetDirs[0]; break;
case 'kernel.logs_dir': $value = ($this->targetDirs[2].'/log'); break;
case 'kernel.bundles_metadata': $value = array(
'FrameworkBundle' => array(
'parent' => NULL,
'path' => ($this->targetDirs[3].'/vendor/symfony/framework-bundle'),
'namespace' => 'Symfony\\Bundle\\FrameworkBundle',
),
'DoctrineCacheBundle' => array(
'parent' => NULL,
'path' => ($this->targetDirs[3].'/vendor/doctrine/doctrine-cache-bundle'),
'namespace' => 'Doctrine\\Bundle\\DoctrineCacheBundle',
),
'DoctrineBundle' => array(
'parent' => NULL,
'path' => ($this->targetDirs[3].'/vendor/doctrine/doctrine-bundle'),
'namespace' => 'Doctrine\\Bundle\\DoctrineBundle',
),
'DoctrineMigrationsBundle' => array(
'parent' => NULL,
'path' => ($this->targetDirs[3].'/vendor/doctrine/doctrine-migrations-bundle'),
'namespace' => 'Doctrine\\Bundle\\MigrationsBundle',
),
'MakerBundle' => array(
'parent' => NULL,
'path' => ($this->targetDirs[3].'/vendor/symfony/maker-bundle/src'),
'namespace' => 'Symfony\\Bundle\\MakerBundle',
),
'SecurityBundle' => array(
'parent' => NULL,
'path' => ($this->targetDirs[3].'/vendor/symfony/security-bundle'),
'namespace' => 'Symfony\\Bundle\\SecurityBundle',
),
); break;
case 'kernel.secret': $value = $this->getEnv('APP_SECRET'); break;
case 'session.save_path': $value = ($this->targetDirs[0].'/sessions'); break;
case 'validator.mapping.cache.file': $value = ($this->targetDirs[0].'/validation.php'); break;
case 'translator.default_path': $value = ($this->targetDirs[3].'/translations'); break;
case 'debug.container.dump': $value = ($this->targetDirs[0].'/srcDevDebugProjectContainer.xml'); break;
case 'doctrine.orm.proxy_dir': $value = ($this->targetDirs[0].'/doctrine/orm/Proxies'); break;
case 'doctrine_migrations.dir_name': $value = ($this->targetDirs[3].'/src/Migrations'); break;
default: throw new InvalidArgumentException(sprintf('The dynamic parameter "%s" must be defined.', $name));
}
$this->loadedDynamicParameters[$name] = true;
return $this->dynamicParameters[$name] = $value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function buildDynamicParameters(): void\n {\n $this->dynamicParameters ??= $this->definition->getDynamicParameters($this);\n }",
"private function getDynamicParameter($name)\n {\n throw new InvalidArgumentException(sprintf('The dynamic parameter \"%s\" must be defined.', $name));\n }",
"private function getDynamicParameter($name)\n {\n throw new InvalidArgumentException(sprintf('The dynamic parameter \"%s\" must be defined.', $name));\n }",
"public function getDynamicParameter(string $parameter)\n {\n $this->buildDynamicParameters();\n\n return $this->dynamicParameters->offsetGet($parameter);\n }",
"public function isDynamic() {}",
"private function getDynamicParameter($name)\n {\n switch ($name) {\n case 'kernel.root_dir': $value = ($this->targetDirs[3].'/app'); break;\n case 'kernel.logs_dir': $value = ($this->targetDirs[2].'/logs'); break;\n case 'kernel.bundles_metadata': $value = array(\n 'FrameworkBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle'),\n 'namespace' => 'Symfony\\\\Bundle\\\\FrameworkBundle',\n ),\n 'SecurityBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle'),\n 'namespace' => 'Symfony\\\\Bundle\\\\SecurityBundle',\n ),\n 'TwigBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle'),\n 'namespace' => 'Symfony\\\\Bundle\\\\TwigBundle',\n ),\n 'MonologBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/symfony/monolog-bundle'),\n 'namespace' => 'Symfony\\\\Bundle\\\\MonologBundle',\n ),\n 'SwiftmailerBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/symfony/swiftmailer-bundle'),\n 'namespace' => 'Symfony\\\\Bundle\\\\SwiftmailerBundle',\n ),\n 'DoctrineBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/doctrine/doctrine-bundle'),\n 'namespace' => 'Doctrine\\\\Bundle\\\\DoctrineBundle',\n ),\n 'SensioFrameworkExtraBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/sensio/framework-extra-bundle'),\n 'namespace' => 'Sensio\\\\Bundle\\\\FrameworkExtraBundle',\n ),\n 'AppBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/src/AppBundle'),\n 'namespace' => 'AppBundle',\n ),\n 'A2lixTranslationFormBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/a2lix/translation-form-bundle/A2lix/TranslationFormBundle'),\n 'namespace' => 'A2lix\\\\TranslationFormBundle',\n ),\n 'BazingaJsTranslationBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/willdurand/js-translation-bundle'),\n 'namespace' => 'Bazinga\\\\Bundle\\\\JsTranslationBundle',\n ),\n 'AsseticBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/symfony/assetic-bundle'),\n 'namespace' => 'Symfony\\\\Bundle\\\\AsseticBundle',\n ),\n 'TroopersAsseticInjectorBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/troopers/assetic-injector-bundle/Troopers/AsseticInjectorBundle'),\n 'namespace' => 'Troopers\\\\AsseticInjectorBundle',\n ),\n 'TroopersAlertifyBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/troopers/alertify-bundle/Troopers/AlertifyBundle'),\n 'namespace' => 'Troopers\\\\AlertifyBundle',\n ),\n 'FOSUserBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle'),\n 'namespace' => 'FOS\\\\UserBundle',\n ),\n 'FOSJsRoutingBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/friendsofsymfony/jsrouting-bundle'),\n 'namespace' => 'FOS\\\\JsRoutingBundle',\n ),\n 'JMSSerializerBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/jms/serializer-bundle/JMS/SerializerBundle'),\n 'namespace' => 'JMS\\\\SerializerBundle',\n ),\n 'LiipImagineBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/liip/imagine-bundle'),\n 'namespace' => 'Liip\\\\ImagineBundle',\n ),\n 'KnpMenuBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/knplabs/knp-menu-bundle'),\n 'namespace' => 'Knp\\\\Bundle\\\\MenuBundle',\n ),\n 'DoctrineBehaviorsBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/knplabs/doctrine-behaviors/src/Bundle'),\n 'namespace' => 'Knp\\\\DoctrineBehaviors\\\\Bundle',\n ),\n 'SncRedisBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/snc/redis-bundle'),\n 'namespace' => 'Snc\\\\RedisBundle',\n ),\n 'StofDoctrineExtensionsBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/stof/doctrine-extensions-bundle'),\n 'namespace' => 'Stof\\\\DoctrineExtensionsBundle',\n ),\n 'VictoireAnalyticsBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/AnalyticsBundle'),\n 'namespace' => 'Victoire\\\\Bundle\\\\AnalyticsBundle',\n ),\n 'VictoireBlogBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BlogBundle'),\n 'namespace' => 'Victoire\\\\Bundle\\\\BlogBundle',\n ),\n 'VictoireBusinessEntityBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessEntityBundle'),\n 'namespace' => 'Victoire\\\\Bundle\\\\BusinessEntityBundle',\n ),\n 'VictoireBusinessPageBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessPageBundle'),\n 'namespace' => 'Victoire\\\\Bundle\\\\BusinessPageBundle',\n ),\n 'VictoireCoreBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/CoreBundle'),\n 'namespace' => 'Victoire\\\\Bundle\\\\CoreBundle',\n ),\n 'VictoireCriteriaBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/CriteriaBundle'),\n 'namespace' => 'Victoire\\\\Bundle\\\\CriteriaBundle',\n ),\n 'VictoireFilterBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/FilterBundle'),\n 'namespace' => 'Victoire\\\\Bundle\\\\FilterBundle',\n ),\n 'VictoireFormBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/FormBundle'),\n 'namespace' => 'Victoire\\\\Bundle\\\\FormBundle',\n ),\n 'VictoireI18nBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/I18nBundle'),\n 'namespace' => 'Victoire\\\\Bundle\\\\I18nBundle',\n ),\n 'VictoireMediaBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/MediaBundle'),\n 'namespace' => 'Victoire\\\\Bundle\\\\MediaBundle',\n ),\n 'VictoirePageBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/PageBundle'),\n 'namespace' => 'Victoire\\\\Bundle\\\\PageBundle',\n ),\n 'VictoireQueryBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/QueryBundle'),\n 'namespace' => 'Victoire\\\\Bundle\\\\QueryBundle',\n ),\n 'VictoireSeoBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/SeoBundle'),\n 'namespace' => 'Victoire\\\\Bundle\\\\SeoBundle',\n ),\n 'VictoireSitemapBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/SitemapBundle'),\n 'namespace' => 'Victoire\\\\Bundle\\\\SitemapBundle',\n ),\n 'VictoireTemplateBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/TemplateBundle'),\n 'namespace' => 'Victoire\\\\Bundle\\\\TemplateBundle',\n ),\n 'VictoireTwigBundle' => array(\n 'parent' => 'TwigBundle',\n 'path' => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/TwigBundle'),\n 'namespace' => 'Victoire\\\\Bundle\\\\TwigBundle',\n ),\n 'VictoireUIBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/UIBundle'),\n 'namespace' => 'Victoire\\\\Bundle\\\\UIBundle',\n ),\n 'VictoireUserBundle' => array(\n 'parent' => 'FOSUserBundle',\n 'path' => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/UserBundle'),\n 'namespace' => 'Victoire\\\\Bundle\\\\UserBundle',\n ),\n 'ViewReferenceBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/ViewReferenceBundle'),\n 'namespace' => 'Victoire\\\\Bundle\\\\ViewReferenceBundle',\n ),\n 'VictoireWidgetBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/WidgetBundle'),\n 'namespace' => 'Victoire\\\\Bundle\\\\WidgetBundle',\n ),\n 'VictoireWidgetMapBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/WidgetMapBundle'),\n 'namespace' => 'Victoire\\\\Bundle\\\\WidgetMapBundle',\n ),\n ); break;\n case 'session.save_path': $value = ($this->targetDirs[3].'/app/../var/sessions/prod'); break;\n case 'router.resource': $value = ($this->targetDirs[3].'/app/config/routing.yml'); break;\n case 'assetic.read_from': $value = ($this->targetDirs[3].'/app/../web'); break;\n case 'assetic.write_to': $value = ($this->targetDirs[3].'/app/../web'); break;\n case 'victoire_core.base_paths': $value = array(\n 0 => ($this->targetDirs[3].'/app/../src'),\n 1 => ($this->targetDirs[3].'/app/../vendor/victoire'),\n 2 => ($this->targetDirs[3].'/app/../vendor/friendsofvictoire'),\n ); break;\n default: throw new InvalidArgumentException(sprintf('The dynamic parameter \"%s\" must be defined.', $name));\n }\n $this->loadedDynamicParameters[$name] = true;\n\n return $this->dynamicParameters[$name] = $value;\n }",
"abstract protected function getMaxParameter(): int;",
"public function toPhpReflectionParameter();",
"abstract protected function getParameter($key);",
"public function testDynamicVariables(): void\n {\n $evaluator = new Evaluator();\n $evaluator->variables = ['a' => 1];\n $evaluator->onVariable = [$this, 'doVariable'];\n self::assertEquals(\n 5,\n $evaluator->execute('a+b')\n );\n }",
"private function fetchParameter()\r\n\t{\r\n\t\t//@TODO schlundus, move fetch inside the parameterInfo class\r\n\t\t$parameterSource = $this->parameterInfo->source;\r\n\t\t$parameterName = $this->parameterInfo->name;\r\n\t\t\r\n\t\t$src = null;\r\n\t\tswitch($parameterSource)\r\n\t\t{\r\n\t\t\tcase \"POST\":\r\n\t\t\t\t$src = $_POST;\r\n\t\t\t\tbreak;\r\n\t\r\n\t\t\tcase \"GET\":\r\n\t\t\t\t$src = $_GET;\r\n\t\t\t\tbreak;\r\n\t\r\n\t\t\tcase \"REQUEST\":\r\n\t\t\t\t$src = $_REQUEST;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\r\n\t\t$value = null;\r\n\t\t$fetched = false;\r\n\t\tif ($src)\r\n\t\t{\t\r\n\t\t\tif (isset($src[$parameterName]))\r\n\t\t\t{\r\n\t\t\t\t$value = $src[$parameterName];\r\n\t\t\t\t$fetched = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->bFetched = $fetched;\r\n\t\t$this->taintValue = $value;\r\n\t}",
"public function value($parameter);",
"public function getParameter();",
"public function getParameter();",
"protected function useDynamicUpdate($dynamicUpdate) {}",
"function compileValue(SQLValue $expr)\r\n\t{\r\n\t\tif (!$this->isParametrized) {\r\n\t\t\treturn ($expr->generate($this->generator));\r\n\t\t}\r\n\t\t$name = $this->createParamName();\r\n\r\n\t\t$this->params[] = new DBParam($name,\r\n\t\t\tSQLValue::getDbParamType($expr->value, $expr->type),\r\n\t\t\tSQLValue::getDbParamValue($expr->value, $expr->type, $this->generator));\r\n\t\treturn $name;\r\n\t}",
"public function getParameter($name);",
"public function getParameter($name);",
"public function getParameter($name);",
"static public function isDynamic() {\n return FALSE;\n }",
"public static function getParam() {\n\n\t}",
"protected function _compile_parameters()\r\n\t{\r\n\t\t// Return the column's parameters\r\n\t\treturn $this->parameters;\r\n\t}",
"protected function reemplazaParametro(){\n\t\t$vector=func_get_arg(0);\n\t\t$params=$this->dato;\n//\t\tprint_r($params);\n//\t\techo \"<br>\";\n\t\t$cant=sizeof($params);\n\t\t$accion=$vector[0];\n\t\tif (sizeof($params)!=0){\n\t\t\t$claves=array_keys($params);\n//\t\tfor($x=1;$x<$cant;$x++){\n\t\t\tforeach($claves as $clave){\n\t\t\t\t$str=\"#\".($clave).\"#\";\n\t\t\t\t$accion=str_replace($str,$params[$clave],$accion);\n\t\t\t}\n\t\t}\n\t\treturn $accion;\n\t}",
"abstract protected function getMinParameter(): int;",
"public function createParameter()\n {\n $param = new LiquibaseParameter();\n $this->parameters[] = $param;\n\n return $param;\n }",
"public function getDynamicValue()\n {\n return rand(1, 100);\n }",
"abstract public function getParameters();",
"public function hasDynamicParameter(string $parameter): bool\n {\n $this->buildDynamicParameters();\n\n return $this->dynamicParameters->offsetExists($parameter);\n }",
"function new_parameters() {\r\n\r\n }",
"public function get_value( $dynamic_arg ) {\n\t\t$param = isset( $dynamic_arg['data'] ) ? $this->get_param( $dynamic_arg['data'] ) : false;\n\t\t$fallback = isset( $dynamic_arg['fallback'] ) && '' !== $dynamic_arg['fallback'] ? $dynamic_arg['fallback'] : false;\n\t\t$callback = $param && isset( $param['callback'] ) ? $param['callback'] : false;\n\t\t$default = $param && isset( $param['default'] ) && function_exists( 'fusion_is_preview_frame' ) && fusion_is_preview_frame() && is_singular( 'fusion_tb_section' ) ? $param['default'] : false;\n\t\t$callback_function = $callback && isset( $callback['function'] ) ? $callback['function'] : false;\n\t\t$callback_exists = $callback_function && ( is_callable( 'Fusion_Dynamic_Data_Callbacks::' . $callback_function ) || is_callable( $callback_function ) ) ? true : false;\n\t\tif ( ! $param || ( ! $default && ! $fallback && ! $callback_exists ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( ! $callback_exists ) {\n\t\t\treturn false !== $fallback ? $fallback : $default;\n\t\t}\n\n\t\t$value = is_callable( 'Fusion_Dynamic_Data_Callbacks::' . $callback_function ) ? call_user_func_array( 'Fusion_Dynamic_Data_Callbacks::' . $callback_function, [ $dynamic_arg ] ) : call_user_func_array( $callback_function, [ $dynamic_arg ] );\n\t\tif ( ( ! $value || '' === $value ) && ( $default || $fallback ) ) {\n\t\t\treturn false !== $fallback ? $fallback : $default;\n\t\t}\n\n\t\t(string) $before_string = isset( $dynamic_arg['before'] ) ? $dynamic_arg['before'] : '';\n\t\t(string) $after_string = isset( $dynamic_arg['after'] ) ? $dynamic_arg['after'] : '';\n\n\t\t$this->maybe_store_value( $value, $dynamic_arg );\n\n\t\treturn $before_string . $value . $after_string;\n\t}",
"public static function parameter(string $key, $value): void\n {\n if (!static::hasNewRelic()) {\n return;\n }\n\n if (!is_scalar($value)) {\n $value = json_encode($value);\n }\n\n newrelic_add_custom_parameter($key, $value);\n }",
"public function resolve(ReflectionParameter $parameter, array $providedParameters);",
"public function build(Dynamic $dynamic, $locale);",
"public function prepareDynamicValue($value)\n {\n return $value;\n }",
"public function getParam($name);",
"abstract public function processParameters ($params);",
"public function getParameter($key);",
"function param($name)\n{\n return Yii::app()->params[$name];\n}",
"public function is_dynamic()\n {\n }",
"abstract protected function calculateValue();",
"abstract protected function setParameter($key, $value);",
"function param($name) \n{\n return Yii::app()->params[$name];\n}",
"function param($name)\n{\n static $dbParams;\n if(isset(Yii::app()->params[$name]))\n return Yii::app()->params[$name];\n\telse\n return \"\"; \n}",
"function param($name)\n{\n return Yii::app()->params[$name];\n}",
"public function getConstraint($param);",
"static public function dynamicField ($value, $field) {\n\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:519: lines 519-521\n\t\tif (method_exists($value, $field)) {\n\t\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:520: characters 11-32\n\t\t\tif (is_string($value)) {\n\t\t\t\treturn Boot::getStaticClosure($value, $field);\n\t\t\t} else {\n\t\t\t\treturn Boot::getInstanceClosure($value, $field);\n\t\t\t}\n\t\t}\n\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:522: lines 522-524\n\t\tif (is_string($value)) {\n\t\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:523: characters 4-51\n\t\t\t$value = new HxDynamicStr($value);\n\t\t}\n\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:525: characters 23-28\n\t\t$tmp = $value;\n\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:525: characters 3-36\n\t\treturn $tmp->{$field};\n\t}",
"public function getParam($key);",
"public function getParam($param);",
"public function parameters();",
"public function parameters();",
"public function parameter(string $paramName, $paramValue);",
"private function createParam()\n\t{\n\t\t$this->param = Array('http' => Array(), 'url' => null);\n\t}",
"public function __get($param);",
"public function parameterExists($key);",
"public function isDynamic(): bool;",
"public function __set($var, $value) { $this->{$this->_parameterMap[$var]} = $value; }",
"public function __set($var, $value) { $this->{$this->_parameterMap[$var]} = $value; }",
"function propc($val) {\r\n return kernel::prop_constant($val);\r\n}",
"public function __invoke($param);",
"function param($param, $type = null) {\n\t\tif ($param instanceof ExpressibleInterface) {\n\t\t\t$param = $param->get();\n\t\t}\n\t\tif ($param instanceof Expr) {\n\t\t\treturn (string) $param;\n\t\t}\n\t\t\n\t\t$this->params[] = $param;\n\t\t$this->types[] = $type;\n\t\t\n\t\treturn \"\\$\".count($this->params);\n\t}",
"public function getDefinedParameters();",
"public function visitDynamicStringAstNode( ezcTemplateDynamicStringAstNode $dynamic )\n {\n $parameters = $dynamic->getParameters();\n\n $this->write( '\"' );\n foreach ( $parameters as $parameter )\n {\n if ( $parameter instanceof ezcTemplateLiteralAstNode )\n {\n // Extract value as string and write it without the quotation marks.\n $value = (string)$parameter->value;\n $value = str_replace( array( \"\\\\\", \"\\\"\", \"{\" ),\n array( \"\\\\\\\\\", \"\\\\\\\"\", \"\\\\{\" ),\n $value );\n $this->write( $value );\n }\n else\n {\n $this->write( '{' );\n $parameter->accept( $this );\n $this->write( '}' );\n }\n }\n $this->write( '\"' );\n }",
"protected function createParameterDriver()\n {\n $determiner = new Determiners\\Parameter(\n $this->app['config']['localize-middleware']['parameter']\n );\n\n $determiner->setFallback($this->app['config']['app']['fallback_locale']);\n\n return $determiner;\n }",
"function smarty_function_find_special_param($params, &$smarty)\n{\n\t//$params['id_product'] $params['id_product_group'] $params['param_tag']\n $GLOBALS['GCMS']->assign('findSpecialParam', RelProParam::get(array(\"id_product\" => $params['id_product'],\"id_product_group\" =>$params['id_product_group'],\"param_tag\"=>$params['param_tag']), false, null, \"param\" ));\n}",
"protected function generate(string $abstract, ReflectionParameter $dependency) : Closure\n {\n if ($class = $dependency->getClass()) {\n return $this->build($class->name, \"{$abstract}{$class->name}\");\n }\n\n try {\n $value = $dependency->getDefaultValue();\n\n return function () use ($value) {\n return $value;\n };\n } catch (ReflectionException $e) {\n throw new ContainerException(\"Cannot resolve '$dependency->name' of '$abstract'\", 0, $e);\n }\n }",
"protected function resolve(string $abstract, ReflectionParameter $dependency)\n {\n $key = $abstract.$dependency->name;\n\n if (! isset($this->resolved[$key])) {\n $this->resolved[$key] = $this->generate($abstract, $dependency);\n }\n\n return $this->resolved[$key]($this);\n }",
"public function __get($var) {\n if (!array_key_exists($var, $this->_parameterMap)) {\n return NULL;\n } else {\n return $this->{$this->_parameterMap[$var]};\n }\n }",
"public function __get($var) {\n if (!array_key_exists($var, $this->_parameterMap)) {\n return NULL;\n } else {\n return $this->{$this->_parameterMap[$var]};\n }\n }",
"protected function defineParameter($name, $dataType, $from, $to, $required, $value)\n {\n $this->parameters[$name] = array(\n 'dataType' => $dataType,\n 'from' => $from,\n 'to' => $to,\n 'required' => $required,\n 'value' => $value,\n );\n }",
"public function generateParameters(Configurable $configuration, Requestable $request);",
"protected static function createParameter($name, $element = 'input', $type = 'text', $value = '') {\n\t\t$param = new \\stdClass();\n\t\t$param->element = $element;\n\t\t$param->prefix = '';\n\t\t$param->postfix = '';\n\t\t$param->label = '';\n\t\t$param->attributes = new \\stdClass();\n\t\tif ($type !== 'submit') {\n\t\t\t$param->label = $name;\n\t\t\t$param->attributes->required = true;\n\t\t}\n\t\t$param->attributes->id = 'shortcalc_'.rand(0,1000000);\n\t\t$param->attributes->name = $name;\n\t\t$param->attributes->type = $type;\n\t\t$param->attributes->value = $value;\n\t\treturn $param;\n\t}",
"function _DBParameter($sql)\n\t{\n\t\t$savelog = $this->conn->LogSQL(false);\n\t\tif (is_array($sql)) {\n\t\tglobal $ADODB_FETCH_MODE;\n\n\t\t\t$sql1 = $sql[0];\n\t\t\t$key = $sql[1];\n\t\t\tif (sizeof($sql)>2) $pos = $sql[2];\n\t\t\telse $pos = 1;\n\t\t\tif (sizeof($sql)>3) $coef = $sql[3];\n\t\t\telse $coef = false;\n\t\t\t$ret = false;\n\t\t\t$save = $ADODB_FETCH_MODE;\n\t\t\t$ADODB_FETCH_MODE = ADODB_FETCH_NUM;\n\t\t\tif ($this->conn->fetchMode !== false) $savem = $this->conn->SetFetchMode(false);\n\n\t\t\t$rs = $this->conn->Execute($sql1);\n\n\t\t\tif (isset($savem)) $this->conn->SetFetchMode($savem);\n\t\t\t$ADODB_FETCH_MODE = $save;\n\t\t\tif ($rs) {\n\t\t\t\twhile (!$rs->EOF) {\n\t\t\t\t\t$keyf = reset($rs->fields);\n\t\t\t\t\tif (trim($keyf) == $key) {\n\t\t\t\t\t\t$ret = $rs->fields[$pos];\n\t\t\t\t\t\tif ($coef) $ret *= $coef;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t$rs->MoveNext();\n\t\t\t\t}\n\t\t\t\t$rs->Close();\n\t\t\t}\n\t\t\t$this->conn->LogSQL($savelog);\n\t\t\treturn $ret;\n\t\t} else {\n\t\t\tif (strncmp($sql,'=',1) == 0) {\n\t\t\t\t$fn = substr($sql,1);\n\t\t\t\treturn $this->$fn();\n\t\t\t}\n\t\t\t$sql = str_replace('$DATABASE',$this->conn->database,$sql);\n\t\t\t$ret = $this->conn->GetOne($sql);\n\t\t\t$this->conn->LogSQL($savelog);\n\n\t\t\treturn $ret;\n\t\t}\n\t}",
"public abstract function setParameter($parameter);",
"function __call($p_name,$p_arguments){\n $l_name=strtolower($p_name);\n if(count($p_arguments) != 1){\n throw new DynamicUrlItemException(__(\"Invalid number of parameters :num found but 1 expected\",[\"num\"=>count($p_arguments)])); \n }\n $l_value=$p_arguments[0];\n if(substr($l_name,0,3)==\"set\"){\n $l_name= substr($p_name,3);\n $this->parameters[$l_name]=$l_value;\n }\n }",
"protected function assignParameters($parameters) {\n\t\t$plugin = IoC::getPluginInstance();\n\t\t$domain = $plugin->plugin_slug;\n\n\t\t// create default parameters\n\t\t$formulaParameters = $this->formulaParser::extractParameters($this->formula);\n\t\tforeach ($formulaParameters as $formulaParameter){\n\t\t\t$this->parameters->{$formulaParameter} = self::createParameter($formulaParameter);\n\t\t}\n\n\t\t$processedSubmit = false;\n\t\tforeach ($parameters as $key => $param) {\n\t\t\tif (empty($param->attributes)) { $param->attributes = new \\stdClass(); }\n\t\t\tif (empty($param->attributes->id)) { $param->attributes->id = 'shortcalc_'.rand(0,1000000);}\n\t\t\tif (empty($param->attributes->name) && !empty($param->name)) {\n\t\t\t\t$param->attributes->name = $param->name;\n\t\t\t}\n\t\t\tif (empty($param->attributes->name)) { $param->attributes->name = $key;}\n\t\t\tif (empty($param->attributes->value)) { $param->attributes->value = '';}\n\t\t\tif (empty($param->element)) { $param->element = 'input';}\n\t\t\tif (empty($param->label)) { $param->label = '';}\n\t\t\tif (empty($param->prefix)) { $param->prefix = '';}\n\t\t\tif (empty($param->postfix)) { $param->postfix = '';}\n\n\t\t\tif ($param->element == 'input' && empty($param->attributes->type)) {\n\t\t\t\t$param->attributes->type = 'text';\n\t\t\t}\n\n\t\t\tif (empty($param->label) && $param->attributes->type !== 'submit'\n\t\t\t\t&& $param->element !== 'button') {\n\t\t\t\t$param->label = $key;\n\t\t\t}\n\n\t\t\t$this->parameters->{$param->attributes->name} = $param;\n\n\t\t\tif ($param->attributes->type == 'submit') {\n\t\t\t\t$processedSubmit = true;\n\t\t\t}\n\t\t}\n\n\t\t// add submit button if there is not any\n\t\tif (!$processedSubmit) {\n\t\t\t$this->parameters->submit = self::createParameter('submit', 'input', 'submit', __('Calculate', $domain));\n\t\t}\n\t}",
"abstract protected function createValue(string $definitionId, ... $additionalArguments): DefinitionValue;",
"public function addParameter(string $name, $value): self;",
"public function getParameter(): float\n {\n return $this->parameter;\n }",
"protected function setDynamicUpdate($dynamicUpdate){\n\t\tCoreType::assertBool($dynamicUpdate);\n\t\tself::$_dynamicUpdate = $dynamicUpdate;\n\t}",
"public function getResolver()/*# : ParameterInterface */;",
"public function addParameterByName(string $name, mixed $value): ParametersInterface;",
"public function executeGetValueField(sfWebRequest $request)\n {\n // Check for component id.\n if (null === ($iComponent = $request->getParameter('component_id', null))) {\n throw new sfStopException($this->getContext()->getI18N()->__('Parameter \"component_id\" must be specified!', null, 'flexible-shop'));\n }\n\n // Check for parameter id.\n if (null === ($iParameter = $request->getParameter('parameter_id', null))) {\n throw new sfStopException($this->getContext()->getI18N()->__('Parameter \"parameter_id\" must be specified!', null, 'flexible-shop'));\n }\n\n // Check for form widget name.\n if (null === ($sPrefix = $request->getParameter('prefix', null))) {\n throw new sfStopException($this->getContext()->getI18N()->__('Parameter \"prefix\" must be specified!', null, 'flexible-shop'));\n }\n\n // Check for specified parameter \"count\".\n $iCount = $request->getParameter('count', 1);\n\n // Fetch schema record about parameter.\n $schema = Doctrine_Core::getTable('jParameterableSchema')->createQuery('ps')\n ->innerJoin('ps.Component')\n ->where('ps.component_id = ?', $iComponent)\n ->andWhere('ps.id = ?', $iParameter)\n ->fetchOne();\n\n // Check record exists.\n if (! $schema)\n {\n throw new sfException(sprintf($this->getContext()\n ->getI18N()->__('Schema record with ID #%d is not found!', null, 'flexible-shop'), $iSchema));\n }\n\n // Define classname for parameter's value.\n $parameterValueFormClassName = 'ParameterableParamValue' . sfInflector::camelize($schema['type']) . 'Form';\n\n $arDefaults = array(\n 'component_id' => $iComponent,\n 'parameter_id' => $iParameter,\n 'value' => $this->object[$this->param['name']],\n 'model_name' => $schema['Component']['name'],\n //'object_id' => $this->object['id']\n );\n\n // Define form.\n //$pvForm = new $parameterValueFormClassName($arDefaults, array('length' => $this->param['length']));\n $pvForm = new $parameterValueFormClassName($arDefaults, $arDefaults);\n\n $arResult = array();\n for($i = 0; $i < $iCount; $i++) {\n $pvForm->setName($sPrefix . '[' . $i . ']');\n $arResult[$i] = $pvForm['value']->render();\n }\n\n // Output result.\n $this->renderJsonResult($arResult);\n\n // No any templates.\n return sfView::NONE;\n }",
"public function isDynamic() : bool {\n return $this->isDynamic;\n }",
"public abstract function compute();",
"public function genericParam() {\n return $this->_genericParam;\n }",
"function generateParametrizedQuery( $stm)\r\n\t{\r\n\t\treturn $stm->generateQuery($this);\r\n\t}",
"protected final function getParameterHolder() {\n\t\treturn Context::getParameterHolder();\n\t}",
"public static function grade_item_update_parameters() {\n return new external_function_parameters(\n array(\n 'zoomid' => new external_value(PARAM_INT, 'zoom course module id')\n )\n );\n }",
"public function addDynamicElement($key, $value)\n\t{\n\t\t$this->_dynamicElements[$key] = $value;\n\t\treturn $this;\n\t}",
"abstract protected function calcular($x, $y);",
"function dynamicArray($n, $queries) {\n\n}",
"protected function inject_custom_parameters()\n\t{\n\t\tforeach ($this->custom_parameters as $key => $value)\n\t\t{\n\t\t\t$this->container->setParameter($key, $value);\n\t\t}\n\t}",
"public function addParameter(mixed $value): ParametersInterface;",
"public static function toParam(RuntimeColumn $c, Action $action, Model $record = null)\n {\n $paramClass = self::getParamClass($c);\n\n $p = new $paramClass($c->name, $action);\n self::setupIsa($p, $c);\n self::setupDefault($p, $c);\n self::setupRequired($p, $c, $action);\n\n foreach ($c->attributes as $k => $v) {\n // skip some fields\n if (in_array(strtolower($k), ['validator', 'default'])) {\n continue;\n }\n if ($v instanceof Raw) {\n continue;\n }\n $p->$k = $v;\n }\n\n self::setupCurrentValue($p, $c, $record);\n self::setupValidValues($p, $c);\n self::setupWidget($p, $c);\n self::setupWidgetType($p, $c);\n\n // Customized build process\n if ($call = $c->buildParam) {\n // if something is returned, replace the original param\n if ($p2 = $call($p, $c)) {\n $p = $p2;\n }\n }\n\n return $p;\n }",
"function param(string $name, string $value, string $type = 'ref', string $attributes = ''): string\n {\n return '<param name=\"' . $name\n . '\" type=\"' . $type\n . '\" value=\"' . $value\n . '\" ' . $attributes . _solidus() . '>';\n }",
"public function getParamDirect($name = \"\");",
"function updateCardParameter($pDB, $arrParameter, $where)\n {\n $queryUpdate = $pDB->construirUpdate('card_parameter', $arrParameter, $where);\n $result = $pDB->genQuery($queryUpdate);\n\n return $result;\n }",
"public function getParameterForCaller(int $i): ?Parameter;",
"function moment_of_resistance($E, &$designParameter, &$designParameterRes)\n{\n\n// You may assign relavent names to input parameters\n\n$b = $designParameter[0] ;\n$d = $designParameter[1] ;\n\n// Perform alculations to find results / values of output parameters\n$Area = $b * $d ;\n$Peri = 2 * ( $b + $d ) ;\n\n// Put output parameters in array in sequence / order.\n$designParameterRes[] = $Area ; \n$designParameterRes[] = $Peri ;\n// $designParameterRes[] = $otheParameters ; // other parameters ...\n \n}",
"public static function dyn($dyn_routes) {\r\n // Split the route on '/', i.e user/<1>\r\n $route_components = explode('/', $dyn_routes);\r\n // Split the URI on '/', i.e user/{username} \r\n $uri_components = explode('/', substr($_SERVER['REQUEST_URI'], strlen(BASEDIR)-1));\r\n\r\n // Loop through $route_components, this allows infinite dynamic parameters in the future.\r\n for ($i = 0; $i < count($route_components); $i++) {\r\n // Ensure we don't go out of range by enclosing in an if statement.\r\n if ($i+1 <= count($uri_components)-1) {\r\n // Replace every occurrence of <n> with a parameter.\r\n $route_components[$i] = str_replace(\"<$i>\", $uri_components[$i+1], $route_components[$i]);\r\n }\r\n }\r\n // Join the array back into a string.\r\n $route = implode($route_components, '/');\r\n // Return the route.\r\n return $route;\r\n }"
] | [
"0.7013638",
"0.61051226",
"0.61051226",
"0.5761163",
"0.5457801",
"0.5426508",
"0.5363362",
"0.53391737",
"0.52976114",
"0.52272195",
"0.52063775",
"0.5154854",
"0.51005137",
"0.51005137",
"0.5099539",
"0.50680536",
"0.50387233",
"0.50387233",
"0.50387233",
"0.50057524",
"0.49856484",
"0.49593183",
"0.49380806",
"0.49164292",
"0.49139693",
"0.4913277",
"0.49124393",
"0.48700586",
"0.48671213",
"0.48608622",
"0.48446956",
"0.48329383",
"0.48276877",
"0.48052624",
"0.4797087",
"0.47826052",
"0.4781763",
"0.4769434",
"0.47660577",
"0.47542602",
"0.47454605",
"0.47277206",
"0.471485",
"0.47129524",
"0.47049448",
"0.46921837",
"0.46788728",
"0.4660959",
"0.46578953",
"0.46578953",
"0.46575165",
"0.46416587",
"0.4635754",
"0.46316946",
"0.46316296",
"0.46236768",
"0.46236768",
"0.46168312",
"0.4601892",
"0.45863813",
"0.45863643",
"0.45849526",
"0.45777372",
"0.4575371",
"0.45705628",
"0.4563605",
"0.45509613",
"0.45509613",
"0.45416036",
"0.4537821",
"0.45258257",
"0.45219103",
"0.45204052",
"0.45203885",
"0.451608",
"0.4515598",
"0.4514481",
"0.45141953",
"0.45100665",
"0.45087653",
"0.4505506",
"0.4505167",
"0.45021796",
"0.44828886",
"0.4481891",
"0.44793612",
"0.44784537",
"0.4474474",
"0.44649586",
"0.44449514",
"0.4442807",
"0.44293052",
"0.44274923",
"0.44174522",
"0.44125375",
"0.44122753",
"0.44113937",
"0.44010144",
"0.43949184",
"0.43940938"
] | 0.5672799 | 4 |
Gets the default parameters. | protected function getDefaultParameters()
{
return array(
'kernel.environment' => 'dev',
'kernel.debug' => true,
'kernel.name' => 'src',
'kernel.bundles' => array(
'FrameworkBundle' => 'Symfony\\Bundle\\FrameworkBundle\\FrameworkBundle',
'DoctrineCacheBundle' => 'Doctrine\\Bundle\\DoctrineCacheBundle\\DoctrineCacheBundle',
'DoctrineBundle' => 'Doctrine\\Bundle\\DoctrineBundle\\DoctrineBundle',
'DoctrineMigrationsBundle' => 'Doctrine\\Bundle\\MigrationsBundle\\DoctrineMigrationsBundle',
'MakerBundle' => 'Symfony\\Bundle\\MakerBundle\\MakerBundle',
'SecurityBundle' => 'Symfony\\Bundle\\SecurityBundle\\SecurityBundle',
),
'kernel.charset' => 'UTF-8',
'kernel.container_class' => 'srcDevDebugProjectContainer',
'container.autowiring.strict_mode' => true,
'container.dumper.inline_class_loader' => true,
'env(DATABASE_URL)' => '',
'jwt_private_key' => '../var/jwt/private.pem',
'jwt_public_key' => '../var/jwt/public.pem',
'jwt_ttl' => 3600,
'locale' => 'en',
'fragment.renderer.hinclude.global_template' => '',
'fragment.path' => '/_fragment',
'kernel.http_method_override' => true,
'kernel.trusted_hosts' => array(
),
'kernel.default_locale' => 'en',
'templating.helper.code.file_link_format' => NULL,
'debug.file_link_format' => NULL,
'session.metadata.storage_key' => '_sf2_meta',
'session.storage.options' => array(
'cache_limiter' => '0',
'cookie_httponly' => true,
'gc_probability' => 1,
'use_strict_mode' => true,
),
'session.metadata.update_threshold' => '0',
'form.type_extension.csrf.enabled' => true,
'form.type_extension.csrf.field_name' => '_token',
'validator.mapping.cache.prefix' => '',
'validator.translation_domain' => 'validators',
'translator.logging' => true,
'data_collector.templates' => array(
),
'debug.error_handler.throw_at' => -1,
'router.options.generator_class' => 'Symfony\\Component\\Routing\\Generator\\UrlGenerator',
'router.options.generator_base_class' => 'Symfony\\Component\\Routing\\Generator\\UrlGenerator',
'router.options.generator_dumper_class' => 'Symfony\\Component\\Routing\\Generator\\Dumper\\PhpGeneratorDumper',
'router.options.matcher_class' => 'Symfony\\Bundle\\FrameworkBundle\\Routing\\RedirectableUrlMatcher',
'router.options.matcher_base_class' => 'Symfony\\Bundle\\FrameworkBundle\\Routing\\RedirectableUrlMatcher',
'router.options.matcher_dumper_class' => 'Symfony\\Component\\Routing\\Matcher\\Dumper\\PhpMatcherDumper',
'router.options.matcher.cache_class' => 'srcDevDebugProjectContainerUrlMatcher',
'router.options.generator.cache_class' => 'srcDevDebugProjectContainerUrlGenerator',
'router.request_context.host' => 'localhost',
'router.request_context.scheme' => 'http',
'router.request_context.base_url' => '',
'router.resource' => 'kernel:loadRoutes',
'router.cache_class_prefix' => 'srcDevDebugProjectContainer',
'request_listener.http_port' => 80,
'request_listener.https_port' => 443,
'doctrine_cache.apc.class' => 'Doctrine\\Common\\Cache\\ApcCache',
'doctrine_cache.apcu.class' => 'Doctrine\\Common\\Cache\\ApcuCache',
'doctrine_cache.array.class' => 'Doctrine\\Common\\Cache\\ArrayCache',
'doctrine_cache.chain.class' => 'Doctrine\\Common\\Cache\\ChainCache',
'doctrine_cache.couchbase.class' => 'Doctrine\\Common\\Cache\\CouchbaseCache',
'doctrine_cache.couchbase.connection.class' => 'Couchbase',
'doctrine_cache.couchbase.hostnames' => 'localhost:8091',
'doctrine_cache.file_system.class' => 'Doctrine\\Common\\Cache\\FilesystemCache',
'doctrine_cache.php_file.class' => 'Doctrine\\Common\\Cache\\PhpFileCache',
'doctrine_cache.memcache.class' => 'Doctrine\\Common\\Cache\\MemcacheCache',
'doctrine_cache.memcache.connection.class' => 'Memcache',
'doctrine_cache.memcache.host' => 'localhost',
'doctrine_cache.memcache.port' => 11211,
'doctrine_cache.memcached.class' => 'Doctrine\\Common\\Cache\\MemcachedCache',
'doctrine_cache.memcached.connection.class' => 'Memcached',
'doctrine_cache.memcached.host' => 'localhost',
'doctrine_cache.memcached.port' => 11211,
'doctrine_cache.mongodb.class' => 'Doctrine\\Common\\Cache\\MongoDBCache',
'doctrine_cache.mongodb.collection.class' => 'MongoCollection',
'doctrine_cache.mongodb.connection.class' => 'MongoClient',
'doctrine_cache.mongodb.server' => 'localhost:27017',
'doctrine_cache.predis.client.class' => 'Predis\\Client',
'doctrine_cache.predis.scheme' => 'tcp',
'doctrine_cache.predis.host' => 'localhost',
'doctrine_cache.predis.port' => 6379,
'doctrine_cache.redis.class' => 'Doctrine\\Common\\Cache\\RedisCache',
'doctrine_cache.redis.connection.class' => 'Redis',
'doctrine_cache.redis.host' => 'localhost',
'doctrine_cache.redis.port' => 6379,
'doctrine_cache.riak.class' => 'Doctrine\\Common\\Cache\\RiakCache',
'doctrine_cache.riak.bucket.class' => 'Riak\\Bucket',
'doctrine_cache.riak.connection.class' => 'Riak\\Connection',
'doctrine_cache.riak.bucket_property_list.class' => 'Riak\\BucketPropertyList',
'doctrine_cache.riak.host' => 'localhost',
'doctrine_cache.riak.port' => 8087,
'doctrine_cache.sqlite3.class' => 'Doctrine\\Common\\Cache\\SQLite3Cache',
'doctrine_cache.sqlite3.connection.class' => 'SQLite3',
'doctrine_cache.void.class' => 'Doctrine\\Common\\Cache\\VoidCache',
'doctrine_cache.wincache.class' => 'Doctrine\\Common\\Cache\\WinCacheCache',
'doctrine_cache.xcache.class' => 'Doctrine\\Common\\Cache\\XcacheCache',
'doctrine_cache.zenddata.class' => 'Doctrine\\Common\\Cache\\ZendDataCache',
'doctrine_cache.security.acl.cache.class' => 'Doctrine\\Bundle\\DoctrineCacheBundle\\Acl\\Model\\AclCache',
'doctrine.dbal.logger.chain.class' => 'Doctrine\\DBAL\\Logging\\LoggerChain',
'doctrine.dbal.logger.profiling.class' => 'Doctrine\\DBAL\\Logging\\DebugStack',
'doctrine.dbal.logger.class' => 'Symfony\\Bridge\\Doctrine\\Logger\\DbalLogger',
'doctrine.dbal.configuration.class' => 'Doctrine\\DBAL\\Configuration',
'doctrine.data_collector.class' => 'Doctrine\\Bundle\\DoctrineBundle\\DataCollector\\DoctrineDataCollector',
'doctrine.dbal.connection.event_manager.class' => 'Symfony\\Bridge\\Doctrine\\ContainerAwareEventManager',
'doctrine.dbal.connection_factory.class' => 'Doctrine\\Bundle\\DoctrineBundle\\ConnectionFactory',
'doctrine.dbal.events.mysql_session_init.class' => 'Doctrine\\DBAL\\Event\\Listeners\\MysqlSessionInit',
'doctrine.dbal.events.oracle_session_init.class' => 'Doctrine\\DBAL\\Event\\Listeners\\OracleSessionInit',
'doctrine.class' => 'Doctrine\\Bundle\\DoctrineBundle\\Registry',
'doctrine.entity_managers' => array(
'default' => 'doctrine.orm.default_entity_manager',
),
'doctrine.default_entity_manager' => 'default',
'doctrine.dbal.connection_factory.types' => array(
),
'doctrine.connections' => array(
'default' => 'doctrine.dbal.default_connection',
),
'doctrine.default_connection' => 'default',
'doctrine.orm.configuration.class' => 'Doctrine\\ORM\\Configuration',
'doctrine.orm.entity_manager.class' => 'Doctrine\\ORM\\EntityManager',
'doctrine.orm.manager_configurator.class' => 'Doctrine\\Bundle\\DoctrineBundle\\ManagerConfigurator',
'doctrine.orm.cache.array.class' => 'Doctrine\\Common\\Cache\\ArrayCache',
'doctrine.orm.cache.apc.class' => 'Doctrine\\Common\\Cache\\ApcCache',
'doctrine.orm.cache.memcache.class' => 'Doctrine\\Common\\Cache\\MemcacheCache',
'doctrine.orm.cache.memcache_host' => 'localhost',
'doctrine.orm.cache.memcache_port' => 11211,
'doctrine.orm.cache.memcache_instance.class' => 'Memcache',
'doctrine.orm.cache.memcached.class' => 'Doctrine\\Common\\Cache\\MemcachedCache',
'doctrine.orm.cache.memcached_host' => 'localhost',
'doctrine.orm.cache.memcached_port' => 11211,
'doctrine.orm.cache.memcached_instance.class' => 'Memcached',
'doctrine.orm.cache.redis.class' => 'Doctrine\\Common\\Cache\\RedisCache',
'doctrine.orm.cache.redis_host' => 'localhost',
'doctrine.orm.cache.redis_port' => 6379,
'doctrine.orm.cache.redis_instance.class' => 'Redis',
'doctrine.orm.cache.xcache.class' => 'Doctrine\\Common\\Cache\\XcacheCache',
'doctrine.orm.cache.wincache.class' => 'Doctrine\\Common\\Cache\\WinCacheCache',
'doctrine.orm.cache.zenddata.class' => 'Doctrine\\Common\\Cache\\ZendDataCache',
'doctrine.orm.metadata.driver_chain.class' => 'Doctrine\\Common\\Persistence\\Mapping\\Driver\\MappingDriverChain',
'doctrine.orm.metadata.annotation.class' => 'Doctrine\\ORM\\Mapping\\Driver\\AnnotationDriver',
'doctrine.orm.metadata.xml.class' => 'Doctrine\\ORM\\Mapping\\Driver\\SimplifiedXmlDriver',
'doctrine.orm.metadata.yml.class' => 'Doctrine\\ORM\\Mapping\\Driver\\SimplifiedYamlDriver',
'doctrine.orm.metadata.php.class' => 'Doctrine\\ORM\\Mapping\\Driver\\PHPDriver',
'doctrine.orm.metadata.staticphp.class' => 'Doctrine\\ORM\\Mapping\\Driver\\StaticPHPDriver',
'doctrine.orm.proxy_cache_warmer.class' => 'Symfony\\Bridge\\Doctrine\\CacheWarmer\\ProxyCacheWarmer',
'form.type_guesser.doctrine.class' => 'Symfony\\Bridge\\Doctrine\\Form\\DoctrineOrmTypeGuesser',
'doctrine.orm.validator.unique.class' => 'Symfony\\Bridge\\Doctrine\\Validator\\Constraints\\UniqueEntityValidator',
'doctrine.orm.validator_initializer.class' => 'Symfony\\Bridge\\Doctrine\\Validator\\DoctrineInitializer',
'doctrine.orm.security.user.provider.class' => 'Symfony\\Bridge\\Doctrine\\Security\\User\\EntityUserProvider',
'doctrine.orm.listeners.resolve_target_entity.class' => 'Doctrine\\ORM\\Tools\\ResolveTargetEntityListener',
'doctrine.orm.listeners.attach_entity_listeners.class' => 'Doctrine\\ORM\\Tools\\AttachEntityListenersListener',
'doctrine.orm.naming_strategy.default.class' => 'Doctrine\\ORM\\Mapping\\DefaultNamingStrategy',
'doctrine.orm.naming_strategy.underscore.class' => 'Doctrine\\ORM\\Mapping\\UnderscoreNamingStrategy',
'doctrine.orm.quote_strategy.default.class' => 'Doctrine\\ORM\\Mapping\\DefaultQuoteStrategy',
'doctrine.orm.quote_strategy.ansi.class' => 'Doctrine\\ORM\\Mapping\\AnsiQuoteStrategy',
'doctrine.orm.entity_listener_resolver.class' => 'Doctrine\\Bundle\\DoctrineBundle\\Mapping\\ContainerAwareEntityListenerResolver',
'doctrine.orm.second_level_cache.default_cache_factory.class' => 'Doctrine\\ORM\\Cache\\DefaultCacheFactory',
'doctrine.orm.second_level_cache.default_region.class' => 'Doctrine\\ORM\\Cache\\Region\\DefaultRegion',
'doctrine.orm.second_level_cache.filelock_region.class' => 'Doctrine\\ORM\\Cache\\Region\\FileLockRegion',
'doctrine.orm.second_level_cache.logger_chain.class' => 'Doctrine\\ORM\\Cache\\Logging\\CacheLoggerChain',
'doctrine.orm.second_level_cache.logger_statistics.class' => 'Doctrine\\ORM\\Cache\\Logging\\StatisticsCacheLogger',
'doctrine.orm.second_level_cache.cache_configuration.class' => 'Doctrine\\ORM\\Cache\\CacheConfiguration',
'doctrine.orm.second_level_cache.regions_configuration.class' => 'Doctrine\\ORM\\Cache\\RegionsConfiguration',
'doctrine.orm.auto_generate_proxy_classes' => true,
'doctrine.orm.proxy_namespace' => 'Proxies',
'doctrine_migrations.namespace' => 'DoctrineMigrations',
'doctrine_migrations.table_name' => 'migration_versions',
'doctrine_migrations.name' => 'Application Migrations',
'doctrine_migrations.custom_template' => NULL,
'doctrine_migrations.organize_migrations' => false,
'security.authentication.trust_resolver.anonymous_class' => 'Symfony\\Component\\Security\\Core\\Authentication\\Token\\AnonymousToken',
'security.authentication.trust_resolver.rememberme_class' => 'Symfony\\Component\\Security\\Core\\Authentication\\Token\\RememberMeToken',
'security.role_hierarchy.roles' => array(
),
'security.access.denied_url' => NULL,
'security.authentication.manager.erase_credentials' => true,
'security.authentication.session_strategy.strategy' => 'migrate',
'security.access.always_authenticate_before_granting' => false,
'security.authentication.hide_user_not_found' => true,
'console.command.ids' => array(
'console.command.symfony_bundle_frameworkbundle_command_aboutcommand' => 'console.command.about',
'console.command.symfony_bundle_frameworkbundle_command_assetsinstallcommand' => 'console.command.assets_install',
'console.command.symfony_bundle_frameworkbundle_command_cacheclearcommand' => 'console.command.cache_clear',
'console.command.symfony_bundle_frameworkbundle_command_cachepoolclearcommand' => 'console.command.cache_pool_clear',
'console.command.symfony_bundle_frameworkbundle_command_cachepoolprunecommand' => 'console.command.cache_pool_prune',
'console.command.symfony_bundle_frameworkbundle_command_cachewarmupcommand' => 'console.command.cache_warmup',
'console.command.symfony_bundle_frameworkbundle_command_configdebugcommand' => 'console.command.config_debug',
'console.command.symfony_bundle_frameworkbundle_command_configdumpreferencecommand' => 'console.command.config_dump_reference',
'console.command.symfony_bundle_frameworkbundle_command_containerdebugcommand' => 'console.command.container_debug',
'console.command.symfony_bundle_frameworkbundle_command_debugautowiringcommand' => 'console.command.debug_autowiring',
'console.command.symfony_bundle_frameworkbundle_command_eventdispatcherdebugcommand' => 'console.command.event_dispatcher_debug',
'console.command.symfony_bundle_frameworkbundle_command_routerdebugcommand' => 'console.command.router_debug',
'console.command.symfony_bundle_frameworkbundle_command_routermatchcommand' => 'console.command.router_match',
'console.command.symfony_bundle_frameworkbundle_command_translationdebugcommand' => 'console.command.translation_debug',
'console.command.symfony_bundle_frameworkbundle_command_translationupdatecommand' => 'console.command.translation_update',
'console.command.symfony_bundle_frameworkbundle_command_xlifflintcommand' => 'console.command.xliff_lint',
'console.command.symfony_bundle_frameworkbundle_command_yamllintcommand' => 'console.command.yaml_lint',
'console.command.symfony_component_form_command_debugcommand' => 'console.command.form_debug',
'console.command.doctrine_bundle_doctrinecachebundle_command_containscommand' => 'console.command.doctrine_bundle_doctrinecachebundle_command_containscommand',
'console.command.doctrine_bundle_doctrinecachebundle_command_deletecommand' => 'console.command.doctrine_bundle_doctrinecachebundle_command_deletecommand',
'console.command.doctrine_bundle_doctrinecachebundle_command_flushcommand' => 'console.command.doctrine_bundle_doctrinecachebundle_command_flushcommand',
'console.command.doctrine_bundle_doctrinecachebundle_command_statscommand' => 'console.command.doctrine_bundle_doctrinecachebundle_command_statscommand',
'console.command.doctrine_bundle_doctrinebundle_command_createdatabasedoctrinecommand' => 'doctrine.database_create_command',
'console.command.doctrine_bundle_doctrinebundle_command_dropdatabasedoctrinecommand' => 'doctrine.database_drop_command',
'console.command.doctrine_bundle_doctrinebundle_command_generateentitiesdoctrinecommand' => 'doctrine.generate_entities_command',
'console.command.doctrine_bundle_doctrinebundle_command_importmappingdoctrinecommand' => 'doctrine.mapping_import_command',
'console.command.doctrine_bundle_doctrinebundle_command_proxy_clearmetadatacachedoctrinecommand' => 'doctrine.cache_clear_metadata_command',
'console.command.doctrine_bundle_doctrinebundle_command_proxy_clearquerycachedoctrinecommand' => 'doctrine.cache_clear_query_cache_command',
'console.command.doctrine_bundle_doctrinebundle_command_proxy_clearresultcachedoctrinecommand' => 'doctrine.cache_clear_result_command',
'console.command.doctrine_bundle_doctrinebundle_command_proxy_collectionregiondoctrinecommand' => 'doctrine.cache_collection_region_command',
'console.command.doctrine_bundle_doctrinebundle_command_proxy_convertmappingdoctrinecommand' => 'doctrine.mapping_convert_command',
'console.command.doctrine_bundle_doctrinebundle_command_proxy_createschemadoctrinecommand' => 'doctrine.schema_create_command',
'console.command.doctrine_bundle_doctrinebundle_command_proxy_dropschemadoctrinecommand' => 'doctrine.schema_drop_command',
'console.command.doctrine_bundle_doctrinebundle_command_proxy_ensureproductionsettingsdoctrinecommand' => 'doctrine.ensure_production_settings_command',
'console.command.doctrine_bundle_doctrinebundle_command_proxy_entityregioncachedoctrinecommand' => 'doctrine.clear_entity_region_command',
'console.command.doctrine_bundle_doctrinebundle_command_proxy_importdoctrinecommand' => 'doctrine.database_import_command',
'console.command.doctrine_bundle_doctrinebundle_command_proxy_infodoctrinecommand' => 'doctrine.mapping_info_command',
'console.command.doctrine_bundle_doctrinebundle_command_proxy_queryregioncachedoctrinecommand' => 'doctrine.clear_query_region_command',
'console.command.doctrine_bundle_doctrinebundle_command_proxy_rundqldoctrinecommand' => 'doctrine.query_dql_command',
'console.command.doctrine_bundle_doctrinebundle_command_proxy_runsqldoctrinecommand' => 'doctrine.query_sql_command',
'console.command.doctrine_bundle_doctrinebundle_command_proxy_updateschemadoctrinecommand' => 'doctrine.schema_update_command',
'console.command.doctrine_bundle_doctrinebundle_command_proxy_validateschemacommand' => 'doctrine.schema_validate_command',
'console.command.doctrine_bundle_migrationsbundle_command_migrationsdiffdoctrinecommand' => 'console.command.doctrine_bundle_migrationsbundle_command_migrationsdiffdoctrinecommand',
'console.command.doctrine_bundle_migrationsbundle_command_migrationsexecutedoctrinecommand' => 'console.command.doctrine_bundle_migrationsbundle_command_migrationsexecutedoctrinecommand',
'console.command.doctrine_bundle_migrationsbundle_command_migrationsgeneratedoctrinecommand' => 'console.command.doctrine_bundle_migrationsbundle_command_migrationsgeneratedoctrinecommand',
'console.command.doctrine_bundle_migrationsbundle_command_migrationslatestdoctrinecommand' => 'console.command.doctrine_bundle_migrationsbundle_command_migrationslatestdoctrinecommand',
'console.command.doctrine_bundle_migrationsbundle_command_migrationsmigratedoctrinecommand' => 'console.command.doctrine_bundle_migrationsbundle_command_migrationsmigratedoctrinecommand',
'console.command.doctrine_bundle_migrationsbundle_command_migrationsstatusdoctrinecommand' => 'console.command.doctrine_bundle_migrationsbundle_command_migrationsstatusdoctrinecommand',
'console.command.doctrine_bundle_migrationsbundle_command_migrationsversiondoctrinecommand' => 'console.command.doctrine_bundle_migrationsbundle_command_migrationsversiondoctrinecommand',
'console.command.symfony_bundle_securitybundle_command_userpasswordencodercommand' => 'security.command.user_password_encoder',
'console.command.symfony_bundle_makerbundle_command_makercommand' => 'maker.auto_command.make_migration',
),
'console.lazy_command.ids' => array(
'console.command.about' => true,
'console.command.assets_install' => true,
'console.command.cache_clear' => true,
'console.command.cache_pool_clear' => true,
'console.command.cache_pool_prune' => true,
'console.command.cache_warmup' => true,
'console.command.config_debug' => true,
'console.command.config_dump_reference' => true,
'console.command.container_debug' => true,
'console.command.debug_autowiring' => true,
'console.command.event_dispatcher_debug' => true,
'console.command.router_debug' => true,
'console.command.router_match' => true,
'console.command.translation_debug' => true,
'console.command.translation_update' => true,
'console.command.xliff_lint' => true,
'console.command.yaml_lint' => true,
'console.command.form_debug' => true,
'doctrine.database_create_command' => true,
'doctrine.database_drop_command' => true,
'doctrine.generate_entities_command' => true,
'doctrine.mapping_import_command' => true,
'doctrine.cache_clear_metadata_command' => true,
'doctrine.cache_clear_query_cache_command' => true,
'doctrine.cache_clear_result_command' => true,
'doctrine.cache_collection_region_command' => true,
'doctrine.mapping_convert_command' => true,
'doctrine.schema_create_command' => true,
'doctrine.schema_drop_command' => true,
'doctrine.ensure_production_settings_command' => true,
'doctrine.clear_entity_region_command' => true,
'doctrine.database_import_command' => true,
'doctrine.mapping_info_command' => true,
'doctrine.clear_query_region_command' => true,
'doctrine.query_dql_command' => true,
'doctrine.query_sql_command' => true,
'doctrine.schema_update_command' => true,
'doctrine.schema_validate_command' => true,
'security.command.user_password_encoder' => true,
'maker.auto_command.make_auth' => true,
'maker.auto_command.make_command' => true,
'maker.auto_command.make_controller' => true,
'maker.auto_command.make_crud' => true,
'maker.auto_command.make_entity' => true,
'maker.auto_command.make_fixtures' => true,
'maker.auto_command.make_form' => true,
'maker.auto_command.make_functional_test' => true,
'maker.auto_command.make_serializer_encoder' => true,
'maker.auto_command.make_subscriber' => true,
'maker.auto_command.make_twig_extension' => true,
'maker.auto_command.make_unit_test' => true,
'maker.auto_command.make_validator' => true,
'maker.auto_command.make_voter' => true,
'maker.auto_command.make_migration' => true,
),
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_default_params()\n {\n }",
"public function getDefaultParameters();",
"public function getDefaultParameters();",
"public function getDefaultParams();",
"public function getDefaultParams()\n {\n $defaults = array(\n );\n return $defaults;\n }",
"public function getDefaultParameters() {\n\t\treturn array(\n\n\t\t);\n\t}",
"protected function defaultParams()\r\n\t{\r\n\t\treturn array();\r\n\t}",
"protected function getDefaultParams()\n {\n return $this->arrDefaultParam;\n }",
"protected function get_default_params() {\n\t\t$defaults = [];\n\t\t$schema = $this->get_public_item_schema();\n\t\tforeach ( $schema['properties'] as $arg => $options ) {\n\t\t\tif ( isset( $options['default'] ) ) {\n\t\t\t\t$defaults[ $arg ] = $options['default'];\n\t\t\t}\n\t\t}\n\t\treturn $defaults;\n\t}",
"public function getDefaultParameters()\n {\n return array(\n 'apiKey' => '',\n 'locale' => 'en',\n 'testMode' => false,\n );\n }",
"public function getDefaultParameters()\n {\n return array(\n // Required\n 'key' => '',\n 'secret' => '',\n 'sandbox' => false,\n 'destinationId' => '',\n 'returnUrl' => ''\n );\n }",
"protected function getDefaultParameters() {\n\t\t$result =array(\n\t\t\t\t'sg_ClientLoginID' => (string) $this->settings['username'],\n\t\t\t\t'sg_ClientPassword' => (string) $this->settings['password'],\n\t\t\t\t'sg_IPAddress' => SafechargeConstants::REQUEST_DEFAULT_IP_ADDRESS,\n\t\t\t\t'sg_ResponseFormat' => SafechargeConstants::REQUEST_DEFAULT_RESPONSE_FORMAT,\n\t\t\t\t'sg_Is3dTrans' => SafechargeConstants::REQUEST_DEFAULT_IS_3D_TRANS,\n\t\t\t\t'sg_ClientUniqueID' => (string) time(),\n\t\t\t);\n\n\t\treturn $result;\n\t}",
"public function getDefaultParameters()\n {\n return [\n 'tmnCode' => '',\n 'hashSecret' => '',\n 'testMode' => false,\n ];\n }",
"protected function getDefaultAtts() {\n \t\t\n \t\treturn array_combine(\n array_map(function($param) { \n \t\treturn $param['param_name'];\n }, $this->params),\n \t\tarray_map(function($param) { \n \t\treturn ! empty( $param['default'] ) ? $param['default'] : '';\n }, $this->params)\n );\n \t\t\n\t\t}",
"public function getDefaultParameters()\n {\n return array(\n 'orderIdPrefix' => '',\n 'profileId' => '',\n 'storeId' => '',\n 'apiToken' => '',\n 'testProfileId' => '',\n 'testStoreId' => '',\n 'testApiToken' => '',\n 'testMode' => true,\n );\n }",
"public function getDefaultParameters()\n {\n return array(\n 'username' => '',\n 'password' => '',\n 'testMode' => false,\n );\n }",
"public function getDefaultParameters()\n {\n return array(\n 'timestamp' => time(),\n 'noncestr' => str_random(16),\n );\n }",
"public function getDefaults() {\n\n\t\treturn [\n\t\t\t'module' => $this->_defaultModule,\n\t\t\t'controller' => $this->_defaultController,\n\t\t\t'action' => $this->_defaultAction,\n\t\t\t'params' => $this->_defaultParams\n\t\t];\n\t}",
"protected function getDefaultParameters()\n {\n return array(\n 'config.directory' => __DIR__ . '/../../../../',\n );\n }",
"protected function getDefaultParameters()\n {\n return array(\n 'parser.class' => 'Everzet\\\\Gherkin\\\\Parser',\n 'i18n.class' => 'Everzet\\\\Gherkin\\\\I18n',\n 'event_dispatcher.class' => 'Everzet\\\\Behat\\\\EventDispatcher\\\\EventDispatcher',\n 'event_listeners' => array('formatter'),\n 'formatter.class' => 'Everzet\\\\Behat\\\\Formatter\\\\%formatter.name%Formatter',\n 'step_definition.class' => 'Everzet\\\\Behat\\\\Definition\\\\StepDefinition',\n 'environment.class' => 'Everzet\\\\Behat\\\\Environment\\\\WorldEnvironment',\n 'features_loader.class' => 'Everzet\\\\Behat\\\\Loader\\\\FeaturesLoader',\n 'steps_loader.class' => 'Everzet\\\\Behat\\\\Loader\\\\StepsLoader',\n );\n }",
"public function getDefaults();",
"public function getDefaultParameters()\n {\n return config('payment.paypal.nvp.credentials');\n }",
"public function getDefaultParams() {\n\t\treturn $this->setWpQueryVars( 'paged', 'posts_per_page' );\n\t}",
"public function getDefaultInlineParameters()\n {\n return [\n Config::PARAM_SITE_KEY => $this->getSiteKey(),\n Config::PARAM_CUSTOMER_ID => $this->getCookie(Config::COOKIE_USER_ID, $this->getCustomerIdParameter()),\n Config::PARAM_TIME => $this->getTimeParameter()\n ];\n }",
"protected function getDefaults(){\n\t\treturn array();\n\t}",
"public function getParams($default = array()) {\n $params = $this->request->getQuery();\n if (!empty($default)) {\n foreach ($default as $paramName => $paramValue) {\n if (!isset($params[$paramName])) {\n $params[$paramName] = $paramValue;\n }\n }\n }\n return $params;\n }",
"public function getDefaultSettings();",
"public function getDefaultDataParameters()\n {\n return [\n Config::PARAM_CURRENT_URL => $this->getCurrentUrl(),\n Config::PARAM_REFERRER_URL => $this->getReferrerUrl(),\n Config::PARAM_VISIT_TYPE => $this->getCookie(Config::COOKIE_VISIT_TYPE, 'first_time'),\n Config::PARAM_VERSION => Config::ANALYTICS_VERSION,\n Config::PARAM_VISIT_ID => $this->getCookie(Config::COOKIE_VISIT_ID, $this->generateRandomString())\n ];\n }",
"protected function getDefaultParameters()\n {\n return [\n 'core.root_path' => './../',\n 'core.php_ext' => 'php',\n 'core.environment' => 'production',\n 'core.debug' => false,\n 'core.cache_dir' => './../cache/production/',\n 'passwords.driver.argon2_memory_cost' => 1024,\n 'passwords.driver.argon2_threads' => 2,\n 'passwords.driver.argon2_time_cost' => 2,\n 'passwords.driver.bcrypt_cost' => 10,\n 'text_formatter.cache.dir' => './../cache/production/',\n 'text_formatter.cache.parser.key' => '_text_formatter_parser',\n 'text_formatter.cache.renderer.key' => '_text_formatter_renderer',\n 'core.template.cache_path' => './../cache/production/twig/',\n 'tables.acl_groups' => 'phpbb_acl_groups',\n 'tables.acl_options' => 'phpbb_acl_options',\n 'tables.acl_roles' => 'phpbb_acl_roles',\n 'tables.acl_roles_data' => 'phpbb_acl_roles_data',\n 'tables.acl_users' => 'phpbb_acl_users',\n 'tables.attachments' => 'phpbb_attachments',\n 'tables.auth_provider_oauth_token_storage' => 'phpbb_oauth_tokens',\n 'tables.auth_provider_oauth_states' => 'phpbb_oauth_states',\n 'tables.auth_provider_oauth_account_assoc' => 'phpbb_oauth_accounts',\n 'tables.banlist' => 'phpbb_banlist',\n 'tables.bbcodes' => 'phpbb_bbcodes',\n 'tables.bookmarks' => 'phpbb_bookmarks',\n 'tables.bots' => 'phpbb_bots',\n 'tables.captcha_qa_questions' => 'phpbb_captcha_questions',\n 'tables.captcha_qa_answers' => 'phpbb_captcha_answers',\n 'tables.captcha_qa_confirm' => 'phpbb_qa_confirm',\n 'tables.config' => 'phpbb_config',\n 'tables.config_text' => 'phpbb_config_text',\n 'tables.confirm' => 'phpbb_confirm',\n 'tables.disallow' => 'phpbb_disallow',\n 'tables.drafts' => 'phpbb_drafts',\n 'tables.ext' => 'phpbb_ext',\n 'tables.extensions' => 'phpbb_extensions',\n 'tables.extension_groups' => 'phpbb_extension_groups',\n 'tables.forums' => 'phpbb_forums',\n 'tables.forums_access' => 'phpbb_forums_access',\n 'tables.forums_track' => 'phpbb_forums_track',\n 'tables.forums_watch' => 'phpbb_forums_watch',\n 'tables.groups' => 'phpbb_groups',\n 'tables.icons' => 'phpbb_icons',\n 'tables.lang' => 'phpbb_lang',\n 'tables.log' => 'phpbb_log',\n 'tables.login_attempts' => 'phpbb_login_attempts',\n 'tables.migrations' => 'phpbb_migrations',\n 'tables.moderator_cache' => 'phpbb_moderator_cache',\n 'tables.modules' => 'phpbb_modules',\n 'tables.notification_types' => 'phpbb_notification_types',\n 'tables.notifications' => 'phpbb_notifications',\n 'tables.poll_options' => 'phpbb_poll_options',\n 'tables.poll_votes' => 'phpbb_poll_votes',\n 'tables.posts' => 'phpbb_posts',\n 'tables.privmsgs' => 'phpbb_privmsgs',\n 'tables.privmsgs_folder' => 'phpbb_privmsgs_folder',\n 'tables.privmsgs_rules' => 'phpbb_privmsgs_rules',\n 'tables.privmsgs_to' => 'phpbb_privmsgs_to',\n 'tables.profile_fields' => 'phpbb_profile_fields',\n 'tables.profile_fields_data' => 'phpbb_profile_fields_data',\n 'tables.profile_fields_options_language' => 'phpbb_profile_fields_lang',\n 'tables.profile_fields_language' => 'phpbb_profile_lang',\n 'tables.ranks' => 'phpbb_ranks',\n 'tables.reports' => 'phpbb_reports',\n 'tables.reports_reasons' => 'phpbb_reports_reasons',\n 'tables.search_results' => 'phpbb_search_results',\n 'tables.search_wordlist' => 'phpbb_search_wordlist',\n 'tables.search_wordmatch' => 'phpbb_search_wordmatch',\n 'tables.sessions' => 'phpbb_sessions',\n 'tables.sessions_keys' => 'phpbb_sessions_keys',\n 'tables.sitelist' => 'phpbb_sitelist',\n 'tables.smilies' => 'phpbb_smilies',\n 'tables.sphinx' => 'phpbb_sphinx',\n 'tables.styles' => 'phpbb_styles',\n 'tables.styles_template' => 'phpbb_styles_template',\n 'tables.styles_template_data' => 'phpbb_styles_template_data',\n 'tables.styles_theme' => 'phpbb_styles_theme',\n 'tables.styles_imageset' => 'phpbb_styles_imageset',\n 'tables.styles_imageset_data' => 'phpbb_styles_imageset_data',\n 'tables.teampage' => 'phpbb_teampage',\n 'tables.topics' => 'phpbb_topics',\n 'tables.topics_posted' => 'phpbb_topics_posted',\n 'tables.topics_track' => 'phpbb_topics_track',\n 'tables.topics_watch' => 'phpbb_topics_watch',\n 'tables.user_group' => 'phpbb_user_group',\n 'tables.user_notifications' => 'phpbb_user_notifications',\n 'tables.users' => 'phpbb_users',\n 'tables.warnings' => 'phpbb_warnings',\n 'tables.words' => 'phpbb_words',\n 'tables.zebra' => 'phpbb_zebra',\n 'core.disable_super_globals' => true,\n 'datetime.class' => '\\\\phpbb\\\\datetime',\n 'mimetype.guesser.priority.lowest' => -2,\n 'mimetype.guesser.priority.low' => -1,\n 'mimetype.guesser.priority.default' => 0,\n 'mimetype.guesser.priority.high' => 1,\n 'mimetype.guesser.priority.highest' => 2,\n 'passwords.algorithms' => [\n 0 => 'passwords.driver.argon2id',\n 1 => 'passwords.driver.argon2i',\n 2 => 'passwords.driver.bcrypt_2y',\n 3 => 'passwords.driver.bcrypt',\n 4 => 'passwords.driver.salted_md5',\n 5 => 'passwords.driver.phpass',\n ],\n 'allow_install_dir' => false,\n 'debug.exceptions' => false,\n 'debug.load_time' => false,\n 'debug.sql_explain' => false,\n 'debug.memory' => false,\n 'debug.show_errors' => false,\n 'session.log_errors' => false,\n 'tables' => [\n 'acl_groups' => 'phpbb_acl_groups',\n 'acl_options' => 'phpbb_acl_options',\n 'acl_roles' => 'phpbb_acl_roles',\n 'acl_roles_data' => 'phpbb_acl_roles_data',\n 'acl_users' => 'phpbb_acl_users',\n 'attachments' => 'phpbb_attachments',\n 'auth_provider_oauth_token_storage' => 'phpbb_oauth_tokens',\n 'auth_provider_oauth_states' => 'phpbb_oauth_states',\n 'auth_provider_oauth_account_assoc' => 'phpbb_oauth_accounts',\n 'banlist' => 'phpbb_banlist',\n 'bbcodes' => 'phpbb_bbcodes',\n 'bookmarks' => 'phpbb_bookmarks',\n 'bots' => 'phpbb_bots',\n 'captcha_qa_questions' => 'phpbb_captcha_questions',\n 'captcha_qa_answers' => 'phpbb_captcha_answers',\n 'captcha_qa_confirm' => 'phpbb_qa_confirm',\n 'config' => 'phpbb_config',\n 'config_text' => 'phpbb_config_text',\n 'confirm' => 'phpbb_confirm',\n 'disallow' => 'phpbb_disallow',\n 'drafts' => 'phpbb_drafts',\n 'ext' => 'phpbb_ext',\n 'extensions' => 'phpbb_extensions',\n 'extension_groups' => 'phpbb_extension_groups',\n 'forums' => 'phpbb_forums',\n 'forums_access' => 'phpbb_forums_access',\n 'forums_track' => 'phpbb_forums_track',\n 'forums_watch' => 'phpbb_forums_watch',\n 'groups' => 'phpbb_groups',\n 'icons' => 'phpbb_icons',\n 'lang' => 'phpbb_lang',\n 'log' => 'phpbb_log',\n 'login_attempts' => 'phpbb_login_attempts',\n 'migrations' => 'phpbb_migrations',\n 'moderator_cache' => 'phpbb_moderator_cache',\n 'modules' => 'phpbb_modules',\n 'notification_types' => 'phpbb_notification_types',\n 'notifications' => 'phpbb_notifications',\n 'poll_options' => 'phpbb_poll_options',\n 'poll_votes' => 'phpbb_poll_votes',\n 'posts' => 'phpbb_posts',\n 'privmsgs' => 'phpbb_privmsgs',\n 'privmsgs_folder' => 'phpbb_privmsgs_folder',\n 'privmsgs_rules' => 'phpbb_privmsgs_rules',\n 'privmsgs_to' => 'phpbb_privmsgs_to',\n 'profile_fields' => 'phpbb_profile_fields',\n 'profile_fields_data' => 'phpbb_profile_fields_data',\n 'profile_fields_options_language' => 'phpbb_profile_fields_lang',\n 'profile_fields_language' => 'phpbb_profile_lang',\n 'ranks' => 'phpbb_ranks',\n 'reports' => 'phpbb_reports',\n 'reports_reasons' => 'phpbb_reports_reasons',\n 'search_results' => 'phpbb_search_results',\n 'search_wordlist' => 'phpbb_search_wordlist',\n 'search_wordmatch' => 'phpbb_search_wordmatch',\n 'sessions' => 'phpbb_sessions',\n 'sessions_keys' => 'phpbb_sessions_keys',\n 'sitelist' => 'phpbb_sitelist',\n 'smilies' => 'phpbb_smilies',\n 'sphinx' => 'phpbb_sphinx',\n 'styles' => 'phpbb_styles',\n 'styles_template' => 'phpbb_styles_template',\n 'styles_template_data' => 'phpbb_styles_template_data',\n 'styles_theme' => 'phpbb_styles_theme',\n 'styles_imageset' => 'phpbb_styles_imageset',\n 'styles_imageset_data' => 'phpbb_styles_imageset_data',\n 'teampage' => 'phpbb_teampage',\n 'topics' => 'phpbb_topics',\n 'topics_posted' => 'phpbb_topics_posted',\n 'topics_track' => 'phpbb_topics_track',\n 'topics_watch' => 'phpbb_topics_watch',\n 'user_group' => 'phpbb_user_group',\n 'user_notifications' => 'phpbb_user_notifications',\n 'users' => 'phpbb_users',\n 'warnings' => 'phpbb_warnings',\n 'words' => 'phpbb_words',\n 'zebra' => 'phpbb_zebra',\n ],\n 'core.adm_relative_path' => 'adm/',\n 'core.table_prefix' => 'phpbb_',\n 'cache.driver.class' => 'phpbb\\\\cache\\\\driver\\\\file',\n 'dbal.new_link' => false,\n ];\n }",
"public function get_default_args(){ return $this->default_args; }",
"public function GetDefaults ();",
"public static function getDefaults()\n {\n return [];\n }",
"protected function getDefaults()\n {\n $defaults = [\n \"query\" => [],\n \"headers\" => [\n \"Content-Type\" => \"application/json\",\n \"Accept\" => \"application/hal+json\",\n ],\n ];\n\n if (!empty($this->defaults)) {\n $defaults = call_user_func($this->defaults, $defaults);\n }\n\n return $defaults;\n }",
"public function getDefaultOptions();",
"public function getDefaultOptions();",
"public static function getDefaultOptions()\n {\n return self::$defaults;\n }",
"public static function getDefaultOptions()\n {\n return self::$defaults;\n }",
"public function getDefaultSettings() {\n $defaults = array();\n $fields = $this->getFields();\n foreach ($fields as $field) {\n $default = '';\n if (array_key_exists('default', $field) && $field['default']) {\n $default = $field['default'];\n }\n $defaults[$field['name']] = $default;\n }\n return $defaults;\n }",
"function getDefaultSendParams()\n {\n $params = array();\n\n $params['max_length'] = array(\n 'label' => _(\"Max messages quantity\"),\n 'type' => 'int',\n 'default_value' => 3);\n\n $params['unicode'] = array(\n 'label' => _(\"Unicode message flag\"),\n 'type' => 'int',\n 'default_value' => 1);\n\n return $params;\n }",
"public function getDefaultValues() {\n\t\treturn $this->defaultValues;\n\t}",
"public function getDefaults() {\n\t\treturn $this->_defaults;\n\t}",
"public function getDefaultVars() {\n\t\t$ret = array();\n\t\tforeach ($this->_vars as $key => $var) {\n\t\t\t$ret[$key] = $var->defaultValue;\n\t\t}\n\t\treturn $ret;\n\t}",
"protected function setDefaultParams()\n {\n foreach ($this->allowedParams as $param => $options) {\n $this->params[$param] = null;\n if (! empty($options['arguments'])) {\n $this->params[$param] = array();\n foreach ($options['arguments'] as $arg => $opts) {\n if (! empty($opts['default'])) {\n $cast = ! empty($opts['cast']) ? $opts['cast'] : 'string';\n $this->params[$param][$arg] = $this->castValue($cast, $opts['default']);\n }\n }\n } elseif (! empty($options['default'])) {\n $cast = ! empty($options['cast']) ? $options['cast'] : 'string';\n $this->params[$param] = $this->castValue($cast, $options['default']);\n }\n }\n }",
"private function get_defaults() {\n\t\treturn array(\n\t\t\t'phpbb_path' \t\t\t\t=> '',\n\t\t\t'integrateLogin' \t\t\t=> 0, \n\t\t\t'showHdrFtr' \t\t\t\t=> 'NONE',\n\t\t\t'wpSimpleHdr' \t\t\t\t=> 1,\n\t\t\t'dtdSwitch' \t\t\t\t=> 0,\n\t\t\t'phpbbCensor' \t\t\t\t=> 1,\n\t\t\t'wpPageName' \t\t\t\t=> 'page.php',\n\t\t\t'phpbbPadding' \t\t\t\t=> '6-12-6-12',\n\t\t\t'xposting' \t\t\t\t\t=> 0,\n\t\t\t'phpbbSmilies' \t\t\t\t=> 0,\n\t\t\t'avatarsync'\t\t\t\t=> 1,\n\t\t\t'integcreatewp'\t\t\t\t=> 1,\n\t\t\t'integcreatephpbb'\t\t\t=> 1,\n\t\t\t'xpostautolink' \t\t\t=> 0,\n\t\t\t'xpostspam' \t\t\t\t=> 'all',\n\t\t\t'xpostforce' \t\t\t\t=> -1,\n\t\t\t'xposttype' \t\t\t\t=> 'excerpt',\n\t\t\t'xpostprefix'\t\t\t\t=> '[BLOG] ',\n\t\t\t'cssMagic' \t\t\t\t\t=> 1,\n\t\t\t'templateVoodoo' \t\t\t=> 1,\n\t\t\t'useForumPage' \t\t\t\t=> 1\n\t\t);\n\t}",
"public function getDefaultValues()\n {\n return $this->defaultValues;\n }",
"public function getDefaultValues()\n {\n return $this->defaultValues;\n }",
"protected function defaultValues() : array\n {\n return [\n 'limit' => 20,\n 'offset' => 0,\n 'order_by_dir' => 'DESC',\n ];\n }",
"protected function getDefaultValues() {\n\t\treturn array(\n\t\t\t'name' => '',\n\t\t\t'email' => '',\n\t\t\t'isEnabled' => true);\n\t}",
"private function getDefaultArguments()\n {\n return [\n 'help' => [\n 'prefix' => 'h',\n 'longPrefix' => 'help',\n 'description' => 'Display this help message',\n 'noValue' => true,\n 'castTo' => 'bool',\n ],\n 'version' => [\n 'prefix' => 'V',\n 'longPrefix' => 'version',\n 'description' => 'Display this application version',\n 'noValue' => true,\n 'castTo' => 'bool',\n ],\n 'command' => [\n 'description' => 'Command name',\n ],\n ];\n }",
"public function getDefaults(): array;",
"private function getDefault(){\n\t\treturn array(\n\t\t\t'id' => \t'', \n\t\t\t'name' => \t'',\n\t\t\t'date' => \t'', \n\t\t\t'lvl' => \t'', \n\t\t\t'exp' => \t''\n\t\t);\n\t}",
"public static function getDefaultOptions(): array\n {\n return self::$defaults;\n }",
"public function & GetDefaults () {\n\t\treturn $this->defaults;\n\t}",
"public function getDefault();",
"private function getDefaults()\n\t{\n\t\t/* @formatter:off */\n\t\treturn array(\n\t\t\t'cli_codepage' => 'cp852',\n\t\t\t'cookie_file' => dirname( __DIR__ ) . DIRECTORY_SEPARATOR . 'SESSION_ID',\n\t\t\t'exit_on' => E_ERROR | E_USER_ERROR,\n\t\t\t'is_debug' => false,\n\n\t\t\t/* Services */\n\t\t\t'api' => 'Orkan\\\\Filmweb\\\\Api\\\\Api',\n\t\t\t'tarnsport' => 'Orkan\\\\Filmweb\\\\Transport\\\\Curl',\n\t\t\t'request' => 'Orkan\\\\Filmweb\\\\Transport\\\\CurlRequest',\n\t\t\t'logger' => 'Orkan\\\\Filmweb\\\\Logger',\n\n\t\t\t/* Hide sensitive log data */\n\t\t\t'logger_mask' => array( 'search' => array( $this->pass ), 'replace' => array( '***' ) ),\n\t\t);\n\t\t/* @formatter:on */\n\t}",
"private static function get_default_args() {\n $careerjet_api_key = get_option('jobsearch_integration_careerjet_affid');\n \n return array(\n 'affid' => $careerjet_api_key,\n 'keywords' => '',\n 'location' => '',\n 'page' => 1,\n );\n }",
"protected function get_default_settings()\n {\n return [\n 'default' => [\n 'id' => '',\n 'url' => '',\n 'size' => '',\n 'name' => '',\n ],\n ];\n }",
"protected function _getDefaultValues()\n {\n return array(\n );\n }",
"public static function getDefaults () {\n\t\t$configuration = array(\n\t\t\t'xtype' => 'textfield',\n\t\t\t'anchor' => '95%',\n\t\t\t'blankText' =>'fieldMandatory',\n\t\t\t'labelSeparator' => '',\n\t\t\t'selectOnFocus' => TRUE,\n\t\t);\n\t\treturn $configuration;\n\t}",
"protected function getDefaultOptions()\n {\n return array();\n }",
"private static function _get_default_settings()\n\t{\n\t\treturn array(\n\t\t\t'nr_api_key'\t\t\t\t\t\t=> '',\n\t\t\t'nr_apps_list'\t\t\t\t\t\t=> '', // The apps list associated with the account\n\t\t\t'nr_selected_app_servers'\t\t\t=> '', // The servers from the selected app\n\t\t\t'user_datasets'\t\t\t\t\t\t=> '', // Saved user datasets\n\t\t);\n\t}",
"private function getDefaultConfig() {\n\t\treturn array(\n\t\t\t'client_id' => '',\n\t\t\t'client_secret' => '',\n\t\t\t'base_url' => '',\n\t\t\t'default_type' => 'user',\n\t\t);\n\t}",
"protected function getDefaultParametersArray(): array\n {\n if ($this->isClusterTest()) {\n return $this->prepareClusterEndpoints();\n }\n\n return [\n 'scheme' => 'tcp',\n 'host' => constant('REDIS_SERVER_HOST'),\n 'port' => constant('REDIS_SERVER_PORT'),\n 'database' => constant('REDIS_SERVER_DBNUM'),\n ];\n }",
"public function getDefaultFilterParameters(): array;",
"public function getDefaultValue();",
"public function getDefaultValue();",
"protected function get_default() {\n\t\treturn array(\n\t\t\t'ownerID' => 0,\n\t\t\t'accountID' => '',\n\t\t\t'adsenseLinked' => false,\n\t\t\t'adsConversionID' => '',\n\t\t\t'anonymizeIP' => true,\n\t\t\t'internalWebPropertyID' => '',\n\t\t\t'profileID' => '',\n\t\t\t'propertyID' => '',\n\t\t\t'trackingDisabled' => array( 'loggedinUsers' ),\n\t\t\t'useSnippet' => true,\n\t\t\t'canUseSnippet' => true,\n\t\t\t'dashboardView' => Analytics::DASHBOARD_VIEW,\n\t\t);\n\t}",
"public function getDefinedParameters();",
"private static function getDefaultSettings()\n {\n return array(\n 'driver' => null,\n 'username' => null,\n 'password' => null,\n 'dbname' => null,\n 'host' => null,\n 'port' => null,\n );\n }",
"public function getDefaultRequest() {\n }",
"public function get_default_options()\n\t{\n\t\t$defaults = array();\n\t\t$defaults['title'] = '';\n\t\t$defaults['placeholder'] = 'Search Connections...';\n\t\t\n\t\treturn $defaults;\n\t}",
"protected function getDefaultSchemaVars() {\n\t\treturn array();\n\t}",
"protected static function getDefaultSettings()\n {\n return array(\n 'prefix' => '',\n 'throw_exception' => false,\n 'connection' => null\n );\n }",
"public function defaultOptions() {\n return $this->default_options;\n }",
"public function get_default_value()\n {\n return [\n 'id' => '',\n 'url' => '',\n 'size' => '',\n 'name' => '',\n ];\n }",
"protected function getDefaultOptions()\n {\n return $this->defaultOptions;\n }",
"public function defaults()\n {\n $defaults = $this->config;\n if (!isset($defaults['width'])) {\n $defaults['width'] = $defaults['default_width'];\n }\n if (!isset($defaults['height'])) {\n $defaults['height'] = $defaults['default_height'];\n }\n return $defaults;\n }",
"function get_default_properties()\r\n {\r\n return $this->defaultProperties;\r\n }",
"public static function getDefaultVars(){\n\t\treturn Array(\n\t\t\t//--whether to output debug messages for this class\n\t\t\t'debug'=> false\n\t\t\t,'contentRelativePath'=> '_content'\n\t\t\t,'host'=> ($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : $_SERVER['PWD']\n\t\t\t,'webRoot'=> ($_SERVER['DOCUMENT_ROOT']) ? $_SERVER['DOCUMENT_ROOT'] : $_SERVER['PWD']\n\t\t\t,'wpRelativePath'=> '_wp'\n\t\t\t,'protocol'=> (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']) ? 'https' : 'http'\n\t\t);\n\t}",
"abstract protected function defaults(): array;",
"private function setDefaultParameterValues()\n {\n $this->setDefaultParameterValue(self::CRYPTOGRAPHY, 'DependencyInjection\\CryptUtils\\SeclibCryptography');\n $this->setDefaultParameterValue(self::CRYPTUTILS, 'DependencyInjection\\CryptUtils\\CryptUtilImpl');\n $this->setDefaultParameterValue(self::TRANSPORTWRAPPER, 'DependencyInjection\\Transporter\\LamiaHttpClientWrapper');\n $this->setDefaultParameterValue(self::TRANSPORTATION, 'Transport\\TransportImpl');\n $this->setDefaultParameterValue(self::RESPONSE_CONVERTER, 'Converter\\Response\\ArrayResponseConverter');\n $this->setDefaultParameterValue(self::REQUEST_CONVERTER, 'Converter\\Request\\ArrayConverter');\n $this->setDefaultParameterValue(self::FIELD_CONFIGURATION, 'Configuration\\FieldConfigImpl');\n $this->setDefaultParameterValue(self::FRONTEND_RESPONSE_CONVERTER, 'Converter\\Response\\FrontendServiceResponseConverter');\n $this->setDefaultParameterValue(self::DISABLE_RSA_BLINDING, false);\n }",
"public static function getDefaultVars()\n {\n return [\n 'posts_per_page' => 15,\n 'topics_per_page' => 15,\n 'hot_threshold' => 20,\n 'email_from' => '', // use system default email\n 'url_ranks_images' => \"ranks\",\n 'post_sort_order' => 'ASC',\n 'log_ip' => false,\n 'extendedsearch' => false,\n 'm2f_enabled' => false,\n 'favorites_enabled' => false,\n 'removesignature' => false,\n 'striptags' => false,\n 'hooks' => ['providers' => [], 'subscribers' => []],\n 'rss2f_enabled' => false,\n 'timespanforchanges' => 24,\n 'forum_enabled' => true,\n 'forum_disabled_info' => 'Sorry! The forums are currently off-line for maintenance. Please try later.',\n 'signaturemanagement' => false,\n 'signature_start' => '--',\n 'signature_end' => '--',\n 'showtextinsearchresults' => false,\n 'minsearchlength' => 3,\n 'maxsearchlength' => 30,\n 'fulltextindex' => false,\n 'solved_enabled' => false,\n 'ajax' => false,\n 'striptagsfromemail' => false,\n 'indexTo' => '',\n 'notifyAdminAsMod' => 2,\n 'defaultPoster' => 2,\n 'onlineusers_moderatorcheck' => false,\n 'forum_subscriptions_enabled' => false,\n 'topic_subscriptions_enabled' => false,\n ];\n }",
"private function getDefaultAttributes()\n {\n return array('lastPhotoId' => '', 'lastActionId' => '', 'lastGroupId' => '', 'lastWebhookId' => '', 'password' => '');\n }",
"public function getDefaultValue() {}",
"public function getDefaultValue() {}",
"protected function getDefaultParameters()\n {\n return array(\n 'routes' => Symfony\\Component\\Routing\\RouteCollection::__set_state(array(\n 'routes' => \n array (\n 'homepage' => \n Symfony\\Component\\Routing\\Route::__set_state(array(\n 'path' => '/',\n 'host' => '',\n 'schemes' => \n array (\n ),\n 'methods' => \n array (\n ),\n 'defaults' => \n array (\n '_controller' => 'PrPhpBlog\\\\FrontPage\\\\Presentation\\\\FrontPageController::index',\n ),\n 'requirements' => \n array (\n ),\n 'options' => \n array (\n 'compiler_class' => 'Symfony\\\\Component\\\\Routing\\\\RouteCompiler',\n ),\n 'condition' => '',\n 'compiled' => \n Symfony\\Component\\Routing\\CompiledRoute::__set_state(array(\n 'variables' => \n array (\n ),\n 'tokens' => \n array (\n 0 => \n array (\n 0 => 'text',\n 1 => '/',\n ),\n ),\n 'staticPrefix' => '/',\n 'regex' => '#^/$#sD',\n 'pathVariables' => \n array (\n ),\n 'hostVariables' => \n array (\n ),\n 'hostRegex' => NULL,\n 'hostTokens' => \n array (\n ),\n )),\n )),\n 'about' => \n Symfony\\Component\\Routing\\Route::__set_state(array(\n 'path' => '/about',\n 'host' => '',\n 'schemes' => \n array (\n ),\n 'methods' => \n array (\n ),\n 'defaults' => \n array (\n '_controller' => 'PrPhpBlog\\\\About\\\\Presentation\\\\AboutController::index',\n ),\n 'requirements' => \n array (\n ),\n 'options' => \n array (\n 'compiler_class' => 'Symfony\\\\Component\\\\Routing\\\\RouteCompiler',\n ),\n 'condition' => '',\n 'compiled' => NULL,\n )),\n ),\n 'resources' => \n array (\n '/home/achilleskal/Projects/php/pr-php-blog/src/routes.yaml' => \n Symfony\\Component\\Config\\Resource\\FileResource::__set_state(array(\n 'resource' => '/home/achilleskal/Projects/php/pr-php-blog/src/routes.yaml',\n )),\n ),\n)),\n );\n }",
"public function defaultConfig();",
"public function getDefaultData()\n {\n return $this->predefined;\n }",
"protected function getDefaultValues() {\n\t\treturn array(\n\t\t\t'name' => $this->getStructureNode()->getName(),\n\t\t\t'title' => $this->getStructureNode()->getTitle());\n\t}",
"private function getDefaultConfig()\n {\n return [\n 'auth' => $this->clientConfig->getAuthorizationArray(),\n 'headers' => $this->clientConfig->getRequestHeaders(),\n ];\n }",
"public function testGetParamsDefault(): void\n {\n self::assertNull($this->class->getParams());\n }",
"public function getDefaultOptions() {\n return static::defaultOptions();\n }",
"function defaults() {\n\t\t$ret = array();\n\t\tforeach($this->schema() as $key => $field) {\n\t\t\tif(!$field['primary'] && !is_null($field['default'])) {\n\t\t\t\t$ret[$key] = $field['default'];\n\t\t\t}\n\t\t}\n\n\t\treturn $ret;\n\t}",
"public function getOptionalParameters();",
"private function getDefaultParameter($name)\n {\n $this->defaults = $this->design->getDesignParams();\n return $this->defaults[$name];\n }",
"public function getParameterValues()\n {\n $values = array();\n\n foreach ($this->parameters as $name => $parameter) {\n if (!$parameter->isRequired()) {\n $values[$name] = $parameter->getDefaultValue();\n }\n }\n\n return $values;\n }",
"private function getDefaultParameter($params, $var, $default = null)\n {\n return isset($params[$var]) ? $params[$var] : $default;\n }",
"public function defaultSettings()\n {\n return $this->repository->get( $this->repoOptionString($this->settingsKey, $this->defaultSettingsKey), array());\n }",
"public function getExpectedDefaults();",
"public function get_default()\n\t{\n\t\t$return = $this->default;\n\n\t\tif (count($args = func_get_args()) >= 1) \n\t\t{\n\t\t\tisset($args[0]) && is_array($args[0]) && $args = $args[0];\n\t\t\t$_return = array();\n\t\t\tforeach ($args as $arg)\n\t\t\t{\n\t\t\t\tif (isset($return[$arg]))\n\t\t\t\t{\n\t\t\t\t\t$_return[$arg] = $return[$arg];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tempty($_return) OR $return = $_return;\n\t\t\tunset($_return);\n\t\t}\n\t\treturn $return;\n\t}"
] | [
"0.8979666",
"0.88019425",
"0.88019425",
"0.8749293",
"0.87444776",
"0.8665947",
"0.85626286",
"0.85295105",
"0.82588303",
"0.7995129",
"0.794994",
"0.7888684",
"0.7854413",
"0.78280187",
"0.78183",
"0.7790714",
"0.7790534",
"0.76390976",
"0.75603986",
"0.7469273",
"0.74398386",
"0.7379349",
"0.7355301",
"0.7288212",
"0.7277906",
"0.72767454",
"0.72590864",
"0.72320247",
"0.70983535",
"0.70374495",
"0.70309365",
"0.6986699",
"0.69809127",
"0.69452435",
"0.69452435",
"0.69295466",
"0.69295466",
"0.6920319",
"0.68901694",
"0.6857075",
"0.6845399",
"0.6842856",
"0.68375874",
"0.68219936",
"0.6819596",
"0.6819596",
"0.68113774",
"0.6804838",
"0.6791613",
"0.6767574",
"0.67661333",
"0.67508984",
"0.67352706",
"0.6720098",
"0.6713073",
"0.671106",
"0.6686508",
"0.66763175",
"0.6675186",
"0.66599977",
"0.66488594",
"0.6643796",
"0.66141605",
"0.6613452",
"0.6605014",
"0.6605014",
"0.6595917",
"0.65832216",
"0.65828276",
"0.6580063",
"0.6548067",
"0.654374",
"0.6541873",
"0.6530343",
"0.65283865",
"0.65256417",
"0.6515826",
"0.6514665",
"0.6513788",
"0.6513009",
"0.65097415",
"0.65059745",
"0.6494936",
"0.6489686",
"0.6488102",
"0.64646137",
"0.64626044",
"0.6461792",
"0.64512575",
"0.64405304",
"0.6437078",
"0.6433148",
"0.64248186",
"0.6394341",
"0.6384257",
"0.63802963",
"0.63713014",
"0.6364252",
"0.635903",
"0.63520426"
] | 0.6699558 | 56 |
Lists all User models. | public function actionIndex()
{
if (!\Yii::$app->user->can('просмотр раздела - фонды')) {
throw new ForbiddenHttpException('Access denied');
}
$searchModel = new FundSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
//$model = Funds::find();
return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function allUsers()\n {\n $users = $this->user->findAll();\n $this->show('admin/allusers', ['users' => $users]);\n }",
"public function index() {\n $rows = AdminUser::paginate(10);\n return View::make(\"CoreCms::user.listing\")->with(\"models\", $rows);\n }",
"public function index()\n {\n $users = User::all();\n }",
"public function index()\n {\n\n return User::all();\n }",
"public function index()\n {\n return User::all();\n }",
"public function index()\n {\n return User::all();\n }",
"public function index()\n {\n return User::all();\n }",
"public function index()\n {\n return User::all();\n }",
"public function index()\n {\n return User::all();\n }",
"public function index()\n {\n return User::all();\n }",
"public function index()\n {\n return User::all();\n }",
"public function index()\n {\n return User::all();\n }",
"public function list()\n {\n $listUsers = AppUser::findAll();\n $this->show('back/user/list', [\"users\" => $listUsers]);\n }",
"function getUsers(){\n\t\t\t$this->loadModel('User');\n\t\t\treturn $this->User->find(array());\n\t\t}",
"public function actionIndex() {\n //redirect a user if not super admin\n if (!Yii::$app->CustomComponents->check_permission('all_users')) {\n return $this->redirect(['site/index']);\n }\n\n $query = DvUsers::find();\n $count = $query->count();\n $pagination = new Pagination(['totalCount' => $count, 'pageSize' => 50]);\n $models = $query->offset($pagination->offset)->limit($pagination->limit)->all();\n return $this->render('index', [ 'users' => $models, 'total_records' => $count, 'pages' => $pagination]);\n }",
"public function index()\n {\n //\n return User::all();\n }",
"public function index(){\n\t\t$users = $this->User->find(\"users\", \"all\");\t\n\t\t$this->set(\"users\", $users);\n\t}",
"public function index()\n {\n return $this->user->all();\n }",
"public static function retrieveAllUsers() {\n return R::getAll('SELECT * FROM user');\n }",
"public function index()\n {\n $users = $this->model->all();\n return view('admin/users/user', compact('users'));\n }",
"public function index()\n {\n $this->seo = [\n 'title'=>'系统用户',\n 'group'=>'用户权限',\n ];\n $this->setSeo();\n\n $models = User::orderBy('id', 'desc')->paginate(3);\n return view('admin.user.index',['models'=>$models]);\n }",
"public function actionIndex()\n {\n $searchModel = new UserSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n $dataProvider->sort = [\n 'defaultOrder' => ['id' => SORT_DESC]\n ];\n $dataProvider->pagination->pageSize = 50;\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function index()\n {\n $users = User::all();\n return view('backend.user.list', compact(['users']));\n }",
"public function actionIndex()\n {\n $searchModel = new UserSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function actionIndex()\n {\n $searchModel = new UserSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function actionIndex()\n {\n $searchModel = new UserSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function actionIndex()\n {\n $searchModel = new UserSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function actionIndex()\n {\n $searchModel = new UserSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function actionIndex()\n {\n $searchModel = new UserSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function actionIndex()\n {\n $searchModel = new UserSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function actionIndex()\n {\n $searchModel = new UserSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function actionIndex()\n {\n $searchModel = new UserSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function actionIndex()\n {\n $searchModel = new UserSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function actionIndex()\n {\n $searchModel = new UserSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function index()\n {\n $user = $this->permission(User::all(), 'id');\n\n return $this->showAll($user,User::class);\n }",
"public function getUsers() {\n\n $users = $this->users_model->getallusers();\n exit;\n }",
"public function actionIndex()\n {\n $request = Yii::$app->request;\n\n $params = ArrayHelper::merge($request->get(), [\n 'perPage' => $request->get('perPage', Yii::$app->params['per_pages'][0]),\n 'orderCol' => $request->get('orderCol', 'id'),\n 'orderDir' => $request->get('orderDir', 'asc')\n ]);\n\n $pageTitle = Yii::t('app', 'List of users');\n\n $breadcrumbs = [\n ['url' => ['/admin'], 'label' => Yii::t('app', 'Admin panel'), ],\n ['url' => ['/admin/user/list'], 'label' => $pageTitle, 'class' => 'active']\n ];\n\n $data = User::getList($params);\n\n return $this->render('/admin/user/list.twig', [\n 'params' => $params,\n 'pages' => $data['pages'],\n 'users' => $data['models'],\n 'pageTitle' => $pageTitle,\n 'breadcrumbs' => $breadcrumbs,\n ]);\n }",
"public function actionIndex()\n {\n $searchModel = new UserSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function getAllUsers() {\n self::isAdmin404();\n\n $users = User::get();\n\n return view('users', ['users' => $users]);\n }",
"public function actionIndex()\n {\n $searchModel = new UserSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n \n ]);\n }",
"public function actionIndex() {\n \n $searchModel = new UserSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function index()\n {\n $users = User::all();\n return $this->showAll($users);\n }",
"public function index()\n {\n $usuarios = User::all();\n\n return $this->showAll($usuarios);\n }",
"public function index()\n {\n $usuarios = User::all();\n\n return $this->showAll($usuarios);\n }",
"public function getUsers(){\n return self::getModel(\"users\", \"*\");\n }",
"public function actionIndex()\n {\n $searchModel = new Usersearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function showAllUsers(Request $request)\n {\n return User::all();\n }",
"public function actionIndex() {\n $searchModel = new UsersSearch;\n $dataProvider = $searchModel->search(Yii::$app->request->getQueryParams());\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n 'searchModel' => $searchModel,\n ]);\n }",
"public function index()\n {\n $data['users'] = $this->user->all();\n return view('backend.user.list')->with($data);\n }",
"function index(){\n\n \n $users = $this->User_model->all();\n\n $data = array();\n $data['users'] = $users;\n\n $this->load->view('list', $data);\n }",
"public function actionIndex()\n {\n $searchModel = new UserSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n $dataProvider->pagination->pageSize = 15;\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }",
"public function actionIndex() {\n $searchModel = new UserSearch();\n if (!$this->user->isAdmin) {\n $searchModel->id = $this->user->id;\n }\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function index()\n {\n $user = User::all();\n return view('admin.user.list',compact('user'));\n }",
"public function actionIndex()\n {\n $searchModel = new UsersSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function actionIndex()\n {\n $searchModel = new UsersSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function actionIndex()\n {\n $searchModel = new UsersSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function index()\n {\n $users = User::All();\n return $this->showAll($users);\n }",
"public static function getUsers(){\n return self::find()->all();\n }",
"public function index()\n {\n return User::all()->toArray();\n }",
"public function actionIndex()\n {\n $searchModel = new UserSearch();\n $searchModel->rol = User::ROL_USUARIO;\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function index() {\n\t\t$user = $this->User->read(null, $this->Auth->user('id'));\n\t\t$this->User->recursive = 0;\n\t\t$this->set('users', $this->paginate());\n\t\t$this->set('userId', $user['User']['id']);\n\t\t$this->set('userType', $user['User']['type']);\n\t}",
"public function index()\n {\n return $this->userRepo->getUsers();\n }",
"public function getAllUsers()\n {\n $users = User::all();\n return $users;\n }",
"public function index()\n {\n return new UserCollection(User::all());\n }",
"public function index()\n {\n $users = User::all();\n return $users;\n }",
"public function listofUser()\n {\n return view('Admin.ShowallUser');\n }",
"public function index()\n {\n $users = User::paginate();\n return view('manage.users.index')->withUsers($users);\n }",
"public function listUsers() {\n \t$data['users'] = User::all();\n \treturn view('backend.users.index', $data);\n }",
"public static function getAllUsers() {\r\n // Create a User object\r\n $user = new User();\r\n // Return an array of user objects from the database, ordered by firstname\r\n return $user->getCollection([\"ORDER\" => ['firstname' => 'ASC']]);\r\n }",
"public function index()\n {\n $this->authorize('index', User::class);\n\n $this->validate(request(), [\n 'page' => 'integer|min:1',\n 'search' => 'string',\n 'role' => 'string',\n 'promotion' => 'string',\n ]);\n\n $users = User::filtered(\n request()->search,\n request()->role,\n request()->promotion,\n null,\n null,\n false\n )->load(['roles'])\n ->sortByDesc('created_at');\n\n if (! request('raw')) {\n $users = $users\n ->paginate(10, request()->page)\n ->withPath(route('users.index'));\n }\n\n return UserResource::collection($users);\n }",
"public function index()\n {\n return User::all(['id','name','email','created_at','updated_at']);\n }",
"public function listUsers()\n {\n $users = User::all();\n\n return view('listUsers', ['users' => User::all()]);\n\n }",
"function findAllUsers() {\r\n\r\n\t\treturn ($this->query('SELECT * FROM users;'));\r\n\r\n\t}",
"public function index()\n {\n return view('backend.user.list_user');\n }",
"public function index()\n {\n //\n $users = User::all();\n\n return $users;\n }",
"public function allUsers()\n {\n $users = User::all();\n $role=0;\n return view('admin/users/index', [\n 'users' => $users,\n 'role' => $role\n ]);\n }",
"public function getAllUsers()\n {\n // Connect to db\n $user = new User();\n $user->setDb($this->di->get(\"db\"));\n // Get users from db\n $users = $user->findAll();\n return $users;\n }",
"public function index()\n {\n\n $users = User::all();\n return $users;\n\n }",
"public function index()\n {\n $users = $this->userService->getUserWithPaginate();\n return view('admin.user.list', compact('users'));\n }",
"public function index()\n {\n $count = \\App\\User::count();\n $users = \\App\\User::orderBy('id', 'desc')->paginate(10);\n\n return view('webcontrol.user.list', compact('count', 'users'));\n }",
"public function index()\n {\n return view('admin/user-table/all-user');\n }",
"public function index()\n {\n // return collection of all users\n return UserIndexResource::collection(User::info()->get());\n }",
"public function listAction()\n {\n return new ViewModel([\n 'users' => $this->table->fetchAll(),\n ]);\n }",
"public function index()\n {\n return User::get();\n }",
"public function index()\n {\n $users = User::all();\n return view('users.userslist')->withUsers($users);\n }",
"public function index()\n {\n return UserTransformer::collection(User::all());\n }",
"public function index() {\n\t\t$this->accessible();\n\t\t$users = User::paginate(5);\n\n\t\treturn view('users.list', compact('users'));\n\t}",
"public function index()\n {\n $listUser=User::all();\n return view('admin.user.list',compact('listUser'));\n }",
"public function index()\n {\n //\n $users = User::all();\n return $users;\n }",
"public function index()\n {\n $users = QueryBuilder::for(User::class)\n ->allowedFilters([\n 'name',\n 'email',\n AllowedFilter::exact('is_admin'),\n ])\n ->defaultSort('name')\n ->allowedSorts(['name', 'email'])\n ->paginate(15);\n\n return new UserCollection($users);\n }",
"public function index()\n {\n return view('administration::user.index')\n ->withUsers($this->user->all());\n }",
"public function userlistAction()\n\t{\n\t\t$users = $this->userService->getUserList(array(), false);\n\n\t\t$this->view->roles = za()->getUser()->getAvailableRoles();\n\t\t$this->view->users = $users;\n\t\t$this->renderView('admin/user-list.php');\n\t}",
"public function actionIndex()\n {\n\t\t \t\t\t\tif(!PermissionUtils::checkModuleActionPermission(\"Users\",PermissionUtils::VIEW_ALL)){\n\t\t\t\tthrow new ForbiddenHttpException('You are not allowed to perform this action.');\n }\n $searchModel = new UsersSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function actionIndex()\n {\n $searchModel = new UserSearch();\n $searchModel->active = User::ACTIVE_YES;\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function index()\n\t{\n\t\treturn view('users')->with('users', User::All());\n\t}",
"public function index()\n {\n $users = User::paginate(10);\n\n return view('backend.users.index')->withUsers($users);\n }",
"public function index() {\n\n $users = User::all();\n return view('admin/user.index')\n ->with('users', $users);\n }",
"public function index()\n {\n $users = UserModel::all();\n\n return view('users.index', compact('users'));\n }",
"function managementUsersAll(){\n $Users = new \\Project\\Models\\ManagementUserManager();\n $allUser = $Users->allManagementUser();\n\n require 'app/views/back/managementUsers.php';\n }",
"public function index_get()\n {\n $response = $this->UserM->all_user();\n $this->response($response);\n }"
] | [
"0.7549849",
"0.7482557",
"0.7446408",
"0.74223435",
"0.7370622",
"0.7370622",
"0.7370622",
"0.7370622",
"0.7370622",
"0.7370622",
"0.7370622",
"0.7370622",
"0.72438586",
"0.7215055",
"0.720281",
"0.7133092",
"0.7102238",
"0.70473415",
"0.7046108",
"0.70358056",
"0.70300734",
"0.7015171",
"0.7012218",
"0.7011417",
"0.7011417",
"0.7011417",
"0.7011417",
"0.7011417",
"0.7011417",
"0.7011417",
"0.7011417",
"0.7011417",
"0.7011417",
"0.7011417",
"0.70008606",
"0.6995211",
"0.698862",
"0.6987875",
"0.6982012",
"0.697305",
"0.6972373",
"0.6971599",
"0.69599754",
"0.69599754",
"0.6954801",
"0.69543874",
"0.69520634",
"0.6941403",
"0.69345915",
"0.69331217",
"0.6924661",
"0.6921837",
"0.6921048",
"0.6920427",
"0.69104016",
"0.69104016",
"0.69104016",
"0.6904807",
"0.69037557",
"0.68995297",
"0.68968153",
"0.6895193",
"0.6884756",
"0.6879643",
"0.6873385",
"0.6870186",
"0.6869953",
"0.6859427",
"0.6851485",
"0.68511677",
"0.68290585",
"0.6821002",
"0.6809605",
"0.680941",
"0.6802254",
"0.679773",
"0.67929715",
"0.67866683",
"0.6772769",
"0.67673886",
"0.67645353",
"0.6746893",
"0.6741695",
"0.673987",
"0.6733633",
"0.6731413",
"0.67294335",
"0.67234975",
"0.6717108",
"0.6710899",
"0.67101735",
"0.6709034",
"0.66969895",
"0.6693224",
"0.6691836",
"0.66904217",
"0.6689409",
"0.6689256",
"0.66883934",
"0.66833985",
"0.66820955"
] | 0.0 | -1 |
Display a listing of the resource. | public function index(Request $request)
{
$classes=class_::orderBy("id", "desc")->paginate($this->paginationSize);
\App\Global_var::logAction($request, 'classes list viewed');
if($request->ajax())
return view("classes.ajax.index")->with('classes', $classes);
return view("classes.http.index")->with('classes', $classes);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }",
"public function listing();",
"function index() {\n\t\t$this->show_list();\n\t}",
"public function actionList() {\n $this->_getList();\n }",
"public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }",
"public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }",
"public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }",
"function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}",
"public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }",
"public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }",
"public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}",
"function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}",
"public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }",
"public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}",
"public function actionRestList() {\n\t $this->doRestList();\n\t}",
"public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}",
"public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }",
"public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }",
"public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}",
"public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}",
"public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }",
"public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }",
"public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }",
"public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }",
"public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}",
"public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }",
"public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}",
"public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }",
"public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }",
"public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }",
"public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}",
"public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }",
"public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }",
"public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }",
"public function index()\n {\n return Resources::collection(Checking::paginate());\n }",
"public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }",
"public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }",
"public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }",
"public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }",
"public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }",
"public function view(){\n\t\t$this->buildListing();\n\t}",
"public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }",
"public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }",
"public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }",
"public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }",
"public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }",
"public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }",
"public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }",
"public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }",
"public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }",
"public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}",
"public function listAction() {}",
"public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }",
"public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }",
"public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }",
"public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }",
"public function executeList()\n {\n $this->setTemplate('list');\n }",
"public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }",
"function listing() {\r\n\r\n }",
"public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }",
"public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }",
"public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}",
"public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }",
"public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }",
"public function _index(){\n\t $this->_list();\n\t}",
"public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}",
"function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}",
"public function index()\n {\n $this->booklist();\n }",
"public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }",
"public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }",
"public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }",
"public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }",
"public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }",
"public function indexAction() {\n $this->_forward('list');\n }",
"public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }",
"public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }",
"public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}",
"public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }",
"public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }",
"public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }",
"public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }",
"public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }",
"public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}",
"public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }",
"public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }",
"public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }",
"public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}",
"public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }",
"public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }",
"public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }",
"public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }",
"public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }",
"public function index()\n {\n return view('admin.resources.index');\n }",
"public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}"
] | [
"0.7446777",
"0.736227",
"0.73005503",
"0.72478926",
"0.71631265",
"0.71489686",
"0.7131636",
"0.7105969",
"0.71029514",
"0.7101372",
"0.70508176",
"0.6995128",
"0.69890636",
"0.6934895",
"0.6900203",
"0.6899281",
"0.6891734",
"0.6887235",
"0.68670005",
"0.6849741",
"0.6830523",
"0.6802689",
"0.6797",
"0.67957735",
"0.67871135",
"0.6760129",
"0.67427456",
"0.6730486",
"0.67272323",
"0.67255723",
"0.67255723",
"0.67255723",
"0.67177945",
"0.6707866",
"0.6706713",
"0.6704375",
"0.6664782",
"0.6662871",
"0.6660302",
"0.6659404",
"0.6656656",
"0.6653517",
"0.6647965",
"0.6620322",
"0.66185474",
"0.6618499",
"0.6606105",
"0.6600617",
"0.65996987",
"0.6594775",
"0.6587389",
"0.6585109",
"0.6581641",
"0.6581017",
"0.6577157",
"0.65747666",
"0.6572513",
"0.65721947",
"0.6570553",
"0.65646994",
"0.6563556",
"0.6554194",
"0.65529937",
"0.65460825",
"0.65368485",
"0.653429",
"0.65328294",
"0.6526759",
"0.6526695",
"0.6526284",
"0.65191334",
"0.65183175",
"0.65174305",
"0.651703",
"0.65141153",
"0.6507088",
"0.65061647",
"0.6504046",
"0.64942145",
"0.6491893",
"0.64883405",
"0.6486392",
"0.6485077",
"0.64846045",
"0.6478858",
"0.64756656",
"0.64726377",
"0.6471126",
"0.64701074",
"0.6467418",
"0.6462195",
"0.64618355",
"0.6459199",
"0.6457831",
"0.6454631",
"0.64533997",
"0.6451915",
"0.6450861",
"0.6449301",
"0.64492667",
"0.64469045"
] | 0.0 | -1 |
Show the form for creating a new resource. | public function create(Request $request){
if($request->ajax())
return view('classes.ajax.create');
return view('classes.http.create');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view('resource.create');\n }",
"public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}",
"public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }",
"public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }",
"public function create()\n {\n return view ('forms.create');\n }",
"public function create ()\n {\n return view('forms.create');\n }",
"public function create()\n\t{\n\t\treturn view('faith.form');\n\t}",
"public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }",
"public function create()\n {\n return view(\"request_form.form\");\n }",
"public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }",
"public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle école'\n\t\t) ) );\n\t}",
"public function create()\n {\n return view($this->forms . '.create');\n }",
"public function create()\n {\n return view('restful.add');\n }",
"public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }",
"public function create()\n {\n return view('admin.createform');\n }",
"public function create()\n {\n return view('admin.forms.create');\n }",
"public function create()\n {\n return view('backend.student.form');\n }",
"public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function create()\n {\n return view('client.form');\n }",
"public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }",
"public function create()\n {\n return view('Form');\n }",
"public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }",
"public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}",
"public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }",
"public function create()\n {\n return view('backend.schoolboard.addform');\n }",
"public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}",
"public function create()\n {\n //\n return view('form');\n }",
"public function create()\n {\n return view('rests.create');\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return view(\"Add\");\n }",
"public function create(){\n return view('form.create');\n }",
"public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }",
"public function create()\n {\n\n return view('control panel.student.add');\n\n }",
"public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}",
"public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }",
"public function create()\n {\n return $this->cView(\"form\");\n }",
"public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }",
"public function create()\n {\n return view(\"dresses.form\");\n }",
"public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}",
"public function createAction()\n {\n// $this->view->form = $form;\n }",
"public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }",
"public function create()\n {\n return view('fish.form');\n }",
"public function create()\n {\n return view('users.forms.create');\n }",
"public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }",
"public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}",
"public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }",
"public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }",
"public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }",
"public function create()\n {\n return view('essentials::create');\n }",
"public function create()\n {\n return view('student.add');\n }",
"public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}",
"public function create()\n {\n return view('url.form');\n }",
"public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }",
"public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}",
"public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view('crud/add'); }",
"public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}",
"public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view(\"List.form\");\n }",
"public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}",
"public function create()\n {\n //load create form\n return view('products.create');\n }",
"public function create()\n {\n return view('article.addform');\n }",
"public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }",
"public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}",
"public function create()\n {\n return view('saldo.form');\n }",
"public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}",
"public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }",
"public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }",
"public function create()\n {\n return view('admin.inverty.add');\n }",
"public function create()\n {\n return view('Libro.create');\n }",
"public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }",
"public function create()\n {\n return view(\"familiasPrograma.create\");\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}",
"public function create()\n {\n return view(\"create\");\n }",
"public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}",
"public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n return view('forming');\n }",
"public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }",
"public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }",
"public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }",
"public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }",
"public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }",
"public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}",
"public function create()\n {\n return view('student::students.student.create');\n }",
"public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}"
] | [
"0.75948673",
"0.75948673",
"0.75863165",
"0.7577412",
"0.75727344",
"0.7500887",
"0.7434847",
"0.7433956",
"0.73892003",
"0.73531085",
"0.73364776",
"0.73125",
"0.7296102",
"0.7281891",
"0.72741455",
"0.72424185",
"0.7229325",
"0.7226713",
"0.7187349",
"0.7179176",
"0.7174283",
"0.7150356",
"0.71444064",
"0.71442676",
"0.713498",
"0.71283126",
"0.7123691",
"0.71158516",
"0.71158516",
"0.71158516",
"0.7112176",
"0.7094388",
"0.7085711",
"0.708025",
"0.70800644",
"0.70571953",
"0.70571953",
"0.70556754",
"0.70396435",
"0.7039549",
"0.7036275",
"0.703468",
"0.70305896",
"0.7027638",
"0.70265305",
"0.70199823",
"0.7018007",
"0.7004984",
"0.7003889",
"0.7000935",
"0.69973785",
"0.6994679",
"0.6993764",
"0.6989918",
"0.6986989",
"0.6966502",
"0.69656384",
"0.69564354",
"0.69518244",
"0.6951109",
"0.6947306",
"0.69444615",
"0.69423944",
"0.6941156",
"0.6937871",
"0.6937871",
"0.6936686",
"0.69345254",
"0.69318026",
"0.692827",
"0.69263744",
"0.69242257",
"0.6918349",
"0.6915889",
"0.6912884",
"0.691146",
"0.69103104",
"0.69085974",
"0.69040126",
"0.69014287",
"0.69012105",
"0.6900397",
"0.68951064",
"0.6893521",
"0.68932164",
"0.6891899",
"0.6891616",
"0.6891616",
"0.6889246",
"0.68880934",
"0.6887128",
"0.6884732",
"0.68822503",
"0.68809193",
"0.6875949",
"0.68739206",
"0.68739134",
"0.6870358",
"0.6869779",
"0.68696856",
"0.686877"
] | 0.0 | -1 |
Stock a newly created resource in storage. | public function store(Request $request)
{
$this->validate($request, [
'name'=>'required',
'code'=>'required',
]);
$class=class_::where('name', '=', $request->name)->first();
if($class!=null){
if($request->ajax())
return ['error', "Duplicate_Entry"];
return back();
}
$class=new class_;
$class->name=$request->name;
$class->code=$request->code;
$class->description=$request->description;
$class->save();
\App\Global_var::logAction($request, 'Created new class ID '.$class->id);
return redirect()->route("classes.index");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }",
"public function createStorage();",
"public function store(StockRequest $request)\n {\n return Stock::create($request->all());\n }",
"public function store()\n\t{\n\t\t$rules = array(\n\t\t\t'product_name'\t\t=> 'required',\n\t\t\t'category_name'\t\t=> 'required',\n\t\t\t'quantity'\t\t\t=> 'required|integer|min:0'\n\t\t\t);\n\n\t\t$validator = Validator::make(Input::all(), $rules);\n\n\t\tif ($validator -> fails()) {\n\t\t\treturn Redirect::route('stock.create')\n\t\t\t\t->withErrors($validator)\n\t\t\t\t->withInput(Input::all());\n\t\t}\n\t\telse{\n\t\t\t$stock = new Stock;\n\t\t\t$stock->product_id \t\t= Input::get('product_name');\n\t\t\t$stock->category_id \t= Input::get('category_name');\n\t\t\t$stock->note \t\t\t= Input::get('note');\n\t\t\t$stock->quantity\t\t= Input::get('quantity');\n\t\t\t$stock->save();\n\n\t\t\t// Update product stock\n\t\t\tProduct::updateInStock($stock->product_id);\n\n\t\t\treturn Redirect::route('stock.create')->with('message', 'Stock created successfully');\n\t\t}\n\t}",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function store(CreateRequest $request)\n {\n $product = new Product;\n $product->code = $request->code;\n $product->name = $request->name;\n $product->impuesto = $request->tax;\n $product->category = $request->category;\n $product->description = $request->description;\n $product->long_description = $request->long_description;\n $product->featured = (!is_null($request->featured)) ? true : false;\n $product->sell_in_negative = (!is_null($request->sell_without_stock)) ? true : false;\n $product->show_stock = (!is_null($request->show_stock)) ? true : false;\n $product->buy_price = $request->buy_price;\n $product->sale_price = $request->sale_price;\n\n if ($product->save()) {\n for ($i = 0; $i <= 5; $i++) {\n $image = $i > 0 ? 'imagen' . $i : 'imagen';\n\n if ($request->file($image) != null) {\n $product_name = sanitize_file_name ($product->id . ' ' . $product->name . ' ' . $image);\n\n if ($request->file($image)->storeAs(auth_user()->dbConfig->base_dato . '/imagenes_productos', $product_name . '.' . $request->file($image)->extension(), 'uploads')) {\n $product->$image = $product_name . '.' . $request->file($image)->extension();\n }\n\n $storage = Storage::disk('s3')->put(\n auth_user()->dbConfig->base_dato . '/imagenes_productos/'.$product->$image,\n file_get_contents($request->file($image)->getRealPath())\n );\n }\n }\n\n if ($product->save()) {\n $warehouses = Warehouse::all();\n $current_warehouse = auth_user()->shop->id_almacen;\n\n foreach ($warehouses as $warehouse) {\n $quantity = $warehouse->id === $current_warehouse ? $request->quantity : 0;\n $curret_stock = new Current;\n $curret_stock->set_warehouse = $warehouse->id;\n $curret_stock->set_product = $product->id;\n $curret_stock->set_quantity = $quantity;\n $curret_stock->save();\n }\n\n if ($request->quantity > 0) {\n $products = collect();\n $products->push([\n 'id' => $product->id,\n 'name' => $product->name,\n 'buy_price' => $product->buy_price,\n 'sale_price' => $product->sale_price,\n 'quantity' => $request->quantity,\n 'subtotal' => $product->buy_price * $request->quantity,\n ]);\n $movement = new InventoryMovement($products);\n $inventory = $movement->new($current_warehouse);\n $result = $movement->addItems($inventory);\n }\n\n return redirect()->route('admin.products.index')->with('success', 'El producto se agrego con éxito.');\n }\n }\n\n return back()->with('danger', 'Ha ocurrido un error.');\n }",
"public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }",
"public function store($data, Resource $resource);",
"public function store(Request $request)\n {\n $data = $request->except('file');\n $file = $this->upload->upload( $request->file('file') , 'files/products');\n\n $data['image'] = $file['name'];\n\n $product = $this->product->create($data);\n \n // Create a entry in stock history\n $this->stock->create(['product_id' => $product->id, 'amount' => $product->sku, 'motif' => 'Stock initial', 'operator' => '+']);\n\n return redirect('admin/product/'.$product->id)->with(array('status' => 'success', 'message' => 'Le produit a été crée' ));\n }",
"public function store() {\n $input = Request::all();\n $userStock = new UserStock ();\n $userStock->stock_id = $input ['stockId'];\n $userStock->users_id = $input ['userId'];\n $userStock->name = $input ['name'];\n $userStock->description = $input ['description'];\n $userStock->flag = '1';\n $userStock->save();\n return redirect('viewManageUserStock');\n }",
"public function store(StockProcessRequest $request)\n {\n $formInput = $request->validated();\n $formInput['user_id'] = auth()->id();\n $formDataAddUserId = $formInput;\n Stocks::create($formDataAddUserId);\n return redirect()->route('stocks.index');\n }",
"public function persist()\n {\n $asset = Asset::create($this->only([\n 'school_id', 'category_id', 'type_id', 'name', 'tag', 'serial_number',\n 'make', 'model', 'processor', 'memory', 'storage', 'operating_system',\n 'warranty', 'notes'\n ]));\n\n if ($asset->wasRecentlyCreated) {\n Finance::create([\n 'asset_id' => $asset->id,\n 'accounting_start' => $this->accounting_start,\n 'accounting_end' => $this->accounting_end,\n 'purchase_date' => $this->purchase_date,\n 'end_of_life' => $this->end_of_life,\n 'purchase_cost' => $this->purchase_cost,\n 'current_value' => $this->current_value,\n 'depreciation' => $this->depreciation,\n 'net_book_value' => $this->net_book_value,\n ]);\n }\n\n return $asset;\n }",
"public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }",
"public function createStorage(array $context = []): void;",
"public function createShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathMultipleResource(),\n 'METHOD' => 'POST',\n 'DATA' => [\n /*\n * Using static:: instead of self:: because static:: binds at runtime\n * If we use self this would not work because it would\n * always call ShopifyResource::getResourceSingularName()\n */\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }",
"public function creating(Storage $storage)\n {\n Mail::send(new NewMaterialStock($storage));\n }",
"public function store(InventoryStockRequest $request, $itemId)\n {\n $item = $this->inventory->findOrFail($itemId);\n\n $stock = $item->stocks()->getRelated();\n\n return $this->dispatch(new Store($request, $item, $stock));\n }",
"public function setStorageResource($val)\n {\n $this->_propDict[\"storageResource\"] = $val;\n return $this;\n }",
"function storeAndNew() {\n $this->store();\n }",
"public function store(Request $request)\n {\n $request->validate([\n 'item'=>'required',\n 'amount'=>'required',\n 'description'=>'required',\n 'quantity'=>'required|numeric',\n 'available_till'=>'required',\n \n ]);\n \n $itid=Item::all()->where('name',$request->item)->first();\n if($itid==null){\n $itid= new Item();\n $itid->name=$request->item;\n $itid->save();\n }\n \n \n Stock::create([\n 'farmer_id'=>Auth::user()->id,\n 'item_id'=>$itid->id,\n 'amount'=>$request->amount,\n 'description'=>$request->description,\n 'quantity'=>$request->quantity,\n 'price'=>$request->amount,\n 'available_till'=>$request->available_till,\n ]);\n return redirect()->back()->with('success', 'Stock create successfully');\n \n }",
"public function store(Request $request)\n {\n return $this->stockRepository->store($request);\n }",
"public function create()\n {\n return view('product::admin.storages.create');\n }",
"public function store(Request $request)\n {\n return Storageplace::create($request->only(['storageplace']));\n }",
"public function store(Request $request)\n {\n $product = $request->isMethod('put') ? Product::findOrFail($request->id) : new Product;\n\n $product->displayName = $request->input('displayName');\n $product->supplierName = $request->input('supplierName');\n $product->quantity = $request->input('quantity');\n $product->price = $request->input('price');\n\n $isCreated = $product->save();\n\n if ($isCreated) {\n return new ProductResource($product);\n }\n }",
"public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"public function addItemStock()\n {\n $this->validate($this->request, [\n 'itemCondition' => 'required|string',\n 'itemStateId' => 'required|integer|min:1',\n ]);\n $items = array(\n 'itemStateId' => $this->request->input('itemStateId'),\n 'itemCondition' => $this->request->input( 'itemCondition'),\n );\n $id = $this->request->id;\n try {\n $item = new ItemService();\n $result = $item->addToItemStock($items, $id);\n\n if ($result) {\n return response()->json([\n 'success' => true,\n 'data' => [\n 'itemId' => $result,\n ],\n 'message' => 'Item Added Successfully',\n ], 200);\n }\n return response()->json([\n 'success' => false,\n 'message' => 'item could not be added'\n ], 400);\n } catch (Exception $ex) {\n return response()->json([\n 'success' => false,\n 'message' => 'Error Occured Adding Items. Ensure the IDs are Valid'\n ], 400);\n }\n }",
"public function store(Request $request)\n {\n // return $request->input();\n //insert to stock table\n $stockModel = Stock::updateOrCreate([\n 'id' => $request->stock_id\n ],[\n 'quantity' => $request->input(\"stocks\"),\n 'threshold' => $request->input(\"threshold\"),\n ]);\n return response()->json([\n 'success' => true,\n 'message' => 'Stock successfully updated.',\n ]);\n }",
"public function store(ProductInsertFormRequest $request)\n {\n \n $id=Product::insertGetId([\n 'name'=>$request->product_name,\n 'cat_id'=>$request->cat_id,\n 'price'=>$request->price,\n 'package_id'=>$request->package_id,\n 'foc_id'=>$request->foc_id,\n 'description'=>$request->description, \n 'img'=>$request->photo,\n 'status'=>1,\n ]);\n \n Stock::create([\n 'product_id'=>$id,\n 'balance'=>0\n ]);\n return redirect('admin/product/create')->with('status','new product has been inserted.');\n }",
"public function store() {\n\t\t//\n\t}",
"public function store() {\n\t\t//\n\t}",
"public function store() {\n\t\t//\n\t}",
"public function store(CreateLogStockRequest $request)\n {\n $input = $request->all();\n\n $logStock = $this->logStockRepository->create($input);\n\n Flash::success('Log Stock saved successfully.');\n\n return redirect(route('logStocks.index'));\n }",
"public function store(Request $request)\n {\n Validator::make($request->all(), [\n 'user_id' => 'required|integer',\n 'category_id' => 'integer|nullable',\n 'pack_id' => 'integer|nullable',\n 'name' => 'required|string|max:50',\n 'shared_code' => 'required|string|max:10',\n 'views' => 'required|integer',\n 'likes' => 'required|integer',\n 'size' => 'required|string|max:20'\n ])->validate();\n\n $sticker = Sticker::create($request->all());\n return new StickerResource($sticker);\n }",
"public function store();",
"public function store();",
"public function store();",
"public function store(Request $request)\n {\n $product = new Product();\n\n $product->name = $request->name;\n $product->unitprice = $request->unitprice;\n $product->description = $request->description;\n $product->provider_id = $request->provider_id;\n \n $product->save();\n\n $storage = new Storage();\n $storage->product_id = $product->id;\n $storage->amount = 0;\n\n $storage->save();\n\n return redirect()->route('providers.index');\n }",
"public function store() {\n \n }",
"public function store()\n\t{\n\t\t\n\t\t//\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store(StoreAccountPayableRequest $request)\n {\n DB::connection('tenant')->beginTransaction();\n\n $supplier = Supplier::findOrFail($request->get('supplier_id'));\n\n $cutOffId = CutOff::where('id', '>', 0)->orderBy('id', 'desc')->first()->id;\n\n $cutOffAccountPayable = new CutOffAccountPayable;\n $cutOffAccountPayable->cut_off_id = $cutOffId;\n $cutOffAccountPayable->chart_of_account_id = $request->get('chart_of_account_id');\n $cutOffAccountPayable->supplier_id = $supplier->id;\n $cutOffAccountPayable->notes = $request->get('notes');\n $cutOffAccountPayable->amount = $request->get('amount');\n $cutOffAccountPayable->save();\n\n DB::connection('tenant')->commit();\n\n return new ApiResource($cutOffAccountPayable);\n }",
"public function store(StoreItemRestockRequest $request)\n {\n // dd($request->all());\n //$itemRestock = ItemRestock::create($request->all());\n\n /* $item = Item::where('id',$request->items[0])->first();\n // dd($item);\n if($request->quantity > $item->stock){\n return redirect()->back()->withErrors\n ('Requested stock is greater than the remaining stock of the item');\n } */\n\n $itemRestock = new ItemRestock();\n $itemRestock->supplier_id = $request->suppliers[0];\n $itemRestock->item_id = $request->items[0];\n $itemRestock->brand_id = $request->brands[0];\n $itemRestock->quantity = $request->quantity;\n $itemRestock->status = 'pending';\n $itemRestock->save();\n \n\n // $itemRestock->suppliers()->sync($request->input('suppliers', []));\n // $itemRestock->items()->sync($request->input('items', []));\n // $itemRestock->brands()->sync($request->input('brands', []));\n\n return redirect()->route('admin.item-restocks.index');\n }",
"public function store(Request $request)\n {\n $this->allowedAdminAction();\n $rules = [\n 'name' => 'required|unique:products',\n 'price' => 'required|numeric',\n 'stock' => 'required|integer'\n ];\n $this->validate($request, $rules);\n $product = Product::create($request->all());\n \n $product->price()->create([\n \"unit_price\" => $request->price\n ]);\n\n $product->inventory()->create([\n \"quantity\" => $request->stock,\n \"stock\" => $request->stock\n ]);\n\n return $this->showOne($product);\n }",
"public function store(Request $request)\n {\n $this->DATABASE::beginTransaction();\n\n if(!$request->number) $request->merge(['number'=> $this->getNextOpnameStockNumber()]);\n\n $opname_stock = OpnameStock::create($request->all());\n\n $rows = $request->opname_stock_items;\n for ($i=0; $i < count($rows); $i++) {\n $row = $rows[$i];\n\n // create item row on the incoming Goods updated!\n $detail = $opname_stock->opname_stock_items()->create($row);\n $label = $detail->item->part_name ?? $detail->item->part_number ?? $detail->item->id;\n if (!$detail->item->enable) $this->error(\"PART [\". $label . \"] DISABLED\");\n\n }\n\n // DB::Commit => Before return function!\n $this->DATABASE::commit();\n return response()->json($opname_stock);\n }",
"public function store() {\n\t}",
"public function store()\n\t {\n\t //\n\t }",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}"
] | [
"0.6651014",
"0.6500205",
"0.6338178",
"0.63096315",
"0.62221825",
"0.60818523",
"0.60506713",
"0.60467315",
"0.5955446",
"0.5908628",
"0.58783823",
"0.58587736",
"0.5839953",
"0.58139014",
"0.5789224",
"0.5766696",
"0.5759095",
"0.57494175",
"0.5732465",
"0.571077",
"0.56933606",
"0.5682201",
"0.56720483",
"0.5653268",
"0.56515735",
"0.5648745",
"0.5635585",
"0.56332713",
"0.56131417",
"0.56131417",
"0.56131417",
"0.5601318",
"0.5600841",
"0.55988234",
"0.55988234",
"0.55988234",
"0.5582192",
"0.5578237",
"0.55773747",
"0.5574874",
"0.5574874",
"0.5574874",
"0.55710113",
"0.5569143",
"0.5563148",
"0.55498284",
"0.5549428",
"0.5546471",
"0.55430657",
"0.55430657",
"0.55430657",
"0.55430657",
"0.55430657",
"0.55430657",
"0.55430657",
"0.55430657",
"0.55430657",
"0.55430657",
"0.55430657",
"0.55430657",
"0.55430657",
"0.55430657",
"0.55430657",
"0.55430657",
"0.55430657",
"0.55430657",
"0.55430657",
"0.55430657",
"0.55430657",
"0.55430657",
"0.55430657",
"0.55430657",
"0.55430657",
"0.55430657",
"0.55430657",
"0.55430657",
"0.55430657",
"0.55430657",
"0.55430657",
"0.55430657",
"0.55430657",
"0.55430657",
"0.55430657",
"0.55430657",
"0.55430657",
"0.55430657",
"0.55430657",
"0.55430657",
"0.55430657",
"0.55430657",
"0.55430657",
"0.55430657",
"0.55430657",
"0.55430657",
"0.55430657",
"0.55430657",
"0.55430657",
"0.55430657",
"0.55430657",
"0.55430657",
"0.55430657"
] | 0.0 | -1 |
Display the specified resource. | public function show($id, Request $request)
{
$class=class_::find($id);
\App\Global_var::logAction($request, 'Viewed class ID '.$class->id.' details');
if($request->ajax())
return view("classes.ajax.show")->with('class', $class);
return view("classes.http.show")->with('class', $class);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Resource $resource)\n {\n // not available for now\n }",
"public function show(Resource $resource)\n {\n //\n }",
"function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }",
"private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }",
"function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}",
"public function show(ResourceSubject $resourceSubject)\n {\n //\n }",
"public function show(ResourceManagement $resourcesManagement)\n {\n //\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function retrieve(Resource $resource);",
"public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }",
"public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function show(Dispenser $dispenser)\n {\n //\n }",
"public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }",
"public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}",
"public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }",
"public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}",
"public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }",
"public function get(Resource $resource);",
"public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }",
"public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }",
"function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}",
"public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }",
"public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }",
"function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}",
"public function edit(Resource $resource)\n {\n //\n }",
"public function show(rc $rc)\n {\n //\n }",
"public function show(Resolucion $resolucion)\n {\n //\n }",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }",
"public function show(Resena $resena)\n {\n }",
"public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}",
"public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }",
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }",
"public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }",
"public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }",
"public function display()\n\t{\n\t\tparent::display();\n\t}",
"public function show()\n\t{\n\t\t\n\t}",
"public function get_resource();",
"function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}",
"public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }",
"public function display($title = null)\n {\n echo $this->fetch($title);\n }",
"public function display(){}",
"public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}",
"public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}",
"public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }",
"public function display() {\n echo $this->render();\n }",
"#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}",
"public function show($id)\n\t{\n\t//\n\t}",
"public function show($id)\n\t{\n\t//\n\t}",
"public function show($id)\n {\n //\n $this->_show($id);\n }",
"function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }",
"public function show()\n\t{\n\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {}",
"static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}",
"public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}",
"public abstract function display();",
"public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }",
"public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"abstract public function resource($resource);",
"public function show(Response $response)\n {\n //\n }",
"public function show()\n {\n return auth()->user()->getResource();\n }",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}"
] | [
"0.8232636",
"0.81890994",
"0.68296117",
"0.64987075",
"0.649589",
"0.64692974",
"0.64633286",
"0.63640857",
"0.6307513",
"0.6281809",
"0.621944",
"0.61926234",
"0.61803305",
"0.6173143",
"0.61398774",
"0.6119022",
"0.61085826",
"0.6106046",
"0.60947937",
"0.6078597",
"0.6047151",
"0.60409963",
"0.6021287",
"0.5989136",
"0.5964405",
"0.5962407",
"0.59518087",
"0.59309924",
"0.5921466",
"0.5908002",
"0.5908002",
"0.5908002",
"0.59051657",
"0.5894554",
"0.5871459",
"0.5870088",
"0.586883",
"0.5851384",
"0.58168566",
"0.58166975",
"0.5815869",
"0.58056176",
"0.5799148",
"0.5795126",
"0.5791158",
"0.57857597",
"0.5783371",
"0.5761351",
"0.57592535",
"0.57587147",
"0.5746491",
"0.57460666",
"0.574066",
"0.5739448",
"0.5739448",
"0.57295275",
"0.57293373",
"0.5729069",
"0.57253987",
"0.57253987",
"0.57253987",
"0.57253987",
"0.57253987",
"0.57253987",
"0.57253987",
"0.57253987",
"0.57253987",
"0.57253987",
"0.57214445",
"0.57149816",
"0.5712036",
"0.5710076",
"0.57073003",
"0.5707059",
"0.5705454",
"0.5705454",
"0.5700382",
"0.56997055",
"0.5693362",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868"
] | 0.0 | -1 |
Show the form for editing the specified resource. | public function edit($id, Request $request)
{
$class=class_::find($id);
if($request->ajax())
return view('classes.ajax.edit')->with('class', $class);
return view('classes.http.edit')->with('class', $class);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function edit()\n {\n return view('hirmvc::edit');\n }",
"public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}",
"public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }",
"public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}",
"public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }",
"public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }",
"private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }",
"public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }",
"public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}",
"public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }",
"public function edit($model, $form);",
"function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}",
"public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}",
"public function edit()\n { \n return view('admin.control.edit');\n }",
"public function edit(Form $form)\n {\n //\n }",
"public function edit()\n {\n return view('common::edit');\n }",
"public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\r\n {\r\n return view('petro::edit');\r\n }",
"public function edit($id)\n {\n // show form edit user info\n }",
"public function edit()\n {\n return view('escrow::edit');\n }",
"public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }",
"public function edit()\n {\n return view('commonmodule::edit');\n }",
"public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit(form $form)\n {\n //\n }",
"public function actionEdit($id) { }",
"public function edit()\n {\n return view('admincp::edit');\n }",
"public function edit()\n {\n return view('scaffold::edit');\n }",
"public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }",
"public function edit()\n {\n return view('Person.edit');\n }",
"public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }",
"public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}",
"public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }",
"public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}",
"public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }",
"public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }",
"public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }",
"function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}",
"public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"protected function _edit(){\n\t\treturn $this->_editForm();\n\t}",
"public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }",
"public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }",
"public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}",
"public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}",
"public function edit($id)\n {\n return view('models::edit');\n }",
"public function edit()\n {\n return view('home::edit');\n }",
"public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }",
"public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }",
"public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }",
"public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('consultas::edit');\n }",
"public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }",
"public function edit()\n {\n return view('dashboard::edit');\n }",
"public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }",
"public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }",
"public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }",
"public function edit() {\n return view('routes::edit');\n }",
"public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }",
"public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('cataloguemodule::edit');\n }",
"public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }",
"public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }",
"public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }",
"public function edit()\n {\n return view('website::edit');\n }",
"public function edit()\n {\n return view('inventory::edit');\n }",
"public function edit()\n {\n return view('initializer::edit');\n }",
"public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }",
"public function edit($id)\n {\n return view('backend::edit');\n }",
"public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }",
"public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }",
"public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}",
"public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }",
"public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }",
"public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }",
"public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }",
"public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}"
] | [
"0.78550774",
"0.7692893",
"0.7273195",
"0.7242132",
"0.7170847",
"0.70622855",
"0.7053459",
"0.6982539",
"0.69467914",
"0.6945275",
"0.6941114",
"0.6928077",
"0.69019294",
"0.68976134",
"0.68976134",
"0.6877213",
"0.68636996",
"0.68592185",
"0.68566656",
"0.6844697",
"0.68336326",
"0.6811471",
"0.68060875",
"0.68047357",
"0.68018645",
"0.6795623",
"0.6791791",
"0.6791791",
"0.6787701",
"0.67837197",
"0.67791027",
"0.677645",
"0.6768301",
"0.6760122",
"0.67458534",
"0.67458534",
"0.67443407",
"0.67425704",
"0.6739898",
"0.6735328",
"0.6725465",
"0.6712817",
"0.6693891",
"0.6692419",
"0.6688581",
"0.66879624",
"0.6687282",
"0.6684741",
"0.6682786",
"0.6668777",
"0.6668427",
"0.6665287",
"0.6665287",
"0.66610634",
"0.6660843",
"0.66589665",
"0.66567147",
"0.66545695",
"0.66527975",
"0.6642529",
"0.6633056",
"0.6630304",
"0.6627662",
"0.6627662",
"0.66192114",
"0.6619003",
"0.66153085",
"0.6614968",
"0.6609744",
"0.66086483",
"0.66060555",
"0.6596137",
"0.65950733",
"0.6594648",
"0.65902114",
"0.6589043",
"0.6587102",
"0.65799844",
"0.65799403",
"0.65799177",
"0.657708",
"0.65760696",
"0.65739626",
"0.656931",
"0.6567826",
"0.65663105",
"0.65660435",
"0.65615267",
"0.6561447",
"0.6561447",
"0.65576506",
"0.655686",
"0.6556527",
"0.6555543",
"0.6555445",
"0.65552044",
"0.65543956",
"0.65543705",
"0.6548264",
"0.65475875",
"0.65447706"
] | 0.0 | -1 |
Update the specified resource in storage. | public function update(Request $request, $id)
{
$class=class_::where('name', '=', $request->name)->first();
if($class!=null && $class->id!=$id){
if($request->ajax())
return ['error', "Duplicate_Entry"];
return back();
}
$this->validate($request, [
'name'=>'required',
'code'=>'required',
]);
$class=class_::find($id);
$class->name=$request->name;
$class->code=$request->code;
$class->description=$request->description;
$class->save();
\App\Global_var::logAction($request, 'Updated class ID '.$class->id.'');
return redirect()->route("classes.show", $id);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }",
"public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }",
"public function update(Request $request, Resource $resource)\n {\n //\n }",
"public function updateStream($resource);",
"public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }",
"protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }",
"public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }",
"public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}",
"public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }",
"public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }",
"protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }",
"public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }",
"public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }",
"public function update($path);",
"public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }",
"public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }",
"public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}",
"public function updateStream($path, $resource, Config $config)\n {\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }",
"public function update($data) {}",
"public function update($data) {}",
"public function putStream($resource);",
"public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function update($entity);",
"public function update($entity);",
"public function setResource($resource);",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }",
"public function isUpdateResource();",
"public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }",
"public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }",
"public function store($data, Resource $resource);",
"public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }",
"public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }",
"public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }",
"public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }",
"public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }",
"public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }",
"public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }",
"public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }",
"public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }",
"public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }",
"public function update(Qstore $request, $id)\n {\n //\n }",
"public function update(IEntity $entity);",
"protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }",
"public function update($request, $id);",
"function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}",
"public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }",
"public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }",
"protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }",
"abstract public function put($data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function testUpdateSupplierUsingPUT()\n {\n }",
"public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }",
"public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }",
"public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }",
"public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }",
"public abstract function update($object);",
"public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }",
"public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }",
"public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }",
"public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }",
"public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }",
"public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }",
"public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }",
"public function update($entity)\n {\n \n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }",
"public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }",
"public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }",
"public function update($id, $input);",
"public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }",
"public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}",
"public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }",
"public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }",
"public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }",
"public function update($id);",
"public function update($id);",
"private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }",
"public function put($path, $data = null);",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }",
"public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }",
"public function update(Entity $entity);",
"public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }",
"public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}",
"public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }",
"public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }",
"public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }"
] | [
"0.7425105",
"0.70612276",
"0.70558053",
"0.6896673",
"0.6582159",
"0.64491373",
"0.6346954",
"0.62114537",
"0.6145042",
"0.6119944",
"0.61128503",
"0.6099993",
"0.6087866",
"0.6052593",
"0.6018941",
"0.60060275",
"0.59715486",
"0.5946516",
"0.59400934",
"0.59377414",
"0.5890722",
"0.5860816",
"0.5855127",
"0.5855127",
"0.58513457",
"0.5815068",
"0.5806887",
"0.57525045",
"0.57525045",
"0.57337505",
"0.5723295",
"0.5714311",
"0.5694472",
"0.5691319",
"0.56879413",
"0.5669989",
"0.56565005",
"0.56505877",
"0.5646085",
"0.5636683",
"0.5633498",
"0.5633378",
"0.5632906",
"0.5628826",
"0.56196684",
"0.5609126",
"0.5601397",
"0.55944353",
"0.5582592",
"0.5581908",
"0.55813426",
"0.5575312",
"0.55717176",
"0.55661047",
"0.55624634",
"0.55614686",
"0.55608666",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55573726",
"0.5556878",
"0.5554201",
"0.5553069",
"0.55530256",
"0.5543788",
"0.55435944",
"0.55412996",
"0.55393505",
"0.55368495",
"0.5535236",
"0.5534954",
"0.55237365",
"0.5520468",
"0.55163723",
"0.55125296",
"0.5511168",
"0.5508345",
"0.55072427",
"0.5502385",
"0.5502337",
"0.5501029",
"0.54995877",
"0.54979175",
"0.54949397",
"0.54949397",
"0.54946727",
"0.5494196",
"0.54941916",
"0.54925025",
"0.5491807",
"0.5483321",
"0.5479606",
"0.5479408",
"0.5478678",
"0.54667485",
"0.5463411",
"0.5460588",
"0.5458525"
] | 0.0 | -1 |
Remove the specified resource from storage. | public function delete($id, Request $request)
{
$class=class_::find($id);
if($request->ajax())
return view('classes.ajax.delete-confirm')->with('class', $class);
return view('classes.http.delete-confirm')->with('class', $class);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }",
"public function destroy(Resource $resource)\n {\n //\n }",
"public function removeResource($resourceID)\n\t\t{\n\t\t}",
"public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }",
"public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }",
"public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }",
"public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }",
"protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }",
"public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }",
"public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }",
"public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}",
"public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}",
"public function delete(): void\n {\n unlink($this->getPath());\n }",
"public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }",
"public function remove($path);",
"function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}",
"public function delete(): void\n {\n unlink($this->path);\n }",
"private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }",
"public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function remove() {}",
"public function remove() {}",
"public function remove();",
"public function remove();",
"public function remove();",
"public function remove();",
"function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}",
"public function deleteImage(){\n\n\n Storage::delete($this->image);\n }",
"public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }",
"public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}",
"public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }",
"public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }",
"public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}",
"public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }",
"public function deleteImage(){\n \tStorage::delete($this->image);\n }",
"public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }",
"public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }",
"public function destroy($id)\n {\n Myfile::find($id)->delete();\n }",
"public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }",
"public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }",
"public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }",
"public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }",
"public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }",
"public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }",
"public function delete($path);",
"public function delete($path);",
"public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }",
"public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }",
"public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }",
"public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }",
"public function delete($path, $data = null);",
"public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }",
"public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }",
"public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }",
"public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }",
"public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }",
"public function del($path){\n\t\treturn $this->remove($path);\n\t}",
"public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }",
"public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}",
"public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }",
"public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }",
"public function revoke($resource, $permission = null);",
"public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }",
"function delete($path);",
"public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}",
"public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }",
"public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }",
"public function remove($filePath){\n return Storage::delete($filePath);\n }",
"public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }",
"public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }",
"public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }",
"public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }",
"function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }",
"public function remove($id);",
"public function remove($id);",
"public function deleted(Storage $storage)\n {\n //\n }",
"public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }",
"public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }",
"public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }",
"public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }",
"function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}",
"public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }",
"public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}",
"public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }",
"public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }"
] | [
"0.6672584",
"0.6659381",
"0.6635911",
"0.6632799",
"0.6626075",
"0.65424126",
"0.65416265",
"0.64648265",
"0.62882507",
"0.6175931",
"0.6129922",
"0.60893893",
"0.6054415",
"0.60428125",
"0.60064924",
"0.59337646",
"0.5930772",
"0.59199584",
"0.5919811",
"0.5904504",
"0.5897263",
"0.58962846",
"0.58951396",
"0.58951396",
"0.58951396",
"0.58951396",
"0.5880124",
"0.58690923",
"0.5863659",
"0.5809161",
"0.57735413",
"0.5760811",
"0.5753559",
"0.57492644",
"0.5741712",
"0.57334286",
"0.5726379",
"0.57144034",
"0.57096",
"0.5707689",
"0.5705895",
"0.5705634",
"0.5703902",
"0.5696585",
"0.5684331",
"0.5684331",
"0.56780374",
"0.5677111",
"0.5657287",
"0.5648262",
"0.5648085",
"0.5648012",
"0.5640759",
"0.5637738",
"0.5629985",
"0.5619264",
"0.56167465",
"0.5606877",
"0.56021434",
"0.5601949",
"0.55992156",
"0.5598557",
"0.55897516",
"0.5581397",
"0.5566926",
"0.5566796",
"0.55642897",
"0.55641",
"0.5556583",
"0.5556536",
"0.5550097",
"0.5543172",
"0.55422723",
"0.5540013",
"0.5540013",
"0.55371785",
"0.55365825",
"0.55300397",
"0.552969",
"0.55275744",
"0.55272335",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.5525997",
"0.5525624",
"0.5523911",
"0.5521122",
"0.5517412"
] | 0.0 | -1 |
Initialise the object load master class | public function __construct (\Benhawker\Pipedrive\Pipedrive $master) {
//associate curl class
$this->curl = $master->curl();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function init()\n\t{\n\t\tforeach (isLoadedClass() as $objName)\n\t\t{\n\t\t\t$this->$objName =& loadClass('', '', $objName);\n\t\t}\n\t}",
"public function __construct() {\n $this->load = new Load();\n $this->model = new Model();\n }",
"private function initLoader() {\n $this->_loader = new Loader();\n\t}",
"public function _init(){}",
"public function __init(){}",
"protected function __construct()\n {\n $this->load();\n }",
"protected function initializeObject() {}",
"public function init(){}",
"public function init(){}",
"function _initialize()\n {\n\n //initalize Loader\n $auto_load=array(\"io\",\"segment\",\"router\");\n \n foreach($auto_load as $library)\n {\n $this->$library=& load_class($library);\n }\n //load loader class\n $this->load =& load_class('Loader');\n \n //call auto load from config file\n $this->load->_auto_load();\n }",
"public function _init() {}",
"public function __construct() {\n $this->loader();\n }",
"public function initializeObject() {}",
"public function initializeObject() {}",
"public function initializeObject() {}",
"public function initializeObject() {}",
"public function initializeObject() {}",
"public function initializeObject() {}",
"public function initializeObject() {}",
"public function initializeObject() {}",
"public function initializeObject() {}",
"public function initializeObject() {}",
"public function initializeObject() {}",
"public function initializeObject() {}",
"public function __construct() {\n $this->load();\n }",
"public static function _init() {\n // this is called upon loading the class\n }",
"abstract public function init();",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function loadInit() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"public function __construct() {\n\t\t\t$this->init();\n\t\t}",
"protected abstract function init();",
"public function init() {\n $bootstrap = $this->getInvokeArg(\"bootstrap\");\n $this->aConfig = $bootstrap->getOptions();\n $this->view->aConfig = $this->aConfig;\n $this->model= new Model_InfoBusiness();\n $this->modelMapper= new Model_InfoBusinessMapper();\n $this->modelProvince = new Model_MasterProvince();\n $this->modelProvinceMapper = new Model_MasterProvinceMapper();\n $this->modelDistrict = new Model_MasterDistrict();\n $this->modelDistrictMapper = new Model_MasterDistrictMapper();\n $this->modelWard = new Model_MasterWard();\n $this->modelWardMapper = new Model_MasterWardMapper();\n }",
"final private function __construct()\n {\n \t$this->init();\n }",
"public function init(){\n\t\t\t\t}",
"public function __construct() {\n $this->init();\n }",
"public function init();",
"public function init();",
"public function init();",
"public function init();",
"public function init();",
"public function init();",
"public function init();",
"public function init();",
"public function init();",
"public function init();",
"public function init();",
"public function init();",
"public function init();",
"public function _init() {\r\n\r\n }",
"abstract protected function init();",
"abstract protected function init();",
"abstract protected function init();",
"abstract protected function init();",
"abstract protected function init();",
"abstract protected function init();",
"public function init()\r\n\t{\r\n\t\t$dbvos = $this;\r\n\r\n\t\t{CLASS_LIST}\r\n\t\t\t\r\n\t\t$this->_loaded = true;\r\n\t}",
"public function init() {\n\t\t// Overwrite/Extend in Sub-classes do not add anything here!\n\t\t// Use __constructor() or another method in __constructor().\n\t}",
"public function init()\n {\n parent::init();\n $this->initClass();\n }",
"public function __construct() {\n\t\t$this->init();\n\t}",
"public function init(){\n\t\t}",
"protected function __construct()\n\t\t{\n\t\t\t$this->init();\n\t\t}",
"protected function __construct()\n\t\t{\n\t\t\t$this->init();\n\t\t}",
"abstract protected function _init();",
"abstract protected function _init();",
"public function __construct()\n\t{\n\t\tforeach(Config::item('core.preload') as $type => $load)\n\t\t{\n\t\t\tif ($load == FALSE) continue;\n\n\t\t\tforeach(explode(',', $load) as $name)\n\t\t\t{\n\t\t\t\tif (($name = trim($name)) == FALSE) continue;\n\n\t\t\t\tswitch($type)\n\t\t\t\t{\n\t\t\t\t\tcase 'libraries':\n\t\t\t\t\t\tif ($name == 'database')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->database();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->library($name);\n\t\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'models':\n\t\t\t\t\t\t$this->model($name);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public static function init() {\n\n\t\t$class = new self();\n\t\t$class->setup();\n\n\t}",
"public function init()\n {\n \t\n }",
"public function init()\n {\n \t\n }",
"function __construct()\n\t{\n\t\t$this->load = new Load();\n\t\t$this->model = new Model();\n\n\t\t$this->home();\n\t}",
"function _construct() {\n \t\n\t\t\n\t}"
] | [
"0.7666611",
"0.75359136",
"0.747063",
"0.7437886",
"0.7409292",
"0.73910457",
"0.73803306",
"0.73627204",
"0.73627204",
"0.734817",
"0.7255252",
"0.724315",
"0.7217477",
"0.7217477",
"0.7217477",
"0.7217477",
"0.7217477",
"0.7217477",
"0.7217477",
"0.7217477",
"0.7217477",
"0.7216736",
"0.7216736",
"0.7216736",
"0.71402",
"0.71347475",
"0.71209437",
"0.71147794",
"0.71147794",
"0.71147794",
"0.71147794",
"0.71147794",
"0.7112851",
"0.7112851",
"0.7112851",
"0.7112851",
"0.7112851",
"0.7112851",
"0.7112851",
"0.7112851",
"0.7112851",
"0.7112851",
"0.7112851",
"0.7112851",
"0.7112851",
"0.7112851",
"0.7112851",
"0.7111029",
"0.70964134",
"0.70964134",
"0.70964",
"0.70964",
"0.70964",
"0.70964",
"0.70964",
"0.70964",
"0.70963484",
"0.70963484",
"0.70963484",
"0.70963484",
"0.7094855",
"0.7084906",
"0.708445",
"0.7054589",
"0.70410085",
"0.7034203",
"0.7017052",
"0.7017052",
"0.7017052",
"0.7017052",
"0.7017052",
"0.7017052",
"0.7017052",
"0.7017052",
"0.7017052",
"0.7017052",
"0.7017052",
"0.7017052",
"0.7017052",
"0.7011416",
"0.6993327",
"0.6993327",
"0.6993327",
"0.6993327",
"0.6993327",
"0.6993327",
"0.69897705",
"0.69896805",
"0.6976418",
"0.69741935",
"0.69733894",
"0.69708043",
"0.69708043",
"0.69670016",
"0.69670016",
"0.69563204",
"0.6944032",
"0.69403046",
"0.69403046",
"0.6936957",
"0.69301224"
] | 0.0 | -1 |
Returns all deal fields | public function getAll () {
return $this->curl->get('activityTypes')['data'];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function fields()\n {\n $fullResult = $this->client->call(\n 'crm.dealcategory.fields'\n );\n return $fullResult;\n }",
"public function getAllFields();",
"public function getFields();",
"public function getFields();",
"public function getFields();",
"public function getFields();",
"public function getFields();",
"public function getFields();",
"public function getFields() {}",
"public function getFields() {}",
"public function getFields() {}",
"public function fetchFields();",
"public function getAllFields()\n {\n return $this->fields;\n }",
"public function fields()\n {\n $fullResult = $this->client->call(\n 'crm.invoice.fields'\n );\n return $fullResult;\n }",
"function getFields();",
"public static function get_fields()\n {\n }",
"protected function get_fields() {\n\t\treturn rwmb_get_registry( 'field' )->get_by_object_type( 'post' );\n\t}",
"public function fetch_fields() {}",
"abstract public function getFields();",
"abstract public function getFields();",
"function get_fields() {\n global $Tainacan_Item_Metadata;\n return $Tainacan_Item_Metadata->fetch($this, 'OBJECT');\n\n }",
"function get_fields( ) {\n\t\treturn $this->fields_list;\n\t\t}",
"public function getFields(){\n return $this->dbFields;\n }",
"public function fields();",
"public function fields();",
"public function fields();",
"public function fields();",
"public function fields();",
"public function getFieldsList(){\n return $this->_get(1);\n }",
"public function fields(){\n\t\treturn array();\n\t}",
"protected function getFields()\n {\n return $this->fields;\n }",
"protected function getFields()\n {\n return $this->fields;\n }",
"abstract protected function getFields();",
"protected function getFields()\n {\n return $this->Fields;\n }",
"public function getFields(){\n\t\treturn $this->Fields;\n\t}",
"public function getContactDataFields();",
"final public function getAllFields()\r\n {\r\n return array($this->_field);\r\n }",
"public function get_fields() {\n return $this->fields;\n }",
"public function getFields()\r\n {\r\n return $this->fields;\r\n }",
"public function fields()\r\n {\r\n return $this->fields;\r\n }",
"public function get_fields() {\r\n\t\treturn $this->fields;\r\n\t}",
"public function fields() {\n return $this->fields;\n }",
"public function getListFields();",
"public function fields()\n {\n return $this->hasManyThrough(Field::class, FieldGroup::class, 'category_id', 'group_id');\n }",
"public function &getFields();",
"public function getFields()\n {\n return $this->fields;\n }",
"public function getFields()\n {\n return $this->fields;\n }",
"public function getFields()\n {\n return $this->fields;\n }",
"public function getFields()\n {\n return $this->fields;\n }",
"public function getFields()\n {\n return $this->fields;\n }",
"public function getFields()\n {\n return $this->fields;\n }",
"public function getFields()\n {\n return $this->fields;\n }",
"public function getFields()\n {\n return $this->fields;\n }",
"public function getFields()\n {\n return $this->fields;\n }",
"public function getFields()\n {\n return $this->fields;\n }",
"public function getFields()\n {\n return $this->fields;\n }",
"function GetFieldsList()\n\t{\n\t\tglobal $dal_info;\n\t\treturn array_keys( $dal_info[ $this->infoKey ] );\n\t}",
"public function get_fields() {\n\t\treturn $this->fields;\n\t}",
"public function getFields()\n {\n if ($this->fields) {\n return $this->fields;\n }\n\n $this->fields = array(\n 'data_type_id',\n 'name',\n 'aliases',\n 'description',\n 'driver',\n );\n\n return $this->fields;\n }",
"public function getAllFields() {\n\t\t\t// Database Connection\n\t\t\t$db\t\t\t\t= $GLOBALS['db_q'];\n\t\t\t// Initialize variables\n\t\t\t$return\t\t\t= false;\n\t\t\t// Query set up\t\n\t\t\t$table\t\t\t= 'tb_field';\n\t\t\t$select_what\t= 'id, vc_field AS vc_name';\n\t\t\t$conditions\t\t= \"1 ORDER BY vc_field ASC\";\n\t\t\t$return\t\t\t= $db->getAllRows_Arr($table, $select_what, $conditions);\n\t\t\t// Return\n\t\t\treturn $return;\n\t\t}",
"private function _fields() {\n if ($this->_table() && empty($this->fields)) {\n $this->fields = $this->db->list_fields($this->_table());\n }\n return $this->fields;\n }",
"public function fields()\n {\n return $this->fields;\n }",
"public function fields()\n {\n return $this->fields;\n }",
"public function getFields()\n\t{\n\t\treturn $this->fields;\n\t}",
"public function getFields()\n\t{\n\t\treturn $this->fields;\n\t}",
"public function &getFields() { return $this->fields; }",
"public function fields()\n {\n return [ \n ];\n }",
"public function all_fields() {\n\t\t$general_fields = $this->general_fields();\n\t\t$promo_fields = $this->promotional_fields();\n\t\t$script_fields = $this->scripts_fields();\n\t\t$all_fields = array_merge( $general_fields, $promo_fields, $script_fields );\n\t\treturn $all_fields;\n\t}",
"public function getFields() {\n\t\treturn $this->fields;\n\t}",
"public function getFields() {\n\t\treturn $this->fields;\n\t}",
"public function getFields()\n\t\t{\n\t\t\treturn $this->fields;\n\t\t}",
"public function all_fields()\n {\n $allfields = array();\n foreach (array_values($this->CLASS_CONTAINER) as $val){\n $allfields = array_merge($allfields, $this->{$val});\n }\n foreach (array_values($this->singular_fields) as $val){\n if($this->{$val}) {\n $allfields[] = $this->{$val};\n }\n }\n\n return $allfields;\n }",
"public static function getFields(){\n\t\treturn self::$fields;\n\t}",
"public function getFields()\n {\n return $this->_fields;\n }",
"public function getFields()\n {\n return $this->_fields;\n }",
"public function getFields()\n {\n return $this->content->getFields();\n }",
"public function bankdetailFields()\n {\n $fullResult = $this->client->call(\n 'crm.requisite.bankdetail.fields'\n );\n return $fullResult;\n }",
"public function fields()\n {\n return [];\n }",
"public function fields()\n {\n return [];\n }",
"public function fields()\n {\n return [];\n }",
"public function fields()\n {\n return [];\n }",
"public function fields()\n {\n return [];\n }",
"public function getFrontendFields();",
"public function getFieldsForExport()\n {\n return $this->fields;\n }",
"public function getFieldsForExport()\n {\n return $this->fields;\n }",
"public function getFields()\n\t{\n\t\treturn $this->_fields;\n\t}",
"function fields()\n\t{\n\t\treturn $this->_fields;\n\t}",
"public static function fields()\n {\n return [\n 'p.entity_id as entity_id',\n 'p.rebates as rebates',\n 'p.name',\n 'a.name as first_category_name',\n 'b.name as second_category_name',\n 'c.name as third_category_name',\n 'd.sort as wholesaler_weight',\n 'p.status',\n 'p.commission',\n 'p.label1',\n 'p.type',\n 'p.type2',\n 'p.sales_type',\n 'br.sort as brand_weight',\n 'promotion_text',\n 'lsin',\n 'barcode',\n 'wholesaler_id',\n 'first_category_id',\n 'second_category_id',\n 'third_category_id',\n 'brand',\n 'package_num',\n 'package_spe',\n 'state',\n 'sort_weights',\n 'sold_qty',\n 'price',\n 'special_price',\n 'rule_id',\n 'special_from_date',\n 'special_to_date',\n 'promotion_text_from',\n 'promotion_text_to',\n 'real_sold_qty',\n 'qty',\n 'minimum_order',\n 'gallery',\n 'export',\n 'origin',\n 'package',\n 'specification',\n 'shelf_life',\n 'description',\n 'production_date',\n 'restrict_daily',\n 'subsidies_lelai',\n 'subsidies_wholesaler',\n 'promotion_title_from',\n 'promotion_title_to',\n 'promotion_title',\n 'sales_attribute_name',\n 'sales_attribute_value',\n 'specification_num',\n 'specification_unit',\n 'fake_sold_qty',\n 'special_rebates_from',\n 'special_rebates_to',\n 'special_rebates_lelai_from',\n 'special_rebates_lelai_to',\n 'special_rebates_lelai',\n 'special_rebates',\n 'is_calculate_lelai_rebates',\n 'rebates_lelai',\n 'shelf_from_date',\n 'shelf_to_date',\n ];\n }",
"public function getFields() {\n return null;\n }",
"protected function fetchFields(){\n $fields = X3::db()->fetchFields($this->modelName);\n $_res = array();\n foreach($fields as $name=>$field){\n $dataType = X3_MySQL_Command::parseMySQLField($field);\n $_res[$name] = $dataType;\n }\n return $_res;\n }",
"public function getFields()\n\t{\n\t\treturn [];\n\t}",
"public static function getFields() {\n return self::$fields;\n }",
"public function schemaFields() { \n return $this->allFieldsArray;\n }",
"public function schemaFields() { \n return $this->allFieldsArray;\n }",
"public function get_fields()\n {\n return [\n \"isys_catg_invoice_list__denotation\" => \"LC__CMDB__CATG__TITLE\",\n \"isys_catg_invoice_list__amount\" => \"LC__CMDB__CATG__INVOICE__AMOUNT\",\n \"isys_catg_invoice_list__date\" => \"LC__CMDB__CATG__INVOICE__DATE\",\n \"isys_catg_invoice_list__edited\" => \"LC__CMDB__CATG__INVOICE__EDITED\",\n \"isys_catg_invoice_list__financial_accounting_delivery\" => \"LC__CMDB__CATG__INVOICE__FINANCIAL_ACCOUNTING_DELIVERY\",\n \"isys_catg_invoice_list__charged\" => \"LC__CMDB__CATG__INVOICE__CHARGED\",\n ];\n }",
"abstract public function fields();",
"public function fields() : DeepList {\n return $this->_fields;\n }",
"public function fields()\n {\n return array_map(\n function (array $field) {\n return Field::fromArray($field);\n },\n $this->client->get('field')\n );\n }",
"public function getFields() : FieldCollection;",
"public function getFields()\n {\n return $this->getForm()->getFields();\n }",
"public function getFields() {\n\t\treturn array(\n\t\t\tself::FIELD_ID,\n\t\t\tself::FIELD_NAME,\n\t\t\tself::FIELD_CREATED_AT,\n\t\t);\n\t}"
] | [
"0.8010159",
"0.72911024",
"0.72807866",
"0.72807866",
"0.72807866",
"0.72807866",
"0.72807866",
"0.72807866",
"0.72694916",
"0.72694916",
"0.72694916",
"0.7191081",
"0.7184701",
"0.70982695",
"0.7067732",
"0.7056357",
"0.702339",
"0.700812",
"0.70059806",
"0.70059806",
"0.70032036",
"0.69754076",
"0.6941409",
"0.6918935",
"0.6918935",
"0.6918935",
"0.6918935",
"0.6918935",
"0.69167167",
"0.6896798",
"0.688619",
"0.688619",
"0.68542373",
"0.6853558",
"0.6843672",
"0.6821651",
"0.6804741",
"0.67977804",
"0.67906845",
"0.67890704",
"0.67868197",
"0.6773115",
"0.67701495",
"0.67691624",
"0.67607486",
"0.6758446",
"0.6758446",
"0.6758446",
"0.6758446",
"0.6758446",
"0.6758446",
"0.6758446",
"0.6758446",
"0.6758446",
"0.6758446",
"0.6758446",
"0.6758165",
"0.67577636",
"0.67421085",
"0.6740788",
"0.6736399",
"0.67361784",
"0.67361784",
"0.6719017",
"0.6719017",
"0.6718344",
"0.6714825",
"0.6703983",
"0.66886204",
"0.66886204",
"0.66879916",
"0.66757977",
"0.66663456",
"0.6663372",
"0.6663372",
"0.66628075",
"0.66494125",
"0.66477215",
"0.66477215",
"0.66477215",
"0.66477215",
"0.66477215",
"0.66452485",
"0.66404486",
"0.66404486",
"0.6630355",
"0.6625058",
"0.66138864",
"0.6589939",
"0.65822566",
"0.657955",
"0.6570486",
"0.6570251",
"0.6570251",
"0.65506804",
"0.6549703",
"0.65475374",
"0.6545284",
"0.65433747",
"0.6540206",
"0.6538678"
] | 0.0 | -1 |
Function handle Handles a request and produces a response. May call other collaborating code to generate the response. | public function handle(
ServerRequestInterface $request,
ResponseInterface $response,
callable $next = null
) : ResponseInterface; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public function handle_request();",
"public function handleRequest($request)\n {\n list ($route, $params) = $request->resolve();\n $this->requestedRoute = $route;\n $result = $this->runAction($route, $params);\n\n if ($result instanceof Response) {\n return $result;\n } elseif ($result instanceof Looper){\n $result->loop();\n\n $response = $this->getResponse();\n $response->exitStatus = 0;\n\n return $response;\n } else {\n $response = $this->getResponse();\n $response->exitStatus = $result;\n\n return $response;\n }\n }",
"protected abstract function handleRequest();",
"function handle(Request $request = null, Response $response = null);",
"public function handleRequest();",
"public function handleRequest();",
"public function handleRequest();",
"public function handle($request)\n {\n $this->setRouter($this->app->compose('Cygnite\\Base\\Router\\Router', $request), $request);\n\n try {\n $response = $this->sendRequestThroughRouter($request);\n /*\n * Check whether return value is a instance of Response,\n * otherwise we will try to fetch the response form container,\n * create a response and return to the browser.\n *\n */\n if (!$response instanceof ResponseInterface && !is_array($response)) {\n $r = $this->app->has('response') ? $this->app->get('response') : '';\n $response = Response::make($r);\n }\n } catch (\\Exception $e) {\n $this->handleException($e);\n } catch (Throwable $e) {\n $this->handleException($e);\n }\n\n return $response;\n }",
"final public function handle()\n {\n \n $this->_preHandle();\n \n if ($this->_request->getActionName() == null) {\n throw new ZendL_Tool_Endpoint_Exception('Endpoint failed to setup the action name.');\n }\n\n if ($this->_request->getProviderName() == null) {\n throw new ZendL_Tool_Endpoint_Exception('Endpoint failed to setup the provider name.');\n }\n \n ob_start();\n \n try {\n $dispatcher = new ZendL_Tool_Rpc_Endpoint_Dispatcher();\n $dispatcher->setRequest($this->_request)\n ->setResponse($this->_response)\n ->dispatch();\n \n } catch (Exception $e) {\n //@todo implement some sanity here\n die($e->getMessage());\n //$this->_response->setContent($e->getMessage());\n return;\n }\n \n if (($content = ob_get_clean()) != '') {\n $this->_response->setContent($content);\n }\n \n $this->_postHandle();\n }",
"abstract public function handleRequest($request);",
"public function handle(): void\n {\n $globals = $_SERVER;\n //$SlimPsrRequest = ServerRequestFactory::createFromGlobals();\n //it doesnt matters if the Request is of different class - no need to create Guzaba\\Http\\Request\n $PsrRequest = ServerRequestFactory::createFromGlobals();\n //the only thing that needs to be fixed is the update the parsedBody if it is NOT POST & form-fata or url-encoded\n\n\n //$GuzabaPsrRequest =\n\n //TODO - this may be reworked to reroute to a new route (provided in the constructor) instead of providing the actual response in the constructor\n $DefaultResponse = $this->DefaultResponse;\n //TODO - fix the below\n// if ($PsrRequest->getContentType() === ContentType::TYPE_JSON) {\n// $DefaultResponse->getBody()->rewind();\n// $structure = ['message' => $DefaultResponse->getBody()->getContents()];\n// $json_string = json_encode($structure, JSON_UNESCAPED_SLASHES);\n// $StreamBody = new Stream(null, $json_string);\n// $DefaultResponse = $DefaultResponse->\n// withBody($StreamBody)->\n// withHeader('Content-Type', ContentType::TYPES_MAP[ContentType::TYPE_JSON]['mime'])->\n// withHeader('Content-Length', (string) strlen($json_string));\n// }\n\n $FallbackHandler = new RequestHandler($DefaultResponse);//this will produce 404\n $QueueRequestHandler = new QueueRequestHandler($FallbackHandler);//the default response prototype is a 404 message\n foreach ($this->middlewares as $Middleware) {\n $QueueRequestHandler->add_middleware($Middleware);\n }\n $PsrResponse = $QueueRequestHandler->handle($PsrRequest);\n $this->emit($PsrResponse);\n\n }",
"public function handle($request);",
"public function handleRequest() {}",
"private function responseHandle() {\n // call hook function\n is_callable(config('hooks.onResponse')) && call_user_func(config('hooks.onResponse'), $this);\n // response data\n $this->responder->output();\n }",
"function handleRequest() ;",
"public function process(Request $request, Response $response, RequestHandlerInterface $handler);",
"public function handleRequest(Request $request, Response $response);",
"final public function handle(Request $request)\n {\n $response = $this->process($request);\n if (($response === null) && ($this->successor !== null)) {\n $response = $this->successor->handle($request);\n }\n\n return $response;\n }",
"abstract public function handle(ServerRequestInterface $request): ResponseInterface;",
"public function handleRequest()\n\t{\n\t\t$fp = $this->fromRequest();\n\t\treturn $fp->render();\n\t}",
"abstract public function handleRequest(Request $request);",
"public function handle(Request $request): Response;",
"public function handle(array $request);",
"public function handleRequest ()\n\t{\n\t\t$this->version = '1.0';\n\t\t$this->id = NULL;\n\n\t\tif ($this->getProperty(self::PROPERTY_ENABLE_EXTRA_METHODS))\n\t\t\t$this->publishExtraMethods();\n\n\t\tif ($_SERVER['REQUEST_METHOD'] == 'POST')\n\t\t{\n\n\t\t\t$json = file_get_contents('php://input');\n\t\t\t$request = \\json_decode($json);\n\n\t\t\tif (is_array($request))\n\t\t\t{\n\t\t\t\t// Multicall\n\t\t\t\t$this->version = '2.0';\n\n\t\t\t\t$response = array();\n\t\t\t\tforeach ($request as $singleRequest)\n\t\t\t\t{\n\t\t\t\t\t$singleResponse = $this->handleSingleRequest($singleRequest, TRUE);\n\t\t\t\t\tif ($singleResponse !== FALSE)\n\t\t\t\t\t\t$response[] = $singleResponse;\n\t\t\t\t}\n\n\t\t\t\t// If all methods in a multicall are notifications, we must not return an empty array\n\t\t\t\tif (count($response) == 0)\n\t\t\t\t\t$response = FALSE;\n\t\t\t}\n\t\t\telse if (is_object($request))\n\t\t\t{\n\t\t\t\t$this->version = $this->getRpcVersion($request);\n\t\t\t\t$response = $this->handleSingleRequest($request);\n\t\t\t}\n\t\t\telse\n\t\t\t\t$response = $this->formatError(self::ERROR_INVALID_REQUEST);\n\t\t}\n\t\telse if ($_SERVER['PATH_INFO'] != '')\n\t\t{\n\t\t\t$this->version = '1.1';\n\t\t\t$this->id = NULL;\n\n\t\t\t$method = substr($_SERVER['PATH_INFO'], 1);\n\t\t\t$params = $this->convertFromRpcEncoding($_GET);\n\n\t\t\tif (!$this->hasMethod($method))\n\t\t\t\t$response = $this->formatError(self::ERROR_METHOD_NOT_FOUND);\n\t\t\telse\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tRpcResponse::setWriter(new JsonRpcResponseWriter($this->version, $this->id));\n\t\t\t\t\t$res = $this->invoke($method, $params);\n\t\t\t\t\tif ($res instanceof JsonRpcResponseWriter)\n\t\t\t\t\t{\n\t\t\t\t\t\t$res->finalize();\n\t\t\t\t\t\t$resposne = FALSE;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\t$response = $this->formatResult($res);\n\t\t\t\t}\n\t\t\t\tcatch (\\Exception $exception)\n\t\t\t\t{\n\t\t\t\t\t$response = $this->formatException($exception);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$response = $this->formatError(self::ERROR_PARSE_ERROR);\n\t\t}\n\n\t\tif (!headers_sent())\n\t\t{\n\t\t\theader('Content-Type: application/json', TRUE);\n\t\t\theader('Cache-Control: nocache', TRUE);\n\t\t\theader('Pragma: no-cache', TRUE);\n\t\t}\n\n\t\tif ($response !== FALSE)\n\t\t{\n\t\t\t$result = \\json_encode($this->convertToRpcEncoding($response));\n\n\t\t\tif ($result === FALSE)\n\t\t\t\terror_log(var_export($response, TRUE));\n\t\t\telse\n\t\t\t\techo($result);\n\t\t}\n\t}",
"protected function _handle()\n {\n return $this\n ->_addData('post', $_POST)\n ->_addData('get', $_GET)\n ->_addData('server', $_SERVER)\n ->_handleRequestRoute();\n }",
"public function handle(Request $request);",
"public static function handleRequest($request)\r\n {\r\n // Load controller for requested resource\r\n $controllerName = ucfirst($request->getRessourcePath()) . 'Controller';\r\n\r\n if (class_exists($controllerName))\r\n {\r\n $controller = new $controllerName();\r\n\r\n // Get requested action within controller\r\n $actionName = strtolower($request->getHTTPVerb()) . 'Action';\r\n\r\n if (method_exists($controller, $actionName))\r\n {\r\n // Do the action!\r\n $result = $controller->$actionName($request);\r\n\r\n // Send REST response to client\r\n $outputHandlerName = ucfirst($request->getFormat()) . 'OutputHandler';\r\n\r\n if (class_exists($outputHandlerName))\r\n {\r\n $outputHandler = new $outputHandlerName();\r\n $outputHandler->render($result);\r\n }\r\n }\r\n }\r\n }",
"public function handle()\n {\n /** @var $responses AbstractResponse[] */\n $responses = [];\n try {\n $result = $this->requestFactory->forge();\n $requests = $result[0];\n $isBatch = $result[1];\n } catch (JsonRpcException $e) {\n $responses[] = new ErrorResponse(null, $e);\n $isBatch = false;\n }\n if (isset($requests)) {\n foreach ($requests as $request) {\n if ($request instanceof Request) {\n $error = null;\n try {\n foreach ($this->middlewares as $callable) {\n $callable($request);\n }\n $result = call_user_func_array([$this->app, $request->getMethod()], $request->getParams());\n if ($request->getId() !== false) {\n $responses[] = new SuccessResponse($request->getId(), $result);\n }\n } catch (\\BadMethodCallException $e) {\n $error = new MethodNotFoundException($e->getMessage());\n } catch (JsonRpcException $e) {\n $error = $e;\n } catch (\\Exception $e) {\n $error = new InternalException($e->getMessage());\n }\n if ($error !== null) {\n $responses[] = new ErrorResponse($request->getId(), $error);\n }\n } else {\n $responses[] = new ErrorResponse(null, $request);\n }\n }\n }\n if (!empty($responses) && isset($isBatch)) {\n if (sizeof($responses) == 1 && $isBatch === false) {\n $output = $responses[0]->jsonify();\n } else {\n $responses = array_map(\n function (AbstractResponse $response) {\n return $response->jsonify();\n },\n $responses\n );\n $output = sprintf('[%s]', implode(',', $responses));\n }\n }\n\n return isset($output) ? $output : null;\n }",
"public function process(Aloi_Serphlet_Application_HttpRequest $request, Aloi_Serphlet_Application_HttpResponse $response) {\r\n\r\n\t\ttry {\r\n\t\t\t// Identify the path component we will use to select a mapping\r\n\t\t\t$path = $this->processPath($request, $response);\r\n\t\t\tif (is_null($path)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (self::$log->isDebugEnabled()) {\r\n\t\t\t\tself::$log->debug('Processing a \"' . $request->getMethod() . '\" for path \"' . $path . '\"');\r\n\t\t\t}\r\n\r\n\t\t\t// Select a Locale for the current user if requested\r\n\t\t\t$this->processLocale($request, $response);\r\n\r\n\t\t\t// Set the content type and no-caching headers if requested\r\n\t\t\t$this->processContent($request, $response);\r\n\t\t\t$this->processNoCache($request, $response);\r\n\r\n\t\t\t// General purpose preprocessing hook\r\n\t\t\tif (!$this->processPreprocess($request, $response)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t//Identify the mapping for this request\r\n\t\t\t$mapping = $this->processMapping($request, $response, $path);\r\n\t\t\tif (is_null($mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Check for any role required to perform this action\r\n\t\t\tif (!$this->processRoles($request, $response, $mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Process any ActionForm bean related to this request\r\n\t\t\t$form = $this->processActionForm($request, $response, $mapping);\r\n\t\t\t$this->processPopulate($request, $response, $form, $mapping);\r\n\t\t\tif (!$this->processValidate($request, $response, $form, $mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Process a forward or include specified by this mapping\r\n\t\t\tif (!$this->processForward($request, $response, $mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (!$this->processInclude($request, $response, $mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Create or acquire the Action instance to process this request\r\n\t\t\t$action = $this->processActionCreate($request, $response, $mapping);\r\n\t\t\tif (is_null($action)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Call the Action instance itself\r\n\t\t\t$forward = $this->processActionPerform($request, $response, $action, $form, $mapping);\r\n\r\n\t\t\t// Process the returned ActionForward instance\r\n\t\t\t$this->processForwardConfig($request, $response, $forward);\r\n\t\t} catch (ServletException $e) {\r\n\t\t\tthrow $e;\r\n\t\t}\r\n\t}",
"public function handle(ServerRequestInterface $request);",
"protected function handle(Request $request) {}",
"function handleRequest($request, &$response){ \n switch($request->getHeader($HEADER_CONTENT_TYPE)){\n case $CONTENT_TYPE_JSON:\n if(json_decode($request)!=null){ // basic JSON validation\n $response->getBody()->write($SAMPLE_RESPONSE_JSON);\n $response->withHeader($HEADER_CONTENT_TYPE, $CONTENT_TYPE_JSON);\n $response->withStatus(200, $STATUS_REASON_200);\n }else\n $response->withStatus(400, $STATUS_REASON_400);\n break;\n case $CONTENT_TYPE_HTML:\n $response->getBody()->write($SAMPLE_RESPONSE_HTML);\n $response->withHeader($HEADER_CONTENT_TYPE, $CONTENT_TYPE_HTML);\n $response->withStatus(200, $STATUS_REASON_200);\n break;\n // other content types can be added as needed\n default:\n $response->withStatus(400, $STATUS_REASON_400);\n }\n}",
"public function processRequest() {\r\n switch($this->requestMethod) {\r\n case 'GET':\r\n if($this->id) {\r\n $response = $this->get($this->id);\r\n }\r\n else {\r\n $response = $this->getAll();\r\n }\r\n break;\r\n case 'POST':\r\n $response = $this->create();\r\n break;\r\n case 'PUT':\r\n $response = $this->update($this->id);\r\n break;\r\n case 'DELETE':\r\n $response = $this->delete($this->id);\r\n break;\r\n case 'OPTIONS':\r\n break;\r\n default:\r\n $response = $this->notFoundResponse();\r\n break;\r\n }\r\n\r\n header($response['status_code_header']);\r\n\r\n // If there is a body then echo it\r\n if($response['body']) {\r\n echo $response['body'];\r\n }\r\n }",
"public function handle()\n {\n\t //PROCESS FOR QUESTION 4:\n //Single request with error handling:\n \n //Create handler with curl\n $curl = new CurlMultiHandler;\n\t\t$handler = HandlerStack::create($curl);\n\t\t\n\t\t//create client and set custom handler\n\t\t$client = new Client(['handler' => $handler]);\n\t\t\n\t\t$promise = $client->requestAsync('POST', 'https://atomic.incfile.com/fakepost');\n\t\t$promise->then(\n\t\t function (ResponseInterface $result) {\n\t\t\t //Handle success here\n\t\t\t \n\t\t Log::info(\"Correct request\");\n\t\t },\n\t\t function (RequestException $exception) {\n\t\t //Handle error here\n\t\t \n\t\t $error_status_code = \"There was an error with status code: \" . $exception->getResponse()->getStatusCode();\n\t\t\t\t$error_description = \", the error was: \\n\\n\" . $exception->getMessage();\n\t\t\t\t\n\t\t\t\t$error_complete_msg = $error_status_code . $error_description;\n\t\t \n\t\t Log::error($error_complete_msg);\n\t\t }\n\t\t);\n\t\t\n\t\t//this will ensure the reliable delivery of the request\n\t\twhile ($promise->getState() === 'pending') {\n\t\t $curl->tick();\n\t\t \n\t\t //do stuff\n\t\t}\n\t\t\n\t\t//This next line loses kind of a little bit the point of \"asynchrousness\" for only one request: $promise->wait();\n\t\t\n\t\t\n\t\t\n\t\t//------------------------------//\n\t\t\n\t\t\n\t\t//PROCESS FOR QUESTION 5:\n\t\t//Multiple requests with error handling:\n\t\t\n\t\t//This is the number of requests, here you would put the 100k requests\n\t\t$total = 50;\n\t\t$client = new Client();\t\n\t\t\n\t\t//Segment the number of requests in order to not overload the server\n\t\t$concurrency = 10;\n\t\t\n\t\t$pool = new Pool($client, $this->requestGenerator($total), [\n\t\t 'concurrency' => $concurrency,\n\t\t 'fulfilled' => function (Response $response, $index) {\n\t\t\t //Handle success here\n\t\t\t \n\t\t Log::info(\"Correct request\");\n\t\t },\n\t\t 'rejected' => function (RequestException $exception, $index) {\n\t\t\t //Handle error here\n\t\t\t \n\t\t\t\t$error_index = \"There was an error in the request number: \" . ($index + 1) . \", \";\n\t\t\t\t$error_status_code = \"with status code: \" . $exception->getResponse()->getStatusCode();\n\t\t\t\t$error_description = \", the error was: \\n\\n\" . $exception->getMessage();\n\t\t\t\t$error_separator = \"\\n ------------- \\n\";\n\t\t\t\t\n\t\t\t\t$error_complete_msg = $error_index . $error_status_code . $error_description . $error_separator;\n\t\t\t \n\t\t\t\tLog::error($error_complete_msg);\n\t\t\t\t\n\t\t },\n\t\t]);\n\t\t\n\t\t// Start transfers and create promise\n\t\t$promise = $pool->promise();\n\t\t\n\t\t// Force ALL requests to complete.\n\t\t$promise->wait();\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t/*\n\t\t\tYou could also dispatch a queued job for this question 5, \n\t\t\tbut I think that for this case that involves sending HTTP requests (sending email would be a better use, for example), \n\t\t\tqueuing this process loses a bit of sense because the requests are being sent in the\n\t\t\tabove code asynchronously already, so I'll be running an asynchronous process ( the promise ) in an asynchronous way ( queue ):\n\t\t*/\n\t\t\n\t\t\n\t\t//Job sent to a queue called \"requests\", in this case, I'll be using database driver:\n\t\tSendRequests::dispatch()->onQueue('requests');\n\t\t\n\t\t\n }",
"public function serve()\n {\n Log::debug('Request received:', [\n 'Method' => $this->request->getMethod(),\n 'URI' => $this->request->getRequestUri(),\n 'Query' => $this->request->getQueryString(),\n 'Protocal' => $this->request->server->get('SERVER_PROTOCOL'),\n 'Content' => $this->request->getContent(),\n ]);\n\n $this->validate($this->token);\n\n if ($str = $this->request->get('echostr')) {\n Log::debug(\"Output 'echostr' is '$str'.\");\n\n return new Response($str);\n }\n\n $result = $this->handleRequest();\n\n $response = $this->buildResponse($result['to'], $result['from'], $result['response']);\n\n Log::debug('Server response created:', compact('response'));\n\n return new Response($response);\n }",
"public function run(): ResponseInterface {\n\t\treturn $this->handle(self::getServerRequest());\n\t}",
"public function run(){\n // server response object \n $requestMethod = $this->requestBuilder->getRequestMethod();\n $this->response = new Response($requestMethod);\n\n try{\n $route = $this->router->validateRequestedRoute($this->requestBuilder);\n\n // serve request object\n $this->requestBuilder->setQuery();\n $this->requestBuilder->setBody();\n $requestParams = $this->requestBuilder->getParam();\n $requestQuery = $this->requestBuilder->getQuery();\n $requestBody = $this->requestBuilder->getBody(); \n $this->request = new Request($requestParams, $requestQuery, $requestBody);\n\n $callback = $route->getCallback();\n $callback($this->request, $this->response);\n }catch(RouteNotImplementedException $e){\n $this->response->statusCode(404)->json($e->getMessage()); \n }\n \n }",
"protected abstract function handleResponse(View $view);",
"abstract function handle(Request $request, $parameters);",
"function handleRequest (&$request, &$context) {\n\n\t\t/* cycle through our process callback queue. using each() vs.\n\t\t * foreach, etc. so we may add elements to the callback array\n\t\t * later. probably primarily used for conditional callbacks. */\n\t\treset ($this->_processCallbacks);\n\t\twhile ($c = each ($this->_processCallbacks)) {\n\n\t\t\t// test for a successful view dispatch\n\t\t\tif ($this->_processProcess ($this->_processCallbacks[$c['key']],\n\t\t\t $request,\n\t\t\t $context))\n\t\t\t\treturn;\n\t\t}\n\n\t\t// if no view has been found yet attempt our default\n\t\tif ($this->defaultViewExists ())\n\t\t\t$this->renderDefaultView ($request, $context);\n\t}",
"public function handleRequest()\n {\n $version = $this->versionEngine->getVersion();\n $queryConfiguration = $version->parseRequest($this->columnConfigurations);\n $this->provider->prepareForProcessing($queryConfiguration, $this->columnConfigurations);\n $data = $this->provider->process();\n return $version->createResponse($data, $queryConfiguration, $this->columnConfigurations);\n }",
"public abstract function processRequest();",
"abstract public function processRequest();",
"public function handle(RequestInterface $request): ResponseInterface;",
"public function handle(ServerRequestInterface $request, $handler, array $vars): ?ResponseInterface;",
"public function handle(array $request = []);",
"public function run($request = null)\n {\n return $response = $this->dispatch($request);\n// if ($response instanceof Response) {\n// $response->send();\n// } else {\n// echo (string)$response;\n// }\n }",
"public function process(Request $request, Handler $handler): Response\n {\n try {\n return $handler->handle($request);\n } catch (Throwable $e) {\n return $this->errorHandler->handle($e);\n }\n }",
"public function handleRequest()\n\t{\n $response = array();\n switch ($this->get_server_var('REQUEST_METHOD')) \n {\n case 'OPTIONS':\n case 'HEAD':\n $response = $this->head();\n break;\n case 'GET':\n $response = $this->get();\n break;\n case 'PATCH':\n case 'PUT':\n case 'POST':\n $response = $this->post();\n break;\n case 'DELETE':\n $response = $this->delete();\n break;\n default:\n $this->header('HTTP/1.1 405 Method Not Allowed');\n }\n\t\treturn $response;\n }",
"public function handle(Request $request, Response $response) {\n\t\t$handler = $this->getHandler($request);\n\n\t\tif (null == $handler) {\n\t\t\t$response->setStatusCode(404);\n\t\t\t$response->setContent('Doh, wrong url.');\n\t\t\treturn $response;\n\t\t}\n\n\t\t// something for simple DI\n\t\t$handler->setContainer($this);\n\n\t\t$handler->processHttp($request, $response);\n\t\treturn $response;\n\t}",
"abstract public function processResponse($response);",
"abstract protected function process(Request $request);",
"public function handleRequest() {\n // Make sure the action parameter exists\n $this->requireParam('action');\n\n // Call the correct handler based on the action\n switch($this->requestBody['action']) {\n\n case 'checkoutLocker':\n $this->handleCheckoutLocker();\n\t\t\t\tbreak;\n\n\t\t\tcase 'remindLocker':\n $this->handleRemindLocker();\n\t\t\t\tbreak;\n\n\t\t\tcase 'returnLocker':\n $this->handleReturnLocker();\n\t\t\t\tbreak;\n\n default:\n $this->respond(new Response(Response::BAD_REQUEST, 'Invalid action on Locker resource'));\n }\n }",
"public function process_request() {\n if(!empty($this->POST)) {\n return $this->handlePOST();\n } else {\n return $this->handleGET();\n }\n }",
"public function process(\n ServerRequestInterface $request, \n RequestHandlerInterface $handler\n ): ResponseInterface {\n return call_user_func($this->callable, $request, $handler);\n }",
"public function handle() {\n\t\n\t\t$task = $this->request->getTask();\n\t\t$handler = $this->resolveHandler($task);\n\t\t$action = $this->request->getAction();\n\t\t$method = empty($action) ? $this->defaultActionMethod : $action.$this->actionMethodSuffix;\n\t\t\n\t\tif (! method_exists($handler, $method)) {\n\t\t\tthrow new Task\\NotHandledException(\"'{$method}' method not found on handler.\");\n\t\t}\n\t\t\n\t\t$handler->setRequest($this->request);\n\t\t$handler->setIo($this->io);\n\t\t\n\t\treturn $this->invokeHandler($handler, $method);\n\t}",
"public function handle(): Response\n {\n $response = $this->createInitialHelpResponse();\n\n if(!$this->user->calendars()->count()) {\n return $this->noCalendarsForUser($response);\n }\n\n if(!$this->setting('default_calendar') || !$this->user->hasCalendar($this->setting('default_calendar'))) {\n return $this->noDefaultCalendarSet($response);\n }\n\n return $this->includeSuggestedActions($response);\n }",
"public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface\n {\n $span = $this->buildSpan($request);\n\n defer(function () {\n try {\n $this->tracer->flush();\n } catch (Throwable $exception) {\n if (ApplicationContext::hasContainer() && ApplicationContext::getContainer()->has(StdoutLoggerInterface::class)) {\n ApplicationContext::getContainer()\n ->get(StdoutLoggerInterface::class)\n ->error($exception->getMessage());\n }\n }\n });\n try {\n $response = $handler->handle($request);\n $span->setTag($this->spanTagManager->get('response', 'status_code'), $response->getStatusCode());\n $span->setTag('otel.status_code', 'OK');\n } catch (Throwable $exception) {\n $this->switchManager->isEnabled('exception') && $this->appendExceptionToSpan($span, $exception);\n if ($exception instanceof HttpException) {\n $span->setTag($this->spanTagManager->get('response', 'status_code'), $exception->getStatusCode());\n }\n throw $exception;\n } finally {\n $span->finish();\n }\n\n return $response;\n }",
"public function handle(Request $request, Response|JsonResponse|BinaryFileResponse|StreamedResponse $response, int $length);",
"private function handleCall() { //$this->request\n $err = FALSE;\n // route call to method\n $this->logToFile($this->request['action']);\n switch($this->request['action']) {\n // Edit form submitted\n case \"edit\":\n // TODO: improve error handling\n try {\n $this->logToFile(\"case: edit\");\n $this->edit($this->request['filename']);\n //$this->save();\n } catch (Exception $e) {\n $err = \"Something went wrong: \";\n $err .= $e.getMessage();\n }\n break;\n }\n // TODO: set error var in response in case of exception / error\n // send JSON response\n if($err !== FALSE) {\n $this->request['error_msg'] = $err;\n }\n $this->giveJSONResponse($this->request);\n }",
"public function processRequest(F3_FLOW3_MVC_Request $request, F3_FLOW3_MVC_Response $response) {\n\t\t// return $response;\n\t\t$this->content = $request->getArgument('content');\n\t\t$this->settings = $request->getArgument('settings');\n\t\t\n\t\tif ($this->isContentToBeParsed()) {\n\t\t\t$response->setContent($this->parser->parse($this->content));\n\t\t\t// TODO Implement Inverse of Control for Parser/Content\n\t\t\t// $processorChain = $this->componentManager->getComponent('F3_Contentparser_ProcessorChain');\n\t\t\t// $processorChain->addProcessor($this->parser);\n\t\t\t// $processorChain->addProcessor($this->postProcessor);\n\t\t\t// $this->content->setProcessorChain($processorChain);\n\t\t\t// return $this->content->processChain();\n\t\t} else {\n\t\t\t$response->setContent($this->content);\n\t\t}\n\t\treturn $response;\n\t}",
"protected function handleRequest() {\n\t\t// TODO: remove conditional when we have a dedicated error render\n\t\t// page and move addModule to Mustache#getResources\n\t\tif ( $this->adapter->getFormClass() === 'Gateway_Form_Mustache' ) {\n\t\t\t$modules = $this->adapter->getConfig( 'ui_modules' );\n\t\t\tif ( !empty( $modules['scripts'] ) ) {\n\t\t\t\t$this->getOutput()->addModules( $modules['scripts'] );\n\t\t\t}\n\t\t\tif ( $this->adapter->getGlobal( 'LogClientErrors' ) ) {\n\t\t\t\t$this->getOutput()->addModules( 'ext.donationInterface.errorLog' );\n\t\t\t}\n\t\t\tif ( !empty( $modules['styles'] ) ) {\n\t\t\t\t$this->getOutput()->addModuleStyles( $modules['styles'] );\n\t\t\t}\n\t\t}\n\t\t$this->handleDonationRequest();\n\t}",
"abstract public function response();",
"public function processRequest(): ResponseInterface\n {\n $routes = $this->bs->routes();\n $request = new Request($this->bs->globals());\n $routingEngine = new RoutingEngine($routes);\n $result = $routingEngine->resolve(\n $request->method(),\n $request->uri()\n );\n if($result === null) {\n return new TextResponse(\"404 page not found\");\n }\n $requestHandler = new RequestHandler(\n $this,\n $request,\n $this->bs->middlewares(),\n $result\n );\n $response = $requestHandler->handleRequest();\n return $response;\n }",
"public function handle() {\n\t\t\n\t\t\n\t\t\n\t\theader('ApiVersion: 1.0');\n\t\tif (!isset($_COOKIE['lg_app_guid'])) {\n\t\t\t//error_log(\"NO COOKIE\");\n\t\t\t//setcookie(\"lg_app_guid\", uniqid(rand(),true),time()+(10*365*24*60*60));\n\t\t} else {\n\t\t\t//error_log(\"cookie: \".$_COOKIE['lg_app_guid']);\n\t\t\t\n\t\t}\n\t\t// checks if a JSON-RCP request has been received\n\t\t\n\t\tif (($_SERVER['REQUEST_METHOD'] != 'POST' && (empty($_SERVER['CONTENT_TYPE']) || strpos($_SERVER['CONTENT_TYPE'],'application/json')===false)) && !isset($_GET['d'])) {\n\t\t\t\techo \"INVALID REQUEST\";\n\t\t\t// This is not a JSON-RPC request\n\t\t\treturn false;\n\t\t}\n\t\t\t\t\n\t\t// reads the input data\n\t\tif (isset($_GET['d'])) {\n\t\t\tdefine(\"WEB_REQUEST\",true);\n\t\t\t$request=urldecode($_GET['d']);\n\t\t\t$request = stripslashes($request);\n\t\t\t$request = json_decode($request, true);\n\t\t\t\n\t\t} else {\n\t\t\tdefine(\"WEB_REQUEST\",false);\n\t\t\t//error_log(file_get_contents('php://input'));\n\t\t\t$request = json_decode(file_get_contents('php://input'),true);\n\t\t\t//error_log(print_r(apache_request_headers(),true));\n\t\t}\n\t\t\n\t\terror_log(\"Method: \".$request['method']);\n\t\tif (!isset($this->exemptedMethods[$request['method']])) {\n\t\t\ttry {\n\t\t\t\t$this->authenticate();\n\t\t\t} catch (Exception $e) {\n\t\t\t\t$this->authenticated = false;\n\t\t\t\t$this->handleError($e);\n\t\t\t}\n\t\t} else {\n\t\t\t//error_log('exempted');\n\t\t}\n\t\ttrack_call($request);\n\t\t//error_log(\"RPC Method Called: \".$request['method']);\n\t\t\n\t\t//include the document containing the function being called\n\t\tif (!function_exists($request['method'])) {\n\t\t\t$path_to_file = \"./../include/methods/\".$request['method'].\".php\";\n\t\t\tif (file_exists($path_to_file)) {\n\t\t\t\tinclude $path_to_file;\n\t\t\t} else {\n\t\t\t\t$e = new Exception('Unknown method. ('.$request['method'].')', 404, null);\n \t$this->handleError($e);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t// executes the task on local object\n\t\ttry {\n\t\t\t\n\t\t\t$result = @call_user_func($request['method'],$request['params']);\n\t\t\t\n\t\t\tif (!is_array($result) || !isset($result['result']) || $result['result']) {\n\t\t\t\t\n\t\t\t\tif (is_array($result) && isset($result['result'])) unset($result['result']);\n\t\t\t\t\n\t\t\t\t$response = array (\n\t\t\t\t\t\t\t\t\t'jsonrpc' => '2.0',\n\t\t\t\t\t\t\t\t\t'id' => $request['id'],\n\t\t\t\t\t\t\t\t\t'result' => $result,\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t );\n\t\t\t} else {\n\t\t\t\tunset($result['result']);\n\t\t\t\t\n\t\t\t\t$response = array (\n\t\t\t\t\t\t\t\t\t'jsonrpc' => '2.0',\n\t\t\t\t\t\t\t\t\t'id' => $request['id'],\n\t\t\t\t\t\t\t\t\t'error' => $result\n\t\t\t\t\t\t\t\t );\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception $e) {\n\t\t\t\n\t\t\t$response = array (\n\t\t\t\t\t\t\t\t'id' => $request['id'],\n\t\t\t\t\t\t\t\t'result' => NULL,\n\t\t\t\t\t\t\t\t'error' => $e->getMessage()\n\t\t\t\t\t\t\t\t);\n\t\t\t\n\t\t}\n\t\t// output the response\n\t\tif (!empty($request['id'])) { // notifications don't want response\n\t\t\theader('content-type: text/javascript');\n\t\t\t//error_log(@print_r($response));\n\t\t\tif (isset($_GET['d'])) $str_response = $_GET['jsoncallback'].\"(\".str_replace('\\/','/',json_encode($response)).\")\";\n\t\t\telse $str_response = str_replace('\\/','/',json_encode($response));\n\t\t\t\n\t\t\tif ($_SERVER['SERVER_ADDR']=='192.168.1.6') {\n\t\t\t\t//error_log($str_response);\n\t\t\t}\n\t\t\techo $str_response;\n\t\t}\n\t\t\n\t\t\n\t\t// finish\n\t\treturn true;\n\t}",
"public function processRequest();",
"public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface\n {\n return $handler->handle($request);\n }",
"public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface\n {\n return $handler->handle($request);\n }",
"public function handle(): JsonResponse\n {\n header(\"Access-Control-Allow-Origin: http://localhost:3000\");\n header('Access-Control-Allow-Methods: GET');\n header(\"Access-Control-Allow-Headers: Content-Type, Authorization\");\n\n // Get data from route\n $request = file_get_contents('php://input');\n $jsonRequest = json_decode($request);\n\n // Deconstructing request\n $start = $jsonRequest->start;\n $end = $jsonRequest->end;\n\n // Returning FizzBuzz\n $returnObj = $this->fizzBuzz->calculate($start, $end);\n return new JsonResponse($returnObj);\n }",
"private function handleRequest(Request $request): Response\n {\n try {\n $configuration = new Configuration($this->configFile, $request);\n $urlGenerator = new UrlGenerator($configuration, $request);\n\n $requestedDirectory = DataHandling::formatDirectory($configuration->getRoot(), $request->getPathInfo());\n\n $accessible = $configuration->isDirectoryAccessible($requestedDirectory, $reason);\n\n // Show a page not found page when the directory does not exist or is not accessible\n if (!$accessible) {\n return new Response($this->getTwig($configuration, $urlGenerator)->render(\"not-found.html.twig\"), Response::HTTP_NOT_FOUND);\n }\n\n $directory = $configuration->getDirectory($requestedDirectory);\n\n $archiver = new Archiver($configuration, $directory, $urlGenerator);\n\n if ($request->query->has(\"prepare-download\")) {\n return $this->prepareDownload($archiver, $urlGenerator);\n } else {\n // Delete expired archives only when we are not preparing one, so that we are not deleting an archive that is to be used just moments after\n $archiver->deleteExpiredArchives();\n }\n\n return $this->showListing($configuration, $urlGenerator, $directory, $archiver);\n } catch (Exception $exception) {\n error_log($exception);\n return new Response(\"<html><body><h1>Internal Server Error</h1><p>An internal server error occurred.</p></body></html>\", Response::HTTP_INTERNAL_SERVER_ERROR);\n }\n }",
"public function handle($request, $next);",
"public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface\n {\n $message = $this->has('message') ? $this->get('message') : 'Hi';\n \n return new \\Zend\\Diactoros\\Response\\TextResponse($message);\n }",
"public function handle(ServerRequestInterface $request): ResponseInterface\n {\n if ($this->response === null) {\n $this->response = ArkWebResponse::makeResponse(200);\n }\n\n if(!is_array($this->handleCallable)){\n $actualCallable=$this->handleCallable;\n }else {\n $className=$this->handleCallable[0];\n $actualCallable = [new $className,$this->handleCallable[1]];\n }\n if (!is_callable($actualCallable)) {\n $this->response->setStatus('500', 'No handler given');\n } else {\n $this->response = call_user_func_array($this->handleCallable, [$request, $this->response]);\n }\n return $this->response;\n }",
"protected function handle_request() {\r\n global $wp;\r\n $film_query = $wp->query_vars['films'];\r\n \r\n if (!$film_query) { // send all films\r\n $raw_data = $this->get_all_films();\r\n }\r\n else if ($film_query == \"featured\") { // send featured films\r\n $raw_data = $this->get_featured_films();\r\n }\r\n else if (is_numeric($film_query)) { // send film of id\r\n $raw_data = $this->get_film_by_id($film_query);\r\n }\r\n else { // input error\r\n $this->send_response('Bad Input');\r\n }\r\n\r\n $all_data = $this->get_acf_data($raw_data);\r\n $this->send_response('200 OK', $all_data);\r\n }",
"public function handle(Request $request)\n {\n $route_params = $this->_router->match($request->getUri());\n $route = $route_params['route'];\n $params = $route_params['params'];\n\n $func = reset($route) . self::CONTROLLER_METHOD_SUFIX;\n $class_name = key($route);\n $controller = new $class_name($request);\n\n $response = call_user_func_array(\n [\n $controller,\n $func,\n ],\n [$params]\n );\n\n if ($response instanceof Response) {\n return $response;\n } else {\n throw new InvalidHttpResponseException();\n }\n }",
"public function handle(Request $request)\n {\n $handler = $this->router->match($request);\n if (!$handler) {\n echo \"Could not find your resource!\\n\";\n return;\n }\n\n return $handler();\n }",
"public function handleRequest() {\n $this->loadErrorHandler();\n\n $this->sanitizeRequest();\n $this->modx->invokeEvent('OnHandleRequest');\n if (!$this->modx->checkSiteStatus()) {\n header('HTTP/1.1 503 Service Unavailable');\n if (!$this->modx->getOption('site_unavailable_page',null,1)) {\n $this->modx->resource = $this->modx->newObject('modDocument');\n $this->modx->resource->template = 0;\n $this->modx->resource->content = $this->modx->getOption('site_unavailable_message');\n } else {\n $this->modx->resourceMethod = \"id\";\n $this->modx->resourceIdentifier = $this->modx->getOption('site_unavailable_page',null,1);\n }\n } else {\n $this->checkPublishStatus();\n $this->modx->resourceMethod = $this->getResourceMethod();\n $this->modx->resourceIdentifier = $this->getResourceIdentifier($this->modx->resourceMethod);\n if ($this->modx->resourceMethod == 'id' && $this->modx->getOption('friendly_urls', null, false) && !$this->modx->getOption('request_method_strict', null, false)) {\n $uri = $this->modx->context->getResourceURI($this->modx->resourceIdentifier);\n if (!empty($uri)) {\n if ((integer) $this->modx->resourceIdentifier === (integer) $this->modx->getOption('site_start', null, 1)) {\n $url = $this->modx->getOption('site_url', null, MODX_SITE_URL);\n } else {\n $url = $this->modx->getOption('site_url', null, MODX_SITE_URL) . $uri;\n }\n $this->modx->sendRedirect($url, array('responseCode' => 'HTTP/1.1 301 Moved Permanently'));\n }\n }\n }\n if (empty ($this->modx->resourceMethod)) {\n $this->modx->resourceMethod = \"id\";\n }\n if ($this->modx->resourceMethod == \"alias\") {\n $this->modx->resourceIdentifier = $this->_cleanResourceIdentifier($this->modx->resourceIdentifier);\n }\n if ($this->modx->resourceMethod == \"alias\") {\n $found = $this->findResource($this->modx->resourceIdentifier);\n if ($found) {\n $this->modx->resourceIdentifier = $found;\n $this->modx->resourceMethod = 'id';\n } else {\n $this->modx->sendErrorPage();\n }\n }\n $this->modx->beforeRequest();\n $this->modx->invokeEvent(\"OnWebPageInit\");\n\n if (!is_object($this->modx->resource)) {\n if (!$this->modx->resource = $this->getResource($this->modx->resourceMethod, $this->modx->resourceIdentifier)) {\n $this->modx->sendErrorPage();\n return true;\n }\n }\n\n return $this->prepareResponse();\n }",
"public function handle() {\n if(method_exists($this->class, $this->function)) {\n echo $this->class->{$this->function}($this->request);\n }else {\n echo Response::response(['error' => 'function does not exist on ' . get_class($this->class)], 500);\n }\n }",
"public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface\n {\n ob_start();\n //$level = ob_get_level();\n try {\n $response = $handler->handle($request);\n if ($this->isError($response->getStatusCode())) {\n $exception = new HttpErrorException($response->getReasonPhrase(), $response->getStatusCode());\n return $this->handleError($request, $exception);\n }\n return $response;\n } catch (HttpErrorException $exception) {\n return $this->handleError($request, $exception);\n } catch (Throwable $exception) {\n if (!$this->catchExceptions) {\n\n throw $exception;\n }\n\n return $this->handleError($request, HttpErrorException::create(500, [], $exception));\n } finally {\n// while (ob_get_level() >= $level) {\n// ob_end_clean();\n// }\n }\n }",
"public function run()\n\t{\n\t\t// Proxy requests, write headers, and then render response\n\t\treturn $this\n\t\t\t->request()\n\t\t\t->response()\n\t\t;\n\t}",
"abstract public function handle();",
"abstract public function handle();",
"public function run() {\n\t\t// If this particular request is not a hook, something is wrong.\n\t\tif (!isset($this->server[self::MERGADO_HOOK_AUTH_HEADER])) {\n\t\t\tthrow new \\RuntimeException(sprintf(\n\t\t\t\t\"%s is to be used only for handling hooks sent from Mergado.\n\t\t\t\tMergado-Apps-Hook-Auth is missing.\",\n\t\t\t\t__CLASS__\n\t\t\t));\n\t\t}\n\n\t\tif (!$decoded = json_decode($this->rawRequest, true)) {\n\t\t\tthrow new \\RuntimeException(sprintf(\n\t\t\t\t\"%s cannot handle request, because the data to be handled is empty.\",\n\t\t\t\t__CLASS__\n\t\t\t));\n\t\t} elseif (!isset($decoded['action'])) {\n\t\t\tthrow new \\RuntimeException(sprintf(\n\t\t\t\t\"%s cannot handle the hook, because the hook action is undefined.\",\n\t\t\t\t__CLASS__\n\t\t\t));\n\t\t};\n\n\t\t$this->handle($decoded['action'], $decoded);\n\n\t}",
"public function handleRequest()\n {\n $route = $this->router->match();\n\n if ($route) {\n $controllerName = $route['target']['controllerName'];\n $methodName = $route['target']['methodName'];\n\n $controller = new $controllerName();\n\n $controller->$methodName($route['params']);\n } else {\n header(\"HTTP:1.0 404 not Found\");\n echo json_encode([\n \"error_code\" => 404,\n \"reason\" => \"page not found\"\n ]);\n }\n }",
"public function handle(HttpClientInterface $client, Request $request, Response $response);",
"public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface\n {\n $this->uri = $request->getUri();\n $this->app->getContainer()->get('view')->loadExtension($this);\n return $handler->handle($request);\n }",
"public function handle(Request $request)\n {\n if ($request->header('X-GitHub-Event') === 'push') {\n return $this->handlePush($request->input());\n }\n\n if ($request->header('X-GitHub-Event') === 'pull_request') {\n return $this->handlePullRequest($request->input());\n }\n\n if ($request->header('X-GitHub-Event') === 'ping') {\n return $this->handlePing();\n }\n\n return $this->handleOther();\n }",
"abstract function doExecute($request);",
"public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface\n {\n $response = $handler->handle($request);\n\n return $response;\n }",
"public function handle()\n {\n $className = get_class($this);\n\n return $this\n ->klein\n ->response()\n ->header(\"Content-Type\", \"text/plain\")\n ->body(\"please create a handle() method in: '$className'\");\n }",
"final public function handle(\\HttpRequest $request)\n {\n $processed = $this->successor->processing($request);\n\n if ($processed === null) {\n if ($this->successor !== null) {\n $processed = $this->successor->handle($request);\n }\n }\n\n return $processed;\n }",
"public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface\n {\n $time = microtime(true);\n $response = $handler->handle($request);\n\n $logger = di()->get(LoggerFactory::class)->get('request');\n\n /** @var Request $request */\n $request = di()->get(RequestInterface::class);\n $result = $response->getBody()->getContents();\n\n // 日志\n $time = microtime(true) - $time;\n $debug = 'URL: ' . $request->getUri() . PHP_EOL;\n $debug .= 'TIME: ' . $time . PHP_EOL;\n $debug .= 'PARAMS: ' . $request->getBody()->getContents() . PHP_EOL;\n $debug .= 'RESPONSE: ' . $result . PHP_EOL;\n\n if ($time > 1) {\n $logger->error($debug);\n } else {\n $logger->info($debug);\n }\n\n return $response;\n }",
"protected function handleRequest() {\n\t\t// FIXME: is this necessary?\n\t\t$this->getOutput()->allowClickjacking();\n\t\tparent::handleRequest();\n\t}",
"public function call($request, $response);",
"public function dispatch(Request $request)\n\t{\n\t\t// Before we handle the requests we need to make sure the application has been\n\t\t// booted up. The boot process will call the \"boot\" method on each service\n\t\t// provider giving them all a chance to register any application events.\n\t\tif ( ! $this->booted)\n\t\t{\n\t\t\t$this->boot();\n\t\t}\n\n\t\t$this->prepareRequest($request);\n\n\t\t// First we will call the \"before\" global middlware, which we'll give a chance\n\t\t// to override the normal requests process when a response is returned by a\n\t\t// middlewares. Otherwise we'll call the route just like a normal reuqest.\n\t\t$response = $this->callGlobalMiddleware('before');\n\n\t\tif ( ! is_null($response))\n\t\t{\n\t\t\treturn $this->prepareResponse($response, $request);\n\t\t}\n\n\t\t$route = $this['router']->dispatch($request);\n\n\t\t// Once we have the route and before middlewares, we will iterate through them\n\t\t// and call each one. If a given filter returns a response we will let that\n\t\t// value override the rest of the request cycle and return the Responses.\n\t\t$before = $this->getBeforeMiddlewares($route, $request);\n\n\t\tforeach ($before as $middleware)\n\t\t{\n\t\t\t$response = $this->callMiddleware($middleware);\n\t\t}\n\n\t\t// If none of the before middlewares returned a response, we will just execute\n\t\t// the route that matched the request, then call the after filters for this\n\t\t// and return the responses back out and they'll get sent to the clients.\n\t\tif ( ! isset($response))\n\t\t{\n\t\t\t$response = $route->run();\n\t\t}\n\n\t\t$response = $this->prepareResponse($response, $request);\n\n\t\t// Once all of the \"after\" middlewares are called we should be able to return\n\t\t// the completed response object back to the consumers so it will be given\n\t\t// to the client as a response. The Responses should be final and ready.\n\t\tforeach ($route->getAfterMiddlewares() as $middleware)\n\t\t{\n\t\t\t$this->callMiddleware($middleware, array($response));\n\t\t}\n\n\t\t$this->callAfterMiddleware($response);\n\n\t\treturn $response;\n\t}",
"abstract protected function handle();",
"public function HandleRequest(Request $request)\r\n {\r\n $command = $this->_commandResolver->GetCommand($request);\t// Create command object for Request\r\n $response = $command->Execute($request);\t\t\t\t\t// Execute the command to get response\r\n $view = ApplicationController::GetView($response);\t\t\t\t\t// Send response to the appropriate view for display\r\n $view->Render();\t\t\t\t\t\t\t\t\t\t\t// Display the view\r\n }",
"public static function process_http_request()\n {\n }",
"public function handle()\n {\n // 4. Ensure reliable delivery\n $client = new GuzzleClient([\n 'base_uri' => 'https://atomic.incfile.com/',\n ]);\n \n try {\n $response = $client->request('POST', 'fakepost');\n $code = $response->getStatusCode();\n } catch (ClientException $e) {\n $code = $e->getCode();\n \\Log::error($e);\n }\n\n $success = $this->_handleStatusCode($code);\n\n if ($success) {\n $this->info(\"The request reached destination and had a successful response\");\n } else {\n $this->info(\"The request had a failed response\");\n }\n // 4. End Ensure reliable delivery\n\n\n // 5. Handle 100K requests \n $requests = function ($total) {\n $uri = 'https://atomic.incfile.com/fakepost';\n for ($i = 0; $i < $total; $i++) {\n yield new Request('GET', $uri);\n }\n };\n\n $totalRequests = 100000;\n $successRequests = 0;\n $failedRequests = 0;\n\n $pool = new Pool($client, $requests($totalRequests), [\n 'concurrency' => 100,\n 'fulfilled' => function ($response, $index) use (& $successRequests) {\n // this is delivered each successful response\n $successRequests++;\n },\n 'rejected' => function ($reason, $index) use (& $failedRequests) {\n // this is delivered each failed request\n $failedRequests++;\n },\n ]);\n\n // Initiate the transfers and create a promise\n $promise = $pool->promise();\n\n // Force the pool of requests to complete.\n $promise->wait();\n \n $this->info(\"Total Requests: $totalRequests\");\n $this->info(\"Success Requests: $successRequests\");\n $this->info(\"Failed Requests: $failedRequests\");\n // 5. End Handle 100K requests \n\n }",
"public function handle(Request $request): Response{\n try{\n $errors = $this->cookieHandler->readCookieArray('errors');\n $this->cookieHandler->deleteCookie('errors');\n }catch(\\OutOfBoundsException $e){\n $errors = [];\n }\n\n // Reads success messages stored in a cookie\n try{\n $messages = $this->cookieHandler->readCookieArray('messages');\n $this->cookieHandler->deleteCookie('messages');\n }catch(\\OutOfBoundsException $e){\n $messages = [];\n }\n\n // Renders content\n $content = $this->templatingEngine->render(\n 'layouts/layout_main.php',\n [\n 'title' => 'Nova organizacija',\n 'authorizationLevel' => $this->firewall->getAuthorizationLevel(),\n 'body' => $this->templatingEngine->render(\n 'templates/create_organization_template.php',\n [\n 'errors' => $errors,\n 'messages' => $messages\n ]\n )\n ]\n );\n\n return new HTMLResponse($content);\n }"
] | [
"0.75480264",
"0.73902106",
"0.7335762",
"0.7262248",
"0.72097474",
"0.72097474",
"0.72097474",
"0.71608317",
"0.70753103",
"0.70720184",
"0.70204616",
"0.7005036",
"0.6951443",
"0.6912256",
"0.6906424",
"0.69034153",
"0.68800443",
"0.68536466",
"0.67923427",
"0.6791015",
"0.6733275",
"0.67099386",
"0.6685382",
"0.6593459",
"0.65724534",
"0.65683186",
"0.6556783",
"0.650226",
"0.650106",
"0.64983296",
"0.64584476",
"0.6458248",
"0.63929445",
"0.6366609",
"0.63070077",
"0.6294878",
"0.6283507",
"0.62717974",
"0.62606955",
"0.62549484",
"0.6248731",
"0.6237129",
"0.61937916",
"0.6185878",
"0.6185172",
"0.61804575",
"0.61683625",
"0.61678654",
"0.6154829",
"0.6151785",
"0.6148817",
"0.6145153",
"0.61428875",
"0.6137106",
"0.6133029",
"0.6126098",
"0.6124701",
"0.61197764",
"0.6110893",
"0.6108243",
"0.6107682",
"0.61006",
"0.60995764",
"0.60977226",
"0.60881436",
"0.60871947",
"0.6050007",
"0.6050007",
"0.60456175",
"0.60211045",
"0.60188746",
"0.6014869",
"0.6012649",
"0.60115075",
"0.60104513",
"0.6000642",
"0.6000288",
"0.5995423",
"0.5994541",
"0.59885305",
"0.5977935",
"0.5977935",
"0.5968286",
"0.59516597",
"0.595076",
"0.5949995",
"0.5943685",
"0.59417087",
"0.594114",
"0.59408784",
"0.5933761",
"0.59115905",
"0.5907815",
"0.5893162",
"0.5884361",
"0.58830976",
"0.5857181",
"0.58537364",
"0.58534324",
"0.5836681"
] | 0.60988426 | 63 |
enqueue scripts and styles | public function register(){
add_filter('plugin_action_links_'.GAW_PLUGIN_NAME , [$this, 'addPluginLinks']);
$this->activate();
$admin = new AdminPages;
$admin->addAdminMenu();
$this->registerPostTypes();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function enqueue_scripts(){\n\t\tself::include_css();\n\t\tself::include_js();\n\t}",
"public function enqueue_scripts() {\n\t\t$this->styles();\n\t\t$this->scripts();\n\t}",
"public function enqueueScripts() {\n\t\t\twp_enqueue_script('jquery');\n//\t\t\twp_enqueue_script('owl', self::asset(\"node_modules/owl.carousel/dist/owl.carousel.min.js\"), ['jquery'], '1.0.0', ' all');\n// wp_enqueue_script('headroom', self::asset(\"node_modules/headroom.js/dist/headroom.min.js\"), ['jquery'], '1.0.0', ' all');\n// wp_enqueue_script('prettyPhoto', self::asset(\"js/vendor/jquery.prettyPhoto.js\"), ['jquery'], '1.0.0', ' all');\n//\t\t\twp_enqueue_script('navigo', self::asset(\"node_modules/navigo/lib/navigo.min.js\"), ['jquery'], '1.0.0', ' all')\\;\n\t\t\twp_enqueue_script('app', self::asset(\"js/app.min.js\"), ['jquery'], '1.0.0', ' all');\n\t\t}",
"public function enqueueScripts(){}",
"public function frontEndStyleScripts(): void\n {\n wp_enqueue_style('users-data-bootstrap', plugin_dir_url(dirname(__FILE__)) . 'assets/css/bootstrap.min.css', [], UsersListing::getVersion());\n wp_enqueue_style('users-data-fontawsome', plugin_dir_url(dirname(__FILE__)) . 'assets/css/font-awesome.min.css', [], UsersListing::getVersion());\n wp_enqueue_style('users-data-styles', plugin_dir_url(dirname(__FILE__)) . 'assets/css/users-data.css', [], UsersListing::getVersion());\n //\n wp_enqueue_script('jquery-min', plugin_dir_url(dirname(__FILE__)) . 'assets/js/jquery.min.js', ['jquery'], UsersListing::getVersion(), false);\n wp_enqueue_script('jquery-popper', plugin_dir_url(dirname(__FILE__)) . 'assets/js/popper.min.js', ['jquery'], UsersListing::getVersion(), false);\n wp_enqueue_script('bootstrap-min', plugin_dir_url(dirname(__FILE__)) . 'assets/js/bootstrap.min.js', ['jquery'], UsersListing::getVersion(), false);\n }",
"public function enqueueScripts()\n {\n wp_enqueue_style('gfbitpay-admin', $this->plugin->urlBase . 'style-admin.css', false, GFBITPAY_PLUGIN_VERSION);\n }",
"public function enqueue_scripts() {\n\t\twp_enqueue_style( 'pt-style', plugins_url( 'assets/css/style.css', __FILE__ ), array(), '1.0.0', false );\n\n\t\twp_enqueue_script( 'pt-script', plugins_url( 'assets/js/script.js', __FILE__ ), array(), '1.0.0', true );\n\t}",
"public function enqueueScripts() {\n wp_register_style('rrze-faq-style', plugins_url('assets/css/rrze-faq.css', plugin_basename($this->pluginFile)));\n wp_enqueue_style('rrze-faq-style');\n }",
"public function enqueue_scripts() {\n\t\twp_add_inline_style( 'at-main', $this->inline_css() );\n\t}",
"public function add_scripts_and_styles()\n {\n // Estilos css \n wp_register_style( 'wiAjustesStyles', WI_PLUGIN_URL . '/style.css', null, WI_VERSION );\n wp_enqueue_style( 'wiAjustesStyles' );\n\n // Scripts de javascript\n wp_enqueue_script('wiAjustesStylesJs', WI_PLUGIN_URL . '/script.js' , array('jquery'));\n }",
"public function enqueue_scripts() {\n\n\t\twp_enqueue_style( 'kirki-field-dimensions', URL::get_from_path( dirname( __DIR__ ) . '/dist/control.css' ), array(), '1.0' );\n\n\t}",
"function assets(){\n\t\t\twp_enqueue_style( 'sp-2020-styles', get_template_directory_uri() .'/assets/css/main.css', array(), SPUTZNIK_2020_THEME_VERSION );\n\t\t\twp_enqueue_script( 'sp-2020-js', get_template_directory_uri() . '/assets/js/main.js', array('jquery'), SPUTZNIK_2020_THEME_VERSION, true );\n\n\t\t}",
"private function register_scripts_and_styles()\n\t\t\t{\n\n\t\t\t\tif( is_admin() )\n\t\t\t\t{\n\n\t\t \t\t//$this->load_file('friendly_widgets_admin_js', '/themes/'.THEMENAME.'/admin/js/widgets.js', true);\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{ \n\n\t\t \t\t//$this->load_file('friendly_widgets', '/themes/'.THEMENAME.'/theme_assets/js/widgets.js', true);\n\n\t\t\t\t}\n\n\t\t\t}",
"private function register_scripts_and_styles()\n\t\t\t{\n\n\t\t\t\tif( is_admin() )\n\t\t\t\t{\n\n\t\t \t\t//$this->load_file('friendly_widgets_admin_js', '/themes/'.THEMENAME.'/admin/js/widgets.js', true);\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{ \n\n\t\t \t\t//$this->load_file('friendly_widgets', '/themes/'.THEMENAME.'/theme_assets/js/widgets.js', true);\n\n\t\t\t\t}\n\n\t\t\t}",
"final public function wp_enqueue_scripts()\n {\n // Bypass\n if (!self::tFyAppConfig('enqueue_scripts')) {\n return;\n }\n\n if (self::tFyAppConfig('modal')) :\n wp_enqueue_style('tiFyComponentsPdfViewerModal');\n wp_enqueue_script('tiFyComponentsPdfViewerModal');\n else :\n wp_enqueue_style('tiFyComponentsPdfViewer');\n wp_enqueue_script('tiFyComponentsPdfViewer');\n endif;\n }",
"function cs_style_and_scripts() {\n \n\t\twp_enqueue_style( 'bootstrap-css', get_stylesheet_directory_uri() .'/public/css/vendor.css' );\n\t\twp_enqueue_style( 'bootstrap-css', get_stylesheet_directory_uri() .'/public/css/app.css' );\n wp_enqueue_style( 'main-css', get_stylesheet_uri() );\n\n /*wp_enqueue_script( 'myscripts', get_stylesheet_directory_uri() . '/assets/js/app.js', '', '1.0.0', true );\n wp_localize_script('myscripts', 'cs_obj', array(\n 'ajax_url' => admin_url('admin-ajax.php'),\n ));*/\n\n }",
"public function setup_scripts_and_styles() {\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'enqueue_discogs_css' ), 50 );\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'enqueue_discogs_js' ), 10 );\n\t}",
"public function enqueue_scripts() {\n wp_enqueue_style( $this->name, plugins_url( '/assets/css/admin.css', IMFILE ), '', $this->version, 'all' );\n \n wp_enqueue_script( 'jquery' );\n wp_enqueue_script( $this->name, plugins_url( '/assets/js/admin.js', IMFILE ), array( 'jquery' ), $this->version, true );\n }",
"public function enqueue_scripts() {\n wp_enqueue_script(\n 'moment',\n plugins_url('includes/moment.min.js', __FILE__),\n array(),\n VSPI_VERSION,\n false\n );\n wp_enqueue_script(\n 'minidaemon',\n plugins_url('includes/mdn-minidaemon.js', __FILE__),\n array(),\n VSPI_VERSION,\n false\n );\n wp_enqueue_script(\n 'vspi-admin',\n plugins_url('includes/vspi-admin.js', __FILE__),\n array('jquery'),\n VSPI_VERSION,\n false\n );\n }",
"public function enqueue_scripts() {\r\n\r\n\t\t}",
"function innelyz_scripts() {\n wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/assets/js/bootstrap.js', array('jquery'), '3.3.7', false);\n wp_enqueue_style( 'bootstrap', get_template_directory_uri() .'/assets/css/bootstrap.css', array(), false, 'all' );\n wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Lora|Pacifico|Roboto');\n wp_enqueue_style( 'innelyz-style', get_stylesheet_uri() );\n }",
"public function scripts() {\n\t\tif ( get_post_type() == 'agenda' && ! is_single() ) {\n\t\t\twp_enqueue_script( 'jquery' );\n\t\t\twp_enqueue_script( 'events-calendar', plugins_url( 'assets/js/calendar.js', plugin_dir_path( __FILE__ ) ), array( 'jquery' ), '', true );\n\t\t\twp_enqueue_style( 'events-calendar-styles', plugins_url( 'assets/css/calendar.css', plugin_dir_path( __FILE__ ) ), array(), '' );\n\t\t}\n\n\t\twp_enqueue_style( 'timeline-styles', plugins_url( 'assets/css/timeline.css', plugin_dir_path( __FILE__ ) ), array(), '' );\n\t}",
"public function enqueue_scripts() {\n\t\t// wp_enqueue_style( 'simple-grams', plugins_url( '/assets/css/simple-grams.css', __FILE__ ) );\n\t}",
"public function register_scripts()\n {\n wp_register_style(\n 'fau-oembed-style',\n plugins_url('assets/css/fau-oembed.css', plugin()->getBasename()),\n [],\n plugin()->getVersion()\n ); \n }",
"function mandiberg_scripts() {\n\n\t\t//include bootstrap:\n\t\twp_register_style( 'bootstrap-style', get_template_directory_uri() . '/css/bootstrap.min.css' );\n\t\twp_enqueue_style( 'bootstrap-style');\n\n\n\n\t\t// Register the style like this for a theme:\n\t wp_register_style( 'mandiberg-style', get_template_directory_uri() . '/style.css', array(), '20120208', 'all' );\n\t\twp_enqueue_style( 'mandiberg-style');\n\n\t\t//barba js for transitions\n\n\t\t wp_register_script('barba', get_template_directory_uri() . '/build/barba.min.js', array ( 'jquery' ),'1.1', true);\n\t\t wp_enqueue_script('barba');\n\n\t\t//js\n\t\twp_register_script('js-file', get_template_directory_uri() . '/build/script.js', array ( 'jquery' ),'1.1', true);\n\t\t wp_enqueue_script('js-file');\n\n\t}",
"public function enqueue_scripts()\n {\n }",
"public function enqueue_scripts()\n {\n }",
"function hugomitoire_scripts() {\n wp_enqueue_style( 'appStyles', get_template_directory_uri() . '/dist/css/style.min.css' );\n wp_enqueue_script( 'Js', get_template_directory_uri() . '/dist/js/all.js', array(), '1.0.0', true );\n wp_enqueue_script( 'Swiper', get_template_directory_uri() . '/dis/js/all.js', array(), '4.4.2', true);\n}",
"public function enqueue_scripts()\n {\n }",
"function accvent_scripts() {\n\t wp_enqueue_style( 'main', get_stylesheet_uri() );\n\t wp_enqueue_script( 'bundle', get_template_directory_uri() . '/js/build.min.js', array(), '1.0.0', true );\n\t}",
"public function scripts(){\n //Enqueue scripts\n /**\n * wp_enqueue_script('sample-script',$this->directory_uri . '/sample.min.js',array('jquery'),false,false);\n * ...\n * ....\n */\n }",
"function mk_resources() {\t\t\n\twp_enqueue_style('style', get_stylesheet_uri());\n\twp_enqueue_script( 'jquery', get_template_directory_uri() . '/js/jquery-3.1.1.min.js', array(), '20120206', true );\n\twp_enqueue_script( 'custom-script', get_template_directory_uri() . '/js/script.js', array( 'jquery'), '1.1', true );\n}",
"public static function wp_enqueue_scripts() {\n\t\t\t\n\t\t\tWPPFrontendUI::_register_styles();\n\t\t\t\n\t\t}",
"function scripts(){\n wp_register_style('style',get_template_directory_uri() . '/assets/css/style.css',[],1,'all');\n wp_enqueue_style('style');\n wp_enqueue_style('custom-google-font','//fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');\n wp_register_script('app',get_template_directory_uri() . '/assets/js/app.js',[],1,true);\n wp_enqueue_script('app');\n}",
"public function enqueue_front_end_scripts() {}",
"protected function enqueue_scripts()\n {\n \\wp_enqueue_style('tify_control-progress');\n \\wp_enqueue_script('tify_control-progress');\n }",
"function register_scripts() {\n\t\t\t$id = get_the_ID();\n\t\t\t// Only continue if current page is home\n\t\t\tif ( !is_home() ) return;\n\n\t\t\twp_enqueue_script( 'jquery' );\n\t\t\twp_enqueue_script( 'kevinw-sf-react', plugins_url( 'assets/react.min.js', KEVINW_SF_FILE ), array(), false, true );\n\t\t\twp_enqueue_script( 'kevinw-sf-react-app', plugins_url( 'assets/scripts.min.js', KEVINW_SF_FILE ), array(), false, true );\n\t\t\n\t\t\t$this->register_scripts_css();\n\t\t}",
"public function myScripts()\n {\n //wp_register_script('angularjs',plugins_url('bower_components/angular/angular.min.js', __FILE__));\n wp_enqueue_style('grimagecss', plugins_url('style.css', __FILE__));\n //wp_enqueue_script('grimagescripts',plugins_url('/app.js',__FILE__));\n }",
"public function admin_enqueue_scripts()\n\t\t{\n\t\t\tglobal $pagenow; \n\t\t\tif (is_admin() || $pagenow === 'wc_prd_vendor') { \n\t\t\t\twp_register_script( 'bootstrap-tooltip', $this->assets_url . 'js/bootstrap-tooltip.js', array( 'jquery' ), '1.0' );\n\t\t\t\twp_register_script( 'select2', $this->assets_url . 'js/select2/select2.min.js', array( 'jquery' ), '3.5.2' );\n\t\t\t\twp_register_script( 'topgroupshops-media', $this->assets_url . 'js/topgroupshops-media.js', array( 'jquery' ), '1.0' );\n\t\t\t\twp_register_script( 'sf-scripts', $this->assets_url . 'js/sf-jquery.js', array( 'jquery' ), '1.0' );\n\t\t\t\twp_register_style( 'select2', $this->assets_url . 'js/select2/select2.css' );\n\t\t\t\twp_register_style( 'sf-styles', $this->assets_url . 'css/sf-styles.css' );\n\t\t\t}\n\t\t}",
"public function register_assets() {\n\n $scripts = $this->get_scripts();\n $styles = $this->get_styles();\n\n foreach ( $scripts as $handle => $script ) {\n $deps = isset( $script['deps'] ) ? $script['deps'] : false;\n\n wp_register_script( $handle, $script['src'], $deps, $script['version'], true );\n }\n\n foreach ( $styles as $handle => $style ) {\n $deps = isset( $style['deps'] ) ? $style['deps'] : false;\n\n wp_register_style( $handle, $style['src'], $deps, $style['version'] );\n }\n\n wp_localize_script( 'cbxcf-scripts', 'cbxcfObj', [\n 'ajaxurl' => admin_url( 'admin-ajax.php' ),\n 'error' => __( 'Something went wrong', 'cbxcustomform' ),\n ] );\n\n }",
"function inject_scripts() {\n\n\tglobal $wp_styles, $wp_scripts;\n\n\t//Default way of loading styles. Version number added to ensure\n\t//the correct version is sent to the client regardless of caching.\n\twp_register_style( 'style', get_stylesheet_uri(), false, '1.0.0' );\n\twp_enqueue_style( 'style' );\n\n\t// Adds an ie8 and below stylesheet:\t\n\twp_enqueue_style( 'ie8_style', get_stylesheet_directory_uri() . '/css/ie8.css', array( 'style' ) );\n\twp_style_add_data( 'ie8_style', 'conditional', 'lte IE 8' );\n\n\n\t$js_dir = get_template_directory_uri() . '/js';\n\t$js_libs = $js_dir . '/bower_components';\n\n\t//Loads requirejs, all scripts are set true to push them into the footer:\n\twp_enqueue_script( 'requrejs', $js_libs . '/requirejs/require.js', array(), '', true );\n\n\n\t//config file that depends on requirejs.\n\twp_register_script( 'optimize', $js_dir . '/optimize.min.js', '', '', true );\n\n\n\t//Creates a json object so the configjs knows its directory. \n\twp_localize_script( 'optimize', 'dir', array(\n\t\t'path'\t\t=> $js_dir,\n\t\t'ajax_url'\t=> admin_url( 'admin-ajax.php' )\n\t));\n\n\n\twp_enqueue_script( 'optimize', '', '', '', true );\n\n\t// Styles for the lightbox plugin.\n\twp_register_style('lightbox-style', $js_libs . '/lightbox2/dist/css/lightbox.min.css' );\n\twp_enqueue_style( 'lightbox-style' );\n\n}",
"public function enqueue_scripts() {\n\n\t}",
"public function enqueue_scripts() {\n\t\tif ( is_singular() ) wp_enqueue_script( 'comment-reply' );\n\n\t\twp_enqueue_style( 'app', get_template_directory_uri().'/assets/css/app.css', false, '1.0.0', 'all' );\n\t\twp_enqueue_script( 'foundation-modernizr', get_template_directory_uri().'/bower_components/foundation/js/vendor/modernizr.js', false, '', false );\n\t\twp_enqueue_script( 'foundation-fastclick', get_template_directory_uri().'/bower_components/foundation/js/vendor/fastclick.js', false, '', true );\n\t\twp_enqueue_script( 'foundation', get_template_directory_uri().'/bower_components/foundation/js/foundation.min.js', array('jquery'), '', true );\n\t\twp_enqueue_script( 'main', get_template_directory_uri().'/assets/js/main.js', array('jquery', 'foundation'), '1.0.0', true );\n\t}",
"public function enqueueAssets()\n {\n wp_enqueue_style( WPADW_DOMAIN . '-admin-style', WPADW_URL . '/assets/style.css' );\n }",
"function _s_scripts() {\n\twp_enqueue_style( 'main.css', get_stylesheet_directory_uri() . '/dist/src/style.css', false, '6.9' );\n\twp_enqueue_script( 'main.js', get_stylesheet_directory_uri() . '/dist/main.js', false, false, true );\n}",
"public function enqueue_scripts() {\n\n\t\tif ($this->js) {\n\t\t\tforeach ($this->js as $js) {\n\t\t\t\t$fileTitle = basename($js['link']);\n\t\t\t\t$fileTitle = str_replace('.js', '', $fileTitle);\n\t\t\t\t$fileTitle = preg_replace(\n\t\t\t\t\t'/[^0-9a-zA-Z]/',\n\t\t\t\t\t\"-\",\n\t\t\t\t\tstr_replace('@', '', $js['package']) . '-' . $fileTitle\n\t\t\t\t);\n\t\t\t\twp_enqueue_script($fileTitle, $js['link'], array(), $js['version']);\n\t\t\t}\n\t\t}\n\t}",
"protected function addAssets(): void\n {\n $this->enqueue('assets/dashifen-2022.js');\n $font1 = $this->enqueue('//fonts.googleapis.com/css2?family=El+Messiri&display=swap');\n $font2 = $this->enqueue('//fonts.googleapis.com/css2?family=Roboto&display=swap');\n $css = $this->enqueue('assets/dashifen-2022.css', [$font1, $font2]);\n \n $dir = trailingslashit($this->getStylesheetDir());\n if (file_exists($dir . 'assets/dashifen-2022-components.css')) {\n $this->enqueue('assets/dashifen-2022-components.css', [$css]);\n }\n }",
"public function set_script_styling(){\r\n /**\r\n * enqueue css styling here\r\n */\r\n wp_enqueue_style('before-after-comparison-styling', plugin_dir_url( __FILE__ ) . 'css/before-after.css', array(), '1.0');\r\n\r\n /**\r\n * enqueue custom js / javascript library here\r\n */\r\n wp_enqueue_script('before-after-comparison-javascript', plugin_dir_url( __FILE__ ) . 'js/before-after.js', array('jquery'), '1.0' , false);\r\n\r\n \r\n }",
"public function wp_enqueue_scripts() {\n wp_enqueue_style('normalize', get_template_directory_uri() .\n '/normalize.css', array(), '8.0.1');\n wp_enqueue_style('theme-css', get_stylesheet_uri(),\n array(), '1.0');\n wp_enqueue_script('jquery');\n }",
"static function include_scripts(){\n\t\t//self::include_css();\n\t\tself::include_js();\n\t}",
"function cam_enqueue_related_pages_scripts_and_styles(){\n // wp_enqueue_style('related-styles', plugins_url('/css/bootstrap.min.css', __FILE__));\n wp_enqueue_script('releated-script', plugins_url( '/js/custom.js' , __FILE__ ), array('jquery','jquery-ui-droppable','jquery-ui-draggable', 'jquery-ui-sortable'));\n }",
"function aitAdminEnqueueScriptsAndStyles()\n{\n\t$mapLanguage = get_locale();\n\taitAddScripts(array(\n\t\t'ait-googlemaps-api' => array(\n\t\t\t\t\t\t\t\t\t //'file' => 'https://maps.google.com/maps/api/js?key=AIzaSyC62AaIu5cD1nwSCmyO4-33o3DjkFCH4KE&sensor=false&language='.$mapLanguage,\n\t\t\t\t\t\t\t\t\t 'file' => 'https://maps.google.com/maps/api/js?key=AIzaSyBL0QWiORKMYd585E4qvcsHcAR1R7wmdiY&sensor=false&language='.$mapLanguage,\n\t\t\t\t\t\t\t\t\t 'deps' => array('jquery')\n\t\t\t\t\t\t\t\t\t ),\n\t\t'ait-jquery-gmap3' => array('file' => THEME_JS_URL . '/libs/gmap3.min.js', 'deps' => array('jquery', 'ait-googlemaps-api')),\n\t));\n}",
"function berry_scripts() {\n\n\twp_dequeue_style( 'seed-style');\n\twp_enqueue_style( 'berry-style', get_stylesheet_uri() );\n\twp_enqueue_script( 'berry-main', get_stylesheet_directory_uri() . '/js/main.js', array(), '2016-1', true );\n\n}",
"public function wcufd_load_styles_scripts() {\n //main script file of the plugin\n wp_register_script( 'wcufd-front-end-js', plugins_url( 'js/wcufd-script.js',__FILE__ ), array('jquery'), '', true );\n wp_localize_script( 'wcufd-front-end-js', 'wcufd_vars', array(\n 'ajaxurl' => admin_url('admin-ajax.php'),\n 'current_user_can' => current_user_can('administrator')\n )\n );\n wp_register_style( 'wcufd-front-end-style', plugins_url( 'css/wcufd-style.css',__FILE__ ) );\n }",
"function grd_scripts() {\n\twp_enqueue_style( 'main-style', get_stylesheet_uri() );\n\tif( !is_admin() ) {\n\t\twp_enqueue_script( 'jquery' );\n\t\twp_enqueue_script( 'modernizr', get_template_directory_uri() . '/bower_components/modernizr/modernizr.js', array('jquery'), NULL, true );\n\t\twp_enqueue_script( 'plugins', get_template_directory_uri() . '/assets/scripts/plugins.min.js', array('jquery'), NULL, true );\n\t\twp_enqueue_script( 'scripts', get_template_directory_uri() . '/assets/scripts/main.min.js', array('jquery'), NULL, true );\n\t\tif( DEV ) {\n\t\t\twp_enqueue_script( 'livereload', '//localhost:35729/livereload.js', NULL, NULL, true);\n\t\t}\n\t}\n}",
"function ajout_scripts() {\n wp_enqueue_style('bootstrap', get_template_directory_uri() . '/assets/bootstrap/css/bootstrap.min.css');\n wp_enqueue_style('font-awesome', get_template_directory_uri() . '/assets/fonts/font-awesome.min.css');\n wp_enqueue_style('font-awesome', get_template_directory_uri() . '/assets/css/styles.min.css');\n wp_enqueue_style('font-1', 'https://fonts.googleapis.com/css?family=Open+Sans');\n wp_enqueue_style('font-2', 'https://fonts.googleapis.com/css?family=Roboto');\n\n wp_enqueue_script('messcripts', get_template_directory_uri() . '/assets/js/jquery.min.js');\n wp_enqueue_script('messcripts2', get_template_directory_uri() . '/assets/js/script.js');\n wp_enqueue_style('crdStyles', get_stylesheet_uri());\n\n\n}",
"function assets() {\n\t\tif ( ! is_admin() ) {\n\t\t\twp_enqueue_style( '_yourthemename-style', get_theme_file_uri( '/dist/css/bundle.css' ), array(), _YOURTHEMENAME_VER );\n\n\t\t\twp_deregister_script( 'jquery' );\n\t\t\twp_enqueue_script( '_yourthemename-scripts', get_theme_file_uri( '/dist/js/bundle.min.js' ), array(), _YOURTHEMENAME_VER, true );\n\t\t}\n\t\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\t\twp_enqueue_script( 'comment-reply' );\n\t\t}\n\t}",
"function krypton_scripts() {\n\twp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css');\n\twp_enqueue_style( 'style', get_template_directory_uri() . '/css/style.css' );\n\t//wp_enqueue_script( 'modernizr', get_template_directory_uri() . '/js/modernizr.js');\n}",
"public function editor_scripts() {\n\t\tadd_filter( 'script_loader_tag', [ $this, 'editor_scripts_as_a_module' ], 10, 2 );\n\n\t\twp_enqueue_style( 'elementor-editor-style', plugins_url( '/assets/editor.css', __FILE__ ) ); // Editor Style\n\t\t\n\t}",
"public function enqueue_scripts() {\n\n /**\n * All styles goes here\n */\n wp_enqueue_style( 'wp-allmeta-styles', plugins_url( 'css/style.css', __FILE__ ), false, date( 'Ymd' ) );\n\n /**\n * All scripts goes here\n */\n wp_enqueue_script( 'wp-allmeta-scripts', plugins_url( 'js/script.js', __FILE__ ), array( 'jquery' ), false, true );\n\n\n /**\n * Example for setting up text strings from Javascript files for localization\n *\n * Uncomment line below and replace with proper localization variables.\n */\n // $translation_array = array( 'some_string' => __( 'Some string to translate', 'baseplugin' ), 'a_value' => '10' );\n // wp_localize_script( 'base-plugin-scripts', 'baseplugin', $translation_array ) );\n\n }",
"public function enqueue_assets() {\n\t\twp_enqueue_script( 'satispress-admin' );\n\t\twp_enqueue_style( 'satispress-admin' );\n\t}",
"public function enqueue_scripts(){\n\t\t\t// Add the color picker JS & CSS files\n\t\t\twp_enqueue_style( 'wp-color-picker' );\n\t\t\twp_enqueue_script( 'wp-color-picker' );\n\t\t}",
"private function __register_scripts() {\n\t\t// Load all the registered scripts\n\t\t$assets_loader = new SwpmvcAssetsLoader();\n\t\t$assets = $assets_loader->fn_load_scripts();\n\n\t\t//Extract CSS Assets and put them into Registered CSS Container\n\t\t$this->registered_css = $assets[ 'css' ];\n\n\t\t//Extract JS Assets and put them into Registered JS Container\n\t\t$this->registered_js = $assets[ 'js' ];\n\n\t\t//Some cleanup\n\t\tunset($assets_loader);\n\t\tunset($assets);\n\n\t\t//Load all the common CSS and JS which will be required for all the pages.\n\t\t$this->fn_load_scripts();\n\t}",
"protected function enqueue_scripts()\n {\n\n }",
"public function enqueue_scripts()\n {\n if (is_singular($this->token)) {\n wp_register_style($this->token, esc_url($this->assets_url . 'css/chiroquiz.css'), [], CHIRO_QUIZ_PLUGIN_VERSION);\n wp_register_style('animate', esc_url($this->assets_url . 'css/animate.css'), [], CHIRO_QUIZ_PLUGIN_VERSION);\n wp_register_style('roboto', 'https://fonts.googleapis.com/css?family=Roboto:400,400italic,500,500italic,700,700italic,900,900italic,300italic,300');\n wp_register_style('robo-slab', 'https://fonts.googleapis.com/css?family=Roboto+Slab:400,700,300,100');\n wp_enqueue_style($this->token);\n wp_enqueue_style('animate');\n wp_enqueue_style('roboto');\n wp_enqueue_style('roboto-slab');\n\n wp_register_script('icheck', esc_url($this->assets_url . 'js/icheck.js'), ['jquery']);\n wp_register_script($this->token . '-js', esc_url($this->assets_url . 'js/scripts.js'), [\n 'jquery',\n 'icheck'\n ]);\n wp_enqueue_script('icheck');\n wp_enqueue_script($this->token . '-js');\n wp_register_script('platform-email-validator', esc_url($this->assets_url . 'js/platform-email-validator.js'), [\n 'jquery'\n ], CHIRO_QUIZ_PLUGIN_VERSION);\n wp_enqueue_script('platform-email-validator');\n\n $localize = [\n 'ajaxurl' => admin_url('admin-ajax.php'),\n ];\n wp_localize_script($this->token . '-js', 'ChiroQuiz', $localize);\n }\n }",
"function flexiauto_scripts_loader() {\n\t\t/* Load custom styles */\n\t\twp_enqueue_style('reset', TPL_DIR . '/assets/css/vendor/reset.css');\n\t\twp_enqueue_style('bootstrap-styles', TPL_DIR . '/assets/css/vendor/bootstrap.min.css');\n\t\twp_enqueue_style('flexi-styles', TPL_DIR . '/assets/css/flexi.min.css');\n\n\t\t/* Load custom scripts */\n\t\twp_deregister_script('jquery');\n\t\twp_register_script('jquery', TPL_DIR . '/assets/js/vendor/jquery.min.js', array(), false, true);\n\t\twp_enqueue_script('jquery');\n\n\t\twp_enqueue_script('bootstrap-scripts', TPL_DIR . '/assets/js/vendor/bootstrap.min.js', array(), false, true);\n\t\twp_enqueue_script('nicescroll', TPL_DIR . '/assets/js/vendor/jquery.nicescroll.min.js', array(), false, true);\n\t\twp_enqueue_script('jquery-validate', TPL_DIR . '/assets/js/vendor/jquery.validate.min.js', array(), false, true);\n\t\twp_enqueue_script('match-height', TPL_DIR . '/assets/js/vendor/jquery.matchHeight.min.js', array(), false, true);\n\t\twp_enqueue_script('flexi-scripts', TPL_DIR . '/assets/js/flexi.min.js', array(), false, true);\n\n\t}",
"public function scripts()\n\t{\n\n\t\twp_enqueue_script('jquery');\n\n\t\t// If using the regular comments of wordpress\n\t\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\t\twp_enqueue_script( 'comment-reply' );\n\t\t}\n\t\t//put modernizr as late as possible\n\t\twp_enqueue_script('bootstrap',DION_THEME_URL.'/assets/js/bootstrap.min.js');\n\t\twp_enqueue_script('owl-carousel',DION_THEME_URL.'/assets/js/owl.carousel.min.js');\n\t\twp_enqueue_script('darkmode','https://cdn.jsdelivr.net/npm/[email protected]/lib/darkmode-js.min.js');\n\t\twp_enqueue_script('main',DION_THEME_URL.'/assets/js/main.min.js');\n\t}",
"function kinectiv_start_scripts() {\n\twp_enqueue_style('kinectiv-start-style', get_stylesheet_directory_uri() . '/style.min.css', array(), '0.1.0');\n//\twp_enqueue_style('kinectiv-start-vendor-style', get_stylesheet_directory_uri() . '/css/vendor.min.css', array(), '1.0.0');\n \n wp_deregister_script('wp-embed');\n wp_deregister_script('jquery');\n wp_enqueue_script('jquery', get_template_directory_uri() . '/js/jquery-3.6.2.min.js', array(), null, true);\n\twp_enqueue_script('kinectiv-start-script', get_template_directory_uri() . '/js/script.min.js', array('jquery'), '0.1.0', true);\n}",
"function jn_scripts_styles() {\n // Loads our main stylesheet.\n wp_enqueue_style( 'jn-style', get_stylesheet_uri() );\n // Loads jQuery\n\twp_enqueue_script( 'jquery' );\n\t// Loads javascript file\n wp_enqueue_script('jn-js-responsive', get_template_directory_uri() . '/js/responsive.js');\n}",
"function enqueue_scripts() {\n\t\tinclude $this->dir_path . 'scripts.php';\n\t}",
"public function enqueue_styles_scripts() {\n\n\t\t// If tota11y is enabled...\n\t\tif ( wa11y()->can_load_tota11y() ) {\n\n\t\t\t// This file belongs in the header.\n\t\t\twp_enqueue_script( 'tota11y', plugins_url( '/tools/tota11y/tota11y.min.js', __FILE__ ), array(), $this->plugin_version );\n\n\t\t}\n\t}",
"function starkers_script_enqueuer() {\n\t\twp_register_script( 'site', get_template_directory_uri().'/js/scripts.min.js', array( 'jquery' ) );\n\t\twp_enqueue_script( 'site' );\n\n\t\twp_register_style( 'screen', get_stylesheet_directory_uri().'/style.css', '', '', 'screen' );\n\t\twp_enqueue_style( 'screen' );\n\t}",
"function beaver_extender_fe_style_editor_load_scripts() {\n\n\twp_enqueue_style( 'dashicons' );\n\twp_enqueue_style( 'beaver_extender_fe_style_editor_styles' );\n\twp_enqueue_style( 'beaver_extender_jquery_ui_css', '//ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css', false, BBEXT_VERSION, false );\n\twp_enqueue_script( 'jquery-ui-resizable' );\n\twp_enqueue_script( 'beaver_extender_fe_style_editor' );\n\twp_enqueue_script( 'beaver_extender_ace' );\n\twp_enqueue_script( 'beaver_extender_ace_autocomplete' );\n\t\t\n}",
"public function load_admin_scripts()\n {\n // Enqueue styles\n wp_enqueue_style('soccerpress', plugins_url('assets/css/soccerpress.css', __FILE__), array(), '1.0.0', false);\n wp_enqueue_style('bootstrap-css', plugins_url('assets/css/bootstrap.min.css', __FILE__), array(), '4.3.1', false);\n\n // Enqueue scripts\n wp_register_script('bootstrap-js', plugins_url('assets/js/bootstrap.min.js', __FILE__), array(), '4.3.1', false);\n }",
"private function register_scripts()\n\t{\n\t\tif (is_admin()) {\n\t\t\t// Load our main stylesheet.\n\t\t\twp_enqueue_style('kd-letters', plugin_dir_url( __FILE__ ) . '/templates/style/kd-letters.css');\n\t\t}\n\t}",
"public function enqueue() {\n\n\t\t\twp_enqueue_script( 'jquery-ui-core' );\n\t\t\twp_enqueue_script( 'jquery-ui-slider' );\n\t\t\twp_enqueue_script( 'brand-slider-js', get_template_directory_uri() . '/assets/javascripts/admin/customcontrol.slider.js', array('jquery'), BRAND_VER );\n\t\t\twp_enqueue_style('jquery-ui-slider', get_template_directory_uri() . '/assets/css/admin/jquery-ui.structure.css');\n\t\t\twp_enqueue_style('jquery-ui-slider-theme', get_template_directory_uri() . '/assets/css/admin/jquery-ui.theme.css');\n\n\t\t}",
"function estilos_scripts() { \n wp_enqueue_style('googlefonts', '//fonts.googleapis.com/css?family=PT+Sans:400,400i,700,700i|Yanone+Kaffeesatz:400,700', array(), '' , 'screen', false);\n wp_enqueue_style('fontawesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css', array(), '' , 'screen', false);\n wp_enqueue_style('layout', get_template_directory_uri() . '/css/layout.css', array(), '', 'all', null);\n\n wp_enqueue_script( 'canvas', get_template_directory_uri() . '/js/canvas.js', array('jquery'), '', true);\n wp_enqueue_script( 'bx', get_template_directory_uri() . '/js/bx.js', array('jquery'), '', true);\n wp_enqueue_script( 'scripts', get_template_directory_uri() . '/js/scripts.js', array('bx'), '', true);\n}",
"function addScriptsStyles(){\n\t\twp_enqueue_script( 'dashicons-picker', plugins_url( 'post_icon/vendor/dashicons-picker/js/dashicons-picker.js' ), array( 'jquery' ) );\n\t\twp_enqueue_style( 'dashicons-picker', plugins_url( 'post_icon/vendor/dashicons-picker/css/dashicons-picker.css' ), array( 'dashicons' ) );\n\t\twp_enqueue_script( 'post_icon_script', plugins_url( 'post_icon/js/post_icon.js' ), array( 'jquery' ) );\n\t}",
"public function enqueue_scripts()\n\t{\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Prosvit_Extension_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Prosvit_Extension_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\t\twp_enqueue_script('script_select2', plugin_dir_url(__FILE__) . 'js/select2.min.js', array('jquery'), $this->version, false);\n\t\twp_enqueue_script($this->plugin_name, plugin_dir_url(__FILE__) . 'js/prosvit-extension-admin.js', array('jquery'), $this->version, false);\n\t}",
"function enqueue_styles_and_scripts( ) {\n\t\t$base_url = plugins_url( '', __FILE__ );\n\t\twp_enqueue_script(\n\t\t\t'pr_advance_ui_widget',\n\t\t\t $base_url . 'js/pr_advance_ui_widget.js',\n\t\t\tarray( 'jquery', 'jquery-ui-core', 'jquery-ui-widget', 'jquery-ui-mouse', 'jquery-ui-sortable', 'underscore', 'backbone' )\n\t\t);\n\n\t\twp_enqueue_style(\n\t\t\t'pr_advance_ui_widget',\n\t\t\t$base_url . 'css/pr_advance_ui.css'\n\t\t);\n\t}",
"function scripts() {\n\t/**\n\t * Flag whether to enable loading uncompressed/debugging assets. Default false.\n\t *\n\t * @param bool project_script_debug\n\t */\n\t$debug = apply_filters( 'project_script_debug', false );\n\t$min = ( $debug || defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';\n\n\twp_enqueue_script(\n\t\t'modernizr-custom',\n\t\tProject_TEMPLATE_URL . '/assets/js/vendor/modernizr-custom.min.js',\n\t\tfalse, '2.7.2'\n\t);\n\twp_enqueue_script(\n\t\t'project',\n\t\tProject_TEMPLATE_URL . \"/assets/js/project-theme{$min}.js\",\n\t\tarray(),\n\t\tProject_VERSION,\n\t\ttrue\n\t);\n}",
"public function enqueue()\n {\n foreach ($this->assets as $name => $asset) {\n if (preg_match('/\\.js$/', $asset)) {\n wp_enqueue_script($name, $this->assetsUrl . $asset, [], false, true);\n }\n if (preg_match('/\\.css$/', $asset)) {\n wp_enqueue_style($name, $this->assetsUrl . $asset);\n }\n }\n }",
"public function scripts()\n {\n $scripts = array(\n array(\n 'handler' => 'yatri-google-fonts',\n 'style' => esc_url('//fonts.googleapis.com/css?family=Poppins:300,400,400i,500,600,700|Rubik:400,500,700,900'),\n 'absolute' => true\n ),\n\n array(\n 'handler' => 'yatri-style',\n 'style' => get_stylesheet_uri(),\n 'absolute' => true,\n ), array(\n 'handler' => 'yatri-main',\n 'style' => get_theme_file_uri('/assets/css/yatri.css'),\n 'absolute' => true,\n 'version' => YATRI_THEME_VERSION\n ),\n array(\n 'handler' => 'yatri-script',\n 'script' => get_theme_file_uri('/assets/js/yatri.js'),\n 'absolute' => true,\n 'prefix' => '',\n 'dependency' => array('jquery')\n )\n );\n\n\n Mantrabrain_Theme_Helper_Typo::render_fonts();\n\n $this->yatri_enqueue(apply_filters('yatri_scripts_styles', $scripts));\n\n $locale = apply_filters('yatri_localize_var', array(\n\n 'is_admin_bar' => is_admin_bar_showing() ? true : false,\n\n ));\n\n wp_localize_script('yatri-script', 'yatri_obj', $locale);\n\n if (is_singular() && comments_open()) {\n wp_enqueue_script('comment-reply');\n }\n }",
"public function enqueue_assets()\n\t{\n\t\twp_enqueue_script( 'automatic-link-title', plugins_url( '/script.js', __FILE__ ), array(), false, true );\n\t}",
"public function enqueue() {\n\n\t\t\twp_enqueue_script( 'jquery-ui-core' );\n\t\t\twp_enqueue_script( 'jquery-ui-slider' );\n\t\t\twp_enqueue_script( 'brand-slider-js', get_template_directory_uri() . '/assets/javascripts/admin/customcontrol.slider.js', array( 'jquery' ), BRAND_VER );\n\t\t\twp_enqueue_style( 'jquery-ui-slider', get_template_directory_uri() . '/assets/css/admin/jquery-ui.structure.css' );\n\t\t\twp_enqueue_style( 'jquery-ui-slider-theme', get_template_directory_uri() . '/assets/css/admin/jquery-ui.theme.css' );\n\n\t\t}",
"public function enqueue() {\n\n\t\t\twp_enqueue_script( 'jquery-ui-core' );\n\t\t\twp_enqueue_script( 'jquery-ui-slider' );\n\t\t\twp_enqueue_script( 'brand-slider-js', get_template_directory_uri() . '/assets/javascripts/admin/customcontrol.slider.js', array( 'jquery' ), BRAND_VER );\n\t\t\twp_enqueue_style( 'jquery-ui-slider', get_template_directory_uri() . '/assets/css/admin/jquery-ui.structure.css' );\n\t\t\twp_enqueue_style( 'jquery-ui-slider-theme', get_template_directory_uri() . '/assets/css/admin/jquery-ui.theme.css' );\n\n\t\t}",
"public function enqueue() {\n\n\t\t\twp_enqueue_script( 'jquery-ui-core' );\n\t\t\twp_enqueue_script( 'jquery-ui-slider' );\n\t\t\twp_enqueue_script( 'brand-slider-js', get_template_directory_uri() . '/assets/javascripts/admin/customcontrol.slider.js', array( 'jquery' ), BRAND_VER );\n\t\t\twp_enqueue_style( 'jquery-ui-slider', get_template_directory_uri() . '/assets/css/admin/jquery-ui.structure.css' );\n\t\t\twp_enqueue_style( 'jquery-ui-slider-theme', get_template_directory_uri() . '/assets/css/admin/jquery-ui.theme.css' );\n\n\t\t}",
"public function enqueue_scripts() {\n\n\t\twp_enqueue_script ( 'jquery-2', 'https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js', array(), $this->version, false);\n wp_enqueue_script ( 'stripe.js', 'https://js.stripe.com/v2/', array(), $this->version, false );\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/pewin-payments-public.js', array('jquery-2', 'stripe.js'), $this->version, true );\n\n\t}",
"function theme_scripts() {\n wp_enqueue_style('main', CSS . '/main.css');\n wp_enqueue_style('my', CSS . '/my.css');\n wp_enqueue_script('scripts', JS . '/main.js', array('jquery'), null, true);\n }",
"function enqueue_scripts() {\n\n wp_register_style( 'dg-text-css', plugins_url('css/dg-text.css', __FILE__), null, '1', 'all' );\n wp_enqueue_style( 'dg-text-css' );\n }",
"public function enqueue_scripts()\n {\n wp_enqueue_script($this->andmoraho_vendors, plugin_dir_url(__FILE__) . 'js/andmoraho-vendors-admin.js', array( 'jquery' ), $this->version, false);\n }",
"function enqueue_script() {\n\t\twp_enqueue_script( 'aztec-vendors-script', get_stylesheet_directory_uri() . '/assets/vendor.js', [], false, true );\n\t\twp_enqueue_script( 'aztec-script', get_stylesheet_directory_uri() . '/assets/app.js', [ 'aztec-vendors-script', 'jquery' ], false, true );\n\t}",
"public function enqueue_scripts () {\n\n\t\t$visibility = apply_filters( 'wp_simple_flexslider_insert_frontend_script', true );\n\n\t\tif( $visibility ) {\n\t\t\twp_enqueue_style( 'jquery-flexslider', WP_SIMPLE_FLEXSLIDER_URL . 'flexslider/flexslider.css', array(), '2.3.0', 'all' );\n\t\t\twp_register_script( 'jquery-flexslider', WP_SIMPLE_FLEXSLIDER_URL . 'flexslider/jquery.flexslider-min.js', array( 'jquery'), '2.3.0', 'all' );\n\t\t\twp_enqueue_script( 'wc-simple-flexslider-frontend', WP_SIMPLE_FLEXSLIDER_URL . 'js/wp-simple-flexslider-frontend.js', array( 'jquery', 'jquery-flexslider' ), '0.1', 'all' );\n\t\t}\n\t}",
"function mgr_add_scripts(){\n wp_enqueue_style('mgr-main-style',plugins_url().'/includes/my-github-repos/css/style.css');\n wp_enqueue_script('mgr-main-script',plugins_url().'/includes/my-github-repos/js/main.js');\n}",
"public function action_wp_enqueue_scripts() {\n\n\t\twp_enqueue_style( 'bootstrap', get_stylesheet_directory_uri() . '/lib/bootstrap/dist/css/bootstrap.css' );\n\t\twp_enqueue_style( 'core-style', get_stylesheet_directory_uri() . '/assets/stylesheets/core.css' );\n\n\t}",
"protected function enqueue_scripts()\n {\n wp_enqueue_style('tify_control-text_remaining');\n wp_enqueue_script('tify_control-text_remaining');\n }",
"function theme_scripts() {\n\t\twp_enqueue_style('bootstrap-css', get_template_directory_uri().'/styles/bootstrap/css/bootstrap.min.css');\n\t\twp_enqueue_script('jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js');\n\t\twp_enqueue_script('bootstrap-js', get_template_directory_uri().'/styles/bootstrap/js/bootstrap.min.js');\n\t\twp_enqueue_script('custom-js', get_template_directory_uri().'/js/functions.js');\n\t}",
"public function enqueue_scripts() {\n\t\twp_enqueue_script( 'slick-js', plugin_dir_url( dirname( __FILE__, 2 ) ) . '/assets/js/slick.min.js', array( 'jquery' ), '1.8.1', false );\n\t\twp_enqueue_script( 'index-js', plugin_dir_url( dirname( __FILE__, 2 ) ) . '/assets/js/index.js', array( 'jquery', 'slick-js' ), '1.0.0', true );\n\t}",
"function load_prod_styles_scripts() {\n // Theme styles\n wp_enqueue_style( 'themename', CHILD_SS_URI . '/assets/dist/style.min.css', false, null, 'all' );\n\n // Header Scripts\n wp_enqueue_script( 'header_scripts', CHILD_SS_URI . '/assets/dist/header.min.js', array(), null, false );\n\n // Footer Scripts\n wp_enqueue_script( 'footer_scripts', CHILD_SS_URI . '/assets/dist/footer.min.js', array( 'jquery' ), null, true );\n\n // Single Scripts\n if ( is_single() ) {\n wp_enqueue_script( 'single_scripts', CHILD_SS_URI . '/assets/dist/single.min.js', array( 'jquery' ), null, true );\n }\n}",
"function aitEnqueueScriptsAndStyles(){\r\n\tif(!is_admin()){\r\n\t\t// just shortcuts\r\n\t\t$s = THEME_CSS_URL;\r\n\t\t$j = THEME_JS_URL;\r\n\r\n\t\taitAddStyles(array(\r\n\t\t\t'ait-colorbox' => array('file' => \"$s/libs/colorbox.css\"),\r\n\t\t\t'ait-fancybox' => array('file' => \"$s/libs/fancybox.css\"),\r\n\t\t\t'jquery-ui' \t => array('file' => \"$s/libs/jquery-ui.css\"),\r\n\t\t\t'prettysociable' => array('file' => \"$s/libs/prettySociable.css\"),\r\n\t\t\t'hoverzoom' \t => array('file' => \"$s/libs/hoverZoom.css\"),\r\n\t\t));\r\n\r\n\t\taitAddScripts(array(\r\n\t\t\t'jquery-ui-tabs' \t\t\t=> true,\r\n\t\t\t'jquery-ui-accordion' \t\t\t=> true,\r\n\t\t\t'jquery-infieldlabel' \t\t\t=> array('file' => \"$j/libs/jquery-infieldlabel.js\", 'deps' => array('jquery'), 'inFooter' => true),\r\n\t\t\t'jquery-iconmenu' \t\t\t\t=> array('file' => \"$j/libs/jquery-iconmenu.js\", 'deps' => array('jquery'), 'inFooter' => true),\r\n\t\t\t'jquery-plugins'\t \t\t\t=> array('file' => \"$j/libs/jquery-plugins.js\", 'deps' => array('jquery')),\r\n\t\t\t'modernizr'\t\t\t\t\t\t=> array('file' => \"$j/libs/modernizr-2.6.1-custom.js\", 'deps' => array('jquery'), 'inFooter' => true),\r\n\r\n\t\t\t'ait-gridgallery' \t\t\t=> array('file' => \"$j/gridgallery.js\", 'deps' => array('jquery', 'jquery-plugins'), 'inFooter' => true),\r\n\t\t\t'ait-testimonials' \t\t\t=> array('file' => \"$j/testimonials.js\", 'deps' => array('jquery'), 'inFooter' => true),\r\n\t\t\t'ait-script' \t\t\t=> array('file' => \"$j/script.js\", 'deps' => array('jquery', 'jquery-infieldlabel', 'jquery-iconmenu', 'jquery-plugins', 'modernizr'), 'inFooter' => true),\r\n\t\t));\r\n\t}\r\n}",
"function scripts() {\n\t/**\n\t * Flag whether to enable loading uncompressed/debugging assets. Default false.\n\t *\n\t * @param bool additive_script_debug\n\t */\n\t$debug = apply_filters( 'additive_script_debug', false );\n\t$min = ( $debug || defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';\n\n\twp_enqueue_script(\n\t\t'additive',\n\t\tADDITIVE_TEMPLATE_URL . \"/assets/js/additive{$min}.js\",\n\t\tarray(),\n\t\tADDITIVE_VERSION,\n\t\ttrue\n\t);\n}"
] | [
"0.8355911",
"0.83102393",
"0.81099236",
"0.81094503",
"0.8033818",
"0.8030976",
"0.8022785",
"0.80185866",
"0.79766554",
"0.7893782",
"0.7878214",
"0.78743124",
"0.7846936",
"0.7846936",
"0.78128856",
"0.78085685",
"0.77904135",
"0.7768226",
"0.7753163",
"0.7750818",
"0.7720531",
"0.7698098",
"0.76871055",
"0.7684897",
"0.7682463",
"0.7682125",
"0.7681963",
"0.7681082",
"0.7681031",
"0.7655907",
"0.76538527",
"0.76333034",
"0.7631939",
"0.76310074",
"0.7625597",
"0.7609923",
"0.7607133",
"0.75917864",
"0.7579891",
"0.75706553",
"0.75668603",
"0.7561768",
"0.7561744",
"0.7557717",
"0.75566524",
"0.755267",
"0.7551731",
"0.75493395",
"0.754931",
"0.7546021",
"0.75364",
"0.75352967",
"0.7526517",
"0.75249153",
"0.75240165",
"0.7522893",
"0.7515282",
"0.7514387",
"0.75129575",
"0.75115764",
"0.7511403",
"0.7510901",
"0.75073576",
"0.7505565",
"0.7501604",
"0.7501343",
"0.74910975",
"0.7490968",
"0.74889666",
"0.7483834",
"0.7481826",
"0.7477342",
"0.74717486",
"0.7470491",
"0.746386",
"0.7452892",
"0.7449219",
"0.7444101",
"0.74422777",
"0.7438953",
"0.7438251",
"0.7433347",
"0.7432551",
"0.7425966",
"0.7424934",
"0.7424934",
"0.7424934",
"0.7424776",
"0.74198633",
"0.7419483",
"0.74173856",
"0.7412428",
"0.74096185",
"0.74092835",
"0.74087614",
"0.740569",
"0.74052197",
"0.74040097",
"0.74014336",
"0.7399914",
"0.73968834"
] | 0.0 | -1 |
Execute a job with the passed data. | abstract public function handle(array $job_info, $message): void; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function fire($job, $data)\n {\n /** @var \\Closure $closure */\n $closure = unserialize($data['closure']);\n $closure($job);\n }",
"protected function invokeJob(QueueData $data) {\n try {\n $result = $data->job->run();\n\n $this->model->delete($data);\n } catch (Exception $exception) {\n $message = $exception->getMessage();\n $message = get_class($exception) . (!empty($message) ? ': ' . $message : '');\n $trace = $exception->getTraceAsString();\n\n Zibo::getInstance()->runEvent(Zibo::EVENT_LOG, $message, $trace, 1, self::LOG_NAME);\n\n $data->isInProgress = false;\n $data->isError = true;\n $data->error = $message . \"\\n\\nTrace:\\n\" . $trace;\n\n $this->model->save($data);\n\n $result = null;\n }\n\n return $result;\n }",
"public function work(Job $job);",
"public function work(Job $job);",
"public function fire($job, $data)\n {\n // Q: Can returned SKUs be processed in the same transaction as a purchase SKU? YES - Confirmed by Danny\n\n\n\n\n /**\n * Required:\n * - transaction_id\n * - person_id\n * - transaction_items\n * - product ID / sku\n * - product category\n * - value (+/-)\n *\n * To do:\n * - Work out what they have just purchased\n * - Check returncount against member resource\n * - Apply reward logic to purchase\n * - Apply reward - add to rewards table\n * - Create plain-english event(s) for what just happened\n * - Queue email\n */\n\n\n\n // Deletes the job from the iron.io queue\n $job->delete();\n\n // Save the incoming job's ID and mark it as done\n IronWorkerLog::mark_done($job->getJobId());\n }",
"public function fire($job, $data ) {\n\n if( $job->attempts() > 10 ){ //remove job after 10 tries\n return $job->delete();\n }\n\n if( !isset($data['endpoint']) || !isset($data['username']) || !isset($data['password']) || !isset($data['statement']) ){\n \\Log::error('Insufficient data passed to xapi statement job', $data);\n return $job->delete();\n }\n\n //Setup the endpoint and version\n $this->lrs->setEndpoint( $data['endpoint'] );\n $this->lrs->setVersion( \"1.0.1\" );\n\n //Set the auth details\n switch( $data['type'] ){\n default:\n case \"basic\":\n $this->lrs->setAuth( $data['username'], $data['password']);\n break;\n }\n\n $error_msg = 'XAPI error - failed sending statement';\n\n try {\n //Send the statement\n //This will attempt to push the statement a maximum of 3 times before deleting the job and creating an error\n $response = $this->lrs->saveStatement($data['statement']);\n if( $response->success ){\n //remove the job if succesfull\n return $job->delete();\n } else {\n $content = json_decode($response->content, true);\n if( isset($content['message']) && isset($content['message'][0]) ){\n $error_msg .= \" - \".$content['message'][0];\n }\n \\Log::error($error_msg, [\n 'content' => $content,\n 'data' => $data\n ]);\n return $job->release(10);\n }\n } catch (\\Exception $e) {\n $error_msg .= \" - \".$e->getMessage();\n \\Log::error($error_msg, [\n 'exception' => $e,\n 'data' => $data\n ]);\n return $job->release(10);\n }\n\n }",
"public function executeJob()\n {\n // Fetch a job\n echo \"_\";\n $job = $this->queue\n ->watch('testtube')\n ->ignore('default')\n ->reserve();\n // Ensure we got a job.\n if ($job !== false) {\n // Extract job data.\n $jobData = json_decode($job->getData());\n \n switch ($jobData->Name) {\n case 'Wait':\n $result = $this->wait($jobData->Time);\n break;\n \n default:\n // Job definition unknown.\n break;\n }\n \n if (isset($result) && $result === true) {\n // Job succeeded. Remove it.\n $this->queue->delete($job);\n } else {\n // Job Failed. Bury it. \n $this->queue->bury($job);\n }\n }\n }",
"abstract protected function handleJobData(string $info): Job;",
"public function getQueueJob(array $data);",
"public function execute() {\n $sql = \"SELECT gcj_id_job\n FROM gems__comm_jobs\n WHERE gcj_active = 1\n ORDER BY gcj_id_order, \n CASE WHEN gcj_id_survey IS NULL THEN 1 ELSE 0 END,\n CASE WHEN gcj_round_description IS NULL THEN 1 ELSE 0 END,\n CASE WHEN gcj_id_track IS NULL THEN 1 ELSE 0 END,\n CASE WHEN gcj_id_organization IS NULL THEN 1 ELSE 0 END\";\n\n $jobs = $this->db->fetchAll($sql);\n\n if ($jobs) {\n $batch = $this->getBatch();\n foreach ($jobs as $job) {\n $batch->addTask('Mail\\\\ExecuteMailJobTask', $job['gcj_id_job']);\n }\n } else {\n $this->getBatch()->addMessage($this->_('Nothing to do, please create a mail job first.'));\n }\n }",
"public function execute() {\n\t\tContext::get()->setSourceType( 'job-runner' );\n\t\t// Get some defaults from configuration\n\t\t$basePath = 'maintenance/job-runner/';\n\n\t\t$consumer = new JobQueueConsumer(\n\t\t\t$this->getOption( 'queue' ),\n\t\t\t$this->getOptionOrConfig( 'time-limit', $basePath . 'time-limit' ),\n\t\t\t$this->getOptionOrConfig( 'max-messages', $basePath . 'message-limit' )\n\t\t);\n\n\t\t$startTime = time();\n\t\t$messageCount = $consumer->dequeueMessages();\n\n\t\t$successCount = $consumer->getSuccessCount();\n\t\t$elapsedTime = time() - $startTime;\n\t\tLogger::info(\n\t\t\t\"Processed $messageCount ($successCount successful) jobs in $elapsedTime seconds.\"\n\t\t);\n\t}",
"public function run(array $data, int $jobId): void {\n\t\t$this->io->out('CakePHP Foo plugin Example.');\n\t}",
"abstract function executeWork($arguments = array(), $options = array());",
"public function perform(&$data)\n\t{\n\t\t$action = $this->action;\n\t\treturn $action($data);\n\t}",
"public function run($data)\n {\n /*\n - type:init\n - perform filter to get all records to be updated, including id\n - create child jobs (type=work), each job has up to $this->chunkSize records\n - type:work\n - do update/delete\n */\n\n $data = json_decode(from_html($data), true);\n\n if (empty($data) || !is_array($data) || empty($data['_jobType_'])) {\n $this->job->failJob('Invalid job data.');\n return false;\n }\n\n switch ($data['_jobType_'])\n {\n // this is the parent job, find out all the records to be updated and create child jobs\n case 'init':\n\n // if uid is already provided, use them\n if (isset($data['uid'])) {\n if (!is_array($data['uid'])) {\n $data['uid'] = explode(',', $data['uid']);\n }\n\n $uidChunks = array_chunk($data['uid'], $this->chunkSize);\n foreach ($uidChunks as $chunk) {\n $tmpData = $data;\n $tmpData['uid'] = $chunk;\n $this->workJobIds[] = $this->createJobQueueConsumer($tmpData, 'work');\n }\n }\n // if updating entire list, use filter\n else if (!empty($data['entire'])) {\n // call filter api to get the ids then create a job queue for each chunk\n $filterApi = new FilterApi();\n $api = new RestService();\n $api->user = $GLOBALS['current_user'];\n $nextOffset = 0;\n $filterArgs = array('module'=>$data['module'], 'fields'=>'id');\n if (isset($data['filter'])) {\n $filterArgs['filter'] = $data['filter'];\n }\n $uidArray = array();\n\n // max_num does not need to set to chunkSize, it can be any size that makes sense\n $filterArgs['max_num'] = $this->chunkSize;\n\n // start getting all the ids\n while ($nextOffset != -1) { // still have records to be fetched\n $filterArgs['offset'] = $nextOffset;\n $result = $filterApi->filterList($api, $filterArgs);\n $nextOffset = $result['next_offset'];\n foreach ($result['records'] as $record) {\n if (!empty($record['id'])) {\n $uidArray[] = $record['id'];\n }\n }\n // create one child job for each chunk\n if (count($uidArray)) {\n $uidChunks = array_chunk($uidArray, $this->chunkSize);\n foreach ($uidChunks as $chunk) {\n $tmpData = $data;\n $tmpData['uid'] = $chunk;\n $this->workJobIds[] = $this->createJobQueueConsumer($tmpData, 'work');\n }\n }\n }\n } else {\n $this->job->failJob('Neither uid nor entire specified.');\n return false;\n }\n\n $this->job->succeedJob('Child jobs created.');\n\n // return the ids of the child jobs that have been created\n return $this->workJobIds;\n\n // this is the child job, do update\n case 'work':\n return $this->workJob($this->job, $data);\n\n default:\n break;\n }\n\n return true;\n }",
"public function fire($job, $data)\n {\n\n // Test this script anywhere (but here) by calling the following:\n // Queue::push('QueueTest', array('string' => 'Hey everyone! It is now '.date(\"Y-m-d H:i:s\")));\n\n\n File::append(storage_path('logs/queue.txt'), $data['string'].PHP_EOL);\n\n // Deletes the job from the iron.io queue\n $job->delete();\n }",
"final public function execute($data) {\n if ($data instanceof Sentinel) {\n $result = $this->processSentinel($data);\n } else {\n $result = $this->process($data);\n }\n return $this->pass($result);\n }",
"protected function workJob($job, $data)\n {\n if (!isset($data['uid'])) {\n $job->failJob('No uid found.');\n return false;\n }\n\n // mass update\n $newData = $data;\n if (isset($newData['entire'])) {\n unset($newData['entire']);\n }\n\n try {\n $this->runUpdate($data);\n } catch (Exception $e) {\n $job->failJob($e->getMessage());\n return false;\n }\n\n $job->succeedJob('All records processed for this chunk.');\n\n return true;\n }",
"function run_job()\r\n\t{\r\n\t}",
"final public function perform()\n {\n $this->execute($this->args, $this->app);\n }",
"public function fire($job, $data)\n {\n\n $job->delete();\n }",
"public function execute() {\n $this->getQueue()->push($this->getJob(), $this->getJobOptions());\n }",
"public function bulk($jobs, $data = '', $queue = null);",
"public function execute(array $data)\n {\n $params = $this->serviceInputProcessor->process(\n $this->className,\n $this->methodName,\n $data\n );\n $service = $this->objectManager->get($this->className);\n\n return call_user_func_array([$service, $this->methodName], $params);\n }",
"public function process($data);",
"public function jobsAction(array $params)\n {\n $queue = !isset($params[0]) ? QUEUE::JOBS : $params[0];\n\n $callback = function ($msg) {\n //check the db before running anything\n if (!$this->isDbConnected('db')) {\n return ;\n }\n\n if ($this->di->has('dblocal')) {\n if (!$this->isDbConnected('dblocal')) {\n return ;\n }\n }\n\n //we get the data from our event trigger and unserialize\n $job = unserialize($msg->body);\n\n //overwrite the user who is running this process\n if ($job['userData'] instanceof Users) {\n $this->di->setShared('userData', $job['userData']);\n }\n\n if (!class_exists($job['class'])) {\n echo 'No Job class found' . PHP_EOL;\n $this->log->error('No Job class found ' . $job['class']);\n return;\n }\n\n if (!$job['job'] instanceof QueueableJobInterfase) {\n echo 'This Job is not queable ' . $msg->delivery_info['consumer_tag'] ;\n $this->log->error('This Job is not queable ' . $msg->delivery_info['consumer_tag']);\n return;\n }\n\n /**\n * swoole coroutine.\n */\n go(function () use ($job, $msg) {\n //instance notification and pass the entity\n $result = $job['job']->handle();\n\n $this->log->info(\n \"Job ({$job['class']}) ran for {$job['userData']->getEmail()} - Process ID \" . $msg->delivery_info['consumer_tag'],\n [$result]\n );\n });\n };\n\n Queue::process($queue, $callback);\n }",
"private static function process\n\t(\n\t\t$jobData\t\t/* <array> The job array. */\n\t)\t\t\t\t\t/* RETURNS <bool> TRUE on success, FALSE on failure. */\n\t\n\t// Job::process($jobData)\n\t{\n\t\t// Process the Job\n\t\tif(isset($jobData['class']) && isset($jobData['method']))\n\t\t{\n\t\t\tif(class_exists($jobData['class']) && method_exists($jobData['class'], $jobData['method']))\n\t\t\t{\n\t\t\t\techo \"Job Processed\";\n\t\t\t\tvar_dump($jobData);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"abstract public function makeJob();",
"abstract public function makeJob();",
"public function handleQueuedMessage($job, $data)\n {\n\n $jobId = $job->getId();\n\n echo \"Catch jobId: {$jobId}\".PHP_EOL;\n\n $from = $data['from'];\n\n $job->delete();\n\n $isSend = $this->send($data['view'], $data['data'], function($message) use($from) {\n $message->to($from['address']);\n $message->subject($from['subject']);\n });\n\n if($isSend){\n echo \"Done jobId: {$jobId}\".PHP_EOL;\n } else {\n echo \"Error jobId: {$jobId}\".PHP_EOL;\n }\n }",
"abstract protected function doExecute(array $data): int;",
"protected function process() {\n\n $jobId = $this->param();\n\n $jobTitle = $this->app()->request->post(\"title\");\n $jobDescription = $this->app()->request->post(\"description\");\n $jobSkills = $this->app()->request->post(\"skills\");\n\n $jobPositions = $this->app()->request->post(\"positions\");\n $jobLocation = $this->app()->request->post(\"location\");\n $jobType = $this->app()->request->post(\"type\");\n $jobStart = $this->app()->request->post(\"start\");\n\n\n if($jobType == 'temporary') {\n $jobDuration = $this->app()->request->post(\"duration\");\n }\n else {\n $jobDuration = '';\n }\n\n $skills = explode(\",\", $jobSkills);\n\n if(!$this->validPost($jobTitle, $jobDescription, $jobSkills, $jobPositions, $jobLocation, $jobDuration, $jobStart, $jobType)) {\n return;\n }\n\n require_once 'models/Job.php';\n\n\n switch($jobType) {\n case 'temporary':\n require_once 'models/TemporaryJob.php';\n $job = new TemporaryJob($jobId);\n $job->setTitle($jobTitle);\n $job->setDescription($jobDescription);\n $job->setSkills($skills);\n $job->setPositions($jobPositions);\n $job->setLocation($jobLocation);\n $job->setStartTime($jobStart);\n $job->setDuration($jobDuration);\n $job->saveToDb();\n break;\n\n case 'permanent':\n require_once 'models/PermanentJob.php';\n $job = new PermanentJob($jobId);\n $job->setTitle($jobTitle);\n $job->setDescription($jobDescription);\n $job->setSkills($skills);\n $job->setPositions($jobPositions);\n $job->setLocation($jobLocation);\n $job->setStartTime($jobStart);\n $job->saveToDb();\n break;\n }\n }",
"public function process(Job $job): void\n {\n }",
"public function run() {\n // Run until we break\n while (true) {\n $i++;\n $job = $this->fetch();\n\n // Break if there are no jobs to run\n if (!$job) {\n break;\n }\n\n $this->info($job->getRequestID().' - running job'); \n $result = $job->run();\n \n // Log any errors we hit and run the next\n if (!$result || !$result['success']) {\n $this->alert($job->getRequestID().' - error running job');\n\n continue;\n }\n\n $this->info($job->getRequestID().' - successfully completed job');\n }\n }",
"public function email($job, $data)\n {\n // Process the job...\n \\Mail::send('invoice.email', $data['data'], function ($message) use ($data) {\n\n $message->from($data['context']['from'], $data['context']['name'])->subject($data['context']['subject']);\n\n $message->to($data['to']);\n\n if (isset($data['attach']))\n {\n $message->attach($data['attach'], array('as' => $data['as'], 'mime' => $data['mime']));\n }\n });\n\n $job->delete();\n }",
"public abstract function execute();",
"public abstract function execute();",
"public abstract function execute();",
"public function doAction() : void {\n $this->doJob();\n }",
"public function work() {\n $this->model = ModelManager::getInstance()->getModel(QueueModel::NAME);\n\n do {\n $data = $this->model->popJobFromQueue($this->name);\n if ($data) {\n echo $this->name . ': Invoking job #' . $data->id . ' ... ';\n $dateReschedule = $this->invokeJob($data);\n\n if ($dateReschedule == -1) {\n echo \"error\\n\";\n } else {\n echo \"done\\n\";\n\n if (is_numeric($dateReschedule) && $dateReschedule > time()) {\n echo $this->name . ': Rescheduling job #' . $data->id . ' from ' . date('Y-m-d H:i:s', $dateReschedule) . \"\\n\";\n $queueModel->pushJobToQueue($data->job, $dateReschedule);\n }\n }\n } elseif (!$this->sleepTime) {\n echo $this->name . \": Nothing to be done and no sleep time. Exiting ...\\n\";\n break;\n }\n\n if ($this->sleepTime) {\n echo $this->name . ': Sleeping ' . $this->sleepTime . \" second(s)...\\n\";\n sleep($this->sleepTime);\n }\n } while (true);\n }",
"public function process() {\n\n require_once 'libs/Auth.php';\n $username = \"\";\n $userId = -1;\n\n if(Auth::isAuthorized()) {\n $userId = Auth::userId();\n require_once 'models/User.php';\n $user = new User($userId);\n $username = $user->username();\n }\n\n $this->setVar('username', $username);\n $this->setVar('userId', $userId);\n\n require_once 'models/Job.php';\n\n $jobId = $this->param();\n\n $job = new Job($jobId);\n\n $skills = $job->skills();\n\n $skillString = \"\";\n foreach($skills as $skill) {\n $skillString .= $skill . \" \";\n }\n\n $jobArray = Array();\n\n $jobArray['id'] = $job->id();\n\n $this->setVar('jobArray', $jobArray);\n $this->setVar('seekers', $job->interestedSeekers());\n $this->setVar('jobPosterId', $job->postedById());\n }",
"public function createJobFromQuote(Quote $quote, array $inputData);",
"public function handle()\n\t{\n\t\t$this->dispatcher->dispatchNow($this->job);\n\t}",
"public function processed($job)\n {\n $this->client->queue($this->queueName)->processed($job);\n }",
"public function push($job, $data = '', $queue = null);",
"public function run() {\n $job_list = $this->find_all_jobs();\n $jobby = new \\Jobby\\Jobby();\n\n $this->register_tasks( $jobby, $job_list );\n return $jobby->run();\n }",
"public function pushOn($queue, $job, $data = '');",
"abstract public function enqueue($Job, $priority = null);",
"public function run()\n {\n $this->_fnameFlagStop = dirname(__FILE__) . '/' . $this->getIndividualFilenameAsFlag();\n $this->checkIfShouldStopWork();\n\n $worker = Mage::getModel('myproject_gearman/worker'); // just a wrapper around PHP Gearman class\n\n $worker->addFunction($this->getJobName(), function (GearmanJob $job) {\n $this->_curJobObject = $job;\n $data = unserialize($job->workload());\n $this->processDataWrapper($data, $job);\n });\n\n $worker->addFunction($this->getIndividualFilenameAsFlag(), function (GearmanJob $job) {\n $this->log('Got job to exit. Job name: ' . $this->getIndividualFilenameAsFlag());\n $job->sendComplete('ok'); // without this line queue not cleans and task stay in this queue\n exit;\n });\n\n $worker->work();\n }",
"public function handleQueuedMessage($job, $data)\n {\n $this->send($data['recepient'], $data['message'], $data['sender'], $data['message_type']\n );\n\n $job->delete();\n }",
"public function canHandleJob(JobData $jobData);",
"public function execute()\n\t{\n\t\t$this->run();\n\t}",
"public function handle() {\n $entity = $this->validateEntity($this->argument('entity'));\n $job = new DataProcessingJob($entity, str_random(16));\n $this->dispatch($job);\n }",
"public static function loadMatchingJob(&$job, $data)\n {\n $collection = Mage::getModel('emailchef/job')->getCollection();\n foreach ($data as $key => $value) {\n $collection->addFieldToFilter($key, $value);\n }\n\n if ($collection->getSize() == 0) {\n return;\n }\n\n $job = $collection->getFirstItem();\n }",
"public function handle($data);",
"public function createJobWithSalesPrices(array $inputData): Job;",
"public function handle() {\n $lookback = $this->argument('lookback') ?: 5;\n $jobName = $this->getJobName($this->argument('type'));\n $delay = $this->option( 'delay' ) ?: null;\n\n $job = new DataProcessingJob($jobName, str_random(16), $lookback, $this->option('runtime-threshold'));\n\n $validDelayPresent = ( !is_null( $delay ) && is_numeric( $delay ) && $delay > 0 );\n if ( $validDelayPresent ) {\n $job->delay( $delay * 60 ); #convert to seconds\n }\n\n $this->dispatch($job);\n }",
"abstract public function executeScript($path, $identifier, array &$data = [], array $engineArguments = []);",
"public function execute()\n {\n $this->run();\n }",
"public function execute() {}",
"public function execute() {}",
"public function execute() {}",
"public function execute() {}",
"public function execute() {}",
"public function execute() {}",
"public function execute() {}",
"public function execute() {}",
"public function execute() {}",
"public function execute() {}",
"public function execute() {}",
"public function execute() {}",
"public function execute() {}",
"public function execute() {}",
"public function execute() {}",
"public function execute() {}",
"public function execute() {}",
"public function execute() {}",
"public function execute() {}",
"public function execute() {}",
"public function execute() {}",
"public function execute() {\n\t\t\t$connection = \\Leap\\Core\\DB\\Connection\\Pool::instance()->get_connection($this->data_source);\n\t\t\tif ($this->before !== NULL) {\n\t\t\t\tcall_user_func_array($this->before, array($connection));\n\t\t\t}\n\t\t\t$connection->execute($this->command());\n\t\t\tif ($this->after !== NULL) {\n\t\t\t\tcall_user_func_array($this->after, array($connection));\n\t\t\t}\n\t\t}",
"abstract public function submit($data);",
"public function execute()\n\t{\n\t\t$this->executeCall();\n\t\t$this->executeReminder();\n\t}",
"public function execute();",
"public function execute();",
"public function execute();",
"public function execute();",
"public function execute();",
"public function execute();",
"public function execute();",
"public function execute();",
"public function execute();",
"public function execute();",
"public function execute();",
"public function execute();",
"public function execute();",
"public function execute();",
"public function execute();",
"function submitJob($options) {\n $this->printDebugMessage('submitJob', 'Begin', 1);\n $params = array();\n foreach($options as $key => $val) {\n switch($key) {\n case 'stype':\n\t$params[$key] = $val;\n\tbreak;\n case 'sequence':\n\t$params[$key] = $val;\n\tbreak;\n case 'program':\n\t$params[$key] = $val;\n\tbreak;\n case 'database':\n\t$params[$key] = $val;\n\tbreak;\n case 'scores':\n\t$params[$key] = $val;\n\tbreak;\n case 'alignments':\n\t$params[$key] = $val;\n\tbreak;\n }\n }\n $jobId = $this->run(\n\t\t\t$options['email'],\n\t\t\t$options['title'],\n\t\t\t$params\n\t\t\t);\n echo \"<p>Job Id: <a href=\\\"?jobId=$jobId\\\">$jobId</a></p>\";\n echo \"<p>Please wait...</p>\";\n $this->printDebugMessage('submitJob', 'End', 1);\n return $this->genMetaRefresh($jobId);\n }",
"public function __construct($job_data)\n {\n $this->job_data = $job_data;\n }"
] | [
"0.6664671",
"0.65440446",
"0.65158594",
"0.65158594",
"0.64789206",
"0.642103",
"0.6407459",
"0.6373503",
"0.6359523",
"0.62190825",
"0.61925006",
"0.61137164",
"0.6037465",
"0.5999285",
"0.59579754",
"0.5869913",
"0.57991827",
"0.57472116",
"0.5724281",
"0.5724173",
"0.57228196",
"0.5715872",
"0.571498",
"0.5692248",
"0.5649887",
"0.5632133",
"0.5629913",
"0.56156105",
"0.56156105",
"0.55925035",
"0.55595833",
"0.55404806",
"0.5521235",
"0.5493556",
"0.546831",
"0.54587984",
"0.54587984",
"0.54587984",
"0.5451372",
"0.5449996",
"0.54412144",
"0.5420432",
"0.54166603",
"0.5413575",
"0.5398663",
"0.5392485",
"0.5370323",
"0.53485036",
"0.5339903",
"0.53266644",
"0.53039265",
"0.53027374",
"0.5293014",
"0.52919084",
"0.52870005",
"0.5283526",
"0.52806884",
"0.52767944",
"0.526653",
"0.5255135",
"0.5255135",
"0.5255135",
"0.5255135",
"0.5255135",
"0.5255135",
"0.5253924",
"0.5253924",
"0.5253924",
"0.5253924",
"0.5253924",
"0.5253924",
"0.5253924",
"0.5253924",
"0.5253924",
"0.5253924",
"0.5253924",
"0.5253924",
"0.5253924",
"0.5253452",
"0.5253452",
"0.5247378",
"0.52473074",
"0.5245538",
"0.5239932",
"0.5239932",
"0.5239932",
"0.5239932",
"0.5239932",
"0.5239932",
"0.5239932",
"0.5239932",
"0.5239932",
"0.5239932",
"0.5239932",
"0.5239932",
"0.5239932",
"0.5239932",
"0.5239932",
"0.52345693",
"0.522772"
] | 0.5732592 | 18 |
Gets the name of the queue. | public function getName(): string
{
return $this->name;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getQueueName();",
"public function getQueueName()\n {\n return $this->queueName;\n }",
"abstract public function getQueueName();",
"protected function getQueueName()\n {\n // TODO: Implement getQueueName() method.\n }",
"public function queueName()\n {\n if (!$this->tasksQueue) {\n $this->initializeTasksQueue();\n }\n \n return $this->tasksQueue->queueName();\n }",
"protected function getQueueName()\n {\n return __CLASS__;\n // TODO: Implement getQueueName() method.\n }",
"public function queue(): string\n {\n return $this->queue;\n }",
"protected function getConfiguredQueueClassName() {\n\t\t$className = $this->getObjectFactory()\n\t\t\t->getConfiguration()\n\t\t\t->getImplementationConfiguration()\n\t\t\t->get(ImplementationConfiguration::OBJECT_CLASS_QUEUE);\n\t\treturn $className;\n\t}",
"public function getQueue()\n {\n \treturn \"campaign-{$this->campaign->id}-worker-{$this->id}\";\n }",
"protected function getQueue($queue)\n {\n return $queue ?: $this->defaultName;\n }",
"public function queueId()\n {\n return $this->queueId;\n }",
"public function getQueue($queue)\n {\n return $queue ?: 'default';\n }",
"public function getConsumerName()\n {\n return $this->queueName;\n }",
"public function getQueueId()\n {\n $rtn = $this->data['queue_id'];\n\n return $rtn;\n }",
"public function getQueueId();",
"function getQueueTitle( $queue ) {\n\t\t$query = \"SELECT rs.`title` AS queue FROM `\".BIT_DB_PREFIX.\"task_roomstat` rs WHERE rs.`terminal` = 80 + $queue\";\n\t\treturn $this->mDb->getOne( $query );\n\t}",
"private static function getQueueTableName() {\n global $wpdb;\n return $wpdb->prefix . self::$NOTIFICATION_QUEUE_TABLE_NAME;\n }",
"public function get_queue()\n\t\t{\n\t\t\treturn $this->queue;\n\t\t}",
"public function getQueueName($topicName)\n {\n return self::RESPONSE_QUEUE_PREFIX . str_replace('-', '_', $topicName);\n }",
"public function Name() {\n\t\treturn $this->jobId;\n\t}",
"public function getQueue()\n {\n return $this->queue;\n }",
"public function getQueue()\n\t{\n\t\treturn $this->queue;\n\t}",
"public function getQueue()\n {\n return isset($this->Queue) ? $this->Queue : null;\n }",
"public function getQueue() {\n return $this->_queue;\n }",
"public function getQueue()\n {\n return $this->doRequest('GET', \"queue\", []);\n }",
"public function getQueueableConnection()\n {\n return $this->_getConnection()->getName();\n }",
"public function getName()\n {\n return isset($this->name) ? $this->name : '';\n }",
"public function getName()\n {\n return isset($this->name) ? $this->name : '';\n }",
"public function getName()\n {\n return isset($this->name) ? $this->name : '';\n }",
"public function getName()\n {\n return isset($this->name) ? $this->name : '';\n }",
"public function getName ( ) {\n\n return $this->getStream()->getName();\n }",
"public function getName():string\n\t{\n\t\treturn $this->channelName;\n\t}",
"public function getQueueToken() {\n return filter_input(INPUT_GET, 'queueittoken');\n }",
"public function queue($name = null);",
"public function getName()\n {\n $value = $this->get(self::NAME);\n return $value === null ? (string)$value : $value;\n }",
"public function getName()\n {\n $value = $this->get(self::NAME);\n return $value === null ? (string)$value : $value;\n }",
"public function getName()\n {\n $value = $this->get(self::NAME);\n return $value === null ? (string)$value : $value;\n }",
"public function getName()\n {\n return $this->get(self::_NAME);\n }",
"public function getName()\n {\n return $this->get(self::_NAME);\n }",
"public function getName()\n {\n return $this->get(self::_NAME);\n }",
"public function getName()\n {\n return $this->get(self::_NAME);\n }",
"public function getName()\n {\n return $this->get(self::_NAME);\n }",
"public function getName()\n {\n return $this->get(self::_NAME);\n }",
"public function getName()\n {\n return $this->get(self::_NAME);\n }",
"public function resolveQueue(string $name): string\n {\n return $this->resolveConnection('queue', $name);\n }",
"public function getName()\n {\n return isset($this->name) ? $this->name : null;\n }",
"public function getName()\n {\n return isset($this->name) ? $this->name : null;\n }",
"public function getName()\n {\n return $this->get(self::NAME);\n }",
"public function getName()\n {\n return $this->get(self::NAME);\n }",
"public function getName()\n\t{\n\t\treturn $this->name ?: class_basename($this);\n\t}",
"public function getName() {\n\t\treturn $this->current_name;\n\t}",
"private function getMessageQueueId()\n {\n if(!isset($this->collectionQueueKey))\n {\n $this->collectionQueueKey = floor(microtime(true) * 100000);\n }\n return $this->collectionQueueKey;\n }",
"public function getName(): string\n {\n return $this->fqsen->getName();\n }",
"public function getQueue() {\n\t\treturn null;\n\t}",
"public function getName() {\n return $this->get(self::NAME);\n }",
"public function getName() {\n return $this->get(self::NAME);\n }",
"public function getName() {\n return $this->get(self::NAME);\n }",
"public function get_name() {\n return get_string('scheduledtasks', 'local_scheduledtasks');\n }",
"public function name() : ?string\n {\n return $this->_name;\n }",
"public function name()\n\t{\n\t\treturn $this->_name;\n\t}",
"public function getName() {\n\t\treturn $this->_name;\n\t}",
"public function getName() {\n\t\treturn $this->_name;\n\t}",
"public function getName()\n {\n\t\treturn $this->_name;\n\t}",
"public function name()\n\t{\n\t\treturn $this->array['name'] ?? '';\n\t}",
"public function getName()\n {\n return $this->scheduleTypeName;\n }",
"public function getQueue($queue)\n {\n return $queue ?: $this->default;\n }",
"public function getQueue($queue)\n {\n return $queue ?: $this->default;\n }",
"final public function getName()\n\t{\n\t\treturn $this->name;\n\t}",
"public function getName()\n\t{\n\t\treturn $this->_name;\n\t}",
"public function getName()\n\t{\n\t\treturn $this->_name;\n\t}",
"public function getName()\n\t{\n\t\treturn $this->_name;\n\t}",
"public function getName()\n\t{\n\t\treturn $this->_name;\n\t}",
"public function getName()\n\t{\n\t\treturn $this->_name;\n\t}",
"public function getName()\n\t{\n\t\treturn $this->_name;\n\t}",
"public function getName() {\n\t\treturn NodePaths::getNodeNameFromPath($this->path);\n\t}",
"public function getName(): string {\n\t\t\treturn $this->name;\n\t\t}",
"public function name() {\n\t\treturn $this->name;\n\t}",
"public function name()\n\t{\n\t\treturn $this->name;\n\t}",
"public function name()\n\t{\n\t\treturn $this->name;\n\t}",
"public function name()\n\t{\n\t\treturn $this->name;\n\t}",
"public function getName()\n {\n return $this->fqsen->getName();\n }",
"public function getName()\n\t{\n\t\treturn isset($this->_name) ? $this->_name : spl_object_hash($this);\n\t}",
"protected function getName()\n {\n return $this->slimInstance->router()->getCurrentRoute()->getName();\n }",
"public function getName() {\n\t\t\treturn $this->name;\n\t\t}",
"public function getName()\n\t{\n\t\tif ($this->frozen) {\n\t\t\treturn $this->__call(__FUNCTION__, func_get_args());\n\t\t}\n\t\treturn $this->name;\n\t}",
"public function getName()\n {\n return $this->_name;\n }",
"public function getName()\n {\n return $this->_name;\n }",
"public function getName() : string\n {\n return $this->_name;\n }",
"public function getName()\n {\n return $this->_name;\n }",
"public function getName()\n {\n return $this->_name;\n }",
"public function getName()\n {\n return $this->_name;\n }",
"public function getName()\n {\n return $this->_name;\n }",
"public function getName()\n {\n return $this->_name;\n }",
"public function getName()\n {\n return $this->_name;\n }",
"public function getName()\n {\n return $this->_name;\n }",
"public function getName()\n {\n return $this->_name;\n }",
"public function getName()\n {\n return $this->_name;\n }",
"public function getName()\n {\n return $this->_name;\n }",
"public function getName()\n {\n return $this->_name;\n }",
"public function getName()\n {\n return $this->_name;\n }",
"public function getName()\n {\n return $this->_name;\n }"
] | [
"0.9060148",
"0.8689276",
"0.8591729",
"0.8494009",
"0.84530747",
"0.815558",
"0.7775153",
"0.74951535",
"0.74600375",
"0.7333087",
"0.7172073",
"0.7121164",
"0.7085517",
"0.69825643",
"0.696294",
"0.6917463",
"0.6861893",
"0.6855702",
"0.68506277",
"0.6844135",
"0.6844089",
"0.67711043",
"0.66987085",
"0.6663285",
"0.6593664",
"0.65699637",
"0.6441638",
"0.6441638",
"0.6441638",
"0.6441638",
"0.64392716",
"0.64210534",
"0.64205724",
"0.64145654",
"0.64043266",
"0.64043266",
"0.64043266",
"0.6379535",
"0.6379535",
"0.6379535",
"0.6379535",
"0.6379535",
"0.6379535",
"0.6379535",
"0.63722074",
"0.6362223",
"0.6362223",
"0.6338091",
"0.6338091",
"0.6328421",
"0.63259804",
"0.6319614",
"0.630527",
"0.6299584",
"0.6296074",
"0.6296074",
"0.6296074",
"0.62829554",
"0.62762284",
"0.62701786",
"0.6265971",
"0.6265971",
"0.6262903",
"0.62593246",
"0.62578464",
"0.625711",
"0.625711",
"0.62415224",
"0.62378573",
"0.62378573",
"0.62378573",
"0.62378573",
"0.62378573",
"0.62378573",
"0.6236466",
"0.6235288",
"0.6217941",
"0.6210031",
"0.6210031",
"0.6210031",
"0.6208364",
"0.62073",
"0.6206084",
"0.6203862",
"0.6200021",
"0.61976385",
"0.61976385",
"0.61963326",
"0.618664",
"0.618664",
"0.618664",
"0.618664",
"0.618664",
"0.618664",
"0.618664",
"0.618664",
"0.618664",
"0.618664",
"0.618664",
"0.618664",
"0.618664"
] | 0.0 | -1 |
Get the delay of the queue. | public function getDelay(): int
{
return $this->delay;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getDelay()\n {\n return $this->delay;\n }",
"public function getDelayTime() {}",
"public function getDelayedTime()\n {\n $packet = $this->getPacket();\n\n if ($packet['delayed'] > 0) {\n return $packet['delayed'];\n }\n\n return -1;\n }",
"public function getDelay(): int;",
"function get_timing_delay() {\n\n\t\t$timing_type = $this->get_timing_type();\n\n\t\tif ( ! in_array( $timing_type, [ 'delayed', 'scheduled' ] ) ) {\n\t\t\treturn 0;\n\t\t}\n\n\t\t$number = $this->get_timing_delay_number();\n\t\t$unit = $this->get_timing_delay_unit();\n\n\t\t$units = [\n\t\t\t'm' => MINUTE_IN_SECONDS,\n\t\t\t'h' => HOUR_IN_SECONDS,\n\t\t\t'd' => DAY_IN_SECONDS,\n\t\t\t'w' => WEEK_IN_SECONDS\n\t\t];\n\n\t\tif ( ! $number || ! isset( $units[$unit] ) ) {\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn $number * $units[$unit];\n\t}",
"public static function getThrottleDelay() {}",
"public function getAfterDelay()\n {\n return $this->afterDelay;\n }",
"public function getDelayType()\n {\n return $this->delayType;\n }",
"public function getWaitTime()\n {\n return $this->waitTime;\n }",
"public function getDelayBand()\n {\n return $this->delayBand;\n }",
"public function waitingtime() {\n\t\treturn self::$waitingtime;\n\t}",
"public function getSleepTime() {\n return $this->sleepTime;\n }",
"public function getWaitTime() : int {\r\n\r\n return (int) $this->getMain()->getDatabase()->get(\"waiting_time\", [\"table\" => \"Games\", \"name\" => $this->getName()])->fetchArray()[0];\r\n\r\n }",
"public function getHaltDelay()\n {\n return $this->_haltDelay;\n }",
"public function getEnqueuedTime()\n {\n return $this->enqueued_time;\n }",
"public function getTimeout()\n {\n return isset($this->timeout) ? $this->timeout : 0;\n }",
"public function getSleep()\n {\n return $this->sleep;\n }",
"public function getSleep()\n {\n return $this->sleep;\n }",
"public function get_rate_limit_delay( $rate_limit_id ) {\n\n\t\treturn (int) get_transient( \"wc_facebook_rate_limit_${rate_limit_id}\" );\n\t}",
"public function getTimeout()\n {\n return ($this->timeout / 1000000);\n }",
"public function getDelayedExecutionTaskQueue()\n {\n return $this->delayedExecutionTaskQueue;\n }",
"public function getTimeout()\n {\n return $this->get(self::_TIMEOUT);\n }",
"public function delay($value) {\n return $this->setProperty('delay', $value);\n }",
"public static function getTimeout()\n {\n return static::$timeout;\n }",
"protected function getAvailableAt($delay)\n {\n $availableAt = $delay instanceof \\DateTime ? $delay : (new \\DateTime())->modify((int) $delay.' second');\n\n return $availableAt->getTimestamp();\n }",
"public static function getDelayedQueueScheduleSize()\n\t{\n\t\treturn (int)Resque::redis()->zcard(self::SET_KEY);\n\t}",
"public function getTimeout()\n {\n return $this->_timeout;\n }",
"public function getTimeout()\n {\n return $this->_timeout;\n }",
"public function getDelayInSeconds()\n {\n $now = Carbon::now();\n $delayed = $now->copy()->modify($this->getDelayInterval());\n return $delayed->diffInSeconds(`$now`);\n }",
"public function getQueued()\n {\n return $this->Queued;\n }",
"public function getTimeout();",
"public function getTimeout();",
"public function getTimeout();",
"public function getTimeout();",
"public function getTimeout();",
"public function getTimeout();",
"public function getTimeout() {\r\n\t\treturn $this->timeout;\r\n\t}",
"public function getDur() {\n\t\treturn $this->dur;\n\t}",
"public function getTimeout()\n\t{\n\t\treturn $this->timeout;\n\t}",
"public function getTimeout() {\n return $this->_timeout;\n }",
"public function getTimeout()\n {\n return $this->timeout;\n }",
"public function getTimeout()\n {\n return $this->timeout;\n }",
"public function getTimeout()\n {\n return $this->timeout;\n }",
"public function getTimeout()\n {\n return $this->timeout;\n }",
"public function getTimeout()\n {\n return $this->timeout;\n }",
"public function getDelayInterval()\n {\n $delay = $this->getData();\n $modifier = ( $delay['delay_type'] == 'before' ) ? '-' : '+';\n $base = $delay['delay_value'];\n $unit = $delay['delay_unit'];\n return \"{$modifier}{$base} {$unit}\";\n }",
"public function getTimeout()\n {\n return self::$timeout;\n }",
"public function getTimeout() {\r\n return $this->timeout;\r\n }",
"protected function _getWhen(int $delay = null) : int\n {\n return $this->_objectManager->create('Pulchritudinous\\Queue\\Helper\\Data')->getWhen($delay);\n }",
"public function getTimeout()\n {\n return $this->timeout;\n }",
"public function getLastBtTime()\n {\n return $this->get(self::_LAST_BT_TIME);\n }",
"public function getTimeout(): int\n {\n return $this->timeout;\n }",
"public function later($delay, $job, $data = '', $queue = null);",
"public function get_delay_between_checks(): int {\n $period = get_config('realtimeplugin_phppoll', 'checkinterval');\n return max($period, 200);\n }",
"public function laterRaw($delay,$payload,$queue = null)\n {\n if($delay !== 0)\n {\n $this->popOrRelease($queue,$payload,false);\n }\n return parent::laterRaw($delay,$payload,$queue);\n }",
"public function getTimeout(): ?float;",
"public function timeout()\n\t{\n\t\treturn $this->timeout;\n\t}",
"public function getTimeout(): float\n {\n }",
"public function getTimeout()\n {\n return $this->Timeout;\n }",
"public function getTiming()\n {\n return $this->timing;\n }",
"public function laterOn($queue, $delay, $job, $data = '');",
"public function getTimeOut()\n {\n return self::$timeOut;\n }",
"function getRemainingDelay($ip)\n\t{\n\t\t$sql \t= \" select time_to_sec(timediff(now(), delayFrameStart))/60 as delayFrameMin from ( \"\n\t\t\t\t. \" select max(lastAttempt) as delayFrameStart from `blockedIPs` where ip = ? \"\n\t\t\t\t. \" and lastAttempt > Date_sub(Now(), Interval \".LOGIN_FAILS_TIMEOUT_MIN.\" Minute) \"\n\t\t\t\t. \" ) as maxLastAttempt \";\n\t\t$result = $this->sqlQueryArray($sql, array($ip));\n\t\t\n\t\tif(count($result) == 0)\n\t\t\t$remaining_delay = '0';\n\t\telse\n\t\t{\n\t\t\t$roundedDiff = round(LOGIN_FAILS_TIMEOUT_MIN - $result[0]->delayFrameMin);\n\t\t\tif($roundedDiff == 0)\n\t\t\t\t$remaining_delay = 'less than 1 minute';\n\t\t\telse\n\t\t\t\t$remaining_delay = 'approximately '.$roundedDiff.' minute(s)';\n\t\t}\n\t\t\n\n\t\treturn $remaining_delay;\n\t}",
"public function getWaitFor()\n {\n return $this->wait_for;\n }",
"protected function delay()\n {\n if (!isset($this->headers['x-rate-limit-reset'])) {\n exit('Rate limited, but no rate limit header found');\n }\n\n $delay = $this->headers['x-rate-limit-reset'] - time();\n\n if ($delay < 10) {\n $delay = 60 * 15; // 15 minute delay if the given delay seems unreasonably small (can be due to server time differences)\n }\n \n print \"\\n\";\n\n do {\n print \"\\r\\e[K\";\n printf('Sleeping for %d seconds', $delay--);\n sleep(1);\n } while ($delay);\n }",
"public static function GetUserDelay($wU_id){\n\t\t$wUser = Database::safeQuery(\"SELECT rating FROM users WHERE u_id=$wU_id;\")->fetch_assoc();\n\t\t$oRatingDelay = (750 * pow(M_E,(-0.1609438*$wUser['rating'])) )-150;\n\t\treturn floor($oRatingDelay);\n\t}",
"function getEmailDelayTime($email) {\n // Get the general delay time\n $delayTime = $this->getProperty('FREEMAIL_DELAY', 0);\n // If it's 0, we can safely return this value regardless of the email address\n if ($delayTime == 0) {\n return 0;\n }\n // Now check whether the email address matches a blacklist rule in delay mode\n $match = FALSE;\n $emailBlacklist = $this->getBlacklistRules('email', FALSE, TRUE);\n foreach ($emailBlacklist as $id => $blacklistRule) {\n if ($blacklistRule['blacklist_delay'] == 0) {\n continue;\n }\n $rule = $this->convertFromSqlLikeValue($blacklistRule['blacklist_match']);\n // Strip whitespace\n $rule = trim($rule);\n // Convert current rule into valid regexp\n if ($rule[0] == '*') {\n $rule = ltrim($rule, '*');\n } else {\n $rule = '^'.$rule;\n }\n if ($rule[strlen($rule) - 1] == '*') {\n $rule = rtrim($rule, '*');\n } else {\n $rule = $rule.'$';\n }\n // Now do the check\n if (preg_match('~'.$rule.'~i', $email)) {\n $match = TRUE;\n break;\n }\n }\n if ($match) {\n return $delayTime * 60;\n }\n return 0;\n }",
"public function getTimeoutValue() \r\n\t{\r\n\t\t$timeout = (int) Mage::getStoreConfig('ec/blocker/eventTimeout');\r\n\t\t\r\n\t\tif (!$timeout)\r\n\t\t{\r\n\t\t\t$timeout = 2000;\r\n\t\t}\r\n\t\t\r\n\t\treturn $timeout;\r\n\t}",
"public function getWaitingFor()\n {\n return $this->waitingFor;\n }",
"public function getDebouncePeriod()\n {\n $payload = '';\n\n $data = $this->sendRequest(self::FUNCTION_GET_DEBOUNCE_PERIOD, $payload);\n\n $payload = unpack('V1debounce', $data);\n\n return IPConnection::fixUnpackedUInt32($payload['debounce']);\n }",
"public function timeout(): int\n {\n return $this->timeout;\n }",
"private function getRetryDelay() {\n return function( $numberOfRetries ) {\n return 1000 * $numberOfRetries;\n };\n }",
"public function getQueuedPendingCount()\n {\n return $this->queuedPendingCount;\n }",
"public function calculateSleepTime(): float\n {\n $holdTimeMS = $this->backoffFactor * 2 * $this->attempts;\n if ($holdTimeMS >= $this->backoffMax) {\n $holdTimeMS = $this->backoffMax;\n }\n\n return $holdTimeMS * 1000;\n }",
"public function queue(): string\n {\n return $this->queue;\n }",
"public function getAttackTimeout()\n {\n return $this->get(self::_ATTACK_TIMEOUT);\n }",
"public function getDuration() {}",
"public function getDelayCapture(): ?bool\n {\n if (count($this->delayCapture) == 0) {\n return null;\n }\n return $this->delayCapture['value'];\n }",
"public function getRetryAfter() : int\n {\n return $this->retryAfter;\n }",
"public function getProgressWait(): int\n {\n return $this->progress_wait;\n }",
"public function getQueuedNewCount()\n {\n return $this->queuedNewCount;\n }",
"public function delay(Command $command, $delay);",
"public function millisecondsRemaining(): int\n {\n return $this->getTimeRemaining();\n }",
"public function getTimeRemaining(): int\n {\n return $this->runtimeDeadlineMs - $this->nowInMilliseconds();\n }",
"public function getWaitTime()\n\t{\n\t\t$createTime = new DateTime($this->time_created);\n\t\t$startTime = new DateTime($this->time_started);\n\t\t$interval = $createTime->diff($startTime);\n\n\t\t$waitTime = ($interval->days * 24 * 3600) + ($interval->h * 3600) + ($interval->i * 60) + ($interval->s);\n\t\treturn $waitTime;\n\t}",
"public function showDelay()\n {\n global $conf, $langs;\n\n if (empty($this->date_delivery) && ! empty($this->date_livraison)) $this->date_delivery = $this->date_livraison; // For backward compatibility\n\n if (empty($this->date_delivery)) $text=$langs->trans(\"OrderDate\").' '.dol_print_date($this->date_commande, 'day');\n else $text=$text=$langs->trans(\"DeliveryDate\").' '.dol_print_date($this->date_delivery, 'day');\n $text.=' '.($conf->commande->fournisseur->warning_delay>0?'+':'-').' '.round(abs($conf->commande->fournisseur->warning_delay)/3600/24, 1).' '.$langs->trans(\"days\").' < '.$langs->trans(\"Today\");\n\n return $text;\n }",
"public function getPollTimeout()\n {\n return $this->pollTimeout;\n }",
"public function getQueueId()\n {\n $rtn = $this->data['queue_id'];\n\n return $rtn;\n }",
"public function getTimeout()\n {\n return ($this->container->getParameter('g4_timeout_reswebdefault'));\n }",
"public function delay(int $delay): self\n {\n $this->delay = $delay;\n return $this;\n }",
"public function getTimeout(): ?int;",
"private function milliseconds()\n {\n $mt = explode(' ', microtime());\n return bcadd($mt[1], $mt[0], 8);\n }",
"public function delay($value)\n {\n $this->pushDelay = $value;\n return $this;\n }",
"public function later($delay, $job, $data = '', $queue = null)\n {\n return $this->pushToDatabase($queue, $this->createPayload(\n $job, $this->getQueue($queue), $data\n ), $delay);\n }",
"public function getTimeRemaining()\n {\n return $this->time_remaining;\n }",
"public function later($delay, $job, $data = '', $queue = null)\n {\n $delay_seconds = $this->getSeconds($delay);\n\n $payload = $this->createPayload($job, $data, $queue);\n\n return $this->pushRaw($payload, $queue, compact('delay_seconds'));\n }",
"public function get_timestamp_pulled() \n\t{ \n\t\treturn $this->timestamp_pulled; \n\t}",
"public function getDuration();",
"public static function getTimer()\n {\n return microtime(true) - $_SERVER[\"REQUEST_TIME_FLOAT\"];\n }"
] | [
"0.7925584",
"0.75651485",
"0.75143284",
"0.73526984",
"0.7341894",
"0.71282846",
"0.6802093",
"0.6456573",
"0.62380177",
"0.6195668",
"0.6172814",
"0.60693455",
"0.5980097",
"0.59457564",
"0.5931034",
"0.5916369",
"0.59101576",
"0.59101576",
"0.58873945",
"0.5875249",
"0.5866454",
"0.5855462",
"0.5844649",
"0.58426356",
"0.5831266",
"0.5826981",
"0.58206004",
"0.58206004",
"0.5802105",
"0.5795836",
"0.5794829",
"0.5794829",
"0.5794829",
"0.5794829",
"0.5794829",
"0.5794829",
"0.57918084",
"0.57895505",
"0.57881695",
"0.57762283",
"0.5763078",
"0.5763078",
"0.5763078",
"0.5763078",
"0.5763078",
"0.5762327",
"0.5733126",
"0.5730023",
"0.57240033",
"0.5714451",
"0.5713551",
"0.56943166",
"0.5679065",
"0.56787235",
"0.5670724",
"0.5669289",
"0.5656746",
"0.55831105",
"0.55762804",
"0.5551211",
"0.5548267",
"0.5535493",
"0.54942447",
"0.5486024",
"0.54637504",
"0.5412405",
"0.54094374",
"0.54053414",
"0.54024804",
"0.53897244",
"0.5378125",
"0.53635776",
"0.53574014",
"0.53498095",
"0.5345953",
"0.53414094",
"0.53329843",
"0.53230274",
"0.53136784",
"0.52950335",
"0.5287224",
"0.5280077",
"0.52604634",
"0.52524275",
"0.52504337",
"0.52502626",
"0.5248207",
"0.52440006",
"0.52375776",
"0.5237239",
"0.523309",
"0.5227843",
"0.5225652",
"0.5224032",
"0.52190745",
"0.51983404",
"0.5187513",
"0.51857924",
"0.5179781"
] | 0.7739915 | 2 |
Get the timeout of the queue. | public function getTimeout(): int
{
return $this->timeout;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getTimeout()\n {\n return isset($this->timeout) ? $this->timeout : 0;\n }",
"public function getTimeout()\n {\n return $this->_timeout;\n }",
"public function getTimeout()\n {\n return $this->_timeout;\n }",
"public function getTimeout()\n\t{\n\t\treturn $this->timeout;\n\t}",
"public function getTimeout() {\n return $this->_timeout;\n }",
"public function getTimeout() {\r\n\t\treturn $this->timeout;\r\n\t}",
"public function getTimeout()\n {\n return $this->get(self::_TIMEOUT);\n }",
"public function getTimeout()\n {\n return $this->timeout;\n }",
"public function getTimeout()\n {\n return $this->timeout;\n }",
"public function getTimeout()\n {\n return $this->timeout;\n }",
"public function getTimeout()\n {\n return $this->timeout;\n }",
"public function getTimeout()\n {\n return $this->timeout;\n }",
"public function getTimeout()\n {\n return $this->timeout;\n }",
"public function getTimeout() {\r\n return $this->timeout;\r\n }",
"public static function getTimeout()\n {\n return static::$timeout;\n }",
"public function getTimeout()\n {\n return self::$timeout;\n }",
"public function getTimeout();",
"public function getTimeout();",
"public function getTimeout();",
"public function getTimeout();",
"public function getTimeout();",
"public function getTimeout();",
"public function getTimeout()\n {\n return $this->Timeout;\n }",
"public function timeout()\n\t{\n\t\treturn $this->timeout;\n\t}",
"public function getTimeout()\n {\n return ($this->timeout / 1000000);\n }",
"public function getTimeout()\n {\n return $this->getHttpClient()->getTimeout();\n }",
"public function timeout(): int\n {\n return $this->timeout;\n }",
"public function getTimeOut()\n {\n return self::$timeOut;\n }",
"public function getTimeout()\n {\n return ($this->container->getParameter('g4_timeout_reswebdefault'));\n }",
"public function getTimeout(): ?int;",
"function getTimeout() {\r\n\t\treturn ftp_get_option($this->_handle, FTP_TIMEOUT_SEC);\r\n\t}",
"public function getTimeout(): ?float;",
"public function getPollTimeout()\n {\n return $this->pollTimeout;\n }",
"public function getTimeout(): float\n {\n }",
"public function getTimeoutValue() \r\n\t{\r\n\t\t$timeout = (int) Mage::getStoreConfig('ec/blocker/eventTimeout');\r\n\t\t\r\n\t\tif (!$timeout)\r\n\t\t{\r\n\t\t\t$timeout = 2000;\r\n\t\t}\r\n\t\t\r\n\t\treturn $timeout;\r\n\t}",
"function getRequestTimeout()\n {\n return $this->_props['RequestTimeout'];\n }",
"public function getRecvTimeout()\n {\n return $this->recvTimeout;\n }",
"public function getAttackTimeout()\n {\n return $this->get(self::_ATTACK_TIMEOUT);\n }",
"public function timeout() {\n\t\treturn null;\n\t}",
"public function getRequestTimeOut() {\n return $this->requestTimeOut;\n }",
"public function getCacheTimeout()\n {\n return $this->cacheTimeout;\n }",
"function getTimeoutOption() {\r\n\t\treturn $this->getOptionsSet()->getOptions(self::OPTION_TIMEOUT, 20);\r\n\t}",
"private static function get_timeout() {\n\t\t$timeout = absint( ini_get( 'max_execution_time' ) );\n\t\tif ( $timeout <= 1 ) {\n\t\t\t// allow for -1 or 0 for unlimited\n\t\t\t$timeout = 5000 * 1000;\n\t\t} elseif ( $timeout > 30 ) {\n\t\t\t$timeout = $timeout * 1000;\n\t\t} else {\n\t\t\t$timeout = 30000;\n\t\t}\n\t\treturn $timeout;\n\t}",
"public function getJobLockoutTime()\n {\n return $this->job_lock_timeout;\n }",
"public function getTimeOutEnd()\n {\n return $this->get(self::_TIME_OUT_END);\n }",
"public function getHeartbeatTimeout()\n {\n return $this->heartbeatTimeout;\n }",
"public function getConnectTimeout();",
"public function getVisibilityTimeout()\n {\n return $this->get(self::VISIBILITY_TIMEOUT, null);\n }",
"public function getReadTimeout() {\n return $this->readTimeout;\n }",
"public function getReadTimeout()\n {\n return $this->readTimeout;\n }",
"public function getTimeoutMinutes()\n {\n return $this->timeout_minutes;\n }",
"public function getJsTimeout()\n {\n return $this->jsTimeout ?: static::DEFAULT_JS_TIMEOUT;\n }",
"public function getSendTimeout()\n {\n return $this->sendTimeout;\n }",
"public function cacheTimeout($value = NULL) {\n $class_name = get_class($this);\n return variable_get($class_name . TingClientRequest::cache_lifetime, '1');\n }",
"public function cacheTimeout($value = NULL) {\n $class_name = get_class($this);\n\n return variable_get($class_name . TingClientRequest::cache_lifetime, '1');\n }",
"public function getWaitTime()\n {\n return $this->waitTime;\n }",
"public function timeout()\n {\n return 300;\n }",
"public function getCurlTimeout()\n {\n return $this->curlTimeout;\n }",
"public function getCurlTimeout()\n {\n return $this->curlTimeout;\n }",
"public function getReadTimeout(): float\n {\n return $this->readTimeout;\n }",
"public function getCurlTimeout() {\n return $this->curlTimeout;\n }",
"public function timeout();",
"public function get_request_timeout(): float {\n $duration = get_config('realtimeplugin_phppoll', 'requesttimeout');\n return (isset($duration) && $duration !== false) ? (float)$duration : 30;\n }",
"public function getSessionTimeout() {\n if ($this->sessionTimeout === null) {\n $this->sessionTimeout = self::DEFAULT_SESSION_TIMEOUT;\n }\n\n return $this->sessionTimeout;\n }",
"protected function getLockExpirationValue($timeout)\n {\n return sprintf('%d:%d', time() + $timeout + 1, posix_getpid());\n }",
"public function getSpeechEndTimeout()\n {\n return $this->speech_end_timeout;\n }",
"public function getReadTimeout(): float\n {\n }",
"public function getRetryTimeout()\n {\n return $this->retryTimeout;\n }",
"public function getConnectTimeout() {\n\t\treturn $this->connectionTimeout;\n\t}",
"public function getConnectionTimeout();",
"public function getMakeApiCallTimeout()\n {\n $returnValue = 40; // default value\n $configValue = strval(Mage::getConfig()->getNode('stores/default/innobyte_payu_lite_make_api_call_timeout'));\n if (is_numeric($configValue) && $configValue >= 0) {\n $returnValue = intval($configValue);\n }\n return $returnValue;\n }",
"function Timeout ( $nTimeout )\n{\n if ( isset($nTimeout) ) {\n $this->_Timeout = ($nTimeout < 5) ? 5 : (int)$nTimeout;\n return true;\n } else {\n return $this->_Timeout;\n }\n}",
"public function getVoiceActivityTimeout()\n {\n return $this->voice_activity_timeout;\n }",
"static public function vUpdateTimeoutQueue(){\n\t\t$oDB = self::oDB(self::$sDBName);\n\n\t\t$sTimeout = date('Y-m-d H:i:s',time()-15*60);\n\n\t\t$sSql = \"SELECT `project_schedule_uuid`,`queue_uuid` FROM project_schedule_queue WHERE `queue_time`<'$sTimeout' AND `result_status_code`='0'\";\n\t\t$iDbq = $oDB->iQuery($sSql);\n\t\twhile($aRow = $oDB->aFetchAssoc($iDbq)){\n\t\t\t$sQueueUuid = $aRow['queue_uuid'];\n\t\t\t$sScheduleUuid = $aRow['project_schedule_uuid'];\n\t\t\tCMisc::vPrintR($aRow);\n\t\t\ttry{\n\t\t\t\t//use schedule_uuid get BeautySchedule object\n\t\t\t\t$oSchedule = CBeautySchedule::oGetSchedule($sScheduleUuid);\n\t\t\t\t//use queue_uuid and failed code run vQueueReturn($sQueueUuid, $iFailed)\n\t\t\t\t$oSchedule->vQueueReturn($sQueueUuid,2);\n\t\t\t\t//if it's a monitor schedule\n\t\t\t\tif($oSchedule->iTypeNo == 4){\n\t\t\t\t\t//get last url and add monitor(catch) queue again\n\t\t\t\t\t$sTargetUrl = '';\n\t\t\t\t\tforeach ($oSchedule->aQueueStat() as $oQueueStat) {\n\t\t\t\t\t\tif($oQueueStat->sResultUrl != '')\n\t\t\t\t\t\t\t$sTargetUrl = $oQueueStat->sResultUrl;\n\t\t\t\t\t}\n\t\t\t\t\t$oSchedule->vAddMonitor($sTargetUrl);\n\t\t\t\t}\n\n\t\t\t}catch(exception $e){\n\t\t\t\t//CMisc::vPrintR($e->getMessage());\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t}",
"private function getTimeoutDetected()\n {\n $timeoutDetected = Flag::getFlag('TIMEOUT_DETECTED');\n if ($timeoutDetected) {\n $this->skipTimeoutTest();\n }\n return $timeoutDetected;\n }",
"public function getRpcTimeout(): float\n {\n }",
"public function getEnqueuedTime()\n {\n return $this->enqueued_time;\n }",
"public function getQueueId()\n {\n $rtn = $this->data['queue_id'];\n\n return $rtn;\n }",
"public function getPaymentReminderEmailTimeout($scopeId = null)\n {\n return $this->getValue(\n self::XML_PATH_ORDERS_PAYMENT_REMINDER_TIMEOUT,\n ScopeInterface::SCOPE_STORE,\n $scopeId\n );\n }",
"public function getTimeoutMicros(): int\n {\n return API::ffi()->ts_parser_timeout_micros($this->data);\n }",
"public function getConnectTimeout()\n {\n return $this->connectTimeout;\n }",
"public function getSpeechStartTimeout()\n {\n return $this->speech_start_timeout;\n }",
"public function getQueued()\n {\n return $this->Queued;\n }",
"protected function timeoutForJob($job, $timeout)\n {\n return $job && !is_null($job->timeout()) ? $job->timeout() : $timeout;\n }",
"public function setDequeueTimeout(int $dequeueTimeout): self\n {\n $this->options['dequeueTimeout'] = $dequeueTimeout;\n return $this;\n }",
"protected function lockoutTime()\n {\n return Arr::get(static::$config, 'locked_for', 60);\n }",
"public function waitingtime() {\n\t\treturn self::$waitingtime;\n\t}",
"public function getQueueId() : ?int\n {\n $rtn = $this->data['queue_id'];\n\n return $rtn;\n }",
"public function getTimeoutList()\n {\n $value = $this->get(self::TIMEOUTLIST);\n return $value === null ? (string)$value : $value;\n }",
"public function getIdleTimeoutMs()\n {\n return $this->IdleTimeoutMs;\n }",
"public function timeout($timeout);",
"final public static function HpsSessionTimedOut()\n {\n return self::get(823);\n }",
"public function getHttpHeartbeatTimeout()\n {\n return $this->httpHeartbeatTimeout;\n }",
"public function getConnectTimeout(): float\n {\n }",
"public function queueId()\n {\n return $this->queueId;\n }",
"public function getQueuedPendingCount()\n {\n return $this->queuedPendingCount;\n }",
"public function getWaitTime() : int {\r\n\r\n return (int) $this->getMain()->getDatabase()->get(\"waiting_time\", [\"table\" => \"Games\", \"name\" => $this->getName()])->fetchArray()[0];\r\n\r\n }",
"public function queue(): string\n {\n return $this->queue;\n }",
"public function getCookiesTimeOut() \n {\n $cookiesTimeout = Mage::getStoreConfig(self::XML_PATH_COOKIES_TIMEOUT);\n return $cookiesTimeout;\n }",
"public static function getAliveTimeout()\n\t{\n\t\treturn MHTTPD::$config['Server']['keep_alive_timeout'];\n\t}"
] | [
"0.8096604",
"0.80616516",
"0.80616516",
"0.8047052",
"0.80277115",
"0.80189407",
"0.8014729",
"0.79985756",
"0.79985756",
"0.79985756",
"0.79985756",
"0.79985756",
"0.7957782",
"0.79486215",
"0.7903259",
"0.7886796",
"0.7858528",
"0.7858528",
"0.7858528",
"0.7858528",
"0.7858528",
"0.7858528",
"0.7845597",
"0.77739155",
"0.7702168",
"0.7466531",
"0.7420279",
"0.72673607",
"0.72635454",
"0.7263463",
"0.70083123",
"0.69047785",
"0.6843063",
"0.6824867",
"0.68212384",
"0.67542195",
"0.67516416",
"0.6684833",
"0.66638863",
"0.65501046",
"0.65103465",
"0.6494818",
"0.64453024",
"0.6415288",
"0.64058024",
"0.63726795",
"0.6359183",
"0.6329882",
"0.6293766",
"0.62666434",
"0.62383354",
"0.62236303",
"0.6206595",
"0.61460364",
"0.61442965",
"0.6141758",
"0.61194944",
"0.6107928",
"0.6107928",
"0.60667485",
"0.60524404",
"0.6029691",
"0.6018675",
"0.5987826",
"0.5966457",
"0.59637994",
"0.59633535",
"0.5944756",
"0.5943466",
"0.59390074",
"0.59318346",
"0.59147716",
"0.5882733",
"0.5873285",
"0.5823456",
"0.5823091",
"0.5779165",
"0.57701397",
"0.5761756",
"0.5755285",
"0.57343525",
"0.5729964",
"0.57193166",
"0.57088107",
"0.57044023",
"0.5702096",
"0.56987864",
"0.566097",
"0.566021",
"0.5658616",
"0.564085",
"0.56404704",
"0.56403524",
"0.5639027",
"0.5630548",
"0.56153417",
"0.5612241",
"0.5609257",
"0.5585203",
"0.55846214"
] | 0.7724437 | 24 |
Get the retention period of the queue. | public function getRetentionPeriod(): int
{
return $this->retention;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getRetentionPolicy()\n {\n return $this->retention_policy;\n }",
"public function getRetentionPolicy()\n {\n return isset($this->retention_policy) ? $this->retention_policy : null;\n }",
"public function getNotificationPeriod() {\n\t\treturn $this->notificationPeriod;\n\t}",
"public function getDaysOfRetention()\n {\n return $this->daysOfRetention;\n }",
"public function getCacheExpiry()\n {\n return $this->cachePeriod;\n }",
"public function getPeriodSinceActive()\n {\n return $this->calculatePeriodDifference($this->last_active);\n }",
"public function getRequestedDeliveryPeriod()\n {\n return $this->requestedDeliveryPeriod;\n }",
"public function getReminderPeriod()\n {\n return $this->reminderPeriod;\n }",
"public function getPostDeliveryLimit(){\n\n return $this->client->makeRequest('PostDeliveryLimit', 'GET');\n }",
"public static function getDelayedQueueScheduleSize()\n\t{\n\t\treturn (int)Resque::redis()->zcard(self::SET_KEY);\n\t}",
"public function getPeriod() : int\n {\n return $this->period;\n }",
"public function getPeriod()\n {\n return $this->period;\n }",
"public function getPeriod()\n {\n return $this->period;\n }",
"public function getPeriod()\n {\n return $this->period;\n }",
"public function getPeriod()\n {\n return $this->period;\n }",
"public function getEstimatedDeliveryPeriod()\n {\n return $this->estimatedDeliveryPeriod;\n }",
"public function getNewProductLimit()\n {\n if (!isset($this->arrCache['newProductLimit'])) {\n\n $arrPeriod = deserialize($this->newProductPeriod);\n\n if (!empty($arrPeriod) && is_array($arrPeriod) && $arrPeriod['value'] > 0 && $arrPeriod['unit'] != '') {\n $this->arrCache['newProductLimit'] = strtotime('-' . $arrPeriod['value'] . ' ' . $arrPeriod['unit'] . ' 00:00:00');\n } else {\n $this->arrCache['newProductLimit'] = time();\n }\n }\n\n return $this->arrCache['newProductLimit'];\n }",
"public function getPromisedDeliveryPeriod()\n {\n return $this->promisedDeliveryPeriod;\n }",
"public function getPeriod() {}",
"public function getPeriod()\n\t{\n\t\treturn $this->period;\n\t}",
"public function get_recurring_period(){\n\t\treturn $this->payment['recurring_period'];\n\t}",
"public function getRelativeExpiration(): \\DateInterval;",
"public function getPeriod();",
"public function getHeartbeatPeriod() : ?int\n {\n return $this->heartbeatPeriod;\n }",
"public function getForecastPeriod()\n {\n return $this->forecast_period;\n }",
"public function getMonitoringPeriod()\n {\n return $this->monitoringPeriod;\n }",
"public function getForecastPeriod()\n {\n return $this->forecastPeriod;\n }",
"public function getQuota()\n {\n return $this->_quota;\n }",
"public function getQuota()\n {\n return $this->quota;\n }",
"public function getEffectivePeriod()\n {\n return $this->effectivePeriod;\n }",
"public function getDebouncePeriod()\n {\n $payload = '';\n\n $data = $this->sendRequest(self::FUNCTION_GET_DEBOUNCE_PERIOD, $payload);\n\n $payload = unpack('V1debounce', $data);\n\n return IPConnection::fixUnpackedUInt32($payload['debounce']);\n }",
"public function setRetentionPolicy($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Storage\\V2\\Bucket\\RetentionPolicy::class);\n $this->retention_policy = $var;\n\n return $this;\n }",
"public function getTimeLimit(): int;",
"public function getTimeLimit(): int;",
"public function getStorageLimit() {\n if (isset($this->_quotausage['STORAGE']['limit'])) {\n return $this->_quotausage['STORAGE']['limit'];\n }\n return 0;\n }",
"public function getSuspendPeriodUntil(): ?DateTime {\n return $this->suspendPeriodUntil;\n }",
"public function getRateLimitExpiration(): \\DateTime\n {\n /** @var RateLimit $api */\n $api = $this->gitHubClient->api('rate_limit');\n\n return \\DateTime::createFromFormat('U', (string)$api->getRateLimits()['rate']['reset']);\n }",
"private function getLastPeriod(): Period\n {\n $count = \\count($this->getPeriods());\n\n // We don't use end() to not modify the internal pointer of the array\n return $this->getPeriods()[$count - 1];\n }",
"public function getDeleteDaysAfterLastModification();",
"private function get_interval() {\n\t\treturn 7 * DAY_IN_SECONDS; // 7 days.\n\t}",
"public function getQuota($fromStorage = false) {\n if ($fromStorage) {\n $fh = @fopen($this->_rootdir . 'maildirsize', 'r');\n if (!$fh) {\n /**\n * @see Zend_Mail_Storage_Exception\n */\n require_once 'Zend/Mail/Storage/Exception.php';\n throw new Zend_Mail_Storage_Exception('cannot open maildirsize');\n }\n $definition = fgets($fh);\n fclose($fh);\n $definition = explode(',', trim($definition));\n $quota = [];\n foreach ($definition as $member) {\n $key = $member[strlen($member) - 1];\n if ($key == 'S' || $key == 'C') {\n $key = $key == 'C' ? 'count' : 'size';\n }\n $quota[$key] = substr($member, 0, -1);\n }\n return $quota;\n }\n\n return $this->_quota;\n }",
"public function getHeartbeatPeriod(): ?int\n {\n return $this->heartbeatPeriod;\n }",
"public function getValidityPeriod()\n {\n return $this->validityPeriod;\n }",
"public function getExpire()\n {\n return $this->_expire;\n }",
"public function getMaxAge()\n {\n return $this->expiry;\n }",
"public function getExpiration(): int\n {\n return $this->getPayloadClaim('exp');\n }",
"public function getRemainingTime()\n {\n return $this->isExpired() ? 0\n : ($this->getExpirationDate()->getTimestamp() - time());\n }",
"public function getExpire()\n {\n return $this->expire;\n }",
"public function getExpire()\n {\n return $this->expire;\n }",
"public function getExpire()\n {\n return $this->expire;\n }",
"public function getLength() {\n return count($this->queue);\n }",
"public function getSpaceReclaimed() : int\n {\n return $this->spaceReclaimed;\n }",
"public function getOnHoldExpiration()\n {\n return $this->getParameter('onHoldExpiration');\n }",
"public function getExpire()\r\n {\r\n return $this->expire;\r\n }",
"public function getDeleteDaysAfterLastModification()\n {\n return $this->deleteDaysAfterLastModification;\n }",
"public function getExpirationTime() {\n return $this->shareData[\"expire\"];\n }",
"public function getRateLimitRemaining()\n {\n return $this->rateLimitRemaining;\n }",
"function loanExpire(){\n\tglobal $driver;\n\t$sql\t=\t\"SELECT loanduration FROM settings\"; //Retrieve the maximum days the loanee will be given before being flagged as a defaulter\n\tif($loanexpire\t=\t$driver->perform_request($sql)):\n\t\t$row\t=\t$driver->load_data($loanexpire);\n\t\t$maxdays\t=\t($row['loanduration']>0)?($row['loanduration']):30; //Retrieved loan duration\n\telse:\n\t\tdie('<p class=\"error\">ERROR Retrieving Loan duration.<br/>'.mysql_error().'</p>');\n\tendif;\n\treturn $maxdays; //The maximum days before loan is pushed to arrear\n}",
"public function setRetentionPolicy($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\GkeBackup\\V1\\BackupPlan\\RetentionPolicy::class);\n $this->retention_policy = $var;\n\n return $this;\n }",
"public function getPeriodfrom()\n {\n return $this->periodfrom;\n }",
"public function getTimeRemaining(): int\n {\n return $this->runtimeDeadlineMs - $this->nowInMilliseconds();\n }",
"protected function getEmailNotificationsDeduplicationTime()\n {\n return 60;\n }",
"public function getAccelerationPeriod()\n {\n $payload = '';\n\n $data = $this->sendRequest(self::FUNCTION_GET_ACCELERATION_PERIOD, $payload);\n\n $payload = unpack('V1period', $data);\n\n return IPConnection::fixUnpackedUInt32($payload['period']);\n }",
"public function remainingCapacity()\n {\n return $this->sequencer->remainingCapacity();\n }",
"public function remaining(): int {\n $alert = $this->alert();\n return is_null($alert) ? 1 : ($alert['created'] + $alert['expiry'] * 60) - time();\n }",
"public static function getPastReportDateLimit(){\n return 259200;\n }",
"private function getExpiration()\n {\n return (self::EXPIRATION_IN_MINUTES * 60);\n }",
"public function get_expires() {\n\t\treturn $this->expires;\n\t}",
"public function getSuspendPeriodFrom(): ?DateTime {\n return $this->suspendPeriodFrom;\n }",
"public function getPeriodto()\n {\n return $this->periodto;\n }",
"public function getQuaternionPeriod()\n {\n $payload = '';\n\n $data = $this->sendRequest(self::FUNCTION_GET_QUATERNION_PERIOD, $payload);\n\n $payload = unpack('V1period', $data);\n\n return IPConnection::fixUnpackedUInt32($payload['period']);\n }",
"public function remainingDays(){\n if ($this->hasExpired()) {\n return (int) 0;\n }elseif($this->isIndefinied()){\n return (int) -1;\n }\n\n return (int) Carbon::now()->diffInDays(Carbon::parse($this->expires_on));\n }",
"public function getExpire(): int\r\n {\r\n return $this->expire;\r\n }",
"static function getLifetime()\n {\n return new Am_Period(self::MAX_SQL_DATE);\n }",
"public function getExpiredCount()\n {\n return $this->expiredCount;\n }",
"public function getExpirationDays()\n {\n return $this->driver->getExpirationDays();\n }",
"public function getQuota(): int\n {\n return $this->quota;\n }",
"public function getExpiration();",
"public function getNbQueue() {\n\t\treturn count($_SESSION['largePDF_queue']);\n\t}",
"public function getLimit()\n {\n return isset($this->limit) ? $this->limit : 0.0;\n }",
"public function getTimeRemaining()\n {\n return $this->time_remaining;\n }",
"public function getRefreshTokenExpiration()\n\t{\n\t\treturn $this->accessTokenExpiration;\n\t}",
"public function getExpiration()\n {\n return $this->getCreated()->add(new DateInterval('P2W'));\n }",
"public function getPadExpireRange() {\n\t// Set the output array...\n\t$retVal['min'] = $this->padExpireMin;\n\t$retVal['max'] = $this->padExpireMax;\n\t\n\treturn $retVal;\n }",
"public function getRatePeriod()\n {\n return $this->ratePeriod;\n }",
"private function wsal_step_log_retention_save() {\n\t\t// Verify nonce.\n\t\tcheck_admin_referer( 'wsal-step-log-retention' );\n\n\t\t// Get log retention time setting.\n\t\t$pruning_limit = isset( $_POST['wsal-pruning-limit'] ) ? sanitize_text_field( wp_unslash( $_POST['wsal-pruning-limit'] ) ) : false;\n\n\t\t// validate the prune time.\n\t\tif ( ! in_array( (string) $pruning_limit, $this->valid_prune_times, true ) ) {\n\t\t\t// if $pruning_limit is not valid value then use default - 6.\n\t\t\t$pruning_limit = $this->valid_prune_times[0];\n\t\t}\n\n\t\t// Save log retention setting.\n\t\tif ( ! empty( $pruning_limit ) ) {\n\t\t\tswitch ( $pruning_limit ) {\n\t\t\t\tcase '6':\n\t\t\t\tcase '12':\n\t\t\t\t\t// 6 or 12 months.\n\t\t\t\t\t$this->wsal->SetGlobalBooleanSetting( 'pruning-date-e', true );\n\t\t\t\t\t$this->wsal->SetGlobalSetting( 'pruning-date', $pruning_limit . ' months' );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'none':\n\t\t\t\t\t// None.\n\t\t\t\t\t$this->wsal->SetGlobalBooleanSetting( 'pruning-date-e', false );\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\twp_safe_redirect( esc_url_raw( $this->get_next_step() ) );\n\t\texit();\n\t}",
"public function getCallbackWaitInterval()\n {\n return $this->_callback_period_interval;\n }",
"public function cacheLifetime()\n {\n return config('personality-insights.cache_expiration');\n }",
"public function getDur() {\n\t\treturn $this->dur;\n\t}",
"public function decayMinutes()\n {\n return property_exists($this, 'decayMinutes') ? $this->decayMinutes : 1;\n }",
"public function decayMinutes()\n {\n return property_exists($this, 'decayMinutes') ? $this->decayMinutes : 1;\n }",
"public function getPolicyExpiresAt()\n {\n return $this->policyExpiresAt;\n }",
"public function get_duration() {\n\t\t$job_listing_duration = $this->get_job_listing_duration();\n\t\tif ( 'listing' === $this->get_package_subscription_type() ) {\n\t\t\treturn false;\n\t\t} elseif ( $job_listing_duration ) {\n\t\t\treturn $job_listing_duration;\n\t\t} else {\n\t\t\treturn get_option( 'job_manager_submission_duration' );\n\t\t}\n\t}",
"protected function get_limit()\n {\n $bytes = ini_get('memory_limit');\n\n return $this->formatBytes($bytes);\n }",
"public function getDuration()\n {\n if (array_key_exists(\"duration\", $this->_propDict)) {\n if (is_a($this->_propDict[\"duration\"], \"\\DateInterval\") || is_null($this->_propDict[\"duration\"])) {\n return $this->_propDict[\"duration\"];\n } else {\n $this->_propDict[\"duration\"] = new \\DateInterval($this->_propDict[\"duration\"]);\n return $this->_propDict[\"duration\"];\n }\n }\n return null;\n }",
"public function totalOpenMessagesInQueue(){\n return $this->storageEngine->totalOpenMessagesInQueue();\n }",
"public function getQueuedNewCount()\n {\n return $this->queuedNewCount;\n }",
"public function getNotificationCounterMax()\n {\n return self::NOTIFICATIONS_COUNTER_MAX;\n }",
"public function tokenExpiresIn()\n {\n return $this->token['expires_in'] ?? null;\n }",
"protected function expirationTime()\n {\n $ttl = $this->getOptions()->getTtl();\n if ($ttl > 2592000) {\n return time() + $ttl;\n }\n return $ttl;\n }"
] | [
"0.6595944",
"0.64349014",
"0.6189129",
"0.56548446",
"0.5642858",
"0.5437651",
"0.53894114",
"0.5388871",
"0.536849",
"0.5351594",
"0.5335235",
"0.52806747",
"0.52806747",
"0.52806747",
"0.52806747",
"0.5256423",
"0.5256263",
"0.5248035",
"0.52397484",
"0.5229205",
"0.5183961",
"0.51801014",
"0.5171207",
"0.5139914",
"0.5134682",
"0.51334727",
"0.5086859",
"0.5077406",
"0.5041069",
"0.503177",
"0.5018865",
"0.49769944",
"0.4970372",
"0.4970372",
"0.49430624",
"0.49354956",
"0.49178022",
"0.49084014",
"0.49067762",
"0.48877707",
"0.4883922",
"0.48809677",
"0.48755467",
"0.48732093",
"0.48705843",
"0.4856827",
"0.48472065",
"0.4842066",
"0.4842066",
"0.4842066",
"0.48332125",
"0.48075143",
"0.4801621",
"0.48007742",
"0.47854894",
"0.47715923",
"0.47706494",
"0.47626987",
"0.4761564",
"0.47587186",
"0.47583196",
"0.47519875",
"0.47440997",
"0.47410518",
"0.474041",
"0.47345498",
"0.47339246",
"0.47260803",
"0.47206542",
"0.4720096",
"0.47072384",
"0.47007385",
"0.46949932",
"0.46812993",
"0.4677236",
"0.46737027",
"0.4665151",
"0.46644172",
"0.46640515",
"0.4662023",
"0.4655415",
"0.46523207",
"0.46502948",
"0.46454862",
"0.46429104",
"0.46246192",
"0.46243405",
"0.46209693",
"0.46126202",
"0.4612015",
"0.4612015",
"0.4607596",
"0.46030074",
"0.4600776",
"0.45723063",
"0.45699704",
"0.45699134",
"0.45675835",
"0.455947",
"0.45582804"
] | 0.7492495 | 0 |
Check whether the job has a cron expression. | public function hasCronExpression(): bool
{
return $this->cron_expression !== null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function custom_rules_is_cron_running(){\n\t$cron_expires = db_query(\"SELECT `expire` FROM {semaphore} WHERE `name` = 'cron' LIMIT 1\")->fetchField();\n\n\tif ( $cron_expires && $cron_expires > microtime(TRUE) ) {\n\t\treturn TRUE;\n\t}\n\n\treturn FALSE;\n}",
"public static function checkExistsInCron()\n {\n $crontab = new crontab();\n $cron_list = $crontab->crontab_commands('root');\n foreach ($cron_list as $command) {\n if (stripos($command, self::getConsoleCommand()) !== false) {\n return true;\n }\n }\n \n return false;\n }",
"static function doCron() {\n\t\t$lc = new DateTime(Preferences::value(\"lastCron\"));\n\t\t$now = new DateTime();\n\t\t\n\t\t$diff = $now->diff($lc, true);\n\t\tif($diff->i >= 1) return true;\n\t\treturn false;\n\t}",
"public static function doingCron() {\n\t\treturn (defined(\"DOING_CRON\") && DOING_CRON);\n\t}",
"function CheckCron()\n\t{\n\t\t$cronok = false;\n\t\t$query = \"SELECT * FROM \" . SENDSTUDIO_TABLEPREFIX . \"settings\";\n\t\t$result = $this->Db->Query($query);\n\t\t$row = $this->Db->Fetch($result);\n\t\tif ($row['cronok'] == 1) {\n\t\t\t$cronok = true;\n\t\t}\n\n\t\t$this->cronok = $cronok;\n\t\t$this->cronrun1 = (int)$row['cronrun1'];\n\t\t$this->cronrun2 = (int)$row['cronrun2'];\n\n\t\tif (isset($row['database_version'])) {\n\t\t\t$this->database_version = $row['database_version'];\n\t\t} else {\n\t\t\t$query = \"ALTER TABLE \" . SENDSTUDIO_TABLEPREFIX . \"settings ADD COLUMN database_version INT\";\n\t\t\t$result = $this->Db->Query($query);\n\t\t\tif ($result) {\n\t\t\t\t$query = \"UPDATE \" . SENDSTUDIO_TABLEPREFIX . \"settings SET database_version='0'\";\n\t\t\t\t$result = $this->Db->Query($query);\n\t\t\t}\n\t\t}\n\n\t\t$query = \"SELECT * FROM \" . SENDSTUDIO_TABLEPREFIX . \"settings_cron_schedule\";\n\t\t$result = $this->Db->Query($query);\n\t\twhile ($row = $this->Db->Fetch($result)) {\n\n\t\t\t/**\n\t\t\t * check if the item is in the schedule array.\n\t\t\t * If it's not, then it may be an addon has defined a cron schedule but not cleaned itself up when it has been uninstalled/disabled.\n\t\t\t */\n\t\t\t$schedule_name = $row['jobtype'];\n\t\t\tif (!isset($this->Schedule[$schedule_name])) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$this->Schedule[$schedule_name] = array('lastrun' => $row['lastrun']);\n\t\t}\n\n\t\treturn $cronok;\n\t}",
"public function isCronEnabled()\n {\n return $this->getConfigValue(self::XML_PATH . 'order/enable_export') ? true : false;\n }",
"public static function cronIsRunning(){\n\t\t$utc_str = gmdate(\"M d Y H:i:s\", time());\n\t\t$utc = strtotime($utc_str);\n\t\treturn \\GO::config()->get_setting('cron_last_run') > $utc-300;\n\t}",
"protected function cronjob_exists($command){\n $cronjob_exists=false;\n exec('crontab -l', $crontab,$result);\n if(isset($crontab)&&is_array($crontab)){\n $crontab = array_flip($crontab);\n if(isset($crontab[$command])){\n $cronjob_exists=true;\n }\n }\n return $cronjob_exists;\n }",
"protected function checkCronjobKey() {\n return (!isset($_REQUEST['key']) || ($_REQUEST['key'] != $this->cronjob_key)) ? false : true;\n }",
"function view_check_cron() {\n\t}",
"public function cron(string $when = '* * * * *') : bool {\n $retVal = false;\n $trimmed = trim($when);\n $split = explode(' ', $trimmed);\n $count = count($split);\n\n if ($count == 5) {\n $minutesValidity = $this->checkMinutesHelper($split[0]);\n $hoursValidity = $this->checkHoursHelper($split[1]);\n $daysOfMonthValidity = $this->dayOfMonthHelper($split[2]);\n $monthValidity = $this->checkMonthHelper($split[3]);\n $daysOfWeekValidity = $this->checkDayOfWeekHelper($split[4]);\n\n if (!($minutesValidity === false ||\n $hoursValidity === false ||\n $daysOfMonthValidity === false ||\n $monthValidity === false ||\n $daysOfWeekValidity === false)) {\n $this->taskDetails = [\n 'minutes' => $minutesValidity,\n 'hours' => $hoursValidity,\n 'days-of-month' => $daysOfMonthValidity,\n 'months' => $monthValidity,\n 'days-of-week' => $daysOfWeekValidity\n ];\n $retVal = true;\n $this->cronExpr = $when;\n }\n }\n\n return $retVal;\n }",
"function cemhub_cron_should_perform_job() {\n $last_cron_run_day = variable_get('cemhub_last_cron_run', date('Ymd', strtotime(\"yesterday\")));\n $current_day = date('Ymd');\n\n $is_in_scheduled_hour_range = (variable_get('cemhub_batch_run_time') == date('H', REQUEST_TIME));\n $hasnt_ran_today = ($last_cron_run_day < $current_day);\n\n $should_perform_job = ($is_in_scheduled_hour_range && $hasnt_ran_today);\n\n return $should_perform_job;\n}",
"function tquiz_cron () {\n return true;\n}",
"public function wp_cron_scheduled_check()\n {\n }",
"function econsole_cron () {\r\n global $CFG;\r\n\r\n return true;\r\n}",
"public function set_cron_check() {\n\n\t\t/* Nonce check */\n\t\tcheck_ajax_referer( 'wpcd-admin', 'nonce' );\n\n\t\t/* Permision check - unsure that this is needed since the action is not destructive and might cause issues if the user sees the message and can't dismiss it because they're not an admin. */\n\t\tif ( ! wpcd_is_admin() ) {\n\t\t\twp_send_json_error( array( 'msg' => __( 'You are not authorized to perform this action - dismiss cron check.', 'wpcd' ) ) );\n\t\t}\n\n\t\t/* Permissions passed - set transient. */\n\t\tset_transient( 'wpcd_cron_check', 1, 12 * HOUR_IN_SECONDS );\n\t\twp_die();\n\n\t}",
"function checkCronIsExecutable($params=array())\n\t{\n\t\t\n\t\t//count nbevent db\n\t\t$nbeventdb=0;\n\t\t//from file db\n\t\t$nbeventdb=$this->genesisdbfromfile->count(\"\",\"event\");\n\t\t//from db\n\t\tif(isset($this->db) && $this->db!=null && method_exists($this->requestor,\"checkTableExists\") && $this->requestor->checkTableExists(\"event\"))\n\t\t{\n\t\t\t$reqcheck=$this->db->query(\"select count(idevent) as nbevent FROM `event`\");\n\t\t\tif($rescheck=$this->db->fetch_array($reqcheck))\n\t\t\t{\n\t\t\t\t$nbeventdb=$rescheck['nbevent'];\n\t\t\t}\n\t\t}\n\t\t\n\t\t//count nb eventintegrator files\n\t\t$tabeventintegrator=$this->loader->charg_dossier_unique_dans_tab(\"core/integrate/event\");\n\t\t$nbeventfiles=count($tabeventintegrator);\n\t\t\n\t\tif($nbeventfiles!=$nbeventdb)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"public static function is_needed() {\n\t\treturn is_admin() || wp_doing_cron();\n\t}",
"public static function addCommandCrontab()\n {\n if (self::checkExistsInCron() === true) {\n return true;\n }\n \n $crontab = new crontab();\n $command = self::getCronCommandArray();\n $result = $crontab->crontab_cronjob_add(\n $command['minutes'],\n $command['hours'],\n $command['days'],\n $command['months'],\n $command['weekdays'],\n $command['command'] . ' > ' . $command['output'],\n 'root'\n );\n return $result['code'] == 0 ? true : $result['message'];\n }",
"public function hasCronk($cronkid) {\n return array_key_exists($cronkid, $this->cronks);\n }",
"public function it_can_get_cron()\n {\n $cron = factory(Cron::class)->create();\n $found = Cron::find($cron->id);\n\n $this->assertInstanceOf(Cron::class, $found);\n $this->assertEquals($found->expression, $cron->expression);\n $this->assertEquals($found->description, $cron->description);\n }",
"function cicleinscription_cron () {\n return true;\n}",
"function escape_cron () {\n global $CFG;\n\n return true;\n}",
"function view_check_cron() {\n\t\t$hour = date(\"H\");\n\t\t$dayofweek = date(\"N\");\n\t\t$day = date(\"j\");\n\n\t\t$last_day_of_month = date(\"j\", strtotime(\"-1 day\", strtotime(\"+1 month\", strtotime(time(\"Y-m\")))));\n\n\t\t$where_hourly = \"execute_hourly=true\";\n\t\t$where_daily = \"(execute_daily=true AND execute_hour='$hour')\";\n\t\t$where_weekly = \"(execute_weekly=true AND execute_dayofweek='$dayofweek' AND execute_hour='$hour')\";\n\t\t$where_monthly = \"(execute_monthly=true AND (execute_day='$day' OR (('$day'='$last_day_of_month') AND execute_day>'$last_day_of_month')) AND execute_hour='$hour')\";\n\n\t\t$templates = $this->dobj->db_fetch_all($this->dobj->db_query(\"SELECT * FROM templates WHERE execute=true AND ($where_hourly OR $where_daily OR $where_weekly OR $where_monthly);\"));\n\n\t\tif (!empty($templates)) {\n\t\t\techo count($templates).\" templates requiring execution\\n\";\n\n\t\t\tforeach ($templates as $template_tmp) {\n\t\t\t\t$this->call_function(\"tabular\", \"view_execute_manually\", array($template_tmp));\n\t\t\t}\n\t\t} else {\n\t\t\techo \"no templates requiring execution\\n\";\n\t\t}\n\t}",
"function email_cron() {\n return true;\n}",
"function DisableCron()\n\t{\n\t\t$this->cronok = false;\n\n\t\t$this->Db->StartTransaction();\n\n\t\t$query = \"UPDATE \" . SENDSTUDIO_TABLEPREFIX . \"settings SET cronok='0', cronrun1=0, cronrun2=0\";\n\t\t$res = $this->Db->Query($query);\n\t\tif (!$res) {\n\t\t\t$this->Db->RollbackTransaction();\n\t\t\treturn false;\n\t\t}\n\n\t\t$query = \"DELETE FROM \" . SENDSTUDIO_TABLEPREFIX . \"settings_cron_schedule\";\n\t\t$this->Db->Query($query);\n\t\tforeach (array_keys($this->Schedule) as $jobtype) {\n\t\t\t$query = \"INSERT INTO \" . SENDSTUDIO_TABLEPREFIX . \"settings_cron_schedule(jobtype, lastrun) VALUES ('\" . $this->Db->Quote($jobtype) . \"', 0)\";\n\t\t\t$res = $this->Db->Query($query);\n\t\t\tif (!$res) {\n\t\t\t\t$this->Db->RollbackTransaction();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t$this->Db->CommitTransaction();\n\n\t\treturn true;\n\t}",
"protected function expressionPasses()\n {\n $date = new \\DateTime('now');\n if ($this->_timezone) {\n $date->setTimezone($this->_timezone);\n }\n\n return CronExpression::factory($this->_expression)->isDue($date);\n }",
"protected function checkEdit() {\n global $cronjobInterface;\n\n $checked = true;\n // check if each cronjob value isset\n if (!isset($_REQUEST[cronjobInterface::CRONJOB_HOUR]) || !isset($_REQUEST[cronjobInterface::CRONJOB_MINUTE]) || !isset($_REQUEST[cronjobInterface::CRONJOB_DAY_OF_MONTH]) || !isset($_REQUEST[cronjobInterface::CRONJOB_DAY_OF_WEEK]) || !isset($_REQUEST[cronjobInterface::CRONJOB_MONTH]))\n $checked = false;\n\n if (!$checked) {\n $this->setMessage($this->lang->translate('At minimum please set a value for hour, minute, day, weekday and month for definition of the cronjob!'));\n return $this->dlgEdit();\n }\n // check the cronjob name\n if (empty($_REQUEST[cronjobInterface::CRONJOB_NAME])) {\n $this->setMessage($this->lang->translate('Please define a unique name for the cronjob!'));\n return $this->dlgEdit();\n }\n $minimum_name_length = $cronjobInterface->getCronjobConfigValue(cronjobInterface::CFG_CRONJOB_NAME_MINIMUM_LENGTH);\n if (strlen(trim($_REQUEST[cronjobInterface::CRONJOB_NAME])) < $minimum_name_length) {\n $this->setMessage($this->lang->translate('The cronjob name must be at minimum {{ length }} characters long.', array(\n 'length' => $minimum_name_length)));\n return $this->dlgEdit();\n }\n // check the cronjob command\n if (empty($_REQUEST[cronjobInterface::CRONJOB_COMMAND])) {\n $this->setMessage($this->lang->translate('Please define the command to execute by the cronjob!'));\n return $this->dlgEdit();\n }\n\n if ($_REQUEST[cronjobInterface::CRONJOB_ID] > 0) {\n // already existing cronjob\n $cronjob = array();\n if (false === ($cronjobInterface->getCronjob($_REQUEST[cronjobInterface::CRONJOB_ID], $cronjob))) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $cronjobInterface->getError()));\n return false;\n }\n // read the $_REQUEST's into an array\n $new_cronjob = array();\n $cronjobInterface->checkCronjobRequests($new_cronjob);\n\n if ($cronjob[cronjobInterface::CRONJOB_NAME] != $new_cronjob[cronjobInterface::CRONJOB_NAME]) {\n // cronjob name changed - check if the name is unique!\n if (!$cronjobInterface->checkCronjobNameIsUnique($new_cronjob[cronjobInterface::CRONJOB_NAME], $cronjob[cronjobInterface::CRONJOB_ID])) {\n if ($cronjobInterface->isError()) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $cronjobInterface->getError()));\n return false;\n }\n $this->setMessage($this->lang->translate('The cronjob name {{ name }} is not unique, please select another name!', array(\n 'name' => $cronjob[cronjobInterface::CRONJOB_NAME])));\n return $this->dlgEdit();\n }\n }\n } else {\n // create a new cronjob\n $conjob = array();\n $cronjobInterface->checkCronjobRequests($cronjob);\n // check the cronjob name - must be unique!\n if (!$cronjobInterface->checkCronjobNameIsUnique($cronjob[cronjobInterface::CRONJOB_NAME])) {\n if ($cronjobInterface->isError()) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $cronjobInterface->getError()));\n return false;\n }\n $this->setMessage($this->lang->translate('The cronjob name {{ name }} is not unique, please select another name!', array(\n 'name' => $cronjob[cronjobInterface::CRONJOB_NAME])));\n return $this->dlgEdit();\n }\n }\n\n // ok - save the cronjob\n $data = array();\n foreach ($cronjobInterface->getCronjobFieldArray() as $key => $value) {\n if (isset($_REQUEST[$key])) {\n switch ($key) {\n case cronjobinterface::CRONJOB_MINUTE:\n case cronjobInterface::CRONJOB_HOUR:\n case cronjobInterface::CRONJOB_DAY_OF_MONTH:\n case cronjobInterface::CRONJOB_DAY_OF_WEEK:\n case cronjobInterface::CRONJOB_MONTH:\n // implode array values\n if (is_array($_REQUEST[$key])) {\n $data[$key] = implode(',', $_REQUEST[$key]);\n } else {\n $data[$key] = '';\n }\n break;\n case cronjobInterface::CRONJOB_LAST_RUN:\n case cronjobInterface::CRONJOB_NEXT_RUN:\n case cronjobInterface::CRONJOB_TIMESTAMP:\n // nothing to do ...\n break;\n case cronjobInterface::CRONJOB_NAME:\n // convert to a save name\n $name = trim($_REQUEST[$key]);\n $name = page_filename($name);\n $data[$key] = $name;\n $_REQUEST[$key] = $name;\n break;\n default:\n // simply save the value\n $data[$key] = $_REQUEST[$key];\n break;\n }\n }\n }\n\n if ($_REQUEST[cronjobInterface::CRONJOB_ID] > 0) {\n // update existing cronjob\n $id = $_REQUEST[cronjobInterface::CRONJOB_ID];\n if (!$cronjobInterface->updateCronjob($id, $data)) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $cronjobInterface->getError()));\n return false;\n }\n $this->setMessage($this->lang->translate('The cronjob with the ID {{ id }} was successfull updated.', array(\n 'id' => $id)));\n } else {\n // insert a new cronjob\n $id = -1;\n if (!$cronjobInterface->insertCronjob($data, $id)) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $cronjobInterface->getError()));\n return false;\n }\n $this->setMessage($this->lang->translate('The cronjob with the ID {{ id }} was successfull inserted', array(\n 'id' => $id)));\n }\n foreach ($cronjobInterface->getCronjobFieldArray() as $key => $value) {\n if (isset($_REQUEST[$key]))\n unset($_REQUEST[$key]);\n }\n $_REQUEST[cronjobInterface::CRONJOB_ID] = $id;\n return $this->dlgEdit();\n }",
"function annotation_cron () {\n return true;\n}",
"function contactmod_cron () {\n return true;\n}",
"private function getCron(): CronExpression\n {\n return CronExpression::factory($this->expression);\n }",
"function roshine_cron () {\n return true;\n}",
"public function isRecurringRule()\n {\n return ! is_null($this->month);\n }",
"public function execMailerCron($data)\n {\n\n if( method_exists($this, $data['method_name']) ){\n return (boolean) $this->$data['method_name']($data);\n }\n\n return false;\n }",
"function CronEnabled($autoresponder_check=false)\n\t{\n\t\t/**\n\t\t * If cron isn't enabled at all, return straight away.\n\t\t */\n\t\tif (!SENDSTUDIO_CRON_ENABLED) {\n\t\t\treturn false;\n\t\t}\n\n\t\t/**\n\t\t * If we're just checking autoresponders, then check that particular variable.\n\t\t */\n\t\tif ($autoresponder_check) {\n\t\t\tif (SENDSTUDIO_CRON_AUTORESPONDER > 0) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\t/**\n\t\t * If we're not just checking autoresponders, return true\n\t\t * as we're just checking whether cron is working or not.\n\t\t */\n\t\treturn true;\n\t}",
"public function it_can_create_cron()\n {\n $data = [\n 'expression' => $this->faker->text(15),\n 'description' => $this->faker->text(35)\n ];\n\n $cron = Cron::create($data);\n $this->assertInstanceOf(Cron::class, $cron);\n $this->assertEquals($data['expression'], $cron->expression);\n $this->assertEquals($data['description'], $cron->description);\n\n }",
"protected function checkScheduledJobs() {\n global $database;\n // first get all active cronjobs\n $SQL = sprintf(\"SELECT * FROM %smod_kit_cj_cronjob WHERE `cronjob_status`='ACTIVE'\", TABLE_PREFIX);\n if (null ===($result = $database->query($SQL))) {\n $this->setError(sprintf('[%s _ %s] %s', __METHOD__, __LINE__, $database->get_error()));\n exit($this->getError());\n }\n $cronjobs = array();\n while (false !== ($job = $result->fetchRow(MYSQL_ASSOC))) {\n $cronjobs[$job['cronjob_id']] = $job;\n }\n foreach ($cronjobs as $cronjob) {\n $this->log[self::CRONJOB_ID] = $cronjob['cronjob_id'];\n $this->log[self::CRONJOB_NAME] = $cronjob['cronjob_name'];\n if ($cronjob['cronjob_next_run'] == '0000-00-00 00:00:00') {\n // this cronjob was never executed...\n $cronjob['cronjob_next_run'] = $this->calculateNextRun($cronjob);\n $cronjob['cronjob_last_status'] = 'First call, calculate the next regular run of this cronjob.';\n $cronjob['cronjob_last_run'] = date('Y-m-d H:i:s');\n $this->updateCronjob($cronjob);\n $this->log[self::LOG_MESSAGE] = 'First call, calculate the next regular run of this cronjob.';\n $this->log[self::LOG_STATUS] = self::STATUS_OK;\n $this->log[self::CRONJOB_RUN] = $cronjob['cronjob_last_run'];\n $this->log[self::CRONJOB_STATUS] = 'OK';\n $this->writeLog();\n }\n if (strtotime($cronjob['cronjob_next_run']) < time()) {\n // execute this cronjob\n if (false !== strpos($cronjob['cronjob_command'], LEPTON_URL)) {\n $cronjob['cronjob_command'] = substr($cronjob['cronjob_command'], strlen(LEPTON_URL));\n }\n if (false !== strpos($cronjob['cronjob_command'], LEPTON_PATH)) {\n $cronjob['cronjob_command'] = substr($cronjob['cronjob_command'], strlen(LEPTON_PATH));\n }\n if (strpos($cronjob['cronjob_command'], DIRECTORY_SEPARATOR) == 0) {\n $cronjob['cronjob_command'] = substr($cronjob['cronjob_command'], 1);\n }\n $execute = LEPTON_PATH.DIRECTORY_SEPARATOR.$cronjob['cronjob_command'];\n if (!file_exists($execute)) {\n // write the error to the log but continue with the next cronjob.\n $this->setError(sprintf('The relative path %s does not exists, please check the settings for this cronjob!', $cronjob['cronjob_command']));\n continue;\n }\n if (false === ($result = exec(sprintf(\"%s %s\", $this->php_exec, $execute)))) {\n // error executing - write log and continue\n $this->setError(sprintf('Error executing %s - no more informations available.', $cronjob['cronjob_command']));\n continue;\n }\n $this->log[self::LOG_MESSAGE] = $result;\n $this->log[self::LOG_STATUS] = self::STATUS_OK;\n $this->log[self::CRONJOB_RUN] = date('Y-m-d H:i:s');\n $this->log[self::CRONJOB_STATUS] = 'OK';\n $this->writeLog();\n $cronjob['cronjob_last_run'] = $this->log[self::CRONJOB_RUN];\n $cronjob['cronjob_last_status'] = $result;\n $cronjob['cronjob_next_run'] = $this->calculateNextRun($cronjob);\n $this->updateCronjob($cronjob);\n $this->cronjob_executed = true;\n }\n }\n }",
"function CheckCronStillRunning($leeway=3)\n\t{\n\t\tif (!$this->CheckCron()) {\n\t\t\treturn true;\n\t\t}\n\n\t\t$expectedIntervalPool = array(SENDSTUDIO_CRON_SEND, SENDSTUDIO_CRON_AUTORESPONDER, SENDSTUDIO_CRON_BOUNCE, SENDSTUDIO_CRON_TRIGGEREMAILS_S, SENDSTUDIO_CRON_TRIGGEREMAILS_P);\n\t\t$expectedInterval = -1;\n\t\t$actualInterval = floor(($this->GetServerTime() - $this->cronrun2) / 60);\n\n\t\tforeach ($expectedIntervalPool as $item) {\n\t\t\t$item = intval($item);\n\t\t\tif ($item == 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ($expectedInterval == -1 || $expectedInterval > $item) {\n\t\t\t\t$expectedInterval = $item;\n\t\t\t}\n\t\t}\n\n\t\treturn ($actualInterval < ($expectedInterval * $leeway));\n\t}",
"public function getCronCmd() {}",
"public function isReady(): bool\n {\n $serverSetting = $this->server->getServerSetting();\n $cronable = (int)$serverSetting['cronable'];\n if ($cronable !== 1) {\n return false;\n }\n\n return true;\n }",
"function etherpadlite_cron () {\n return true;\n}",
"function bigbluebuttonbn_cron () {\n return true;\n}",
"public function setCron($cron)\n\t{\t\t\t\t\n\t\t$this->_cron = (bool)$cron;\n\t}",
"public function isExpression()\n {\n $ruleName = $this->getName();\n \n return array_key_exists($ruleName, self::$_rules) \n && array_key_exists('expression', self::$_rules[$ruleName]);\n }",
"public function it_can_delete_cron()\n {\n $cron = factory(Cron::class)->create();\n $id = $cron->id;\n $result = $cron->delete();\n\n $this->assertTrue($result);\n $this->assertEmpty(Cron::where('id', '=', $id)->first());\n }",
"public function getCronStatus()\n {\n // get the last job with status pending or running\n $lastJob = Mage::getModel('cron/schedule')->getCollection()\n ->addFieldToFilter('status', array(\n 'in' => array(\n Mage_Cron_Model_Schedule::STATUS_PENDING,\n Mage_Cron_Model_Schedule::STATUS_RUNNING,\n )\n )\n )\n ->setOrder('scheduled_at', Varien_Data_Collection_Db::SORT_ORDER_DESC)\n ->setPageSize(1)\n ->getFirstItem();\n\n // check if last job has been scheduled within allowed interval\n $ok = true;\n if ($lastJob && $lastJob->getId()) {\n $locale = Mage::app()->getLocale();\n\n $scheduledAt = $locale->date($lastJob->getScheduledAt(), Varien_Date::DATETIME_INTERNAL_FORMAT);\n $scheduledAt = $locale->utcDate(null, $scheduledAt);\n\n // now\n $now = $locale->date(null, Varien_Date::DATETIME_INTERNAL_FORMAT);\n $now = $locale->utcDate(null, $now);\n\n // if last job was scheduled before the current time\n if ($now->isLater($scheduledAt)) {\n $allowedTime = $now->subHour($this->_allowedTimeDiffJob);\n if ($allowedTime->isLater($scheduledAt)) {\n $ok = false;\n }\n }\n } else {\n $ok = false;\n }\n\n $message = '';\n if ($ok) {\n $image = $this->_getTickImageLink();\n $message = Mage::helper('emvcore')->__(\n '<span class=\"icon-status\">%s</span> Magento Cron Process has been correctly configured!',\n $image\n );\n } else {\n $image = $this->_getUnTickImageLink();\n $message = Mage::helper('emvcore')->__(\n '<span class=\"icon-status\">%s</span> Magento Cron Process has not been correctly activated!',\n $image\n );\n }\n\n return $message;\n }",
"public function testRunCronCronDisabledFromConfig()\n {\n $this->configMock->expects($this->once())\n ->method('isCronEnabled')\n ->willReturn(false);\n\n $this->assertSame(\n $this->model,\n $this->model->runCron()\n );\n }",
"public function getCronDefinition()\n {\n return $this->cron_script; \n }",
"public function it_can_update_cron()\n {\n $cron = factory(Cron::class)->create();\n\n $data = [\n 'expression' => $this->faker->text(15),\n 'description' => $this->faker->text(35)\n ];\n\n $result = $cron->update($data);\n\n $this->assertTrue($result);\n $this->assertEquals($data['expression'], $cron->expression);\n $this->assertEquals($data['description'], $cron->description);\n }",
"function install_cron_scheduler() {\n\tglobal $amp_conf;\n\tglobal $nt;\n\n\t// crontab appears to return an error when no entries, os only fail if error returned AND a list of entries.\n\t// Don't know if this will ever happen, but a failure and a list could indicate something wrong.\n\t//\n\t$outlines = array();\n\texec(\"/usr/bin/crontab -l\", $outlines, $ret);\n\tif ($ret && count($outlines)) {\n\t\t$nt->add_error('retrieve_conf', 'CRONMGR', _(\"Failed to check crontab for cron manager\"), sprintf(_(\"crontab returned %s error code when checking for crontab entries to start freepbx-cron-scheduler.php crontab manager\"),$ret));\n\t} else {\n\t\t$nt->delete('retrieve_conf', 'CRONMGR');\n\t\t$outlines2 = preg_grep(\"/freepbx-cron-scheduler.php/\",$outlines);\n\t\t$cnt = count($outlines2);\n\t\tswitch ($cnt) {\n\t\t\tcase 0:\n\t\t\t\t/** grab any other cronjobs that are running as asterisk and NOT associated with backups\n \t\t\t\t* this code was taken from the backup module for the most part. But seems to work...\n \t\t\t\t*/\n\t\t\t\t$outlines = array();\n\t\t\t\texec(\"/usr/bin/crontab -l | grep -v ^#\\ DO\\ NOT | grep -v ^#\\ \\( | grep -v freepbx-cron-scheduler.php\", $outlines, $ret);\n\t\t\t\t$crontab_entry = \"\";\n\t\t\t\tforeach ($outlines as $line) {\n\t\t\t\t\t$crontab_entry .= $line.\"\\n\";\n\t\t\t\t}\n\t\t\t\t// schedule to run hourly, at a random time. The random time is explicit to accomodate things like module_admin online update checking\n\t\t\t\t// since we will want a random access to the server. In the case of module_admin, that will also be scheduled randomly within the hour\n\t\t\t\t// that it is to run\n\t\t\t\t//\n\t\t\t\t$crontab_entry .= rand(0,59).\" * * * * \".$amp_conf['AMPBIN'].\"/freepbx-cron-scheduler.php\";\n\t\t\t\tsystem(\"/bin/echo '$crontab_entry' | /usr/bin/crontab -\");\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\t// already running, nothing to do\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t// error, there should never be more than one running\n\t\t\t\techo \"TODO: deal with error here\\n\";\n\t\t\t\t$nt->add_error('retrieve_conf', 'CRONMGR', _(\"Multiple freepbx-cron-scheduler.php running\"), sprintf(_(\"There were %s freepbx-cron-scheduler.php instances running. There should be only 1.\"),$cnt));\n\t\t}\n\t}\n}",
"static function schedule_cron() {\n\t\t$is_multisite = is_multisite();\n\t\tif ( $is_multisite ) {\n\t\t\t$primary_blog = get_current_site();\n\t\t\t$current_blog = get_current_blog_id();\n\t\t} else {\n\t\t\t$primary_blog = 1;\n\t\t\t$current_blog = 1;\n\t\t}\n\n\t\t/**\n\t\t * If we're on a multisite, only schedule the cron if we're on the primary blog\n\t\t */\n\t\tif (\n\t\t( ! $is_multisite || ( $is_multisite && $primary_blog->id === $current_blog ) )\n\t\t) {\n\t\t\t$cronsScheduled = false;\n\t\t\tif( ! wp_next_scheduled( 'wp_rest_cache_cron' ) ) {\n\t\t\t\twp_schedule_event( time(), '5_minutes', 'wp_rest_cache_cron' );\n\t\t\t\t$cronsScheduled = true;\n\t\t\t}\n\t\t\tif( ! wp_next_scheduled( 'wp_rest_cache_expired_cron' ) ) {\n\t\t\t\twp_schedule_event( time(), 'hourly', 'wp_rest_cache_expired_cron' );\n\t\t\t\t$cronsScheduled = true;\n\t\t\t}\n\t\t\tif( $cronsScheduled ) {\n\t\t\t\tdo_action( 'wrc_after_schedule_cron', $primary_blog, $current_blog );\n\t\t\t}\n\t\t}\n\t}",
"public function getCronTimes(array $definition) {\n return $definition['cron'] ? array_map('trim', explode(',', $definition['cron'])) : FALSE;\n }",
"public function maybeSchedule() {\n\t\t$scheduledTimestamp = wp_next_scheduled(static::$cronHook);\n\t\tif( !$scheduledTimestamp ) {\n\t\t\t$this->schedule();\n\t\t\treturn;\n\t\t}\n\n\t\t$cronJobs = _get_cron_array();\n\t\t$job = $cronJobs[$scheduledTimestamp][static::$cronHook];\n\n\t\t//If the schedule doesn't match, reschedule\n\t\tif( $job['schedule'] !== $this->get_option('schedule') ) {\n\t\t\t$this->unschedule();\n\t\t\t$this->schedule();\n\t\t}\n\t}",
"public function hasJob(): bool;",
"function dllc_cron () {\n return true;\n}",
"function cron_data() {\n return false;\n }",
"public static function sync_via_cron_allowed() {\n\t\t_deprecated_function( __METHOD__, 'jetpack-7.5', 'Automattic\\Jetpack\\Sync\\Actions' );\n\n\t\treturn Actions::sync_via_cron_allowed();\n\t}",
"public function fireMailerCrons()\n {\n $notify_crons = $this->timber->option_model->getOptionByKey('_notify_crons');\n\n $status = true;\n\n if( (false !== $notify_crons) && (is_object($notify_crons)) ){\n $notify_crons = $notify_crons->as_array();\n\n $notify_crons['op_value'] = unserialize($notify_crons['op_value']);\n\n foreach ( $notify_crons['op_value'] as $key => $data ) {\n unset($notify_crons['op_value'][$key]);\n $status &= (boolean) $this->execMailerCron($data);\n }\n\n $status &= $this->timber->option_model->updateOptionById(array(\n 'op_id' => $notify_crons['op_id'],\n 'op_value' => serialize($notify_crons['op_value'])\n ));\n }\n\n return $status;\n }",
"function customcert_cron() {\n return true;\n}",
"function add_custom_cron() {\n\tif ( ! wp_next_scheduled( 'custom_cron_action' ) ) {\n\t\twp_schedule_event( current_time( 'timestamp' ), 'hourly', 'custom_cron_action' );\n\t}\n}",
"function wp_doing_cron()\n {\n }",
"public function checkRecurringProfileRunCronJob(Mage_Sales_Model_Recurring_Profile $profile)\r\n {\r\n $additionalInfo = $profile->getAdditionalInfo();\r\n $timezone = Mage::app()->getStore()->getConfig(Mage_Core_Model_Locale::XML_PATH_DEFAULT_TIMEZONE);\r\n // timezone used as store's timezone\r\n $nextDate = new DateTime(date(\"Y-m-d\", strtotime($additionalInfo['nextDate'])), new DateTimeZone($timezone));\r\n $currentDate = new DateTime(date(\"Y-m-d\", Mage::getModel('core/date')->timestamp(time())), new DateTimeZone($timezone));\r\n if (!isset($additionalInfo['beforeDate']) || $additionalInfo['beforeDate'] == null) {\r\n if($nextDate == $currentDate) {\r\n return true;\r\n }\r\n } else {\r\n $beforeDate = new DateTime(date(\"Y-m-d\", strtotime($additionalInfo['beforeDate'])), new DateTimeZone($timezone));\r\n if ($beforeDate < $currentDate && $nextDate == $currentDate) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }",
"static public function external_cron_run_check()\n {\n $options = get_option( self::$settings_option_field ); // get settings\n\n // Check if a scan is being requested externally\n // and that the correct security key is provided\n // and the that the settings allow an external cron.\n if( ! isset( $_GET['sc_wpfmp_scan'] ) || ! isset( $_GET['sc_wpfmp_key'] ) || 1 != $_GET['sc_wpfmp_scan'] || $options['security_key'] != $_GET['sc_wpfmp_key'] || \"other\" != $options['cron_method'] )\n return;\n\n // Go do scan\n do_action( 'sc_wpfmp_scan' );\n\n // Die with message saying scan ran\n die( __( \"Scan Successful\", \"wordpress-file-monitor-plus\" ) );\n }",
"function asmcron_init_cronjob()\n{\n // check that it hasn't been scheduled yet using our own custom hook\n if( !wp_next_scheduled( 'asmcron_sendmail_hook' ) )\n {\n // if it hasn't, schedule it\n // https://codex.wordpress.org/Function_Reference/wp_schedule_event\n // \"$timestamp\" is for the first time you want the event to occur\n // \"$recurrence\" is for how often the event should reoccur\n // \"$hook\" is for the action hook to execute\n wp_schedule_event( time(), 'hourly', 'asmcron_sendmail_hook' );\n }\n}",
"public function addcron() {\r\n $os = php_uname('s');\r\n\r\n $file = APP_PATH . '/index.php?c=cron&a=apply';\r\n\r\n\r\n switch ($os) {\r\n case substr($os, 0, 7) == 'Windows':\r\n exec(\"schtasks /create /sc minute /mo 5 /tn 'update_quota' /tr . $file . /ru 'System'\");\r\n break;\r\n\r\n case substr($os, 0, 5) == 'Linux':\r\n switch ($_SERVER['SERVER_PORT']) {\r\n case 80:\r\n $url = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];\r\n break;\r\n\r\n case 443:\r\n $url = 'https://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];\r\n break;\r\n\r\n default:\r\n $url = 'http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'] . $_SERVER['REQUEST_URI'];\r\n }\r\n\r\n $cmdline = '*/5 * * * * /usr/bin/curl' . $url;\r\n\r\n exec('crontab -e <' . $cmdline);\r\n break;\r\n }\r\n }",
"function customcert_cron () {\n return true;\n}",
"function can_do_listinstancejobs() {\n if (has_capability('block/php_report:manageschedules', get_context_instance(CONTEXT_SYSTEM))) {\n //user can manage schedules globally, so allow access\n return true;\n }\n\n //obtain the report shortname and instance\n $report_shortname = $this->required_param('report', PARAM_ALPHAEXT);\n $report_instance = php_report::get_default_instance($report_shortname, NULL, php_report::EXECUTION_MODE_SCHEDULED);\n\n //false is returned in the case of permissions failure\n return $report_instance !== false;\n }",
"function randomstrayquotes_cron () {\n return true;\n}",
"function simulateCron() {\n\t\tglobal $publishthis;\n\n\t\t// Return here is we want to pause polling.\n\t\tif ( $publishthis->get_option ( 'pause_polling' ) ) {\n\t\t\tif ( ! get_option ( 'publishthis_paused_on' ) ) {\n\t\t\t\tupdate_option ( 'publishthis_paused_on', time() );\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tignore_user_abort( true );\n\n\t\t//modifying the logic here a bit and going with options, instead of\n\t\t//transients, because those were sometimes disappearing from\n\t\t//the wp cache. don't want to disrupt the clients site\n\n\t\t//basic algorithm\n\t\t/*\n 1 - see if we are doing the cron all ready, if so, don't do anything\n 2 - if not doing cron, get the last timestamp of when we did this cron\n -- we only want to check every XX minutes\n 3 - if no time is set yet, we do the check\n 4 - if the time is set, and we have not yet passed our XX minutes, we do not do anything\n 5 - if we are doing the check, update that we are doing the cron\n 6 - do the cron action\n 7 - once completed, set\n - the timestamp we completed at, for future checks\n - remove the doing cron value\n */\n\t\t$doingSimulatedCron = get_option ( 'pt_simulated_cron' );\n\n\t\t//create lock flag if not exists and set it to 0 (false)\n\t\tif ( false === $doingSimulatedCron ) {\n\t\t\tupdate_option( \"pt_simulated_cron\", 0 );\n\t\t}\n\t\t$doingSimulatedCron = intval($doingSimulatedCron);\n\t\t//cron is not running\n\t\tif ( 0 === $doingSimulatedCron ) {\n\t\t\t//check the time\n\t\t\t$secondsExpiration = 60 * 2; //roughly 2 minutes. should be based on publishing action set poll times, but that would be too much to query;\n\n\t\t\t$timestamp = get_option ( 'pt_simulated_cron_ts' );\n\n\t\t\t$currentTimestamp = ( time() ) * 1000;\n\n\t\t\tif ( !$timestamp ) {\n\t\t\t\t//this has never been set before, so, we can just assume we need to do the cron\n\t\t\t\t$timestamp = $currentTimestamp;\n\t\t\t\t\n\t\t\t\t//set the timestamp the first time\n\t\t\t\tupdate_option( \"pt_simulated_cron_ts\", $timestamp );\n\t\t\t}\n\t\t\t//see if we need to do the cron\n\t\t\t$diffTimestamp = $currentTimestamp - $timestamp;\n\t\t\t\n\t\t\t$diffTimeSeconds = ( $diffTimestamp / 1000 );\n\t\n\t\t\tif ( $diffTimeSeconds >= $secondsExpiration ) {\n\t\t\t\t//ok, we need to do the cron action\n\t\t\t\tupdate_option( \"pt_simulated_cron\", 1 );\n\n\t\t\t\ttry {\n\t\t\t\t\t//if we are here, that means we need to do the cron action\n\t\t\t\t\t//get only active Publishing Actions\n\t\t\t\t\t$actions = $publishthis->publish->get_publishing_actions();\n\n\t\t\t\t\t$publishthis->log->addWithLevel ( array(\n\t\t\t\t\t\t\t'message' => 'Checking on simulated cron events',\n\t\t\t\t\t\t\t'status' => 'info',\n\t\t\t\t\t\t\t'details' => \"Found \" . count( $actions ) . \" publishing events to check\" ), \"2\" );\n\t\t\t\t\t\n\t\t\t\t\t// do import\n\t\t\t\t\t$publishthis->publish->run_import();\n\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\t//set simulate cron options on failure\n\t\t\t\t\t//leaving duplicated lines, because php4 doesn't have finally block\n\t\t\t\t\tupdate_option( \"pt_simulated_cron_ts\", $currentTimestamp );\n\t\t\t\t\tupdate_option( \"pt_simulated_cron\", 0 );\n\t\t\t\t}\n\t\t\t\n\t\t\t\t//now that we are done, set the old timestamp\n\t\t\t\tupdate_option( \"pt_simulated_cron_ts\", $currentTimestamp );\n\t\t\t\tupdate_option( \"pt_simulated_cron\", 0 );\n\t\t\t}\t\n\t\t}\t\t\n\t}",
"public static function getAllowedTypes()\n {\n return self::$cron_types;\n }",
"public function needs_run() {\n $today = time();\n $lastrun = $this->info[\"last_run\"];\n $interval = (int)$this->freq * 86400;\n\n return($today > ($lastrun + $interval));\n }",
"function bpsPro_schedule_PFWAP_check() {\n$options = get_option('bulletproof_security_options_pfw_autopilot');\n$bpsPFWAPCronCheck = wp_get_schedule('bpsPro_PFWAP_check');\n$killit = '';\n\t\n\tif ( ! get_option('bulletproof_security_options_pfw_autopilot' ) || ! $options['bps_pfw_autopilot_cron'] || $options['bps_pfw_autopilot_cron'] == '' ) {\n\t\treturn $killit;\n\t}\n\t\n\tif ( $options['bps_pfw_autopilot_cron'] == 'On' ) {\n\t\n\tif ( $options['bps_pfw_autopilot_cron_frequency'] == '1' ) {\n\tif ( $bpsPFWAPCronCheck == 'minutes_5' || $bpsPFWAPCronCheck == 'minutes_10' || $bpsPFWAPCronCheck == 'minutes_15' || $bpsPFWAPCronCheck == 'minutes_30' || $bpsPFWAPCronCheck == 'minutes_60' ) {\n\t\twp_clear_scheduled_hook('bpsPro_PFWAP_check');\n\t}\n\t\n\tif ( ! wp_next_scheduled( 'bpsPro_PFWAP_check' ) ) {\n\t\twp_schedule_event( time(), 'minutes_1', 'bpsPro_PFWAP_check');\n\t}\n\t}\n\t\n\tif ( $options['bps_pfw_autopilot_cron_frequency'] == '5' ) {\n\tif ( $bpsPFWAPCronCheck == 'minutes_1' || $bpsPFWAPCronCheck == 'minutes_10' || $bpsPFWAPCronCheck == 'minutes_15' || $bpsPFWAPCronCheck == 'minutes_30' || $bpsPFWAPCronCheck == 'minutes_60' ) {\n\t\twp_clear_scheduled_hook('bpsPro_PFWAP_check');\n\t}\n\t\n\tif ( ! wp_next_scheduled('bpsPro_PFWAP_check' ) ) {\n\t\twp_schedule_event( time(), 'minutes_5', 'bpsPro_PFWAP_check' );\n\t}\n\t}\n\t\n\tif ( $options['bps_pfw_autopilot_cron_frequency'] == '10' ) {\n\tif ( $bpsPFWAPCronCheck == 'minutes_1' || $bpsPFWAPCronCheck == 'minutes_5' || $bpsPFWAPCronCheck == 'minutes_15' || $bpsPFWAPCronCheck == 'minutes_30' || $bpsPFWAPCronCheck == 'minutes_60' ) {\n\t\twp_clear_scheduled_hook('bpsPro_PFWAP_check');\n\t}\n\t\n\tif ( ! wp_next_scheduled('bpsPro_PFWAP_check' ) ) {\n\t\twp_schedule_event( time(), 'minutes_10', 'bpsPro_PFWAP_check' );\n\t}\n\t}\n\t\n\tif ( $options['bps_pfw_autopilot_cron_frequency'] == '15' ) {\n\tif ( $bpsPFWAPCronCheck == 'minutes_1' || $bpsPFWAPCronCheck == 'minutes_5' || $bpsPFWAPCronCheck == 'minutes_10' || $bpsPFWAPCronCheck == 'minutes_30' || $bpsPFWAPCronCheck == 'minutes_60' ) {\n\t\twp_clear_scheduled_hook('bpsPro_PFWAP_check');\n\t}\n\t\n\tif ( ! wp_next_scheduled('bpsPro_PFWAP_check' ) ) {\n\t\twp_schedule_event( time(), 'minutes_15', 'bpsPro_PFWAP_check' );\n\t}\n\t}\n\t\n\tif ( $options['bps_pfw_autopilot_cron_frequency'] == '30' ) {\n\tif ( $bpsPFWAPCronCheck == 'minutes_1' || $bpsPFWAPCronCheck == 'minutes_5' || $bpsPFWAPCronCheck == 'minutes_10' || $bpsPFWAPCronCheck == 'minutes_15' || $bpsPFWAPCronCheck == 'minutes_60' ) {\n\t\twp_clear_scheduled_hook('bpsPro_PFWAP_check');\n\t}\n\t\n\tif ( ! wp_next_scheduled('bpsPro_PFWAP_check' ) ) {\n\t\twp_schedule_event( time(), 'minutes_30', 'bpsPro_PFWAP_check' );\n\t}\n\t}\n\n\tif ( $options['bps_pfw_autopilot_cron_frequency'] == '60' ) {\n\tif ( $bpsPFWAPCronCheck == 'minutes_1' || $bpsPFWAPCronCheck == 'minutes_5' || $bpsPFWAPCronCheck == 'minutes_10' || $bpsPFWAPCronCheck == 'minutes_15' || $bpsPFWAPCronCheck == 'minutes_30' ) {\n\t\twp_clear_scheduled_hook('bpsPro_PFWAP_check');\n\t}\n\t\n\tif ( ! wp_next_scheduled('bpsPro_PFWAP_check' ) ) {\n\t\twp_schedule_event( time(), 'minutes_60', 'bpsPro_PFWAP_check' );\n\t}\n\t}\n\n\t}\n\telseif ( $options['bps_pfw_autopilot_cron'] == 'Off' ) { \n\t\twp_clear_scheduled_hook('bpsPro_PFWAP_check');\n\t}\n}",
"public function testRunCronCronEnabledFromConfig()\n {\n $this->configMock->expects($this->once())\n ->method('isCronEnabled')\n ->willReturn(true);\n\n $this->reportModulesInfoMock->expects($this->once())\n ->method('report')\n ->willReturnSelf();\n $this->reportCountsMock->expects($this->once())\n ->method('report')\n ->willReturnSelf();\n $this->reportNewRelicCronMock->expects($this->once())\n ->method('report')\n ->willReturnSelf();\n\n $this->assertSame(\n $this->model,\n $this->model->runCron()\n );\n }",
"static public function enable_cron( $manual_interval = false )\n {\n $options = get_option( self::$settings_option_field ); // Get settings\n $currentSchedule = wp_get_schedule( self::$cron_name ); // find if a schedule already exists\n\n // if a manual cron interval is set, use this\n if( ! empty( $manual_interval ) )\n $options['file_check_interval'] = $manual_interval;\n\n if( \"manual\" == $options['file_check_interval'] )\n {\n do_action( \"sc_wpfmp_disable_wp_cron\" ); // Make sure no cron is setup as we are manual\n } else\n {\n // check if the current schedule matches the one set in settings\n if( $currentSchedule == $options['file_check_interval'] )\n return;\n\n // check the cron setting is valid\n if( ! in_array( $options['file_check_interval'], self::$frequency_intervals ) )\n return;\n\n // Remove any cron's for this plugin first so we don't end up with multiple cron's doing the same thing.\n do_action( \"sc_wpfmp_disable_wp_cron\" );\n\n // Schedule cron for this plugin.\n wp_schedule_event( time(), $options['file_check_interval'], self::$cron_name );\n }\n }",
"public function getCron() {\n\t\t$cron = [\"raw\" => \"\", \"active\" => false, \"mm\" => \"\", \"hh\" => \"\", \"dd\" => \"\", \"name\" => \"\"];\n\t\t$output = shell_exec('crontab -l');\n\t\t$lines = explode(\"\\n\", trim($output));\n\t\tif (count($lines) > 3) { // check cron is not empty - First 3 lines are not cron entry but used to reload crontrab at reboot\n\t\t\t$return['Status'] = \"OK\";\n\t\t\twhile ($lines[0] != \"#BEGIN\") { array_shift($lines); } //Remove non cron lines\n\t\t\tarray_shift($lines);\n\t\t\tforeach ($lines as $entry) {\n\t\t\t\t$str = explode(\"/usr\", $entry);\n\t\t\t\t$cron[\"raw\"] = rtrim($str[0]);\n\t\t\t\tif ($cron[\"raw\"][0] == \"#\") {\n\t\t\t\t\t$cron[\"active\"] = false;\n\t\t\t\t\t$sched = substr($cron[\"raw\"],1);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$cron[\"active\"] = true;\n\t\t\t\t\t$sched = $cron[\"raw\"];\n\t\t\t\t}\n\t\t\t\t$sched = explode(\" \",$sched);\n\t\t\t\t$cron[\"mm\"] = $sched[0];\n\t\t\t\t$cron[\"hh\"] = $sched[1];\n\t\t\t\t$cron[\"dd\"] = $sched[4];\n\t\t\t\t$cron[\"name\"] = explode(\"#\",$str[count($str)-1]);\n\t\t\t\t$cron[\"name\"] = $cron[\"name\"][1];\n\t\t\t\t$return['cron'][]=$cron;\n\t\t\t}\n\t\t}\n\t\telse $return['Status'] = \"KO\";\n\t\tif (debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS,2)[1]['function'] == 'invokeMethod') Flight::json($return);\n\t\telse return $return;\n\t}",
"private function Should_Run_Task() {\n\t\t$rules = $this->Get_Business_Rules();\n\t\t\n\t\t$time = time();\n\t\t$today = date('Y-m-d', $time);\n\t\t$named_day = date('l', $time);\n\t\t\n\t\t// Cheating.. If the rule is set to NULL we're cheating\n\t\t// and not creating a business rule for it, so just run it.\n\t\tif(is_null($this->business_rule_name))\n\t\t{\n\t\t\t$this->Get_Server()->log->Write(\"Developer was lazy and didn't create a business rule! Running task anyways..\");\n\t\t\treturn TRUE;\n\t\t}\n\t\t\n\t\tif(! isset($rules[$this->business_rule_name]))\n\t\t{\n\t\t\t$this->Get_Server()->log->Write(\"Can't find business rule name: {$this->business_rule_name}\");\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t$days = $rules[$this->business_rule_name];\n\n\t\t//[#44294] check 'day_special' rule (overrides day of week & holidays)\n\t\tif(isset($days['Special Days']))\n\t\t{\n\t\t\t$special_days = explode(',', $days['Special Days']);\t\n\t\t\tforeach($special_days as $special_day)\n\t\t\t{\n\t\t\t\tswitch($special_day)\n\t\t\t\t{\n\t\t\t\t\tcase 'last of month':\t\t\t\t\t\t\n\t\t\t\t\t\tif(date('t', $time) == date('j', $time))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->Get_Server()->log->Write(\"Running task for special day 'last of month'\");\n\t\t\t\t\t\t\treturn TRUE;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (strtolower($days[$named_day]) == 'yes') \n\t\t{\n\t\t\tif (strtolower($days['Holidays']) == 'no') \n\t\t\t{\n\t\t\t\t$holidays = Fetch_Holiday_List();\n\t\t\t\t$check_day = strtotime(\"+1 day\", $today);\n\t\t\t\tif (in_array($check_day, $holidays)) \n\t\t\t\t{\n\t\t\t\t\treturn FALSE;\n\t\t\t\t} \n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\treturn TRUE;\n\t\t\t\t}\n\t\t\t} \n\t\t\telse \n\t\t\t{\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t} \n\t\telse \n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t}",
"function _schedule_cron( $hook, $recurrence = null, $time = null ) {\n\t\tIMFORZA_Utils::schedule_cron( $hook, $recurrence, $time );\n\t}",
"public function getExpression() : string {\n return $this->cronExpr;\n }",
"public function testCronJobSearchConfig()\n {\n $sql = 'SELECT count(*) FROM s_crontab';\n $totalCronJobCount = Shopware()->Db()->fetchOne($sql);\n\n // Test the search\n $this->checkGetTableListSearch('a', $totalCronJobCount, 'cronJob');\n\n $this->reset();\n\n // Test the search with a pagination\n $this->checkGetTableListSearchWithPagination('a', 'cronJob');\n }",
"public function runInCron(): void\n {\n $result = $this->run();\n\n if ($result->getStatus() !== true) {\n do_action(Hooks::ADVANCED_CHECK_ALERT, $this, $result);\n }\n }",
"public function addCron() { // cron parameters passed via JSON query string\n\t\t$cron = json_decode(Flight::request()->query['cron'],true);\n\t\t$t = explode(\":\",$cron['t']); //time\n\t\t$i= 0;\n\t\t$str='';\n\t\tforeach ($cron['d'] as $d) { //compose day of Week\n\t\t\tif ($d) $str .= $i.',';\n\t\t\t$i++;\n\t\t};\n\t\t$str = rtrim($str,',');\n\t\t$cronLine = $t[1].' '.$t[0].' * * '.$str.' /usr/bin/curl localhost/radion >/dev/null 2>&1 #'.$cron['c'].PHP_EOL;\n\t\tfile_put_contents(Flight::get(\"pathCron\"), $cronLine, FILE_APPEND | LOCK_EX);\n\t\texec(\"cat \".Flight::get(\"pathCron\").\" | crontab -\");\n\t\tFlight::json(array('Status' => 'OK','Cron' => $t[1].' '.$t[0].' * * '.$str.' #'.$cron['c']));\n\t}",
"public function cron($expression)\n {\n $this->_expression = $expression;\n\n return $this;\n }",
"protected function isExpression(string $expression): bool\n {\n return str_contains($expression, '${');\n }",
"public function is_process_running() {\n\n\t\t\tif ( ! class_exists( 'ActionScheduler' ) || ! is_callable( array( 'ActionScheduler', 'store' ) ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$csv_scheduler_status = '';\n\n\t\t\t$import_coupon_scheduler_status = '';\n\n\t\t\t$scheduler_running_statuses = array(\n\t\t\t\t'pending',\n\t\t\t\t'in-progress',\n\t\t\t);\n\n\t\t\tforeach ( $scheduler_running_statuses as $running_status ) {\n\t\t\t\t$csv_scheduler = ActionScheduler::store()->find_action( 'woo_sc_generate_coupon_csv', array( 'status' => $running_status ) );\n\t\t\t\tif ( $csv_scheduler ) {\n\t\t\t\t\t$csv_scheduler_status = $running_status;\n\t\t\t\t}\n\n\t\t\t\t$import_coupon_scheduler = ActionScheduler::store()->find_action( 'woo_sc_import_coupons_from_csv', array( 'status' => $running_status ) );\n\t\t\t\tif ( $import_coupon_scheduler ) {\n\t\t\t\t\t$import_coupon_scheduler_status = $running_status;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$is_process_running = ! empty( $csv_scheduler_status ) || ! empty( $import_coupon_scheduler_status );\n\n\t\t\treturn $is_process_running;\n\t\t}",
"public function action() {\n $this->getSettings();\n if (!date_default_timezone_set($this->timezone)) {\n // invalid timezone\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__,\n sprintf(\"The timezone '%s' is invalid, please check the settings for kitCronjob!\", $this->timezone)));\n // set Europe/Berlin as timezone and continue the job.\n date_default_timezone_set('Europe/Berlin');\n }\n if (!$this->cronjob_active) {\n // the cronjob is not active, so terminate immediate!\n $this->log[self::LOG_STATUS] = self::STATUS_INACTIVE;\n $this->log[self::LOG_MESSAGE] = 'The cronjob is inactive and does not execute any job.';\n $this->writeLog();\n exit('OK');\n }\n if (!$this->checkCronjobKey()) {\n // the cronjob KEY is not set or invalid\n $this->log[self::LOG_STATUS] = self::STATUS_ERROR;\n $this->log[self::LOG_MESSAGE] = 'The cronjob.php was called without the parameter KEY or with a wrong passphrase for the KEY.';\n $this->writeLog();\n exit($this->getError());\n }\n // check the scheduled jobs\n $this->checkScheduledJobs();\n\n if (!$this->cronjob_executed) {\n // nothing to do - still quit\n $this->log[self::LOG_STATUS] = self::STATUS_OK;\n $this->log[self::LOG_MESSAGE] = 'Nothing to do.';\n $this->log[self::CRONJOB_ID] = -1;\n $this->log[self::CRONJOB_NAME] = '';\n $this->writeLog();\n }\n exit('OK');\n }",
"function questionnaire_cron () {\n global $CFG;\n require_once($CFG->dirroot . '/mod/questionnaire/locallib.php');\n\n return questionnaire_cleanup();\n}",
"function goodrds_schedule_cron() {\n\t if ( !wp_next_scheduled( 'goodrds_cronjob' ) )\n\t wp_schedule_event(time(), 'daily', 'goodrds_cronjob');\n\t}",
"protected function _canRun()\r\n\t{\r\n\t\t$start\t= strtotime($this->_scheduleStart);\r\n\t\t$stop\t= strtotime($this->_scheduleStop);\r\n\t\t$now\t= time();\r\n\t\t\r\n\t\tif($now > $start && $now < $stop) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"function getCRON($cron_job) {\n\t$result_arr = array();\n\n\t// List all CRON?\n\tif(!$cron_job) {\n\t\t$available_files = scandir('./');\n\n\t\tforeach($available_files as $current_file) {\n\t\t\tif(preg_match('/^cron\\.(.+)\\.php$/', $current_file, $current_matches))\n\t\t\t\tarray_push($result_arr, $current_matches[1]);\n\t\t}\n\t} else {\n\t\tarray_push($result_arr, $cron_job);\n\t}\n\n\treturn $result_arr;\n}",
"public function is_recurring(){\n\t\treturn ! empty( $this->payment['recurring_period'] );\n\t}",
"public function testRunCronNoCrons()\n {\n // init and mock\n $MockCron = $this->getMockBuilder('\\Cron\\Cron')\n ->setMethods([ 'getCronsToRun', 'runCron', 'displayMsg' ])\n ->getMock();\n $MockCron->expects($this->once())\n ->method('getCronsToRun')\n ->willReturn(new \\Collection());\n $MockCron->expects($this->exactly(0))\n ->method('runCron')\n ->willReturn(null);\n $MockCron->expects($this->once())\n ->method('displayMsg')\n ->will($this->returnCallback(function ($msg) {\n $this->assertEquals('No crons to run', $msg);\n }));\n\n // the test\n $MockCron->run();\n }",
"public function isAutomation(): bool\n {\n return Helper::isPro() && $this->source_type === AutomationSchedule::class;\n }",
"public function schedule(?int $timestamp = null): bool\n {\n return wp_schedule_single_event($timestamp ?: \\time(), self::CRON_JOB_HOOK);\n }",
"function _get_cron_array()\n {\n }",
"public function cron() {\n include('programming_cron.php');\n }",
"function install_cron(){\n wp_schedule_event(\n time(),\n 'cuentadigital_interval',\n 'cuentadigital_cron_hook'\n );\n }",
"public function hasExpiration() {\n\t\treturn $this->expiration !== null;\n\t}",
"public function getNextCronExecution() {}",
"private function check()\n {\n foreach ($this->scheduler->getQueuedJobs() as $job) {\n if ($job->isDue(new DateTime()) === true) {\n\n $this->executeIfNotOverlapped($job);\n }\n }\n }",
"public function isMinute() : bool {\n $minuteArr = $this->taskDetails['minutes'];\n $retVal = true;\n\n if ($minuteArr['every-minute'] !== true) {\n $retVal = false;\n $current = TasksManager::getMinute();\n $ranges = $minuteArr['at-range'];\n\n foreach ($ranges as $range) {\n if ($current >= $range[0] && $current <= $range[1]) {\n $retVal = true;\n break;\n }\n }\n\n if ($retVal === false) {\n $retVal = $this->isMinuteHelper($minuteArr, $current);\n }\n }\n\n return $retVal;\n }"
] | [
"0.7627952",
"0.71951854",
"0.69973326",
"0.697178",
"0.689996",
"0.68244946",
"0.6809378",
"0.6763793",
"0.664453",
"0.65923613",
"0.6525312",
"0.6439563",
"0.63350785",
"0.6311451",
"0.6262836",
"0.6123856",
"0.61046135",
"0.6095",
"0.6093918",
"0.6022005",
"0.594719",
"0.5917692",
"0.5910354",
"0.5898903",
"0.58803296",
"0.5867305",
"0.5847583",
"0.58337224",
"0.5818958",
"0.5814669",
"0.58009684",
"0.57920635",
"0.5773185",
"0.57586443",
"0.5744726",
"0.56841",
"0.5673409",
"0.5667778",
"0.5638228",
"0.55959326",
"0.5585007",
"0.5576629",
"0.5566728",
"0.556014",
"0.55390173",
"0.5536975",
"0.55314416",
"0.5524613",
"0.5513785",
"0.5501205",
"0.54925674",
"0.5492368",
"0.5481905",
"0.54817057",
"0.5480142",
"0.54748654",
"0.5454844",
"0.5453452",
"0.54327244",
"0.5405381",
"0.5404365",
"0.54024166",
"0.54012996",
"0.5400558",
"0.5391243",
"0.53909487",
"0.53874767",
"0.53831995",
"0.5362716",
"0.5359009",
"0.53511566",
"0.5306149",
"0.5304238",
"0.52910036",
"0.5268018",
"0.52670693",
"0.5261447",
"0.5250857",
"0.524743",
"0.52432585",
"0.5218092",
"0.52087355",
"0.51751566",
"0.5157063",
"0.5128531",
"0.5125127",
"0.512143",
"0.5105529",
"0.5093964",
"0.509251",
"0.50730836",
"0.5067651",
"0.505751",
"0.505528",
"0.50524354",
"0.50490916",
"0.5037812",
"0.50251776",
"0.502271",
"0.5018358"
] | 0.84565985 | 0 |
Declare UI map for this page here. CSS or XPath allowed. public static $usernameField = 'username'; public static $formSubmitButton = "mainForm input[type=submit]"; Basic route example for your current URL You can append any additional parameter to URL and use it in tests like: EditPage::route('/123post'); | public static function route($param)
{
return static::$URL.$param;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function page_init () {\n foreach ($this->accounts as $key => $account) {\n register_setting('option_group', $account. '_account');\n }\n\n // Add section for the page.\n add_settings_section(\n 'social_accounts', // Id section.\n 'Social account settings', // Title page.\n [$this, 'create_page_info'], // Callback.\n 'settings_social_accounts' // Name of the option page SLUG.\n );\n\n foreach ($this->accounts as $key => $account) {\n $label = ucfirst($account) .' account';\n $function = 'create_'. $account .'_input';\n $account .= '_account';\n \n $this->$function = function ($account) {\n ?>\n <input type=\"text\"\n id=\"<?= $account ?>\"\n name=\"<?= $account ?>\"\n value=\"<?= $this->options[$account] ?>\"\n />\n <?php\n };\n add_settings_field(\n $account,\n $label,\n [$this, $function],\n 'settings_social_accounts',\n 'social_accounts',\n $account\n );\n }\n }",
"static function iniPage($username, $menu ){\r\n\t\t\t?>\r\n\t\t\t\r\n\t\t\t<div class=\"header navbar navbar-inverse navbar-fixed-top\">\r\n\t\t\t\t<!-- BEGIN TOP NAVIGATION BAR -->\r\n\t\t\t\t<div class=\"navbar-inner\">\r\n\t\t\t\t\t<div class=\"container-fluid\">\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t<?php echo GuiHeaderHelper::logo(); ?>\r\n\t\t\t\t\t\t<?php echo GuiHeaderHelper::menuToggler(); ?>\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t<!-- BEGIN TOP NAVIGATION MENU -->\t\t\t\t\t\r\n\t\t\t\t\t\t<?php echo GuiHeaderHelper::topNavegationMenu(); ?>\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t<!-- BEGIN NOTIFICATION DROPDOWN -->\t\r\n\t\t\t\t\t\t\t<?php //echo GuiNotificationBarHelper::show(); ?>\r\n\t\t\t\t\t\t\t<!-- END NOTIFICATION DROPDOWN -->\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t<!-- BEGIN INBOX DROPDOWN -->\r\n\t\t\t\t\t\t\t<?php //echo GuiInboxBarHelper::show(); ?>\r\n\t\t\t\t\t\t\t<!-- END INBOX DROPDOWN -->\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t<!-- BEGIN TODO DROPDOWN -->\r\n\t\t\t\t\t\t\t<?php //echo GuiTaskBarHelper::show(); ?>\r\n\t\t\t\t\t\t\t<!-- END TODO DROPDOWN -->\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t<!-- Display user dropdown -->\r\n\t\t\t\t\t\t\t<?php \r\n\t\t\t\t\t\t\t\techo GuiUserDropdownHelper::show($username); \r\n\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\t\t\t\t<?php echo GuiHeaderHelper::endTopNavegationMenu(); ?>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<!-- END TOP NAVIGATION BAR -->\r\n\t\t\t</div>\r\n\t\t\t<!-- END HEADER -->\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t<!-- BEGIN CONTAINER -->\r\n\t\t\t<div class=\"page-container row-fluid\">\r\n\t\t\t\t<!-- BEGIN SIDEBAR -->\r\n\t\t\t\t<?php GuiLeftHelper::initLeftPanel(); ?>\r\n\t\t\t\t\t<?php GuiLeftHelper::showSearchForm(); ?>\t\r\n\t\t\t\t\t<?php echo $menu; ?>\t\r\n\t\t\t\t<?php GuiLeftHelper::endLeftPanel(); ?>\r\n\t\t\t\t\r\n\t\t\t\t<!-- END SIDEBAR -->\r\n\t\t<?php\r\n\t}",
"public function config()\n\t{\n\t\tparent::config();\n\n\t\t// change inpu\n\t\tif(self::done_step('username'))\n\t\t{\n\t\t\t// if user go to this page from username page\n\t\t\t$this->data->mobile_username = 'eusername';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// if user go to this page from mobile page\n\t\t\t$this->data->mobile_username = 'emobile';\n\t\t}\n\n\t\t// load temp username in username field\n\t\tif(self::get_session('username', 'temp_username'))\n\t\t{\n\t\t\t$this->data->get_username = self::get_session('username', 'temp_username');\n\t\t}\n\n\t\t$this->data->page['title'] = T_('Password');\n\t\t$this->data->page['desc'] = T_('Please enter password to enter');\n\n\t\tswitch (\\lib\\router::get_url(1))\n\t\t{\n\t\t\tcase 'recovery':\n\t\t\t\t$this->data->page['title'] = T_('Recovery Password');\n\t\t\t\t$this->data->page['desc'] = T_('If forget your password, Please enter new password. after pass verification your new password is usable.');\n\t\t\t\tbreak;\n\n\t\t\tcase 'signup':\n\t\t\tcase 'set':\n\t\t\t\t$this->data->page['title'] = T_('Set Password');\n\t\t\t\t$this->data->page['desc'] = T_('Please set your password to secure signup.'). ' '. T_('Next time we only need your mobile and this password to enter');\n\t\t\t\tbreak;\n\n\t\t\tcase 'change':\n\t\t\t\t$this->data->page['title'] = T_('Change to new Password');\n\t\t\t\t$this->data->page['desc'] = T_('Please set your old and new password to change it');\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t}",
"public function init()\n {\n $this->setAction(BASE_URL.'admin/index/login')\n ->setMethod('post');\n \n // create text input with label\n $UserName = new Zend_Form_Element_Text('user_name');\n $UserName->setLabel('Username:')\n ->setOptions(array('size' => '255'))\n ->setRequired(true)\n ->addValidator('NotEmpty', true)\n ->addFilter('StringTrim');\n $UserName->addErrorMessage('Please enter username');\n \n //create password input with label\n $password = new Zend_Form_Element_Password('password');\n $password->setLabel('Password:')\n ->setOptions(array('size' => '255'))\n ->setRequired(true)\n ->addValidator('NotEmpty', true)\n ->addFilter('StringTrim');\n $password->addErrorMessage('Please enter username');\n \n $submit=new Zend_Form_Element_Submit('submit',array('value'=>'Log In','class'=>'btn btn-info btn-small'));\n \n $this->addElement($UserName);\n $this->addElement($password);\n $this->addElement($submit);\n }",
"function FormAsseretion(){\r\n $creat = new UIMAP_createFormPage();\r\n \r\n $this->assertElementPresent($creat->formName());\r\n $this->assertElementPresent($creat->formLanguige());\r\n for($i = 1; $i < 4; $i++){\r\n $this->assertElementPresent($creat->formRespuniqtype($i));\r\n }\r\n $this->assertElementPresent($creat->submitButton());\r\n }",
"public function init()\n {\n // form should use p4cms-ui styles.\n $this->setAttrib('class', 'p4cms-ui login-form p4cms-user-login');\n \n // form should submit on enter\n $this->setAttrib('submitOnEnter', true);\n\n // set the method for the form to POST\n $this->setMethod('post');\n\n // add a field to collect the user name.\n $this->addElement(\n 'text',\n 'user',\n array(\n 'label' => 'User',\n 'required' => true,\n 'description' => \"Enter your email address or username.\",\n 'filters' => array('StringTrim'),\n 'size' => 20\n )\n );\n\n // add a field to collect the user's password\n $this->addElement(\n 'password',\n 'password',\n array(\n 'label' => 'Password',\n 'required' => false,\n 'size' => 20\n )\n );\n\n // add the submit button\n $this->addElement(\n 'SubmitButton',\n 'login',\n array(\n 'label' => 'Login',\n 'required' => false,\n 'ignore' => true,\n 'class' => 'preferred'\n )\n );\n $buttons = array('login');\n\n // add an 'add user' button, if we have appropriate permissions\n $user = P4Cms_User::fetchActive();\n if ($user->isAllowed('users', 'add', $this->getAcl()) && P4_User::isAutoUserCreationEnabled()) {\n $this->addElement(\n 'Button',\n 'addNewUser',\n array(\n 'label' => 'New User',\n 'class' => 'add-button',\n 'ignore' => true,\n 'onclick' => 'window.location = p4cms.url({module: \"user\", controller: \"index\", action: \"add\"});',\n )\n );\n $buttons[] = 'addNewUser';\n }\n\n // put the button in a fieldset.\n $this->addDisplayGroup(\n $buttons,\n 'buttons',\n array('class' => 'buttons')\n );\n }",
"public function login() {\n\t\t$this->helpers[] = 'Form';\n\t}",
"public function run()\n {\n\n \t$login_page = new Content();\n \t$login_page->page = \"Login Page\";\n $login_page->value = '<h3 style=\"box-sizing: border-box; font-family: Helvetica Neue, Helvetica, Arial, sans-serif; font-weight: 500; line-height: 1.1; color: #8c0001; margin-top: 20px; margin-bottom: 10px; font-size: 14pt;\"><span style=\"font-family: verdana, geneva, sans-serif;\"><strong style=\"box-sizing: border-box;\">Vision</strong></span></h3>\n <p style=\"box-sizing: border-box; margin: 0px 0px 10px; color: #333333; font-family: Times New Roman; font-size: 14.6667px;\"><span style=\"font-family: verdana, geneva, sans-serif;\">An internationally accredited university dedicated to innovation and excellence in the service of God and country.</span></p>\n <h3 style=\"box-sizing: border-box; font-family: Helvetica Neue, Helvetica, Arial, sans-serif; font-weight: 500; line-height: 1.1; color: #8c0001; margin-top: 20px; margin-bottom: 10px; font-size: 14pt;\"><span style=\"font-family: verdana, geneva, sans-serif;\"><strong style=\"box-sizing: border-box;\">Mission</strong></span></h3>\n <p style=\"box-sizing: border-box; margin: 0px 0px 10px; color: #333333; font-family: Times New Roman; font-size: 14.6667px;\"><span style=\"font-family: verdana, geneva, sans-serif;\">The Lyceum of the Philippines University - Cavite, espousing the ideals of Jose P. Laurel, is committed to the following mission:</span></p>\n <ol style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 10px; color: #333333; font-family: Times New Roman; font-size: 14.6667px;\">\n <li style=\"box-sizing: border-box;\"><span style=\"font-family: verdana, geneva, sans-serif;\">Advance and preserve knowledge by undertaking research and disseminating and utilizing the results. - <strong style=\"box-sizing: border-box;\">RESEARCH</strong></span></li>\n <li style=\"box-sizing: border-box;\"><span style=\"font-family: verdana, geneva, sans-serif;\">Provide equitable access to learning through relevant, innovative, industry-based and environment-conscious programs and services in the context of nationalism and internationalism. - <strong style=\"box-sizing: border-box;\">INSTRUCTION</strong> and <strong style=\"box-sizing: border-box;\">QUALITY SERVICES</strong></span></li>\n <li style=\"box-sizing: border-box;\"><span style=\"font-family: verdana, geneva, sans-serif;\">Provide necessary knowledge and skills to meet entrepreneurial development and the managerial requirements of the industry. - <strong style=\"box-sizing: border-box;\">INSTRUCTION</strong></span></li>\n <li style=\"box-sizing: border-box;\"><span style=\"font-family: verdana, geneva, sans-serif;\">Establish local and international linkages that will be the source of learning and growth of the members of academic community. - <strong style=\"box-sizing: border-box;\">INSTRUCTION</strong> and <strong style=\"box-sizing: border-box;\">INSTITUTIONAL</strong><strong style=\"box-sizing: border-box;\">DEVELOPMENT</strong></span></li>\n <li style=\"box-sizing: border-box;\"><span style=\"font-family: verdana, geneva, sans-serif;\">Support a sustainable community extension program and be a catalyst for social transformation and custodian of Filipino culture and heritage. - <strong style=\"box-sizing: border-box;\">COMMUNITY EXTENSION</strong></span></li>\n <li style=\"box-sizing: border-box;\"><span style=\"font-family: verdana, geneva, sans-serif;\">Build a community of God-centered, nationalistic, environment conscious, and globally competitive professionals with wholesome values and attitudes. - <strong style=\"box-sizing: border-box;\">PROFESSIONALISM</strong> and <strong style=\"box-sizing: border-box;\">VALUES</strong></span></li>\n </ol>';\n $login_page->save();\n\n\n\n\n $home_page = new Content();\n $home_page->page = \"Home\";\n $home_page->value = \"Welcome to Student Affairs Office Home Page!\";\n $home_page->save();\n\n\n\n\n $error_401 = new Content();\n $error_401->page = \"401\"; \n $error_401->value = '<div class=\"middle-box text-center animated fadeInDown\">\n <h1 style=\"box-sizing: border-box; margin: 20px 0px 10px; font-size: 170px; font-family: open sans, Helvetica Neue, Helvetica, Arial, sans-serif; font-weight: 100; line-height: 1.1; color: #676a6c; text-align: center; background-color: #f3f3f4;\">401</h1>\n <h3 class=\"font-bold\" style=\"box-sizing: border-box; font-family: open sans, Helvetica Neue, Helvetica, Arial, sans-serif; line-height: 1.1; color: #676a6c; margin-top: 5px; margin-bottom: 10px; font-size: 16px; text-align: center; background-color: #f3f3f4;\">401 - Unauthorized: Access Denied!</h3>\n <div class=\"error-desc\" style=\"box-sizing: border-box; color: #676a6c; font-family: open sans, Helvetica Neue, Helvetica, Arial, sans-serif; font-size: 13px; font-weight: normal; text-align: center; background-color: #f3f3f4;\">You do not have permission to view this directory or page!</div>\n </div>';\n\n $error_401->save();\n\n\n $error_404 = new Content();\n $error_404->page = \"404\"; \n $error_404->value = '<div class=\"middle-box text-center animated fadeInDown\">\n <h1 style=\"box-sizing: border-box; margin: 20px 0px 10px; font-size: 170px; font-family: open sans, Helvetica Neue, Helvetica, Arial, sans-serif; font-weight: 100; line-height: 1.1; color: #676a6c; text-align: center; background-color: #f3f3f4;\">404</h1>\n <h3 class=\"font-bold\" style=\"box-sizing: border-box; font-family: open sans, Helvetica Neue, Helvetica, Arial, sans-serif; line-height: 1.1; color: #676a6c; margin-top: 5px; margin-bottom: 10px; font-size: 16px; text-align: center; background-color: #f3f3f4;\">Page Not Found</h3>\n <div class=\"error-desc\" style=\"box-sizing: border-box; color: #676a6c; font-family: open sans, Helvetica Neue, Helvetica, Arial, sans-serif; font-size: 13px; font-weight: normal; text-align: center; background-color: #f3f3f4;\">Sorry, but the page you are looking for has not been found. Try checking the URL for errors, then hit the refresh button on your browser.</div>\n</div>';\n$error_404->save();\n}",
"public function init()\n {\n parent::init();\n\n //customize the form\n $this->getElement('passwd')->setRequired(false);\n $this->getElement('passwdVerify')->setRequired(false);\n $this->getElement('submit')->setLabel('Save User');\n }",
"public function getFormLoginPage();",
"public function formLogin() {\n $this->view->addForm();\n }",
"public function settingsPage() {\n require_once 'form.phtml';\n }",
"protected function setupPage() {}",
"function renderLoginForm() {\n\t\t$tpl = DevblocksPlatform::getTemplateService();\n\t\t$tpl->cache_lifetime = \"0\";\n\t\t\n\t\t// add translations for calls from classes that aren't Page Extensions (mobile plugin, specifically)\n\t\t$translate = DevblocksPlatform::getTranslationService();\n\t\t$tpl->assign('translate', $translate);\n\t\t\n\t\t@$redir_path = explode('/',urldecode(DevblocksPlatform::importGPC($_REQUEST[\"url\"],\"string\",\"\")));\n\t\t$tpl->assign('original_path', (count($redir_path)==0) ? 'login' : implode(',',$redir_path));\n\t\t\n\t\t$tpl->display('file:' . dirname(dirname(__FILE__)) . '/templates/login/login_form_default.tpl');\n\t}",
"public function postSetupForm() {\r\n\r\n $l = $this->bootstrap->getLocalization();\r\n // ugyanaz submitnak mint title-nek\r\n $this->form->submit =\r\n $this->controller->toSmarty['title'] = $l('users', 'login_title');\r\n if ( $this->application->getParameter('nolayout') )\r\n $this->controller->toSmarty['nolayout'] = true;\r\n\r\n $this->controller->toSmarty['formclass'] = 'halfbox centerformwrap';\r\n $this->controller->toSmarty['titleclass'] = 'center';\r\n parent::postSetupForm();\r\n\r\n }",
"public function __construct()\n {\n // Page Data\n $this->title = 'Dashboard';\n $this->url = 'dashboard';\n }",
"function th_login_form_defaults( $defaults ) {\n $defaults['label_username'] = 'Email Address';\n return $defaults;\n}",
"public function logInPage() {\n $view = new View('login');\n $view->generate();\n }",
"function Page($request){\n\t\t$this->request = $request;\n\t\t$this->usr = new User();\n\t}",
"public function initMasterLoginForm()\n\t{\n\t\tglobal $lng, $ilCtrl;\n\n\t\tinclude_once(\"Services/Form/classes/class.ilPropertyFormGUI.php\");\n\t\t$this->form = new ilPropertyFormGUI();\n\t\t$this->form->setId(\"master_login\");\t\t\n\t\t// password\n\t\t$pi = new ilPasswordInputGUI($lng->txt(\"password\"), \"mpassword\");\n\t\t$pi->setSize(20);\n\t\t$pi->setRetype(false);\n\t\t$pi->setSkipSyntaxCheck(true);\n\t\t$this->form->addItem($pi);\n\n\t\t$this->form->addCommandButton(\"performMLogin\", $lng->txt(\"login\"));\n\n\t\t$this->form->setTitle($lng->txt(\"admin_login\"));\n\t\t$this->form->setFormAction(\"setup.php?cmd=gateway\");\n\n\t}",
"public function __construct() {\n $this->setTitle(\"Felis Investigations\");\n $this->addLink(\"login.php\", \"Log in\");\n }",
"public function signupForm()\n {\n \t# code...\n \treturn view(\"external-pages.sign-up\");\n }",
"function editusername()\n {\n // Auth::handleLogin() makes sure that only logged in users can use this action/method and see that page\n Auth::handleLogin();\n $this->view->render('login/editusername');\n }",
"public function __construct()\n {\n $this->view = 'mails.signup.register';\n $this->text = 'mails.signup.register_text';\n }",
"public function page_init()\n {\n register_setting(\n 'my_option_group', // Option group\n 'linkedin_api_option', // Option name\n array( $this, 'sanitize' ) // Sanitize\n );\n\n add_settings_section(\n 'setting_section_id', // ID\n 'Request Settings', // Title\n array(), // Callback\n 'my-setting-admin' // Page\n );\n\n add_settings_field(\n 'redirect_url', // ID\n 'Redirect URL', // Title\n array( $this, 'redirect_url_callback' ), // Callback\n 'my-setting-admin', // Page\n 'setting_section_id' // Section\n );\n\n add_settings_field(\n 'client_id',\n 'Client ID',\n array( $this, 'client_id_callback' ),\n 'my-setting-admin',\n 'setting_section_id'\n );\n\n add_settings_field(\n 'client_secret',\n 'Client Secret',\n array( $this, 'client_secret_callback' ),\n 'my-setting-admin',\n 'setting_section_id'\n );\n\n add_settings_field(\n 'authorization_code',\n 'Authorization Code For An Access Token',\n array( $this, 'authorization_code_callback' ),\n 'my-setting-admin',\n 'setting_section_id'\n );\n\n add_settings_field(\n 'access_token',\n 'Access Token',\n array( $this, 'access_token_callback' ),\n 'my-setting-admin',\n 'setting_section_id'\n );\n\n }",
"public function RegisterLayout(){\n return '\n\t\t\t<form method=\"post\"> \n\t\t\t\t<fieldset>\n\t\t\t\t\t<legend>Register - enter the fields below</legend>\n\t\t\t\t\t<p id=\"' . self::$messageID . '\">' . $this -> message . '</p>\n\t\t\t\t\t\n\t\t\t\t\t<label for=\"' . self::$UserNameID . '\">Username(max 25 characters, white spaces not allowed):</label>\n\t\t\t\t\t<input type=\"text\" id=\"' . self::$UserNameID . '\" name=\"' . self::$UserNameID . '\" value=\"' . $this -> saveUserName . '\" maxlength=\"25\"/><br/>\n\t\t\t\t\t\n\t\t\t\t\t<label for=\"' . self::$DisplayNameID . '\">Display name, this is the name shown to other users(max 25 characters, white spaces allowed):</label>\n\t\t\t\t\t<input type=\"text\" id=\"' . self::$DisplayNameID . '\" name=\"' . self::$DisplayNameID . '\" value=\"' . $this -> saveDisplayName . '\" maxlength=\"25\"/><br/>\n\t\t\t\t\t\n\t\t\t\t\t<label for=\"' . self::$EmailID . '\">Email: </label>\n\t\t\t\t\t<input type=\"text\" id=\"' . self::$EmailID . '\" name=\"' . self::$EmailID . '\" value=\"' . $this -> saveEmail . '\" maxlength=\"254\"/><br/>\n\t\t\t\t\t\n\t\t\t\t\t<label for=\"' . self::$PasswordID . '\">Password(white spaces not allowed) :</label>\n\t\t\t\t\t<input type=\"password\" id=\"' . self::$PasswordID . '\" name=\"' . self::$PasswordID . '\" /><br/>\n\t\t\t\t\t\n\t\t\t\t\t<label for=\"' . self::$PasswordCheckID . '\">Re-type Password :</label>\n\t\t\t\t\t<input type=\"password\" id=\"' . self::$PasswordCheckID . '\" name=\"' . self::$PasswordCheckID . '\" /><br/>\n\t\t\t\t\t\n\t\t\t\t\t<input type=\"submit\" name=\"' . self::$RegisterID . '\" value=\"Register\" />\n\t\t\t\t</fieldset>\n\t\t\t</form>\n\t\t';\n }",
"public function main(){\n\t\t\n\t\tif (isset($_REQUEST[\"do\"])){\n\t\t\t$do = $_REQUEST[\"do\"];\n\t\t\tif(Seguridad::getId() == null && $do != \"processFormLogin\" && $do != \"insertUser\" && $do != \"processInsertUser\"){\n\t\t\t\t$do = \"formLogin\";\n\t\t\t}\n\t\t} else\n\t\t\t$do = \"formLogin\";\n\t\t$this->$do(); //Ejecuta el metodo con el nombre que contiene la variable en ese momento\n\t}",
"function init()\n {\n $this->defineAttribute('label', true, '', COMPONENT_TYPE_STRING);\n $this->defineAttribute('routeUrl', false, '', COMPONENT_TYPE_STRING);\n $this->defineAttribute('add', false, 'Nuova scheda', COMPONENT_TYPE_STRING);\n $this->defineAttribute('cssClass', false, '', COMPONENT_TYPE_STRING);\n $this->defineAttribute('buttonId', false, '', COMPONENT_TYPE_STRING);\n $this->defineAttribute('noLink', false, false, COMPONENT_TYPE_STRING);\n $this->defineAttribute('iconClass', false, 'fa-plus', COMPONENT_TYPE_STRING);\n\n parent::init();\n }",
"private function username()\n {\n $element = new Text('username');\n $element->setLabel('Username');\n $element->setAttribute('class', 'form-control');\n $element->setAttribute('placeholder', 'Username');\n $element->addValidators(array(\n new PresenceOf(array('message' => 'Username is required'))\n ));\n $this->add($element);\n }",
"public function form(): void {\n include \"admin\" . DS . \"form.php\";\n }",
"public function logInRegisterPage();",
"private function logIn()\n {\n $element = new Submit('login');\n $element->setAttribute('class', 'btn btn-info btn-lg btn-block text-uppercase waves-effect waves-light');\n $element->setUserOption('mainClass', 'form-group text-center m-t-20');\n $this->add($element);\n }",
"private function formLogin(){\n\t\tView::show(\"user/login\");\n\t}",
"protected function renderLogin(){\n return '<form class=\"forms\" action=\"'.Router::urlFor('check_login').'\" method=\"post\">\n <input class=\"forms-text\" type=\"text\" name=\"username\" placeholder=\"Pseudo\">\n <input class=\"forms-text\" type=\"password\" name=\"password\" placeholder=\"Mot de passe\">\n <button class=\"forms-button\" name=\"login_button\" type=\"submit\">Se connecter</button>\n </form>';\n }",
"protected function setLoginBar()\n {\n $this->loginBar = new FormBuilder(\"login\", \"login\", \"post\");\n $loginTitle = new Comment(\"Member Login:\");\n $loginTitle->setBold();\n $loginTitle->setUnderlined();\n $this->loginBar->add($loginTitle);\n\n $this->loginBar->buildComment(\"username: \", false)\n ->buildTextField(\"username\")\n ->buildComment(\"password: \", false)\n ->buildPasswordField(\"password\", \"password\", \"\", true)\n ->buildButton(\"Log In\", \"submit\", \"submit\")\n ->buildComment(\"Don't have an account?\");\n \n $register = new Link(\"register\");\n $register->setText(\"Register New Account\");\n $register->setLineBreak(true);\n $forgot = new Link(\"forgotpass\");\n $forgot->setText(\"Forgot Password?\");\n \n $this->loginBar->add($register);\n $this->loginBar->add($forgot);\n $this->setDivision($this->loginBar);\n }",
"protected function renderSignUp(){\n return '<form class=\"forms\" action=\"'.Router::urlFor('check_signup').'\" method=\"post\">\n <input class=\"forms-text\" type=\"text\" name=\"fullname\" placeholder=\"Nom complet\">\n <input class=\"forms-text\" type=\"text\" name=\"username\" placeholder=\"Pseudo\">\n <input class=\"forms-text\" type=\"password\" name=\"password\" placeholder=\"Mot de passe\">\n <input class=\"forms-text\" type=\"password\" name=\"password_verify\" placeholder=\"Retape mot de passe\">\n <button class=\"forms-button\" name=\"login_button\" type=\"submit\">Créer son compte</button>\n </form>';\n }",
"public function page_init()\n { \n register_setting(\n 'firebird_grupo',\n 'firebird_name',\n array( $this, 'sanitize' )\n );\n\n add_settings_section(\n 'setting_section_id',\n 'Configurações',\n array( $this, 'print_section_info' ),\n 'integracao-firebird-admin'\n ); \n\n add_settings_field(\n 'chave_token_api',\n 'Chave a ser utilizada no acesso a API de Importação',\n array( $this, 'chave_token_api_callback' ),\n 'integracao-firebird-admin',\n 'setting_section_id'\n );\n }",
"public function form()\n {\n $this->switch('footer_remove', Support::trans('main.footer_remove'))\n ->default(admin_setting('footer_remove'));\n $defaultColors = [\n 'default' => '墨蓝',\n 'blue' => '蓝',\n 'blue-light' => '亮蓝',\n 'green' => '墨绿',\n ];\n foreach (explode(\",\", ServiceProvider::setting('additional_theme_colors')) as $value) {\n if (!empty($value)) {\n [$k, $v] = explode(\":\", $value);\n $defaultColors[$k] = $v;\n }\n }\n\n $this->radio('theme_color', Support::trans('main.theme_color'))\n ->options($defaultColors)\n ->default(admin_setting('theme_color'));\n $this->radio('sidebar_style', Support::trans('main.sidebar_style'))\n ->options([\n 'default' => '默认',\n 'sidebar-separate' => '菜单分离',\n 'horizontal_menu' => '水平菜单'\n ])\n ->default(admin_setting('sidebar_style'));\n $this->switch('grid_row_actions_right', Support::trans('main.grid_row_actions_right'))\n ->help('启用后表格行操作按钮将永远贴着最右侧。')\n ->default(admin_setting('grid_row_actions_right'));\n }",
"function html_login_form()\n\t{\n\t\t$action = HAS_ADMIN ? ROOT_URL.'admin' : '';\n\t\tif(!isset($this->user)) return '\n\t\t<form id=\"login-form\" method=\"post\" action=\"' . $action . '\" >\n\t\t\t<input type=\"text\" name=\"login\" class=\"field field-login\" />\n\t\t\t<input type=\"password\" name=\"password\" class=\"field field-password\" />\n\t\t\t<input type=\"submit\" class=\"btn\" value=\"login\" />\n\t\t</form>';\n\n\t\treturn basename($this->user) . ' (' . dirname($this->user) . ')\n\t\t<form id=\"logout-form\" method=\"post\" action=\"\" >\n\t\t\t<input type=\"hidden\" name=\"logout\" />\n\t\t\t<input type=\"submit\" class=\"btn\" value=\"logout\" />\n\t\t</form>';\n\t}",
"function __handler()\n {\n $this->view('index')->title('Main page');\n }",
"function profileForm(){\r\n\t\t$this->view('profileForm');\r\n\t}",
"public function init()\n {\n $this->setAttribute('method', 'post');\n $this->add(array(\n 'name' => 'email',\n 'type' => 'Text',\n 'attributes' => array(\n 'size' => 30,\n 'data-rule-maxlength' => 50,\n 'maxsize' => 50,\n 'data-rule-required' => true,\n 'data-rule-email' => true,\n ),\n ));\n $this->add(array(\n 'name' => 'submit',\n 'type' => 'Submit',\n 'attributes' => array(\n 'value' => $this->getTranslator()->translate('Send new password'),\n 'id' => 'submitbutton',\n 'class' => 'button_send',\n ),\n ));\n }",
"private function initUserRoutes(): void\n {\n if ($this->getSessionInstance()->isRegistered()) {\n\n $user = $this->getSessionInstance()->getUser();\n\n /**\n * @see templates/Controllers/coreui/generic.nav.macro.lib.twig::macro top_right\n */\n $this->routes[self::RESTRICTED_NAV][\"user_account\"][\"avatar\"] = $user->getAvatar();\n }\n\n $this->routes[self::ANY_NAV][\"crump_bar\"] = [\n [\n \"options\" => [\n \"text\" => sprintf(\"%s\", ServerHelper::getVersion()),\n \"title\" => \"OS\",\n \"href\" => \"javascript:void(0)\",\n \"icon\" => \"cil-3d\"\n ]\n ],\n [\n \"options\" => [\n \"text\" => sprintf(\"PHP %s\", phpversion()),\n \"href\" => \"javascript:void(0)\",\n \"icon\" => \"cil-code\"\n ]\n ],\n [\n \"options\" => [\n \"text\" => date(\"d.m.Y\"),\n \"href\" => \"javascript:void(0)\",\n \"icon\" => \"cil-calendar\"\n ]\n ]\n ];\n }",
"public function initPage() {}",
"public function initPage() {}",
"public function page_init() {\n register_setting( 'bii_instagram', 'bii_instagram' );\n\n add_settings_section(\n 'bii_instagram_oauth',\n __( 'Authentication', 'bii-instagram' ),\n array( &$this, 'print_oauth_section_info' ),\n 'bii-instagram'\n );\n add_settings_field(\n 'bii_instagram_client_id',\n __( 'Client ID', 'bii-instagram' ),\n array( &$this, 'create_textfield' ),\n 'bii-instagram',\n 'bii_instagram_oauth',\n array( 'code' => true, 'name' => 'client_id' )\n );\n add_settings_field(\n 'bii_instagram_client_secret',\n __( 'Client Secret', 'bii-instagram' ),\n array( &$this, 'create_textfield' ),\n 'bii-instagram',\n 'bii_instagram_oauth',\n array( 'code' => true, 'name' => 'client_secret', 'type' => 'password' )\n );\n }",
"protected function AssignPageTypeFields() {\n $this->AddField('showmap', self::DT_BOOLEAN, true);\n $this->AddField('mapaddress', self::DT_STRING);\n }",
"function form_init_data()\r\n {\r\n $this->set_element_value(\"Swimmers\", FT_CREATE) ;\r\n $this->set_element_value(\"Swim Meets\", FT_CREATE) ;\r\n $this->set_element_value(\"Swim Teams\", FT_CREATE) ;\r\n }",
"function main_screen()\n\t{\n\t\t//-----------------------------------------\n\t\t// INIT\n\t\t//-----------------------------------------\n\n\t\t$g_array = array();\n\t\t$content = \"\";\n\t\t$form = array();\n\n\t\t//-----------------------------------------\n\t\t// Page details\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->admin->page_title = \"Группы пользователей\";\n\t\t$this->ipsclass->admin->page_detail = \"Разделение на группы является очень полезной и мощной функцией для организации пользователей на форуме. Нужно помнить, что есть 4 группы, которые Вы не сможете удалить, это: (Неактивированные, Гости, Пользователи и Администраторы), однако Вы можете их редактировать. Рекомендуем Вам создать группу «Модераторы» и наделить их соответствующими правам на форуме (в разделах), которых нет у простых пользователей.<br /> В параметрах доступа Вы можете произвести быстрые настройки доступов к созданию тем, ответам и чтению форумов. Параметры доступа можно также отредактировать и через меню «Управление форумами».\";\n\t\t$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Управление группами пользователей' );\n\n\t\t//-----------------------------------------\n\t\t// Get groups\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->DB->cache_add_query( 'groups_main_screen', array() );\n\t\t$this->ipsclass->DB->cache_exec_query();\n\n\t\twhile ( $row = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// Set up basics\n\t\t\t//-----------------------------------------\n\n\t\t\t$row['_can_delete'] = ( $row['g_id'] > 4 ) ? 1 : 0;\n\t\t\t$row['_can_acp'] = ( $row['g_access_cp'] == 1 ) ? 1 : 0;\n\t\t\t$row['_can_supmod'] = ( $row['g_is_supmod'] == 1 ) ? 1 : 0;\n\t\t\t$row['_title'] = $row['prefix'].$row['g_title'].$row['suffix'];\n\n\t\t\tif ( $this->ipsclass->vars['admin_group'] == $row['g_id'] )\n\t\t\t{\n\t\t\t\t$row['_title'] .= \" ( ROOT )\";\n\t\t\t}\n\n\t\t\t//-----------------------------------------\n\t\t\t// IMAGES\n\t\t\t//-----------------------------------------\n\n\t\t\t$row['_can_acp_img'] = $row['_can_acp'] ? 'aff_tick.png' : 'aff_cross.png';\n\t\t\t$row['_can_supmod_img'] = $row['_can_supmod'] ? 'aff_tick.png' : 'aff_cross.png';\n\n\t\t\t//-----------------------------------------\n\t\t\t// Add\n\t\t\t//-----------------------------------------\n\n\t\t\t$content .= $this->html->groups_overview_wrapper_row( $row );\n\n\t\t\t//-----------------------------------------\n\t\t\t// Add to array\n\t\t\t//-----------------------------------------\n\n\t\t\t$g_array[] = array( $row['g_id'], $row['g_title'] );\n\t\t}\n\n\t\t//-----------------------------------------\n\t\t// Add form\n\t\t//-----------------------------------------\n\n\t\t$form['_new_dd'] = $this->ipsclass->adskin->form_dropdown(\"id\", $g_array, 3 );\n\n\t\t$this->ipsclass->html .= $this->html->groups_overview_wrapper( $content, $form );\n\n\t\t$this->ipsclass->admin->output();\n\t}",
"function index()\n {\n\t$data = $this->page_settings('default', NULL, NULL, 'Users', 'users');\n\t$this->templates->backend($data);\n }",
"public static function map() {\n\n\t\t\t$s_input = __( 'Input', 'total' );\n\t\t\t$s_submit = __( 'Submit', 'total' );\n\n\t\t\treturn array(\n\t\t\t\t'name' => __( 'Mailchimp Form', 'total' ),\n\t\t\t\t'description' => __( 'Newsletter subscription form', 'total' ),\n\t\t\t\t'base' => 'vcex_newsletter_form',\n\t\t\t\t'category' => wpex_get_theme_branding(),\n\t\t\t\t'icon' => 'vcex-newsletter vcex-icon fa fa-envelope',\n\t\t\t\t'params' => array(\n\t\t\t\t\t// General\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'admin_label' => true,\n\t\t\t\t\t\t'heading' => __( 'Unique Id', 'total' ),\n\t\t\t\t\t\t'param_name' => 'unique_id',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'admin_label' => true,\n\t\t\t\t\t\t'heading' => __( 'Extra class name', 'total' ),\n\t\t\t\t\t\t'description' => __( 'Style particular content element differently - add a class name and refer to it in custom CSS.', 'total' ),\n\t\t\t\t\t\t'param_name' => 'classes',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'vcex_visibility',\n\t\t\t\t\t\t'heading' => __( 'Visibility', 'total' ),\n\t\t\t\t\t\t'param_name' => 'visibility',\n\t\t\t\t\t),\n\t\t\t\t\tvcex_vc_map_add_css_animation(),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'vcex_ofswitch',\n\t\t\t\t\t\t'std' => 'false',\n\t\t\t\t\t\t'heading' => __( 'Full-Width on Mobile', 'total'),\n\t\t\t\t\t\t'param_name' => 'fullwidth_mobile',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => __( 'Mailchimp Form Action', 'total' ),\n\t\t\t\t\t\t'param_name' => 'mailchimp_form_action',\n\t\t\t\t\t\t'admin_label' => true,\n\t\t\t\t\t\t'value' => '//domain.us1.list-manage.com/subscribe/post?u=numbers_go_here',\n\t\t\t\t\t\t'description' => __( 'Enter the MailChimp form action URL.', 'total' ) .' <a href=\"https://wpexplorer-themes.com/total/docs/mailchimp-form-action-url/\" target=\"_blank\">'. __( 'Learn More', 'total' ) .' →</a>',\n\t\t\t\t\t),\n\n\t\t\t\t\t// Input\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => __( 'Text', 'total' ),\n\t\t\t\t\t\t'param_name' => 'placeholder_text',\n\t\t\t\t\t\t'std' => __( 'Enter your email address', 'total' ),\n\t\t\t\t\t\t'group' => $s_input,\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'colorpicker',\n\t\t\t\t\t\t'heading' => __( 'Background', 'total' ),\n\t\t\t\t\t\t'param_name' => 'input_bg',\n\t\t\t\t\t\t'dependency' => array(\n\t\t\t\t\t\t\t'element' => 'mailchimp_form_action',\n\t\t\t\t\t\t\t'not_empty' => true\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'group' => $s_input,\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'colorpicker',\n\t\t\t\t\t\t'heading' => __( 'Color', 'total' ),\n\t\t\t\t\t\t'param_name' => 'input_color',\n\t\t\t\t\t\t'group' => $s_input,\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => __( 'Width', 'total' ),\n\t\t\t\t\t\t'param_name' => 'input_width',\n\t\t\t\t\t\t'group' => $s_input,\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => __( 'Height', 'total' ),\n\t\t\t\t\t\t'param_name' => 'input_height',\n\t\t\t\t\t\t'group' => $s_input,\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => __( 'Padding', 'total' ),\n\t\t\t\t\t\t'param_name' => 'input_padding',\n\t\t\t\t\t\t'description' => __( 'Please use the following format: top right bottom left.', 'total' ),\n\t\t\t\t\t\t'group' => $s_input,\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => __( 'Border', 'total' ),\n\t\t\t\t\t\t'param_name' => 'input_border',\n\t\t\t\t\t\t'description' => __( 'Please use the shorthand format: width style color. Enter 0px or \"none\" to disable border.', 'total' ),\n\t\t\t\t\t\t'group' => $s_input,\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => __( 'Border Radius', 'total' ),\n\t\t\t\t\t\t'param_name' => 'input_border_radius',\n\t\t\t\t\t\t'group' => $s_input,\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => __( 'Font Size', 'total' ),\n\t\t\t\t\t\t'param_name' => 'input_font_size',\n\t\t\t\t\t\t'group' => $s_input,\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => __( 'Letter Spacing', 'total' ),\n\t\t\t\t\t\t'param_name' => 'input_letter_spacing',\n\t\t\t\t\t\t'group' => $s_input,\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'vcex_font_weight',\n\t\t\t\t\t\t'heading' => __( 'Font Weight', 'total' ),\n\t\t\t\t\t\t'param_name' => 'input_weight',\n\t\t\t\t\t\t'group' => $s_input,\n\t\t\t\t\t),\n\n\t\t\t\t\t// Submit\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => __( 'Text', 'total' ),\n\t\t\t\t\t\t'param_name' => 'submit_text',\n\t\t\t\t\t\t'std' => __( 'Go', 'total' ),\n\t\t\t\t\t\t'group' => $s_submit,\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'colorpicker',\n\t\t\t\t\t\t'heading' => __( 'Background', 'total' ),\n\t\t\t\t\t\t'param_name' => 'submit_bg',\n\t\t\t\t\t\t'group' => $s_submit,\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'colorpicker',\n\t\t\t\t\t\t'heading' => __( 'Background: Hover', 'total' ),\n\t\t\t\t\t\t'param_name' => 'submit_hover_bg',\n\t\t\t\t\t\t'group' => $s_submit,\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'colorpicker',\n\t\t\t\t\t\t'heading' => __( 'Color', 'total' ),\n\t\t\t\t\t\t'param_name' => 'submit_color',\n\t\t\t\t\t\t'group' => $s_submit,\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'colorpicker',\n\t\t\t\t\t\t'heading' => __( 'Color: Hover', 'total' ),\n\t\t\t\t\t\t'param_name' => 'submit_hover_color',\n\t\t\t\t\t\t'group' => $s_submit,\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => __( 'Margin Right', 'total' ),\n\t\t\t\t\t\t'param_name' => 'submit_position_right',\n\t\t\t\t\t\t'group' => $s_submit,\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => __( 'Height', 'total' ),\n\t\t\t\t\t\t'param_name' => 'submit_height',\n\t\t\t\t\t\t'group' => $s_submit,\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => __( 'Padding', 'total' ),\n\t\t\t\t\t\t'param_name' => 'submit_padding',\n\t\t\t\t\t\t'description' => __( 'Please use the following format: top right bottom left.', 'total' ),\n\t\t\t\t\t\t'group' => $s_submit,\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => __( 'Border', 'total' ),\n\t\t\t\t\t\t'param_name' => 'submit_border',\n\t\t\t\t\t\t'description' => __( 'Please use the shorthand format: width style color. Enter 0px or \"none\" to disable border.', 'total' ),\n\t\t\t\t\t\t'group' => $s_submit,\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => __( 'Border Radius', 'total' ),\n\t\t\t\t\t\t'param_name' => 'submit_border_radius',\n\t\t\t\t\t\t'group' => $s_submit,\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => __( 'Font Size', 'total' ),\n\t\t\t\t\t\t'param_name' => 'submit_font_size',\n\t\t\t\t\t\t'group' => $s_submit,\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => __( 'Letter Spacing', 'total' ),\n\t\t\t\t\t\t'param_name' => 'submit_letter_spacing',\n\t\t\t\t\t\t'group' => $s_submit,\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'vcex_font_weight',\n\t\t\t\t\t\t'heading' => __( 'Font Weight', 'total' ),\n\t\t\t\t\t\t'param_name' => 'submit_weight',\n\t\t\t\t\t\t'group' => $s_submit,\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\t\t}",
"public function login() {\n\t\t// the variable located outside the method.\n\t\tglobal $routing;\n\n\t\t// Start creating the form.\n\t\t$form = new Form;\n\t\t// Set the form's method attribute,\n\t\t$form->setMethod(\"POST\");\n\t\t// and the action attribute. Here we use the url() method from\n\t\t// the routing class to generate a full URL to the login route.\n\t\t$form->setAction($routing->url('login'));\n\n\t\t// Create an Email Field with the name \"login-email\",\n\t\t$email = new EmailField(\"login-email\");\n\t\t// set it's class\n\t\t$email->setClass(\"form-control\");\n\t\t// mark it as required,\n\t\t$email->setRequired(true);\n\t\t// set it's label,\n\t\t$email->setLabel(\"E-mail:\");\n\t\t// set the HTML to appear before the field,\n\t\t$email->setBeforeHtml(\"<div class=\\\"form-group\\\">\");\n\t\t// set the HTML to appear after the field,\n\t\t$email->setAfterHtml(\"</div>\");\n\t\t// and add it to the form we created earlier.\n\t\t$form->addField($email);\n\n\t\t// Create a Password Field with the name \"login-password\",\n\t\t$password = new PasswordField(\"login-password\");\n\t\t// set it's class\n\t\t$password->setClass(\"form-control\");\n\t\t// mark it as required,\n\t\t$password->setRequired(true);\n\t\t// set it's label,\n\t\t$password->setLabel(\"Password:\");\n\t\t// set the HTML to appear before the field,\n\t\t$password->setBeforeHtml(\"<div class=\\\"form-group\\\">\");\n\t\t// set the HTML to appear after the field,\n\t\t$password->setAfterHtml(\"</div>\");\n\t\t// and add it to the form we created earlier.\n\t\t$form->addField($password);\n\n\t\t// Initialise a variable to store the form submission result in.\n\t\t$result = \"\";\n\n\t\t// Check if the form has been submitted.\n\t\tif( $form->isSubmitted() && $form->isValid() ) {\n\t\t\t// Form has been submited.\n\n\t\t\t// In order to access the database instance that exists in our init.php file,\n\t\t\t// we need to define the variable as global.\n\t\t\tglobal $database;\n\n\t\t\t// Connect to the database.\n\t\t\t$database->connect();\n\t\t\t\n\t\t\t// Query the database for and select the user matching the provided email address.\n\t\t\t// We need to set the index of 0 here as we are only interested in the first result.\n\t\t\t$user = $database->select(['*'], 'users', ['email' => $email->getValue()])[0];\n\n\t\t\t// Check if the provided email address matches a user in the database.\n\t\t\tif( isset($user['email']) && $user['email'] == $email->getValue() ) {\n\t\t\t\t// It does match, lets check if the provided password is also a match.\n\t\t\t\tif( $user['password'] == $password->getValue() ) {\n\t\t\t\t\t// Password is a match, so let's change the result to \"Verified\".\n\t\t\t\t\t$result = \"Verified\";\n\t\t\t\t} else {\n\t\t\t\t\t$result = \"Incorrect E-mail and/or Password\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$result = \"Incorrect E-mail and/or Password\";\n\t\t\t}\n\t\t} else if( $form->isSubmitted() && !$form->isValid() ) {\n\t\t\t$result = \"Missing Required Fields\";\n\t\t}\n\n\t\t// Render our view and pass to it the instance of our form, and the form submission result.\n\t\t$this->view('home/login', ['header-view' => 'home/header', 'footer-view' => 'home/footer', 'form' => $form, 'result' => $result]);\n\t}",
"public function init()\n {\n\n // define form name\n $this->setName('login');\n \n // error message\n $isEmptyMessage = 'This field is required!';\n \n // instantiating an element and passing to the form object:\n $username = new Zend_Form_Element_Text('username');\n \n // defining label, validators, filter tags and spaces\n $username->setLabel('Login or email:')\n ->setRequired(true)\n ->addFilter('StripTags')\n ->addFilter('StringTrim')\n ->addFilter('StringToLower')\n ->addValidator('regex', false, array('/^[a-z0-9\\@\\_\\-\\.]/'))\n ->addValidator('NotEmpty', true,\n array('messages' => array('isEmpty' => $isEmptyMessage,))\n );\n \n // instantiating an element and passing to the form object \n $password = new Zend_Form_Element_Password('password');\n \n // defining label, validators, filter tags and spaces\n $password->setLabel('Password:')\n ->setRequired(true)\n ->addFilter('StripTags')\n ->addFilter('StringTrim')\n ->addValidator('alnum')\n ->addValidator('NotEmpty', true,\n array('messages' => array('isEmpty' => $isEmptyMessage))\n );\n \n // creating submit button\n $submit = new Zend_Form_Element_Submit(array( \n 'name' => 'login', \n 'content' => 'Login', \n 'class' => 'btn-primary' \n\t));\n $submit->setLabel('Submit');\n\t\n // adding elements to the form\n\t\n $this->addElements(array($username, $password, $submit));\n \n // defining form method\n $this->setMethod('post');\n\n }",
"abstract function setupform();",
"public function loginpageAction()\n {\n Zend_Registry::set('SubCategory', SubCategory::LOGINPAGE);\n \t$this->view->loginForm = new User_Form_Login();\n }",
"function signup_submitURL() {\n\treturn BASE . 'signup' . DS .'submit';\n}",
"function initialize () {\n $this->set_openingtag ( \"<LABEL>\" );\n\t$this->set_closingtag ( \"</LABEL><INPUT TYPE=\\\"password\\\"[attributes]>\" );\n\t$this->set_type (\"password\");\n }",
"public function Form()\n {\n include(CONFIG\\PATH\\FORMS . 'Account_Create.php');\n }",
"public function init()\n {\n $this->setMethod('POST');\n \n $login = $this->createElement('text','login',null);\n $login->setRequired(TRUE)\n ->addValidator('alnum')\n ->addValidator('stringLength',false,array(6,20))\n ->addFilter('StringToLower');\n \n $password = $this->createElement('password','password',null);\n $password->setRequired(TRUE) \n ->addValidator('alnum')\n ->addValidator('stringLength',false,array(6,20))\n ->addFilter('StringToLower');\n \n $this->addElement($login);\n $this->addElement($password);\n $this->addElement('submit','send',null);\n }",
"function registrationFormUser(){\n require 'app/views/back/registrationFormUser.php';\n }",
"static function displayLogInUser()\n {\n echo \"<div class='col-xs-6'><h1>Log Into Account</h1>\";\n echo \"<form role='form' method='post' action='login.php'>\";\n echo \"<label for='loginUser'>Username: </label>\";\n echo \"<input type='text' class='form-control' id='loginUser' name='usr' required>\";\n echo \"<label for='loginPass'>Password: </label>\";\n echo \"<input type='password' class='form-control' id='loginPass' name='pwd' required>\";\n echo \"<input type='hidden' name='action' value='login'><input type='submit' class='btn btn-default'>\";\n echo \"</form></div>\";\n }",
"function form_init_elements()\r\n {\r\n $this->add_hidden_element(\"swimmeetid\") ;\r\n\r\n // This is used to remember the action\r\n // which originated from the GUIDataList.\r\n \r\n $this->add_hidden_element(\"_action\") ;\r\n }",
"public function getLogin() {\n \t// i don't understand the arguments in this make function. why aren't they more like getRegister()'s make()? 12/09/2014\n \t//$this->layout->content = View::make('<span class=\"skimlinks-unlinked\">users.login</span>');\n\n \t$this->layout->content = View::make('users.login');\n }",
"public static function _options_page(){\n\t\tif( isset($_POST['urls']) ){\n\t\t\tself::updateUrls($_POST['urls']);\n\t\t}\n\t\t\n\t\t$vars = (object) array();\n\t\t$vars->messages = implode( \"\\n\", self::$messages );\n\t\t$vars->path = self::$path;\n\t\t$vars->urls = self::getUrls();\n\t\tself::render( 'admin', $vars );\n\t}",
"public function __construct()\n {\n $this->page_title = \\Request::route()->getName();\n //\\App\\System::AccessLogWrite();\n }",
"public function plugin_page() {\n\t\t$this->setting_api->show_forms();\n\t}",
"public function init()\n {\n $this->setMethod('post');\n\n $view = Zend_Layout::getMvcInstance()->getView();\n $url = $view->url(array('controller'=>'auth','action'=>'login'));\n\n $this->setAction($url);\n\n $this->addElement('text','login_user',array('label'=>'Użytkownik','required'=>true,'filters'=>array('StringTrim')));\n\n $this->addElement('password','password_user',array('label'=>'Hasło:','required'=>true));\n\n $this->addElement('submit','submit',array('ignore'=>true,'label'=>'login'));\n }",
"protected function form()\n {\n return $this->view\n ->template('Moss:Sample:login')\n ->set('method', __METHOD__)\n ->set('flash', $this->app->get('flash'))\n ->render();\n }",
"function saml_sp_user_mapping_form($form, &$form_state) {\n $form['userfields'] = array(\n '#type' => 'fieldset',\n '#title' => t('User fields'),\n '#description' => t('The user fields mappings with SAML IDP attributes.'),\n );\n\n $form['userfields']['spmap_username'] = array(\n '#type' => 'textfield',\n '#title' => t('Username'),\n '#description' => t('The attribute mapped to the username'),\n '#default_value' => variable_get('spmap_username'),\n );\n\n $form['userfields']['spmap_email'] = array(\n '#type' => 'textfield',\n '#title' => t('Mail'),\n '#description' => t('The attribute mapped to the mail address.'),\n '#default_value' => variable_get('spmap_email'),\n );\n\n $form['userfields']['spmap_role'] = array(\n '#type' => 'textfield',\n '#title' => t('Roles'),\n '#description' => t('The attribute mapped to the roles.'),\n '#default_value' => variable_get('spmap_role'),\n );\n\n $form['roles'] = array(\n '#type' => 'fieldset',\n '#title' => t('User roles'),\n '#description' => t('The roles mapped to IDP roles.'),\n );\n\n foreach (user_roles(TRUE) as $key => $hr) {\n $form['roles']['spmap_' . $key] = array(\n '#type' => 'textfield',\n '#title' => $hr,\n '#default_value' => variable_get('spmap_' . $key),\n );\n }\n\n return system_settings_form($form);\n}",
"public function showLogin(){\n $this->data['pagetitle'] = \"Login\";\n $this->data['page'] = 'login';\n // $this->data['pagecontent'] = 'login';\n $this->data['pagebody'] = 'login';\n \n $this->render();\n }",
"function set_pagename($wt) {\n switch ($wt){\n case \"Name\" : $urlname=\"/\"; break;\n case \"Bio\" : $urlname=\"/bio\"; break;\n default :\n $this->page[$wt] = \"unknown page identifier\";\n $this->debug_scalar(\"Unknown page identifier: $wt\");\n return false;\n }\n return $urlname;\n }",
"function admin_login() {\n\t\t$this->layout = \"admin\";\n\t\t\n\t}",
"function admin_login() {\n\t\t$this->layout = \"admin\";\n\t\t\n\t}",
"function index()\n {\n // Check if there errors from the forms, and display them.\n $this->registry->template->loginSend = Util::checkExcistInSession($this->loginError);\n $this->registry->template->registerSend = Util::checkExcistInSession($this->registerError);\n\n // If the user is loggedIn show the logout button\n if ($this->registry->userAccount->isLogedIn()) {\n $this->registry->template->show('account-loggedin');\n } else {\n $this->registry->template->show('account');\n }\n }",
"public function init()\n {\n\n $username = new Zend_Form_Element_Text('username');\n $username->setLabel('Username')\n ->setAttribs([\n 'class' => 'form-control'\n ]);\n\n $password = new Zend_Form_Element_Password('password');\n $password->setLabel('Password')\n ->setAttribs([\n 'class' => 'form-control'\n ]);\n\n $this->addElements([$username, $password]);\n }",
"function hgr_minimalform_init() {\n\t\t\tif(function_exists('vc_map')) {\n\t\t\t\t/*\n\t\t\t\t\tparent element\n\t\t\t\t*/\n\t\t\t\tvc_map(\n\t\t\t\t\tarray(\n\t\t\t\t\t \"name\"\t\t\t\t\t\t=>\t__(\"HGR MinimalForm\", \"hgrextender\"),\n\t\t\t\t\t \"base\"\t\t\t\t\t\t=>\t\"hgr_minimal_form\",\n\t\t\t\t\t \"class\"\t\t\t\t\t\t=>\t\"\",\n\t\t\t\t\t \"icon\"\t\t\t\t\t\t=>\t\"hgr_minimal_form\",\n\t\t\t\t\t \"category\"\t\t\t\t\t=>\t__(\"HighGrade Extender\", \"hgrextender\"),\n\t\t\t\t\t \"as_parent\"\t\t\t\t\t=>\tarray(\"only\" =>\t\"hgr_minimal_input\"),\n\t\t\t\t\t \"description\"\t\t\t\t=>\t__(\"Minimal Form with advanced settings\", \"hgrextender\"),\n\t\t\t\t\t \"content_element\"\t\t\t=>\ttrue,\n\t\t\t\t\t \"show_settings_on_create\"\t=>\ttrue,\n\t\t\t\t\t \"params\"\t\t\t\t\t=>\tarray(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"dropdown\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Form size settings:\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"form_size\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\tarray(\n\t\t\t\t\t\t\t\t\t\t\"Large\"\t\t\t\t=>\t\"large\",\n\t\t\t\t\t\t\t\t\t\t\"Medium\"\t\t\t=>\t\"medium\",\n\t\t\t\t\t\t\t\t\t\t\"Small\"\t\t\t \t=>\t\"small\",\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\"description\"\t=>\t__(\"Choose from our 3 preset values.\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"dropdown\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Form style settings:\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"form_style\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\tarray(\n\t\t\t\t\t\t\t\t\t\t\"Standard\"\t\t\t\t=>\t\"standard\",\n\t\t\t\t\t\t\t\t\t\t\"Advanced\"\t\t\t\t=>\t\"advanced\",\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\"description\"\t=>\t__(\"Choose customization settings.\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"number\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Label text size:\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"label_text_size\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\t'',\n\t\t\t\t\t\t\t\t\"min\"\t\t\t=>\t8,\n\t\t\t\t\t\t\t\t\"max\"\t\t\t=>\t80,\n\t\t\t\t\t\t\t\t\"suffix\"\t\t=>\t\"px\",\n\t\t\t\t\t\t\t\t\"description\"\t=>\t__(\"Set label text size in pixels.\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"dependency\"\t=>\tarray(\n\t\t\t\t\t\t\t\t\t\"element\"\t=>\t\"form_style\",\n\t\t\t\t\t\t\t\t\t\"value\"\t\t=>\tarray( \"advanced\" ),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"colorpicker\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Label text color:\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"label_text_color\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"description\"\t=>\t__(\"Set label text color.\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"dependency\"\t=>\tarray(\n\t\t\t\t\t\t\t\t\t\"element\"\t=>\t\"form_style\",\n\t\t\t\t\t\t\t\t\t\"value\"\t\t=>\tarray( \"advanced\" ),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"colorpicker\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Input text color:\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"input_text_color\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"description\"\t=>\t__(\"Set input text color.\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"dependency\"\t=>\tarray(\n\t\t\t\t\t\t\t\t\t\"element\"\t=>\t\"form_style\",\n\t\t\t\t\t\t\t\t\t\"value\"\t\t=>\tarray( \"advanced\" )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"colorpicker\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Next icon color:\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"next_icon_color\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"description\"\t=>\t__(\"Set next icon color.\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"dependency\"\t=>\tarray(\n\t\t\t\t\t\t\t\t\t\"element\"\t=>\t\"form_style\",\n\t\t\t\t\t\t\t\t\t\"value\"\t\t=>\tarray( \"advanced\" ),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t \"type\"\t\t\t=>\t\"textfield\",\n\t\t\t\t\t\t\t\t \"class\"\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t \"heading\"\t\t=>\t__(\"Confirmation text:\",\"hgrextender\"),\n\t\t\t\t\t\t\t\t \"param_name\"\t=>\t\"confirmation_text\",\n\t\t\t\t\t\t\t\t \"value\"\t\t=>\t\"Form has been submitted. Thank you for your time!\",\n\t\t\t\t\t\t\t\t \"description\"\t=>\t__(\"Thank you message after the form is submitted.\",\"hgrextender\"),\n\t\t\t\t\t\t\t\t \"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"number\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Confirmation text size:\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"confirmation_text_size\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\t'',\n\t\t\t\t\t\t\t\t\"min\"\t\t\t=>\t8,\n\t\t\t\t\t\t\t\t\"max\"\t\t\t=>\t80,\n\t\t\t\t\t\t\t\t\"suffix\"\t\t=>\t\"px\",\n\t\t\t\t\t\t\t\t\"description\"\t=>\t__(\"Set confirmation text size in pixels.\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"dependency\"\t=>\tarray(\n\t\t\t\t\t\t\t\t\t\"element\"\t=>\t\"form_style\",\n\t\t\t\t\t\t\t\t\t\"value\"\t\t=>\tarray( \"advanced\" ),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"colorpicker\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Confirmation text color:\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"confirmation_text_color\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"description\"\t=>\t__(\"Set confirmation text color.\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"dependency\"\t=>\tarray(\n\t\t\t\t\t\t\t\t\t\"element\"\t=>\t\"form_style\",\n\t\t\t\t\t\t\t\t\t\"value\"\t\t=>\tarray( \"advanced\" ),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"colorpicker\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Steps text color:\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"steps_text_color\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"description\"\t=>\t__(\"Set steps text color.\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"dependency\"\t=>\tarray(\n\t\t\t\t\t\t\t\t\t\"element\"\t=>\t\"form_style\",\n\t\t\t\t\t\t\t\t\t\"value\"\t\t=>\tarray( \"advanced\" ),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"colorpicker\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Form input background color:\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"form_input_color\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"description\"\t=>\t__(\"Set color for input background.\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"dependency\"\t=>\tarray(\n\t\t\t\t\t\t\t\t\t\"element\"\t=>\t\"form_style\",\n\t\t\t\t\t\t\t\t\t\"value\"\t\t=>\tarray( \"advanced\" ),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"colorpicker\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Progress bar background color:\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"progress_bar_bgcolor\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"description\"\t=>\t__(\"Set the background color for progress bar.\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"dependency\"\t=>\tarray(\n\t\t\t\t\t\t\t\t\t\"element\"\t=>\t\"form_style\",\n\t\t\t\t\t\t\t\t\t\"value\"\t\t=>\tarray( \"advanced\" ),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'type' => 'css_editor',\n\t\t\t\t\t\t\t\t'heading' => __( 'Css', 'hgrextender' ),\n\t\t\t\t\t\t\t\t'param_name' => 'css',\n\t\t\t\t\t\t\t\t'group' => __( 'Design options', 'hgrextender' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t\"js_view\"\t=>\t\"VcColumnView\"\n\t\t\t\t));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t\tChild element\n\t\t\t\t*/\n\t\t\t\tvc_map(\n\t\t\t\t\tarray(\n\t\t\t\t\t \"name\"\t\t\t\t=>\t__(\"Input field\", \"hgrextender\"),\n\t\t\t\t\t \"holder\"\t\t\t=>\t\"div\",\n\t\t\t\t\t \"base\"\t\t\t\t=>\t\"hgr_minimal_input\",\n\t\t\t\t\t \"class\"\t\t\t\t=>\t\"\",\n\t\t\t\t\t \"icon\"\t\t\t\t=>\t\"\",\n\t\t\t\t\t \"content_element\"\t=>\ttrue,\n\t\t\t\t\t \"as_child\"\t\t\t=>\tarray(\"only\" =>\t\"hgr_minimal_form\"),\n\t\t\t\t\t \"params\"\t\t\t=>\tarray(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"textfield\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Label text:\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"label_text\",\n\t\t\t\t\t\t\t\t\"admin_label\" \t=> \ttrue,\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"description\"\t=>\t__(\"Set a label text (eg. First name, Address, Telephone).\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"dropdown\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Input type\",\"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"input_type\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\tarray(\n\t\t\t\t\t\t\t\t\t\t\"Text\"\t\t=>\t\"text\",\n\t\t\t\t\t\t\t\t\t\t\"E-mail\"\t=>\t\"e-mail\",\n\t\t\t\t\t\t\t\t\t\t\"Telephone\"\t=>\t\"telephone\",\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\"description\"\t=>\t__(\"Select input type. This will verify submitted data.\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t )\n\t\t\t\t\t) \n\t\t\t\t);\n\t\t\t}\n\t\t}",
"private function _initUser()\n {\n $this->username = Request::varchar('f_username', true);\n $this->password = Request::varchar('f_password');\n $this->name = Request::varchar('f_name', true);\n $this->email = Request::email();\n }",
"function init()\n\t{\n $this->defineAttribute('ajaxController', false, 'org.glizycms.contents.controllers.autocomplete.ajax.PagePicker', COMPONENT_TYPE_STRING);\n $this->defineAttribute('type', false, '', COMPONENT_TYPE_STRING);\n $this->defineAttribute('protocol', false, '', COMPONENT_TYPE_STRING);\n $this->defineAttribute('makeLink', false, false, COMPONENT_TYPE_BOOLEAN);\n\t\t$this->defineAttribute('multiple',\tfalse, \tfalse,\tCOMPONENT_TYPE_BOOLEAN);\n $this->defineAttribute('queryString', false, __Config::get('glizycms.pagePicker.queryStringEnabled'), COMPONENT_TYPE_BOOLEAN);\n\t\tparent::init();\n\n\t}",
"function InputForm()\n\t{\t\n\t\tif (!$data = $this->details)\n\t\t{\t$data = $_POST;\n\t\t\tif (!$data)\n\t\t\t{\t$data = array('live'=>1);\n\t\t\t}\n\t\t}\n\t\t\n\t\t$form = new Form('pageedit.php?id=' . (int)$this->id, 'pageedit');\n\t\t$form->AddTextInput('Page title', 'pagetitle', $this->InputSafeString($data['pagetitle']), '', 50);\n\t\t$form->AddCheckBox('Hide title on page', 'hideheader', 1, $data['hideheader']);\n\t\t\n\t\tif ($parents = $this->GetPossibleParents())\n\t\t{\t$form->AddSelectWithGroups('Parent page', 'parentid', $data['parentid'], '', $parents, 1, 0, '');\n\t\t\t$form->AddCheckBox('Display as section of parent', 'inparent', 1, $data['inparent']);\n\t\t}\n\t\t\n\t\t$form->AddTextInput('Order in menu', 'pageorder', (int)$data['pageorder'], 'num', 4);\n\t\tif ($this->CanAdminUser('technical'))\n\t\t{\t$form->AddTextInput('Extra page to include', 'includefile', $this->InputSafeString($data['includefile']), '', 50);\n\t\t\t$form->AddCheckBox('Allow galleries', 'galleries', 1, $data['galleries']);\n\t\t}\n\t\t$form->AddCheckBox('Make live', 'pagelive', 1, $data['pagelive']);\n\t\t$form->AddCheckBox('Leave out of search results', 'nosearch', 1, $data['nosearch']);\n\t\t$form->AddCheckBox('Show social media links?', 'socialbar', 1, $data['socialbar']);\n\t\t$form->AddCheckBox('In header menu?', 'headermenu', 1, $data['headermenu']);\n\t\tif ($this->CanAdminUser('technical'))\n\t\t{\t$form->AddTextInput('Class for header menu', 'menuclass', $this->InputSafeString($data['menuclass']), '', 50);\n\t\t}\n\t\t$form->AddCheckBox('In footer menu?', 'footermenu', 1, $data['footermenu']);\n\t\t$form->AddCheckBox('Header only (no content)', 'headeronly', 1, $data['headeronly']);\n\t\t$form->AddTextInput('Redirect link (full address if external)', 'redirectlink', $this->InputSafeString($data['redirectlink']), 'long', 255);\n\t\t\n\t\tif ($this->id)\n\t\t{\t$form->AddTextInput('Slug (for URL)', 'pagename', $this->InputSafeString($data['pagename']), 'long', 255);\n\t\t\tif ($link = $this->Link())\n\t\t\t{\t$form->AddRawText('<p><label>Link to page</label><span><a href=\"' . $link . '\" target=\"_blank\">' . $link . '</a></span><br /></p>');\n\t\t\t}\n\t\t}\n\t\t$form->AddCheckBox('Display block link in parent (if any)', 'blocklink', 1, $data['blocklink']);\n\t\t$form->AddTextArea('Block link text', $name = 'pageintro', stripslashes($data['pageintro']), 'tinymce', 0, 0, 10, 60);\n\t\t$form->AddTextArea('Page content', $name = 'pagetext', stripslashes($data['pagetext']), 'tinymce', 0, 0, 50, 60);\n\t\t$form->AddRawText('<p><label></label><a href=\"#\" onclick=\"javascript:window.open(\\'newsimagelist.php\\', \\'newsimages\\', \\'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=400, height=550\\'); return false;\">view available images</a></p>');\n\t\t$form->AddFileUpload('Subpage image:', 'imagefile');\n\t\tif ($src = $this->HasImage('thumbnail'))\n\t\t{\t$form->AddRawText('<label>Current image</label><img src=\"' . $src . '?' . time() . '\" height=\"200px\" /><br />');\n\t\t\t$form->AddCheckBox('Delete this', 'delphoto');\n\t\t}\n\t\t\n\t\tob_start();\n\t\techo '<label>Banner:</label><br /><label id=\"bannerPicked\">', ($data['banner'] && ($banner = new BannerSet($data['banner'])) && $banner->id) ? $this->InputSafeString($banner->details['title']) : 'none','</label><input type=\"hidden\" name=\"banner\" id=\"bannerValue\" value=\"', (int)$data['banner'], '\" /><span class=\"dataText\"><a onclick=\"BannerPicker();\">change this</a></span><br />';\n\t\t$form->AddRawText(ob_get_clean());\n\n\n\t\t$form->AddSubmitButton('', $this->id ? 'Save' : 'Create', 'submit');\n\t\techo $this->BannerPickerPopUp();\n\t\t\n\t\t$form->Output();\n\t}",
"public function index()\n {\n /**\n * Carregando o metodo page_login() como default do controller\n * Loading the method page_login() as controller default\n */\n $this->page_login();\n\n }",
"public function __construct() {\n\n\t\t# Make twig extend\n\t\tTwig::init();\n\n\t\t# Get path\n\t\t$path = Request::getPath();\n\n\t\t# Check if available\n\t\tif(!empty(Sky::$config[\"authenticate\"][\"use\"]) && !Auth::isLoggedIn())\n\t\t\tforeach($this->authPages as $page)\n\t\t\t\tif(preg_match(\"/$page/\", $path))\n\t\t\t\t\tRequest::setAddress('/login');\n\n\t}",
"public function init()\n {\n $this->addElement('password', 'password', array(\n 'required' => true,\n 'label' => 'Password'\n ));\n\n $this->addElement('submit', 'submit', array(\n 'ignore' => true,\n 'label' => 'Submit'\n ));\n }",
"public function init()\n {\n // Default user search for all users\n if ($this->userSearchUrl == \"\") {\n // provide the space id if the widget is calling from a space\n if (Yii::$app->controller->id == 'space') {\n $spaceId = Yii::$app->controller->getSpace()->id;\n $this->userSearchUrl = Url::toRoute(['/teams/search/json', 'keyword' => '-keywordPlaceholder-', 'space_id' => $spaceId]);\n } else {\n $this->userSearchUrl = Url::toRoute(['/teams/search/json', 'keyword' => '-keywordPlaceholder-']);\n }\n }\n }",
"protected function lookupUsername() {\n\t\tif (!isset($_POST['username'])) {\n\t\t\techo \"<p class=\\\"error\\\">Missing username</p>\\n\";\n\t\t\texit;\n\t\t}\n\t\t$this->username = $_POST['username'];\n\t}",
"public function renderForm()\n {\n $lang = $this->context->language;\n\n $inputs[] = [\n 'type' => 'switch',\n 'label' => $this->l(\"Active\"),\n 'name' => 'active',\n 'values' => [\n [\n 'id' => 'active_on',\n 'value' => 1,\n ],\n [\n 'id' => 'active_off',\n 'value' => 0,\n ],\n ]\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Page Name'),\n 'name' => 'name',\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Meta Title'),\n 'name' => 'meta_title_lang',\n 'required' => true,\n 'id' => 'name',\n 'lang' => true,\n 'class' => 'copyMeta2friendlyURL',\n 'hint' => $this->l('Invalid characters:').' <>;=#{}',\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Meta Description'),\n 'name' => 'meta_description_lang',\n 'lang' => true,\n 'hint' => $this->l('Invalid characters:').' <>;=#{}',\n ];\n $inputs[] = [\n 'type' => 'tags',\n 'label' => $this->l('Meta Keywords'),\n 'name' => 'meta_keywords_lang',\n 'lang' => true,\n 'hint' => [\n $this->l('To add \"tags\" click in the field, write something, and then press \"Enter.\"'),\n $this->l('Invalid characters:').' <>;=#{}',\n ],\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Friendly URL'),\n 'name' => 'url',\n 'required' => true,\n 'hint' => $this->l('Only letters and the hyphen (-) character are allowed.'),\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Breadcrumb URL Parameters'),\n 'name' => 'breadcrumb_parameters',\n 'required' => false,\n 'hint' => $this->l('Parameters to be applied when rendering as a breadcrumb'),\n ];\n\n $inputs[] = [\n 'type' => 'code',\n 'mode' => 'css',\n 'label' => $this->l('Style'),\n 'name' => 'style',\n 'lang' => false,\n //'autoload_rte' => true,\n 'id' => 'style',\n 'enableBasicAutocompletion' => true,\n 'enableSnippets' => true,\n 'enableLiveAutocompletion' => true,\n 'maxLines' => 50,\n ];\n $inputs[] = [\n 'type' => 'code',\n 'mode' => 'html',\n 'label' => $this->l('Content'),\n 'name' => 'content_lang',\n 'lang' => true,\n //'autoload_rte' => true,\n 'id' => 'content',\n 'enableBasicAutocompletion' => true,\n 'enableSnippets' => true,\n 'enableLiveAutocompletion' => true,\n 'maxLines' => 70,\n ];\n\n\n $allPages = $this->module->getAllHTMLPages(true);\n array_unshift($allPages, '-');\n\n\n if ($this->display == 'edit') {\n $inputs[] = [\n 'type' => 'hidden',\n 'name' => 'id_page'\n ];\n $title = $this->l('Edit Page');\n $action = 'submitEditCustomHTMLPage';\n\n $pageId = Tools::getValue('id_page');\n\n $this->fields_value = $this->module->getHTMLPage($pageId);\n\n // Remove the current page from the list of pages\n foreach ($allPages as $i => $p) {\n if ($p != '-' && $p['id_page'] == $pageId) {\n unset($allPages[$i]);\n break;\n }\n }\n }\n else {\n\n }\n\n // Parent select\n $inputs[] = [\n 'type' => 'select',\n 'label' => $this->l('Parent'),\n 'name' => 'id_parent',\n 'options' => [\n 'query' => $allPages,\n 'id' => 'id_page',\n 'name' => 'name'\n ]\n ];\n //$this->fields_value['id_relatedTo'] = [];\n\n array_shift($allPages);\n\n // List of Pages this Page is related to\n $inputs[] = [\n 'type' => 'swap',\n 'label' => $this->l('Show On ($page->related[])'),\n 'multiple' => true,\n 'name' => 'id_relatedTo',\n 'options' => [\n 'query' => $allPages,\n 'id' => 'id_page',\n 'name' => 'name'\n ],\n 'hint' => $this->l('Makes this page show up on other pages (not as a child page but as a related page): $page->related[]')\n ];\n\n $inputs[] = [\n 'type' => 'html',\n 'html_content' => '<hr/>',\n 'name' => 'id_page',\n ];\n\n // List of Products\n $products = Product::getProducts($lang->id, 0, 1000, 'id_product', 'ASC');\n $inputs[] = [\n 'type' => 'swap',\n 'label' => $this->l('Products ($product or $products)'),\n 'name' => 'id_products',\n 'multiple' => true,\n 'options' => [\n 'query' => $products,\n 'id' => 'id_product',\n 'name' => 'name'\n ],\n 'hint' => $this->l('This will populate $products. If only one is selected then $product will be populated'),\n ];\n\n // List of Categories\n $categories = Category::getCategories($lang->id, true, false);\n $inputs[] = [\n 'type' => 'swap',\n 'label' => $this->l('Categories ($category or $categories)'),\n 'name' => 'id_categories',\n 'multiple' => true,\n 'options' => [\n 'query' => $categories,\n 'id' => 'id_category',\n 'name' => 'name'\n ],\n 'hint' => $this->l('This will populate $categories. If only one is selected then $category will be populated'),\n ];\n\n $this->fields_form = [\n 'legend' => [\n 'title' => $title,\n 'icon' => 'icon-cogs',\n ],\n 'input' => $inputs,\n 'buttons' => [\n 'save-and-stay' => [\n 'title' => $this->l('Save and Stay'),\n 'class' => 'btn btn-default pull-right',\n 'name' => $action.'AndStay',\n 'icon' => 'process-icon-save',\n 'type' => 'submit'\n ]\n\n ],\n 'submit' => [\n 'title' => $this->l('Save'),\n 'class' => 'btn btn-default pull-right',\n 'name' => $action,\n ],\n\n ];\n\n\n return parent::renderForm();\n }",
"private function formLogIn($username): void\n {\n $crawler = $this->client->request('GET', '/admin/login');\n $form = $crawler->filter('button.btn-primary')->form();\n $this->client->submit($form, [\n '_username' => $username,\n '_password' => UserFixtures::PASSWORD\n ]);\n }",
"public function formAction() {}",
"public function init()\n\t{\n\t\tparent::init();\n\n\t\t/**\n\t\t * form\n\t\t */\n\t\t$this->setAttrib('id', 'formUserLogin');\n\n\t\t/**\n\t\t * formLogin\n\t\t */\n\t\t$formLogin = new L8M_Form_Element_Email('login');\n\t\t$formLogin\n\t\t\t->setLabel('Login')\n\t\t\t->setAttrib('class', 'form-control')\n\t\t\t->setRequired(TRUE)\n\t\t\t->setFilters(array(\n\t\t\t\tnew Zend_Filter_StripTags(),\n\t\t\t))\n\t\t\t->setValidators(array(\n\t\t\t\tnew Zend_Validate_NotEmpty(),\n\t\t\t))\n\t\t;\n\t\t$this->addElement($formLogin);\n\n\t\t/**\n\t\t * formPassword\n\t\t */\n\t\t$formPassword = new Zend_Form_Element_Password('password');\n\t\t$formPassword\n\t\t\t->setLabel('Password')\n\t\t\t->setAttrib('class', 'form-control')\n\t\t\t->setRequired(TRUE)\n\t\t\t->setValidators(array(\n\t\t\t\tnew Zend_Validate_NotEmpty(),\n\t\t\t))\n\t\t;\n\t\t$this->addElement($formPassword);\n\n\t\t/**\n\t\t * formSubmitButton\n\t\t */\n\t\t$formSubmitButton = new Zend_Form_Element_Submit('formUserLoginSubmit');\n\t\t$formSubmitButton\n\t\t\t->setLabel('Login')\n\t\t\t->setAttrib('class', 'btn btn-warning')\n\t\t\t->setDecorators(array(\n\t\t\t\tnew Zend_Form_Decorator_ViewHelper(),\n\t\t\t\tnew Zend_Form_Decorator_HtmlTag(array(\n\t\t\t\t\t'class'=>'submit',\n\t\t\t\t)),\n\t\t\t))\n\t\t;\n\t\t$this->addElement($formSubmitButton);\n\t}",
"public function create_thirty8_simple_map_settings_pages() \n\t\t{\n\t\n\t\t\t// Add the menu item and page\n\t\t\t$page_title = 'ThePageTitle';\t// shown in page title field only \n\t\t\t$menu_title = 'TheMenuTitle'; \t// visible in menu\n\t\t\t$capability = 'manage_options';\n\t\t\t$slug = 'thirty8-simple-map';\n\t\t\t$callback = array( $this, 'thirty8_simple_map_homepage' );\n\t\t\t$icon = 'dashicons-admin-plugins';\n\t\t\t$position = 100;\n\t\t\n\t\t\t// Main menu\t\n\t\t\t//add_menu_page( $page_title, $menu_title, $capability, $slug, $callback, $icon, $position );\n\t\t\t\n\t\t\t// Sub menus - add more as needed\n\t\t\t//add_submenu_page('thirty8-simple-map', 'settings', 'Settings', 'manage_options', 'thirty8-simple-map_settings_page','thirty8_simple_map_settings_page');\n\t\t\t\n\t\t\t//add_submenu_page('theslug', 'thepagetitle', 'submenutitle', 'manage_options', 'subpage_name','subpage_name1');\t\t\n\t\t\t//add_submenu_page('theslug', 'thepagetitle2', 'submenutitle2', 'manage_options', 'subpage_name2','subpage_name2');\n\t\n\t\t\t// Functions to include sub pages - add more as needed\n\t\t\tfunction thirty8_simple_map_settings_page()\n\t\t\t{\n\t\t\t\t//include('admin/settings.php');\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t// Additional Pages here\n\t\t\t\n\t\t\t\tfunction subpage_name1()\n\t\t\t\t{\n\t\t\t\t\tinclude('admin/page1.php');\n\t\t\t\t}\n\t\t\n\t\t\t\tfunction subpage_name2()\n\t\t\t\t{\n\t\t\t\t\tinclude('admin/page2.php');\n\t\t\t\t}\n\t\t\t*/\n\t\t\n\t\n\t\t}",
"public function ulogiraj_registiraj()\r\n\t{\r\n\t\tif(isset($_POST['ulogiraj']))\r\n\t\t{\r\n\t\t\t$this->registry->template->title = 'Login';\r\n\t\t\t$this->registry->template->show( 'login' );\r\n\t\t}\r\n\t\tif(isset($_POST['registriraj']))\r\n\t\t{\r\n\t\t\t$this->registry->template->title = 'Registriraj se';\r\n\t\t\t$this->registry->template->show( 'register' );\r\n\t\t}\r\n\r\n\t}",
"public function indexAction($username = NULL) {\n\t\t$this->view->assign('username', $username);\n\t}",
"public function formHandler()\n {\n $_SESSION['title'] = \"Caiman: Dashboard\";\n $this->allowAccessTo(array(1, 3));\n\n $oldPassword = null;\n $newPasswordRepeat = null;\n $newPassword = null;\n\n if (isset($_GET['e'])) {\n $this->e = filter_input(INPUT_GET, 'e', FILTER_SANITIZE_SPECIAL_CHARS);\n }\n // form update\n if ($this->e == \"updatePassword\") {\n $_SESSION['title'] = \"Caiman: Update password\";\n if (isset($_POST['oldPassword'])) {\n $oldPassword = filter_input(INPUT_POST, 'oldPassword', FILTER_SANITIZE_STRING);\n }\n if (isset($_POST['newPassword'])) {\n $newPassword = filter_input(INPUT_POST, 'newPassword', FILTER_SANITIZE_STRING);\n }\n if (isset($_POST['newPasswordRepeat'])) {\n $newPasswordRepeat = filter_input(INPUT_POST, 'newPasswordRepeat', FILTER_SANITIZE_STRING);\n }\n\n if (isset($oldPassword) && isset($newPassword) && isset($newPasswordRepeat)) {\n $_SESSION['user']->updatePassword($newPassword, $newPasswordRepeat, $oldPassword);\n }\n }\n\n // update if account if visible or not\n if ($this->e == \"updatePrivateAccount\") {\n\n if ($_SESSION['user']->idUser != -1) {\n $_SESSION['user']->updatePrivateAccount();\n header('Location:' . $_SERVER['HTTP_REFERER']);\n }\n }\n }",
"public function passHandler()\n {\n return '<input data-js-mvc-routing=\"js-mvc-route\" type=\"hidden\" style=\"display: none!important\" value=\"' .\n $this->controller . '::' . $this->method .\n '\"/>';\n }",
"public function formNavBar(){\n $lang = 'en'; //<--- Assessment 1: 2 - Basic variable type, scope (only accessible in this method)\n if($this->locale === 'hi'){\n $lang = 'hi';\n }\n echo \"<div class='ui inverted menu'>\n <a class='\".$this->home.\" item'\n href='../../pages/landingPage/\".$lang.\".php'>\".\n $this->ini_array[$this->locale][\"Home\"].\n \"</a>\n <a class='\".$this->viewPosts.\" item' \n href='../../pages/viewAllPosts/\".$lang.\".php'>\".\n $this->ini_array[$this->locale][\"View-Posts\"].\n \"</a>\n <a class='\".$this->myPosts.\" item' \n href='../../pages/viewUserPosts/\".$lang.\".php'>\".\n $this->ini_array[$this->locale][\"User-Posts\"].\n \"</a>\n <a class='\".$this->newPost.\" item' \n href='../../pages/newPost/\".$lang.\".php'>\".\n $this->ini_array[$this->locale][\"New-Post\"].\n \"</a>\n <div class='right menu'>\";\n\n\n if($this->session==='Login')\n {\n echo \"<a class='\".$this->login.\" item'\n href='../../pages/loginPage/\".$lang.\".php'>\".\n $this->ini_array[$this->locale][$this->session].\n \"</a>\";\n }\n else {\n echo \"<a class='\".$this->login.\" item'\n href='?logout=1'>\".\n $this->ini_array[$this->locale][$this->session].\n \"</a>\";\n }\n\n\n if(!(isset($_SESSION['loggedIn'])&&($_SESSION['loggedIn']))){\n echo \"<a class='\".$this->register.\" item' \n href='../../pages/registrationPage/\".$lang.\".php'>\".\n $this->ini_array[$this->locale][\"Register\"].\n \"</a>\";\n }\n echo \"</div>\n </div>\";\n }",
"function getPage($sUserName) {\n\tglobal $default;\n\t$sToRender = renderHeading(_(\"Update user password\"));\n\t$sToRender .= \"<br>\\n\";\t\n\t$sToRender .= \"<table cellpadding=\\\"5\\\">\\n\";\n\t$sToRender .= \"<tr>\\n\";\n\t$sToRender .= \"<td bgcolor=\\\"6699FF\\\">\" . _(\"User name\") . \": </td>\\n\";\n\t$sToRender .= \"<td bgcolor=\\\"F5F6EE\\\">$sUserName</td>\\n\";\n\t$sToRender .= \"</tr>\\n\";\n\t$sToRender .= \"<tr>\\n\";\n\t$sToRender .= \"<td bgcolor=\\\"6699FF\\\">\" . _(\"New password\") . \": </td>\\n\";\n\t$sToRender .= \"<td><input type=\\\"password\\\" name=\\\"fNewPassword\\\"></td>\\n\";\n\t$sToRender .= \"</tr>\\n\";\n\t$sToRender .= \"<tr>\\n\";\n\t$sToRender .= \"<td bgcolor=\\\"6699FF\\\">\" . _(\"Confirm password\") . \": </td>\\n\";\n\t$sToRender .= \"<td bgcolor=\\\"F5F6EE\\\"><input type=\\\"password\\\" name=\\\"fNewPasswordConfirm\\\"></td>\\n\";\n\t$sToRender .= \"</tr>\\n\";\n\t$sToRender .= \"<tr>\\n\";\n\t$sToRender .= \"</tr>\\n\";\n\t$sToRender .= \"<tr>\\n\";\n\t$sToRender .= \"<td colspan=\\\"2\\\" align=\\\"right\\\">\";\n\t$sToRender .= \"<td align = right><input type=\\\"image\\\" src =\\\"\" . KTHtml::getUpdateButton() . \"\\\" value=\\\"Update\\\" border=\\\"0\\\"/>\";\n\t$sToRender .= \"<a href=\\\"$default->rootUrl/control.php?action=userManagement\\\"><img src =\\\"\" . KTHtml::getCancelButton() . \"\\\" value=\\\"cancel\\\" border=\\\"0\\\"/></a>\\n\";\n\t$sToRender .= \"</tr>\\n\";\n\t$sToRender .= \"</table>\\n\";\n\t\n\treturn $sToRender;\n\t\n}",
"public function manuel()\n {\n // On set la variable a afficher sur dans la vue\n $this->set('title', 'Manuel');\n // On fait le rendu de la vue signup.php\n $this->render('manuel');\n }",
"public function displayForm() {\n if (isset($_SESSION['user']) && ($_SESSION['level'] == \"admin\")){\n $this->page .= \"<h2>J'ajoute un utilisateur via un formulaire :</h2>\";\n $this->page .= \"<a class='btn btn-primary col-12 mt-3' href='index.php?controller=user&action=start'>Retour en arrière</a>\";\n $this->page .= file_get_contents('template/formUser.html');\n $this->page = str_replace('{action}','addDB', $this->page);\n $this->page = str_replace('{id}','', $this->page);\n $this->page = str_replace('{username}','', $this->page);\n $this->page = str_replace('{password}','', $this->page);\n $this->page = str_replace('{firstname}','', $this->page);\n $this->page = str_replace('{lastname}','', $this->page);\n $this->displayPage();\n } else {\n header ('location:index.php?controller=login&action=formLog');\n }\n }",
"public function __construct()\n {\n $this->page = collect();\n $this->page->title = 'Patient Dashboard';\n $this->page->view = 'home';\n }",
"public function page_init()\n {\n register_setting(\n 'mj_groups_fields', // group name\n 'mj_option_theme',\n array($this, 'sanitize') // sanitize\n );\n\n add_settings_section(\n 'section_default',\n '',\n '',\n 'config-theme-options'\n );\n\n foreach ($this->formRenderInputs as $key => $value) {\n add_settings_field(\n $value['args']['atributos']['name'],\n $value['titulo'],\n array($this, 'render_field_input'),\n 'config-theme-options',\n 'section_default',\n array('valores' => $value)\n );\n }\n }",
"public function addrequest(){\n\t\tinclude 'gui/template/UserTemplate.php';\n\t}",
"function registrationPage() {\n\t\t $display = &new jzDisplay();\n\t\t $be = new jzBackend();\n\t\t $display->preHeader('Register',$this->width,$this->align);\n\t\t $urla = array();\n\n\t\t if (isset($_POST['field5'])) {\n\t\t $user = new jzUser(false);\n\t\t if (strlen($_POST['field1']) == 0 ||\n\t\t\t\t\tstrlen($_POST['field2']) == 0 ||\n\t\t\t\t\tstrlen($_POST['field3']) == 0 ||\n\t\t\t\t\tstrlen($_POST['field4']) == 0 ||\n\t\t\t\t\tstrlen($_POST['field5']) == 0) {\n\t\t echo \"All fields are required.<br>\";\n\t\t }\n\t\t else if ($_POST['field2'] != $_POST['field3']) {\n\t\t echo \"The passwords do not match.<br>\";\n\t\t }\n\t\t else if (($id = $user->addUser($_POST['field1'],$_POST['field2'])) === false) {\n\t\t echo \"Sorry, this username already exists.<br>\";\n\t\t } else {\n\t\t // success!\n\t\t $stuff = $be->loadData('registration');\n\t\t $classes = $be->loadData('userclasses');\n\t\t $settings = $classes[$stuff['classname']];\n\n\t\t $settings['fullname'] = $_POST['field4'];\n\t\t $settings['email'] = $_POST['field5'];\n\t\t $un = $_POST['field1'];\n\t\t $settings['home_dir'] = str_replace('USERNAME',$un,$settings['home_dir']);\n\t\t $user->setSettings($settings,$id);\n\n\t\t echo \"Your account has been created. Click <a href=\\\"\" . urlize($urla);\n\t\t echo \"\\\">here</a> to login.\";\n\t\t $this->footer();\n\t\t return;\n\t\t }\n\t\t }\n\n\t\t ?>\n\t\t\t<form method=\"POST\" action=\"<?php echo urlize($urla); ?>\">\n\t\t\t<input type=\"hidden\" name=\"<?php echo jz_encode('action'); ?>\" value=\"<?php echo jz_encode('login'); ?>\">\n\t\t\t<input type=\"hidden\" name=\"<?php echo jz_encode('self_register'); ?>\" value=\"<?php echo jz_encode('true'); ?>\">\n\t\t\t<table width=\"100%\" cellpadding=\"5\" style=\"padding:5px;\" cellspacing=\"0\" border=\"0\">\n\t\t\t<tr>\n\t\t\t<td width=\"50%\" align=\"right\"><font size=\"2\">\n\t\t\t<?php echo word(\"Username\"); ?>\n\t\t\t</font></td><td width=\"50%\">\n\t\t\t<input type=\"text\" class=\"jz_input\" name=\"field1\" value=\"<?php echo $_POST['field1']; ?>\">\n\t\t\t</td></tr>\n\t\t\t<tr><td width=\"50%\" align=\"right\"><font size=\"2\">\n\t\t\t<?php echo word(\"Password\"); ?>\n\t\t\t</font></td>\n\t\t\t<td width=\"50%\">\n\t\t\t<input type=\"password\" class=\"jz_input\" name=\"field2\" value=\"<?php echo $_POST['field2']; ?>\"></td></tr>\n\t\t\t <tr><td width=\"50%\" align=\"right\"><font size=\"2\">\n\t\t\t \n\t\t\t</td>\n\t\t\t<td width=\"50%\">\n\t\t\t<input type=\"password\" class=\"jz_input\" name=\"field3\" value=\"<?php echo $_POST['field3']; ?>\"></td></tr>\n\t\t\t<tr><td width=\"50%\" align=\"right\"><font size=\"2\">\n\t\t\t<?php echo word(\"Full name\"); ?>\n\t\t\t</font></td><td width=\"50%\">\n\t\t\t<input type=\"text\" class=\"jz_input\" name=\"field4\" value=\"<?php echo $_POST['field4']; ?>\">\n\t\t\t</td></tr>\n\t\t\t<tr><td width=\"50%\" align=\"right\"><font size=\"2\">\n\t\t\t<?php echo word(\"Email\"); ?>\n\t\t\t</font></td><td width=\"50%\">\n\t\t\t<input type=\"text\" class=\"jz_input\" name=\"field5\" value=\"<?php echo $_POST['field5']; ?>\">\n\t\t\t</td></tr>\n\t\t\t<tr><td width=\"100%\" colspan=\"2\" align=\"center\">\n\t\t\t<input class=\"jz_submit\" type=\"submit\" name=\"<?php echo jz_encode('submit_login'); ?>\" value=\"<?php echo word(\"Register\"); ?>\">\n\t\t\t</td></tr></table><br>\n\t\t\t</form>\n\t\t\t<?php\n\t\t $this->footer();\n\t }"
] | [
"0.53001285",
"0.52874255",
"0.52765423",
"0.52499956",
"0.5227664",
"0.5206062",
"0.51854",
"0.516891",
"0.51493883",
"0.513553",
"0.5116706",
"0.5115426",
"0.5109536",
"0.5077222",
"0.507021",
"0.50672966",
"0.5039589",
"0.50382006",
"0.50219357",
"0.50084156",
"0.50050724",
"0.5003997",
"0.49751568",
"0.49748474",
"0.49736634",
"0.49681547",
"0.4957894",
"0.49496943",
"0.49456087",
"0.49354818",
"0.493427",
"0.49308676",
"0.49249122",
"0.49153575",
"0.4914677",
"0.49139705",
"0.49041408",
"0.49002862",
"0.48974088",
"0.48851815",
"0.48747355",
"0.48745376",
"0.4869793",
"0.48623484",
"0.48623484",
"0.4861307",
"0.48463625",
"0.48420274",
"0.4839846",
"0.48392195",
"0.48359057",
"0.48352337",
"0.48327658",
"0.4830528",
"0.48288113",
"0.48272666",
"0.48254877",
"0.48041856",
"0.48038268",
"0.47974586",
"0.47946954",
"0.47903925",
"0.47873023",
"0.4787222",
"0.47854447",
"0.478319",
"0.47770637",
"0.47655872",
"0.4758416",
"0.4751082",
"0.4746714",
"0.47454676",
"0.47454676",
"0.4740451",
"0.47366688",
"0.47366154",
"0.47337583",
"0.4732302",
"0.47307423",
"0.4727371",
"0.47229886",
"0.47220647",
"0.47184524",
"0.47149727",
"0.47140777",
"0.47140148",
"0.4709098",
"0.47088552",
"0.4707811",
"0.4707501",
"0.47053087",
"0.47032887",
"0.46991277",
"0.4695659",
"0.46947646",
"0.46920943",
"0.46918005",
"0.46916667",
"0.46880564",
"0.4687774",
"0.46854067"
] | 0.0 | -1 |
Display a listing of the resource. | public function index()
{
// return collection of articles
return ArticleResource::collection(Article::orderBy('created_at', 'desc')->paginate(6));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }",
"public function listing();",
"function index() {\n\t\t$this->show_list();\n\t}",
"public function actionList() {\n $this->_getList();\n }",
"public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }",
"public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }",
"public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }",
"function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}",
"public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }",
"public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }",
"public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}",
"function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}",
"public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }",
"public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}",
"public function actionRestList() {\n\t $this->doRestList();\n\t}",
"public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}",
"public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }",
"public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }",
"public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}",
"public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}",
"public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }",
"public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }",
"public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }",
"public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }",
"public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}",
"public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }",
"public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}",
"public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }",
"public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }",
"public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }",
"public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}",
"public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }",
"public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }",
"public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }",
"public function index()\n {\n return Resources::collection(Checking::paginate());\n }",
"public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }",
"public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }",
"public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }",
"public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }",
"public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }",
"public function view(){\n\t\t$this->buildListing();\n\t}",
"public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }",
"public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }",
"public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }",
"public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }",
"public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }",
"public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }",
"public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }",
"public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }",
"public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }",
"public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}",
"public function listAction() {}",
"public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }",
"public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }",
"public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }",
"public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }",
"public function executeList()\n {\n $this->setTemplate('list');\n }",
"public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }",
"function listing() {\r\n\r\n }",
"public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }",
"public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }",
"public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}",
"public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }",
"public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }",
"public function _index(){\n\t $this->_list();\n\t}",
"public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}",
"function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}",
"public function index()\n {\n $this->booklist();\n }",
"public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }",
"public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }",
"public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }",
"public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }",
"public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }",
"public function indexAction() {\n $this->_forward('list');\n }",
"public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }",
"public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }",
"public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}",
"public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }",
"public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }",
"public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }",
"public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }",
"public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }",
"public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}",
"public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }",
"public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }",
"public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }",
"public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}",
"public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }",
"public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }",
"public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }",
"public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }",
"public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }",
"public function index()\n {\n return view('admin.resources.index');\n }",
"public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}"
] | [
"0.7446777",
"0.736227",
"0.73005503",
"0.72478926",
"0.71631265",
"0.71489686",
"0.7131636",
"0.7105969",
"0.71029514",
"0.7101372",
"0.70508176",
"0.6995128",
"0.69890636",
"0.6934895",
"0.6900203",
"0.6899281",
"0.6891734",
"0.6887235",
"0.68670005",
"0.6849741",
"0.6830523",
"0.6802689",
"0.6797",
"0.67957735",
"0.67871135",
"0.6760129",
"0.67427456",
"0.6730486",
"0.67272323",
"0.67255723",
"0.67255723",
"0.67255723",
"0.67177945",
"0.6707866",
"0.6706713",
"0.6704375",
"0.6664782",
"0.6662871",
"0.6660302",
"0.6659404",
"0.6656656",
"0.6653517",
"0.6647965",
"0.6620322",
"0.66185474",
"0.6618499",
"0.6606105",
"0.6600617",
"0.65996987",
"0.6594775",
"0.6587389",
"0.6585109",
"0.6581641",
"0.6581017",
"0.6577157",
"0.65747666",
"0.6572513",
"0.65721947",
"0.6570553",
"0.65646994",
"0.6563556",
"0.6554194",
"0.65529937",
"0.65460825",
"0.65368485",
"0.653429",
"0.65328294",
"0.6526759",
"0.6526695",
"0.6526284",
"0.65191334",
"0.65183175",
"0.65174305",
"0.651703",
"0.65141153",
"0.6507088",
"0.65061647",
"0.6504046",
"0.64942145",
"0.6491893",
"0.64883405",
"0.6486392",
"0.6485077",
"0.64846045",
"0.6478858",
"0.64756656",
"0.64726377",
"0.6471126",
"0.64701074",
"0.6467418",
"0.6462195",
"0.64618355",
"0.6459199",
"0.6457831",
"0.6454631",
"0.64533997",
"0.6451915",
"0.6450861",
"0.6449301",
"0.64492667",
"0.64469045"
] | 0.0 | -1 |
Show the form for creating a new resource. | public function create()
{
return view('articles.create');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view('resource.create');\n }",
"public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}",
"public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }",
"public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }",
"public function create()\n {\n return view ('forms.create');\n }",
"public function create ()\n {\n return view('forms.create');\n }",
"public function create()\n\t{\n\t\treturn view('faith.form');\n\t}",
"public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }",
"public function create()\n {\n return view(\"request_form.form\");\n }",
"public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }",
"public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle école'\n\t\t) ) );\n\t}",
"public function create()\n {\n return view($this->forms . '.create');\n }",
"public function create()\n {\n return view('restful.add');\n }",
"public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }",
"public function create()\n {\n return view('admin.createform');\n }",
"public function create()\n {\n return view('admin.forms.create');\n }",
"public function create()\n {\n return view('backend.student.form');\n }",
"public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function create()\n {\n return view('client.form');\n }",
"public function create()\n {\n return view('Form');\n }",
"public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }",
"public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }",
"public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}",
"public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }",
"public function create()\n {\n return view('backend.schoolboard.addform');\n }",
"public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}",
"public function create()\n {\n return view('rests.create');\n }",
"public function create()\n {\n //\n return view('form');\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return view(\"Add\");\n }",
"public function create(){\n return view('form.create');\n }",
"public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }",
"public function create()\n {\n\n return view('control panel.student.add');\n\n }",
"public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}",
"public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }",
"public function create()\n {\n return $this->cView(\"form\");\n }",
"public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }",
"public function create()\n {\n return view(\"dresses.form\");\n }",
"public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}",
"public function createAction()\n {\n// $this->view->form = $form;\n }",
"public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }",
"public function create()\n {\n return view('fish.form');\n }",
"public function create()\n {\n return view('users.forms.create');\n }",
"public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }",
"public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}",
"public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }",
"public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }",
"public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }",
"public function create()\n {\n return view('essentials::create');\n }",
"public function create()\n {\n return view('student.add');\n }",
"public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}",
"public function create()\n {\n return view('url.form');\n }",
"public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }",
"public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}",
"public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view('crud/add'); }",
"public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}",
"public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view(\"List.form\");\n }",
"public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}",
"public function create()\n {\n //load create form\n return view('products.create');\n }",
"public function create()\n {\n return view('article.addform');\n }",
"public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }",
"public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}",
"public function create()\n {\n return view('saldo.form');\n }",
"public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}",
"public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }",
"public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }",
"public function create()\n {\n return view('admin.inverty.add');\n }",
"public function create()\n {\n return view('Libro.create');\n }",
"public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n {\n return view(\"familiasPrograma.create\");\n }",
"public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}",
"public function create()\n {\n return view(\"create\");\n }",
"public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}",
"public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n return view('forming');\n }",
"public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }",
"public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }",
"public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }",
"public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }",
"public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }",
"public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}",
"public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}",
"public function create()\n {\n return view('student::students.student.create');\n }"
] | [
"0.75934863",
"0.75934863",
"0.7587591",
"0.75782615",
"0.75711566",
"0.74992937",
"0.74349296",
"0.7432467",
"0.7387912",
"0.7351958",
"0.73380226",
"0.73111826",
"0.72957826",
"0.72812104",
"0.72734547",
"0.7242778",
"0.72294843",
"0.7225723",
"0.718609",
"0.71780044",
"0.7173978",
"0.71492267",
"0.71434265",
"0.7143343",
"0.71356934",
"0.7127626",
"0.7122704",
"0.71151215",
"0.71151215",
"0.71151215",
"0.711137",
"0.7093674",
"0.708441",
"0.70805633",
"0.7079313",
"0.70560336",
"0.70560336",
"0.705535",
"0.7038748",
"0.7038717",
"0.70355713",
"0.7033314",
"0.70298624",
"0.70262384",
"0.7025372",
"0.70192045",
"0.7017566",
"0.70037806",
"0.70029014",
"0.69999987",
"0.6995955",
"0.6994461",
"0.69932437",
"0.698907",
"0.6985915",
"0.69654584",
"0.69652516",
"0.6956021",
"0.6951258",
"0.6950627",
"0.69471824",
"0.69432425",
"0.6941303",
"0.69406337",
"0.6937103",
"0.6937103",
"0.69363457",
"0.6934366",
"0.6931313",
"0.6927307",
"0.6926027",
"0.6922591",
"0.69176334",
"0.69158953",
"0.6911744",
"0.6910005",
"0.6909594",
"0.6907657",
"0.6902698",
"0.6900764",
"0.69007087",
"0.6900391",
"0.68942374",
"0.68933",
"0.68929493",
"0.68912417",
"0.68912417",
"0.68911326",
"0.6888626",
"0.6887399",
"0.68857414",
"0.6884495",
"0.6881287",
"0.6878567",
"0.6875623",
"0.687334",
"0.68722713",
"0.6870009",
"0.68697596",
"0.6869062",
"0.6868769"
] | 0.0 | -1 |
Store a newly created resource in storage. | public function store(ArticlesRequest $request)
{
// create new article
$article = new Article();
$article->user_id = Auth::user()->id;
$article->title = $request->input('title');
$article->body = $request->input('body');
// create image file
if ($file = $request->file('image')) {
$name = uniqid('threedium_', true).'.'.$file->getClientOriginalExtension();
\Image::make($file)->save(public_path('images/').$name);
$article->image = $name;
}
if ($article->save()) {
return redirect()->back()->with('success', 'Article added successfully!');
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store($data, Resource $resource);",
"public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }",
"public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }",
"public function createStorage();",
"public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"function storeAndNew() {\n $this->store();\n }",
"public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }",
"public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }",
"public function store()\n\t{\n\t\t\n\t\t//\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}"
] | [
"0.72865677",
"0.7145327",
"0.71325725",
"0.6640912",
"0.66209733",
"0.65685713",
"0.652643",
"0.65095705",
"0.64490104",
"0.637569",
"0.63736665",
"0.63657933",
"0.63657933",
"0.63657933",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437"
] | 0.0 | -1 |
Display the specified resource. | public function show($id)
{
$article = Article::findOrFail($id);
// return a single article
// return new ArticleResource(Article::findOrFail($id));
return view('articles.show', compact('article'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Resource $resource)\n {\n // not available for now\n }",
"public function show(Resource $resource)\n {\n //\n }",
"function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }",
"private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }",
"function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}",
"public function show(ResourceSubject $resourceSubject)\n {\n //\n }",
"public function show(ResourceManagement $resourcesManagement)\n {\n //\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function retrieve(Resource $resource);",
"public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }",
"public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function show(Dispenser $dispenser)\n {\n //\n }",
"public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }",
"public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}",
"public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }",
"function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}",
"public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }",
"public function get(Resource $resource);",
"public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }",
"public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }",
"function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}",
"public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }",
"function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}",
"public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function show(rc $rc)\n {\n //\n }",
"public function show(Resolucion $resolucion)\n {\n //\n }",
"public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show(Resena $resena)\n {\n }",
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }",
"public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}",
"public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }",
"public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }",
"public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }",
"public function display()\n\t{\n\t\tparent::display();\n\t}",
"public function get_resource();",
"public function show()\n\t{\n\t\t\n\t}",
"function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}",
"public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }",
"public function display($title = null)\n {\n echo $this->fetch($title);\n }",
"public function display(){}",
"public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}",
"public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}",
"public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }",
"#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}",
"public function display() {\n echo $this->render();\n }",
"public function show($id)\n\t{\n\t//\n\t}",
"public function show($id)\n\t{\n\t//\n\t}",
"function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }",
"public function show($id)\n {\n //\n $this->_show($id);\n }",
"public function show()\n\t{\n\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {}",
"static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}",
"public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}",
"public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }",
"public abstract function display();",
"abstract public function resource($resource);",
"public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show(Response $response)\n {\n //\n }",
"public function show()\n {\n return auth()->user()->getResource();\n }",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}"
] | [
"0.8233718",
"0.8190437",
"0.6828712",
"0.64986944",
"0.6495974",
"0.6469629",
"0.6462615",
"0.6363665",
"0.6311607",
"0.62817234",
"0.6218966",
"0.6189695",
"0.61804265",
"0.6171014",
"0.61371076",
"0.61207956",
"0.61067593",
"0.6105954",
"0.6094066",
"0.6082806",
"0.6045245",
"0.60389996",
"0.6016584",
"0.598783",
"0.5961788",
"0.59606946",
"0.5954321",
"0.59295714",
"0.59182066",
"0.5904556",
"0.59036547",
"0.59036547",
"0.59036547",
"0.5891874",
"0.58688277",
"0.5868107",
"0.58676815",
"0.5851883",
"0.58144855",
"0.58124036",
"0.58112013",
"0.5803467",
"0.58012545",
"0.5791527",
"0.57901084",
"0.5781528",
"0.5779676",
"0.5757105",
"0.5756208",
"0.57561266",
"0.57453394",
"0.57435393",
"0.57422745",
"0.5736634",
"0.5736634",
"0.5730559",
"0.57259274",
"0.5724891",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5718969",
"0.5713412",
"0.57091093",
"0.5706405",
"0.57057405",
"0.5704541",
"0.5704152",
"0.57026845",
"0.57026845",
"0.56981397",
"0.5693083",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962"
] | 0.0 | -1 |
Show the form for editing the specified resource. | public function edit($id)
{
$article = Article::findOrFail($id);
return view('articles.edit', compact('article'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function edit()\n {\n return view('hirmvc::edit');\n }",
"public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}",
"public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }",
"public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}",
"public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }",
"public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }",
"private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }",
"public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }",
"public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}",
"public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }",
"public function edit($model, $form);",
"function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}",
"public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}",
"public function edit()\n { \n return view('admin.control.edit');\n }",
"public function edit(Form $form)\n {\n //\n }",
"public function edit()\n {\n return view('common::edit');\n }",
"public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\r\n {\r\n return view('petro::edit');\r\n }",
"public function edit($id)\n {\n // show form edit user info\n }",
"public function edit()\n {\n return view('escrow::edit');\n }",
"public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }",
"public function edit()\n {\n return view('commonmodule::edit');\n }",
"public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit(form $form)\n {\n //\n }",
"public function actionEdit($id) { }",
"public function edit()\n {\n return view('admincp::edit');\n }",
"public function edit()\n {\n return view('scaffold::edit');\n }",
"public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }",
"public function edit()\n {\n return view('Person.edit');\n }",
"public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }",
"public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}",
"public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }",
"public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}",
"public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }",
"public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }",
"public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }",
"function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}",
"public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"protected function _edit(){\n\t\treturn $this->_editForm();\n\t}",
"public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }",
"public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }",
"public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}",
"public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}",
"public function edit($id)\n {\n return view('models::edit');\n }",
"public function edit()\n {\n return view('home::edit');\n }",
"public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }",
"public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }",
"public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }",
"public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('consultas::edit');\n }",
"public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }",
"public function edit()\n {\n return view('dashboard::edit');\n }",
"public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }",
"public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }",
"public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }",
"public function edit() {\n return view('routes::edit');\n }",
"public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }",
"public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('cataloguemodule::edit');\n }",
"public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }",
"public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }",
"public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }",
"public function edit()\n {\n return view('website::edit');\n }",
"public function edit()\n {\n return view('inventory::edit');\n }",
"public function edit()\n {\n return view('initializer::edit');\n }",
"public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }",
"public function edit($id)\n {\n return view('backend::edit');\n }",
"public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }",
"public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }",
"public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}",
"public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }",
"public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }",
"public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }",
"public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }",
"public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}"
] | [
"0.78550774",
"0.7692893",
"0.7273195",
"0.7242132",
"0.7170847",
"0.70622855",
"0.7053459",
"0.6982539",
"0.69467914",
"0.6945275",
"0.6941114",
"0.6928077",
"0.69019294",
"0.68976134",
"0.68976134",
"0.6877213",
"0.68636996",
"0.68592185",
"0.68566656",
"0.6844697",
"0.68336326",
"0.6811471",
"0.68060875",
"0.68047357",
"0.68018645",
"0.6795623",
"0.6791791",
"0.6791791",
"0.6787701",
"0.67837197",
"0.67791027",
"0.677645",
"0.6768301",
"0.6760122",
"0.67458534",
"0.67458534",
"0.67443407",
"0.67425704",
"0.6739898",
"0.6735328",
"0.6725465",
"0.6712817",
"0.6693891",
"0.6692419",
"0.6688581",
"0.66879624",
"0.6687282",
"0.6684741",
"0.6682786",
"0.6668777",
"0.6668427",
"0.6665287",
"0.6665287",
"0.66610634",
"0.6660843",
"0.66589665",
"0.66567147",
"0.66545695",
"0.66527975",
"0.6642529",
"0.6633056",
"0.6630304",
"0.6627662",
"0.6627662",
"0.66192114",
"0.6619003",
"0.66153085",
"0.6614968",
"0.6609744",
"0.66086483",
"0.66060555",
"0.6596137",
"0.65950733",
"0.6594648",
"0.65902114",
"0.6589043",
"0.6587102",
"0.65799844",
"0.65799403",
"0.65799177",
"0.657708",
"0.65760696",
"0.65739626",
"0.656931",
"0.6567826",
"0.65663105",
"0.65660435",
"0.65615267",
"0.6561447",
"0.6561447",
"0.65576506",
"0.655686",
"0.6556527",
"0.6555543",
"0.6555445",
"0.65552044",
"0.65543956",
"0.65543705",
"0.6548264",
"0.65475875",
"0.65447706"
] | 0.0 | -1 |
Update the specified resource in storage. | public function update(ArticlesRequest $request, $id)
{
// update an article
$article = Article::findOrFail($id);
$article->title = $request->input('title');
$article->body = $request->input('body');
// create new image
if ($file = $request->file('image')) {
$name = uniqid('threedium_', true).'.'.$file->getClientOriginalExtension();
\Image::make($file)->save(public_path('images/').$name);
$article->image = $name;
}
if ($article->update()) {
return redirect()->back()->with('success', 'Article updated successfully!');
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }",
"public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }",
"public function update(Request $request, Resource $resource)\n {\n //\n }",
"public function updateStream($resource);",
"public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }",
"protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }",
"public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }",
"public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}",
"public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }",
"public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }",
"protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }",
"public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }",
"public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }",
"public function update($path);",
"public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }",
"public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }",
"public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}",
"public function updateStream($path, $resource, Config $config)\n {\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }",
"public function update($data) {}",
"public function update($data) {}",
"public function putStream($resource);",
"public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function update($entity);",
"public function update($entity);",
"public function setResource($resource);",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }",
"public function isUpdateResource();",
"public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }",
"public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }",
"public function store($data, Resource $resource);",
"public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }",
"public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }",
"public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }",
"public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }",
"public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }",
"public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }",
"public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }",
"public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }",
"public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }",
"public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }",
"public function update(Qstore $request, $id)\n {\n //\n }",
"public function update(IEntity $entity);",
"public function update($request, $id);",
"protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }",
"function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}",
"public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }",
"protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }",
"public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }",
"abstract public function put($data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function testUpdateSupplierUsingPUT()\n {\n }",
"public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }",
"public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }",
"public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }",
"public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }",
"public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }",
"public abstract function update($object);",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }",
"public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }",
"public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }",
"public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }",
"public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }",
"public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }",
"public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }",
"public function update($entity)\n {\n \n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }",
"public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }",
"public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }",
"public function update($id, $input);",
"public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }",
"public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}",
"public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }",
"public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }",
"public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }",
"public function update($id);",
"public function update($id);",
"public function put($path, $data = null);",
"public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }",
"private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }",
"public function update(Entity $entity);",
"public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }",
"public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }",
"public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }",
"public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }",
"public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }",
"public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }"
] | [
"0.7423347",
"0.70622426",
"0.70568657",
"0.6896551",
"0.65835553",
"0.64519453",
"0.6348333",
"0.6212436",
"0.61450946",
"0.6122591",
"0.6114199",
"0.6101911",
"0.60876113",
"0.60528636",
"0.60177964",
"0.6006609",
"0.59725446",
"0.594558",
"0.59395295",
"0.5938792",
"0.5893703",
"0.5862337",
"0.58523124",
"0.58523124",
"0.5851579",
"0.5815571",
"0.58067423",
"0.5750728",
"0.5750728",
"0.5736541",
"0.5723664",
"0.5715135",
"0.56949675",
"0.5691129",
"0.56882757",
"0.5669375",
"0.5655524",
"0.56517446",
"0.5647158",
"0.5636521",
"0.563466",
"0.5632965",
"0.56322825",
"0.56291395",
"0.56202215",
"0.56087196",
"0.56020856",
"0.5591966",
"0.5581127",
"0.5581055",
"0.558085",
"0.5575458",
"0.55706805",
"0.55670804",
"0.55629116",
"0.5562565",
"0.5558853",
"0.5558505",
"0.5558505",
"0.5558505",
"0.5558505",
"0.5558505",
"0.555572",
"0.5555007",
"0.5553948",
"0.5553837",
"0.5553147",
"0.55429846",
"0.5541925",
"0.5540208",
"0.5539145",
"0.5536157",
"0.55350804",
"0.5534241",
"0.5523782",
"0.5518406",
"0.55147856",
"0.5513397",
"0.550961",
"0.55072165",
"0.55067354",
"0.5503418",
"0.5501671",
"0.55010796",
"0.54998124",
"0.5497327",
"0.54942787",
"0.54942036",
"0.54942036",
"0.54935455",
"0.549267",
"0.5491964",
"0.5489983",
"0.54833627",
"0.54794145",
"0.5478835",
"0.5478348",
"0.5465178",
"0.54648995",
"0.54607797",
"0.54571307"
] | 0.0 | -1 |
Remove the specified resource from storage. | public function destroy($id)
{
$article = Article::findOrFail($id);
if ($article->delete()) {
return new ArticleResource($article);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }",
"public function destroy(Resource $resource)\n {\n //\n }",
"public function removeResource($resourceID)\n\t\t{\n\t\t}",
"public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }",
"public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }",
"public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }",
"public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }",
"protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }",
"public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }",
"public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }",
"public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}",
"public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}",
"public function delete(): void\n {\n unlink($this->getPath());\n }",
"public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }",
"public function remove($path);",
"function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}",
"public function delete(): void\n {\n unlink($this->path);\n }",
"private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }",
"public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function remove() {}",
"public function remove() {}",
"public function remove();",
"public function remove();",
"public function remove();",
"public function remove();",
"function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}",
"public function deleteImage(){\n\n\n Storage::delete($this->image);\n }",
"public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }",
"public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}",
"public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }",
"public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }",
"public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}",
"public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }",
"public function deleteImage(){\n \tStorage::delete($this->image);\n }",
"public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }",
"public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }",
"public function destroy($id)\n {\n Myfile::find($id)->delete();\n }",
"public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }",
"public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }",
"public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }",
"public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }",
"public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }",
"public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }",
"public function delete($path);",
"public function delete($path);",
"public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }",
"public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }",
"public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }",
"public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }",
"public function delete($path, $data = null);",
"public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }",
"public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }",
"public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }",
"public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }",
"public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }",
"public function del($path){\n\t\treturn $this->remove($path);\n\t}",
"public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }",
"public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}",
"public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }",
"public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }",
"public function revoke($resource, $permission = null);",
"public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }",
"function delete($path);",
"public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}",
"public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }",
"public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }",
"public function remove($filePath){\n return Storage::delete($filePath);\n }",
"public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }",
"public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }",
"public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }",
"public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }",
"function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }",
"public function remove($id);",
"public function remove($id);",
"public function deleted(Storage $storage)\n {\n //\n }",
"public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }",
"public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }",
"public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }",
"public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }",
"function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}",
"public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }",
"public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}",
"public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }",
"public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }"
] | [
"0.6672584",
"0.6659381",
"0.6635911",
"0.6632799",
"0.6626075",
"0.65424126",
"0.65416265",
"0.64648265",
"0.62882507",
"0.6175931",
"0.6129922",
"0.60893893",
"0.6054415",
"0.60428125",
"0.60064924",
"0.59337646",
"0.5930772",
"0.59199584",
"0.5919811",
"0.5904504",
"0.5897263",
"0.58962846",
"0.58951396",
"0.58951396",
"0.58951396",
"0.58951396",
"0.5880124",
"0.58690923",
"0.5863659",
"0.5809161",
"0.57735413",
"0.5760811",
"0.5753559",
"0.57492644",
"0.5741712",
"0.57334286",
"0.5726379",
"0.57144034",
"0.57096",
"0.5707689",
"0.5705895",
"0.5705634",
"0.5703902",
"0.5696585",
"0.5684331",
"0.5684331",
"0.56780374",
"0.5677111",
"0.5657287",
"0.5648262",
"0.5648085",
"0.5648012",
"0.5640759",
"0.5637738",
"0.5629985",
"0.5619264",
"0.56167465",
"0.5606877",
"0.56021434",
"0.5601949",
"0.55992156",
"0.5598557",
"0.55897516",
"0.5581397",
"0.5566926",
"0.5566796",
"0.55642897",
"0.55641",
"0.5556583",
"0.5556536",
"0.5550097",
"0.5543172",
"0.55422723",
"0.5540013",
"0.5540013",
"0.55371785",
"0.55365825",
"0.55300397",
"0.552969",
"0.55275744",
"0.55272335",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.5525997",
"0.5525624",
"0.5523911",
"0.5521122",
"0.5517412"
] | 0.0 | -1 |
Finds user by username | public static function findByUsername($username)
{
return static::findOne(['username' => $username, 'status' => self::STATUS_ACTIVE]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function findUserByUsername($username);",
"public function findUserByUsername($username);",
"public function findUserByUsername($username);",
"public function fetchUserByUserName($username);",
"public function getUserWithUsername($username);",
"private static function _FindUserByUsername(string $username) {\r\n \r\n $db = DbClass::getInstance();\r\n \r\n $sql = 'SELECT * FROM users WHERE username=:username';\r\n $data = [':username' => $username];\r\n\r\n $query_st = $db->singleQueryRetStatement($sql, $data);\r\n\r\n $user = $query_st->fetchObject('User');\r\n \r\n return $user;\r\n }",
"public function findByUsername(string $username);",
"function Find($username='')\n\t{\n\t\tif (!$username) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$this->GetDb();\n\n\t\t$query = \"SELECT userid FROM [|PREFIX|]users WHERE username='\" . $this->Db->Quote($username) . \"'\";\n\t\t$result = $this->Db->Query($query);\n\t\tif (!$result) {\n\t\t\tlist($error, $level) = $this->Db->GetError();\n\t\t\ttrigger_error($error, $level);\n\t\t\treturn false;\n\t\t}\n\t\t$row = $this->Db->Fetch($result);\n\t\tif (empty($row)) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $row['userid'];\n\t}",
"public static function findByUsername($username)\n {\n $user = User::find()->where(['username' => $username])->one();//I don't know if this is correct i am //checing value 'becky' in username column of my user table.\n return $user;\n }",
"public function findUserByName($username) {\n /** @var User $user */\n $user = $this->findOneBy([\"name\" => $username]);\n return $user;\n }",
"protected function findUser($username)\n {\n return $this->findUserByUsernameOrEmail($username);\n }",
"public function find($username) {\n $sql = \"select * from user where user_id=?\";\n $row = $this->getDb()->fetchAssoc($sql, array($username));\n\n if ($row)\n return $this->buildDomainObject($row);\n else\n throw new UsernameNotFoundException(sprintf('User \"%s\" not found.', $username));\n }",
"function search($username) {\n $user = $this->user->getByUsername($username);\n\n //if not exists on database, search on api\n if($user === null) {\n $url = 'https://api.github.com/users/' . $username;\n $output = self::makeRequest($url);\n\n return $this->user->create(json_decode($output, true));\n } else {\n //return the user on database using get method\n return $user;\n }\n }",
"public function loadUserByUsername($username);",
"public static function findByUsername($username)\n\t{\n\t\t//Yii::info('+ BaseUser::findByUsername() username: '.$username);\n\t\t// checks if $username fits saved username \n\t\t$userByName = self::find()->where(['username' => $username])->one();\n\t\tif (isset($userByName)) {\n\t\t\t//Yii::info('- BaseUser::findByUsername() found user: '.$userByName->id.' name:'.$userByName->username);\n\t\t\treturn $userByName;\n\t\t}\n\t\t\n\t\t// checks if $username fits saved mail address \n\t\t$userByMail = self::find()->where(['email' => $username])->one();\n\t\tif (isset($userByMail)) {\n\t\t\t//Yii::info('- BaseUser::findByUsername() found user: '.$userByMail->id.' mail:'.$userByMail->email);\n\t\t\treturn $userByMail;\n\t\t}\n\t\t\n\t\t//Yii::info('- BaseUser::findByUsername() NOT found!');\n\t\treturn null;\n\t}",
"public function findUserByUsername($username)\n {\n return $this->findUser(['username' => $username])->one();\n }",
"public static function GetByUserName ($userName);",
"function get_user_by_username($username) {\n $read_json = file_get_contents(__DIR__ . '/data_users.json');\n $data = json_decode($read_json, JSON_OBJECT_AS_ARRAY);\n\n // iterate over db, if username is found, return user\n foreach ($data as $user){\n if ($user[\"username\"] == $username){\n return $user;\n }\n }\n return false;\n}",
"function cicleinscription_get_user_by_username($username){\n\tglobal $DB;\n\treturn $DB->get_record('user', array('username'=>$username));\n}",
"static public function find_by_username($userName, $password) {\n\t$sql = \"SELECT * FROM \" . static::$table_name;\n\t$sql .= \" WHERE userName='\" . self::$database->escape_string($userName) . \"' AND password='\" . self::$database->escape_string($password) . \"'\";\n\t$obj_array = static::find_by_sql($sql);\n\tif(!empty($obj_array)){\n\t\treturn array_shift($obj_array);\n\n\t} else {\n\t\treturn false;\n\t}\n}",
"public function loadUserByUsername($username)\n { \n $user = $this->_em->getRepository('Entity\\User\\User')->findOneBy(array('username' => $username));\n\n if($user != null)\n return $user;\n\n throw new UsernameNotFoundException(\"Compte introuvable\");\n }",
"public function findUserByUsername($username)\n {\n $this->db->query('SELECT * FROM user WHERE username = :username');\n $this->db->bind(':username', $username);\n $row = $this->db->single();\n if($this->db->rowCount() > 0){\n return true;\n }else{\n return false;\n }\n }",
"public function find_user_with_username($username)\n {\n $result = array(\n \"status\" => \"\",\n \"body\" => array(),\n \"error\" => array()\n );\n $stmt = $this->db->prepare(\"SELECT * FROM users WHERE username LIKE ?\");\n if (!($stmt))\n {\n trigger_error(\"Prepare failed: (\" . $this->db->errno . \") \" . $this->db->error,\n E_USER_ERROR);\n }\n if (!$stmt->bind_param('s', $username)){\n trigger_error(\"Binding parameters failed: (\" . $stmt->errno . \") \" . $stmt->error,\n E_ERROR);\n }\n if (!$stmt->execute()) {\n trigger_error(\"Execute failed: (\" . $stmt->errno . \") \" . $stmt->error,\n E_CORE_ERROR);\n $result[\"error\"] = $stmt->error;\n }\n $res = $stmt->get_result();\n $row = $res->fetch_assoc();\n if ($row[\"id\"] != null){\n $result[\"status\"] = \"Query successful\";\n $result[\"body\"] = array(\n \"user\" => array(\n \"id\" => $row[\"id\"],\n \"url\" => $row[\"url\"],\n \"username\" => $row[\"username\"],\n \"email\" => $row[\"email\"],\n \"firstName\" => $row[\"firstName\"],\n \"lastName\" => $row[\"lastName\"],\n \"fullName\" => $row[\"fullName\"],\n \"bio\" => $row[\"bio\"],\n \"isAdmin\" => $row[\"isAdmin\"],\n \"password\" => $row[\"password\"],\n \"created\" => $row[\"created\"],\n \"lastUpdated\" => $row[\"lastUpdated\"]\n )\n );\n return $result;\n } else {\n $result['status'] = \"No user with that username exists\";\n }\n return $result;\n }",
"public function findUserByUsername($username) {\n $this->db->query('SELECT * FROM users WHERE username = :username');\n\n // Bind value\n $this->db->bind(':username', $username);\n\n $row = $this->db->single();\n\n // Check row\n if($this->db->rowCount() > 0){\n return true;\n } else {\n return false;\n }\n }",
"public function retrieveByUsername($username);",
"public function getUser($username){\n return $this->findOneByName($username);\n }",
"public function GetByUsername($username);",
"function get_user_by_username($username) {\n\t\t$this->db->where('LOWER(username)=', strtolower($username));\n\n\t\t$query = $this->db->get($this->table_name);\n\t\tif ($query->num_rows() == 1) {\n\t\t\treturn $query->row();\n\t\t}\n\n\t\treturn NULL;\n\t}",
"function lookupUser($username)\n { \n try {\n $connection = Doctrine_Manager::connection();\n $query = \"SELECT username, access_token FROM constant_contact WHERE username='\".$username.\"' ORDER BY id DESC LIMIT 1\";\n $statement = $connection->execute($query);\n $statement->execute();\n\n $resultset = $statement->fetch(PDO::FETCH_OBJ);\n \n if (empty($resultset)) {\n $returnUser = false;\n throw new Exception('Username '.$username.' not found in datastore');\n }\n else {\n $fields = array();\n foreach ($resultset as $k => $v) $fields[$k] = $v;\n $returnUser = $fields;\n }\n\n }\n catch(Exception $e) {\n echo 'OAuth Exception: '.$e->getMessage();\n }\n return $returnUser;\n }",
"public static function findByUsername($username)\n {\n return static::findOne(['username' => $username]);\n //return $userInfo = UserInfo::findOne(['user_name' => $username]);\n// if(!empty($userInfo)){\n// return User::findOne(['user_no' => $userInfo->usr_no]);\n// }\n// return null;\n /*\n if(!empty($userInfo)){\n $user_no = $userInfo->usr_no;\n }\n\n return static::findOne(['usr_nm' => $username]);\n */\n /*\n foreach (self::$users as $user) {\n if (strcasecmp($user['username'], $username) === 0) {\n return new static($user);\n }\n }\n\n return null;\n */\n }",
"public function findByUserName(String $username): User;",
"function getUserByUsername($username, $users)\n {\n foreach ($users as $user)\n {\n if ($user['username'] == $username)\n {\n return $user;\n }\n }\n return NULL;\n }",
"public static function findByUsername($username)\n {\n // mencari user berdasarkan username dan yang dicari haya 1\n $user = TbUser::find()->where(['username' => $username])->one();\n\n if ($user != null) {\n return $user;\n }else{\n return null;\n }\n }",
"function getUserByName($username) {\n $sql = \"select * from users where username = :username\";\n try {\n $stmnt = $this->conn->prepare($sql);\n $params = [\n 'username' => $username\n ];\n $stmnt->execute($params);\n return $stmnt->fetch();\n }\n Catch (PDOException $e) {\n $e = new ErrorView([\n 'message' => $e->getMessage(),\n 'code' => $e->getCode()\n ]);\n }\n }",
"public static function findByUsername($username)\n {\n return User::findOne(['username' => $username]);\n\n }",
"public function selectUserbyName($username){\n\n $this->result = @$this->dbConnection->query(\"SELECT * FROM Users WHERE User_name = '$username' \");\n if(!$this->result)\n {\n die('Could not retrieve records from the CMS Database: ' .\n $this->dbConnection->error);\n }\n\n }",
"function FindUser($User) {\n $User = str_replace('ZZ ', '', $User);\n\n //separa o primeiro nome do sobrenome\n $name_complete = explode(' ', $User);\n $user_name = array_shift($name_complete);\n $user_lastname = implode(' ', $name_complete);\n\n $Read = new WsUsers();\n\n $Read->setUser_name($user_name);\n $Read->setUser_lastname($user_lastname);\n $Result = $Read->Execute()->Query(\"user_name like '%{$user_name}%' AND user_lastname like '%{$user_lastname}%'\");\n\n if (!empty($Result)):\n return $Result[0]->user_id;\n endif;\n}",
"public function findUserByUsernameOrEmail($usernameOrEmail);",
"public function findUserByUsernameOrEmail($usernameOrEmail);",
"public function findUserByUsernameOrEmail($usernameOrEmail);",
"function people_findByUsername ($username) {\n $response = $this->execute(array('method' => 'flickr.people.findByUsername', 'username' => $username));\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['user']['nsid'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn NULL;\n\t\t}\n\t}",
"public static function findByUsername($username)\n { \n return static::findOne(['login' => $username]);\n //(RegisterForm::find()->andWhere('login=:login',[':login'=>$username])->one()){\n }",
"public function loadUserByUsername($username)\n {\n $user = $this->em->getRepository('AppBundle:User')->findOneBy([\"fullname\"=>$username]);\n if (!$user){\n throw new UsernameNotFoundException(\"User not found\");\n }\n\n return $user;\n }",
"public function search_by_username($username) {\n\n // first, get all users\n $method = \"users.list\";\n $payload = array();\n $result = $this->apicall($method, $payload);\n $users = $result['members'];\n\n $this->debug(\"userlist.json\", json_encode($users));\n\n $key = array_search($username, array_column($users, 'name'));\n\n $this->debug(\"user.json\", json_encode($users[$key]));\n\n return $users[$key];\n\n\n }",
"protected function getUserByName(string $username)\n {\n if (! $user = User::whereUsername($username)->first()) {\n abort(404, \"User ${username} not found\");\n }\n return $user;\n }",
"public function findUserByUsernameOrThrowException($username);",
"public function findById($id) {\n $sql = \"select * from user where user_id=?\";\n $row = $this->getDb()->fetchAssoc($sql, array($id));\n\n if ($row)\n return $this->buildDomainObject($row);\n else\n throw new UsernameNotFoundException(sprintf('User \"%s\" not found.', \"log error\"));\n }",
"public function findForPassport($username): User\n {\n return $this->where('firstname', $username)->first();\n }",
"public static function findByUsername($username) {\n// foreach (self::$users as $user) {\n// if (strcasecmp($user['username'], $username) === 0) {\n// return new static($user);\n// }\n// }\n\n return static::findOne(['username' => $username]);\n }",
"public function loadUserByUsername($username)\n {\n }",
"public function findUserByUsername( $username ) {\n\t\t$user = $this->em->getRepository( $this->classes[Configuration::USER] )->findOneBy( [ 'username' => $username ] );\n\n\t\treturn $user;\n\t}",
"public function findUser(){\n\t\t$val = $_POST['user'];\n\n $pieces = explode(\" \", $val);\n\t\tif(count($pieces) > 1){\n\n\t\t\t$sql = \"SELECT * FROM user WHERE fname=:fn AND lname=:ln\";\n if($stmt = $this->_db->prepare($sql)){\n $stmt->bindParam(\":fn\", $pieces[0], PDO::PARAM_STR);\n $stmt->bindParam(\":ln\", $pieces[1], PDO::PARAM_STR);\n $stmt->execute();\n\n }\n else{\n return \"Something went wrong deleting the user.\";\n }\n\n\t\t}\n\t\telse{\n\t\t\t$sql = \"SELECT * FROM user WHERE uname=:u\";\n\n if($stmt = $this->_db->prepare($sql)){\n $stmt->bindParam(\":u\", $pieces[0], PDO::PARAM_STR);\n\n $stmt->execute();\n }\n else{\n return \"Something went wrong deleting the user.\";\n }\n\t\t}\n\t\tif($stmt->rowCount()>0){\n \t$row = $stmt->fetch();\n\n \theader(\"Location: /yumme/userprofile.php?u=\".$row['UID'].\"&uname=\".$row['UName']);\n\n\t\t}\n\t\telse{\n\t\t\theader(\"Location: /yumme/index.php\");\n\t\t}\n\n\t}",
"public function getByUsername($username) {\n\n\t\t// get database\n\t\t$db = $this->app->database;\n\n\t\t// search username\n\t\tif ($id = $db->queryResult('SELECT id FROM #__users WHERE username = '.$db->Quote($username))) {\n\t\t\treturn $this->get($id);\n\t\t}\n\n\t\treturn null;\n\t}",
"public function loadUserByUsername($username)\n {\n $sql = \"select * from user where user_email=?\";\n $row = $this->getDb()->fetchAssoc($sql, array($username));\n\n if ($row)\n return $this->buildDomainObject($row);\n else\n throw new UsernameNotFoundException(sprintf('User \"%s\" not found.', $username));\n }",
"public function getByUsername($username)\r\n {\r\n }",
"private function /*bool*/ findUsername(/*string*/ $name) {\n\t\t$variations = array(\n\t\t\t$name,\n\t\t\tstrtolower($name[0]) . substr($name, 1),\n\t\t\tstr_replace(\" \", \"_\", $name),\n\t\t);\n\n\t\t$crowd = $this->getCrowd();\n\t\tforeach ($variations as $v) {\n\t\t\ttry {\n\t\t\t\t$crowd->findPrincipalByName(array(\"in0\" => $this->token, \"in1\" => $v));\n\t\t\t\treturn $v;\n\t\t\t} catch (Exception $e) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}",
"function getUserByName($username)\n {\n return $this->data->getUserByName($username);\n }",
"public function findUserById($id)\n {\n $sql = \"SELECT rowid, * FROM USER WHERE rowid=?\";\n $row = $this->getDb()->fetchAssoc($sql, array($id));\n if ($row){\n return $this->buildDomainObject($row);\n }else{\n throw new UsernameNotFoundException('User not found.');\n }\n }",
"private static function usernameExists($username) {\n return \\Drupal::entityQuery('user')->condition('name', $username)->execute();\n }",
"public static function findByUsername($username) {\n $status_active = Status::getActive();\n\n if (strpos($username, '@')) {\n return self::findWithCheckOrganizationStatus(static::find()->where(['email' => $username, 'status' => $status_active])->limit(1)->one());\n // return self::findWithCheckOrganizationStatus(static::findOne(['email' => $username, 'status' => $status_active]));\n // return static::findOne(['email' => $username, 'status' => $status_active]);\n }\n\n if (strlen($username) > self::MAGIC_USERID_LEN) {\n $u_part = substr($username, -self::MAGIC_USERID_LEN);\n $o_part = substr($username, 0, strlen($username) - self::MAGIC_USERID_LEN);\n $user_id = 1 * $u_part;\n $org_id = 1 * $o_part;\n $sql = \"SELECT {{users}}.* FROM {{users}}\n INNER JOIN {{org_employees}} ON {{org_employees}}.[[user_id]] = {{users}}.[[id]]\n WHERE {{users}}.[[id]] = :user_id AND {{org_employees}}.[[org_id]] = :org_id\n AND {{users}}.[[status]] = :status_active AND {{org_employees}}.[[status]] = :status_active\";\n // return static::findBySql($sql, [':user_id' => $user_id, ':org_id' => $org_id,\n // ':status_active' => $status_active])->limit(1)->one();\n return self::findWithCheckOrganizationStatus(static::findBySql($sql, [':user_id' => $user_id, ':org_id' => $org_id,\n ':status_active' => $status_active])->limit(1)->one());\n }\n\n $user_id = 1 * $username;\n\n // return json_encode(static::findOne(['id' => $user_id, 'status' => $status_active]));\n return self::findWithCheckOrganizationStatus(static::findOne(['id' => $user_id, 'status' => $status_active]));\n }",
"public function findUserByUsername($username)\n {\n /** @var UserInterface|null $result */\n $result = $this->createClass()\n ->newQuery()\n ->where($this->username, '=', $username)\n ;\n\n return $result;\n }",
"function auth_user_exists($username)\n{\n return dbFetchCell(\"SELECT * FROM `users` WHERE `username` = ?\", array($username));\n}",
"public static function findByUsername($username)\n {\n $db = Base::getConnection();\n\n $stmt = $db->prepare(\"SELECT * FROM users WHERE username=:username ;\");\n $stmt->bindParam(\":username\", $username, PDO::PARAM_STR);\n $stmt->execute();\n\n $response = $stmt->fetch();\n\n if ($response) {\n $u = new User();\n $u->id = $response['user_id'];\n $u->username = $response['username'];\n $u->password = $response['password'];\n $u->email = $response['email'];\n $u->setIsVisitor(false);\n $stmt->closeCursor();\n return $u;\n } else {\n return false;\n }\n }",
"public function loadUserByUsername($username)\n {\n /** @var User $user */\n $user = $this->getUserRepository()->findOneBy(['username' => $username]);\n\n if (!$user ) {\n throw new UsernameNotFoundException();\n }\n\n return $user;\n }",
"public static function retrieveByUsername( $username ){\r\n \r\n return UserQuery::create()\r\n ->usesfGuardUserQuery()\r\n ->filterByUsername( $username )\r\n ->endUse()\r\n ->findOne();\r\n\r\n }",
"public static function findByUsername($username)\n {\n return static::findOne(['usuario' => $username]);\n }",
"public static function fetchByUsername($name)\r\n {\r\n //$sessionClass = $this->sessionTypeArray[$sessionType];\r\n //$destroyOld = false;\r\n self::sanitizeArguments($name, self::SANITIZE_STRING);\r\n $db = self::$database;\r\n $query = \"\tSELECT\r\n\t\t\t\t\t\t\"\r\n . self::BASIC_FIELDS .\r\n \"\r\n\t\t\t\t\tFROM \tusers\r\n\t\t\t\t\tWHERE \tusername ='$name'\r\n\t\t\t\t\t\";\r\n\r\n\r\n $result = $db->db_query_error_check($query);\r\n\r\n if(!$db->db_num_rows($result)) {\r\n return null;\r\n }\r\n\r\n $userRow = $db->db_fetch_assoc($result);\r\n\r\n $userID = $userRow['id'];\r\n return new User($userID, $userRow);\r\n }",
"static public function getUser($username)\n {\n $user = User::where('username', $username)->first();\n if(!$user){\n $user = User::where('email', $username)->first();\n }\n return $user;\n }",
"public function getUserByUsername($username){\r\n\t\t$result = $this->query(\"SELECT * FROM user where username = '$username';\");\r\n\t\treturn $this->fetchSingleRow($result);\r\n\t}",
"static function searchUserByName() : string\n {\n return \"SELECT *\n FROM users\n WHERE LOCATE( :Name , nickname) > 0;\";\n }",
"public function loadUserByUsername($username)\n {\n return $this->repository->findByNickname($username)->getOrThrow(new UsernameNotFoundException());\n }",
"function getUserByUsername($username)\n {\n if($this->table_name == \"users\"){\n $query = \"SELECT * FROM users WHERE username = '{$username}'\";\n $result = $this->db_connect->query($query);\n if (!$result) {\n die(\"Unable to retrieve username: \" . $this->db_connect->error);\n } else {\n return $result->fetch_assoc();\n }\n }else{\n return null;\n }\n }",
"public static function findByUsername($username)\n {\n return static::findOne(['login_name' => $username]);\n }",
"public function getByUsername($username){\n $this->db->query(\"SELECT FROM tb_user WHERE username = :username\");\n\n $this->db->bind(\":username\", $username);\n\n $results = $this->db->single();\n\n return $results->user_id;\n }",
"function check_user($username)\n\t{\n\t\t$sql = \"\n\t\t\t\tSELECT *\n\t\t\t\tFROM users\n\t\t\t\tWHERE username = '$username'\n\t\t\t\tLIMIT 1\n\t\t\t\";\n\t\t$dbdata = $this->conn->prepare($sql);\n\t\t$dbdata->execute();\n\n\t\treturn $dbdata->fetchObject();\n\t}",
"public function retrieve($username);",
"function get_user_by_login($username)\r\n\t{\r\n\t\t\r\n\t\t$this->db->select('*');\r\n\t\t\r\n\t\t$this->db->where('username', $username);\r\n\t\t\r\n\t\t$this->db->where('status','Active');\r\n\t\t\r\n\t\t$query = $this->db->get($this->user_tbl);\t\r\n\t\t\r\n\t\tif($query->num_rows()==1)\r\n\t\t\r\n\t\t\treturn $query->row();\r\n\t\t\t\r\n\t\treturn NULL;\r\n\t\t\r\n\t}",
"protected function _findUser($username, $password = null) {\n $userModel = $this->settings['userModel'];\n\t\t$userModel = 'AdminUser.AdminUser';\n list($plugin, $model) = pluginSplit($userModel);\n $fields = $this->settings['fields'];\n\n $conditions = array(\n $model . '.' . $fields['username'] => $username\n );\n if (!empty($this->settings['scope'])) {\n $conditions = array_merge($conditions, $this->settings['scope']);\n }\n // $result = ClassRegistry::init($userModel)->find('first', array(\n\t $result = ClassRegistry::init($model)->find('first', array(\n 'conditions' => $conditions,\n 'recursive' => $this->settings['recursive']\n ));\n if (empty($result) || empty($result[$model])) {\n return false;\n }\n\n // If the user's password hash doesn't match the results, return false\n if (!static::check($password, $result[$model][$fields['password']])) {\n return false;\n }\n\n unset($result[$model][$fields['password']]);\n return $result[$model];\n }",
"public function findUserByUsername(string $username)\n {\n // test stub\n if (NO_DATABASE) {\n return $this->findUserByUsername_stub($username);\n }\n\n $sql = \"SELECT * FROM users WHERE user_name = ?\";\n $stmt = $this->db->prepare($sql);\n $stmt->execute([$username]);\n $result = $stmt->fetch(\\PDO::FETCH_ASSOC);\n if (!$result) {\n return false;\n }\n\n return new User(\n $result['user_id'],\n $result['user_name'],\n $result['password'],\n $result['role_id'],\n $result['createdAt']\n );\n }",
"public function loadUserByUsername($username)\n {\n return $this->createQueryBuilder('u')\n ->where('u.username = :username OR u.email = :email')\n ->setParameter('username', $username)\n ->setParameter('email', $username)\n ->getQuery()\n ->getOneOrNullResult();\n }",
"public static function findByUsername($username) \n {\n return self::where('username', $username)->first();\n }",
"public function getUserByName(string $username)\n {\n $sql = ('SELECT * FROM user WHERE pseudo = ?');\n $result = $this->sql($sql, [$username]);\n \n return $result->fetch();\n }",
"public function lookForUserByUsername($username)\n {\n self::connectToDB(); /* Using DB connection */\n\n $this->sql = \"SELECT username FROM users WHERE username = ?\";\n\n try\n {\n $this->query = $this->handler->prepare($this->sql);\n $this->query->execute(array($username));\n $this->result = $this->query->fetchAll(PDO::FETCH_ASSOC);\n\n /**\n * Closing DB connection\n */\n $this->query->closeCursor();\n $this->handler = null;\n\n return $this->result;\n }\n catch (Exception $e)\n {\n echo \"Error: query failure\";\n return false;\n }\n }",
"public static function findByUsername($username)\n {\n return static::findOne(['email' => $username]);\n }",
"function getUserId($user_name){\n return sqlSelectOne(\"SELECT * FROM users WHERE user_username='$user_name'\", 'user_id');\n}",
"private function findUser ($where) {\n return $this->db->extended->autoExecute(\n 'users',\n null, // SELECT queries do not need manipulation values\n MDB2_AUTOQUERY_SELECT,\n $where,\n null, true, true\n );\n }",
"function user_find_id($username) {\n $db = connectDB();\n \n // Look up user\n $stmt = $db->prepare('\n SELECT\n user_id\n FROM\n users\n WHERE\n username = :username\n LIMIT\n 1\n ;\n ');\n $stmt->execute([':username' => $username]);\n $rows = $stmt->fetchAll(PDO::FETCH_ASSOC);\n \n if (empty($rows)) {\n return NULL;\n } else {\n return $rows[0]['user_id'];\n }\n}",
"public function user_exists($username){\n\t\t$if_user_exists_query = \"SELECT username FROM appuser WHERE username = $1;\"; //make query\n\t\t$if_user = pg_prepare($this->con, \"my_query\", $if_user_exists_query); //prepare query\n\t\t$if_user = pg_execute($this->con, \"my_query\", array($username)); //execute query\n\t\treturn $if_user;\n\t\t}",
"public function fetchUserByUsername(string $username): ?User;",
"public static function findByUsername($username)\n {\n return static::findOne(['login' => $username]);\n }",
"public function findMemberByUsername(string $username)\n {\n if (! $this->members) {\n // This supports pagination in chunks of 1000 by setting the\n // 'after' parameter to the last member user id. I don't think\n // we need to worry about this yet.\n $this->members = $this->client->guild->listGuildMembers([\n 'guild.id' => $this->guildId,\n 'limit' => 1000,\n ]);\n }\n\n // Evolving Usernames on Discord\n // https://discord.com/blog/usernames\n // https://support-dev.discord.com/hc/en-us/articles/13667755828631\n //\n // They decided to remove the discriminator component and just\n // have a single username - this can be removed once they've\n // completed that change\n if (str_contains($username, '#')) {\n // A discord username is made up of the user's chosen username,\n // and a randomly generated discriminator. The discriminator\n // is a four digit number and the two are stuck together with\n // a # character.\n $parts = explode('#', $username);\n $userPart = $parts[0];\n $discrPart = (int) $parts[1];\n\n foreach ($this->members as $member) {\n if ($member->user->username == $userPart ||\n $member->user->discriminator == $discrPart) {\n return $member;\n }\n }\n } else {\n foreach ($this->members as $member) {\n if ($member->user->username == $username) {\n return $member;\n }\n }\n }\n\n return null;\n }",
"public function findByUsername($username)\n {\n $query = $this->createQuery();\n $query = $query->matching($query->equals('username', $username));\n $objects = $query->execute();\n\n return $objects->getFirst();\n }",
"public function getUser($username)\r\n {\r\n\r\n $stmt = $this->connection()->prepare(\"SELECT * FROM users WHERE username=? OR email=?\");\r\n \r\n $stmt->execute([$username,$username]);\r\n if($stmt->rowCount())\r\n {\r\n return true;\r\n }\r\n else{\r\n return false;\r\n }\r\n }",
"function retrieveUser($username) {\r\n // Database connection\r\n $db = dbConnect();\r\n\r\n $sql = 'SELECT * FROM User WHERE username=:username';\r\n $sth = $db->prepare($sql);\r\n $sth->execute(array(':username' => $username));\r\n\r\n return $sth->fetch();\r\n}",
"function loadUser($username)\n {\n\n // define all the global variables\n global $database;\n\n // escape the username string\n $username = $database->secureInput($username);\n // create a new instance of the User class\n $loadUser = new User();\n // initiate the instance with the requested username\n if (!($found = $loadUser->initInstance($username))) {\n return false;\n }\n // return the loaded user\n return $loadUser;\n }",
"public static function findById($id) {\n try {\n $db = Database::getInstance();\n $sql = \"SELECT * FROM `User` WHERE username = :username\";\n $stmt = $db->prepare($sql);\n $stmt->execute([\"username\" => $id]);\n \n if ($stmt->rowCount() === 0)\n return null;\n \n return new User($stmt->fetch(PDO::FETCH_ASSOC));\n } catch (PDOException $e) {\n exitError(500, \"Internal error.\");\n }\n }",
"public static function findByUsername($username)\n {\n return self::whereUserLogin($username)->first();\n }",
"public function loadUserByUsername($username)\n {\n $user = $this->repository->findOneBy(['username' => $username]);\n if (!$user) {\n throw new UsernameNotFoundException(\n sprintf('Username \"%s\" does not exist.', $username)\n );\n }\n\n return $user;\n }",
"public static function findByUsername($username)\n {\n// return null;\n }",
"public static function findByUsername($username)\n {\n return static::findOne(['username' => $username]);\n\n }",
"public static function getUsername($username)\n {\n return Usuario::find($username)->one();\n }"
] | [
"0.81629914",
"0.81629914",
"0.81629914",
"0.77969915",
"0.7698677",
"0.76939535",
"0.7664263",
"0.7611634",
"0.7537061",
"0.7513544",
"0.7408734",
"0.7398313",
"0.73971575",
"0.7397111",
"0.7388775",
"0.73147464",
"0.7293778",
"0.7248267",
"0.7241161",
"0.7216566",
"0.7213324",
"0.7202291",
"0.719483",
"0.71941924",
"0.71901804",
"0.7177847",
"0.71773225",
"0.71761775",
"0.7167459",
"0.71430486",
"0.7138729",
"0.70858246",
"0.7067349",
"0.70611554",
"0.7057799",
"0.70569754",
"0.7053096",
"0.70377105",
"0.70377105",
"0.70377105",
"0.7019965",
"0.70193934",
"0.69901866",
"0.69594306",
"0.69540495",
"0.6954005",
"0.6940639",
"0.69349104",
"0.6931073",
"0.6924525",
"0.69161516",
"0.69154125",
"0.6913214",
"0.6904681",
"0.6892984",
"0.68753815",
"0.6870056",
"0.68690497",
"0.6863125",
"0.68604416",
"0.68496144",
"0.6842235",
"0.6828864",
"0.68130577",
"0.6797127",
"0.67958754",
"0.67856014",
"0.6778191",
"0.67565966",
"0.67391",
"0.6735641",
"0.6729652",
"0.67200947",
"0.67058617",
"0.67055976",
"0.6699096",
"0.6696902",
"0.66904485",
"0.6686395",
"0.6682192",
"0.6671744",
"0.667027",
"0.6668544",
"0.6667623",
"0.66656166",
"0.6661211",
"0.66612077",
"0.6660641",
"0.6656437",
"0.6653325",
"0.6646169",
"0.6642728",
"0.6637156",
"0.66333586",
"0.66285247",
"0.6625108",
"0.66179174",
"0.6617439",
"0.6606644",
"0.66004467",
"0.6596008"
] | 0.0 | -1 |
Refund by out trade number. | public function byOutTradeNumber(string $number, string $refundNumber, int $totalFee, int $refundFee, array $optional = [])
{
return $this->refund($refundNumber, $totalFee, $refundFee, array_merge($optional, ['out_trade_no' => $number]));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function refund();",
"public function refund($url, $orderUUID, $amount);",
"abstract public function refund( Payment $payment );",
"public function refundOrder(Request $request)\n {\n $refund_data['merc_refund_ref_no'] = $request->merc_refund_ref_no;\n $refund_data['orderid'] = $request->orderid;\n $refund_data['transaction_id'] = $request->transaction_id;\n $refund_data['transaction_date'] = $request->transaction_date;\n $refund_data['refund_amount'] = $request->refund_amount;\n $refund_data['txn_amount'] = $request->txn_amount;\n\n $response = BilldeskHmac::refundOrder($refund_data);\n }",
"public function refundTransaction() {\n //not implemented\n }",
"public function BeanstreamRefund($paymentInfo=array()) {\t\r\n\t\t$amount=urlencode($paymentInfo['amount']);\t\t\r\n\t\t$transactionID=urlencode($paymentInfo['transactionID']);\r\n\t\t$orderno=urlencode($paymentInfo['orderno']);\t\t\t\r\n $currencyCode=strtolower($paymentInfo['currency']);\t\t\t\r\n\t\t$nvpStr = \"&trnType=R&trnOrderNumber=$orderno&adjId=$transactionID&trnAmount=$amount\";\t\t\r\n\t\t$resArray=$this->hash_call('ReturnType',$nvpStr,$currencyCode);\r\n\t\treturn $resArray;\r\n\t\t\r\n\t}",
"public function refund($options);",
"public function refund(Request $request)\n {\n $merchantAuthentication = new AnetAPI\\MerchantAuthenticationType();\n $merchantAuthentication->setName(env('ANET_API_LOGIN_ID'));\n $merchantAuthentication->setTransactionKey(env('ANET_TRANSACTION_KEY'));\n\n // Set the transaction's refId\n $refId = 'ref' . time();\n\n // Create the payment data for a credit card\n $creditCard = new AnetAPI\\CreditCardType();\n $creditCard->setCardNumber($request->cc_number);\n $creditCard->setExpirationDate($request->input('expiry_year') . \"-\" . $request->input('expiry_month'));\n\n $paymentOne = new AnetAPI\\PaymentType();\n $paymentOne->setCreditCard($creditCard);\n\n //create a transaction\n $transactionRequest = new AnetAPI\\TransactionRequestType();\n $transactionRequest->setTransactionType(\"refundTransaction\");\n $transactionRequest->setAmount($request->amount);\n $transactionRequest->setPayment($paymentOne);\n $transactionRequest->setRefTransId($request->transactionReference);\n\n\n $request = new AnetAPI\\CreateTransactionRequest();\n $request->setMerchantAuthentication($merchantAuthentication);\n $request->setRefId($refId);\n $request->setTransactionRequest($transactionRequest);\n $controller = new AnetController\\CreateTransactionController($request);\n $response = $controller->executeWithApiResponse(ANetEnvironment::PRODUCTION);\n\n if ($response != null) {\n $tresponse = $response->getTransactionResponse();\n if ($response->getMessages()->getResultCode() == \"Ok\") {\n if ($tresponse != null && $tresponse->getMessages() != null) {\n $message_text = $tresponse->getMessages()[0]->getDescription() . \", Response code: \" . $tresponse->getResponseCode() . \", Refund SUCCESS: \" . $tresponse->getTransId();\n $msg_type = \"successMessage\";\n return redirect()->route('orderList')->with($msg_type, $message_text);\n } else {\n $message_text = \"Transaction Failed\";\n $msg_type = \"errorMessage\";\n if ($tresponse->getErrors() != null) {\n $message_text = $tresponse->getErrors()[0]->getErrorText();\n $msg_type = \"errorMessage\";\n }\n }\n } else {\n if ($tresponse != null && $tresponse->getErrors() != null) {\n $message_text = $tresponse->getErrors()[0]->getErrorText();\n } else {\n $message_text = $response->getMessages()->getMessage()[0]->getText();\n }\n $msg_type = \"errorMessage\";\n }\n } else {\n $message_text = \"No response returned\";\n $msg_type = \"errorMessage\";\n }\n\n return redirect()->route('refundView')->with($msg_type, $message_text);\n }",
"public function refund(Varien_Object $oPayment, $nAmount)\n\t{\n\t\tMage::log(\" --- Snap* Hosted Payments API : refund --- \");\n\n\t\tif(empty($nAmount))\n\t\t\t$nAmount=null;\n\n\t\tif ($oPayment->getLastTransId())\n\t\t{\n\t\t\t// build the request\n\t\t\t$oOrder = $oPayment->getOrder();\n\t\t\t$aMACParamKeys = array('code','action','merchant_order_id','txn_id');\n\t\t\t$aRequest = $this->_buildAPIRequest(array(\n\t\t\t\t'action' => 'credit',\n\t\t\t\t'merchant_order_id' => $oOrder->getRealOrderId(),\n\t\t\t\t'txn_id' => $oPayment->getLastTransId(),\n\t\t\t\t'amount' => (!is_null($nAmount) ? self::_currencyAmount($nAmount) : $nAmount),\n\t\t\t), $aMACParamKeys);\n\t\t\tMage::log($aRequest);\n\n\t\t\t// post the request\n\t\t\t$aResult = $this->_postAPIRequest($aRequest);\n\t\t\tMage::log($aResult);\n\n\t\t\t// parse the response\n\t\t\tif ($aResult['success'] === true && isset($aResult['status']) && strtolower($aResult['status']) == 'approved') // approved\n\t\t\t{\n\t\t\t\tMage::log('approved');\n\t\t\t\tif($aResult['txn_id'] != null)\n\t\t\t\t\t$oPayment->setLastTransId($aResult['txn_id']);\n\t\t\t\t$oPayment->setStatus(self::STATUS_SUCCESS);\n\t\t\t\t$oPayment->getOrder()->addStatusToHistory($oPayment->getOrder()->getStatus(), $this->_getHelper()->__('Payment has been refunded via Snap* Hosted Payments Checkout (transid # '.$aResult['txn_id'].').'));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$oPayment->setStatus(self::STATUS_ERROR);\n\t\t\t\tif ($aResult['success'] === true && isset($aResult['status']) && strtolower($aResult['status']) == 'declined') // declined\n\t\t\t\t{\n\t\t\t\t\tMage::log('declined');\n\t\t\t\t\t$sError = 'Payment refund request was declined by Snap* Hosted Payments Checkout.'.(!empty($aResult['message']) ? ' '.$aResult['message'] : '');\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tMage::log('failure');\n\t\t\t\t\t$sError = 'Payment refund request failed.'.(!empty($aResult['message']) ? ' '.$aResult['message'] : '');\n\t\t\t\t}\n\t\t\t\tMage::getSingleton('adminhtml/session')->addError($this->_getHelper()->__($sError));\n\t\t\t\t$oPayment->getOrder()->addStatusToHistory($oPayment->getOrder()->getStatus(), $this->_getHelper()->__($sError));\n\t\t\t\tMage::throwException($sError);\n\t\t\t}\n\t\t}\n\n\t\treturn $this;\n\t}",
"public function refundCancel($refundHandle);",
"public function refund($mixed = null) {\n\t\t$validParameters = array(\n\t\t\t'(orderv2\\refund)',\n\t\t);\n\t\t$args = func_get_args();\n\t\t$this->_checkArguments($args, $validParameters);\n\t\treturn $this->__soapCall('refund', $this->make_soap_params($mixed));\n\t}",
"public function Refund($request)\n {\n $transactionID = $request->Refund->TransactionID;\n if (empty($transactionID)) {\n die(\"Refund transaction ID missing\");\n }\n $jsonRequest = $this->fixObjtoJSON($request);\n $response = $this->PostToRapidAPI(\"Transaction/$transactionID/Refund\", $jsonRequest);\n return $response;\n }",
"public static function refund($params)\n {\n $requestor = Ferbuy_ApiRequestor::getInstance();\n\n $post_data = array(\n 'command' => $params['currency'].$params['amount'],\n 'output_type' => self::OUTPUT_TYPE,\n 'site_id' => $requestor->_siteId,\n 'transaction_id' => $params['transaction_id'],\n );\n $post_data['checksum'] = $requestor->sign($post_data);\n\n $response = $requestor->request('post', '/RefundTransaction', $post_data);\n return $response;\n }",
"public function processRefund($data) {\n\t\t// provide the EziDebit API endpoint\n\t\t$soapclient = new SoapClient($this->nonPci);\n\n\t\t$params = [\n\t\t\t\t'DigitalKey' => $this->digitalKey,\n\t\t\t\t'PaymentID' => $data['paymentId'],\n\t\t\t\t'BankReceiptID' => $data['bankReceiptId'],\n\t\t\t\t'RefundAmountInCents' => $data['refundAmountInCents']\n\t\t];\n\n\t\treturn $response = $soapclient->processRefund($params);\n\t}",
"public function applyRefund(Order $order, array $parsedData);",
"function _doRefund($oID, $amount = 0) {\r\n global $db, $messageStack;\r\n $new_order_status = (int)MODULE_PAYMENT_AUTHORIZENET_ECHECK_REFUNDED_ORDER_STATUS_ID;\r\n if ($new_order_status == 0) $new_order_status = 1;\r\n $proceedToRefund = true;\r\n $refundNote = strip_tags(zen_db_input($_POST['refnote']));\r\n if (isset($_POST['refconfirm']) && $_POST['refconfirm'] != 'on') {\r\n $messageStack->add_session(MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_REFUND_CONFIRM_ERROR, 'error');\r\n $proceedToRefund = false;\r\n }\r\n if (isset($_POST['buttonrefund']) && $_POST['buttonrefund'] == MODULE_PAYMENT_AUTHORIZENET_ECHECK_ENTRY_REFUND_BUTTON_TEXT) {\r\n $refundAmt = (float)$_POST['refamt'];\r\n $new_order_status = (int)MODULE_PAYMENT_AUTHORIZENET_ECHECK_REFUNDED_ORDER_STATUS_ID;\r\n if ($refundAmt == 0) {\r\n $messageStack->add_session(MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_INVALID_REFUND_AMOUNT, 'error');\r\n $proceedToRefund = false;\r\n }\r\n }\r\n if (isset($_POST['cc_number']) && trim($_POST['cc_number']) == '') {\r\n $messageStack->add_session(MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_CC_NUM_REQUIRED_ERROR, 'error');\r\n }\r\n if (isset($_POST['trans_id']) && trim($_POST['trans_id']) == '') {\r\n $messageStack->add_session(MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_TRANS_ID_REQUIRED_ERROR, 'error');\r\n $proceedToRefund = false;\r\n }\r\n\r\n /**\r\n * Submit refund request to gateway\r\n */\r\n if ($proceedToRefund) {\r\n $submit_data = array('x_type' => 'CREDIT',\r\n 'x_card_num' => trim($_POST['cc_number']),\r\n 'x_amount' => number_format($refundAmt, 2),\r\n 'x_trans_id' => trim($_POST['trans_id'])\r\n );\r\n unset($response);\r\n $response = $this->_sendRequest($submit_data);\r\n $response_code = $response[0];\r\n $response_text = $response[3];\r\n $response_alert = $response_text . ($this->commError == '' ? '' : ' Communications Error - Please notify webmaster.');\r\n $this->reportable_submit_data['Note'] = $refundNote;\r\n $this->_debugActions($response);\r\n\r\n if ($response_code != '1') {\r\n $messageStack->add_session($response_alert, 'error');\r\n } else {\r\n // Success, so save the results\r\n $sql_data_array = array('orders_id' => $oID,\r\n 'orders_status_id' => (int)$new_order_status,\r\n 'date_added' => 'now()',\r\n 'comments' => 'REFUND INITIATED. Trans ID:' . $response[6] . ' ' . $response[4]. \"\\n\" . ' Gross Refund Amt: ' . $response[9] . \"\\n\" . $refundNote,\r\n 'customer_notified' => 0\r\n );\r\n zen_db_perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array);\r\n $db->Execute(\"update \" . TABLE_ORDERS . \"\r\n set orders_status = '\" . (int)$new_order_status . \"'\r\n where orders_id = '\" . (int)$oID . \"'\");\r\n $messageStack->add_session(sprintf(MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_REFUND_INITIATED, $response[9], $response[6]), 'success');\r\n return true;\r\n }\r\n }\r\n return false;\r\n }",
"function hook_commerce_adyen_refund_rejected(\\Commerce\\Adyen\\Payment\\Transaction\\Refund $transaction, \\stdClass $order) {\n\n}",
"public function get_company_invoice_payment_refund() {\n $invoice = $this->input->post('invoice');\n $data = $this->classtraineemodel->company_invoice($invoice);\n if ($data->company_id[0] == 'T') {\n $tenant_details = fetch_tenant_details($data->company_id);\n $data->company_name = $tenant_details->tenant_name;\n } else {\n $company_details = $this->company->get_company_details($this->tenant_id, $data->company_id);\n $data->company_name = $company_details[0]->company_name;\n }\n $data->discount_label = rtrim($this->course->get_metadata_on_parameter_id($data->discount_type), ', ');\n $gst_label = ($data->total_gst > 0) ? 'GST ON, ' : 'GST OFF ';\n if ($data->total_gst > 0) {\n $gst_label .= rtrim($this->course->get_metadata_on_parameter_id($data->gst_rule), ', ');\n }\n $data->gst_label = $gst_label;\n $data->inv_date = date('d/m/Y', strtotime($data->inv_date));\n $data->amount_refund = round($data->amount_refund, 2);\n $refund_details = $refund_details = $this->classtraineemodel->get_refund_paid_details($invoice);\n foreach ($refund_details as $k => $row) {\n if ($row->refnd_reason != 'OTHERS') {\n $refund_details[$k]->refnd_reason = $this->course->get_metadata_on_parameter_id($row->refnd_reason);\n } else {\n $refund_details[$k]->refnd_reason = 'Others (' . $row->refnd_reason_ot . ')';\n }\n\n $refund_details[$k]->refund_on = date('d/m/Y', strtotime($row->refund_on));\n $refund_details[$k]->mode_of_refund = $this->course->get_metadata_on_parameter_id($row->mode_of_refund);\n }\n $res = array('data' => $data, 'refund' => $refund_details);\n echo json_encode($res);\n exit();\n }",
"public function refund_order(Refund $refund,RetailerOrder $order){\n $walletController = new WalletController();\n if ($order->has_user != null) {\n $user = User::find($order->has_user->id);\n if ($user->has_wallet == null) {\n\n $wallet = $walletController->wallet_create($order->has_user->id);\n } else {\n $wallet = $user->has_wallet;\n }\n } else {\n $shop = $order->has_store;\n if (count($shop->has_user) > 0) {\n if ($shop->has_user[0]->has_wallet == null) {\n $wallet = $walletController->wallet_create($shop->has_user[0]->id);\n } else {\n $wallet = $shop->has_user[0]->has_wallet;\n }\n }\n else {\n return redirect()->back()->with('error', 'Order Cant Refund Automatically Because No Wallet Found!');\n }\n }\n\n $wallet->available = $wallet->available+(double)$order->cost_to_pay;\n $wallet->save();\n /*Wallet Log*/\n $wallet_log = new WalletLog();\n $wallet_log->wallet_id = $wallet->id;\n $wallet_log->status = \"Top-up through Refund\";\n $wallet_log->amount = $order->cost_to_pay;\n $wallet_log->message = 'A Top-up of Amount '.number_format($order->cost_to_pay,2).' USD On Behalf on Refund '.$order->name.' Against Wallet ' . $wallet->wallet_token . ' At ' . now()->format('d M, Y h:i a');\n $wallet_log->save();\n\n /*Refund Order*/\n $order->status = 'cancelled';\n $order->paid = 2;\n $order->save();\n /*Order Log*/\n $order_log = new OrderLog();\n $order_log->message = \"An amount of \".$order->cost_to_pay.\" USD refunded to Wallet on \".now()->format('d M, Y h:i a');\n $order_log->status = \"refunded\";\n $order_log->retailer_order_id = $order->id;\n $order_log->save();\n\n $refund->status_id = 4;\n $refund->status = 'Closed';\n $refund->save();\n\n $tl = new RefundLog();\n $tl->message = 'A Refund Generated \"'.$refund->title.'\" against \"'.$order->name.'\" at '.now()->format('d M, Y h:i a');\n $tl->status = \"Generated\";\n $tl->refund_id = $refund->id;\n $tl->save();\n\n $this->notify->generate('Refund','Order Refund',$order->name.' Refund Approved',$refund);\n $this->inventory->OrderQuantityUpdate($order,'refund');\n return redirect()->back()->with('success','Order Refunded Successfully!');\n\n\n }",
"public function export_payment_refund($payid) {\n if (empty($payid)) {\n return show_404();\n }\n $result = $this->get_payid_details($payid, 1);\n if ($result['data']->enrolment_mode == 'COMPSPON') {\n if ($result['data']->company_id[0] == 'T') {\n $tenant_details = fetch_tenant_details($result['data']->company_id);\n $trainee_det = $tenant_details->tenant_name;\n } else {\n $company_details = $this->company->get_company_details($this->tenant_id, $result['data']->company_id);\n $trainee_det = $company_details[0]->company_name;\n }\n } else {\n $trainee_details = $this->classtraineemodel->get_trainee_by_pymnt_due_id($payid);\n $trainee_det = $trainee_details->first_name . ' ' . $trainee_details->last_name;\n $trainee_id = $trainee_details->user_id;\n }\n $this->load->helper('pdf_reports_helper');\n generate_trainee_payment_refund($result, $refund_arr, $trainee_det);\n }",
"public function refund($params)\n {\n return $this->request(Resource::RESOURCE_ORDER_REFUND, $params);\n }",
"function hook_commerce_adyen_refund_received(\\Commerce\\Adyen\\Payment\\Transaction\\Refund $transaction, \\stdClass $order) {\n\n}",
"public function refund(Request $request)\n {\n\n $payment = new Refund($request);\n\n $payment = $payment->refundOrder(false);\n\n if ($payment instanceof ResponseInterface) {\n\n return json_decode($payment->getBody()->__toString());\n\n }\n\n return new JsonResponse($payment, 200);\n\n }",
"public function RefundTxn() {\r\n\r\n $ch = curl_init();\r\n\r\n $CURLParameters = http_build_query(array(\r\n // Our default parameters!\r\n \"key\" => $this->key,\r\n \"appid\" => $this->game,\r\n // This can vary from request to request, sometimes its steamid or steamids or even an array.\r\n \"steamid\" => $this->steamid,\r\n // Custom Queries below here.\r\n \"orderid\" => $this->orderid,\r\n ));\r\n\r\n curl_setopt($ch, CURLOPT_URL, \"https://partner.steam-api.com/\" . $this->interface . \"/RefundTxn/v2/\");\r\n\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\n curl_setopt($ch, CURLOPT_POST, 1);\r\n curl_setopt($ch, CURLOPT_POSTFIELDS, $CURLParameters);\r\n $CURLResponse = json_decode(curl_exec($ch));\r\n $CURLResponseCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\r\n curl_close($ch);\r\n\r\n\r\n // Error handling improved!\r\n\r\n if ($CURLResponseCode != 200) {\r\n if ($CURLResponseCode == 400) {\r\n throw new exceptions\\SteamRequestParameterException(\"The Order ID or another parameter is invalid!\");\r\n }\r\n if ($CURLResponseCode == 401) {\r\n throw new exceptions\\SteamException(\"App ID or API Key is invalid.\");\r\n }\r\n throw new exceptions\\SteamRequestException(\"$CURLResponseCode Request Error.\");\r\n }\r\n\r\n if ($CURLResponse->response->result == \"OK\") {\r\n return true;\r\n }\r\n\r\n throw new exceptions\\SteamRequestException(json_encode($CURLResponse->response->error));\r\n }",
"public function outOperation(){\n $this->inventory->setQuantity($this->inventory->getQuantity() - $this->getQuantity());\n $this->type = \"OUT\";\n }",
"public function refund($requestParameters = array());",
"public function removeMovementOut($warranty)\n {\n if ($warranty->movementOut) {\n $warranty->series->movement_out = 0;\n $warranty->push();\n\n $movement_in = $this->movementRepo->find($warranty->movementOut->movement_in_id);\n $movement_in->in_stock += 1;\n $movement_in->save();\n\n $this->movementRepo->destroy($warranty->movementOut->id);\n }\n }",
"public function refund( \\IPS\\nexus\\Transaction $transaction, $amount = NULL )\n\t{\n\t\t$extra = json_decode( $transaction->extra, TRUE );\n\t\t\n\t\t$this->api( array(\n\t\t\t'x_type'\t\t=> 'CREDIT',\n\t\t\t'x_trans_id'\t=> $transaction->gw_id,\n\t\t\t'x_amount'\t\t=> (string) ( $amount ?: $transaction->amount->amount ),\n\t\t\t'x_card_num'\t=> $extra['lastFour']\n\t\t) );\n\t}",
"public function refund()\n\t{\n\t\trequirePermission(\"canRefund\");\n\n\t\t$id = intval($this->input->get(\"id\"));\n\t\t$costDp = intval($this->input->get(\"costDp\"));\n\t\t$accountId = intval($this->input->get(\"accountId\"));\n\t\t\n\t\tif(!$id || !is_numeric($id))\n\t\t{\n\t\t\tdie();\n\t\t}\n\n\t\tif ($costDp != \"Free\") {\n\t\t\tif(!$costDp || !is_numeric($costDp))\n\t\t\t{\n\t\t\t\tdie();\n\t\t\t}\n\t\t}\n\n\t\tif(!$accountId || !is_numeric($accountId))\n\t\t{\n\t\t\tdie();\n\t\t}\n\n\t\tif ($costDp != \"Free\") {\n\t\t\tif ($costDp > 0) {\n\t\t\t\t$userDp = intval($this->recup_model->getDp($accountId));\n\t\t\t\tif(!$userDp || !is_numeric($userDp))\n\t\t\t\t{\n\t\t\t\t\tdie(\"Problème lors de l'acquisition des users dps.\");\n\t\t\t\t}\n\t\t\t\t$this->internal_user_model->setDp($accountId, $userDp+$costDp);\n\t\t\t}\n\t\t}\n\t\t$this->recup_model->editEtat($this->realms->getRealm(1)->getCharacters()->getConnection(), $id, 8);\n\t}",
"public function refundRequest()\n {\n $request = new Request\\Refund;\n return $this->applyAuthSettings($request);\n }",
"public function worldlinePaymentRefund($refundId, $scopeId = null);",
"public function refundCharge($reference, $amount)\n {\n $url = 'gpx/merchant/transactions/refund';\n\n try {\n $res = $this->client->request('POST', $url, ['json' => ['ref'=>$reference, 'seckey' =>$this->config_vars['secret_key'], 'amount' => $amount]]);\n\n return $res->getBody();\n } catch (TransferException $e) {\n $response = $e->getResponse();\n $this->logger->error('An error occurred trying to refund the charge', ['request' => Psr7\\str($e->getRequest()), 'response' => Psr7\\str($e->getResponse())]);\n\n return $response->getBody();\n }\n }",
"public function doRefund() {\n\t\t\n\t\t$this->load->language('extension/payment/hoolah_refund');\n\t\tif (!empty($this->request->post['transaction_id']) && isset($this->request->post['refund_full']) && !empty($this->request->post['description'])) {\n\t\t\t$this->load->model('extension/payment/hoolah');\n\n\t\t\tif ($this->request->post['refund_full'] == 0 && $this->request->post['amount'] == 0) {\n\t\t\t\t$this->session->data['error'] = $this->language->get('error_partial_amt');\n\t\t\t\t$this->response->redirect($this->url->link('extension/payment/hoolah/refund', 'token=' . $this->session->data['token'] . '&tid=' . $this->request->get['tid'] . '&order_id=' . $this->request->get['order_id'], true));\n\t\t\t} else {\n\t\t\t\t$order_transaction = $this->model_extension_payment_hoolah->getHoolahOrderTransactionStatus($this->request->get['order_id'], 'APPROVED');\n\t\t\t \n\t\t\t // get sku order\n\t\t $orders = $this->model_extension_payment_hoolah->getOrderProducts($this->request->get['order_id']);\n\t\t\n\t\t\t\tif (isset($order_transaction)) {\n\t\t\t\t $call_data['transaction_id'] = $order_transaction['id'];\n\t\t\t\t $call_data['uuid'] = $order_transaction['uuid'];\n\t\t\t\t $call_data['description'] = $this->request->post['description'];\n\t\t\t\t $call_data['order_id'] = $this->request->post['order_id'];\n\t\t\t\t \n\t\t\t\t\tif ($this->request->post['refund_full'] == 1) {\n\t\t\t\t\t\t$call_data['REFUNDTYPE'] = 'Full';\n\t\t\t\t\t\t$call_data['AMT'] = $order_transaction['total'];\n\t\t\t\t\t\n\t\t\t\t\t\t// submit to hoolah api\n\t\t\t\t\t $result = $this->model_extension_payment_hoolah->initiate_fullrefund($call_data);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$call_data['REFUNDTYPE'] = 'Partial';\n\t\t\t\t\t\t$call_data['AMT'] = $this->request->post['amount'];\n\t\t\t\t\t\t$call_data['sku'] = $orders[0]['sku'];\n\t\t\t\t\t\t$call_data['CURRENCYCODE'] = $this->request->post['currency_code'];\n\t\t\t\t\t\t\n\t\t\t\t\t\t// submit to hoolah api\n\t\t\t\t\t $result = $this->model_extension_payment_hoolah->initiate_partialrefund($call_data);\n\t\t\t\t\t}\n\t\t\t\t\t$refund_details = array();\n foreach($result->details AS $rows) {\n $refund_details[] = $rows;\n }\n \n $refund = array();\n $refund['order_id'] = $order_transaction['order_id'];\n $refund['uuid'] = $order_transaction['uuid'];\n $refund['status'] = $result->status;\n $refund['orderType'] = $order_transaction['orderType'];\n $refund['total'] = $call_data['AMT'];\n $refund['tax'] = $order_transaction['tax'];\n $refund['shipping_fee'] = $order_transaction['shipping_fee'];\n $refund['currency'] = $order_transaction['currency'];\n $refund['requestId'] = $result->requestId;\n $refund['code'] = $result->code;\n $refund['message'] = $result->message;\n $refund['details'] = json_encode($refund_details);\n $refund['createdAt'] = date('Y-m-d H:i:s');\n $refund['date_added'] = date('Y-m-d H:i:s');\n \n // save it to transaction tbl\n $this->model_extension_payment_hoolah->addHoolahOrderTransactionRefund($refund);\n \n if($result->code == 'accepted' || $result->code == 'in_process' || $result->code == 'in_process') {\n //redirect back to the order\n\t\t\t\t\t\t$this->response->redirect($this->url->link('sale/order/info', 'token=' . $this->session->data['token'] . '&order_id=' . $this->request->get['order_id'], true));\n \n } else {\n $this->session->data['error'] = $result->message;\n\t\t\t\t\t $this->response->redirect($this->url->link('extension/payment/hoolah/refund', 'token=' . $this->session->data['token'] . '&tid=' . $this->request->get['tid'] . '&order_id=' . $this->request->get['order_id'], true));\n }\n\t\t\t\t} else {\n\t\t\t\t\t$this->session->data['error'] = $this->language->get('error_data');\n\t\t\t\t\t$this->response->redirect($this->url->link('extension/payment/hoolah/refund', 'token=' . $this->session->data['token'] . '&tid=' . $this->request->get['tid'] . '&order_id=' . $this->request->get['order_id'], true));\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$this->session->data['error'] = $this->language->get('error_data');\n\t\t\t$this->response->redirect($this->url->link('extension/payment/hoolah/refund', 'token=' . $this->session->data['token'] . '&tid=' . $this->request->get['tid'] . '&order_id=' . $this->request->get['order_id'], true));\n\t\t}\n\t}",
"public function addRefund($bill, $refund, $order);",
"public function refundAction() {\n $this->chekcingForMarketplaceSellerOrNot ();\n /**\n * Initilize refund variables\n */\n $orderId = $this->getRequest ()->getParam ( 'id' );\n $produtId = $this->getRequest ()->getParam ( 'item' );\n $sellerId = Mage::getSingleton ( 'customer/session' )->getId ();\n /**\n * Collect the produts from the order details.\n */\n $orderPrdouctIds = Mage::helper ( 'marketplace/vieworder' )->getOrderProductIds ( Mage::getSingleton ( 'customer/session' )->getId (), $orderId );\n\n $orderStatusFlag = Mage::getStoreConfig ( 'marketplace/admin_approval_seller_registration/order_manage' );\n /**\n * Check whether product id is in array\n */\n if (in_array ( $produtId, $orderPrdouctIds ) && $orderStatusFlag == 1) {\n\n Mage::getModel ( 'marketplace/order' )->updateSellerRequest ( $produtId, $orderId, Mage::getSingleton ( 'customer/session' )->getId (), '', 2 );\n\n try {\n\n /**\n * Sending order email\n */\n $templateId = ( int ) Mage::getStoreConfig ( 'marketplace/admin_approval_seller_registration/order_cancel_request_notification_template_selection' );\n $adminEmailId = Mage::getStoreConfig ( 'marketplace/marketplace/admin_email_id' );\n $toMailId = Mage::getStoreConfig ( \"trans_email/ident_$adminEmailId/email\" );\n $toName = Mage::getStoreConfig ( \"trans_email/ident_$adminEmailId/name\" );\n /**\n * Select email template\n */\n if ($templateId) {\n $emailTemplate = Mage::helper ( 'marketplace/marketplace' )->loadEmailTemplate ( $templateId );\n } else {\n $emailTemplate = Mage::getModel ( 'core/email_template' )->loadDefault ( 'marketplace_cancel_order_admin_email_template_selection' );\n }\n /**\n * Load product collection for cancel\n */\n $productCollection = Mage::getModel ( 'catalog/product' )->getCollection ()->addAttributeToSelect ( '*' )->addUrlRewrite ()->addAttributeToFilter ( 'entity_id', array (\n 'eq' => $produtId\n ) );\n\n $productDetails = \"<ul>\";\n /**\n * Prepare product details for cancel email\n */\n foreach ( $productCollection as $product ) {\n $productDetails .= \"<li>\";\n $productDetails .= \"<div><a href='{$product->getProductUrl()}'>{$product->getName()}</a><div>\";\n $productDetails .= \"</li>\";\n }\n\n $productDetails .= \"</ul>\";\n /**\n * load order details\n * @var object\n */\n $incrementId = Mage::getModel ( 'sales/order' )->load ( $orderId )->getIncrementId ();\n\n /**\n * Get seller information.\n */\n $customer = Mage::getModel ( 'customer/customer' )->load ( $sellerId );\n /**\n * Initilize variable for send mail to seller\n */\n $sellerEmail = $customer->getEmail ();\n $sellerName = $customer->getName ();\n $recipient = $toMailId;\n $emailTemplate->setSenderName ( $sellerName );\n $emailTemplate->setSenderEmail ( $sellerEmail );\n\n /**\n * Prepare temail templave variables\n */\n $emailTemplateVariables = array (\n 'ownername' => $toName,\n 'productdetails' => $productDetails,\n 'order_id' => $incrementId,\n 'customer_email' => $sellerEmail,\n 'customer_firstname' => $sellerName,\n 'reason' => $this->__ ( 'Buyer wants to refund the item' ),\n 'requesttype' => $this->__ ( 'refund' ),\n 'requestperson' => $this->__ ( 'Seller' )\n );\n $emailTemplate->setDesignConfig ( array (\n 'area' => 'frontend'\n ) );\n /**\n * Sending email to admin\n */\n $emailTemplate->getProcessedTemplate ( $emailTemplateVariables );\n $emailTemplate->send ( $recipient, $toName, $emailTemplateVariables );\n\n /**\n * Redirect to order view page\n */\n Mage::getSingleton ( 'core/session' )->addSuccess ( $this->__ ( \"The item refund request has been sent.\" ) );\n $this->_redirect ( 'marketplace/order/vieworder/orderid/' . $orderId );\n } catch ( Exception $e ) {\n /**\n * when error message occured, redirected to view order page.\n */\n Mage::getSingleton ( 'core/session' )->addError ( $this->__ ( $e->getMessage () ) );\n $this->_redirect ( 'marketplace/order/vieworder/orderid/' . $orderId );\n }\n } else {\n /**\n * Check the permission.\n */\n Mage::getSingleton ( 'core/session' )->addError ( $this->__ ( 'You do not have permission to access this page' ) );\n $this->_redirect ( 'marketplace/order/manage' );\n return false;\n }\n }",
"public function refund(Collection $order)\r\n {\r\n }",
"function filter_mellat_pay_channel_pay_refunds($transaction){\n return $transaction;\n}",
"public function refund(array $options = [])\n {\n // TODO: Implement refund() method.\n }",
"public function refund():bool {\n request::xhr(\"orders/refund\", \"csrf_token=\".run::$runner->user->csrf.\"&id=\".substr($this->ID, 1),run::$runner->user->session);\n return true;\n }",
"public function queryByOutRefundNumber(string $outRefundNumber)\n {\n return $this->query($outRefundNumber, 'out_refund_no');\n }",
"final public static function transactionSentForRefund()\n {\n return self::get(2057);\n }",
"public function testRefund()\n {\n print \"testRefund()\\n\";\n\n // TODO: Impl\n\n $this->fail();\n }",
"public function refund() {\n\t\t$this->load->language('extension/payment/hoolah_refund');\n\t\t$this->load->model('extension/payment/hoolah');\n\n\t\t$this->document->setTitle($this->language->get('heading_title'));\n\n\t\t$data['heading_title'] = $this->language->get('heading_title');\n\t\t$data['button_cancel'] = $this->language->get('button_cancel');\n\t\t$data['entry_transaction_id'] = $this->language->get('entry_transaction_id');\n\t\t$data['entry_full_refund'] = $this->language->get('entry_full_refund');\n\t\t$data['entry_amount'] = $this->language->get('entry_amount');\n\t\t$data['entry_message'] = $this->language->get('entry_message');\n\t\t$data['button_refund'] = $this->language->get('button_refund');\n\t\t$data['text_refund'] = $this->language->get('text_refund');\n\n\t\t$data['breadcrumbs'] = array();\n\n\t\t$data['breadcrumbs'][] = array(\n\t\t\t'text' => $this->language->get('text_home'),\n\t\t\t'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true),\n\t\t);\n\n\t\t$data['breadcrumbs'][] = array(\n\t\t\t'text' => $this->language->get('text_hoolah'),\n\t\t\t'href' => $this->url->link('extension/payment/hoolah', 'token=' . $this->session->data['token'], true),\n\t\t);\n\n\t\t$data['breadcrumbs'][] = array(\n\t\t\t'text' => $this->language->get('heading_title'),\n\t\t\t'href' => $this->url->link('extension/payment/hoolah/refund', 'token=' . $this->session->data['token'], true),\n\t\t);\n \n\t\t//button actions\n\t\t$data['action'] = $this->url->link('extension/payment/hoolah/doRefund', 'token=' . $this->session->data['token'] . '&tid=' . $this->request->get['tid'] . '&order_id=' . $this->request->get['order_id'], true);\n\t\t$data['cancel'] = $this->url->link('sale/order', 'token=' . $this->session->data['token'], true);\n\n\t\t$transaction_id = $this->request->get['tid'];\n \n $transaction = $this->model_extension_payment_hoolah->getHoolahOrderTransactionId($transaction_id);\n \n $data['order_id'] = $this->request->get['order_id'];\n $data['transaction_id'] = $transaction['uuid'];\n\t\t$data['total'] = $transaction['total'];\n\t\t$data['currency_code'] = $transaction['currency'];\n\n\t\t$refunded = number_format($this->model_extension_payment_hoolah->getRefundedTotal($transaction['uuid']), 2);\n\t\t\n\t\t$this->load->model('sale/order');\n $order = $this->model_sale_order->getOrder($this->request->get['order_id']);\n\n\t\tif ($refunded != 0.00) {\n\t\t\t$data['refund_available'] = number_format($order['total'] - $refunded, 2);\n\t\t\t$data['attention'] = $this->language->get('text_current_refunds') . ': ' . $data['refund_available'];\n\t\t} else {\n\t\t\t$data['refund_available'] = '';\n\t\t\t$data['attention'] = '';\n\t\t}\n\n\t\t$data['token'] = $this->session->data['token'];\n\n\t\tif (isset($this->session->data['error'])) {\n\t\t\t$data['error'] = $this->session->data['error'];\n\t\t\tunset($this->session->data['error']);\n\t\t} else {\n\t\t\t$data['error'] = '';\n\t\t}\n\n\t\t$data['header'] = $this->load->controller('common/header');\n\t\t$data['column_left'] = $this->load->controller('common/column_left');\n\t\t$data['footer'] = $this->load->controller('common/footer');\n\n\t\t$this->response->setOutput($this->load->view('extension/payment/hoolah_refund', $data));\n\t}",
"public function refunds_export_xls() {\n $tenant_id = $this->tenant_id;\n $company = $this->input->get('company');\n $companies = $this->classTraineeModel->get_company_for_paidinvoice($tenant_id);\n $company_arr = array();\n foreach ($companies as $row) {\n $company_arr[$row->company_id] = $row->company_name;\n }\n $invoice_id = $this->input->get('invoice_id');\n $start_date = $this->input->get('start_date');\n $end_date = $this->input->get('end_date');\n $offset = ($pageno * $records_per_page);\n $field = ($this->input->get('f')) ? $this->input->get('f') : 'inv.invoice_id';\n $order_by = ($this->input->get('o')) ? $this->input->get('o') : 'DESC';\n $tabledata = $this->reportsModel->get_refund_paid($tenant_id, $records_per_page, $offset, $field, $order_by, $company, $invoice_id, $start_date, $end_date);\n $invs = array();\n foreach ($tabledata as $k => $row) {\n if ($row->refnd_reason == 'OTHERS') {\n $tabledata[$k]->refnd_reason = \"Others (\" . $row->refnd_reason_ot . \")\";\n } else {\n $tabledata[$k]->refnd_reason = $this->courseModel->get_metadata_on_parameter_id($row->refnd_reason);\n }\n if ($row->refund_type == 'INDV') {\n $invs[$row->invoice_id] = $row->invoice_id;\n }\n }\n $tb_user = $this->reportsModel->get_refund_paid_user($invs);\n $tableuser = array();\n foreach ($tb_user as $row) {\n $tableuser[$row->invoice_id]['name'] = $row->first_name . ' ' . $row->last_name;\n $tableuser[$row->invoice_id]['taxcode'] = $this->mask_format($row->tax_code);\n }\n $this->load->helper('export_helper');\n $count_tabledata = count($tabledata);\n $excel_titles = array('Inv #', 'Taxcode', 'Name', 'Refund Dt.', 'Refund Amt.', 'Reason', 'Refunded By');\n $excel_data = array();\n for ($i = 0; $i < $count_tabledata; $i++) {\n $k = $tabledata[$i]->invoice_id;\n if ($tabledata[$i]->refund_type == 'INDV') {\n $taxcode = $tableuser[$k]['taxcode'];\n $name = $tableuser[$k]['name'];\n } else {\n if ($tabledata[$i]->company_id[0] == 'T') {\n $tenant_details = fetch_tenant_details($tabledata[$i]->company_id);\n $taxcode = $tenant_details->tenant_name;\n $name = $tenant_details->tenant_name . ' (Company)';\n } else {\n $taxcode = $tabledata[$i]->comp_regist_num;\n $name = $tabledata[$i]->company_name . ' (Company)';\n }\n }\n $excel_data[$i][] = $tabledata[$i]->invoice_id;\n $excel_data[$i][] = $taxcode;\n $excel_data[$i][] = $name;\n $excel_data[$i][] = date('d/m/Y', strtotime($tabledata[$i]->refund_on));\n $excel_data[$i][] = '$ ' . number_format($tabledata[$i]->amount_refund, 2, '.', '');\n $excel_data[$i][] = $tabledata[$i]->refnd_reason;\n $excel_data[$i][] = $tabledata[$i]->first_name . \" \" . $tabledata[$i]->last_name;\n }\n if (!empty($tabledata)) {\n if (empty($start_date) && empty($end_date)) {\n $period = ' for ' . date('F d Y, l');\n } else {\n $period = 'for the period';\n if (!empty($start_date))\n $period .= ' from ' . date('F d Y', DateTime::createFromFormat('d-m-Y', $start_date)->getTimestamp());\n if (!empty($end_date))\n $period .= ' to ' . date('F d Y', DateTime::createFromFormat('d-m-Y', $end_date)->getTimestamp());\n }\n if (!empty($company)) {\n $period .= ' \\'' . $company_arr[$company] . '\\'';\n }\n if (!empty($invoice_id)) {\n $period .= ' - \\' Invoice No.: ' . $invoice_id . '\\'';\n }\n }\n $excel_filename = 'refunds.xls';\n $excel_sheetname = 'Refunds';\n $excel_main_heading = 'Accounting Reports - Refunds' . $period;\n export_page_fields($excel_titles, $excel_data, $excel_filename, $excel_sheetname, $excel_main_heading);\n }",
"function wp_aff_handle_woocommerce_order_refund($order_id) {\n wp_affiliate_log_debug(\"WooCommerce Affiliate integration - order refunded. Order ID: \" . $order_id, true);\n //$order = new WC_Order($order_id);\n $txn_id = $order_id;\n wp_aff_handle_refund($txn_id);\n}",
"public function make_payment_refund($order, $amount)\n {\n\n if (!($details = $this->get_payment_details($order))) {\n return null;\n }\n\n $request = array(\n 'charge_id' => $details['id'],\n 'amount' => $amount,\n );\n\n WC_Gateway_Orangepay::log('Orangepay - make_payment_refund() request parameters: ' . $order->get_order_number() . ': ' . wc_print_r($request, true));\n\n $raw_response = wp_safe_remote_post(\n $this->endpoint . '/refunds',\n array(\n 'method' => 'POST',\n 'timeout' => 300,\n 'user-agent' => 'WooCommerce/' . WC()->version,\n 'headers' => array(\n 'Content-Type' => 'application/json;',\n 'Authorization' => 'Bearer ' . $this->gateway->get_option('api_token')\n ),\n 'body' => json_encode($request),\n 'httpversion' => '1.1',\n )\n );\n\n WC_Gateway_Orangepay::log('Orangepay - make_payment_refund() response: ' . wc_print_r($raw_response, true));\n\n if (isset($raw_response['body']) && ($response = json_decode($raw_response['body'], true))) {\n if (isset($response['data'])) {\n $data = $response['data'];\n if (isset($data['charge'])) {\n $charge = $data['charge'];\n if (isset($charge['included'])) {\n foreach ($charge['included'] as $included) {\n if ($included['type'] === 'refund') {\n return $included['id'];\n }\n }\n }\n }\n }\n }\n\n return null;\n }",
"public function refund(\\Magento\\Payment\\Model\\InfoInterface $payment, $amount)\n {\n parent::refund($payment, $amount);\n $order = $payment->getOrder();\n $comments = $payment->getCreditMemo()->getComments();\n $grandTotal = $order->getBaseGrandTotal();\n $currencyCode = $payment->getOrder()->getBaseCurrencyCode();\n $realexAmount = $this->_helper->amountFromMagento($amount, $currencyCode);\n\n if ($grandTotal == $amount) {\n $response = $this->_remoteXml->rebate($payment, $realexAmount, $comments);\n } else {\n $response = $this->_remoteXml->rebate($payment, $realexAmount, $comments);\n //partial rebate code will come here\n }\n if (!isset($response) || !$response) {\n throw new \\Magento\\Framework\\Exception\\LocalizedException(__('The refund action failed'));\n }\n $fields = $response->toArray();\n if ($fields['RESULT'] != '00') {\n throw new \\Magento\\Framework\\Exception\\LocalizedException(\n __(\n 'The refund action failed. Gateway Response - Error ' . $fields['RESULT'] . ': ' .\n $fields['MESSAGE']\n )\n );\n }\n $payment->setTransactionId($fields['PASREF'])\n ->setParentTransactionId($payment->getAdditionalInformation('PASREF'))\n ->setTransactionAdditionalInfo(\\Magento\\Sales\\Model\\Order\\Payment\\Transaction::RAW_DETAILS, $fields);\n\n return $this;\n }",
"public function hookActionProductCancel($params)\n {\n if ($params['action'] === CancellationActionType::STANDARD_REFUND) {\n $order = $params['order'];\n $cart_id = $order->id_cart;\n $cart = new Cart($cart_id);\n\n // realizamos la consulta de base de datos para el tiketNumber\n $query = 'SELECT * FROM '._DB_PREFIX_.'kushkipagos WHERE `cart_id` = \\''.$cart_id.'\\' limit 1 ';\n $order_kushki = Db::getInstance()->executeS($query);\n\n $ticket_number = $order_kushki[0][\"ticket_number\"];\n $kushkiToken = $order_kushki[0][\"token\"];\n\n $currency_order = new Currency((int)((int)$params[\"order\"]->id_currency));\n\n $amount = $this->getAmountValues($cart);\n\n $obj_amount = array_merge($amount, array(\"currency\" =>$currency_order->iso_code));\n // llamamos al endpoint de refund\n $refund = $this->callUrlRefund($obj_amount, $ticket_number);\n\n if ( ! $refund ) {\n throw new PrestaShopException('An error occurred while attempting to create the refund using the payment gateway API.');\n }else{\n if ($refund->isSuccessful()) {\n //cambiamos el status a refunded\n $history = new OrderHistory();\n $history->id_order = (int)$order->id;\n $history->changeIdOrderState(7, (int)($order->id));\n $order->setCurrentState(7);\n PrestaShopLogger::addLog('Kushki Refund CORRECTO en orden' . $order->id . ' Ticket number: ' . $refund->getTicketNumber(), 1);\n $this->saveDataRefund($kushkiToken, $refund->getTicketNumber(), $cart_id, (int)$order->id, (int)Configuration::get('PS_OS_REFUND'), $order->total_paid, \"kushkipagos\", \"refund\", (int)$order->id_currency, $order->secure_key, \"initialized\" );\n } else {\n PrestaShopLogger::addLog('Kushki Refund FALLIDO en orden '.$order->id.' Message ' . $refund->getResponseText(), 3);\n throw new OrderException('Hubo un error en el refund de esta orden.');\n }\n }\n\n } else if ($params['action'] === CancellationActionType::PARTIAL_REFUND) {\n throw new OrderException('Kushki no puede hacer devoluciones parciales, debe hacer la devolución del total del pedido');\n }\n }",
"public function setRefundStamp($stamp)\n {\n $this->setParameter('refundStamp', self::toString($stamp));\n }",
"public function getRefundId()\n {\n return $this->getParameter('refundId');\n }",
"public function renderBuyerRefundOverviewAction(Request $request)\r\n {\r\n $payoutId = (int) $request->get('payout', null);\r\n\r\n $em = $this->getDoctrine()->getManager();\r\n\r\n $payout = $em->find('YilinkerCoreBundle:Payout', $payoutId);\r\n\r\n if (!$payout) {\r\n throw $this->createNotFoundException('Sorry not existing');\r\n }\r\n\r\n return $this->render('YilinkerBackendBundle:Transaction:buyer_refund_overview.html.twig', compact('payout'));\r\n }",
"public function decline(Request $request){\n $trnsId=\t$request->transId;\n if(!empty($trnsId)){\n $irrigation_payment = IrrigationPayment::where('transaction_no', $trnsId)->first();\n if ($irrigation_payment && $irrigation_payment->status == 1) {\n $irrigation_payment->status = 2;\n $irrigation_payment->update();\n return response([\n 'success' => true,\n 'message' => 'Payment failed.'\n ]);\n } else {\n return response([\n 'success' => false,\n 'message' => 'Invalid Transaction Number.'\n ]);\n }\n }\n }",
"public function Refund($Payload){\n\t\t\tif(empty($Payload['Body'])){\n\t\t\t\tthrow new Exception('body can not be empty.');\n\t\t\t}\n\t\t\t$Payload['Verb']='POST';\n\t\t\t$Payload['URL']='/V1/creditmemo/refund';\n\t\t\t$Payload['Body']=json_encode($Payload['Body']);\n\t\t\treturn $this->Execute($Payload);\n\t\t}",
"public function ajax_swedbank_pay_refund() {\n\t\tif ( ! wp_verify_nonce( $_REQUEST['nonce'], 'swedbank_pay' ) ) {\n\t\t\texit( 'No naughty business' );\n\t\t}\n\n\t\t$order_id = (int) $_REQUEST['order_id'];\n\t\t$order = wc_get_order( $order_id );\n\n\t\ttry {\n\t\t\t// Create the refund object.\n\t\t\t$refund = wc_create_refund(\n\t\t\t\tarray(\n\t\t\t\t\t'amount' => $order->get_total(),\n\t\t\t\t\t'reason' => __( 'Full refund.', 'swedbank-pay-woocommerce-checkout' ),\n\t\t\t\t\t'order_id' => $order_id,\n\t\t\t\t\t'refund_payment' => true\n\t\t\t\t)\n\t\t\t);\n\n\t\t\tif ( is_wp_error( $refund ) ) {\n\t\t\t\tthrow new Exception( $refund->get_error_message() );\n\t\t\t}\n\n\t\t\twp_send_json_success( __( 'Refund has been successful.', 'swedbank-pay-woocommerce-checkout' ) );\n\t\t} catch ( Exception $e ) {\n\t\t\twp_send_json_error( $e->getMessage() );\n\t\t}\n\t}",
"public function refund(Varien_Object $payment, $amount)\n {\n parent::refund($payment, $amount);\n\n /* @var Mage_Sales_Model_Order_Creditmemo $creditmemo */\n $creditmemo = $payment->getCreditmemo();\n\n $this->checkExistingRefundJob($creditmemo->getOrder());\n\n /* @var PostFinanceCheckout_Payment_Model_Service_Refund $refundService */\n $refundService = Mage::getSingleton('postfinancecheckout_payment/service_refund');\n $refund = $refundService->create($payment, $creditmemo);\n\n $refundJob = $this->createRefundJob($creditmemo->getOrder(), $refund);\n\n try {\n $refund = $refundService->refund($refundJob->getSpaceId(), $refund);\n } catch (\\PostFinanceCheckout\\Sdk\\ApiException $e) {\n if ($e->getResponseObject() instanceof \\PostFinanceCheckout\\Sdk\\Model\\ClientError) {\n $refundJob->delete();\n Mage::throwException($e->getResponseObject()->getMessage());\n } else {\n Mage::throwException(\n $this->getHelper()->__('There has been an error while sending the refund to the gateway.'));\n }\n } catch (Exception $e) {\n Mage::throwException(\n $this->getHelper()->__('There has been an error while sending the refund to the gateway.'));\n }\n\n if ($refund->getState() == \\PostFinanceCheckout\\Sdk\\Model\\RefundState::FAILED) {\n $refundJob->delete();\n Mage::throwException($this->getHelper()->translate($refund->getFailureReason()\n ->getDescription()));\n } elseif ($refund->getState() == \\PostFinanceCheckout\\Sdk\\Model\\RefundState::PENDING) {\n Mage::throwException(\n $this->getHelper()->__('The refund was requested successfully, but is still pending on the gateway.'));\n }\n\n $creditmemo->setPostfinancecheckoutExternalId($refund->getExternalId());\n $refundJob->delete();\n\n return $this;\n }",
"public function getRefundAmount()\n {\n return $this->refundAmount;\n }",
"public function instoreRefund($payload, $authToken = null);",
"public function refund(){\n\t\treturn $this->hasMany('OrderRefund','order_id','order_id');\n\t}",
"public function decline(User $user, Refund $refund)\n {\n return (new Authorize($user, 'approve_refund', $refund))->check();\n }",
"function bankopen_refund($params)\n{\n // Gateway Configuration Parameters\n $APIKey = $params['APIKey'];\n $APISecret = $params['APISecret'];\n $testMode = $params['testMode'];\n $dropdownField = $params['dropdownField'];\n $radioField = $params['radioField'];\n $textareaField = $params['textareaField'];\n\n // Transaction Parameters\n $transactionIdToRefund = $params['transid'];\n $refundAmount = $params['amount'];\n $currencyCode = $params['currency'];\n\n // Client Parameters\n $firstname = $params['clientdetails']['firstname'];\n $lastname = $params['clientdetails']['lastname'];\n $email = $params['clientdetails']['email'];\n $address1 = $params['clientdetails']['address1'];\n $address2 = $params['clientdetails']['address2'];\n $city = $params['clientdetails']['city'];\n $state = $params['clientdetails']['state'];\n $postcode = $params['clientdetails']['postcode'];\n $country = $params['clientdetails']['country'];\n $phone = $params['clientdetails']['phonenumber'];\n\n // System Parameters\n $companyName = $params['companyname'];\n $systemUrl = $params['systemurl'];\n $langPayNow = $params['langpaynow'];\n $moduleDisplayName = $params['name'];\n $moduleName = $params['paymentmethod'];\n $whmcsVersion = $params['whmcsVersion'];\n\n // perform API call to initiate refund and interpret result\n\n return array(\n // 'success' if successful, otherwise 'declined', 'error' for failure\n 'status' => 'success',\n // Data to be recorded in the gateway log - can be a string or array\n 'rawdata' => $responseData,\n // Unique Transaction ID for the refund transaction\n 'transid' => $refundTransactionId,\n // Optional fee amount for the fee value refunded\n 'fees' => $feeAmount,\n );\n}",
"public function GetRefund($payInId) {\n return $this->GetObject('payins_getrefunds', $payInId, '\\P4M\\MangoPayBundle\\MangoPaySDK\\Refund');\n }",
"public function get_company_refundpayment() {\n $invoice_id = $this->input->post('invoice');\n $company_id = $this->input->post('company');\n $company_received = $this->classtraineemodel->company_payment_recd($invoice_id);\n $user_paid = array();\n foreach ($company_received as $k => $v) {\n $user_paid[$v->user_id] = $v->amount_recd;\n }\n $company_received = $this->classtraineemodel->company_payment_refund($invoice_id);\n $user_refund = array();\n foreach ($company_received as $k => $v) {\n $user_refund[$v->user_id] = $v->refund_amount;\n }\n $company_invoice = $this->classtraineemodel->company_invoice($invoice_id);\n $company_invoice->invoice_excess_amt = (empty($company_invoice->invoice_excess_amt)) ? 0 : $company_invoice->invoice_excess_amt;\n $excess_paid = $company_invoice->invoice_excess_amt;\n $excess_refunded = empty($user_refund[0]) ? 0 : $user_refund[0];\n $excess_remain = round($excess_paid, 2) - round($excess_refunded, 2);\n $company_invoice->excess_refunded = round($excess_refunded, 2);\n $company_invoice->excess_remain = round($excess_remain, 2);\n\n $company_invoice->invoiced_on = ($company_invoice->invoiced_on == NULL || $company_invoice->invoiced_on == '0000-00-00 00:00:00') ? '' : date('d-m-Y', strtotime($company_invoice->invoiced_on));\n $company_invoice->discount_label = rtrim($this->course->get_metadata_on_parameter_id($company_invoice->discount_type), ', ');\n $gst_label = ($company_invoice->total_gst > 0) ? 'GST ON, ' : 'GST OFF ';\n if ($company_invoice->total_gst > 0) {\n $gst_label .= rtrim($this->course->get_metadata_on_parameter_id($company_invoice->gst_rule), ', ');\n }\n $company_invoice->gst_label = $gst_label;\n $company_invoice->trainees = $this->classtraineemodel->get_company_trainees_by_payid1($company_invoice->pymnt_due_id);\n foreach ($company_invoice->trainees as $k => $row) {\n $company_invoice->trainees[$k]->subsidy_recd_date = (($row->subsidy_recd_date == '0000-00-00') || ($row->subsidy_recd_date == null)) ? '' : date('d-m-Y', strtotime($row->subsidy_recd_date));\n $amount_paid = empty($user_paid[$row->user_id]) ? 0 : $user_paid[$row->user_id];\n $amount_refund = empty($user_refund[$row->user_id]) ? 0 : $user_refund[$row->user_id];\n $company_invoice->trainees[$k]->amount_paid = round($amount_paid, 2);\n $company_invoice->trainees[$k]->amount_refund = round($amount_refund, 2);\n $company_invoice->trainees[$k]->amount_remain = round(($amount_paid - $amount_refund), 2);\n }\n $company_invoice->subsidy_type = $this->classtraineemodel->get_subsidy_type($this->tenant_id);\n \n echo json_encode($company_invoice);\n exit();\n }",
"function close_payment(){\n\t\t$payment_id = $this->uri->segment(3);\n\t\t$this->Students_model->delete_transaction($payment_id);\n\t\t\n\t\t$id = $_POST['student_id'];\n\t\t$batch_id = $_POST['batch_id'];\n\t\t$this->data['fee_paid_list'] = $this->Students_model->get_students_fee_paid_detail($id, $batch_id);\n\t\t$this->data['voucher_list'] = $this->Students_model->get_students_vouchers($id, $batch_id); // For refund details echo \"Hi...\";\n\t\t\n\t\t$this->load->view('settings/students/fee_paid_list',$this->data);\n\t}",
"public function refund(InfoInterface $payment, $amount)\n {\n if (!$this->canRefund()) {\n throw new LocalizedException(__('The refund action is not available.'));\n }\n\n /* Override notification, if override notification from admin setting is active (default is active) */\n if ($this->dataConfig->isOverrideNotification() && $this->dataConfig->getNotificationEndpoint() != null) {\n Config::$overrideNotifUrl = $this->dataConfig->getNotificationEndpoint();\n }\n\n $order = $payment->getOrder();\n $paymentCode = $order->getPayment()->getMethod();\n $midtransOrderId = $payment->getAdditionalInformation('midtrans_order_id');\n $orderId = $order->getIncrementId();\n\n Config::$serverKey = $this->dataConfig->getServerKey($paymentCode);\n Config::$isProduction = $this->dataConfig->isProduction();\n\n $transaction = new Transaction();\n\n if (strpos($midtransOrderId, 'multishipping-') !== false) {\n $refundKey = $midtransOrderId . '-' . time();\n } else {\n $refundKey = 'regular-' . $midtransOrderId . '-' . time();\n }\n\n $reasonRefund = \"Refund \" . (double)$amount . \", \" . $refundKey . \", from Magento dashboard order :::\" . $orderId;\n $refundParams = [\n 'refund_key' => $refundKey,\n 'amount' => $amount,\n 'reason' => $reasonRefund\n ];\n\n /*\n * Request refund to midtrans\n */\n $response = $transaction::refund($midtransOrderId, $refundParams);\n\n if (isset($response)) {\n if (isset($response->status_code)) {\n if ($response->status_code == 200) {\n $order->addStatusToHistory(Order::STATE_PROCESSING, $reasonRefund, false);\n $order->save();\n\n $payment->setTransactionId($response->refund_key);\n $payment->setParentTransactionId($response->transaction_id);\n $payment->setIsTransactionClosed(1);\n $payment->setShouldCloseParentTransaction(!$this->canRefund());\n } else {\n $this->midtransLogger->midtransRequest('RefundRequest: ' . print_r($response, true));\n $message = isset($response->status_message) ? $response->status_message : \"Something went wrong..\";\n throw new LocalizedException(__(\"Oops, Refund request failed :\" . $message));\n }\n }\n } else {\n throw new LocalizedException(__(\"Oops, Refund request failed. Due to no response received. Please try again later.\"));\n }\n }",
"public function refund(\n \\TPkgShopPaymentTransactionManager $transactionManager,\n \\TdbShopOrder $order,\n $value,\n $invoiceNumber = null,\n $sellerRefundNote = null,\n array $orderItemList = null\n );",
"public function refund($orderId, $amount = null, $reason = '')\n {\n $payload = array_merge([\n 'order_id' => $orderId,\n 'reason' => $reason,\n ], $this->paddleOptions());\n\n if ($amount) {\n $payload['amount'] = $amount;\n }\n\n return Cashier::post('/payment/refund', $payload)['response']['refund_request_id'];\n }",
"public function proceedToRefundAction (Request $request)\r\n {\r\n $isSuccessful = false;\r\n $payoutId = null;\r\n \r\n $form = $this->createForm('backend_payout_form');\r\n $form->submit(array(\r\n 'orderProductIds' => $request->get('orderProductIds'),\r\n 'depositSlips' => $request->files->get('depositSlips'),\r\n '_token' => $request->get('_token'),\r\n ));\r\n $disputeId = $request->get('disputeId');\r\n $remark = $request->get('remark');\r\n\r\n if($form->isValid()){\r\n\r\n $em = $this->getDoctrine()->getManager();\r\n $orderProductRepository = $em->getRepository('YilinkerCoreBundle:OrderProduct');\r\n $transactionManager = $this->get('yilinker_core.service.transaction');\r\n $tokenStorage = $this->container->get('security.token_storage');\r\n $authenticatedUser = $tokenStorage->getToken()->getUser();\r\n $formData = $form->getData();\r\n \r\n $payoutResult = $transactionManager->updateStatusToRefundReleased(\r\n $formData['orderProductIds'],\r\n $authenticatedUser,\r\n Currency::CURRENCY_PH_PESO,\r\n $disputeId\r\n );\r\n $isSuccessful = $payoutResult['isSuccessful'];\r\n if($isSuccessful){\r\n foreach($payoutResult['data'] as $payout){\r\n if($formData['depositSlips']){\r\n foreach ($formData['depositSlips'] as $imageFile) {\r\n $payoutDocument = new PayoutDocument();\r\n $payoutDocument->setPayout($payout);\r\n $payoutDocument->setFile($imageFile);\r\n $payoutDocument->setDateAdded(new \\DateTime());\r\n $em->persist($payoutDocument);\r\n }\r\n }\r\n if ($remark) {\r\n $refundNote = new RefundNote;\r\n $refundNote->setNote($remark);\r\n $refundNote->setSource($payout);\r\n $em->persist($refundNote);\r\n }\r\n $payoutId = $payout->getPayoutId();\r\n }\r\n $em->flush();\r\n }\r\n }\r\n\r\n return new JsonResponse(array(\r\n 'isSuccessful' => $isSuccessful,\r\n 'payoutId' => $payoutId\r\n ));\r\n }",
"public function getRefundID()\n {\n return $this->refundID;\n }",
"protected function doRefund(\\XLite\\Model\\Payment\\BackendTransaction $transaction)\n {\n return $this->doSecondary($transaction, 'refund');\n }",
"public function refund(Varien_Object $payment, $amount)\r\n {\r\n $error = false;\r\n \t\t$szTransactionType = \"REFUND\";\r\n \t\t$orderStatus = 'pys_refunded';\r\n \t\t$szMessage = 'Payment refunded';\r\n \t\t$arAdditionalInformationArray;\r\n \t\t\r\n if($amount > 0)\r\n {\r\n $error = $this->_runCrossReferenceTransaction($payment, $szTransactionType, $amount);\r\n }\r\n else\r\n {\r\n $error = 'Error in refunding the payment';\r\n }\r\n \r\n if($error === false)\r\n {\r\n \t$order = $payment->getOrder();\r\n \t$payment = $order->getPayment();\r\n \t$arAdditionalInformationArray = $payment->getAdditionalInformation();\r\n \t\r\n \t$arAdditionalInformationArray[\"Refunded\"] = 1;\r\n \t$payment->setAdditionalInformation($arAdditionalInformationArray);\r\n \t$payment->save();\r\n \t\r\n \t$order->setState('canceled', $orderStatus, $szMessage, false);\r\n \t$order->save();\r\n }\r\n else\r\n {\r\n \tMage::throwException($error);\r\n }\r\n\t\t\r\n return $this;\r\n }",
"public function invoiceNumberRollback(){\n\t\t$this->db->query(\"LOCK TABLES `\" . __TBL_INVOICE_NUMBER . \"` WRITE\");\n\t\tif($this->invoiceNumberGet()){\n\t\t\t$newinvoice = $this->invoiceNumberGet()-1;\n\t\t\t$this->db->update(__TBL_INVOICE_NUMBER, array(\"number\"=>$newinvoice));\n\t\t\t$this->db->query(\"UNLOCK TABLES\");\n\t\t\treturn $newinvoice;\n\t\t}\n\t}",
"private function _autoRefundRecharge() {\n $where = array('state' => 0, 'add_time' => array('lt', time() - 5 * 3600));\n $list = $this->db->table('rides_recharge')->where($where)->select();\n $this->load->library('sys_model/deposit');\n $this->load->library('sys_model/orders');\n //print_r($this->db->getLastSql());\n\t//print_r($list);exit;\n foreach ($list as $rides_recharge) {\n //申请退款表里有记录\n $cashInfo = $this->sys_model_deposit->getDepositCashInfo(array('pdr_sn' => $rides_recharge['recharge_sn']));\n if ($cashInfo) {\n //$this->_changeRidesRechargeStatus($rides_recharge['recharge_sn']);\n //continue;\n }\n //print_r($cashInfo);exit;\n $order_info = $this->sys_model_orders->getOrdersInfo(array('order_sn' => $rides_recharge['order_sn']));\n if (!$order_info) {\n //$this->_changeRidesRechargeStatus($rides_recharge['recharge_sn']);\n //continue;\n }\n //print_r($order_info);exit;\n if ($order_info['order_state'] != 2) { \n //$this->_changeRidesRechargeStatus($rides_recharge['recharge_sn']);\n // continue;\n }\n\n $recharge_info = $this->sys_model_deposit->getRechargeInfo(array('pdr_sn' => $rides_recharge['recharge_sn']));\n //print_r($recharge_info);exit;\n if ($recharge_info) {\n if ($recharge_info['pdr_payment_state'] != 1) {\n continue;\n }\n\n if ($order_info['pay_amount'] >= $recharge_info['pdr_amount']) {\n $this->_changeRidesRechargeStatus($rides_recharge['recharge_sn']);\n continue;\n }\n\n $amount = $recharge_info['pdr_amount'] - $order_info['pay_amount'];\n //部分退款反映到充值表\n\t\t//print_r($amount);exit;\n $recharge_info['cash_amount'] = $amount;\n $recharge_info['admin_id'] = 0;\n $recharge_info['admin_name'] = 'system';\n\n $result = $this->sys_model_deposit->cashApply($recharge_info);\n //$result['state'] = true;\n if ($result['state']) {\n $pdc_info = array(\n 'pdc_id' => $result['data']['pdc_id'],\n 'pdc_sn' => $result['data']['pdc_sn'],\n 'pdc_user_id' => $recharge_info['pdr_user_id'],\n 'pdc_user_name' => $recharge_info['pdr_user_name'],\n 'pdc_payment_name' => $recharge_info['pdr_payment_name'],\n 'pdc_payment_code' => $recharge_info['pdr_payment_code'],\n 'pdc_payment_type' => $recharge_info['pdr_payment_type'],\n 'pdc_payment_state' => '0',\n 'pdr_amount' => $recharge_info['pdr_amount'],\n 'has_cash_amount' => 0,\n 'cash_amount' => $recharge_info['cash_amount'],\n 'pdr_sn' => $recharge_info['pdr_sn'],\n 'trace_no' => $recharge_info['trace_no'],\n 'admin_id' => $recharge_info['admin_id'],\n 'admin_name' => $recharge_info['admin_name'],\n 'pdc_type' => $recharge_info['pdr_type'],\n );\n //print_r($pdc_info);exit;\n $ssl_cert_path = DIR_SYSTEM . 'library/payment/cert/' . $this->config->get('config_wxpay_ssl_cert_path') . '/' . $recharge_info['pdr_payment_type'] . '/apiclient_cert.pem';\n $ssl_key_path = DIR_SYSTEM . 'library/payment/cert/' . $this->config->get('config_wxpay_ssl_cert_path') . '/' . $recharge_info['pdr_payment_type'] . '/apiclient_key.pem';\n //print_r($ssl_cert_path);\n //print_r($ssl_key_path);exit;\n define('WX_SSLCERT_PATH', $ssl_cert_path);\n define('WX_SSLKEY_PATH', $ssl_key_path);\n $result = $this->sys_model_deposit->wxPayRefund($pdc_info);\n if ($result['state'] == true) {\n $this->_changeRidesRechargeStatus($rides_recharge['recharge_sn']);\n $this->sys_model_orders->updateOrders(array('order_id' => $order_info['order_id']), array('refund_state' => 1));\n }\n\t\t echo 'success', \"\\n\";\n }\n }\n }\n }",
"public function queryRefundTransactionLog(string $orderReference): SpyPaymentAfterPayTransactionLogQuery;",
"public function refund_report_pdf() {\n $tenant_id = $this->tenant_id;\n $company = $this->classTraineeModel->get_company_for_paidinvoice($tenant_id);\n $companies = array();\n foreach ($company as $row) {\n $companies[$row->company_id] = $row->company_name;\n }\n $company = $this->input->get('company');\n $invoice_id = $this->input->get('invoice_id');\n $start_date = $this->input->get('start_date');\n $end_date = $this->input->get('end_date');\n $field = ($this->input->get('f')) ? $this->input->get('f') : 'inv.invoice_id';\n $order_by = ($this->input->get('o')) ? $this->input->get('o') : 'DESC';\n $tabledata = $this->reportsModel->get_refund_paid($tenant_id, NULL, NULL, $field, $order_by, $company, $invoice_id, $start_date, $end_date);\n $invs = array();\n foreach ($tabledata as $k => $row) {\n if ($row->refnd_reason == 'OTHERS') {\n $tabledata[$k]->refnd_reason = \"Others (\" . $row->refnd_reason_ot . \")\";\n } else {\n $tabledata[$k]->refnd_reason = $this->courseModel->get_metadata_on_parameter_id($row->refnd_reason);\n }\n if ($row->refund_type == 'INDV') {\n $invs[$row->invoice_id] = $row->invoice_id;\n }\n }\n $tb_user = $this->reportsModel->get_refund_paid_user($invs);\n $tableuser = array();\n foreach ($tb_user as $row) {\n $tableuser[$row->invoice_id]['name'] = $row->first_name . ' ' . $row->last_name;\n $tableuser[$row->invoice_id]['taxcode'] = $this->mask_format($row->tax_code);\n }\n $tenant_details = $this->classTraineeModel->get_tenant_masters($tenant_id);\n $tenant_details->tenant_state = rtrim($this->courseModel->get_metadata_on_parameter_id($tenant_details->tenant_state), ', ');\n $tenant_details->tenant_country = rtrim($this->courseModel->get_metadata_on_parameter_id($tenant_details->tenant_country), ', ');\n $this->load->helper('pdf_reports_helper');\n return refunds_report_pdf($tabledata, $tableuser, $tenant_details, $companies);\n }",
"public function testRefundPurchase() {\n\t\t$this->key_pairs = array(\n\t\t\t'tag' => $this->process_tag,\n\t\t\t'status' => 'completed',\n\t\t);\n\t\t$this->process_transactions = CrudTable\\read_rows( 'transactions', $this->key_pairs, false );\n\n\t\tif ( ! empty( $this->process_transactions ) ) {\n\t\t\t$request = TestHelpers::refundPurchaseRequest( $this->tag, $this->process_tag );\n\t\t\t$this->transactions = TestHelpers::refundPurchase( $this->http_client, $request );\n\n\t\t\t$this->assertIsArray( $this->transactions );\n\t\t\t$this->assertArrayHasKey( '0', $this->transactions );\n\n\t\t\t$this->assertEquals( $this->transactions[0]['alias'], $this->process_transactions[0]['alias'] );\n\t\t\t$this->assertEquals( $this->transactions[0]['user'], $this->process_transactions[0]['user'] );\n\t\t\t$this->assertEquals( $this->transactions[0]['cart'], $this->process_transactions[0]['cart'] );\n\t\t\t$this->assertEquals( $this->transactions[0]['transactionid'], $this->process_transactions[0]['transactionid'] );\n\t\t\t$this->assertEquals( abs( $this->transactions[0]['saleid'] ), abs( $this->process_transactions[0]['saleid'] ) );\n\t\t\t$this->assertEquals( $this->transactions[0]['currency'], $this->process_transactions[0]['currency'] );\n\t\t\t$this->assertEquals( $this->transactions[0]['status'], $this->process_transactions[0]['status'] );\n\t\t\t$this->assertEquals( $this->transactions[0]['saleid'], $this->process_transactions[0]['saleid'] );\n\n\t\t\t$this->assertEquals( 'refund', $this->transactions[0]['type'] );\n\t\t\t$this->assertEmpty( $this->transactions[0]['tokenid'] );\n\t\t\t$this->assertNotEmpty( $this->transactions[0]['refundid'] );\n\t\t\t$this->assertEmpty( $this->transactions[0]['redirect_url'] );\n\n\t\t} else {\n\t\t\t$request = TestHelpers::createPurchaseRequest( $this->process_tag );\n\t\t\t$transactions = TestHelpers::createPurchase( $this->http_client, $request );\n\t\t\t$this->assertIsArray( $transactions );\n\t\t\t$this->assertArrayHasKey( '0', $transactions );\n\t\t\t$this->assertNotEmpty( $transactions[0]['redirect_url'] );\n\t\t\t$this->assertEquals( 'created', $transactions[0]['status'] );\n\n\t\t\techo 'For complete REFUND PURCHASE test, you must pay and restart this tests.' . PHP_EOL;\n\t\t\techo 'Link for pay - ' . $transactions[0]['redirect_url'] . PHP_EOL;\n\t\t}\n\t}",
"public function getRefundAmount()\n {\n return $this->refund_amount;\n }",
"protected function doRefundPayment() {\n throw new \\Exception('Child classes must override this method to support payment refund.');\n }",
"function fn_yandex_checkpoint_get_refund_receipt($refund_data, $order_info, $currency)\n{\n /** @var \\Tygh\\Addons\\RusTaxes\\ReceiptFactory $receipt_factory */\n $receipt_factory = Tygh::$app['addons.rus_taxes.receipt_factory'];\n\n $receipt = $receipt_factory->createReceiptFromOrder($order_info, $currency, false);\n\n if (!$receipt) {\n return null;\n }\n\n foreach ($refund_data['products'] as $cart_id => $product) {\n if ($product['is_returned'] == 'N') {\n $receipt->removeItem($cart_id, ReceiptItem::TYPE_PRODUCT);\n } else {\n $receipt->setItemQuantity($cart_id, ReceiptItem::TYPE_PRODUCT, $product['amount']);\n }\n }\n\n if (isset($refund_data['refund_shipping']) && $refund_data['refund_shipping'] == 'N') {\n $receipt->removeItem(0, ReceiptItem::TYPE_SHIPPING);\n }\n\n if (isset($refund_data['refund_surcharge']) && $refund_data['refund_surcharge'] == 'N') {\n $receipt->removeItem(0, ReceiptItem::TYPE_SURCHARGE);\n }\n\n if (Registry::get('addons.gift_certificates.status') == 'A'\n && !empty($order_info['gift_certificates'])\n && isset($refund_data['certificates'])\n ) {\n foreach ($refund_data['certificates'] as $cart_id => $certificate) {\n if ($certificate['is_returned'] == 'N') {\n $receipt->removeItem($cart_id, ReceiptItem::TYPE_GIFT_CERTIFICATE);\n }\n }\n }\n\n /**\n * Executes after building receipt to refund via Yandex.Checkpoint, allows to modify receipt.\n *\n * @param array $refund_data Refund info (returned products, refunded shipping etc.)\n * @param array $order_info Order info\n * @param string $currency Currency code\n * @param Receipt $receipt Receipt instance\n */\n fn_set_hook('yandex_checkpoint_build_refunded_order_post', $refund_data, $order_info, $currency, $receipt);\n\n $receipt->allocateDiscountByUnit();\n\n return fn_yandex_checkpoint_convert_receipt($receipt, MWSClient::YANDEX_CHECKPOINT_RUB);\n}",
"public function CallRefund( $payKey, $transactionId, $trackingId, $receiverEmailArray, $receiverAmountArray )\r\n {\r\n /* Gather the information to make the Refund call.\r\n The variable nvpstr holds the name value pairs\r\n */\r\n \r\n $nvpstr = \"\";\r\n \r\n // conditionally required fields\r\n if (\"\" != $payKey)\r\n {\r\n $nvpstr = \"payKey=\" . urlencode($payKey);\r\n if (0 != count($receiverEmailArray))\r\n {\r\n reset($receiverEmailArray);\r\n while (list($key, $value) = each($receiverEmailArray))\r\n {\r\n if (\"\" != $value)\r\n {\r\n $nvpstr .= \"&receiverList.receiver(\" . $key . \").email=\" . urlencode($value);\r\n }\r\n }\r\n }\r\n if (0 != count($receiverAmountArray))\r\n {\r\n reset($receiverAmountArray);\r\n while (list($key, $value) = each($receiverAmountArray))\r\n {\r\n if (\"\" != $value)\r\n {\r\n $nvpstr .= \"&receiverList.receiver(\" . $key . \").amount=\" . urlencode($value);\r\n }\r\n }\r\n }\r\n }\r\n elseif (\"\" != $trackingId)\r\n {\r\n $nvpstr = \"trackingId=\" . urlencode($trackingId);\r\n if (0 != count($receiverEmailArray))\r\n {\r\n reset($receiverEmailArray);\r\n while (list($key, $value) = each($receiverEmailArray))\r\n {\r\n if (\"\" != $value)\r\n {\r\n $nvpstr .= \"&receiverList.receiver(\" . $key . \").email=\" . urlencode($value);\r\n }\r\n }\r\n }\r\n if (0 != count($receiverAmountArray))\r\n {\r\n reset($receiverAmountArray);\r\n while (list($key, $value) = each($receiverAmountArray))\r\n {\r\n if (\"\" != $value)\r\n {\r\n $nvpstr .= \"&receiverList.receiver(\" . $key . \").amount=\" . urlencode($value);\r\n }\r\n }\r\n }\r\n }\r\n elseif (\"\" != $transactionId)\r\n {\r\n $nvpstr = \"transactionId=\" . urlencode($transactionId);\r\n // the caller should only have 1 entry in the email and amount arrays\r\n if (0 != count($receiverEmailArray))\r\n {\r\n reset($receiverEmailArray);\r\n while (list($key, $value) = each($receiverEmailArray))\r\n {\r\n if (\"\" != $value)\r\n {\r\n $nvpstr .= \"&receiverList.receiver(\" . $key . \").email=\" . urlencode($value);\r\n }\r\n }\r\n }\r\n if (0 != count($receiverAmountArray))\r\n {\r\n reset($receiverAmountArray);\r\n while (list($key, $value) = each($receiverAmountArray))\r\n {\r\n if (\"\" != $value)\r\n {\r\n $nvpstr .= \"&receiverList.receiver(\" . $key . \").amount=\" . urlencode($value);\r\n }\r\n }\r\n }\r\n }\r\n\r\n /* Make the Refund call to PayPal */\r\n $resArray = $this->hash_call(\"Refund\", $nvpstr);\r\n\r\n /* Return the response array */\r\n return $resArray;\r\n }",
"public function refund($refund, $apiContext = null, $restCall = null)\n {\n ArgumentValidator::validate($this->getId(), \"Id\");\n ArgumentValidator::validate($refund, 'refund');\n $payLoad = $refund->toJSON();\n $json = self::executeCall(\n \"/v1/payments/sale/{$this->getId()}/refund\",\n \"POST\",\n $payLoad,\n null,\n $apiContext,\n $restCall\n );\n $ret = new Refund();\n $ret->fromJson($json);\n return $ret;\n }",
"function sell($amount,$symbol){\n //user should be the owner of the stock if he wants to sell\n if($symbol==\"Book\" && $this->bookstock_buy>0){\n echo $this->new_account.\" sold Book Stock\\n\";\n echo \"Transaction Time:\";\n echo date('Y-m-d H:i:s').\"\\n\";\n echo \"Total balance of \".$this->new_account.\" is:\".$this->totalamount.\"\\n\";\n $this->bookstock_buy--;\n $this->object_linkedlist->remove_last();\n }\n elseif($symbol==\"Newspaper\" && $this->newspaperstock_buy>0){\n echo $this->new_account.\" sold Newspaper Stock\\n\";\n echo \"Transaction Time:\";\n echo date('Y-m-d H:i:s').\"\\n\";\n echo \"Total balance of \".$this->new_account.\" is:\".$this->totalamount.\"\\n\";\n $this->newspaperstock_buy--;\n $this->object_linkedlist->remove_last();\n }\n }",
"public function refund($orderId, array $options = [])\n {\n return Paddle::refundPayment($orderId, $options);\n }",
"public function unRsvPart($sender, $param)\n\t{\n\t\t$result = $errors = array();\n\t\ttry\n\t\t{\n\t\t\tif(!isset($param->CallbackParameter->selectedIds) || count($selectedIds = ($param->CallbackParameter->selectedIds)) === 0)\n\t\t\t\tthrow new Exception(\"Please select a request first!\");\n\t\t\t$request = Factory::service(\"FacilityRequest\")->get($selectedIds[0]);\n\t\t\tif(!$request instanceof FacilityRequest)\n\t\t\t\tthrow new Exception(\"Invalid facility request id provided(={$selectedIds[0]})!\");\n\n\t\t\tif(!isset($param->CallbackParameter->unResrvInfo))\n\t\t\t\tthrow new Exception(\"No search unResrvInfo passed in!\");\n\t\t\t$unResrvInfo = $param->CallbackParameter->unResrvInfo;\n\t\t\t$result['piId'] = isset($unResrvInfo->piId) ? trim($unResrvInfo->piId) : '';\n\t\t\t$comments = isset($unResrvInfo->comment) ? trim($unResrvInfo->comment) : '';\n\n\t\t\t$pi = Factory::service(\"PartInstance\")->get($result['piId']);\n\t\t\tif(!$pi instanceof PartInstance)\n\t\t\t\tthrow new Exception(\"Invalid part instance id provided(={$result['piId']})!\");\n\n\t\t\t$result['qty'] = 0 - $pi->getQuantity();\n\t\t\t$this->_ownerWarehouse = $this->getOwnerWarehouse();\n\n\t\t\tif ($this->_reportServerRedirectEnabled)\n\t\t\t\tDao::prepareNewConnection(Dao::DB_MAIN_SERVER); //reconnect to main server, if redirection is ON\n\n\t\t\tFactory::service(\"FacilityRequest\")->unreservePI($request, $pi,$this->_ownerWarehouse, $comments);\n\t\t}\n\t\tcatch(Exception $ex)\n\t\t{\n\t\t\t$errors[] = $this->_getErrorMsg($ex->getMessage());\n\t\t}\n\n\t\tif ($this->_reportServerRedirectEnabled)\n\t\t\tDao::prepareNewConnection(Dao::DB_REPORT_SERVER); //reconnect to report server, if redirection is ON\n\n\t\tif (empty($errors))\n\t\t\t$result[\"requests\"] = $this->_getData(false,null ,$totalRows, 'slaEnd', 'asc', $selectedIds);\n\n\t\t$this->responseLabel->Text = htmlentities(Core::getJSONResponse($result, $errors));\n\t}",
"public function reverseCurrentTransaction($pupil_id){\n \n $query = mysql_query(\"SELECT DISTINCT FROM fee_payments WHERE pupil_id'$pupil_id'\");\n \n }",
"public function store(Request $request)\n {\n $request->validate([\n 'payment_id' => 'required|integer',\n 'amount' => 'required|integer|lte:paid',\n 'method' => 'required',\n ]);\n\n if (!Payment::find($request->payment_id)) {\n return redirect()->back()->with('info', 'Payment not found');\n }\n\n $refund = new PaymentReturn();\n $refund->payment_id = $request->payment_id;\n if (!($refund->accountant_id = Accountant::active()->id)) {\n return redirect(route('accountant.index'))->with('info','Set an accountant first');\n }\n $refund->entry_id = Auth::id();\n $refund->amount = $request->amount;\n $refund->description = $request->description;\n $refund->method = $request->method;\n\n if ($request->method == 'bank') {\n $request->validate([\n 'bank' => 'required|string',\n 'account' => 'required|integer',\n 'branch' => 'required|string',\n 'cheque' => 'required|string',\n ]);\n\n $refund->bank = $request->bank;\n $refund->account = $request->account;\n $refund->branch = $request->branch;\n $refund->cheque = $request->cheque;\n $refund->attachment = $request->attachment;\n }\n elseif ($request->method == 'wallet') {\n\n $agreement = Payment::findOrFail($request->payment_id)->agreement;\n\n if ($agreement->wallet >= $request->amount) {\n $agreement->wallet -= $request->amount;\n }\n else{\n return redirect()->back()->with('info', 'Amount should not be greater then the wallet balace');\n }\n\n $agreement->save();\n }\n\n $refund->save();\n return redirect()->back()->with('success', 'Payment Refund Successfull');\n }",
"function it_exchange_refund_url_for_authorizenet( $url ) {\n\t$settings = it_exchange_get_option( 'addon_authorizenet' );\n\t$url = $settings['authorizenet-sandbox-mode'] ? AUTHORIZE_NET_AIM_API_SANDBOX_URL : AUTHORIZE_NET_AIM_API_LIVE_URL;\n\n\treturn $url;\n}",
"function spgateway_credit_refund($params) {\n\n $amount = $params['amount']; # Format: ##.##\n $TotalAmount = round($amount);\n $transid = $params['transid'];\n\n # 是否為測試模式\n $posturl = ($params['testMode']==\"on\") ? 'https://ccore.spgateway.com/MPG/mpg_gateway'\n : 'https://core.spgateway.com/MPG/mpg_gateway' ;\n\n // post data\n $PostData = http_build_query(\n array( 'RespondType' => 'String',\n 'Version' => '1.0',\n 'Amt' => $TotalAmount,\n 'TradeNo' => $transid,\n 'TimeStamp' => time(),\n 'IndexType' => '2',\n 'CloseType' => '2'\n ));\n $PostData = trim(\n bin2hex(\n mcrypt_encrypt( MCRYPT_RIJNDAEL_128,\n $params['HashKey'],\n spgateway_credit_addpadding($PostData),\n MCRYPT_MODE_CBC,\n $params['HashIV'])\n )\n );\n\n // post\n $post = array( 'MerchantID_' => $params['MerchantID'],\n 'PostData_' => $PostData);\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $posturl);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $post);\n if ($params['testMode']=='on') curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); // On dev server only!\n $result = curl_exec($ch);\n curl_close($ch);\n\n parse_str(trim($result),$result);\n\n switch($result['Status']){\n case 'SUCCESS':\n case 'TRA10045':\n return array('status'=>'success', 'rawdata'=>$result, 'transid'=>$result['TradeNo'], 'fees'=>0);\n case 'TRA10058':\n case 'TRA10675':\n case 'TRA10013':\n case 'TRA10035':\n return array('status'=>'declined', 'rawdata'=>$result);\n default:\n return array('status'=>'error', 'rawdata'=>$result);\n }\n}",
"public function refund_data() {\n $data['header'] = $this->header;\n $this->load->view('report_refund_v', $data);\n }",
"public function unsetRefundTransactionArray($index)\n {\n unset($this->refundTransactionArray[$index]);\n }",
"public function refund(array $parameters = array())\n {\n /**\n * @var \\Omnipay\\Vindicia\\Message\\RefundRequest\n */\n return $this->createRequest('\\Omnipay\\Vindicia\\Message\\RefundRequest', $parameters);\n }",
"public function renderBuyerRefundOverviewPrintAction(Request $request)\r\n {\r\n $payoutId = (int) $request->get('payout', null);\r\n\r\n $em = $this->getDoctrine()->getManager();\r\n\r\n $payout = $em->find('YilinkerCoreBundle:Payout', $payoutId);\r\n\r\n if (!$payout) {\r\n throw $this->createNotFoundException('Sorry not existing');\r\n }\r\n\r\n return $this->render('YilinkerBackendBundle:Transaction:buyer_refund_overview_print.html.twig', array(\r\n 'payout' => $payout,\r\n ));\r\n }",
"public function view_refund()\n\n {\n $itemData['item'] = Product::getrefundItem();\n\n $data = ['itemData' => $itemData];\n\n return view('admin.refund')->with($data);\n }",
"public static function getrefundItem()\n {\n \n $value=DB::table('product_refund')->join('users','users.id','product_refund.buyer_id')->join('product','product.product_id','product_refund.product_id')->orderBy('product_refund.dispute_id', 'desc')->get(); \n return $value;\n\t\n }",
"public function testSettlement()\n {\n print \"testRefund()\\n\";\n\n // TODO: Impl\n\n $this->fail();\n }",
"public function testIssueRefund()\n {\n }",
"public function refund(array $parameters = [])\n {\n return $this->createRequest('\\Omnipay\\VnPay\\Message\\RefundRequest', $parameters);\n }",
"public function refund($date = null)\n {\n return tap($this)->update(['refunded_at' => $date ?: now()]);\n }",
"public function refund($refund, $apiContext = null, $restCall = null)\n {\n ArgumentValidator::validate($this->getId(), \"Id\");\n ArgumentValidator::validate($refund, 'refund');\n $payLoad = $refund->toJSON();\n $json = self::executeCall(\n \"/v1/payments/capture/{$this->getId()}/refund\",\n \"POST\",\n $payLoad,\n null,\n $apiContext,\n $restCall\n );\n $ret = new Refund();\n $ret->fromJson($json);\n return $ret;\n }",
"public function refund(order $order, payment $payment, $amount, $countryId) {\n\t\tparent::refund($order, $amount, $countryId, $payment);\n\t\t\n\t\t//TODO: If we ever decide to allow multiple payments for an order, this needs to be changed to handle that situation.\n\t\treset($order->payments->records);\n\t\t$this->_sendRequest($this->_getVoidTransactionParameters(current($order->payments->records), $amount));\n\t\treturn $this->getSuccess();\n\t}",
"public function refund($paymentDetails)\n {\n $message = $this->gateway->refund($this->getRefundData($paymentDetails, $transactionKey));\n return $message->send();\n }"
] | [
"0.6804035",
"0.6553037",
"0.6415661",
"0.6248969",
"0.6056948",
"0.59207445",
"0.59184986",
"0.58465993",
"0.5825274",
"0.57650584",
"0.56596166",
"0.56492573",
"0.5647363",
"0.5635255",
"0.5634307",
"0.5627722",
"0.5626792",
"0.56243443",
"0.56241924",
"0.5608283",
"0.55944705",
"0.5558281",
"0.54552037",
"0.54535407",
"0.5450648",
"0.54240435",
"0.541763",
"0.5396833",
"0.5383754",
"0.5366862",
"0.53621805",
"0.5353004",
"0.5351255",
"0.5329831",
"0.532808",
"0.5327531",
"0.5326682",
"0.5294998",
"0.5247751",
"0.5239867",
"0.5229466",
"0.52177095",
"0.5210266",
"0.5201796",
"0.51978946",
"0.5124072",
"0.5121269",
"0.5104482",
"0.5101322",
"0.5091941",
"0.5088608",
"0.5065108",
"0.5052538",
"0.50276315",
"0.5023322",
"0.5019338",
"0.50189745",
"0.501288",
"0.49961832",
"0.49936417",
"0.49901327",
"0.49853444",
"0.49825037",
"0.49739578",
"0.49688646",
"0.49683893",
"0.49628392",
"0.49591437",
"0.49435267",
"0.4941424",
"0.49316135",
"0.4926574",
"0.491959",
"0.49155834",
"0.4909933",
"0.4909894",
"0.490753",
"0.49049982",
"0.49042797",
"0.48960987",
"0.4884286",
"0.4879973",
"0.4879907",
"0.48718598",
"0.48656467",
"0.48603827",
"0.48578167",
"0.4854072",
"0.4844464",
"0.48411393",
"0.4830275",
"0.48302492",
"0.48238045",
"0.48075792",
"0.47821802",
"0.47793058",
"0.47743055",
"0.47667003",
"0.47612503",
"0.47411406"
] | 0.6254354 | 3 |
Refund by transaction id. | public function byTransactionId(string $transactionId, string $refundNumber, int $totalFee, int $refundFee, array $optional = [])
{
return $this->refund($refundNumber, $totalFee, $refundFee, array_merge($optional, ['transaction_id' => $transactionId]));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function refund();",
"public function refundTransaction() {\n //not implemented\n }",
"public function refund($transactionId)\n {\n try {\n $numberOfTransactions = $this->transaction->whereTransactionId($transactionId)->count();\n\n if ($numberOfTransactions > 1) {\n return Response::HTTP_CONFLICT;\n }\n\n $transaction = $this->transactionById($transactionId); \n\n $amount = $transaction->total_amount;\n\n $refundTransaction = $transaction->replicate();\n $refundTransaction->total_amount = -1 * abs($amount);\n $refundTransaction->created_at = Carbon::parse(now());\n\n $refundTransaction->save();\n\n return Response::HTTP_CREATED;\n } catch (Exception $e) {\n Log::warning('Error: Transaction Refund Failed. Message: ' . $e->getMessage());\n return Response::HTTP_UNPROCESSABLE_ENTITY;\n } \n }",
"public function pushRefundTransaction($id)\n {\n $this->data['ecommerce']['refund']['actionField'] = array('id' => $id);\n }",
"public static function refundTransaction($transactionId, $specificAmount = null, $comment = null)\n {\n $instance = self::getInstance();\n $transaction = self::getTransactionInformations($transactionId);\n\n $params = array(\n 'version' => self::API_VERSION,\n 'transactionID' => $transactionId,\n 'payment' => array(\n 'amount' => (isset($specificAmount) ? round($specificAmount * 100) : $transaction['payment']['amount']),\n 'currency' => $transaction['payment']['currency'],\n 'mode' => 'CPT',\n 'action' => 421,\n 'contractNumber' => $transaction['payment']['contractNumber'],\n ),\n 'sequenceNumber' => null,\n 'comment' => $comment,\n );\n\n // Do refund\n $result = $instance->doRefund($params);\n\n return $result;\n }",
"public function refund($url, $orderUUID, $amount);",
"public function refund($resource_id, $amount)\n\t{\n\t\t$amount = (double)$amount;\n\t\ttry\n\t\t{\n\t\t\t$resource = $this->findSale($resource_id);\n\t\t}\n\t\tcatch(Exception $sale_exception)\n\t\t{\n\t\t\t$resource = $this->findCapture($resource_id);\n\t\t}\n\n\t\t$refund_url = false;\n\t\tforeach($resource->links as $resource_link)\n\t\t{\n\t\t\tif($resource_link->rel == 'refund')\n\t\t\t{\n\t\t\t\t$refund_url = $resource_link;\n\t\t\t}\n\t\t}\n\t\tif($refund_url === false)\n\t\t{\n\t\t\tthrow new Exception('Payment cannot be refunded.');\n\t\t}\n\n\t\t$refundRequestArray = array(\n\t\t\t\t'amount' => array(\n\t\t\t\t\t'total' => $this->_formatAmount($amount, $resource->amount->currency),\n\t\t\t\t\t'currency' => $resource->amount->currency,\n\t\t\t\t\t)\n\t\t\t);\n\t\trequire_once DIR_FS_CATALOG.'/gm/classes/JSON.php';\n\t\t$json = MainFactory::create('Services_JSON');\n\t\t$refundRequestJSON = $json->encodeUnsafe($refundRequestArray);\n\n\t\t$ppRefundRequest = MainFactory::create('PayPalRestRequest', $refund_url->method, $refund_url->href, $refundRequestJSON);\n\t\t$ppRestService = MainFactory::create('PayPalRestService');\n\t\t$response = $ppRestService->performRequest($ppRefundRequest);\n\t\t$response_object = $response->getResponseObject();\n\t\tif($response_object === false)\n\t\t{\n\t\t\t$text = MainFactory::create('PayPalText');\n\t\t\tthrow new Exception($text->get_text('error_decoding_response'));\n\t\t}\n\t\tif($response->getResponseCode() != '201')\n\t\t{\n\t\t\tthrow new Exception('Error refunding payment: '.$response_object->name.' '.$response_object->message);\n\t\t}\n\t}",
"public function refund( \\IPS\\nexus\\Transaction $transaction, $amount = NULL )\n\t{\n\t\t$extra = json_decode( $transaction->extra, TRUE );\n\t\t\n\t\t$this->api( array(\n\t\t\t'x_type'\t\t=> 'CREDIT',\n\t\t\t'x_trans_id'\t=> $transaction->gw_id,\n\t\t\t'x_amount'\t\t=> (string) ( $amount ?: $transaction->amount->amount ),\n\t\t\t'x_card_num'\t=> $extra['lastFour']\n\t\t) );\n\t}",
"public static function refund($params)\n {\n $requestor = Ferbuy_ApiRequestor::getInstance();\n\n $post_data = array(\n 'command' => $params['currency'].$params['amount'],\n 'output_type' => self::OUTPUT_TYPE,\n 'site_id' => $requestor->_siteId,\n 'transaction_id' => $params['transaction_id'],\n );\n $post_data['checksum'] = $requestor->sign($post_data);\n\n $response = $requestor->request('post', '/RefundTransaction', $post_data);\n return $response;\n }",
"public function processRefund($id_transaction_stripe, $amount, $original_transaction)\n\t{\n\t\tif (!$this->backward)\n\t\t\treturn;\n\n\t\tinclude(dirname(__FILE__).'/lib/Stripe.php');\n\t\t\\Stripe\\Stripe::setApiKey(Configuration::get('STRIPE_MODE') ? Configuration::get('STRIPE_PRIVATE_KEY_LIVE') : Configuration::get('STRIPE_PRIVATE_KEY_TEST'));\n\n\t\t/* Try to process the refund and catch any error message */\n\t\ttry\n\t\t{\n\t\t\t$charge = \\Stripe\\Charge::retrieve($id_transaction_stripe);\n\t\t\tif($original_transaction['source']==\"card\")\n\t\t\t$result_json = $charge->refund(array('amount' => $amount * 100));\n\t\t\telse\n $result_json = $charge->refunds->create(array('amount' => $amount * 100,\"refund_address\" => $original_transaction['btc_address']));\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t$this->_errors['stripe_refund_error'] = $e->getMessage();\n\t\t\tif (class_exists('Logger'))\n\t\t\t\tLogger::addLog($this->l('Stripe - Refund transaction failed').' '.$e->getMessage(), 2, null, 'Cart', (int)$this->context->cart->id, true);\n\t\t}\n\t\t\n\t\tif(!isset($this->_errors['stripe_refund_error']))\n\t\tDb::getInstance()->Execute('\n\t\tINSERT INTO '._DB_PREFIX_.'stripepro_transaction (type, source, id_stripe_customer, id_cart, id_order,\n\t\tid_transaction, amount, status, currency, cc_type, cc_exp, cc_last_digits, fee, mode, date_add)\n\t\tVALUES (\\'refund\\',\\''.$original_transaction['source'].'\\', '.(int)$original_transaction['id_stripe_customer'].', '.(int)$original_transaction['id_cart'].', '.\n\t\t(int)$original_transaction['id_order'].', \\''.pSQL($id_transaction_stripe).'\\',\n\t\t\\''.(float)$amount.'\\', \\''.(!isset($this->_errors['stripe_refund_error']) ? 'paid' : 'unpaid').'\\', \\''.pSQL($result_json->currency).'\\',\n\t\t\\'\\', \\'\\', 0, 0, \\''.(Configuration::get('STRIPE_MODE') ? 'live' : 'test').'\\', NOW())');\n\t}",
"public function refund($transactionId, $orderId, $description, array $options = array())\n {\n $params = $options;\n\n $params['IDENTIFIER'] = $this->identifier;\n $params['OPERATIONTYPE'] = 'refund';\n $params['DESCRIPTION'] = $description;\n $params['TRANSACTIONID'] = $transactionId;\n $params['VERSION'] = self::API_VERSION;\n $params['ORDERID'] = $orderId;\n\n $params['HASH'] = $this->hash($params);\n\n return $this->requests($this->getDirectLinkUrls(), $params);\n }",
"abstract public function refund( Payment $payment );",
"public function refund(Project $project, Transaction $transaction)\n {\n if (\n !$project->transactions->contains($transaction->id) ||\n empty($transaction->remote_id)\n ) {\n return $this->respondNotFound();\n }\n\n try {\n $this->stripe_transactions_service->refund($transaction->remote_id);\n\n return $this->respond('Transaction refunded successfully.');\n } catch (\\Stripe\\Error\\Base $e) {\n log_error($e);\n return $this->respondError(Lang::getFromJson('Error refund transaction.'));\n } catch (\\Exception $e) {\n log_error($e);\n return $this->respondInternalError();\n }\n }",
"function _doRefund($oID, $amount = 0) {\r\n global $db, $messageStack;\r\n $new_order_status = (int)MODULE_PAYMENT_AUTHORIZENET_ECHECK_REFUNDED_ORDER_STATUS_ID;\r\n if ($new_order_status == 0) $new_order_status = 1;\r\n $proceedToRefund = true;\r\n $refundNote = strip_tags(zen_db_input($_POST['refnote']));\r\n if (isset($_POST['refconfirm']) && $_POST['refconfirm'] != 'on') {\r\n $messageStack->add_session(MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_REFUND_CONFIRM_ERROR, 'error');\r\n $proceedToRefund = false;\r\n }\r\n if (isset($_POST['buttonrefund']) && $_POST['buttonrefund'] == MODULE_PAYMENT_AUTHORIZENET_ECHECK_ENTRY_REFUND_BUTTON_TEXT) {\r\n $refundAmt = (float)$_POST['refamt'];\r\n $new_order_status = (int)MODULE_PAYMENT_AUTHORIZENET_ECHECK_REFUNDED_ORDER_STATUS_ID;\r\n if ($refundAmt == 0) {\r\n $messageStack->add_session(MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_INVALID_REFUND_AMOUNT, 'error');\r\n $proceedToRefund = false;\r\n }\r\n }\r\n if (isset($_POST['cc_number']) && trim($_POST['cc_number']) == '') {\r\n $messageStack->add_session(MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_CC_NUM_REQUIRED_ERROR, 'error');\r\n }\r\n if (isset($_POST['trans_id']) && trim($_POST['trans_id']) == '') {\r\n $messageStack->add_session(MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_TRANS_ID_REQUIRED_ERROR, 'error');\r\n $proceedToRefund = false;\r\n }\r\n\r\n /**\r\n * Submit refund request to gateway\r\n */\r\n if ($proceedToRefund) {\r\n $submit_data = array('x_type' => 'CREDIT',\r\n 'x_card_num' => trim($_POST['cc_number']),\r\n 'x_amount' => number_format($refundAmt, 2),\r\n 'x_trans_id' => trim($_POST['trans_id'])\r\n );\r\n unset($response);\r\n $response = $this->_sendRequest($submit_data);\r\n $response_code = $response[0];\r\n $response_text = $response[3];\r\n $response_alert = $response_text . ($this->commError == '' ? '' : ' Communications Error - Please notify webmaster.');\r\n $this->reportable_submit_data['Note'] = $refundNote;\r\n $this->_debugActions($response);\r\n\r\n if ($response_code != '1') {\r\n $messageStack->add_session($response_alert, 'error');\r\n } else {\r\n // Success, so save the results\r\n $sql_data_array = array('orders_id' => $oID,\r\n 'orders_status_id' => (int)$new_order_status,\r\n 'date_added' => 'now()',\r\n 'comments' => 'REFUND INITIATED. Trans ID:' . $response[6] . ' ' . $response[4]. \"\\n\" . ' Gross Refund Amt: ' . $response[9] . \"\\n\" . $refundNote,\r\n 'customer_notified' => 0\r\n );\r\n zen_db_perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array);\r\n $db->Execute(\"update \" . TABLE_ORDERS . \"\r\n set orders_status = '\" . (int)$new_order_status . \"'\r\n where orders_id = '\" . (int)$oID . \"'\");\r\n $messageStack->add_session(sprintf(MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_REFUND_INITIATED, $response[9], $response[6]), 'success');\r\n return true;\r\n }\r\n }\r\n return false;\r\n }",
"function _getTransactionDetails($transaction_id) {\t\t\n\t\t// Set request-specific fields.\n\t\t$transactionID = urlencode($transaction_id);\n\t\t$this->nvpStr = \"&TRANSACTIONID=$transactionID\";\t\n\t\t\t\n\t\treturn $this->query(\"RefundTransaction\");\n\t}",
"public function refund($params)\n {\n return $this->request(Resource::RESOURCE_ORDER_REFUND, $params);\n }",
"protected function doRefund(\\XLite\\Model\\Payment\\BackendTransaction $transaction)\n {\n return $this->doSecondary($transaction, 'refund');\n }",
"public function refund()\n\t{\n\t\trequirePermission(\"canRefund\");\n\n\t\t$id = intval($this->input->get(\"id\"));\n\t\t$costDp = intval($this->input->get(\"costDp\"));\n\t\t$accountId = intval($this->input->get(\"accountId\"));\n\t\t\n\t\tif(!$id || !is_numeric($id))\n\t\t{\n\t\t\tdie();\n\t\t}\n\n\t\tif ($costDp != \"Free\") {\n\t\t\tif(!$costDp || !is_numeric($costDp))\n\t\t\t{\n\t\t\t\tdie();\n\t\t\t}\n\t\t}\n\n\t\tif(!$accountId || !is_numeric($accountId))\n\t\t{\n\t\t\tdie();\n\t\t}\n\n\t\tif ($costDp != \"Free\") {\n\t\t\tif ($costDp > 0) {\n\t\t\t\t$userDp = intval($this->recup_model->getDp($accountId));\n\t\t\t\tif(!$userDp || !is_numeric($userDp))\n\t\t\t\t{\n\t\t\t\t\tdie(\"Problème lors de l'acquisition des users dps.\");\n\t\t\t\t}\n\t\t\t\t$this->internal_user_model->setDp($accountId, $userDp+$costDp);\n\t\t\t}\n\t\t}\n\t\t$this->recup_model->editEtat($this->realms->getRealm(1)->getCharacters()->getConnection(), $id, 8);\n\t}",
"public function Refund($request)\n {\n $transactionID = $request->Refund->TransactionID;\n if (empty($transactionID)) {\n die(\"Refund transaction ID missing\");\n }\n $jsonRequest = $this->fixObjtoJSON($request);\n $response = $this->PostToRapidAPI(\"Transaction/$transactionID/Refund\", $jsonRequest);\n return $response;\n }",
"public function refund($mixed = null) {\n\t\t$validParameters = array(\n\t\t\t'(orderv2\\refund)',\n\t\t);\n\t\t$args = func_get_args();\n\t\t$this->_checkArguments($args, $validParameters);\n\t\treturn $this->__soapCall('refund', $this->make_soap_params($mixed));\n\t}",
"public function refund(InfoInterface $payment, $amount)\n {\n if (!$this->canRefund()) {\n throw new LocalizedException(__('The refund action is not available.'));\n }\n\n /* Override notification, if override notification from admin setting is active (default is active) */\n if ($this->dataConfig->isOverrideNotification() && $this->dataConfig->getNotificationEndpoint() != null) {\n Config::$overrideNotifUrl = $this->dataConfig->getNotificationEndpoint();\n }\n\n $order = $payment->getOrder();\n $paymentCode = $order->getPayment()->getMethod();\n $midtransOrderId = $payment->getAdditionalInformation('midtrans_order_id');\n $orderId = $order->getIncrementId();\n\n Config::$serverKey = $this->dataConfig->getServerKey($paymentCode);\n Config::$isProduction = $this->dataConfig->isProduction();\n\n $transaction = new Transaction();\n\n if (strpos($midtransOrderId, 'multishipping-') !== false) {\n $refundKey = $midtransOrderId . '-' . time();\n } else {\n $refundKey = 'regular-' . $midtransOrderId . '-' . time();\n }\n\n $reasonRefund = \"Refund \" . (double)$amount . \", \" . $refundKey . \", from Magento dashboard order :::\" . $orderId;\n $refundParams = [\n 'refund_key' => $refundKey,\n 'amount' => $amount,\n 'reason' => $reasonRefund\n ];\n\n /*\n * Request refund to midtrans\n */\n $response = $transaction::refund($midtransOrderId, $refundParams);\n\n if (isset($response)) {\n if (isset($response->status_code)) {\n if ($response->status_code == 200) {\n $order->addStatusToHistory(Order::STATE_PROCESSING, $reasonRefund, false);\n $order->save();\n\n $payment->setTransactionId($response->refund_key);\n $payment->setParentTransactionId($response->transaction_id);\n $payment->setIsTransactionClosed(1);\n $payment->setShouldCloseParentTransaction(!$this->canRefund());\n } else {\n $this->midtransLogger->midtransRequest('RefundRequest: ' . print_r($response, true));\n $message = isset($response->status_message) ? $response->status_message : \"Something went wrong..\";\n throw new LocalizedException(__(\"Oops, Refund request failed :\" . $message));\n }\n }\n } else {\n throw new LocalizedException(__(\"Oops, Refund request failed. Due to no response received. Please try again later.\"));\n }\n }",
"public function RefundTxn() {\r\n\r\n $ch = curl_init();\r\n\r\n $CURLParameters = http_build_query(array(\r\n // Our default parameters!\r\n \"key\" => $this->key,\r\n \"appid\" => $this->game,\r\n // This can vary from request to request, sometimes its steamid or steamids or even an array.\r\n \"steamid\" => $this->steamid,\r\n // Custom Queries below here.\r\n \"orderid\" => $this->orderid,\r\n ));\r\n\r\n curl_setopt($ch, CURLOPT_URL, \"https://partner.steam-api.com/\" . $this->interface . \"/RefundTxn/v2/\");\r\n\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\n curl_setopt($ch, CURLOPT_POST, 1);\r\n curl_setopt($ch, CURLOPT_POSTFIELDS, $CURLParameters);\r\n $CURLResponse = json_decode(curl_exec($ch));\r\n $CURLResponseCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\r\n curl_close($ch);\r\n\r\n\r\n // Error handling improved!\r\n\r\n if ($CURLResponseCode != 200) {\r\n if ($CURLResponseCode == 400) {\r\n throw new exceptions\\SteamRequestParameterException(\"The Order ID or another parameter is invalid!\");\r\n }\r\n if ($CURLResponseCode == 401) {\r\n throw new exceptions\\SteamException(\"App ID or API Key is invalid.\");\r\n }\r\n throw new exceptions\\SteamRequestException(\"$CURLResponseCode Request Error.\");\r\n }\r\n\r\n if ($CURLResponse->response->result == \"OK\") {\r\n return true;\r\n }\r\n\r\n throw new exceptions\\SteamRequestException(json_encode($CURLResponse->response->error));\r\n }",
"public function rollback($id);",
"public function refund($refund, $apiContext = null, $restCall = null)\n {\n ArgumentValidator::validate($this->getId(), \"Id\");\n ArgumentValidator::validate($refund, 'refund');\n $payLoad = $refund->toJSON();\n $json = self::executeCall(\n \"/v1/payments/sale/{$this->getId()}/refund\",\n \"POST\",\n $payLoad,\n null,\n $apiContext,\n $restCall\n );\n $ret = new Refund();\n $ret->fromJson($json);\n return $ret;\n }",
"public function refund($requestParameters = array());",
"public function refund($options);",
"public function setRefundId($value)\n {\n return $this->setParameter('refundId', $value);\n }",
"public function refund(\\Magento\\Payment\\Model\\InfoInterface $payment, $amount)\n {\n parent::refund($payment, $amount);\n $order = $payment->getOrder();\n $comments = $payment->getCreditMemo()->getComments();\n $grandTotal = $order->getBaseGrandTotal();\n $currencyCode = $payment->getOrder()->getBaseCurrencyCode();\n $realexAmount = $this->_helper->amountFromMagento($amount, $currencyCode);\n\n if ($grandTotal == $amount) {\n $response = $this->_remoteXml->rebate($payment, $realexAmount, $comments);\n } else {\n $response = $this->_remoteXml->rebate($payment, $realexAmount, $comments);\n //partial rebate code will come here\n }\n if (!isset($response) || !$response) {\n throw new \\Magento\\Framework\\Exception\\LocalizedException(__('The refund action failed'));\n }\n $fields = $response->toArray();\n if ($fields['RESULT'] != '00') {\n throw new \\Magento\\Framework\\Exception\\LocalizedException(\n __(\n 'The refund action failed. Gateway Response - Error ' . $fields['RESULT'] . ': ' .\n $fields['MESSAGE']\n )\n );\n }\n $payment->setTransactionId($fields['PASREF'])\n ->setParentTransactionId($payment->getAdditionalInformation('PASREF'))\n ->setTransactionAdditionalInfo(\\Magento\\Sales\\Model\\Order\\Payment\\Transaction::RAW_DETAILS, $fields);\n\n return $this;\n }",
"public function export_payment_refund($payid) {\n if (empty($payid)) {\n return show_404();\n }\n $result = $this->get_payid_details($payid, 1);\n if ($result['data']->enrolment_mode == 'COMPSPON') {\n if ($result['data']->company_id[0] == 'T') {\n $tenant_details = fetch_tenant_details($result['data']->company_id);\n $trainee_det = $tenant_details->tenant_name;\n } else {\n $company_details = $this->company->get_company_details($this->tenant_id, $result['data']->company_id);\n $trainee_det = $company_details[0]->company_name;\n }\n } else {\n $trainee_details = $this->classtraineemodel->get_trainee_by_pymnt_due_id($payid);\n $trainee_det = $trainee_details->first_name . ' ' . $trainee_details->last_name;\n $trainee_id = $trainee_details->user_id;\n }\n $this->load->helper('pdf_reports_helper');\n generate_trainee_payment_refund($result, $refund_arr, $trainee_det);\n }",
"public function processRefund($data) {\n\t\t// provide the EziDebit API endpoint\n\t\t$soapclient = new SoapClient($this->nonPci);\n\n\t\t$params = [\n\t\t\t\t'DigitalKey' => $this->digitalKey,\n\t\t\t\t'PaymentID' => $data['paymentId'],\n\t\t\t\t'BankReceiptID' => $data['bankReceiptId'],\n\t\t\t\t'RefundAmountInCents' => $data['refundAmountInCents']\n\t\t];\n\n\t\treturn $response = $soapclient->processRefund($params);\n\t}",
"public function refund(Request $request)\n {\n $merchantAuthentication = new AnetAPI\\MerchantAuthenticationType();\n $merchantAuthentication->setName(env('ANET_API_LOGIN_ID'));\n $merchantAuthentication->setTransactionKey(env('ANET_TRANSACTION_KEY'));\n\n // Set the transaction's refId\n $refId = 'ref' . time();\n\n // Create the payment data for a credit card\n $creditCard = new AnetAPI\\CreditCardType();\n $creditCard->setCardNumber($request->cc_number);\n $creditCard->setExpirationDate($request->input('expiry_year') . \"-\" . $request->input('expiry_month'));\n\n $paymentOne = new AnetAPI\\PaymentType();\n $paymentOne->setCreditCard($creditCard);\n\n //create a transaction\n $transactionRequest = new AnetAPI\\TransactionRequestType();\n $transactionRequest->setTransactionType(\"refundTransaction\");\n $transactionRequest->setAmount($request->amount);\n $transactionRequest->setPayment($paymentOne);\n $transactionRequest->setRefTransId($request->transactionReference);\n\n\n $request = new AnetAPI\\CreateTransactionRequest();\n $request->setMerchantAuthentication($merchantAuthentication);\n $request->setRefId($refId);\n $request->setTransactionRequest($transactionRequest);\n $controller = new AnetController\\CreateTransactionController($request);\n $response = $controller->executeWithApiResponse(ANetEnvironment::PRODUCTION);\n\n if ($response != null) {\n $tresponse = $response->getTransactionResponse();\n if ($response->getMessages()->getResultCode() == \"Ok\") {\n if ($tresponse != null && $tresponse->getMessages() != null) {\n $message_text = $tresponse->getMessages()[0]->getDescription() . \", Response code: \" . $tresponse->getResponseCode() . \", Refund SUCCESS: \" . $tresponse->getTransId();\n $msg_type = \"successMessage\";\n return redirect()->route('orderList')->with($msg_type, $message_text);\n } else {\n $message_text = \"Transaction Failed\";\n $msg_type = \"errorMessage\";\n if ($tresponse->getErrors() != null) {\n $message_text = $tresponse->getErrors()[0]->getErrorText();\n $msg_type = \"errorMessage\";\n }\n }\n } else {\n if ($tresponse != null && $tresponse->getErrors() != null) {\n $message_text = $tresponse->getErrors()[0]->getErrorText();\n } else {\n $message_text = $response->getMessages()->getMessage()[0]->getText();\n }\n $msg_type = \"errorMessage\";\n }\n } else {\n $message_text = \"No response returned\";\n $msg_type = \"errorMessage\";\n }\n\n return redirect()->route('refundView')->with($msg_type, $message_text);\n }",
"public function refund(order $order, payment $payment, $amount, $countryId) {\n\t\tparent::refund($order, $amount, $countryId, $payment);\n\t\t\n\t\t//TODO: If we ever decide to allow multiple payments for an order, this needs to be changed to handle that situation.\n\t\treset($order->payments->records);\n\t\t$this->_sendRequest($this->_getVoidTransactionParameters(current($order->payments->records), $amount));\n\t\treturn $this->getSuccess();\n\t}",
"public function refund($orderId, $amount = null, $reason = '')\n {\n $payload = array_merge([\n 'order_id' => $orderId,\n 'reason' => $reason,\n ], $this->paddleOptions());\n\n if ($amount) {\n $payload['amount'] = $amount;\n }\n\n return Cashier::post('/payment/refund', $payload)['response']['refund_request_id'];\n }",
"public function refundCharge($reference, $amount)\n {\n $url = 'gpx/merchant/transactions/refund';\n\n try {\n $res = $this->client->request('POST', $url, ['json' => ['ref'=>$reference, 'seckey' =>$this->config_vars['secret_key'], 'amount' => $amount]]);\n\n return $res->getBody();\n } catch (TransferException $e) {\n $response = $e->getResponse();\n $this->logger->error('An error occurred trying to refund the charge', ['request' => Psr7\\str($e->getRequest()), 'response' => Psr7\\str($e->getResponse())]);\n\n return $response->getBody();\n }\n }",
"public function deleteTransaction($id)\n {\n Transaction::where('transactionId',$id)->delete();\n return redirect()->back();\n }",
"public function testRefundPurchase() {\n\t\t$this->key_pairs = array(\n\t\t\t'tag' => $this->process_tag,\n\t\t\t'status' => 'completed',\n\t\t);\n\t\t$this->process_transactions = CrudTable\\read_rows( 'transactions', $this->key_pairs, false );\n\n\t\tif ( ! empty( $this->process_transactions ) ) {\n\t\t\t$request = TestHelpers::refundPurchaseRequest( $this->tag, $this->process_tag );\n\t\t\t$this->transactions = TestHelpers::refundPurchase( $this->http_client, $request );\n\n\t\t\t$this->assertIsArray( $this->transactions );\n\t\t\t$this->assertArrayHasKey( '0', $this->transactions );\n\n\t\t\t$this->assertEquals( $this->transactions[0]['alias'], $this->process_transactions[0]['alias'] );\n\t\t\t$this->assertEquals( $this->transactions[0]['user'], $this->process_transactions[0]['user'] );\n\t\t\t$this->assertEquals( $this->transactions[0]['cart'], $this->process_transactions[0]['cart'] );\n\t\t\t$this->assertEquals( $this->transactions[0]['transactionid'], $this->process_transactions[0]['transactionid'] );\n\t\t\t$this->assertEquals( abs( $this->transactions[0]['saleid'] ), abs( $this->process_transactions[0]['saleid'] ) );\n\t\t\t$this->assertEquals( $this->transactions[0]['currency'], $this->process_transactions[0]['currency'] );\n\t\t\t$this->assertEquals( $this->transactions[0]['status'], $this->process_transactions[0]['status'] );\n\t\t\t$this->assertEquals( $this->transactions[0]['saleid'], $this->process_transactions[0]['saleid'] );\n\n\t\t\t$this->assertEquals( 'refund', $this->transactions[0]['type'] );\n\t\t\t$this->assertEmpty( $this->transactions[0]['tokenid'] );\n\t\t\t$this->assertNotEmpty( $this->transactions[0]['refundid'] );\n\t\t\t$this->assertEmpty( $this->transactions[0]['redirect_url'] );\n\n\t\t} else {\n\t\t\t$request = TestHelpers::createPurchaseRequest( $this->process_tag );\n\t\t\t$transactions = TestHelpers::createPurchase( $this->http_client, $request );\n\t\t\t$this->assertIsArray( $transactions );\n\t\t\t$this->assertArrayHasKey( '0', $transactions );\n\t\t\t$this->assertNotEmpty( $transactions[0]['redirect_url'] );\n\t\t\t$this->assertEquals( 'created', $transactions[0]['status'] );\n\n\t\t\techo 'For complete REFUND PURCHASE test, you must pay and restart this tests.' . PHP_EOL;\n\t\t\techo 'Link for pay - ' . $transactions[0]['redirect_url'] . PHP_EOL;\n\t\t}\n\t}",
"public function refund(\\Magento\\Payment\\Model\\InfoInterface $payment, $amount)\n {\n $order = $payment->getOrder();\n $transId = $payment->getParentTransactionId();\n\n if (!$transId) {\n throw new \\Magento\\Framework\\Exception\\LocalizedException(\n __('Error issuing refund - no Transaction Id')\n );\n }\n \n $grand_total = $order->getGrandTotal();\n $total_refunded = $order->getTotalRefunded();\n $refunded_amt = $grand_total - $total_refunded;\n\n if ($refunded_amt == 0) {\n $refundStatus = 'Full Refund';\n } elseif ($refunded_amt < 0) {\n throw new \\Magento\\Framework\\Exception\\LocalizedException(\n __(\n 'Error issuing refund - Grandtotal: '.$grand_total.\n ', Total Refunded: '.$total_refunded.\n ', Amount: '.$amount\n )\n );\n } else {\n $refundStatus = 'Partial Refund';\n }\n\n $this->latitudeApi->refund($order, $transId, $amount, $refundStatus);\n return $this;\n }",
"public function refund($refund, $apiContext = null, $restCall = null)\n {\n ArgumentValidator::validate($this->getId(), \"Id\");\n ArgumentValidator::validate($refund, 'refund');\n $payLoad = $refund->toJSON();\n $json = self::executeCall(\n \"/v1/payments/capture/{$this->getId()}/refund\",\n \"POST\",\n $payLoad,\n null,\n $apiContext,\n $restCall\n );\n $ret = new Refund();\n $ret->fromJson($json);\n return $ret;\n }",
"public function refund():bool {\n request::xhr(\"orders/refund\", \"csrf_token=\".run::$runner->user->csrf.\"&id=\".substr($this->ID, 1),run::$runner->user->session);\n return true;\n }",
"public function worldlinePaymentRefund($refundId, $scopeId = null);",
"public function refund(\\Magento\\Payment\\Model\\InfoInterface $payment, $amount)\n {\n if ($this->backendAuthSession->isLoggedIn()) {\n // Get the store code\n $storeCode = $payment->getOrder()->getStore()->getCode();\n\n // Initialize the API handler\n $api = $this->apiHandler->init($storeCode);\n \n // Check the status\n if (!$this->canRefund()) {\n throw new \\Magento\\Framework\\Exception\\LocalizedException(\n __('The refund action is not available.')\n );\n }\n\n // Process the refund request\n $response = $api->refundOrder($payment, $amount);\n\n if (!$api->isValidResponse($response)) {\n throw new \\Magento\\Framework\\Exception\\LocalizedException(\n __('The refund request could not be processed.')\n );\n }\n\n // Set the transaction id from response\n $payment->setTransactionId($response->action_id);\n }\n\n return $this;\n }",
"public function getRefundId()\n {\n return $this->getParameter('refundId');\n }",
"public function getRefundID()\n {\n return $this->refundID;\n }",
"public function doRefund() {\n\t\t\n\t\t$this->load->language('extension/payment/hoolah_refund');\n\t\tif (!empty($this->request->post['transaction_id']) && isset($this->request->post['refund_full']) && !empty($this->request->post['description'])) {\n\t\t\t$this->load->model('extension/payment/hoolah');\n\n\t\t\tif ($this->request->post['refund_full'] == 0 && $this->request->post['amount'] == 0) {\n\t\t\t\t$this->session->data['error'] = $this->language->get('error_partial_amt');\n\t\t\t\t$this->response->redirect($this->url->link('extension/payment/hoolah/refund', 'token=' . $this->session->data['token'] . '&tid=' . $this->request->get['tid'] . '&order_id=' . $this->request->get['order_id'], true));\n\t\t\t} else {\n\t\t\t\t$order_transaction = $this->model_extension_payment_hoolah->getHoolahOrderTransactionStatus($this->request->get['order_id'], 'APPROVED');\n\t\t\t \n\t\t\t // get sku order\n\t\t $orders = $this->model_extension_payment_hoolah->getOrderProducts($this->request->get['order_id']);\n\t\t\n\t\t\t\tif (isset($order_transaction)) {\n\t\t\t\t $call_data['transaction_id'] = $order_transaction['id'];\n\t\t\t\t $call_data['uuid'] = $order_transaction['uuid'];\n\t\t\t\t $call_data['description'] = $this->request->post['description'];\n\t\t\t\t $call_data['order_id'] = $this->request->post['order_id'];\n\t\t\t\t \n\t\t\t\t\tif ($this->request->post['refund_full'] == 1) {\n\t\t\t\t\t\t$call_data['REFUNDTYPE'] = 'Full';\n\t\t\t\t\t\t$call_data['AMT'] = $order_transaction['total'];\n\t\t\t\t\t\n\t\t\t\t\t\t// submit to hoolah api\n\t\t\t\t\t $result = $this->model_extension_payment_hoolah->initiate_fullrefund($call_data);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$call_data['REFUNDTYPE'] = 'Partial';\n\t\t\t\t\t\t$call_data['AMT'] = $this->request->post['amount'];\n\t\t\t\t\t\t$call_data['sku'] = $orders[0]['sku'];\n\t\t\t\t\t\t$call_data['CURRENCYCODE'] = $this->request->post['currency_code'];\n\t\t\t\t\t\t\n\t\t\t\t\t\t// submit to hoolah api\n\t\t\t\t\t $result = $this->model_extension_payment_hoolah->initiate_partialrefund($call_data);\n\t\t\t\t\t}\n\t\t\t\t\t$refund_details = array();\n foreach($result->details AS $rows) {\n $refund_details[] = $rows;\n }\n \n $refund = array();\n $refund['order_id'] = $order_transaction['order_id'];\n $refund['uuid'] = $order_transaction['uuid'];\n $refund['status'] = $result->status;\n $refund['orderType'] = $order_transaction['orderType'];\n $refund['total'] = $call_data['AMT'];\n $refund['tax'] = $order_transaction['tax'];\n $refund['shipping_fee'] = $order_transaction['shipping_fee'];\n $refund['currency'] = $order_transaction['currency'];\n $refund['requestId'] = $result->requestId;\n $refund['code'] = $result->code;\n $refund['message'] = $result->message;\n $refund['details'] = json_encode($refund_details);\n $refund['createdAt'] = date('Y-m-d H:i:s');\n $refund['date_added'] = date('Y-m-d H:i:s');\n \n // save it to transaction tbl\n $this->model_extension_payment_hoolah->addHoolahOrderTransactionRefund($refund);\n \n if($result->code == 'accepted' || $result->code == 'in_process' || $result->code == 'in_process') {\n //redirect back to the order\n\t\t\t\t\t\t$this->response->redirect($this->url->link('sale/order/info', 'token=' . $this->session->data['token'] . '&order_id=' . $this->request->get['order_id'], true));\n \n } else {\n $this->session->data['error'] = $result->message;\n\t\t\t\t\t $this->response->redirect($this->url->link('extension/payment/hoolah/refund', 'token=' . $this->session->data['token'] . '&tid=' . $this->request->get['tid'] . '&order_id=' . $this->request->get['order_id'], true));\n }\n\t\t\t\t} else {\n\t\t\t\t\t$this->session->data['error'] = $this->language->get('error_data');\n\t\t\t\t\t$this->response->redirect($this->url->link('extension/payment/hoolah/refund', 'token=' . $this->session->data['token'] . '&tid=' . $this->request->get['tid'] . '&order_id=' . $this->request->get['order_id'], true));\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$this->session->data['error'] = $this->language->get('error_data');\n\t\t\t$this->response->redirect($this->url->link('extension/payment/hoolah/refund', 'token=' . $this->session->data['token'] . '&tid=' . $this->request->get['tid'] . '&order_id=' . $this->request->get['order_id'], true));\n\t\t}\n\t}",
"public function refundOrder(Request $request)\n {\n $refund_data['merc_refund_ref_no'] = $request->merc_refund_ref_no;\n $refund_data['orderid'] = $request->orderid;\n $refund_data['transaction_id'] = $request->transaction_id;\n $refund_data['transaction_date'] = $request->transaction_date;\n $refund_data['refund_amount'] = $request->refund_amount;\n $refund_data['txn_amount'] = $request->txn_amount;\n\n $response = BilldeskHmac::refundOrder($refund_data);\n }",
"public function refund($orderId, array $options = [])\n {\n return Paddle::refundPayment($orderId, $options);\n }",
"public function refund() {\n\t\t$this->load->language('extension/payment/hoolah_refund');\n\t\t$this->load->model('extension/payment/hoolah');\n\n\t\t$this->document->setTitle($this->language->get('heading_title'));\n\n\t\t$data['heading_title'] = $this->language->get('heading_title');\n\t\t$data['button_cancel'] = $this->language->get('button_cancel');\n\t\t$data['entry_transaction_id'] = $this->language->get('entry_transaction_id');\n\t\t$data['entry_full_refund'] = $this->language->get('entry_full_refund');\n\t\t$data['entry_amount'] = $this->language->get('entry_amount');\n\t\t$data['entry_message'] = $this->language->get('entry_message');\n\t\t$data['button_refund'] = $this->language->get('button_refund');\n\t\t$data['text_refund'] = $this->language->get('text_refund');\n\n\t\t$data['breadcrumbs'] = array();\n\n\t\t$data['breadcrumbs'][] = array(\n\t\t\t'text' => $this->language->get('text_home'),\n\t\t\t'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true),\n\t\t);\n\n\t\t$data['breadcrumbs'][] = array(\n\t\t\t'text' => $this->language->get('text_hoolah'),\n\t\t\t'href' => $this->url->link('extension/payment/hoolah', 'token=' . $this->session->data['token'], true),\n\t\t);\n\n\t\t$data['breadcrumbs'][] = array(\n\t\t\t'text' => $this->language->get('heading_title'),\n\t\t\t'href' => $this->url->link('extension/payment/hoolah/refund', 'token=' . $this->session->data['token'], true),\n\t\t);\n \n\t\t//button actions\n\t\t$data['action'] = $this->url->link('extension/payment/hoolah/doRefund', 'token=' . $this->session->data['token'] . '&tid=' . $this->request->get['tid'] . '&order_id=' . $this->request->get['order_id'], true);\n\t\t$data['cancel'] = $this->url->link('sale/order', 'token=' . $this->session->data['token'], true);\n\n\t\t$transaction_id = $this->request->get['tid'];\n \n $transaction = $this->model_extension_payment_hoolah->getHoolahOrderTransactionId($transaction_id);\n \n $data['order_id'] = $this->request->get['order_id'];\n $data['transaction_id'] = $transaction['uuid'];\n\t\t$data['total'] = $transaction['total'];\n\t\t$data['currency_code'] = $transaction['currency'];\n\n\t\t$refunded = number_format($this->model_extension_payment_hoolah->getRefundedTotal($transaction['uuid']), 2);\n\t\t\n\t\t$this->load->model('sale/order');\n $order = $this->model_sale_order->getOrder($this->request->get['order_id']);\n\n\t\tif ($refunded != 0.00) {\n\t\t\t$data['refund_available'] = number_format($order['total'] - $refunded, 2);\n\t\t\t$data['attention'] = $this->language->get('text_current_refunds') . ': ' . $data['refund_available'];\n\t\t} else {\n\t\t\t$data['refund_available'] = '';\n\t\t\t$data['attention'] = '';\n\t\t}\n\n\t\t$data['token'] = $this->session->data['token'];\n\n\t\tif (isset($this->session->data['error'])) {\n\t\t\t$data['error'] = $this->session->data['error'];\n\t\t\tunset($this->session->data['error']);\n\t\t} else {\n\t\t\t$data['error'] = '';\n\t\t}\n\n\t\t$data['header'] = $this->load->controller('common/header');\n\t\t$data['column_left'] = $this->load->controller('common/column_left');\n\t\t$data['footer'] = $this->load->controller('common/footer');\n\n\t\t$this->response->setOutput($this->load->view('extension/payment/hoolah_refund', $data));\n\t}",
"public function process_refund( $order_id, $amount = null, $reason = '' ) {\n\t\t$details = $this->get_transaction_details( $order_id );\n\t\t$is_order_txn_id_active = $this->is_transaction_active( $details );\n\t\t$txn_type = $is_order_txn_id_active ? self::TXN_TYPE_REVERSAL : self::TXN_TYPE_REFUND;\n\n\t\t$order = new WC_Order( $order_id );\n\t\t$request = $this->prepare_request( $txn_type, $order );\n\t\t$response = $this->submit_request( $request );\n\t\t$is_successful = $this->handle_response( $request, $response );\n\n\t\tif ($is_successful) {\n\t\t\t$note_text = sprintf(\n\t\t\t\t'%s%s was reversed or refunded. Transaction ID: %s ',\n\t\t\t\tget_woocommerce_currency_symbol(), $amount, $response->transactionReference->transactionId\n\t\t\t);\n\n\t\t\t$order->add_order_note($note_text);\n\t\t}\n\n\t\treturn $is_successful;\n\t}",
"function filter_mellat_pay_channel_pay_refunds($transaction){\n return $transaction;\n}",
"public function restore($id)\n {\n PurchaseRequest::withTrashed()->where('id', $id)->restore();\n }",
"public function refund(Varien_Object $payment, $amount)\r\n {\r\n $error = false;\r\n \t\t$szTransactionType = \"REFUND\";\r\n \t\t$orderStatus = 'pys_refunded';\r\n \t\t$szMessage = 'Payment refunded';\r\n \t\t$arAdditionalInformationArray;\r\n \t\t\r\n if($amount > 0)\r\n {\r\n $error = $this->_runCrossReferenceTransaction($payment, $szTransactionType, $amount);\r\n }\r\n else\r\n {\r\n $error = 'Error in refunding the payment';\r\n }\r\n \r\n if($error === false)\r\n {\r\n \t$order = $payment->getOrder();\r\n \t$payment = $order->getPayment();\r\n \t$arAdditionalInformationArray = $payment->getAdditionalInformation();\r\n \t\r\n \t$arAdditionalInformationArray[\"Refunded\"] = 1;\r\n \t$payment->setAdditionalInformation($arAdditionalInformationArray);\r\n \t$payment->save();\r\n \t\r\n \t$order->setState('canceled', $orderStatus, $szMessage, false);\r\n \t$order->save();\r\n }\r\n else\r\n {\r\n \tMage::throwException($error);\r\n }\r\n\t\t\r\n return $this;\r\n }",
"public function refund( $invoiceId, $value )\n\t\t{\n\t\t\tif ( is_numeric( $invoiceId ) && is_numeric( $value ) ) {\n\t\t\t\treturn $this->_tableTransactions->update(\n\t\t\t\t\tarray (\n\t\t\t\t\t\t'refunded' => $value\n\t\t\t\t\t),\n\t\t\t\t\t\"`invoice_id` = $invoiceId\"\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn false;\n\t\t}",
"static function insertRefundRecord($reservationId, $bookingRef, $firstName, $lastName, $email, $amount, $description, $txnId, $vendorTxCode, $gateway) {\n global $wpdb;\n if (false === $wpdb->insert(\"wp_tx_refund\", array(\n 'reservation_id' => $reservationId,\n 'booking_reference' => $bookingRef,\n 'email' => $email,\n 'first_name' => $firstName,\n 'last_name' => $lastName,\n 'amount' => $amount,\n 'description' => $description,\n 'last_updated_date' => current_time('mysql')),\n array( '%d', '%s', '%s', '%s', '%s', '%f', '%s', '%s'))) {\n error_log($wpdb->last_error . \" executing sql: \" . $wpdb->last_query);\n throw new DatabaseException($wpdb->last_error);\n }\n \n $refId = $wpdb->insert_id;\n\t if ( $gateway == \"Sagepay\" ) {\n if (false === $wpdb->insert(\"wp_sagepay_tx_refund\",\n array('id' => $refId,\n 'auth_vendor_tx_code' => $vendorTxCode,\n 'last_updated_date' => current_time('mysql')),\n array('%d', '%s', '%s'))) {\n error_log($wpdb->last_error . \" executing sql: \" . $wpdb->last_query);\n throw new DatabaseException($wpdb->last_error);\n }\n }\n\t else if ( false === empty( $txnId ) ) {\n if (false === $wpdb->insert(\"wp_stripe_tx_refund\",\n array('id' => $refId, 'cloudbeds_tx_id' => $txnId, 'last_updated_date' => current_time('mysql')),\n array('%d', '%s', '%s'))) {\n error_log($wpdb->last_error . \" executing sql: \" . $wpdb->last_query);\n throw new DatabaseException($wpdb->last_error);\n }\n }\n else {\n throw new DatabaseException(\"Either txnId or vendorTxnCode must be provided.\");\n }\n }",
"public function findById($id)\n {\n $repo = \\XLite\\Core\\Database::getRepo('\\XLite\\Module\\Digiwallet\\Payment\\Model\\TargetPayRefund');\n $query = $repo->createQueryBuilder('digiwallet_refund')->where('digiwallet_refund.id = :id')->setParameter('id', $id)->getQuery();\n $result = $query->getResult();\n if(!empty($result)){\n return $result[0];\n }\n return null;\n }",
"public function refundRequest()\n {\n $request = new Request\\Refund;\n return $this->applyAuthSettings($request);\n }",
"public function make_payment_refund($order, $amount)\n {\n\n if (!($details = $this->get_payment_details($order))) {\n return null;\n }\n\n $request = array(\n 'charge_id' => $details['id'],\n 'amount' => $amount,\n );\n\n WC_Gateway_Orangepay::log('Orangepay - make_payment_refund() request parameters: ' . $order->get_order_number() . ': ' . wc_print_r($request, true));\n\n $raw_response = wp_safe_remote_post(\n $this->endpoint . '/refunds',\n array(\n 'method' => 'POST',\n 'timeout' => 300,\n 'user-agent' => 'WooCommerce/' . WC()->version,\n 'headers' => array(\n 'Content-Type' => 'application/json;',\n 'Authorization' => 'Bearer ' . $this->gateway->get_option('api_token')\n ),\n 'body' => json_encode($request),\n 'httpversion' => '1.1',\n )\n );\n\n WC_Gateway_Orangepay::log('Orangepay - make_payment_refund() response: ' . wc_print_r($raw_response, true));\n\n if (isset($raw_response['body']) && ($response = json_decode($raw_response['body'], true))) {\n if (isset($response['data'])) {\n $data = $response['data'];\n if (isset($data['charge'])) {\n $charge = $data['charge'];\n if (isset($charge['included'])) {\n foreach ($charge['included'] as $included) {\n if ($included['type'] === 'refund') {\n return $included['id'];\n }\n }\n }\n }\n }\n }\n\n return null;\n }",
"public function refund(array $options = [])\n {\n // TODO: Implement refund() method.\n }",
"public function refund(Varien_Object $payment, $amount)\n {\n parent::refund($payment, $amount);\n\n /* @var Mage_Sales_Model_Order_Creditmemo $creditmemo */\n $creditmemo = $payment->getCreditmemo();\n\n $this->checkExistingRefundJob($creditmemo->getOrder());\n\n /* @var PostFinanceCheckout_Payment_Model_Service_Refund $refundService */\n $refundService = Mage::getSingleton('postfinancecheckout_payment/service_refund');\n $refund = $refundService->create($payment, $creditmemo);\n\n $refundJob = $this->createRefundJob($creditmemo->getOrder(), $refund);\n\n try {\n $refund = $refundService->refund($refundJob->getSpaceId(), $refund);\n } catch (\\PostFinanceCheckout\\Sdk\\ApiException $e) {\n if ($e->getResponseObject() instanceof \\PostFinanceCheckout\\Sdk\\Model\\ClientError) {\n $refundJob->delete();\n Mage::throwException($e->getResponseObject()->getMessage());\n } else {\n Mage::throwException(\n $this->getHelper()->__('There has been an error while sending the refund to the gateway.'));\n }\n } catch (Exception $e) {\n Mage::throwException(\n $this->getHelper()->__('There has been an error while sending the refund to the gateway.'));\n }\n\n if ($refund->getState() == \\PostFinanceCheckout\\Sdk\\Model\\RefundState::FAILED) {\n $refundJob->delete();\n Mage::throwException($this->getHelper()->translate($refund->getFailureReason()\n ->getDescription()));\n } elseif ($refund->getState() == \\PostFinanceCheckout\\Sdk\\Model\\RefundState::PENDING) {\n Mage::throwException(\n $this->getHelper()->__('The refund was requested successfully, but is still pending on the gateway.'));\n }\n\n $creditmemo->setPostfinancecheckoutExternalId($refund->getExternalId());\n $refundJob->delete();\n\n return $this;\n }",
"public function addRefund(Am_Paysystem_Transaction_Interface $transaction, $origReceiptId, $amount = null)\n {\n return $this->addRefundInternal($transaction, $origReceiptId, InvoiceRefund::REFUND, $amount);\n }",
"public function delete_transaction($id){\n $this->load->database();\n\n return $query = $this->db->delete('tbl_transactions',array('id' => $id));\n }",
"public function CreateRefund($transferId, $refund, $idempotencyKey = null)\n {\n return $this->CreateObject('transfers_createrefunds', $refund, '\\MangoPay\\Refund', $transferId, null, $idempotencyKey);\n }",
"public function applyRefund(Order $order, array $parsedData);",
"public function restore($id)\n {\n \n $donation = Donation::onlyTrashed()->findOrFail($id);\n $donation->restore();\n\n return redirect()->route('admin.donors.show', [$donor_id]);\n }",
"public function refund(Varien_Object $payment, $amount)\n {\n parent::refund($payment, $amount);\n\n /** @var Mage_Sales_Model_Order $order */\n $order = $payment->getOrder();\n\n $this->_getHelper()->log(\"Refund Model Payment Method\");\n\n $return = $this->cancelRequest($order);\n\n if(!is_array($return)) {\n Mage::throwException($this->_getHelper()->__('Unable to process refund payment. Contact Us.'));\n }\n if($return['success'] == 0) {\n Mage::throwException($this->_getHelper()->__($return['return']));\n }\n\n try {\n $payment->setAdditionalInformation(\"cancellationId\", $return[\"return\"][\"cancellationId\"]);\n $payment->save();\n }\n catch (Exception $e) {\n Mage::logException($e);\n }\n\n return $this;\n }",
"public function restore($id)\n {\n if (!Gate::allows('quotation_delete')) {\n return abort(401);\n }\n $quotation = Quotation::onlyTrashed()->findOrFail($id);\n $quotation->restore();\n\n return redirect()->route('admin.quotations.index');\n }",
"public function refund_order(Refund $refund,RetailerOrder $order){\n $walletController = new WalletController();\n if ($order->has_user != null) {\n $user = User::find($order->has_user->id);\n if ($user->has_wallet == null) {\n\n $wallet = $walletController->wallet_create($order->has_user->id);\n } else {\n $wallet = $user->has_wallet;\n }\n } else {\n $shop = $order->has_store;\n if (count($shop->has_user) > 0) {\n if ($shop->has_user[0]->has_wallet == null) {\n $wallet = $walletController->wallet_create($shop->has_user[0]->id);\n } else {\n $wallet = $shop->has_user[0]->has_wallet;\n }\n }\n else {\n return redirect()->back()->with('error', 'Order Cant Refund Automatically Because No Wallet Found!');\n }\n }\n\n $wallet->available = $wallet->available+(double)$order->cost_to_pay;\n $wallet->save();\n /*Wallet Log*/\n $wallet_log = new WalletLog();\n $wallet_log->wallet_id = $wallet->id;\n $wallet_log->status = \"Top-up through Refund\";\n $wallet_log->amount = $order->cost_to_pay;\n $wallet_log->message = 'A Top-up of Amount '.number_format($order->cost_to_pay,2).' USD On Behalf on Refund '.$order->name.' Against Wallet ' . $wallet->wallet_token . ' At ' . now()->format('d M, Y h:i a');\n $wallet_log->save();\n\n /*Refund Order*/\n $order->status = 'cancelled';\n $order->paid = 2;\n $order->save();\n /*Order Log*/\n $order_log = new OrderLog();\n $order_log->message = \"An amount of \".$order->cost_to_pay.\" USD refunded to Wallet on \".now()->format('d M, Y h:i a');\n $order_log->status = \"refunded\";\n $order_log->retailer_order_id = $order->id;\n $order_log->save();\n\n $refund->status_id = 4;\n $refund->status = 'Closed';\n $refund->save();\n\n $tl = new RefundLog();\n $tl->message = 'A Refund Generated \"'.$refund->title.'\" against \"'.$order->name.'\" at '.now()->format('d M, Y h:i a');\n $tl->status = \"Generated\";\n $tl->refund_id = $refund->id;\n $tl->save();\n\n $this->notify->generate('Refund','Order Refund',$order->name.' Refund Approved',$refund);\n $this->inventory->OrderQuantityUpdate($order,'refund');\n return redirect()->back()->with('success','Order Refunded Successfully!');\n\n\n }",
"function cancel($id){\n\t\t$data=$this->get_transaksi_by_id($id);\n\n\t\t//get detail transkasi by id_transaksi\n\t\t$data_transaksi=$this->get_transaksi_by_kode($data->id_transaksi);\n\n\t\t$this->db->where($this->primary,$id);\n\t\t$delete=$this->db->delete($this->table_detail);\n\n\t\tif ($delete) {\n\t\t\t$this->db->where($this->kode,$data->id_transaksi);\n\t\t\t$data_transaksi->total=$data_transaksi->total - $data->TOTAL;\n\t\t\t$update=$this->db->update($this->table_name,(array)$data_transaksi);\n\n\t\t\tif($data_transaksi->total==0){\n\t\t\t\t$this->db->where($this->kode,$data->id_transaksi);\n\t\t\t\t$this->db->delete($this->table_name);\n\t\t\t}\n\t\t}\n\n\t\treturn $delete;\n\t}",
"function hook_commerce_adyen_refund_received(\\Commerce\\Adyen\\Payment\\Transaction\\Refund $transaction, \\stdClass $order) {\n\n}",
"final public static function transactionSentForRefund()\n {\n return self::get(2057);\n }",
"public function get_company_invoice_payment_refund() {\n $invoice = $this->input->post('invoice');\n $data = $this->classtraineemodel->company_invoice($invoice);\n if ($data->company_id[0] == 'T') {\n $tenant_details = fetch_tenant_details($data->company_id);\n $data->company_name = $tenant_details->tenant_name;\n } else {\n $company_details = $this->company->get_company_details($this->tenant_id, $data->company_id);\n $data->company_name = $company_details[0]->company_name;\n }\n $data->discount_label = rtrim($this->course->get_metadata_on_parameter_id($data->discount_type), ', ');\n $gst_label = ($data->total_gst > 0) ? 'GST ON, ' : 'GST OFF ';\n if ($data->total_gst > 0) {\n $gst_label .= rtrim($this->course->get_metadata_on_parameter_id($data->gst_rule), ', ');\n }\n $data->gst_label = $gst_label;\n $data->inv_date = date('d/m/Y', strtotime($data->inv_date));\n $data->amount_refund = round($data->amount_refund, 2);\n $refund_details = $refund_details = $this->classtraineemodel->get_refund_paid_details($invoice);\n foreach ($refund_details as $k => $row) {\n if ($row->refnd_reason != 'OTHERS') {\n $refund_details[$k]->refnd_reason = $this->course->get_metadata_on_parameter_id($row->refnd_reason);\n } else {\n $refund_details[$k]->refnd_reason = 'Others (' . $row->refnd_reason_ot . ')';\n }\n\n $refund_details[$k]->refund_on = date('d/m/Y', strtotime($row->refund_on));\n $refund_details[$k]->mode_of_refund = $this->course->get_metadata_on_parameter_id($row->mode_of_refund);\n }\n $res = array('data' => $data, 'refund' => $refund_details);\n echo json_encode($res);\n exit();\n }",
"public function refundAccountTransactions(AccountTransaction $accountTransaction)\n {\n $success = false;\n\n // Update transaction status to CORPO_APPROVAL_CANCELED(3) in corpo_request_services_details\n $parameters = array(\n 'requestStatus' => $this->container->getParameter('CORPO_APPROVAL_CANCELED'),\n 'reservationId' => $accountTransaction->getReservationId(),\n 'moduleId' => $accountTransaction->getModuleId()\n );\n $this->container->get('CorpoApprovalFlowServices')->updatePendingRequestServices($parameters);\n\n // Get the corresponding corpo_account_transactions record by reservation_id and moduleid\n $requestAccountTransaction = $this->em->getRepository('CorporateBundle:CorpoAccountTransactions')->getAccountTransactionsByReservationId($accountTransaction->getReservationId(), $accountTransaction->getModuleId());\n\n if (!empty($requestAccountTransaction)) {\n // Add a new transaction to corpo_account_transactions\n $params = array(\n 'accountId' => $requestAccountTransaction['al_accountId'],\n 'userId' => $requestAccountTransaction['al_userId'],\n 'requestDetailId' => $requestAccountTransaction['al_requestDetailId'],\n 'reservationId' => $requestAccountTransaction['al_reservationId'],\n 'moduleId' => $requestAccountTransaction['al_moduleId'],\n );\n\n // If amountToRefund is 0, add a new transaction to revert the whole transaction\n if ($accountTransaction->getAmountToRefund() == 0) {\n $params['currencyCode'] = $requestAccountTransaction['al_currencyCode'];\n $params['amount'] = floatval($requestAccountTransaction['al_amount']) * -1;\n $params['amountFBC'] = floatval($requestAccountTransaction['al_amountFBC']) * -1;\n $params['amountSBC'] = floatval($requestAccountTransaction['al_amountSBC']) * -1;\n $params['amountAccountCurrency'] = floatval($requestAccountTransaction['al_amountAccountCurrency']) * -1;\n $params['description'] = $this->translator->trans(\"Full refund for reservation #\").$accountTransaction->getReservationId();\n\n $success = $this->em->getRepository('CorporateBundle:CorpoAccountTransactions')->addAccountTransactions($params);\n }\n // If we have amountToRefund, add a new transaction to deduct that passed amount only from the account\n else {\n $params['currencyCode'] = $accountTransaction->getCurrency();\n $params['amount'] = floatval($accountTransaction->getAmountToRefund()) * -1;\n $params['description'] = $this->translator->trans(\"Partial refund for reservation #\").$accountTransaction->getReservationId();\n\n $success = $this->addAccountTransactions($params);\n }\n\n // If we have cancellationFees passed, add a new transaction to add the cancellation fees to the account\n if ($accountTransaction->getcancellationFees() > 0) {\n $params['currencyCode'] = $accountTransaction->getCurrency();\n $params['amount'] = $accountTransaction->getcancellationFees();\n $params['description'] = $this->translator->trans(\"Cancellation fees for reservation #\").$accountTransaction->getReservationId();\n\n $success = $this->addAccountTransactions($params);\n }\n }\n\n return $success;\n }",
"public function destroy($id)\n {\n $transaction = \\App\\Transaction::findOrFail($id);\n $transaction->delete();\n\n return redirect()->route('transactions.index')->with('success', 'Data invoice baru berhasil di hapus');\n }",
"public function delete($id)\n\t{\n\t\t$type = $this->transactions->delete($id) ? 'success' : 'error';\n\n\t\t$this->alerts->{$type}(\n\t\t\ttrans(\"ocs/finance::transactions/message.{$type}.delete\")\n\t\t);\n\n\t\treturn redirect()->route('admin.ocs.finance.transactions.all');\n\t}",
"public function ajax_swedbank_pay_refund() {\n\t\tif ( ! wp_verify_nonce( $_REQUEST['nonce'], 'swedbank_pay' ) ) {\n\t\t\texit( 'No naughty business' );\n\t\t}\n\n\t\t$order_id = (int) $_REQUEST['order_id'];\n\t\t$order = wc_get_order( $order_id );\n\n\t\ttry {\n\t\t\t// Create the refund object.\n\t\t\t$refund = wc_create_refund(\n\t\t\t\tarray(\n\t\t\t\t\t'amount' => $order->get_total(),\n\t\t\t\t\t'reason' => __( 'Full refund.', 'swedbank-pay-woocommerce-checkout' ),\n\t\t\t\t\t'order_id' => $order_id,\n\t\t\t\t\t'refund_payment' => true\n\t\t\t\t)\n\t\t\t);\n\n\t\t\tif ( is_wp_error( $refund ) ) {\n\t\t\t\tthrow new Exception( $refund->get_error_message() );\n\t\t\t}\n\n\t\t\twp_send_json_success( __( 'Refund has been successful.', 'swedbank-pay-woocommerce-checkout' ) );\n\t\t} catch ( Exception $e ) {\n\t\t\twp_send_json_error( $e->getMessage() );\n\t\t}\n\t}",
"public function destroy($id)\n {\n $depositRefund = $this->depositRefundRepository->findWithoutFail($id);\n\n if (empty($depositRefund)) {\n Flash::error('Deposit Refund not found');\n\n return redirect(route('depositRefunds.index'));\n }\n\n $this->depositRefundRepository->delete($id);\n\n Flash::success('Deposit Refund deleted successfully.');\n\n return redirect(route('depositRefunds.index'));\n }",
"function hook_commerce_adyen_refund_rejected(\\Commerce\\Adyen\\Payment\\Transaction\\Refund $transaction, \\stdClass $order) {\n\n}",
"public static function refund_vat_number( $refund_id ) {\n\t\tupdate_post_meta( $refund_id, '_billing_vat_number', get_post_meta( wp_get_post_parent_id( $refund_id ), '_billing_vat_number', true ) );\n\t\tupdate_post_meta( $refund_id, '_billing_country', get_post_meta( wp_get_post_parent_id( $refund_id ), '_billing_country', true ) );\n\t\tupdate_post_meta( $refund_id, '_order_currency', get_post_meta( wp_get_post_parent_id( $refund_id ), '_order_currency', true ) );\n\t}",
"function createRefund($payload, $charge_id) {\r\n $end_point = $this->tpi_server_domain . '/payment/xendit/credit-card/charges/' . $charge_id . '/refund';\r\n\r\n $args = array(\r\n 'headers' => $this->defaultHeader(),\r\n 'timeout' => WC_Xendit_PG_API::DEFAULT_TIME_OUT,\r\n 'body' => json_encode($payload)\r\n );\r\n $response = wp_remote_post($end_point, $args);\r\n $jsonResponse = json_decode($response['body'], true);\r\n\r\n return $jsonResponse;\r\n }",
"public function GetRefund($payInId) {\n return $this->GetObject('payins_getrefunds', $payInId, '\\P4M\\MangoPayBundle\\MangoPaySDK\\Refund');\n }",
"public function refund(\n \\TPkgShopPaymentTransactionManager $transactionManager,\n \\TdbShopOrder $order,\n $value,\n $invoiceNumber = null,\n $sellerRefundNote = null,\n array $orderItemList = null\n );",
"public function refund(){\n\t\treturn $this->hasMany('OrderRefund','order_id','order_id');\n\t}",
"function submit_refund_to_taxamo( $payment_id, $new_status, $old_status ) {\n\n global $edd_options;\n\n if ( 'refunded' != $new_status )\n return;\n\n\n // Get Taxamo Tansaction Key.\n $payment_meta = edd_get_payment_meta( $payment_id );\n $taxamo_transaction_lines = $payment_meta['taxamo_transaction_lines'];\n $transaction_key = $payment_meta['taxamo_transaction_key'];\n\n // Get Order Total and create an array for it.\n foreach ( $taxamo_transaction_lines as $taxamo_transaction_line ) {\n $line_key = $taxamo_transaction_line['taxamo_line_key'];\n $amount = $taxamo_transaction_line['taxamo_total_amount'];\n\n $taxamo_body_array = array( \"total_amount\"=>$amount,\n \"line_key\" => $line_key );\n $taxamo_body_json = json_encode( $taxamo_body_array );\n\n // Create Taxamo Object and Submit a refund\n $private_key = $edd_options['taxedd_private_token'];\n $refundtaxamo = new Taxamo( new APIClient( $private_key, 'https://api.taxamo.com' ) );\n $resp = $refundtaxamo->createRefund( $transaction_key, $taxamo_body_array );\n }\n }",
"public function void_order_refunds( $order_id ) {\n\n\t\t$order = wc_get_order( $order_id );\n\n\t\tif ( ! $order ) {\n\t\t\treturn;\n\t\t}\n\n\t\t/**\n\t\t * Filter whether refunds should be voided along with their parent order.\n\t\t *\n\t\t * @since 1.0.0\n\t\t * @param bool $void_refunds\n\t\t */\n\t\tif ( ! apply_filters( 'wc_avatax_void_order_refunds', true ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t/**\n\t\t * Fire before voiding order refunds.\n\t\t *\n\t\t * @since 1.0.0\n\t\t * @param int $order_id The order ID\n\t\t */\n\t\tdo_action( 'wc_avatax_before_order_refunds_voided', $order_id );\n\n\t\t$refunds = $order->get_refunds();\n\t\t$failed_refunds = array();\n\n\t\tforeach ( $refunds as $refund ) {\n\n\t\t\ttry {\n\n\t\t\t\t$response = wc_avatax()->get_api()->void_refund( $refund );\n\n\t\t\t\t$this->add_status( $refund, 'voided' );\n\n\t\t\t\t$void_data = $response->get_void_data();\n\n\t\t\t\t// Set a couple of reference meta values in case we need them in the future\n\t\t\t\tupdate_post_meta( SV_WC_Order_Compatibility::get_prop( $refund, 'id' ), '_wc_avatax_transaction_id', $void_data['transaction_id'] );\n\t\t\t\tupdate_post_meta( SV_WC_Order_Compatibility::get_prop( $refund, 'id' ), '_wc_avatax_doc_id', $void_data['document_id'] );\n\n\t\t\t\t$order->add_order_note( sprintf( __( 'Refund #%s voided in Avalara', 'woocommerce-avatax' ), SV_WC_Order_Compatibility::get_prop( $refund, 'id' ) ) );\n\n\t\t\t} catch ( SV_WC_API_Exception $e ) {\n\n\t\t\t\tif ( wc_avatax()->logging_enabled() ) {\n\t\t\t\t\twc_avatax()->log( $e->getMessage() );\n\t\t\t\t}\n\n\t\t\t\t$this->add_status( $refund, 'error' );\n\n\t\t\t\t$failed_refunds[] = SV_WC_Order_Compatibility::get_prop( $refund, 'id' );\n\t\t\t}\n\t\t}\n\n\t\t// If something went wrong, leave an order note\n\t\tif ( ! empty( $failed_refunds ) ) {\n\n\t\t\t// Generalize the note if all refunds failed\n\t\t\tif ( count( $refunds ) === count( $failed_refunds ) ) {\n\n\t\t\t\t$error = __( 'Refunds could not be voided. Please void manually from your Avalara Control Panel.', 'woocommerce-avatax' );\n\n\t\t\t// Otherwise, list the refund IDs\n\t\t\t} else {\n\n\t\t\t\t$refund_ids = implode( ', #', $failed_refunds );\n\n\t\t\t\t$error = sprintf( __( 'Some refunds could not be voided. Please void refund %s manually from your Avalara Control Panel.', 'woocommerce-avatax' ),\n\t\t\t\t\t'#' . $refund_ids\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t$order->add_order_note( $this->error_prefix . ' ' . $error );\n\t\t}\n\n\t\t/**\n\t\t * Fire after voiding order refunds.\n\t\t *\n\t\t * @since 1.0.0\n\t\t * @param int $order_id The order ID\n\t\t */\n\t\tdo_action( 'wc_avatax_after_order_refunds_voided', $order_id );\n\t}",
"public function delete($id){\n $conditions = \"id=\".$id;\n if( $this->transactions->delete(\"transactions\",$conditions)){\n $this->redirect(array(\"controller\"=>\"transactions\"));\n }else{\n $this->redirect(array(\"controller\"=>\"transactions\",\"method\"=>\"add\"));\n }\n }",
"public function rollback(string $transactionId): bool;",
"public function Refund($Payload){\n\t\t\tif(empty($Payload['Body'])){\n\t\t\t\tthrow new Exception('body can not be empty.');\n\t\t\t}\n\t\t\t$Payload['Verb']='POST';\n\t\t\t$Payload['URL']='/V1/creditmemo/refund';\n\t\t\t$Payload['Body']=json_encode($Payload['Body']);\n\t\t\treturn $this->Execute($Payload);\n\t\t}",
"public function testRefund()\n {\n print \"testRefund()\\n\";\n\n // TODO: Impl\n\n $this->fail();\n }",
"public function restore($id)\n {\n if (! Gate::allows('invoice_delete')) {\n return abort(401);\n }\n $invoice = Invoice::onlyTrashed()->findOrFail($id);\n $invoice->restore();\n\n return redirect()->route('admin.invoices.index');\n }",
"public function refund(Collection $order)\r\n {\r\n }",
"public function refund($paymentDetails)\n {\n $message = $this->gateway->refund($this->getRefundData($paymentDetails, $transactionKey));\n return $message->send();\n }",
"public function refundCancel($refundHandle);",
"public function BeanstreamRefund($paymentInfo=array()) {\t\r\n\t\t$amount=urlencode($paymentInfo['amount']);\t\t\r\n\t\t$transactionID=urlencode($paymentInfo['transactionID']);\r\n\t\t$orderno=urlencode($paymentInfo['orderno']);\t\t\t\r\n $currencyCode=strtolower($paymentInfo['currency']);\t\t\t\r\n\t\t$nvpStr = \"&trnType=R&trnOrderNumber=$orderno&adjId=$transactionID&trnAmount=$amount\";\t\t\r\n\t\t$resArray=$this->hash_call('ReturnType',$nvpStr,$currencyCode);\r\n\t\treturn $resArray;\r\n\t\t\r\n\t}",
"public function restore($id)\n {\n if (! Gate::allows('payslip_delete')) {\n return abort(401);\n }\n $payslip = Payslip::onlyTrashed()->findOrFail($id);\n $payslip->restore();\n\n return redirect()->route('admin.payslips.index');\n }",
"public function destroy($id)\n {\n \tif(Auth::user()->user_type != 'admin'){\n \t\treturn back()->with('error',_lang('Permission denied !'));\n \t}\n \t\n \tDB::beginTransaction();\n\t\t//Delete Deposit\n $deposit = Deposit::find($id);\n $deposit->delete();\n\t\t\n\t\t//Delete Transaction\n\t\t$transaction = Transaction::where('ref_id',$id)\n\t\t ->where('type','!=','withdraw');\n\t\t$transaction->delete();\n\t\tDB::commit();\n\t\t\n return redirect()->route('deposit.index')->with('success',_lang('Deleted Sucessfully'));\n }",
"public function instoreRefund($payload, $authToken = null);",
"protected function _processTransactionPaymentRefunded($parameters) {\n\t\t\t$invoices = $invoiceData = $invoiceDeductions = $orderMergeData = $processedInvoiceIds = $pendingInvoiceOrders = $transactionData = $unpaidInvoiceIds = $userData = array();\n\n\t\t\tif (\n\t\t\t\t!empty($parameters['invoice_id']) &&\n\t\t\t\t!empty($parameters['user'])\n\t\t\t) {\n\t\t\t\t$invoice = $this->_call('invoices', array(\n\t\t\t\t\t'methodName' => 'invoice',\n\t\t\t\t\t'methodParameters' => array(\n\t\t\t\t\t\t'invoices',\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'conditions' => array(\n\t\t\t\t\t\t\t\t'id' => $parameters['invoice_id']\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t));\n\n\t\t\t\tif (!empty($invoice['data'])) {\n\t\t\t\t\t$invoiceDeductions = $this->_call('invoices', array(\n\t\t\t\t\t\t'methodName' => 'calculateDeductionsFromInvoice',\n\t\t\t\t\t\t'methodParameters' => array(\n\t\t\t\t\t\t\t$invoice['data']['invoice'],\n\t\t\t\t\t\t\t$parameters['payment_amount']\n\t\t\t\t\t\t)\n\t\t\t\t\t));\n\t\t\t\t\t$amountToDeductFromBalance = min(0, $invoiceDeductions['remainder']);\n\n\t\t\t\t\tforeach ($invoiceDeductions as $key => $invoiceDeduction) {\n\t\t\t\t\t\t$processedInvoiceIds[] = $invoiceDeduction['id'];\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($amountToDeductFromBalance < 0) {\n\t\t\t\t\t\t$invoiceDeductions['balance'] = array(\n\t\t\t\t\t\t\t'amount_deducted' => ($amountDeductedFromBalance = round(max(($parameters['user']['balance'] * -1), $amountToDeductFromBalance) * 100) / 100),\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$invoiceDeductions['remainder'] = $amountToDeductFromBalance - $amountDeductedFromBalance;\n\t\t\t\t\t\t$userData = array(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'id' => $parameters['user']['id'],\n\t\t\t\t\t\t\t\t'balance' => max(0, $amountToRefundExceedingBalance = round(($parameters['user']['balance'] + $amountToDeductFromBalance) * 100) / 100)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tif ($amountToRefundExceedingBalance < 0) {\n\t\t\t\t\t\t\t$balanceTransactions = $this->fetch('transactions', array(\n\t\t\t\t\t\t\t\t'conditions' => array(\n\t\t\t\t\t\t\t\t\t'payment_method_id' => 'balance',\n\t\t\t\t\t\t\t\t\t'processed' => true,\n\t\t\t\t\t\t\t\t\t'processing' => false,\n\t\t\t\t\t\t\t\t\t'transaction_method' => 'PaymentCompleted',\n\t\t\t\t\t\t\t\t\t'user_id' => $parameters['user']['id'],\n\t\t\t\t\t\t\t\t\t'NOT' => array(\n\t\t\t\t\t\t\t\t\t\t'invoice_id' => $processedInvoiceIds\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'fields' => array(\n\t\t\t\t\t\t\t\t\t'id',\n\t\t\t\t\t\t\t\t\t'invoice_id',\n\t\t\t\t\t\t\t\t\t'payment_amount',\n\t\t\t\t\t\t\t\t\t'payment_transaction_id',\n\t\t\t\t\t\t\t\t\t'plan_id'\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'sort' => array(\n\t\t\t\t\t\t\t\t\t'field' => 'created',\n\t\t\t\t\t\t\t\t\t'order' => 'DESC'\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t));\n\n\t\t\t\t\t\t\tif (!empty($balanceTransactions['count'])) {\n\t\t\t\t\t\t\t\tforeach ($balanceTransactions['data'] as $balanceTransaction) {\n\t\t\t\t\t\t\t\t\tif (!empty($balanceTransaction['invoice_id'])) {\n\t\t\t\t\t\t\t\t\t\t$invoice = $this->_call('invoices', array(\n\t\t\t\t\t\t\t\t\t\t\t'methodName' => 'invoice',\n\t\t\t\t\t\t\t\t\t\t\t'methodParameters' => array(\n\t\t\t\t\t\t\t\t\t\t\t\t'invoices',\n\t\t\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'conditions' => array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'id' => $balanceTransaction['invoice_id']\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t));\n\n\t\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t\t!empty($invoice['data']) &&\n\t\t\t\t\t\t\t\t\t\t\t$amountToRefundExceedingBalance < 0\n\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\t$invoiceDeductions = $this->_call('invoices', array(\n\t\t\t\t\t\t\t\t\t\t\t\t'methodName' => 'calculateDeductionsFromInvoice',\n\t\t\t\t\t\t\t\t\t\t\t\t'methodParameters' => array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t$invoice['data']['invoice'],\n\t\t\t\t\t\t\t\t\t\t\t\t\tmax(min(($balanceTransaction['payment_amount'] * -1), $amountToRefundExceedingBalance), $amountToRefundExceedingBalance),\n\t\t\t\t\t\t\t\t\t\t\t\t\t$invoiceDeductions\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\t\t\t\t\t$amountToRefundExceedingBalance = min(0, $invoiceDeductions['remainder']);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tforeach ($invoiceDeductions as $key => $invoiceDeduction) {\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t!isset($invoiceDeduction['amount_deducted']) ||\n\t\t\t\t\t\t\t$invoiceDeduction['amount_deducted'] >= 0\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tunset($invoiceDeductions[$key]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (!empty($invoiceDeduction['id'])) {\n\t\t\t\t\t\t\t\t$invoiceDeductionData = array(\n\t\t\t\t\t\t\t\t\t'amount_paid' => round(($invoiceDeduction['amount_paid'] + $invoiceDeduction['amount_deducted']) * 100) / 100,\n\t\t\t\t\t\t\t\t\t'id' => $invoiceDeduction['id'],\n\t\t\t\t\t\t\t\t\t'payable' => true,\n\t\t\t\t\t\t\t\t\t'remainder_pending' => $invoiceDeduction['remainder_pending']\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\tif (!empty($invoiceDeduction['status'])) {\n\t\t\t\t\t\t\t\t\t$invoiceDeductionData['status'] = $invoiceDeduction['status'];\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t$invoiceData[$invoiceDeduction['id']] = $invoiceDeductionData;\n\t\t\t\t\t\t\t\t$orderMergeParameters = array(\n\t\t\t\t\t\t\t\t\t'conditions' => array(\n\t\t\t\t\t\t\t\t\t\t'amount_merged >' => 0,\n\t\t\t\t\t\t\t\t\t\t'initial_invoice_id' => $invoiceDeduction['id']\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t'fields' => array(\n\t\t\t\t\t\t\t\t\t\t'amount_merged',\n\t\t\t\t\t\t\t\t\t\t'id',\n\t\t\t\t\t\t\t\t\t\t'initial_invoice_id'\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t'sort' => array(\n\t\t\t\t\t\t\t\t\t\t'field' => 'created',\n\t\t\t\t\t\t\t\t\t\t'order' => 'ASC'\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t$orderMerges = $this->fetch('order_merges', $orderMergeParameters);\n\n\t\t\t\t\t\t\t\tif (!empty($orderMerges['count'])) {\n\t\t\t\t\t\t\t\t\t$amountDeducted = $invoiceDeduction['amount_deducted'];\n\n\t\t\t\t\t\t\t\t\tforeach ($orderMerges['data'] as $orderMerge) {\n\t\t\t\t\t\t\t\t\t\tif ($amountDeducted === 0) {\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t$amountDeductedFromAmountMerged = $amountDeducted + $orderMerge['amount_merged'];\n\t\t\t\t\t\t\t\t\t\t$amountDeducted = min(0, $amountDeductedFromAmountMerged);\n\t\t\t\t\t\t\t\t\t\t$orderMergeData[] = array(\n\t\t\t\t\t\t\t\t\t\t\t'amount_merged' => max(0, $amountDeductedFromAmountMerged),\n\t\t\t\t\t\t\t\t\t\t\t'id' => $orderMerge['id']\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$transactionData[] = array(\n\t\t\t\t\t\t\t\t'customer_email' => $parameters['user']['email'],\n\t\t\t\t\t\t\t\t'id' => uniqid() . time(),\n\t\t\t\t\t\t\t\t'invoice_id' => $invoiceDeduction['id'],\n\t\t\t\t\t\t\t\t'parent_transaction_id' => $parameters['parent_transaction_id'],\n\t\t\t\t\t\t\t\t'payment_amount' => $invoiceDeduction['amount_deducted'],\n\t\t\t\t\t\t\t\t'payment_currency' => $this->settings['billing']['currency'],\n\t\t\t\t\t\t\t\t'payment_method_id' => $parameters['payment_method_id'],\n\t\t\t\t\t\t\t\t'payment_status' => 'completed',\n\t\t\t\t\t\t\t\t'payment_status_message' => 'Payment refunded.',\n\t\t\t\t\t\t\t\t'payment_transaction_id' => $parameters['payment_transaction_id'],\n\t\t\t\t\t\t\t\t'plan_id' => $parameters['plan_id'],\n\t\t\t\t\t\t\t\t'processed' => true,\n\t\t\t\t\t\t\t\t'transaction_charset' => $this->settings['database']['charset'],\n\t\t\t\t\t\t\t\t'transaction_date' => date('Y-m-d H:i:s', time()),\n\t\t\t\t\t\t\t\t'transaction_method' => 'PaymentRefundProcessed',\n\t\t\t\t\t\t\t\t'user_id' => $parameters['user']['id']\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!empty($invoiceDeduction['id'])) {\n\t\t\t\t\t\t\t$unpaidInvoiceIds[] = $invoiceDeduction['id'];\n\t\t\t\t\t\t\t$invoiceData[$invoiceDeduction['id']]['warning_level'] = 5;\n\t\t\t\t\t\t\t$invoiceOrders = $this->_call('invoices', array(\n\t\t\t\t\t\t\t\t'methodName' => 'retrieveInvoiceOrders',\n\t\t\t\t\t\t\t\t'methodParameters' => array(\n\t\t\t\t\t\t\t\t\t$invoiceDeduction\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t));\n\n\t\t\t\t\t\t\tforeach ($invoiceOrders as $invoiceOrder) {\n\t\t\t\t\t\t\t\tif (empty($pendingInvoiceOrders[$invoiceOrder['id']])) {\n\t\t\t\t\t\t\t\t\t$pendingInvoiceOrders[$invoiceOrder['id']] = $invoiceOrder;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif ($invoiceDeduction['amount_deducted'] < 0) {\n\t\t\t\t\t\t\t\t\t$priceActive = $pendingInvoiceOrders[$invoiceOrder['id']]['price_active'];\n\t\t\t\t\t\t\t\t\t$pendingInvoiceOrders[$invoiceOrder['id']]['price_active'] = max(0, round(($pendingInvoiceOrders[$invoiceOrder['id']]['price_active'] + $invoiceDeduction['amount_deducted']) * 100) / 100);\n\t\t\t\t\t\t\t\t\t$invoiceDeduction['amount_deducted'] = min(0, $invoiceDeduction['amount_deducted'] + $priceActive);\n\n\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t$pendingInvoiceOrders[$invoiceOrder['id']]['price_active'] === 0 &&\n\t\t\t\t\t\t\t\t\t\t$pendingInvoiceOrders[$invoiceOrder['id']]['status'] == 'active'\n\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t$pendingInvoiceOrders[$invoiceOrder['id']]['quantity_active'] = 0;\n\t\t\t\t\t\t\t\t\t\t$pendingInvoiceOrders[$invoiceOrder['id']]['status'] = 'pending';\n\t\t\t\t\t\t\t\t\t\t$actionData = array(\n\t\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t'chunks' => ($chunks = ceil($invoiceOrder['quantity_active'] / 10000)),\n\t\t\t\t\t\t\t\t\t\t\t\t'encoded_parameters' => json_encode(array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'action' => 'remove',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'data' => array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'order' => $invoiceOrder\n\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t'item_count' => ($itemCount = $invoiceOrder['quantity_active']),\n\t\t\t\t\t\t\t\t\t\t\t\t\t'table' => 'proxies'\n\t\t\t\t\t\t\t\t\t\t\t\t)),\n\t\t\t\t\t\t\t\t\t\t\t\t'foreign_key' => 'order_id',\n\t\t\t\t\t\t\t\t\t\t\t\t'foreign_value' => $invoiceOrder['id'],\n\t\t\t\t\t\t\t\t\t\t\t\t'processed' => ($processOrder = ($chunks == 1)),\n\t\t\t\t\t\t\t\t\t\t\t\t'progress' => ($processOrder ? 100 : 0),\n\t\t\t\t\t\t\t\t\t\t\t\t'user_id' => $parameters['user']['id']\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\tif ($processOrder) {\n\t\t\t\t\t\t\t\t\t\t\t$this->_call('proxies', array(\n\t\t\t\t\t\t\t\t\t\t\t\t'methodName' => 'remove',\n\t\t\t\t\t\t\t\t\t\t\t\t'methodParameters' => array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'proxies',\n\t\t\t\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'data' => array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'order' => $invoiceOrder\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t$this->save('actions', $actionData);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\tempty($unpaidInvoiceIds) ||\n\t\t\t\t\t\t\t$this->delete('invoice_items', array(\n\t\t\t\t\t\t\t\t'invoice_id' => $unpaidInvoiceIds\n\t\t\t\t\t\t\t))\n\t\t\t\t\t\t) &&\n\t\t\t\t\t\t$this->save('invoices', array_values($invoiceData)) &&\n\t\t\t\t\t\t$this->save('orders', array_values($pendingInvoiceOrders)) &&\n\t\t\t\t\t\t$this->save('order_merges', $orderMergeData) &&\n\t\t\t\t\t\t$this->save('transactions', $transactionData) &&\n\t\t\t\t\t\t$this->save('users', $userData)\n\t\t\t\t\t) {\n\t\t\t\t\t\t$mailParameters = array(\n\t\t\t\t\t\t\t'from' => $this->settings['from_email'],\n\t\t\t\t\t\t\t'subject' => 'Transaction #' . $parameters['payment_transaction_id'] . ' refund confirmation',\n\t\t\t\t\t\t\t'template' => array(\n\t\t\t\t\t\t\t\t'name' => 'payment_refunded',\n\t\t\t\t\t\t\t\t'parameters' => array(\n\t\t\t\t\t\t\t\t\t'deductions' => $transactionData,\n\t\t\t\t\t\t\t\t\t'transaction' => array_merge($parameters, array(\n\t\t\t\t\t\t\t\t\t\t'payment_method' => $this->_retrieveTransactionPaymentMethod($parameters['payment_method_id'])\n\t\t\t\t\t\t\t\t\t)),\n\t\t\t\t\t\t\t\t\t'user' => $parameters['user']\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'to' => $parameters['user']['email']\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$this->_sendMail($mailParameters);\n\n\t\t\t\t\t\tforeach ($pendingInvoiceOrders as $pendingInvoiceOrder) {\n\t\t\t\t\t\t\tif ($pendingInvoiceOrder['quantity_active'] === 0) {\n\t\t\t\t\t\t\t\t$mailParameters = array(\n\t\t\t\t\t\t\t\t\t'from' => $this->settings['from_email'],\n\t\t\t\t\t\t\t\t\t'subject' => 'Order #' . $pendingInvoiceOrder['id'] . ' is deactivated',\n\t\t\t\t\t\t\t\t\t'template' => array(\n\t\t\t\t\t\t\t\t\t\t'name' => 'order_deactivated',\n\t\t\t\t\t\t\t\t\t\t'parameters' => array(\n\t\t\t\t\t\t\t\t\t\t\t'order' => $pendingInvoiceOrder,\n\t\t\t\t\t\t\t\t\t\t\t'user' => $parameters['user']\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t'to' => $parameters['user']['email']\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t$this->_sendMail($mailParameters);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn;\n\t\t}",
"function cancel($id){\n\t\t$data=$this->get_transaksi_by_id($id);\n\n\t\t//get detail transkasi by KODE_TRANSAKSI\n\t\t$data_transaksi=$this->get_transaksi_by_kode($data->KODE_TRANSAKSI);\n\n\t\t$this->db->where($this->primary,$id);\n\t\t$delete=$this->db->delete($this->table_detail);\n\n\t\tif ($delete) {\n\t\t\t$this->db->where($this->kode,$data->KODE_TRANSAKSI);\n\t\t\t$data_transaksi->TOTAL_PEMBAYARAN=$data_transaksi->TOTAL_PEMBAYARAN - $data->TOTAL;\n\t\t\t$update=$this->db->update($this->table_name,(array)$data_transaksi);\n\n\t\t\tif($data_transaksi->TOTAL_PEMBAYARAN==0){\n\t\t\t\t$this->db->where($this->kode,$data->KODE_TRANSAKSI);\n\t\t\t\t$this->db->delete($this->table_name);\n\t\t\t}\n\t\t}\n\n\t\treturn $delete;\n\t}",
"public function delReviewTransactionUpdate($transid){\n $query2=\n \"UPDATE transaction t\n SET status=0\n WHERE transaction_id=:id And status=1 ;\n \";\n $this->db->query($query2);\n $this->db->bind('id', $transid);\n $this->db->execute();\n }",
"public function getDeleteTransfers($id){\n\n $transfersMoney = TransfersMoney::find($id);\n\n if(empty($transfersMoney)){\n return redirect('wallets/getList')->with(['flash_level'=>'danger','flash_message'=>'Does not exist in the database']);\n }\n\n $transfersMoney ->delete($id);\n }",
"public function restore($id)\n {\n if (! Gate::allows('employee_fund_delete')) {\n return abort(401);\n }\n $employee_fund = EmployeeFund::onlyTrashed()->findOrFail($id);\n $employee_fund->restore();\n\n return redirect()->route('admin.employee_funds.index');\n }"
] | [
"0.6972506",
"0.69481075",
"0.6795712",
"0.6776208",
"0.669666",
"0.6655155",
"0.6650708",
"0.6610822",
"0.6553927",
"0.6535709",
"0.65319794",
"0.6489964",
"0.6473856",
"0.64097637",
"0.6405908",
"0.6363754",
"0.6263011",
"0.6258685",
"0.625132",
"0.62426883",
"0.61113995",
"0.61110044",
"0.609916",
"0.60469544",
"0.604571",
"0.6044836",
"0.6029555",
"0.59815043",
"0.5949412",
"0.5948491",
"0.5933002",
"0.5894683",
"0.58939475",
"0.5890636",
"0.5859859",
"0.58541596",
"0.58540624",
"0.5828019",
"0.58055407",
"0.5800723",
"0.5782929",
"0.5781142",
"0.5775064",
"0.5764927",
"0.5764198",
"0.5758428",
"0.5726742",
"0.5718648",
"0.57171494",
"0.57054645",
"0.5694088",
"0.5670694",
"0.5670335",
"0.56587857",
"0.5655939",
"0.56481934",
"0.56467557",
"0.5637705",
"0.560491",
"0.5595236",
"0.55939",
"0.55930424",
"0.5565611",
"0.55634147",
"0.5559887",
"0.55428284",
"0.5539788",
"0.55288213",
"0.5519162",
"0.55167615",
"0.55129373",
"0.55093676",
"0.54972595",
"0.54961574",
"0.5495616",
"0.5486088",
"0.5480582",
"0.5480135",
"0.5479155",
"0.54764813",
"0.54729795",
"0.5468815",
"0.54612416",
"0.5452068",
"0.54439944",
"0.54259545",
"0.5425555",
"0.5407176",
"0.54036134",
"0.5401645",
"0.5400313",
"0.53915465",
"0.5389214",
"0.5387384",
"0.5383001",
"0.53730285",
"0.5364301",
"0.5360482",
"0.5360164",
"0.53527147"
] | 0.5518295 | 69 |
Query refund by transaction id. | public function queryByTransactionId(string $transactionId)
{
return $this->query($transactionId, 'transaction_id');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function refund();",
"function _getTransactionDetails($transaction_id) {\t\t\n\t\t// Set request-specific fields.\n\t\t$transactionID = urlencode($transaction_id);\n\t\t$this->nvpStr = \"&TRANSACTIONID=$transactionID\";\t\n\t\t\t\n\t\treturn $this->query(\"RefundTransaction\");\n\t}",
"public function refundTransaction() {\n //not implemented\n }",
"public function refund($transactionId, $orderId, $description, array $options = array())\n {\n $params = $options;\n\n $params['IDENTIFIER'] = $this->identifier;\n $params['OPERATIONTYPE'] = 'refund';\n $params['DESCRIPTION'] = $description;\n $params['TRANSACTIONID'] = $transactionId;\n $params['VERSION'] = self::API_VERSION;\n $params['ORDERID'] = $orderId;\n\n $params['HASH'] = $this->hash($params);\n\n return $this->requests($this->getDirectLinkUrls(), $params);\n }",
"public function refund($params)\n {\n return $this->request(Resource::RESOURCE_ORDER_REFUND, $params);\n }",
"public function refund($resource_id, $amount)\n\t{\n\t\t$amount = (double)$amount;\n\t\ttry\n\t\t{\n\t\t\t$resource = $this->findSale($resource_id);\n\t\t}\n\t\tcatch(Exception $sale_exception)\n\t\t{\n\t\t\t$resource = $this->findCapture($resource_id);\n\t\t}\n\n\t\t$refund_url = false;\n\t\tforeach($resource->links as $resource_link)\n\t\t{\n\t\t\tif($resource_link->rel == 'refund')\n\t\t\t{\n\t\t\t\t$refund_url = $resource_link;\n\t\t\t}\n\t\t}\n\t\tif($refund_url === false)\n\t\t{\n\t\t\tthrow new Exception('Payment cannot be refunded.');\n\t\t}\n\n\t\t$refundRequestArray = array(\n\t\t\t\t'amount' => array(\n\t\t\t\t\t'total' => $this->_formatAmount($amount, $resource->amount->currency),\n\t\t\t\t\t'currency' => $resource->amount->currency,\n\t\t\t\t\t)\n\t\t\t);\n\t\trequire_once DIR_FS_CATALOG.'/gm/classes/JSON.php';\n\t\t$json = MainFactory::create('Services_JSON');\n\t\t$refundRequestJSON = $json->encodeUnsafe($refundRequestArray);\n\n\t\t$ppRefundRequest = MainFactory::create('PayPalRestRequest', $refund_url->method, $refund_url->href, $refundRequestJSON);\n\t\t$ppRestService = MainFactory::create('PayPalRestService');\n\t\t$response = $ppRestService->performRequest($ppRefundRequest);\n\t\t$response_object = $response->getResponseObject();\n\t\tif($response_object === false)\n\t\t{\n\t\t\t$text = MainFactory::create('PayPalText');\n\t\t\tthrow new Exception($text->get_text('error_decoding_response'));\n\t\t}\n\t\tif($response->getResponseCode() != '201')\n\t\t{\n\t\t\tthrow new Exception('Error refunding payment: '.$response_object->name.' '.$response_object->message);\n\t\t}\n\t}",
"public static function refundTransaction($transactionId, $specificAmount = null, $comment = null)\n {\n $instance = self::getInstance();\n $transaction = self::getTransactionInformations($transactionId);\n\n $params = array(\n 'version' => self::API_VERSION,\n 'transactionID' => $transactionId,\n 'payment' => array(\n 'amount' => (isset($specificAmount) ? round($specificAmount * 100) : $transaction['payment']['amount']),\n 'currency' => $transaction['payment']['currency'],\n 'mode' => 'CPT',\n 'action' => 421,\n 'contractNumber' => $transaction['payment']['contractNumber'],\n ),\n 'sequenceNumber' => null,\n 'comment' => $comment,\n );\n\n // Do refund\n $result = $instance->doRefund($params);\n\n return $result;\n }",
"public function refund($url, $orderUUID, $amount);",
"public function RefundTxn() {\r\n\r\n $ch = curl_init();\r\n\r\n $CURLParameters = http_build_query(array(\r\n // Our default parameters!\r\n \"key\" => $this->key,\r\n \"appid\" => $this->game,\r\n // This can vary from request to request, sometimes its steamid or steamids or even an array.\r\n \"steamid\" => $this->steamid,\r\n // Custom Queries below here.\r\n \"orderid\" => $this->orderid,\r\n ));\r\n\r\n curl_setopt($ch, CURLOPT_URL, \"https://partner.steam-api.com/\" . $this->interface . \"/RefundTxn/v2/\");\r\n\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\n curl_setopt($ch, CURLOPT_POST, 1);\r\n curl_setopt($ch, CURLOPT_POSTFIELDS, $CURLParameters);\r\n $CURLResponse = json_decode(curl_exec($ch));\r\n $CURLResponseCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\r\n curl_close($ch);\r\n\r\n\r\n // Error handling improved!\r\n\r\n if ($CURLResponseCode != 200) {\r\n if ($CURLResponseCode == 400) {\r\n throw new exceptions\\SteamRequestParameterException(\"The Order ID or another parameter is invalid!\");\r\n }\r\n if ($CURLResponseCode == 401) {\r\n throw new exceptions\\SteamException(\"App ID or API Key is invalid.\");\r\n }\r\n throw new exceptions\\SteamRequestException(\"$CURLResponseCode Request Error.\");\r\n }\r\n\r\n if ($CURLResponse->response->result == \"OK\") {\r\n return true;\r\n }\r\n\r\n throw new exceptions\\SteamRequestException(json_encode($CURLResponse->response->error));\r\n }",
"public function refund($transactionId)\n {\n try {\n $numberOfTransactions = $this->transaction->whereTransactionId($transactionId)->count();\n\n if ($numberOfTransactions > 1) {\n return Response::HTTP_CONFLICT;\n }\n\n $transaction = $this->transactionById($transactionId); \n\n $amount = $transaction->total_amount;\n\n $refundTransaction = $transaction->replicate();\n $refundTransaction->total_amount = -1 * abs($amount);\n $refundTransaction->created_at = Carbon::parse(now());\n\n $refundTransaction->save();\n\n return Response::HTTP_CREATED;\n } catch (Exception $e) {\n Log::warning('Error: Transaction Refund Failed. Message: ' . $e->getMessage());\n return Response::HTTP_UNPROCESSABLE_ENTITY;\n } \n }",
"public function findById($id)\n {\n $repo = \\XLite\\Core\\Database::getRepo('\\XLite\\Module\\Digiwallet\\Payment\\Model\\TargetPayRefund');\n $query = $repo->createQueryBuilder('digiwallet_refund')->where('digiwallet_refund.id = :id')->setParameter('id', $id)->getQuery();\n $result = $query->getResult();\n if(!empty($result)){\n return $result[0];\n }\n return null;\n }",
"public function setRefundId($value)\n {\n return $this->setParameter('refundId', $value);\n }",
"public static function refund($params)\n {\n $requestor = Ferbuy_ApiRequestor::getInstance();\n\n $post_data = array(\n 'command' => $params['currency'].$params['amount'],\n 'output_type' => self::OUTPUT_TYPE,\n 'site_id' => $requestor->_siteId,\n 'transaction_id' => $params['transaction_id'],\n );\n $post_data['checksum'] = $requestor->sign($post_data);\n\n $response = $requestor->request('post', '/RefundTransaction', $post_data);\n return $response;\n }",
"public function pushRefundTransaction($id)\n {\n $this->data['ecommerce']['refund']['actionField'] = array('id' => $id);\n }",
"public function refund($requestParameters = array());",
"public function processRefund($id_transaction_stripe, $amount, $original_transaction)\n\t{\n\t\tif (!$this->backward)\n\t\t\treturn;\n\n\t\tinclude(dirname(__FILE__).'/lib/Stripe.php');\n\t\t\\Stripe\\Stripe::setApiKey(Configuration::get('STRIPE_MODE') ? Configuration::get('STRIPE_PRIVATE_KEY_LIVE') : Configuration::get('STRIPE_PRIVATE_KEY_TEST'));\n\n\t\t/* Try to process the refund and catch any error message */\n\t\ttry\n\t\t{\n\t\t\t$charge = \\Stripe\\Charge::retrieve($id_transaction_stripe);\n\t\t\tif($original_transaction['source']==\"card\")\n\t\t\t$result_json = $charge->refund(array('amount' => $amount * 100));\n\t\t\telse\n $result_json = $charge->refunds->create(array('amount' => $amount * 100,\"refund_address\" => $original_transaction['btc_address']));\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t$this->_errors['stripe_refund_error'] = $e->getMessage();\n\t\t\tif (class_exists('Logger'))\n\t\t\t\tLogger::addLog($this->l('Stripe - Refund transaction failed').' '.$e->getMessage(), 2, null, 'Cart', (int)$this->context->cart->id, true);\n\t\t}\n\t\t\n\t\tif(!isset($this->_errors['stripe_refund_error']))\n\t\tDb::getInstance()->Execute('\n\t\tINSERT INTO '._DB_PREFIX_.'stripepro_transaction (type, source, id_stripe_customer, id_cart, id_order,\n\t\tid_transaction, amount, status, currency, cc_type, cc_exp, cc_last_digits, fee, mode, date_add)\n\t\tVALUES (\\'refund\\',\\''.$original_transaction['source'].'\\', '.(int)$original_transaction['id_stripe_customer'].', '.(int)$original_transaction['id_cart'].', '.\n\t\t(int)$original_transaction['id_order'].', \\''.pSQL($id_transaction_stripe).'\\',\n\t\t\\''.(float)$amount.'\\', \\''.(!isset($this->_errors['stripe_refund_error']) ? 'paid' : 'unpaid').'\\', \\''.pSQL($result_json->currency).'\\',\n\t\t\\'\\', \\'\\', 0, 0, \\''.(Configuration::get('STRIPE_MODE') ? 'live' : 'test').'\\', NOW())');\n\t}",
"function _doRefund($oID, $amount = 0) {\r\n global $db, $messageStack;\r\n $new_order_status = (int)MODULE_PAYMENT_AUTHORIZENET_ECHECK_REFUNDED_ORDER_STATUS_ID;\r\n if ($new_order_status == 0) $new_order_status = 1;\r\n $proceedToRefund = true;\r\n $refundNote = strip_tags(zen_db_input($_POST['refnote']));\r\n if (isset($_POST['refconfirm']) && $_POST['refconfirm'] != 'on') {\r\n $messageStack->add_session(MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_REFUND_CONFIRM_ERROR, 'error');\r\n $proceedToRefund = false;\r\n }\r\n if (isset($_POST['buttonrefund']) && $_POST['buttonrefund'] == MODULE_PAYMENT_AUTHORIZENET_ECHECK_ENTRY_REFUND_BUTTON_TEXT) {\r\n $refundAmt = (float)$_POST['refamt'];\r\n $new_order_status = (int)MODULE_PAYMENT_AUTHORIZENET_ECHECK_REFUNDED_ORDER_STATUS_ID;\r\n if ($refundAmt == 0) {\r\n $messageStack->add_session(MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_INVALID_REFUND_AMOUNT, 'error');\r\n $proceedToRefund = false;\r\n }\r\n }\r\n if (isset($_POST['cc_number']) && trim($_POST['cc_number']) == '') {\r\n $messageStack->add_session(MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_CC_NUM_REQUIRED_ERROR, 'error');\r\n }\r\n if (isset($_POST['trans_id']) && trim($_POST['trans_id']) == '') {\r\n $messageStack->add_session(MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_TRANS_ID_REQUIRED_ERROR, 'error');\r\n $proceedToRefund = false;\r\n }\r\n\r\n /**\r\n * Submit refund request to gateway\r\n */\r\n if ($proceedToRefund) {\r\n $submit_data = array('x_type' => 'CREDIT',\r\n 'x_card_num' => trim($_POST['cc_number']),\r\n 'x_amount' => number_format($refundAmt, 2),\r\n 'x_trans_id' => trim($_POST['trans_id'])\r\n );\r\n unset($response);\r\n $response = $this->_sendRequest($submit_data);\r\n $response_code = $response[0];\r\n $response_text = $response[3];\r\n $response_alert = $response_text . ($this->commError == '' ? '' : ' Communications Error - Please notify webmaster.');\r\n $this->reportable_submit_data['Note'] = $refundNote;\r\n $this->_debugActions($response);\r\n\r\n if ($response_code != '1') {\r\n $messageStack->add_session($response_alert, 'error');\r\n } else {\r\n // Success, so save the results\r\n $sql_data_array = array('orders_id' => $oID,\r\n 'orders_status_id' => (int)$new_order_status,\r\n 'date_added' => 'now()',\r\n 'comments' => 'REFUND INITIATED. Trans ID:' . $response[6] . ' ' . $response[4]. \"\\n\" . ' Gross Refund Amt: ' . $response[9] . \"\\n\" . $refundNote,\r\n 'customer_notified' => 0\r\n );\r\n zen_db_perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array);\r\n $db->Execute(\"update \" . TABLE_ORDERS . \"\r\n set orders_status = '\" . (int)$new_order_status . \"'\r\n where orders_id = '\" . (int)$oID . \"'\");\r\n $messageStack->add_session(sprintf(MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_REFUND_INITIATED, $response[9], $response[6]), 'success');\r\n return true;\r\n }\r\n }\r\n return false;\r\n }",
"public function refund($options);",
"public function getRefundId()\n {\n return $this->getParameter('refundId');\n }",
"public function refund(Project $project, Transaction $transaction)\n {\n if (\n !$project->transactions->contains($transaction->id) ||\n empty($transaction->remote_id)\n ) {\n return $this->respondNotFound();\n }\n\n try {\n $this->stripe_transactions_service->refund($transaction->remote_id);\n\n return $this->respond('Transaction refunded successfully.');\n } catch (\\Stripe\\Error\\Base $e) {\n log_error($e);\n return $this->respondError(Lang::getFromJson('Error refund transaction.'));\n } catch (\\Exception $e) {\n log_error($e);\n return $this->respondInternalError();\n }\n }",
"public function testRefundPurchase() {\n\t\t$this->key_pairs = array(\n\t\t\t'tag' => $this->process_tag,\n\t\t\t'status' => 'completed',\n\t\t);\n\t\t$this->process_transactions = CrudTable\\read_rows( 'transactions', $this->key_pairs, false );\n\n\t\tif ( ! empty( $this->process_transactions ) ) {\n\t\t\t$request = TestHelpers::refundPurchaseRequest( $this->tag, $this->process_tag );\n\t\t\t$this->transactions = TestHelpers::refundPurchase( $this->http_client, $request );\n\n\t\t\t$this->assertIsArray( $this->transactions );\n\t\t\t$this->assertArrayHasKey( '0', $this->transactions );\n\n\t\t\t$this->assertEquals( $this->transactions[0]['alias'], $this->process_transactions[0]['alias'] );\n\t\t\t$this->assertEquals( $this->transactions[0]['user'], $this->process_transactions[0]['user'] );\n\t\t\t$this->assertEquals( $this->transactions[0]['cart'], $this->process_transactions[0]['cart'] );\n\t\t\t$this->assertEquals( $this->transactions[0]['transactionid'], $this->process_transactions[0]['transactionid'] );\n\t\t\t$this->assertEquals( abs( $this->transactions[0]['saleid'] ), abs( $this->process_transactions[0]['saleid'] ) );\n\t\t\t$this->assertEquals( $this->transactions[0]['currency'], $this->process_transactions[0]['currency'] );\n\t\t\t$this->assertEquals( $this->transactions[0]['status'], $this->process_transactions[0]['status'] );\n\t\t\t$this->assertEquals( $this->transactions[0]['saleid'], $this->process_transactions[0]['saleid'] );\n\n\t\t\t$this->assertEquals( 'refund', $this->transactions[0]['type'] );\n\t\t\t$this->assertEmpty( $this->transactions[0]['tokenid'] );\n\t\t\t$this->assertNotEmpty( $this->transactions[0]['refundid'] );\n\t\t\t$this->assertEmpty( $this->transactions[0]['redirect_url'] );\n\n\t\t} else {\n\t\t\t$request = TestHelpers::createPurchaseRequest( $this->process_tag );\n\t\t\t$transactions = TestHelpers::createPurchase( $this->http_client, $request );\n\t\t\t$this->assertIsArray( $transactions );\n\t\t\t$this->assertArrayHasKey( '0', $transactions );\n\t\t\t$this->assertNotEmpty( $transactions[0]['redirect_url'] );\n\t\t\t$this->assertEquals( 'created', $transactions[0]['status'] );\n\n\t\t\techo 'For complete REFUND PURCHASE test, you must pay and restart this tests.' . PHP_EOL;\n\t\t\techo 'Link for pay - ' . $transactions[0]['redirect_url'] . PHP_EOL;\n\t\t}\n\t}",
"public function refund( \\IPS\\nexus\\Transaction $transaction, $amount = NULL )\n\t{\n\t\t$extra = json_decode( $transaction->extra, TRUE );\n\t\t\n\t\t$this->api( array(\n\t\t\t'x_type'\t\t=> 'CREDIT',\n\t\t\t'x_trans_id'\t=> $transaction->gw_id,\n\t\t\t'x_amount'\t\t=> (string) ( $amount ?: $transaction->amount->amount ),\n\t\t\t'x_card_num'\t=> $extra['lastFour']\n\t\t) );\n\t}",
"function filter_mellat_pay_channel_pay_refunds($transaction){\n return $transaction;\n}",
"public function refund($mixed = null) {\n\t\t$validParameters = array(\n\t\t\t'(orderv2\\refund)',\n\t\t);\n\t\t$args = func_get_args();\n\t\t$this->_checkArguments($args, $validParameters);\n\t\treturn $this->__soapCall('refund', $this->make_soap_params($mixed));\n\t}",
"public function queryRefundTransactionLog(string $orderReference): SpyPaymentAfterPayTransactionLogQuery;",
"public function Refund($request)\n {\n $transactionID = $request->Refund->TransactionID;\n if (empty($transactionID)) {\n die(\"Refund transaction ID missing\");\n }\n $jsonRequest = $this->fixObjtoJSON($request);\n $response = $this->PostToRapidAPI(\"Transaction/$transactionID/Refund\", $jsonRequest);\n return $response;\n }",
"public function getRefundID()\n {\n return $this->refundID;\n }",
"public function refund()\n\t{\n\t\trequirePermission(\"canRefund\");\n\n\t\t$id = intval($this->input->get(\"id\"));\n\t\t$costDp = intval($this->input->get(\"costDp\"));\n\t\t$accountId = intval($this->input->get(\"accountId\"));\n\t\t\n\t\tif(!$id || !is_numeric($id))\n\t\t{\n\t\t\tdie();\n\t\t}\n\n\t\tif ($costDp != \"Free\") {\n\t\t\tif(!$costDp || !is_numeric($costDp))\n\t\t\t{\n\t\t\t\tdie();\n\t\t\t}\n\t\t}\n\n\t\tif(!$accountId || !is_numeric($accountId))\n\t\t{\n\t\t\tdie();\n\t\t}\n\n\t\tif ($costDp != \"Free\") {\n\t\t\tif ($costDp > 0) {\n\t\t\t\t$userDp = intval($this->recup_model->getDp($accountId));\n\t\t\t\tif(!$userDp || !is_numeric($userDp))\n\t\t\t\t{\n\t\t\t\t\tdie(\"Problème lors de l'acquisition des users dps.\");\n\t\t\t\t}\n\t\t\t\t$this->internal_user_model->setDp($accountId, $userDp+$costDp);\n\t\t\t}\n\t\t}\n\t\t$this->recup_model->editEtat($this->realms->getRealm(1)->getCharacters()->getConnection(), $id, 8);\n\t}",
"public function refund($orderId, $amount = null, $reason = '')\n {\n $payload = array_merge([\n 'order_id' => $orderId,\n 'reason' => $reason,\n ], $this->paddleOptions());\n\n if ($amount) {\n $payload['amount'] = $amount;\n }\n\n return Cashier::post('/payment/refund', $payload)['response']['refund_request_id'];\n }",
"abstract public function refund( Payment $payment );",
"public function refundRequest()\n {\n $request = new Request\\Refund;\n return $this->applyAuthSettings($request);\n }",
"public function processRefund($data) {\n\t\t// provide the EziDebit API endpoint\n\t\t$soapclient = new SoapClient($this->nonPci);\n\n\t\t$params = [\n\t\t\t\t'DigitalKey' => $this->digitalKey,\n\t\t\t\t'PaymentID' => $data['paymentId'],\n\t\t\t\t'BankReceiptID' => $data['bankReceiptId'],\n\t\t\t\t'RefundAmountInCents' => $data['refundAmountInCents']\n\t\t];\n\n\t\treturn $response = $soapclient->processRefund($params);\n\t}",
"final public static function transactionSentForRefund()\n {\n return self::get(2057);\n }",
"public function getTransaction($id){\n\n $gateway = $this->getGateway();\n \n $transaction = $gateway->transaction()->find($id);\n\n return $transaction;\n\n }",
"public static function getPayLaterRefund($charge_id, $refund_id, $params = [])\n {\n $requiredParams = [\n \n ];\n \n self::validateParams($params, $requiredParams);\n \n $url = static::classUrl() . '/charges/'.$charge_id.'/refunds/'.$refund_id;\n \n return static::_request('GET', $url, $params);\n }",
"public function get($id)\n {\n $transaction = $this->refundWithoutReceiptTransactionFactory->create();\n $this->resourceModel->load($transaction, $id);\n if (! $transaction->getId()) {\n throw new NoSuchEntityException(__('Unable to find refund transaction with ID \"%1\"', $id));\n }\n return $transaction;\n }",
"public function findByRefundId($refundid)\n {\n $repo = \\XLite\\Core\\Database::getRepo('\\XLite\\Module\\Digiwallet\\Payment\\Model\\TargetPayRefund');\n $query = $repo->createQueryBuilder('digiwallet_refund')->where('digiwallet_refund.refund_id = :refundid')->setParameter('refundid', $refundid)->getQuery();\n $result = $query->getResult();\n if(!empty($result)){\n return $result[0];\n }\n return null;\n }",
"public function queryByRefundId(string $refundId)\n {\n return $this->query($refundId, 'refund_id');\n }",
"public function refund(InfoInterface $payment, $amount)\n {\n if (!$this->canRefund()) {\n throw new LocalizedException(__('The refund action is not available.'));\n }\n\n /* Override notification, if override notification from admin setting is active (default is active) */\n if ($this->dataConfig->isOverrideNotification() && $this->dataConfig->getNotificationEndpoint() != null) {\n Config::$overrideNotifUrl = $this->dataConfig->getNotificationEndpoint();\n }\n\n $order = $payment->getOrder();\n $paymentCode = $order->getPayment()->getMethod();\n $midtransOrderId = $payment->getAdditionalInformation('midtrans_order_id');\n $orderId = $order->getIncrementId();\n\n Config::$serverKey = $this->dataConfig->getServerKey($paymentCode);\n Config::$isProduction = $this->dataConfig->isProduction();\n\n $transaction = new Transaction();\n\n if (strpos($midtransOrderId, 'multishipping-') !== false) {\n $refundKey = $midtransOrderId . '-' . time();\n } else {\n $refundKey = 'regular-' . $midtransOrderId . '-' . time();\n }\n\n $reasonRefund = \"Refund \" . (double)$amount . \", \" . $refundKey . \", from Magento dashboard order :::\" . $orderId;\n $refundParams = [\n 'refund_key' => $refundKey,\n 'amount' => $amount,\n 'reason' => $reasonRefund\n ];\n\n /*\n * Request refund to midtrans\n */\n $response = $transaction::refund($midtransOrderId, $refundParams);\n\n if (isset($response)) {\n if (isset($response->status_code)) {\n if ($response->status_code == 200) {\n $order->addStatusToHistory(Order::STATE_PROCESSING, $reasonRefund, false);\n $order->save();\n\n $payment->setTransactionId($response->refund_key);\n $payment->setParentTransactionId($response->transaction_id);\n $payment->setIsTransactionClosed(1);\n $payment->setShouldCloseParentTransaction(!$this->canRefund());\n } else {\n $this->midtransLogger->midtransRequest('RefundRequest: ' . print_r($response, true));\n $message = isset($response->status_message) ? $response->status_message : \"Something went wrong..\";\n throw new LocalizedException(__(\"Oops, Refund request failed :\" . $message));\n }\n }\n } else {\n throw new LocalizedException(__(\"Oops, Refund request failed. Due to no response received. Please try again later.\"));\n }\n }",
"public function byTransactionId(string $transactionId, string $refundNumber, int $totalFee, int $refundFee, array $optional = [])\n {\n return $this->refund($refundNumber, $totalFee, $refundFee, array_merge($optional, ['transaction_id' => $transactionId]));\n }",
"public function refund(){\n\t\treturn $this->hasMany('OrderRefund','order_id','order_id');\n\t}",
"public function refund():bool {\n request::xhr(\"orders/refund\", \"csrf_token=\".run::$runner->user->csrf.\"&id=\".substr($this->ID, 1),run::$runner->user->session);\n return true;\n }",
"public function GetRefund($payInId) {\n return $this->GetObject('payins_getrefunds', $payInId, '\\P4M\\MangoPayBundle\\MangoPaySDK\\Refund');\n }",
"public function findByOrderId($order_id)\n {\n $repo = \\XLite\\Core\\Database::getRepo('\\XLite\\Module\\Digiwallet\\Payment\\Model\\TargetPayRefund');\n $query = $repo->createQueryBuilder('digiwallet_refund')->where('digiwallet_refund.order_id = :order_id')->setParameter('order_id', $order_id)->getQuery();\n $result = $query->getResult();\n return $result;\n }",
"public function refundCharge($reference, $amount)\n {\n $url = 'gpx/merchant/transactions/refund';\n\n try {\n $res = $this->client->request('POST', $url, ['json' => ['ref'=>$reference, 'seckey' =>$this->config_vars['secret_key'], 'amount' => $amount]]);\n\n return $res->getBody();\n } catch (TransferException $e) {\n $response = $e->getResponse();\n $this->logger->error('An error occurred trying to refund the charge', ['request' => Psr7\\str($e->getRequest()), 'response' => Psr7\\str($e->getResponse())]);\n\n return $response->getBody();\n }\n }",
"public static function isRefundable($id) {\r\n \r\n try {\r\n return Doctrine_Query::create ()->from ( 'DomainsTlds dt' )\r\n \t\t\t\t\t\t\t\t->where('dt.isrefundable = ?', true)\r\n \t\t\t\t\t\t\t\t->addWhere('dt.tld_id = ?', $id)\r\n\t\t\t\t\t\t\t\t\t\t\t->addWhere('dt.isp_id = ?',Shineisp_Registry::get('ISP')->isp_id)\r\n \t\t\t\t\t\t\t\t->execute ( array (), Doctrine_Core::HYDRATE_ARRAY );\r\n } catch (Exception $e) {\r\n die ( $e->getMessage () );\r\n }\r\n }",
"public function refund( $invoiceId, $value )\n\t\t{\n\t\t\tif ( is_numeric( $invoiceId ) && is_numeric( $value ) ) {\n\t\t\t\treturn $this->_tableTransactions->update(\n\t\t\t\t\tarray (\n\t\t\t\t\t\t'refunded' => $value\n\t\t\t\t\t),\n\t\t\t\t\t\"`invoice_id` = $invoiceId\"\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn false;\n\t\t}",
"public function refund($refund, $apiContext = null, $restCall = null)\n {\n ArgumentValidator::validate($this->getId(), \"Id\");\n ArgumentValidator::validate($refund, 'refund');\n $payLoad = $refund->toJSON();\n $json = self::executeCall(\n \"/v1/payments/sale/{$this->getId()}/refund\",\n \"POST\",\n $payLoad,\n null,\n $apiContext,\n $restCall\n );\n $ret = new Refund();\n $ret->fromJson($json);\n return $ret;\n }",
"public function export_payment_refund($payid) {\n if (empty($payid)) {\n return show_404();\n }\n $result = $this->get_payid_details($payid, 1);\n if ($result['data']->enrolment_mode == 'COMPSPON') {\n if ($result['data']->company_id[0] == 'T') {\n $tenant_details = fetch_tenant_details($result['data']->company_id);\n $trainee_det = $tenant_details->tenant_name;\n } else {\n $company_details = $this->company->get_company_details($this->tenant_id, $result['data']->company_id);\n $trainee_det = $company_details[0]->company_name;\n }\n } else {\n $trainee_details = $this->classtraineemodel->get_trainee_by_pymnt_due_id($payid);\n $trainee_det = $trainee_details->first_name . ' ' . $trainee_details->last_name;\n $trainee_id = $trainee_details->user_id;\n }\n $this->load->helper('pdf_reports_helper');\n generate_trainee_payment_refund($result, $refund_arr, $trainee_det);\n }",
"function get_transaction_by_id($id){\n $str_query=\"select * from pos_transaction where transaction_id='$id'\";\n if(!$this->query($str_query)){\n return false;\n }\n return $this->fetch();\n }",
"public function execute(int $orderId): array\n {\n $transactions = [];\n\n $captureTransactions = $this->allTransactionsFinder->execute(\n OrderTransactions::CAPTURE_ACTION,\n $orderId,\n OrderTransactions::SUCCESS_STATUS\n );\n\n foreach ($captureTransactions as $captureTransaction) {\n //Check if the capture is linked to an invoice & if so, check if the invoice is paid or not.\n if ($captureTransaction->getInvoiceId() !== null) {\n $invoice = $this->invoiceRepository->get($captureTransaction->getInvoiceId());\n\n if ((int)$invoice->getState() === Invoice::STATE_PAID) {\n //If the capture is linked to a paid invoice then we don't need to refund it.\n continue;\n }\n }\n\n $totalRefunded = 0.00;\n $amountUsedOnInvoice = 0.0;\n $refundTransactions = $this->orderTransactions->getRefundTransactionsFromCapture(\n $captureTransaction->getTransactionId()\n );\n\n //Loop all refunds to increment the total refunded from the capture transaction.\n foreach ($refundTransactions as $refundTransaction) {\n $totalRefunded += $refundTransaction->getAmount();\n }\n\n //If the capture has already been refunded in full.\n if ($this->floatComparator->equal($totalRefunded, $captureTransaction->getAmount())) {\n continue;\n }\n\n //The max we can refund, based on what has been refunded before.\n $maxToRefund = $captureTransaction->getAmount() - $totalRefunded;\n\n //Get all child captures.\n $childCaptures = $this->orderTransactions->getChildCapturesTransactionsFromCapture(\n $captureTransaction->getTransactionId()\n );\n\n foreach ($childCaptures as $childCapture) {\n //Check if the capture is linked to an invoice & if so, check if the invoice is paid or not.\n if ($childCapture->getInvoiceId() !== null) {\n $invoice = $this->invoiceRepository->get($childCapture->getInvoiceId());\n\n //Child capture was used to pay an invoice that is in paid state, so we can't refund it.\n if ((int)$invoice->getState() === Invoice::STATE_PAID) {\n $amountUsedOnInvoice += $childCapture->getAmount();\n }\n }\n }\n\n //What we should refund, what has not been used on a paid invoice.\n $amountToRefundOnCapture = $captureTransaction->getAmount() - $amountUsedOnInvoice;\n\n //Check if the amount to refund is not greater than the max to refund.\n if ($this->floatComparator->greaterThan($amountToRefundOnCapture, $maxToRefund)) {\n $amountToRefundOnCapture = $maxToRefund;\n }\n\n //Add capture to the list of transaction, with the amount to refund.\n $transactions[] = [\n 'transaction' => $captureTransaction,\n 'amountToCancel' => $amountToRefundOnCapture\n ];\n }\n\n $authorizeTransactions = $this->allTransactionsFinder->execute(\n OrderTransactions::AUTHORIZE_ACTION,\n $orderId,\n OrderTransactions::SUCCESS_STATUS\n );\n\n foreach ($authorizeTransactions as $authorizeTransaction) {\n $amountUsedOnCapture = 0.00;\n $totalVoided = 0.00;\n\n $voidTransactions = $this->orderTransactions->getVoidTransactionsFromAuthorize(\n $authorizeTransaction->getTransactionId()\n );\n\n //Calculate the total voided on the give authorize transaction.\n foreach ($voidTransactions as $voidTransaction) {\n $totalVoided += $voidTransaction->getAmount();\n }\n\n //The authorized transaction has been voided in full, no need to go any further.\n if ($this->floatComparator->equal($totalVoided, $authorizeTransaction->getAmount())) {\n continue;\n }\n\n //The max we can refund, based on what has been refunded before.\n $maxToVoid = $authorizeTransaction->getAmount() - $totalVoided;\n\n $captureTransactions = $this->orderTransactions->getCaptureTransactionsFromAuthorize(\n $authorizeTransaction->getTransactionId()\n );\n\n foreach ($captureTransactions as $captureTransaction) {\n $amountUsedOnCapture += $captureTransaction->getAmount();\n }\n\n //If the authorized transactions has been captured in full, no need to go any further.\n if ($this->floatComparator->equal($amountUsedOnCapture, $authorizeTransaction->getAmount())) {\n continue;\n }\n\n //What we should void, what has not been captured.\n $amountToVoidOnAuthorize = $authorizeTransaction->getAmount() - $amountUsedOnCapture;\n\n //Check if the amount to void is not greater than the max to void.\n if ($this->floatComparator->greaterThan($amountToVoidOnAuthorize, $maxToVoid)) {\n $amountToVoidOnAuthorize = $maxToVoid;\n }\n\n //Add capture to the list of transaction, with the amount to refund.\n $transactions[] = [\n 'transaction' => $authorizeTransaction,\n 'amountToCancel' => $amountToVoidOnAuthorize\n ];\n }\n\n return $transactions;\n }",
"public function get_company_invoice_payment_refund() {\n $invoice = $this->input->post('invoice');\n $data = $this->classtraineemodel->company_invoice($invoice);\n if ($data->company_id[0] == 'T') {\n $tenant_details = fetch_tenant_details($data->company_id);\n $data->company_name = $tenant_details->tenant_name;\n } else {\n $company_details = $this->company->get_company_details($this->tenant_id, $data->company_id);\n $data->company_name = $company_details[0]->company_name;\n }\n $data->discount_label = rtrim($this->course->get_metadata_on_parameter_id($data->discount_type), ', ');\n $gst_label = ($data->total_gst > 0) ? 'GST ON, ' : 'GST OFF ';\n if ($data->total_gst > 0) {\n $gst_label .= rtrim($this->course->get_metadata_on_parameter_id($data->gst_rule), ', ');\n }\n $data->gst_label = $gst_label;\n $data->inv_date = date('d/m/Y', strtotime($data->inv_date));\n $data->amount_refund = round($data->amount_refund, 2);\n $refund_details = $refund_details = $this->classtraineemodel->get_refund_paid_details($invoice);\n foreach ($refund_details as $k => $row) {\n if ($row->refnd_reason != 'OTHERS') {\n $refund_details[$k]->refnd_reason = $this->course->get_metadata_on_parameter_id($row->refnd_reason);\n } else {\n $refund_details[$k]->refnd_reason = 'Others (' . $row->refnd_reason_ot . ')';\n }\n\n $refund_details[$k]->refund_on = date('d/m/Y', strtotime($row->refund_on));\n $refund_details[$k]->mode_of_refund = $this->course->get_metadata_on_parameter_id($row->mode_of_refund);\n }\n $res = array('data' => $data, 'refund' => $refund_details);\n echo json_encode($res);\n exit();\n }",
"public function process_refund( $order_id, $amount = null, $reason = '' ) {\n\t\t$details = $this->get_transaction_details( $order_id );\n\t\t$is_order_txn_id_active = $this->is_transaction_active( $details );\n\t\t$txn_type = $is_order_txn_id_active ? self::TXN_TYPE_REVERSAL : self::TXN_TYPE_REFUND;\n\n\t\t$order = new WC_Order( $order_id );\n\t\t$request = $this->prepare_request( $txn_type, $order );\n\t\t$response = $this->submit_request( $request );\n\t\t$is_successful = $this->handle_response( $request, $response );\n\n\t\tif ($is_successful) {\n\t\t\t$note_text = sprintf(\n\t\t\t\t'%s%s was reversed or refunded. Transaction ID: %s ',\n\t\t\t\tget_woocommerce_currency_symbol(), $amount, $response->transactionReference->transactionId\n\t\t\t);\n\n\t\t\t$order->add_order_note($note_text);\n\t\t}\n\n\t\treturn $is_successful;\n\t}",
"public function getRefundByReference(string $refund_reference): RefundInterface;",
"public function worldlinePaymentRefund($refundId, $scopeId = null);",
"public function getTransactionByIdRequest($budget_id, $transaction_id)\n {\n // verify the required parameter 'budget_id' is set\n if ($budget_id === null || (is_array($budget_id) && count($budget_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $budget_id when calling getTransactionById'\n );\n }\n // verify the required parameter 'transaction_id' is set\n if ($transaction_id === null || (is_array($transaction_id) && count($transaction_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $transaction_id when calling getTransactionById'\n );\n }\n\n $resourcePath = '/budgets/{budget_id}/transactions/{transaction_id}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // path params\n if ($budget_id !== null) {\n $resourcePath = str_replace(\n '{' . 'budget_id' . '}',\n ObjectSerializer::toPathValue($budget_id),\n $resourcePath\n );\n }\n // path params\n if ($transaction_id !== null) {\n $resourcePath = str_replace(\n '{' . 'transaction_id' . '}',\n ObjectSerializer::toPathValue($transaction_id),\n $resourcePath\n );\n }\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"static function insertRefundRecord($reservationId, $bookingRef, $firstName, $lastName, $email, $amount, $description, $txnId, $vendorTxCode, $gateway) {\n global $wpdb;\n if (false === $wpdb->insert(\"wp_tx_refund\", array(\n 'reservation_id' => $reservationId,\n 'booking_reference' => $bookingRef,\n 'email' => $email,\n 'first_name' => $firstName,\n 'last_name' => $lastName,\n 'amount' => $amount,\n 'description' => $description,\n 'last_updated_date' => current_time('mysql')),\n array( '%d', '%s', '%s', '%s', '%s', '%f', '%s', '%s'))) {\n error_log($wpdb->last_error . \" executing sql: \" . $wpdb->last_query);\n throw new DatabaseException($wpdb->last_error);\n }\n \n $refId = $wpdb->insert_id;\n\t if ( $gateway == \"Sagepay\" ) {\n if (false === $wpdb->insert(\"wp_sagepay_tx_refund\",\n array('id' => $refId,\n 'auth_vendor_tx_code' => $vendorTxCode,\n 'last_updated_date' => current_time('mysql')),\n array('%d', '%s', '%s'))) {\n error_log($wpdb->last_error . \" executing sql: \" . $wpdb->last_query);\n throw new DatabaseException($wpdb->last_error);\n }\n }\n\t else if ( false === empty( $txnId ) ) {\n if (false === $wpdb->insert(\"wp_stripe_tx_refund\",\n array('id' => $refId, 'cloudbeds_tx_id' => $txnId, 'last_updated_date' => current_time('mysql')),\n array('%d', '%s', '%s'))) {\n error_log($wpdb->last_error . \" executing sql: \" . $wpdb->last_query);\n throw new DatabaseException($wpdb->last_error);\n }\n }\n else {\n throw new DatabaseException(\"Either txnId or vendorTxnCode must be provided.\");\n }\n }",
"public function refund(Request $request)\n {\n $merchantAuthentication = new AnetAPI\\MerchantAuthenticationType();\n $merchantAuthentication->setName(env('ANET_API_LOGIN_ID'));\n $merchantAuthentication->setTransactionKey(env('ANET_TRANSACTION_KEY'));\n\n // Set the transaction's refId\n $refId = 'ref' . time();\n\n // Create the payment data for a credit card\n $creditCard = new AnetAPI\\CreditCardType();\n $creditCard->setCardNumber($request->cc_number);\n $creditCard->setExpirationDate($request->input('expiry_year') . \"-\" . $request->input('expiry_month'));\n\n $paymentOne = new AnetAPI\\PaymentType();\n $paymentOne->setCreditCard($creditCard);\n\n //create a transaction\n $transactionRequest = new AnetAPI\\TransactionRequestType();\n $transactionRequest->setTransactionType(\"refundTransaction\");\n $transactionRequest->setAmount($request->amount);\n $transactionRequest->setPayment($paymentOne);\n $transactionRequest->setRefTransId($request->transactionReference);\n\n\n $request = new AnetAPI\\CreateTransactionRequest();\n $request->setMerchantAuthentication($merchantAuthentication);\n $request->setRefId($refId);\n $request->setTransactionRequest($transactionRequest);\n $controller = new AnetController\\CreateTransactionController($request);\n $response = $controller->executeWithApiResponse(ANetEnvironment::PRODUCTION);\n\n if ($response != null) {\n $tresponse = $response->getTransactionResponse();\n if ($response->getMessages()->getResultCode() == \"Ok\") {\n if ($tresponse != null && $tresponse->getMessages() != null) {\n $message_text = $tresponse->getMessages()[0]->getDescription() . \", Response code: \" . $tresponse->getResponseCode() . \", Refund SUCCESS: \" . $tresponse->getTransId();\n $msg_type = \"successMessage\";\n return redirect()->route('orderList')->with($msg_type, $message_text);\n } else {\n $message_text = \"Transaction Failed\";\n $msg_type = \"errorMessage\";\n if ($tresponse->getErrors() != null) {\n $message_text = $tresponse->getErrors()[0]->getErrorText();\n $msg_type = \"errorMessage\";\n }\n }\n } else {\n if ($tresponse != null && $tresponse->getErrors() != null) {\n $message_text = $tresponse->getErrors()[0]->getErrorText();\n } else {\n $message_text = $response->getMessages()->getMessage()[0]->getText();\n }\n $msg_type = \"errorMessage\";\n }\n } else {\n $message_text = \"No response returned\";\n $msg_type = \"errorMessage\";\n }\n\n return redirect()->route('refundView')->with($msg_type, $message_text);\n }",
"public function getRefundDetails($requestParameters = array());",
"function createRefund($payload, $charge_id) {\r\n $end_point = $this->tpi_server_domain . '/payment/xendit/credit-card/charges/' . $charge_id . '/refund';\r\n\r\n $args = array(\r\n 'headers' => $this->defaultHeader(),\r\n 'timeout' => WC_Xendit_PG_API::DEFAULT_TIME_OUT,\r\n 'body' => json_encode($payload)\r\n );\r\n $response = wp_remote_post($end_point, $args);\r\n $jsonResponse = json_decode($response['body'], true);\r\n\r\n return $jsonResponse;\r\n }",
"public function refund($orderId, array $options = [])\n {\n return Paddle::refundPayment($orderId, $options);\n }",
"public function refund(\\Magento\\Payment\\Model\\InfoInterface $payment, $amount)\n {\n parent::refund($payment, $amount);\n $order = $payment->getOrder();\n $comments = $payment->getCreditMemo()->getComments();\n $grandTotal = $order->getBaseGrandTotal();\n $currencyCode = $payment->getOrder()->getBaseCurrencyCode();\n $realexAmount = $this->_helper->amountFromMagento($amount, $currencyCode);\n\n if ($grandTotal == $amount) {\n $response = $this->_remoteXml->rebate($payment, $realexAmount, $comments);\n } else {\n $response = $this->_remoteXml->rebate($payment, $realexAmount, $comments);\n //partial rebate code will come here\n }\n if (!isset($response) || !$response) {\n throw new \\Magento\\Framework\\Exception\\LocalizedException(__('The refund action failed'));\n }\n $fields = $response->toArray();\n if ($fields['RESULT'] != '00') {\n throw new \\Magento\\Framework\\Exception\\LocalizedException(\n __(\n 'The refund action failed. Gateway Response - Error ' . $fields['RESULT'] . ': ' .\n $fields['MESSAGE']\n )\n );\n }\n $payment->setTransactionId($fields['PASREF'])\n ->setParentTransactionId($payment->getAdditionalInformation('PASREF'))\n ->setTransactionAdditionalInfo(\\Magento\\Sales\\Model\\Order\\Payment\\Transaction::RAW_DETAILS, $fields);\n\n return $this;\n }",
"function get_merchant_refund_by_ccode($ccode,$currentdate,$merchant_id) {\n\tglobal $db;\n\t$M_R_query=\"SELECT merchants.currency_code, YEAR(transaction_alipay.trans_datetime) AS year, MONTH(transaction_alipay.trans_datetime) AS month, COUNT(DISTINCT transaction_alipay.id_transaction_id) AS transcount, SUM(transaction_alipay.refund_amount) AS transamount FROM merchants JOIN transaction_alipay ON transaction_alipay.merchant_id = merchants.mer_map_id AND merchants.currency_code= '$ccode' AND transaction_alipay.transaction_type IN ('2','s2') AND transaction_alipay.merchant_id = '$merchant_id' AND transaction_alipay.result_code='SUCCESS' AND MONTH(transaction_alipay.trans_datetime) = MONTH('$currentdate') GROUP BY year, month\";\n\t$transactionsDetails = $db->rawQuery($M_R_query);\n\treturn $transactionsDetails;\n}",
"public function refund($refund, $apiContext = null, $restCall = null)\n {\n ArgumentValidator::validate($this->getId(), \"Id\");\n ArgumentValidator::validate($refund, 'refund');\n $payLoad = $refund->toJSON();\n $json = self::executeCall(\n \"/v1/payments/capture/{$this->getId()}/refund\",\n \"POST\",\n $payLoad,\n null,\n $apiContext,\n $restCall\n );\n $ret = new Refund();\n $ret->fromJson($json);\n return $ret;\n }",
"public function process_refund($order_id, $amount = null, $reason = '') {\n $order = wc_get_order( $order_id );\n $refundResponse = $this->refund( $order, $order_id, $amount, $reason );\n\n if ($refundResponse == '200') return true;\n else {\n $this->setLogError($refundResponse);\n return new WP_Error( 'midtrans_refund_error', $refundResponse);\n }\n }",
"public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(RefundsPeer::REFNO, $key, Criteria::EQUAL);\n }",
"public function make_payment_refund($order, $amount)\n {\n\n if (!($details = $this->get_payment_details($order))) {\n return null;\n }\n\n $request = array(\n 'charge_id' => $details['id'],\n 'amount' => $amount,\n );\n\n WC_Gateway_Orangepay::log('Orangepay - make_payment_refund() request parameters: ' . $order->get_order_number() . ': ' . wc_print_r($request, true));\n\n $raw_response = wp_safe_remote_post(\n $this->endpoint . '/refunds',\n array(\n 'method' => 'POST',\n 'timeout' => 300,\n 'user-agent' => 'WooCommerce/' . WC()->version,\n 'headers' => array(\n 'Content-Type' => 'application/json;',\n 'Authorization' => 'Bearer ' . $this->gateway->get_option('api_token')\n ),\n 'body' => json_encode($request),\n 'httpversion' => '1.1',\n )\n );\n\n WC_Gateway_Orangepay::log('Orangepay - make_payment_refund() response: ' . wc_print_r($raw_response, true));\n\n if (isset($raw_response['body']) && ($response = json_decode($raw_response['body'], true))) {\n if (isset($response['data'])) {\n $data = $response['data'];\n if (isset($data['charge'])) {\n $charge = $data['charge'];\n if (isset($charge['included'])) {\n foreach ($charge['included'] as $included) {\n if ($included['type'] === 'refund') {\n return $included['id'];\n }\n }\n }\n }\n }\n }\n\n return null;\n }",
"public function Refund($Payload){\n\t\t\tif(empty($Payload['Body'])){\n\t\t\t\tthrow new Exception('body can not be empty.');\n\t\t\t}\n\t\t\t$Payload['Verb']='POST';\n\t\t\t$Payload['URL']='/V1/creditmemo/refund';\n\t\t\t$Payload['Body']=json_encode($Payload['Body']);\n\t\t\treturn $this->Execute($Payload);\n\t\t}",
"public function doRefund() {\n\t\t\n\t\t$this->load->language('extension/payment/hoolah_refund');\n\t\tif (!empty($this->request->post['transaction_id']) && isset($this->request->post['refund_full']) && !empty($this->request->post['description'])) {\n\t\t\t$this->load->model('extension/payment/hoolah');\n\n\t\t\tif ($this->request->post['refund_full'] == 0 && $this->request->post['amount'] == 0) {\n\t\t\t\t$this->session->data['error'] = $this->language->get('error_partial_amt');\n\t\t\t\t$this->response->redirect($this->url->link('extension/payment/hoolah/refund', 'token=' . $this->session->data['token'] . '&tid=' . $this->request->get['tid'] . '&order_id=' . $this->request->get['order_id'], true));\n\t\t\t} else {\n\t\t\t\t$order_transaction = $this->model_extension_payment_hoolah->getHoolahOrderTransactionStatus($this->request->get['order_id'], 'APPROVED');\n\t\t\t \n\t\t\t // get sku order\n\t\t $orders = $this->model_extension_payment_hoolah->getOrderProducts($this->request->get['order_id']);\n\t\t\n\t\t\t\tif (isset($order_transaction)) {\n\t\t\t\t $call_data['transaction_id'] = $order_transaction['id'];\n\t\t\t\t $call_data['uuid'] = $order_transaction['uuid'];\n\t\t\t\t $call_data['description'] = $this->request->post['description'];\n\t\t\t\t $call_data['order_id'] = $this->request->post['order_id'];\n\t\t\t\t \n\t\t\t\t\tif ($this->request->post['refund_full'] == 1) {\n\t\t\t\t\t\t$call_data['REFUNDTYPE'] = 'Full';\n\t\t\t\t\t\t$call_data['AMT'] = $order_transaction['total'];\n\t\t\t\t\t\n\t\t\t\t\t\t// submit to hoolah api\n\t\t\t\t\t $result = $this->model_extension_payment_hoolah->initiate_fullrefund($call_data);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$call_data['REFUNDTYPE'] = 'Partial';\n\t\t\t\t\t\t$call_data['AMT'] = $this->request->post['amount'];\n\t\t\t\t\t\t$call_data['sku'] = $orders[0]['sku'];\n\t\t\t\t\t\t$call_data['CURRENCYCODE'] = $this->request->post['currency_code'];\n\t\t\t\t\t\t\n\t\t\t\t\t\t// submit to hoolah api\n\t\t\t\t\t $result = $this->model_extension_payment_hoolah->initiate_partialrefund($call_data);\n\t\t\t\t\t}\n\t\t\t\t\t$refund_details = array();\n foreach($result->details AS $rows) {\n $refund_details[] = $rows;\n }\n \n $refund = array();\n $refund['order_id'] = $order_transaction['order_id'];\n $refund['uuid'] = $order_transaction['uuid'];\n $refund['status'] = $result->status;\n $refund['orderType'] = $order_transaction['orderType'];\n $refund['total'] = $call_data['AMT'];\n $refund['tax'] = $order_transaction['tax'];\n $refund['shipping_fee'] = $order_transaction['shipping_fee'];\n $refund['currency'] = $order_transaction['currency'];\n $refund['requestId'] = $result->requestId;\n $refund['code'] = $result->code;\n $refund['message'] = $result->message;\n $refund['details'] = json_encode($refund_details);\n $refund['createdAt'] = date('Y-m-d H:i:s');\n $refund['date_added'] = date('Y-m-d H:i:s');\n \n // save it to transaction tbl\n $this->model_extension_payment_hoolah->addHoolahOrderTransactionRefund($refund);\n \n if($result->code == 'accepted' || $result->code == 'in_process' || $result->code == 'in_process') {\n //redirect back to the order\n\t\t\t\t\t\t$this->response->redirect($this->url->link('sale/order/info', 'token=' . $this->session->data['token'] . '&order_id=' . $this->request->get['order_id'], true));\n \n } else {\n $this->session->data['error'] = $result->message;\n\t\t\t\t\t $this->response->redirect($this->url->link('extension/payment/hoolah/refund', 'token=' . $this->session->data['token'] . '&tid=' . $this->request->get['tid'] . '&order_id=' . $this->request->get['order_id'], true));\n }\n\t\t\t\t} else {\n\t\t\t\t\t$this->session->data['error'] = $this->language->get('error_data');\n\t\t\t\t\t$this->response->redirect($this->url->link('extension/payment/hoolah/refund', 'token=' . $this->session->data['token'] . '&tid=' . $this->request->get['tid'] . '&order_id=' . $this->request->get['order_id'], true));\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$this->session->data['error'] = $this->language->get('error_data');\n\t\t\t$this->response->redirect($this->url->link('extension/payment/hoolah/refund', 'token=' . $this->session->data['token'] . '&tid=' . $this->request->get['tid'] . '&order_id=' . $this->request->get['order_id'], true));\n\t\t}\n\t}",
"public function refundOrder(Request $request)\n {\n $refund_data['merc_refund_ref_no'] = $request->merc_refund_ref_no;\n $refund_data['orderid'] = $request->orderid;\n $refund_data['transaction_id'] = $request->transaction_id;\n $refund_data['transaction_date'] = $request->transaction_date;\n $refund_data['refund_amount'] = $request->refund_amount;\n $refund_data['txn_amount'] = $request->txn_amount;\n\n $response = BilldeskHmac::refundOrder($refund_data);\n }",
"protected function doRefund(\\XLite\\Model\\Payment\\BackendTransaction $transaction)\n {\n return $this->doSecondary($transaction, 'refund');\n }",
"public function show($id)\n {\n try {\n $transaction = Transaction::find($id);\n if(!$transaction){\n return ReturnGoodWay::failedReturn(\n 'transaction not found',\n 'bad request'\n );\n } else {\n return ReturnGoodWay::successReturn(\n $transaction,\n $this->modelName,\n 'Show trasnaction with id ' . $id,\n 'success'\n );\n }\n\n } catch (Exception $err) {\n return $err;\n }\n }",
"public function reverseCurrentTransaction($pupil_id){\n \n $query = mysql_query(\"SELECT DISTINCT FROM fee_payments WHERE pupil_id'$pupil_id'\");\n \n }",
"public function refundCancel($refundHandle);",
"public static function getrefundItem()\n {\n \n $value=DB::table('product_refund')->join('users','users.id','product_refund.buyer_id')->join('product','product.product_id','product_refund.product_id')->orderBy('product_refund.dispute_id', 'desc')->get(); \n return $value;\n\t\n }",
"public function DetalharNotaTranporte($_id)\n {\n $sql = new Sql();\n $sql->select('SELECT * FROM notatransporte WHERE id = :id',\n array\n (\n ':id' = $_id\n ));\n }",
"public function getTransaction(Wallet $wallet, $id): Transaction;",
"public function getDeleteTransfers($id){\n\n $transfersMoney = TransfersMoney::find($id);\n\n if(empty($transfersMoney)){\n return redirect('wallets/getList')->with(['flash_level'=>'danger','flash_message'=>'Does not exist in the database']);\n }\n\n $transfersMoney ->delete($id);\n }",
"public function get_transaction($id){\n $this->load->database();\n\n $query = $this->db->select('*')\n ->get_where('tbl_transactions',array('id' => $id));\n return $query->result_array();\n }",
"public function refund(Varien_Object $payment, $amount)\n {\n parent::refund($payment, $amount);\n\n /* @var Mage_Sales_Model_Order_Creditmemo $creditmemo */\n $creditmemo = $payment->getCreditmemo();\n\n $this->checkExistingRefundJob($creditmemo->getOrder());\n\n /* @var PostFinanceCheckout_Payment_Model_Service_Refund $refundService */\n $refundService = Mage::getSingleton('postfinancecheckout_payment/service_refund');\n $refund = $refundService->create($payment, $creditmemo);\n\n $refundJob = $this->createRefundJob($creditmemo->getOrder(), $refund);\n\n try {\n $refund = $refundService->refund($refundJob->getSpaceId(), $refund);\n } catch (\\PostFinanceCheckout\\Sdk\\ApiException $e) {\n if ($e->getResponseObject() instanceof \\PostFinanceCheckout\\Sdk\\Model\\ClientError) {\n $refundJob->delete();\n Mage::throwException($e->getResponseObject()->getMessage());\n } else {\n Mage::throwException(\n $this->getHelper()->__('There has been an error while sending the refund to the gateway.'));\n }\n } catch (Exception $e) {\n Mage::throwException(\n $this->getHelper()->__('There has been an error while sending the refund to the gateway.'));\n }\n\n if ($refund->getState() == \\PostFinanceCheckout\\Sdk\\Model\\RefundState::FAILED) {\n $refundJob->delete();\n Mage::throwException($this->getHelper()->translate($refund->getFailureReason()\n ->getDescription()));\n } elseif ($refund->getState() == \\PostFinanceCheckout\\Sdk\\Model\\RefundState::PENDING) {\n Mage::throwException(\n $this->getHelper()->__('The refund was requested successfully, but is still pending on the gateway.'));\n }\n\n $creditmemo->setPostfinancecheckoutExternalId($refund->getExternalId());\n $refundJob->delete();\n\n return $this;\n }",
"public function reverseTransaction($journalId) {\n \n }",
"public function refund(array $parameters = array())\n {\n /**\n * @var \\Omnipay\\Vindicia\\Message\\RefundRequest\n */\n return $this->createRequest('\\Omnipay\\Vindicia\\Message\\RefundRequest', $parameters);\n }",
"function bankopen_refund($params)\n{\n // Gateway Configuration Parameters\n $APIKey = $params['APIKey'];\n $APISecret = $params['APISecret'];\n $testMode = $params['testMode'];\n $dropdownField = $params['dropdownField'];\n $radioField = $params['radioField'];\n $textareaField = $params['textareaField'];\n\n // Transaction Parameters\n $transactionIdToRefund = $params['transid'];\n $refundAmount = $params['amount'];\n $currencyCode = $params['currency'];\n\n // Client Parameters\n $firstname = $params['clientdetails']['firstname'];\n $lastname = $params['clientdetails']['lastname'];\n $email = $params['clientdetails']['email'];\n $address1 = $params['clientdetails']['address1'];\n $address2 = $params['clientdetails']['address2'];\n $city = $params['clientdetails']['city'];\n $state = $params['clientdetails']['state'];\n $postcode = $params['clientdetails']['postcode'];\n $country = $params['clientdetails']['country'];\n $phone = $params['clientdetails']['phonenumber'];\n\n // System Parameters\n $companyName = $params['companyname'];\n $systemUrl = $params['systemurl'];\n $langPayNow = $params['langpaynow'];\n $moduleDisplayName = $params['name'];\n $moduleName = $params['paymentmethod'];\n $whmcsVersion = $params['whmcsVersion'];\n\n // perform API call to initiate refund and interpret result\n\n return array(\n // 'success' if successful, otherwise 'declined', 'error' for failure\n 'status' => 'success',\n // Data to be recorded in the gateway log - can be a string or array\n 'rawdata' => $responseData,\n // Unique Transaction ID for the refund transaction\n 'transid' => $refundTransactionId,\n // Optional fee amount for the fee value refunded\n 'fees' => $feeAmount,\n );\n}",
"public function testRefund()\n {\n print \"testRefund()\\n\";\n\n // TODO: Impl\n\n $this->fail();\n }",
"public function refund(array $options = [])\n {\n // TODO: Implement refund() method.\n }",
"public function transactionById($transactionId)\n {\n return $this->transaction->whereTransactionId($transactionId)->first();\n }",
"function hook_commerce_adyen_refund_received(\\Commerce\\Adyen\\Payment\\Transaction\\Refund $transaction, \\stdClass $order) {\n\n}",
"function cancel($id){\n\t\t$data=$this->get_transaksi_by_id($id);\n\n\t\t//get detail transkasi by id_transaksi\n\t\t$data_transaksi=$this->get_transaksi_by_kode($data->id_transaksi);\n\n\t\t$this->db->where($this->primary,$id);\n\t\t$delete=$this->db->delete($this->table_detail);\n\n\t\tif ($delete) {\n\t\t\t$this->db->where($this->kode,$data->id_transaksi);\n\t\t\t$data_transaksi->total=$data_transaksi->total - $data->TOTAL;\n\t\t\t$update=$this->db->update($this->table_name,(array)$data_transaksi);\n\n\t\t\tif($data_transaksi->total==0){\n\t\t\t\t$this->db->where($this->kode,$data->id_transaksi);\n\t\t\t\t$this->db->delete($this->table_name);\n\t\t\t}\n\t\t}\n\n\t\treturn $delete;\n\t}",
"public function show($id)\n {\n return Transactions::find($id);\n }",
"protected function _updateRefundDetails()\n {\n $sQuery = \"SELECT BESTITAMAZONREFUNDID\n FROM bestitamazonrefunds\n WHERE STATE = 'Pending'\n AND BESTITAMAZONREFUNDID != ''\";\n\n $aResult = $this->_getContainer()->getDatabase()->getAll($sQuery);\n\n $this->_oLogger->info(\n 'Fetched orders and processed',\n array('orderNumbers' => array_keys($aResult))\n );\n\n foreach ($aResult as $aRow) {\n $oData = $this->_getContainer()->getClient()->getRefundDetails($aRow['BESTITAMAZONREFUNDID']);\n\n if (isset($oData->GetRefundDetailsResult->RefundDetails->RefundStatus->State)) {\n $this->_addToMessages(\n \"Refund ID: {$oData->GetRefundDetailsResult->RefundDetails->RefundReferenceId} - \"\n .\"Status: {$oData->GetRefundDetailsResult->RefundDetails->RefundStatus->State}<br/>\"\n );\n }\n }\n }",
"function get_refund_by_ccode($ccode,$currentdate) {\r\n\tglobal $db;\r\n\t$M_R_query=\"SELECT merchants.currency_code, YEAR(transaction_alipay.trans_datetime) AS year, MONTH(transaction_alipay.trans_datetime) AS month, COUNT(DISTINCT transaction_alipay.id_transaction_id) AS transcount, SUM(transaction_alipay.refund_amount) AS transamount FROM merchants JOIN transaction_alipay ON transaction_alipay.merchant_id = merchants.mer_map_id AND merchants.currency_code= '$ccode' AND transaction_alipay.transaction_type IN ('2','s2') AND transaction_alipay.result_code='SUCCESS' AND MONTH(transaction_alipay.trans_datetime) = MONTH('$currentdate') GROUP BY year, month\";\r\n\t$transactionsDetails = $db->rawQuery($M_R_query);\r\n\treturn $transactionsDetails;\r\n}",
"public function delete_transaction($id){\n $this->load->database();\n\n return $query = $this->db->delete('tbl_transactions',array('id' => $id));\n }",
"public function show($id)\n {\n $uid = auth()->user()->id;\n return Transaction::where('user_id', $uid)->findOrFail($id);\n }",
"public function refund(Collection $order)\r\n {\r\n }",
"public function refundAccountTransactions(AccountTransaction $accountTransaction)\n {\n $success = false;\n\n // Update transaction status to CORPO_APPROVAL_CANCELED(3) in corpo_request_services_details\n $parameters = array(\n 'requestStatus' => $this->container->getParameter('CORPO_APPROVAL_CANCELED'),\n 'reservationId' => $accountTransaction->getReservationId(),\n 'moduleId' => $accountTransaction->getModuleId()\n );\n $this->container->get('CorpoApprovalFlowServices')->updatePendingRequestServices($parameters);\n\n // Get the corresponding corpo_account_transactions record by reservation_id and moduleid\n $requestAccountTransaction = $this->em->getRepository('CorporateBundle:CorpoAccountTransactions')->getAccountTransactionsByReservationId($accountTransaction->getReservationId(), $accountTransaction->getModuleId());\n\n if (!empty($requestAccountTransaction)) {\n // Add a new transaction to corpo_account_transactions\n $params = array(\n 'accountId' => $requestAccountTransaction['al_accountId'],\n 'userId' => $requestAccountTransaction['al_userId'],\n 'requestDetailId' => $requestAccountTransaction['al_requestDetailId'],\n 'reservationId' => $requestAccountTransaction['al_reservationId'],\n 'moduleId' => $requestAccountTransaction['al_moduleId'],\n );\n\n // If amountToRefund is 0, add a new transaction to revert the whole transaction\n if ($accountTransaction->getAmountToRefund() == 0) {\n $params['currencyCode'] = $requestAccountTransaction['al_currencyCode'];\n $params['amount'] = floatval($requestAccountTransaction['al_amount']) * -1;\n $params['amountFBC'] = floatval($requestAccountTransaction['al_amountFBC']) * -1;\n $params['amountSBC'] = floatval($requestAccountTransaction['al_amountSBC']) * -1;\n $params['amountAccountCurrency'] = floatval($requestAccountTransaction['al_amountAccountCurrency']) * -1;\n $params['description'] = $this->translator->trans(\"Full refund for reservation #\").$accountTransaction->getReservationId();\n\n $success = $this->em->getRepository('CorporateBundle:CorpoAccountTransactions')->addAccountTransactions($params);\n }\n // If we have amountToRefund, add a new transaction to deduct that passed amount only from the account\n else {\n $params['currencyCode'] = $accountTransaction->getCurrency();\n $params['amount'] = floatval($accountTransaction->getAmountToRefund()) * -1;\n $params['description'] = $this->translator->trans(\"Partial refund for reservation #\").$accountTransaction->getReservationId();\n\n $success = $this->addAccountTransactions($params);\n }\n\n // If we have cancellationFees passed, add a new transaction to add the cancellation fees to the account\n if ($accountTransaction->getcancellationFees() > 0) {\n $params['currencyCode'] = $accountTransaction->getCurrency();\n $params['amount'] = $accountTransaction->getcancellationFees();\n $params['description'] = $this->translator->trans(\"Cancellation fees for reservation #\").$accountTransaction->getReservationId();\n\n $success = $this->addAccountTransactions($params);\n }\n }\n\n return $success;\n }",
"public function reversePurchase($id, $statusCode = 200){\n if (!$id) return \"Please fill all required details\";\n try{\n $this->db->query('DELETE FROM `ticket` WHERE `id`=?', array($id));\n return \"Successfully reversed purchased\";\n }catch (Exception $e) {\n // throw new Exception($e->errorMessage());\n return $e;\n }\n }",
"public function refund(order $order, payment $payment, $amount, $countryId) {\n\t\tparent::refund($order, $amount, $countryId, $payment);\n\t\t\n\t\t//TODO: If we ever decide to allow multiple payments for an order, this needs to be changed to handle that situation.\n\t\treset($order->payments->records);\n\t\t$this->_sendRequest($this->_getVoidTransactionParameters(current($order->payments->records), $amount));\n\t\treturn $this->getSuccess();\n\t}",
"public function refund(Varien_Object $payment, $amount)\r\n {\r\n $error = false;\r\n \t\t$szTransactionType = \"REFUND\";\r\n \t\t$orderStatus = 'pys_refunded';\r\n \t\t$szMessage = 'Payment refunded';\r\n \t\t$arAdditionalInformationArray;\r\n \t\t\r\n if($amount > 0)\r\n {\r\n $error = $this->_runCrossReferenceTransaction($payment, $szTransactionType, $amount);\r\n }\r\n else\r\n {\r\n $error = 'Error in refunding the payment';\r\n }\r\n \r\n if($error === false)\r\n {\r\n \t$order = $payment->getOrder();\r\n \t$payment = $order->getPayment();\r\n \t$arAdditionalInformationArray = $payment->getAdditionalInformation();\r\n \t\r\n \t$arAdditionalInformationArray[\"Refunded\"] = 1;\r\n \t$payment->setAdditionalInformation($arAdditionalInformationArray);\r\n \t$payment->save();\r\n \t\r\n \t$order->setState('canceled', $orderStatus, $szMessage, false);\r\n \t$order->save();\r\n }\r\n else\r\n {\r\n \tMage::throwException($error);\r\n }\r\n\t\t\r\n return $this;\r\n }",
"public function show(Refund $refund)\n {\n //\n }",
"public function show($id) {\n return ClientTransaction::find($id);\n }"
] | [
"0.6792253",
"0.66360253",
"0.648031",
"0.64792466",
"0.63925606",
"0.63856703",
"0.63724375",
"0.6283503",
"0.6254948",
"0.6204486",
"0.61685455",
"0.61474097",
"0.61428595",
"0.6118446",
"0.6090975",
"0.6033284",
"0.5991072",
"0.5980141",
"0.5979378",
"0.5965217",
"0.5948808",
"0.59141296",
"0.58908105",
"0.5878378",
"0.5848945",
"0.58424693",
"0.5797244",
"0.5778283",
"0.57735574",
"0.57280815",
"0.5721594",
"0.5719742",
"0.5718074",
"0.5703256",
"0.56930214",
"0.56828165",
"0.5678946",
"0.56773335",
"0.56488955",
"0.5640454",
"0.5628545",
"0.5584416",
"0.55806047",
"0.557552",
"0.5563609",
"0.5541178",
"0.55086285",
"0.5496934",
"0.5480056",
"0.54628205",
"0.54611427",
"0.54591286",
"0.5450939",
"0.5444933",
"0.54402286",
"0.5438012",
"0.5410983",
"0.5390309",
"0.5383933",
"0.5375103",
"0.535251",
"0.5341351",
"0.53339356",
"0.5332778",
"0.53310627",
"0.5316461",
"0.53113014",
"0.5309466",
"0.53048944",
"0.53031313",
"0.5298939",
"0.5295208",
"0.5294408",
"0.52815866",
"0.5278151",
"0.52717876",
"0.52605736",
"0.52447045",
"0.52206504",
"0.5216431",
"0.52145743",
"0.5211263",
"0.5209185",
"0.5208237",
"0.5206009",
"0.5201383",
"0.52011514",
"0.519844",
"0.51968837",
"0.51961315",
"0.5191456",
"0.518839",
"0.5186488",
"0.5185482",
"0.5185031",
"0.5162738",
"0.51618683",
"0.51592946",
"0.5158344",
"0.51474917"
] | 0.5442287 | 54 |
Query refund by out trade number. | public function queryByOutTradeNumber(string $outTradeNumber)
{
return $this->query($outTradeNumber, 'out_trade_no');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function queryByOutRefundNumber(string $outRefundNumber)\n {\n return $this->query($outRefundNumber, 'out_refund_no');\n }",
"public function byOutTradeNumber(string $number, string $refundNumber, int $totalFee, int $refundFee, array $optional = [])\n {\n return $this->refund($refundNumber, $totalFee, $refundFee, array_merge($optional, ['out_trade_no' => $number]));\n }",
"public function refund();",
"public function refund($url, $orderUUID, $amount);",
"public function queryRefundTransactionLog(string $orderReference): SpyPaymentAfterPayTransactionLogQuery;",
"public function RefundTxn() {\r\n\r\n $ch = curl_init();\r\n\r\n $CURLParameters = http_build_query(array(\r\n // Our default parameters!\r\n \"key\" => $this->key,\r\n \"appid\" => $this->game,\r\n // This can vary from request to request, sometimes its steamid or steamids or even an array.\r\n \"steamid\" => $this->steamid,\r\n // Custom Queries below here.\r\n \"orderid\" => $this->orderid,\r\n ));\r\n\r\n curl_setopt($ch, CURLOPT_URL, \"https://partner.steam-api.com/\" . $this->interface . \"/RefundTxn/v2/\");\r\n\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\n curl_setopt($ch, CURLOPT_POST, 1);\r\n curl_setopt($ch, CURLOPT_POSTFIELDS, $CURLParameters);\r\n $CURLResponse = json_decode(curl_exec($ch));\r\n $CURLResponseCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\r\n curl_close($ch);\r\n\r\n\r\n // Error handling improved!\r\n\r\n if ($CURLResponseCode != 200) {\r\n if ($CURLResponseCode == 400) {\r\n throw new exceptions\\SteamRequestParameterException(\"The Order ID or another parameter is invalid!\");\r\n }\r\n if ($CURLResponseCode == 401) {\r\n throw new exceptions\\SteamException(\"App ID or API Key is invalid.\");\r\n }\r\n throw new exceptions\\SteamRequestException(\"$CURLResponseCode Request Error.\");\r\n }\r\n\r\n if ($CURLResponse->response->result == \"OK\") {\r\n return true;\r\n }\r\n\r\n throw new exceptions\\SteamRequestException(json_encode($CURLResponse->response->error));\r\n }",
"public function refund($options);",
"public function refundOrder(Request $request)\n {\n $refund_data['merc_refund_ref_no'] = $request->merc_refund_ref_no;\n $refund_data['orderid'] = $request->orderid;\n $refund_data['transaction_id'] = $request->transaction_id;\n $refund_data['transaction_date'] = $request->transaction_date;\n $refund_data['refund_amount'] = $request->refund_amount;\n $refund_data['txn_amount'] = $request->txn_amount;\n\n $response = BilldeskHmac::refundOrder($refund_data);\n }",
"public function refund($params)\n {\n return $this->request(Resource::RESOURCE_ORDER_REFUND, $params);\n }",
"abstract public function refund( Payment $payment );",
"public function refund(Varien_Object $oPayment, $nAmount)\n\t{\n\t\tMage::log(\" --- Snap* Hosted Payments API : refund --- \");\n\n\t\tif(empty($nAmount))\n\t\t\t$nAmount=null;\n\n\t\tif ($oPayment->getLastTransId())\n\t\t{\n\t\t\t// build the request\n\t\t\t$oOrder = $oPayment->getOrder();\n\t\t\t$aMACParamKeys = array('code','action','merchant_order_id','txn_id');\n\t\t\t$aRequest = $this->_buildAPIRequest(array(\n\t\t\t\t'action' => 'credit',\n\t\t\t\t'merchant_order_id' => $oOrder->getRealOrderId(),\n\t\t\t\t'txn_id' => $oPayment->getLastTransId(),\n\t\t\t\t'amount' => (!is_null($nAmount) ? self::_currencyAmount($nAmount) : $nAmount),\n\t\t\t), $aMACParamKeys);\n\t\t\tMage::log($aRequest);\n\n\t\t\t// post the request\n\t\t\t$aResult = $this->_postAPIRequest($aRequest);\n\t\t\tMage::log($aResult);\n\n\t\t\t// parse the response\n\t\t\tif ($aResult['success'] === true && isset($aResult['status']) && strtolower($aResult['status']) == 'approved') // approved\n\t\t\t{\n\t\t\t\tMage::log('approved');\n\t\t\t\tif($aResult['txn_id'] != null)\n\t\t\t\t\t$oPayment->setLastTransId($aResult['txn_id']);\n\t\t\t\t$oPayment->setStatus(self::STATUS_SUCCESS);\n\t\t\t\t$oPayment->getOrder()->addStatusToHistory($oPayment->getOrder()->getStatus(), $this->_getHelper()->__('Payment has been refunded via Snap* Hosted Payments Checkout (transid # '.$aResult['txn_id'].').'));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$oPayment->setStatus(self::STATUS_ERROR);\n\t\t\t\tif ($aResult['success'] === true && isset($aResult['status']) && strtolower($aResult['status']) == 'declined') // declined\n\t\t\t\t{\n\t\t\t\t\tMage::log('declined');\n\t\t\t\t\t$sError = 'Payment refund request was declined by Snap* Hosted Payments Checkout.'.(!empty($aResult['message']) ? ' '.$aResult['message'] : '');\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tMage::log('failure');\n\t\t\t\t\t$sError = 'Payment refund request failed.'.(!empty($aResult['message']) ? ' '.$aResult['message'] : '');\n\t\t\t\t}\n\t\t\t\tMage::getSingleton('adminhtml/session')->addError($this->_getHelper()->__($sError));\n\t\t\t\t$oPayment->getOrder()->addStatusToHistory($oPayment->getOrder()->getStatus(), $this->_getHelper()->__($sError));\n\t\t\t\tMage::throwException($sError);\n\t\t\t}\n\t\t}\n\n\t\treturn $this;\n\t}",
"function filter_mellat_pay_channel_pay_refunds($transaction){\n return $transaction;\n}",
"public function get_company_invoice_payment_refund() {\n $invoice = $this->input->post('invoice');\n $data = $this->classtraineemodel->company_invoice($invoice);\n if ($data->company_id[0] == 'T') {\n $tenant_details = fetch_tenant_details($data->company_id);\n $data->company_name = $tenant_details->tenant_name;\n } else {\n $company_details = $this->company->get_company_details($this->tenant_id, $data->company_id);\n $data->company_name = $company_details[0]->company_name;\n }\n $data->discount_label = rtrim($this->course->get_metadata_on_parameter_id($data->discount_type), ', ');\n $gst_label = ($data->total_gst > 0) ? 'GST ON, ' : 'GST OFF ';\n if ($data->total_gst > 0) {\n $gst_label .= rtrim($this->course->get_metadata_on_parameter_id($data->gst_rule), ', ');\n }\n $data->gst_label = $gst_label;\n $data->inv_date = date('d/m/Y', strtotime($data->inv_date));\n $data->amount_refund = round($data->amount_refund, 2);\n $refund_details = $refund_details = $this->classtraineemodel->get_refund_paid_details($invoice);\n foreach ($refund_details as $k => $row) {\n if ($row->refnd_reason != 'OTHERS') {\n $refund_details[$k]->refnd_reason = $this->course->get_metadata_on_parameter_id($row->refnd_reason);\n } else {\n $refund_details[$k]->refnd_reason = 'Others (' . $row->refnd_reason_ot . ')';\n }\n\n $refund_details[$k]->refund_on = date('d/m/Y', strtotime($row->refund_on));\n $refund_details[$k]->mode_of_refund = $this->course->get_metadata_on_parameter_id($row->mode_of_refund);\n }\n $res = array('data' => $data, 'refund' => $refund_details);\n echo json_encode($res);\n exit();\n }",
"public function refundTransaction() {\n //not implemented\n }",
"public function refundCancel($refundHandle);",
"public static function getrefundItem()\n {\n \n $value=DB::table('product_refund')->join('users','users.id','product_refund.buyer_id')->join('product','product.product_id','product_refund.product_id')->orderBy('product_refund.dispute_id', 'desc')->get(); \n return $value;\n\t\n }",
"public function BeanstreamRefund($paymentInfo=array()) {\t\r\n\t\t$amount=urlencode($paymentInfo['amount']);\t\t\r\n\t\t$transactionID=urlencode($paymentInfo['transactionID']);\r\n\t\t$orderno=urlencode($paymentInfo['orderno']);\t\t\t\r\n $currencyCode=strtolower($paymentInfo['currency']);\t\t\t\r\n\t\t$nvpStr = \"&trnType=R&trnOrderNumber=$orderno&adjId=$transactionID&trnAmount=$amount\";\t\t\r\n\t\t$resArray=$this->hash_call('ReturnType',$nvpStr,$currencyCode);\r\n\t\treturn $resArray;\r\n\t\t\r\n\t}",
"public function processRefund($data) {\n\t\t// provide the EziDebit API endpoint\n\t\t$soapclient = new SoapClient($this->nonPci);\n\n\t\t$params = [\n\t\t\t\t'DigitalKey' => $this->digitalKey,\n\t\t\t\t'PaymentID' => $data['paymentId'],\n\t\t\t\t'BankReceiptID' => $data['bankReceiptId'],\n\t\t\t\t'RefundAmountInCents' => $data['refundAmountInCents']\n\t\t];\n\n\t\treturn $response = $soapclient->processRefund($params);\n\t}",
"public function query_out_transactions(){\n\t\t$response = $this->execute($this->query_out_transaction_url);\n\t\tif(!$response){\n\t\t\tthrow new Exception(\"error in communication\");\n\t\t}\n\t\treturn json_decode($response,true);\n\t}",
"public static function refund($params)\n {\n $requestor = Ferbuy_ApiRequestor::getInstance();\n\n $post_data = array(\n 'command' => $params['currency'].$params['amount'],\n 'output_type' => self::OUTPUT_TYPE,\n 'site_id' => $requestor->_siteId,\n 'transaction_id' => $params['transaction_id'],\n );\n $post_data['checksum'] = $requestor->sign($post_data);\n\n $response = $requestor->request('post', '/RefundTransaction', $post_data);\n return $response;\n }",
"public function refund($mixed = null) {\n\t\t$validParameters = array(\n\t\t\t'(orderv2\\refund)',\n\t\t);\n\t\t$args = func_get_args();\n\t\t$this->_checkArguments($args, $validParameters);\n\t\treturn $this->__soapCall('refund', $this->make_soap_params($mixed));\n\t}",
"function _doRefund($oID, $amount = 0) {\r\n global $db, $messageStack;\r\n $new_order_status = (int)MODULE_PAYMENT_AUTHORIZENET_ECHECK_REFUNDED_ORDER_STATUS_ID;\r\n if ($new_order_status == 0) $new_order_status = 1;\r\n $proceedToRefund = true;\r\n $refundNote = strip_tags(zen_db_input($_POST['refnote']));\r\n if (isset($_POST['refconfirm']) && $_POST['refconfirm'] != 'on') {\r\n $messageStack->add_session(MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_REFUND_CONFIRM_ERROR, 'error');\r\n $proceedToRefund = false;\r\n }\r\n if (isset($_POST['buttonrefund']) && $_POST['buttonrefund'] == MODULE_PAYMENT_AUTHORIZENET_ECHECK_ENTRY_REFUND_BUTTON_TEXT) {\r\n $refundAmt = (float)$_POST['refamt'];\r\n $new_order_status = (int)MODULE_PAYMENT_AUTHORIZENET_ECHECK_REFUNDED_ORDER_STATUS_ID;\r\n if ($refundAmt == 0) {\r\n $messageStack->add_session(MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_INVALID_REFUND_AMOUNT, 'error');\r\n $proceedToRefund = false;\r\n }\r\n }\r\n if (isset($_POST['cc_number']) && trim($_POST['cc_number']) == '') {\r\n $messageStack->add_session(MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_CC_NUM_REQUIRED_ERROR, 'error');\r\n }\r\n if (isset($_POST['trans_id']) && trim($_POST['trans_id']) == '') {\r\n $messageStack->add_session(MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_TRANS_ID_REQUIRED_ERROR, 'error');\r\n $proceedToRefund = false;\r\n }\r\n\r\n /**\r\n * Submit refund request to gateway\r\n */\r\n if ($proceedToRefund) {\r\n $submit_data = array('x_type' => 'CREDIT',\r\n 'x_card_num' => trim($_POST['cc_number']),\r\n 'x_amount' => number_format($refundAmt, 2),\r\n 'x_trans_id' => trim($_POST['trans_id'])\r\n );\r\n unset($response);\r\n $response = $this->_sendRequest($submit_data);\r\n $response_code = $response[0];\r\n $response_text = $response[3];\r\n $response_alert = $response_text . ($this->commError == '' ? '' : ' Communications Error - Please notify webmaster.');\r\n $this->reportable_submit_data['Note'] = $refundNote;\r\n $this->_debugActions($response);\r\n\r\n if ($response_code != '1') {\r\n $messageStack->add_session($response_alert, 'error');\r\n } else {\r\n // Success, so save the results\r\n $sql_data_array = array('orders_id' => $oID,\r\n 'orders_status_id' => (int)$new_order_status,\r\n 'date_added' => 'now()',\r\n 'comments' => 'REFUND INITIATED. Trans ID:' . $response[6] . ' ' . $response[4]. \"\\n\" . ' Gross Refund Amt: ' . $response[9] . \"\\n\" . $refundNote,\r\n 'customer_notified' => 0\r\n );\r\n zen_db_perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array);\r\n $db->Execute(\"update \" . TABLE_ORDERS . \"\r\n set orders_status = '\" . (int)$new_order_status . \"'\r\n where orders_id = '\" . (int)$oID . \"'\");\r\n $messageStack->add_session(sprintf(MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_REFUND_INITIATED, $response[9], $response[6]), 'success');\r\n return true;\r\n }\r\n }\r\n return false;\r\n }",
"public function refund($requestParameters = array());",
"function get_refund_by_ccode($ccode,$currentdate) {\r\n\tglobal $db;\r\n\t$M_R_query=\"SELECT merchants.currency_code, YEAR(transaction_alipay.trans_datetime) AS year, MONTH(transaction_alipay.trans_datetime) AS month, COUNT(DISTINCT transaction_alipay.id_transaction_id) AS transcount, SUM(transaction_alipay.refund_amount) AS transamount FROM merchants JOIN transaction_alipay ON transaction_alipay.merchant_id = merchants.mer_map_id AND merchants.currency_code= '$ccode' AND transaction_alipay.transaction_type IN ('2','s2') AND transaction_alipay.result_code='SUCCESS' AND MONTH(transaction_alipay.trans_datetime) = MONTH('$currentdate') GROUP BY year, month\";\r\n\t$transactionsDetails = $db->rawQuery($M_R_query);\r\n\treturn $transactionsDetails;\r\n}",
"final public static function transactionSentForRefund()\n {\n return self::get(2057);\n }",
"public function renderBuyerRefundOverviewAction(Request $request)\r\n {\r\n $payoutId = (int) $request->get('payout', null);\r\n\r\n $em = $this->getDoctrine()->getManager();\r\n\r\n $payout = $em->find('YilinkerCoreBundle:Payout', $payoutId);\r\n\r\n if (!$payout) {\r\n throw $this->createNotFoundException('Sorry not existing');\r\n }\r\n\r\n return $this->render('YilinkerBackendBundle:Transaction:buyer_refund_overview.html.twig', compact('payout'));\r\n }",
"public function getRefundByReference(string $refund_reference): RefundInterface;",
"public function refundRequest()\n {\n $request = new Request\\Refund;\n return $this->applyAuthSettings($request);\n }",
"public function getCashReceipt($txn_ref){\n\n $remits = Remittance::where('transaction_reference',$txn_ref)->first();\n $data =[];\n\n if($remits ){\n\n $invoiceIds = json_decode($remits->invoice_id,true);\n\n $year = substr($remits->month, 0,4);\n $month = substr($remits->month, 5,2);\n $BS = Revenue::select('revenues.id','users.name as agentName','services.name as serviceName','revenue_points.name as revPtName',\n 'lgas.name as lgaName','revenues.invoice','revenues.amount','revenues.created_at as date')\n ->join('users','users.userable_id','revenues.agent_id')\n ->join('services','services.id','revenues.service_id')\n ->join('revenue_points','revenue_points.id','revenues.revenue_point_id')\n ->join('lgas','lgas.id','revenue_points.lga_id')\n ->whereYear('revenues.created_at', '=', $year)\n ->whereMonth('revenues.created_at', '=', $month)\n ->where('users.role_id',env('AGENT'))\n //->where([[DB::raw('date(revenues.created_at)'),DB::raw('date(\"' . $remits->month . '\")')],['users.role_id',env('AGENT')]] )\n ->get();\n\n\n $QP = QuickPrintInvoice::select('quick_print_invoices.id','users.name as agentName','services.name as serviceName','revenue_points.name as revPtName',\n 'lgas.name as lgaName','quick_print_invoices.invoice','quick_print_invoices.amount','quick_print_invoices.created_at as date')\n ->join('users','users.userable_id','quick_print_invoices.agent_id')\n ->join('services','services.id','quick_print_invoices.service_id')\n ->join('revenue_points','revenue_points.id','quick_print_invoices.revenue_point_id')\n ->join('lgas','lgas.id','revenue_points.lga_id')\n ->whereYear('quick_print_invoices.created_at', '=', $year)\n ->whereMonth('quick_print_invoices.created_at', '=', $month)\n ->where('users.role_id',env('AGENT'))\n\n // ->where([[DB::raw('date(quick_print_invoices.created_at)'),DB::raw('date(\"' . $remits->month . '\")')],['users.role_id',env('AGENT')]])\n\n ->get();\n\n\n\n $invoiceIds = json_decode($remits->invoice_id,true);\n\n if(!empty($invoiceIds)){\n extract($invoiceIds);\n\n $i=0;\n foreach($BS as $bs){\n\n foreach ($b as $id){\n if($bs['id'] == $id )\n {\n $data[$i]['sn'] = $i+1;\n $data[$i]['collectorName'] = $bs['agentName'];\n $data[$i]['serviceName'] = $bs['serviceName'];\n $data[$i]['lgaName'] = $bs['lgaName'];\n $data[$i]['revPtName'] = $bs['revPtName'];\n $data[$i]['amount'] = $bs['amount'];\n $data[$i]['invoice'] = $bs['invoice'];\n $data[$i]['date'] = $bs['date'];\n $i++;\n }\n }\n }\n\n foreach($QP as $qp){\n\n foreach ($q as $id){\n if($qp['id'] == $id )\n {\n $data[$i]['sn'] = $i+1;\n $data[$i]['collectorName'] = $qp['agentName'];\n $data[$i]['serviceName'] = $qp['serviceName'];\n $data[$i]['lgaName'] = $qp['lgaName'];\n $data[$i]['revPtName'] = $qp['revPtName'];\n $data[$i]['amount'] = $qp['amount'];\n $data[$i]['invoice'] = $qp['invoice'];\n $data[$i]['date'] = $qp['date'];\n $i++;\n }\n }\n }\n\n }\n\n\n\n }\n\n\n\n\n return response()->json(['status' => 'success',\n 'data' => $data\n ]);\n\n }",
"static function getRefundHistory() {\n global $wpdb;\n $resultset = $wpdb->get_results(\n \"SELECT r.id, r.reservation_id, r.booking_reference, r.email, r.first_name, r.last_name, r.amount, r.description, \n sf.charge_id, sr.auth_vendor_tx_code, COALESCE(sf.ref_status, sr.ref_status) AS refund_status, \n sr.refund_status_detail, COALESCE(sf.ref_response, sr.ref_response) AS refund_response,\n COALESCE(sf.last_updated_date, sr.last_updated_date, r.last_updated_date) AS last_updated_date \n FROM wp_tx_refund r \n LEFT OUTER JOIN wp_stripe_tx_refund sf ON sf.id = r.id\n LEFT OUTER JOIN wp_sagepay_tx_refund sr ON sr.id = r.id\n ORDER BY r.id DESC\" );\n \n if($wpdb->last_error) {\n throw new DatabaseException($wpdb->last_error);\n }\n return $resultset;\n }",
"function get_merchant_refund_by_ccode($ccode,$currentdate,$merchant_id) {\n\tglobal $db;\n\t$M_R_query=\"SELECT merchants.currency_code, YEAR(transaction_alipay.trans_datetime) AS year, MONTH(transaction_alipay.trans_datetime) AS month, COUNT(DISTINCT transaction_alipay.id_transaction_id) AS transcount, SUM(transaction_alipay.refund_amount) AS transamount FROM merchants JOIN transaction_alipay ON transaction_alipay.merchant_id = merchants.mer_map_id AND merchants.currency_code= '$ccode' AND transaction_alipay.transaction_type IN ('2','s2') AND transaction_alipay.merchant_id = '$merchant_id' AND transaction_alipay.result_code='SUCCESS' AND MONTH(transaction_alipay.trans_datetime) = MONTH('$currentdate') GROUP BY year, month\";\n\t$transactionsDetails = $db->rawQuery($M_R_query);\n\treturn $transactionsDetails;\n}",
"public function getRefundId()\n {\n return $this->getParameter('refundId');\n }",
"public function actionGetOut($order_id=999)\n {\n $obj = $this->c->getOrderObj($order_id);\n \n $ret = '';\n if ($obj) {\n foreach ($obj->houseContract->contracts as $contract)\n $ret .= $contract->getContractText();\n } else {\n echo 'no obj ';\n }\n $ret = iconv('utf-8', 'gbk', $ret);\n print_r($ret);\n echo 'job done!';\n }",
"public function a_user_looking_for_data_refund()\n {\n /**\n * first todo\n * todo auth|login|middleware\n * alternative use ->loginAs(Model::find(id))\n */\n $this->user_login();\n $this->browse(function (Browser $browser) {\n $assertSee = 'Data Refund Modal';\n $tanggal = '2019-05-31';\n $uraian = 'Salah Top Up Saldo'; // value='keterangan'\n $jumlah = '8400000';\n $jumlahSee = 'Rp. 8.400.000,00,-';\n $browser\n /**\n * #path_url-02 cabang_path()\n * don't forget to put path link after execute link/move/change address.url\n * in this case we have move from user_login\n */\n ->assertPathIs($this->cabang_path())\n /**\n * ?clickLink('param')\n * the function for this\n * <a href='x'> param </a>\n */\n ->clickLink('Data Permodalan')\n ->clickLink('List Data Refund Saldo')\n // measure against , the bot seen a page ,\n // for capture laters -> finalize js loading screen\n ->assertSee($assertSee)\n // capture the task\n ->screenshot('UserViewDataPermodalan[LIST-REFUND-SALDO](1)')\n\n /**\n * select('name', 'value-option')\n * looking for view\n */\n ->select('perpage', '10')\n ->press('Oke')\n ->assertSee($assertSee)\n ->screenshot('UserViewDataPermodalan[LIST-REFUND-SALDO](2)')\n\n ->select('perpage', '25')\n ->press('Oke')\n ->assertSee($assertSee)\n ->screenshot('UserViewDataPermodalan[LIST-REFUND-SALDO](3)')\n\n ->select('perpage', '50')\n ->press('Oke')\n ->assertSee($assertSee)\n ->screenshot('UserViewDataPermodalan[LIST-REFUND-SALDO](4)')\n\n ->select('perpage', '100')\n ->press('Oke')\n ->assertSee($assertSee)\n ->screenshot('UserViewDataPermodalan[LIST-REFUND-SALDO](5)')\n // end of select\n\n /**\n * searching\n */\n // [tanggal]\n ->select('by', 'tanggal')\n // some case value more prefered use ID not CLASS , sometime make anError\n ->value('#q', $tanggal) //search\n ->screenshot('UserViewDataPermodalan[LIST-REFUND-SALDO](6)')\n // press ('value-of-button')\n ->press('Oke')\n ->assertSee($tanggal) //text from data by search\n ->screenshot('UserViewDataPermodalan[LIST-REFUND-SALDO](6.1)')\n\n // [uraian|keterangan]\n ->select('by', 'uraian')\n // some case value more prefered use ID not CLASS , sometime make anError\n ->value('#q', $uraian) //search\n ->screenshot('UserViewDataPermodalan[LIST-REFUND-SALDO](7.1)')\n // press ('value-of-button')\n ->press('Oke')\n ->assertSee($uraian) //text from data by search\n ->screenshot('UserViewDataPermodalan[LIST-REFUND-SALDO](7.2)')\n\n // [jumlah]\n ->select('by', 'jumlah')\n // some case value more prefered use ID not CLASS , sometime make anError\n ->value('#q', $jumlah) //search\n ->screenshot('UserViewDataPermodalan[LIST-REFUND-SALDO](8.1)')\n // press ('value-of-button')\n ->press('Oke')\n ->assertSee($jumlahSee) //text from data by search\n ->screenshot('UserViewDataPermodalan[LIST-REFUND-SALDO](8.2)')\n // end\n ;\n });\n }",
"public function export_payment_refund($payid) {\n if (empty($payid)) {\n return show_404();\n }\n $result = $this->get_payid_details($payid, 1);\n if ($result['data']->enrolment_mode == 'COMPSPON') {\n if ($result['data']->company_id[0] == 'T') {\n $tenant_details = fetch_tenant_details($result['data']->company_id);\n $trainee_det = $tenant_details->tenant_name;\n } else {\n $company_details = $this->company->get_company_details($this->tenant_id, $result['data']->company_id);\n $trainee_det = $company_details[0]->company_name;\n }\n } else {\n $trainee_details = $this->classtraineemodel->get_trainee_by_pymnt_due_id($payid);\n $trainee_det = $trainee_details->first_name . ' ' . $trainee_details->last_name;\n $trainee_id = $trainee_details->user_id;\n }\n $this->load->helper('pdf_reports_helper');\n generate_trainee_payment_refund($result, $refund_arr, $trainee_det);\n }",
"function get_refund_or_order()\n{\n\t// Fail\n}",
"public function reverseCurrentTransaction($pupil_id){\n \n $query = mysql_query(\"SELECT DISTINCT FROM fee_payments WHERE pupil_id'$pupil_id'\");\n \n }",
"public function refund_order(Refund $refund,RetailerOrder $order){\n $walletController = new WalletController();\n if ($order->has_user != null) {\n $user = User::find($order->has_user->id);\n if ($user->has_wallet == null) {\n\n $wallet = $walletController->wallet_create($order->has_user->id);\n } else {\n $wallet = $user->has_wallet;\n }\n } else {\n $shop = $order->has_store;\n if (count($shop->has_user) > 0) {\n if ($shop->has_user[0]->has_wallet == null) {\n $wallet = $walletController->wallet_create($shop->has_user[0]->id);\n } else {\n $wallet = $shop->has_user[0]->has_wallet;\n }\n }\n else {\n return redirect()->back()->with('error', 'Order Cant Refund Automatically Because No Wallet Found!');\n }\n }\n\n $wallet->available = $wallet->available+(double)$order->cost_to_pay;\n $wallet->save();\n /*Wallet Log*/\n $wallet_log = new WalletLog();\n $wallet_log->wallet_id = $wallet->id;\n $wallet_log->status = \"Top-up through Refund\";\n $wallet_log->amount = $order->cost_to_pay;\n $wallet_log->message = 'A Top-up of Amount '.number_format($order->cost_to_pay,2).' USD On Behalf on Refund '.$order->name.' Against Wallet ' . $wallet->wallet_token . ' At ' . now()->format('d M, Y h:i a');\n $wallet_log->save();\n\n /*Refund Order*/\n $order->status = 'cancelled';\n $order->paid = 2;\n $order->save();\n /*Order Log*/\n $order_log = new OrderLog();\n $order_log->message = \"An amount of \".$order->cost_to_pay.\" USD refunded to Wallet on \".now()->format('d M, Y h:i a');\n $order_log->status = \"refunded\";\n $order_log->retailer_order_id = $order->id;\n $order_log->save();\n\n $refund->status_id = 4;\n $refund->status = 'Closed';\n $refund->save();\n\n $tl = new RefundLog();\n $tl->message = 'A Refund Generated \"'.$refund->title.'\" against \"'.$order->name.'\" at '.now()->format('d M, Y h:i a');\n $tl->status = \"Generated\";\n $tl->refund_id = $refund->id;\n $tl->save();\n\n $this->notify->generate('Refund','Order Refund',$order->name.' Refund Approved',$refund);\n $this->inventory->OrderQuantityUpdate($order,'refund');\n return redirect()->back()->with('success','Order Refunded Successfully!');\n\n\n }",
"public function Refund($request)\n {\n $transactionID = $request->Refund->TransactionID;\n if (empty($transactionID)) {\n die(\"Refund transaction ID missing\");\n }\n $jsonRequest = $this->fixObjtoJSON($request);\n $response = $this->PostToRapidAPI(\"Transaction/$transactionID/Refund\", $jsonRequest);\n return $response;\n }",
"public function refunds_export_xls() {\n $tenant_id = $this->tenant_id;\n $company = $this->input->get('company');\n $companies = $this->classTraineeModel->get_company_for_paidinvoice($tenant_id);\n $company_arr = array();\n foreach ($companies as $row) {\n $company_arr[$row->company_id] = $row->company_name;\n }\n $invoice_id = $this->input->get('invoice_id');\n $start_date = $this->input->get('start_date');\n $end_date = $this->input->get('end_date');\n $offset = ($pageno * $records_per_page);\n $field = ($this->input->get('f')) ? $this->input->get('f') : 'inv.invoice_id';\n $order_by = ($this->input->get('o')) ? $this->input->get('o') : 'DESC';\n $tabledata = $this->reportsModel->get_refund_paid($tenant_id, $records_per_page, $offset, $field, $order_by, $company, $invoice_id, $start_date, $end_date);\n $invs = array();\n foreach ($tabledata as $k => $row) {\n if ($row->refnd_reason == 'OTHERS') {\n $tabledata[$k]->refnd_reason = \"Others (\" . $row->refnd_reason_ot . \")\";\n } else {\n $tabledata[$k]->refnd_reason = $this->courseModel->get_metadata_on_parameter_id($row->refnd_reason);\n }\n if ($row->refund_type == 'INDV') {\n $invs[$row->invoice_id] = $row->invoice_id;\n }\n }\n $tb_user = $this->reportsModel->get_refund_paid_user($invs);\n $tableuser = array();\n foreach ($tb_user as $row) {\n $tableuser[$row->invoice_id]['name'] = $row->first_name . ' ' . $row->last_name;\n $tableuser[$row->invoice_id]['taxcode'] = $this->mask_format($row->tax_code);\n }\n $this->load->helper('export_helper');\n $count_tabledata = count($tabledata);\n $excel_titles = array('Inv #', 'Taxcode', 'Name', 'Refund Dt.', 'Refund Amt.', 'Reason', 'Refunded By');\n $excel_data = array();\n for ($i = 0; $i < $count_tabledata; $i++) {\n $k = $tabledata[$i]->invoice_id;\n if ($tabledata[$i]->refund_type == 'INDV') {\n $taxcode = $tableuser[$k]['taxcode'];\n $name = $tableuser[$k]['name'];\n } else {\n if ($tabledata[$i]->company_id[0] == 'T') {\n $tenant_details = fetch_tenant_details($tabledata[$i]->company_id);\n $taxcode = $tenant_details->tenant_name;\n $name = $tenant_details->tenant_name . ' (Company)';\n } else {\n $taxcode = $tabledata[$i]->comp_regist_num;\n $name = $tabledata[$i]->company_name . ' (Company)';\n }\n }\n $excel_data[$i][] = $tabledata[$i]->invoice_id;\n $excel_data[$i][] = $taxcode;\n $excel_data[$i][] = $name;\n $excel_data[$i][] = date('d/m/Y', strtotime($tabledata[$i]->refund_on));\n $excel_data[$i][] = '$ ' . number_format($tabledata[$i]->amount_refund, 2, '.', '');\n $excel_data[$i][] = $tabledata[$i]->refnd_reason;\n $excel_data[$i][] = $tabledata[$i]->first_name . \" \" . $tabledata[$i]->last_name;\n }\n if (!empty($tabledata)) {\n if (empty($start_date) && empty($end_date)) {\n $period = ' for ' . date('F d Y, l');\n } else {\n $period = 'for the period';\n if (!empty($start_date))\n $period .= ' from ' . date('F d Y', DateTime::createFromFormat('d-m-Y', $start_date)->getTimestamp());\n if (!empty($end_date))\n $period .= ' to ' . date('F d Y', DateTime::createFromFormat('d-m-Y', $end_date)->getTimestamp());\n }\n if (!empty($company)) {\n $period .= ' \\'' . $company_arr[$company] . '\\'';\n }\n if (!empty($invoice_id)) {\n $period .= ' - \\' Invoice No.: ' . $invoice_id . '\\'';\n }\n }\n $excel_filename = 'refunds.xls';\n $excel_sheetname = 'Refunds';\n $excel_main_heading = 'Accounting Reports - Refunds' . $period;\n export_page_fields($excel_titles, $excel_data, $excel_filename, $excel_sheetname, $excel_main_heading);\n }",
"public function refund(Request $request)\n {\n $merchantAuthentication = new AnetAPI\\MerchantAuthenticationType();\n $merchantAuthentication->setName(env('ANET_API_LOGIN_ID'));\n $merchantAuthentication->setTransactionKey(env('ANET_TRANSACTION_KEY'));\n\n // Set the transaction's refId\n $refId = 'ref' . time();\n\n // Create the payment data for a credit card\n $creditCard = new AnetAPI\\CreditCardType();\n $creditCard->setCardNumber($request->cc_number);\n $creditCard->setExpirationDate($request->input('expiry_year') . \"-\" . $request->input('expiry_month'));\n\n $paymentOne = new AnetAPI\\PaymentType();\n $paymentOne->setCreditCard($creditCard);\n\n //create a transaction\n $transactionRequest = new AnetAPI\\TransactionRequestType();\n $transactionRequest->setTransactionType(\"refundTransaction\");\n $transactionRequest->setAmount($request->amount);\n $transactionRequest->setPayment($paymentOne);\n $transactionRequest->setRefTransId($request->transactionReference);\n\n\n $request = new AnetAPI\\CreateTransactionRequest();\n $request->setMerchantAuthentication($merchantAuthentication);\n $request->setRefId($refId);\n $request->setTransactionRequest($transactionRequest);\n $controller = new AnetController\\CreateTransactionController($request);\n $response = $controller->executeWithApiResponse(ANetEnvironment::PRODUCTION);\n\n if ($response != null) {\n $tresponse = $response->getTransactionResponse();\n if ($response->getMessages()->getResultCode() == \"Ok\") {\n if ($tresponse != null && $tresponse->getMessages() != null) {\n $message_text = $tresponse->getMessages()[0]->getDescription() . \", Response code: \" . $tresponse->getResponseCode() . \", Refund SUCCESS: \" . $tresponse->getTransId();\n $msg_type = \"successMessage\";\n return redirect()->route('orderList')->with($msg_type, $message_text);\n } else {\n $message_text = \"Transaction Failed\";\n $msg_type = \"errorMessage\";\n if ($tresponse->getErrors() != null) {\n $message_text = $tresponse->getErrors()[0]->getErrorText();\n $msg_type = \"errorMessage\";\n }\n }\n } else {\n if ($tresponse != null && $tresponse->getErrors() != null) {\n $message_text = $tresponse->getErrors()[0]->getErrorText();\n } else {\n $message_text = $response->getMessages()->getMessage()[0]->getText();\n }\n $msg_type = \"errorMessage\";\n }\n } else {\n $message_text = \"No response returned\";\n $msg_type = \"errorMessage\";\n }\n\n return redirect()->route('refundView')->with($msg_type, $message_text);\n }",
"function getRefundOrOrder()\n{\n\t// Fail\n}",
"function get_refund_by_ccode($ccode,$currentdate) {\n\tglobal $db;\n\t$M_R_query=\"SELECT merchants.currency_code, YEAR(gp_transaction.gp_trans_datetime) AS year, MONTH(gp_transaction.gp_trans_datetime) AS month, COUNT(DISTINCT gp_transaction.gp_transaction_id) AS transcount, SUM(gp_transaction.gp_amount) AS transamount FROM merchants JOIN gp_transaction ON gp_transaction.gp_merchant_id = merchants.mer_map_id AND merchants.currency_code= '$ccode' AND gp_transaction.gp_transaction_type IN ('2','s2') AND gp_transaction.gp_status='success' AND MONTH(gp_transaction.gp_trans_datetime) = MONTH('$currentdate') GROUP BY year, month\";\n\t$transactionsDetails = $db->rawQuery($M_R_query);\n\treturn $transactionsDetails;\n}",
"function get_refundlast_by_ccode($ccode_last,$lastmonthdate) {\r\n\tglobal $db;\r\n\t$M_R_query=\"SELECT merchants.currency_code, YEAR(transaction_alipay.trans_datetime) AS year, MONTH(transaction_alipay.trans_datetime) AS month, COUNT(DISTINCT transaction_alipay.id_transaction_id) AS transcount, SUM(transaction_alipay.refund_amount) AS transamount FROM merchants JOIN transaction_alipay ON transaction_alipay.merchant_id = merchants.mer_map_id AND merchants.currency_code= '$ccode_last' AND transaction_alipay.transaction_type IN ('2','s2') AND transaction_alipay.result_code='SUCCESS' AND MONTH(transaction_alipay.trans_datetime) = MONTH('$lastmonthdate') GROUP BY year, month\";\r\n\t$transactionsDetails = $db->rawQuery($M_R_query);\r\n\treturn $transactionsDetails;\r\n}",
"public static function getRefund($number)\n {\n $om = \\Magento\\Framework\\App\\ObjectManager::getInstance();\n $resource = $om->get('\\Magento\\Framework\\App\\ResourceConnection');\n $id = $resource->getConnection('default')->fetchOne(\n 'SELECT `entity_id` FROM `' . $resource->getTableName('sales_creditmemo') . \"` WHERE `increment_id` = '\" . $number . \"'\");\n\n $creditMemo = $om->create('\\Magento\\Sales\\Model\\Order\\Creditmemo')->load($id);\n if (empty($number) === true || empty($creditMemo) === true || $number != $creditMemo->getIncrementId()) {\n return null;\n }\n\n $ret = [ ];\n $ret ['number'] = $creditMemo->getOrder()->getIncrementId();\n // Number of the Creditmemo.\n $ret ['customer_number'] = $creditMemo->getIncrementId();\n $ret ['date'] = date('d.m.Y', strtotime($creditMemo->getCreatedAt()));\n $ret ['amount'] = $creditMemo->getGrandTotal();\n\n return $ret;\n }",
"public function addRefund($bill, $refund, $order);",
"function hook_commerce_adyen_refund_received(\\Commerce\\Adyen\\Payment\\Transaction\\Refund $transaction, \\stdClass $order) {\n\n}",
"public function refund( \\IPS\\nexus\\Transaction $transaction, $amount = NULL )\n\t{\n\t\t$extra = json_decode( $transaction->extra, TRUE );\n\t\t\n\t\t$this->api( array(\n\t\t\t'x_type'\t\t=> 'CREDIT',\n\t\t\t'x_trans_id'\t=> $transaction->gw_id,\n\t\t\t'x_amount'\t\t=> (string) ( $amount ?: $transaction->amount->amount ),\n\t\t\t'x_card_num'\t=> $extra['lastFour']\n\t\t) );\n\t}",
"public function show(Refund $refund)\n {\n //\n }",
"public function refundCharge($reference, $amount)\n {\n $url = 'gpx/merchant/transactions/refund';\n\n try {\n $res = $this->client->request('POST', $url, ['json' => ['ref'=>$reference, 'seckey' =>$this->config_vars['secret_key'], 'amount' => $amount]]);\n\n return $res->getBody();\n } catch (TransferException $e) {\n $response = $e->getResponse();\n $this->logger->error('An error occurred trying to refund the charge', ['request' => Psr7\\str($e->getRequest()), 'response' => Psr7\\str($e->getResponse())]);\n\n return $response->getBody();\n }\n }",
"public function canRefund($order)\r\n {\r\n if($order->getStatus()!='alipay_trade_finished' && $order->getStatus()!='alipay_trade_success' && $order->getStatus()!=Mage_Sales_Model_Order::STATE_PROCESSING){\r\n return false;\r\n }\r\n $payment = $order->getPayment();\r\n if($payment->getMethod()!='alipay_payment'){\r\n return false;\r\n }\r\n $payment = Mage::getModel('imaginato_alipay/payment');\r\n return $payment->trade_query($order);\r\n }",
"public static function checkRefund($purchase_token,$order_id,$buyer_id,$vendor_id)\n {\n\n $get=DB::table('product_refund')->where('purchase_token','=', $purchase_token)->where('order_id','=', $order_id)->where('buyer_id','=', $buyer_id)->where('vendor_id','=', $vendor_id)->where('dispute_status','!=', 'declined')->get();\n\t$value = $get->count(); \n return $value;\n\t\n }",
"public function testRefundPurchase() {\n\t\t$this->key_pairs = array(\n\t\t\t'tag' => $this->process_tag,\n\t\t\t'status' => 'completed',\n\t\t);\n\t\t$this->process_transactions = CrudTable\\read_rows( 'transactions', $this->key_pairs, false );\n\n\t\tif ( ! empty( $this->process_transactions ) ) {\n\t\t\t$request = TestHelpers::refundPurchaseRequest( $this->tag, $this->process_tag );\n\t\t\t$this->transactions = TestHelpers::refundPurchase( $this->http_client, $request );\n\n\t\t\t$this->assertIsArray( $this->transactions );\n\t\t\t$this->assertArrayHasKey( '0', $this->transactions );\n\n\t\t\t$this->assertEquals( $this->transactions[0]['alias'], $this->process_transactions[0]['alias'] );\n\t\t\t$this->assertEquals( $this->transactions[0]['user'], $this->process_transactions[0]['user'] );\n\t\t\t$this->assertEquals( $this->transactions[0]['cart'], $this->process_transactions[0]['cart'] );\n\t\t\t$this->assertEquals( $this->transactions[0]['transactionid'], $this->process_transactions[0]['transactionid'] );\n\t\t\t$this->assertEquals( abs( $this->transactions[0]['saleid'] ), abs( $this->process_transactions[0]['saleid'] ) );\n\t\t\t$this->assertEquals( $this->transactions[0]['currency'], $this->process_transactions[0]['currency'] );\n\t\t\t$this->assertEquals( $this->transactions[0]['status'], $this->process_transactions[0]['status'] );\n\t\t\t$this->assertEquals( $this->transactions[0]['saleid'], $this->process_transactions[0]['saleid'] );\n\n\t\t\t$this->assertEquals( 'refund', $this->transactions[0]['type'] );\n\t\t\t$this->assertEmpty( $this->transactions[0]['tokenid'] );\n\t\t\t$this->assertNotEmpty( $this->transactions[0]['refundid'] );\n\t\t\t$this->assertEmpty( $this->transactions[0]['redirect_url'] );\n\n\t\t} else {\n\t\t\t$request = TestHelpers::createPurchaseRequest( $this->process_tag );\n\t\t\t$transactions = TestHelpers::createPurchase( $this->http_client, $request );\n\t\t\t$this->assertIsArray( $transactions );\n\t\t\t$this->assertArrayHasKey( '0', $transactions );\n\t\t\t$this->assertNotEmpty( $transactions[0]['redirect_url'] );\n\t\t\t$this->assertEquals( 'created', $transactions[0]['status'] );\n\n\t\t\techo 'For complete REFUND PURCHASE test, you must pay and restart this tests.' . PHP_EOL;\n\t\t\techo 'Link for pay - ' . $transactions[0]['redirect_url'] . PHP_EOL;\n\t\t}\n\t}",
"function bankopen_refund($params)\n{\n // Gateway Configuration Parameters\n $APIKey = $params['APIKey'];\n $APISecret = $params['APISecret'];\n $testMode = $params['testMode'];\n $dropdownField = $params['dropdownField'];\n $radioField = $params['radioField'];\n $textareaField = $params['textareaField'];\n\n // Transaction Parameters\n $transactionIdToRefund = $params['transid'];\n $refundAmount = $params['amount'];\n $currencyCode = $params['currency'];\n\n // Client Parameters\n $firstname = $params['clientdetails']['firstname'];\n $lastname = $params['clientdetails']['lastname'];\n $email = $params['clientdetails']['email'];\n $address1 = $params['clientdetails']['address1'];\n $address2 = $params['clientdetails']['address2'];\n $city = $params['clientdetails']['city'];\n $state = $params['clientdetails']['state'];\n $postcode = $params['clientdetails']['postcode'];\n $country = $params['clientdetails']['country'];\n $phone = $params['clientdetails']['phonenumber'];\n\n // System Parameters\n $companyName = $params['companyname'];\n $systemUrl = $params['systemurl'];\n $langPayNow = $params['langpaynow'];\n $moduleDisplayName = $params['name'];\n $moduleName = $params['paymentmethod'];\n $whmcsVersion = $params['whmcsVersion'];\n\n // perform API call to initiate refund and interpret result\n\n return array(\n // 'success' if successful, otherwise 'declined', 'error' for failure\n 'status' => 'success',\n // Data to be recorded in the gateway log - can be a string or array\n 'rawdata' => $responseData,\n // Unique Transaction ID for the refund transaction\n 'transid' => $refundTransactionId,\n // Optional fee amount for the fee value refunded\n 'fees' => $feeAmount,\n );\n}",
"public function obtain_inoutdebt($acc_number)\n\t{\n\t return $this->db->select('inoutdebt')\n\t\t ->from('pamm_accounts') \n\t\t ->where(\"login\",$acc_number)\n\t\t ->get()->result();\n\t}",
"function hook_commerce_adyen_refund_rejected(\\Commerce\\Adyen\\Payment\\Transaction\\Refund $transaction, \\stdClass $order) {\n\n}",
"public function renderBuyerRefundOverviewPrintAction(Request $request)\r\n {\r\n $payoutId = (int) $request->get('payout', null);\r\n\r\n $em = $this->getDoctrine()->getManager();\r\n\r\n $payout = $em->find('YilinkerCoreBundle:Payout', $payoutId);\r\n\r\n if (!$payout) {\r\n throw $this->createNotFoundException('Sorry not existing');\r\n }\r\n\r\n return $this->render('YilinkerBackendBundle:Transaction:buyer_refund_overview_print.html.twig', array(\r\n 'payout' => $payout,\r\n ));\r\n }",
"public function worldlinePaymentRefund($refundId, $scopeId = null);",
"public function applyRefund(Order $order, array $parsedData);",
"public function refund(){\n\t\treturn $this->hasMany('OrderRefund','order_id','order_id');\n\t}",
"public function GetRefund($payInId) {\n return $this->GetObject('payins_getrefunds', $payInId, '\\P4M\\MangoPayBundle\\MangoPaySDK\\Refund');\n }",
"public function setRefundStamp($stamp)\n {\n $this->setParameter('refundStamp', self::toString($stamp));\n }",
"public function search_trainee_refundpayment() {\n $invoice_id = $this->input->post('invoice_id');\n $taxcode_id = $this->input->post('taxcode_id');\n $trainee_id = $this->input->post('trainee_id');\n $result['data'] = $this->classtraineemodel->search_trainee_refundpayment($invoice_id, $taxcode_id, $trainee_id, $this->tenant_id);\n if (empty($result['data'])) {\n $result['trainer'] = $this->get_trainee_name();\n } \n echo json_encode($result);\n exit();\n }",
"public function renderBuyerRefundAction (Request $request)\r\n {\r\n $dateFromCarbon = Carbon::now()->addMonth(-1)->format('m/d/Y');\r\n $dateToCarbon = Carbon::now()->addDays(1)->format('m/d/Y');\r\n\r\n $em = $this->getDoctrine()->getManager();\r\n\r\n $userOrderRepository = $em->getRepository('YilinkerCoreBundle:UserOrder');\r\n $refundsQuery = $userOrderRepository->getBuyerRefundList()\r\n ->filterBy(array(\r\n 'name' => $request->get('searchKeyword', ''),\r\n 'dateFrom' => $request->get('dateFrom', $dateFromCarbon),\r\n 'dateTo' => $request->get('dateTo', $dateToCarbon)\r\n ));\r\n\r\n $refundCount = count($refundsQuery->getResult(Query::HYDRATE_SCALAR));\r\n\r\n $refunds = $refundsQuery->select(array(\r\n 'Dispute.disputeId',\r\n 'Dispute.ticket',\r\n 'this.orderId',\r\n 'this.invoiceNumber',\r\n 'Dispute.disputeId',\r\n 'GROUP_CONCAT(OrderProduct.orderProductId) as orderProduct',\r\n 'User.userId as buyerUserId',\r\n 'User.firstName as buyerFirstName',\r\n 'User.lastName as buyerLastName',\r\n 'User.email as buyerEmail',\r\n 'User.contactNumber as buyerContactNumber'\r\n ))\r\n ->page($request->get('page', 1))\r\n ->getResult(Query::HYDRATE_ARRAY);\r\n\r\n return $this->render('YilinkerBackendBundle:Transaction:buyer_refund.html.twig', array(\r\n 'refunds' => $refunds,\r\n 'refundCount' => $refundCount,\r\n 'pageLimit' => self::PAGE_LIMIT\r\n ));\r\n }",
"public function fund_raise($uuid)\r\n {\r\n \t$_query = array('uuid' => $uuid);\r\n\r\n return $this->curl_execute($method = 'fund-raise', $_query);\r\n }",
"private function _autoRefundRecharge() {\n $where = array('state' => 0, 'add_time' => array('lt', time() - 5 * 3600));\n $list = $this->db->table('rides_recharge')->where($where)->select();\n $this->load->library('sys_model/deposit');\n $this->load->library('sys_model/orders');\n //print_r($this->db->getLastSql());\n\t//print_r($list);exit;\n foreach ($list as $rides_recharge) {\n //申请退款表里有记录\n $cashInfo = $this->sys_model_deposit->getDepositCashInfo(array('pdr_sn' => $rides_recharge['recharge_sn']));\n if ($cashInfo) {\n //$this->_changeRidesRechargeStatus($rides_recharge['recharge_sn']);\n //continue;\n }\n //print_r($cashInfo);exit;\n $order_info = $this->sys_model_orders->getOrdersInfo(array('order_sn' => $rides_recharge['order_sn']));\n if (!$order_info) {\n //$this->_changeRidesRechargeStatus($rides_recharge['recharge_sn']);\n //continue;\n }\n //print_r($order_info);exit;\n if ($order_info['order_state'] != 2) { \n //$this->_changeRidesRechargeStatus($rides_recharge['recharge_sn']);\n // continue;\n }\n\n $recharge_info = $this->sys_model_deposit->getRechargeInfo(array('pdr_sn' => $rides_recharge['recharge_sn']));\n //print_r($recharge_info);exit;\n if ($recharge_info) {\n if ($recharge_info['pdr_payment_state'] != 1) {\n continue;\n }\n\n if ($order_info['pay_amount'] >= $recharge_info['pdr_amount']) {\n $this->_changeRidesRechargeStatus($rides_recharge['recharge_sn']);\n continue;\n }\n\n $amount = $recharge_info['pdr_amount'] - $order_info['pay_amount'];\n //部分退款反映到充值表\n\t\t//print_r($amount);exit;\n $recharge_info['cash_amount'] = $amount;\n $recharge_info['admin_id'] = 0;\n $recharge_info['admin_name'] = 'system';\n\n $result = $this->sys_model_deposit->cashApply($recharge_info);\n //$result['state'] = true;\n if ($result['state']) {\n $pdc_info = array(\n 'pdc_id' => $result['data']['pdc_id'],\n 'pdc_sn' => $result['data']['pdc_sn'],\n 'pdc_user_id' => $recharge_info['pdr_user_id'],\n 'pdc_user_name' => $recharge_info['pdr_user_name'],\n 'pdc_payment_name' => $recharge_info['pdr_payment_name'],\n 'pdc_payment_code' => $recharge_info['pdr_payment_code'],\n 'pdc_payment_type' => $recharge_info['pdr_payment_type'],\n 'pdc_payment_state' => '0',\n 'pdr_amount' => $recharge_info['pdr_amount'],\n 'has_cash_amount' => 0,\n 'cash_amount' => $recharge_info['cash_amount'],\n 'pdr_sn' => $recharge_info['pdr_sn'],\n 'trace_no' => $recharge_info['trace_no'],\n 'admin_id' => $recharge_info['admin_id'],\n 'admin_name' => $recharge_info['admin_name'],\n 'pdc_type' => $recharge_info['pdr_type'],\n );\n //print_r($pdc_info);exit;\n $ssl_cert_path = DIR_SYSTEM . 'library/payment/cert/' . $this->config->get('config_wxpay_ssl_cert_path') . '/' . $recharge_info['pdr_payment_type'] . '/apiclient_cert.pem';\n $ssl_key_path = DIR_SYSTEM . 'library/payment/cert/' . $this->config->get('config_wxpay_ssl_cert_path') . '/' . $recharge_info['pdr_payment_type'] . '/apiclient_key.pem';\n //print_r($ssl_cert_path);\n //print_r($ssl_key_path);exit;\n define('WX_SSLCERT_PATH', $ssl_cert_path);\n define('WX_SSLKEY_PATH', $ssl_key_path);\n $result = $this->sys_model_deposit->wxPayRefund($pdc_info);\n if ($result['state'] == true) {\n $this->_changeRidesRechargeStatus($rides_recharge['recharge_sn']);\n $this->sys_model_orders->updateOrders(array('order_id' => $order_info['order_id']), array('refund_state' => 1));\n }\n\t\t echo 'success', \"\\n\";\n }\n }\n }\n }",
"public function refund(Collection $order)\r\n {\r\n }",
"public function refund($orderId, $amount = null, $reason = '')\n {\n $payload = array_merge([\n 'order_id' => $orderId,\n 'reason' => $reason,\n ], $this->paddleOptions());\n\n if ($amount) {\n $payload['amount'] = $amount;\n }\n\n return Cashier::post('/payment/refund', $payload)['response']['refund_request_id'];\n }",
"public function refundAction() {\n $this->chekcingForMarketplaceSellerOrNot ();\n /**\n * Initilize refund variables\n */\n $orderId = $this->getRequest ()->getParam ( 'id' );\n $produtId = $this->getRequest ()->getParam ( 'item' );\n $sellerId = Mage::getSingleton ( 'customer/session' )->getId ();\n /**\n * Collect the produts from the order details.\n */\n $orderPrdouctIds = Mage::helper ( 'marketplace/vieworder' )->getOrderProductIds ( Mage::getSingleton ( 'customer/session' )->getId (), $orderId );\n\n $orderStatusFlag = Mage::getStoreConfig ( 'marketplace/admin_approval_seller_registration/order_manage' );\n /**\n * Check whether product id is in array\n */\n if (in_array ( $produtId, $orderPrdouctIds ) && $orderStatusFlag == 1) {\n\n Mage::getModel ( 'marketplace/order' )->updateSellerRequest ( $produtId, $orderId, Mage::getSingleton ( 'customer/session' )->getId (), '', 2 );\n\n try {\n\n /**\n * Sending order email\n */\n $templateId = ( int ) Mage::getStoreConfig ( 'marketplace/admin_approval_seller_registration/order_cancel_request_notification_template_selection' );\n $adminEmailId = Mage::getStoreConfig ( 'marketplace/marketplace/admin_email_id' );\n $toMailId = Mage::getStoreConfig ( \"trans_email/ident_$adminEmailId/email\" );\n $toName = Mage::getStoreConfig ( \"trans_email/ident_$adminEmailId/name\" );\n /**\n * Select email template\n */\n if ($templateId) {\n $emailTemplate = Mage::helper ( 'marketplace/marketplace' )->loadEmailTemplate ( $templateId );\n } else {\n $emailTemplate = Mage::getModel ( 'core/email_template' )->loadDefault ( 'marketplace_cancel_order_admin_email_template_selection' );\n }\n /**\n * Load product collection for cancel\n */\n $productCollection = Mage::getModel ( 'catalog/product' )->getCollection ()->addAttributeToSelect ( '*' )->addUrlRewrite ()->addAttributeToFilter ( 'entity_id', array (\n 'eq' => $produtId\n ) );\n\n $productDetails = \"<ul>\";\n /**\n * Prepare product details for cancel email\n */\n foreach ( $productCollection as $product ) {\n $productDetails .= \"<li>\";\n $productDetails .= \"<div><a href='{$product->getProductUrl()}'>{$product->getName()}</a><div>\";\n $productDetails .= \"</li>\";\n }\n\n $productDetails .= \"</ul>\";\n /**\n * load order details\n * @var object\n */\n $incrementId = Mage::getModel ( 'sales/order' )->load ( $orderId )->getIncrementId ();\n\n /**\n * Get seller information.\n */\n $customer = Mage::getModel ( 'customer/customer' )->load ( $sellerId );\n /**\n * Initilize variable for send mail to seller\n */\n $sellerEmail = $customer->getEmail ();\n $sellerName = $customer->getName ();\n $recipient = $toMailId;\n $emailTemplate->setSenderName ( $sellerName );\n $emailTemplate->setSenderEmail ( $sellerEmail );\n\n /**\n * Prepare temail templave variables\n */\n $emailTemplateVariables = array (\n 'ownername' => $toName,\n 'productdetails' => $productDetails,\n 'order_id' => $incrementId,\n 'customer_email' => $sellerEmail,\n 'customer_firstname' => $sellerName,\n 'reason' => $this->__ ( 'Buyer wants to refund the item' ),\n 'requesttype' => $this->__ ( 'refund' ),\n 'requestperson' => $this->__ ( 'Seller' )\n );\n $emailTemplate->setDesignConfig ( array (\n 'area' => 'frontend'\n ) );\n /**\n * Sending email to admin\n */\n $emailTemplate->getProcessedTemplate ( $emailTemplateVariables );\n $emailTemplate->send ( $recipient, $toName, $emailTemplateVariables );\n\n /**\n * Redirect to order view page\n */\n Mage::getSingleton ( 'core/session' )->addSuccess ( $this->__ ( \"The item refund request has been sent.\" ) );\n $this->_redirect ( 'marketplace/order/vieworder/orderid/' . $orderId );\n } catch ( Exception $e ) {\n /**\n * when error message occured, redirected to view order page.\n */\n Mage::getSingleton ( 'core/session' )->addError ( $this->__ ( $e->getMessage () ) );\n $this->_redirect ( 'marketplace/order/vieworder/orderid/' . $orderId );\n }\n } else {\n /**\n * Check the permission.\n */\n Mage::getSingleton ( 'core/session' )->addError ( $this->__ ( 'You do not have permission to access this page' ) );\n $this->_redirect ( 'marketplace/order/manage' );\n return false;\n }\n }",
"public function refund(Request $request)\n {\n\n $payment = new Refund($request);\n\n $payment = $payment->refundOrder(false);\n\n if ($payment instanceof ResponseInterface) {\n\n return json_decode($payment->getBody()->__toString());\n\n }\n\n return new JsonResponse($payment, 200);\n\n }",
"public function refund():bool {\n request::xhr(\"orders/refund\", \"csrf_token=\".run::$runner->user->csrf.\"&id=\".substr($this->ID, 1),run::$runner->user->session);\n return true;\n }",
"public function get_company_refundpayment() {\n $invoice_id = $this->input->post('invoice');\n $company_id = $this->input->post('company');\n $company_received = $this->classtraineemodel->company_payment_recd($invoice_id);\n $user_paid = array();\n foreach ($company_received as $k => $v) {\n $user_paid[$v->user_id] = $v->amount_recd;\n }\n $company_received = $this->classtraineemodel->company_payment_refund($invoice_id);\n $user_refund = array();\n foreach ($company_received as $k => $v) {\n $user_refund[$v->user_id] = $v->refund_amount;\n }\n $company_invoice = $this->classtraineemodel->company_invoice($invoice_id);\n $company_invoice->invoice_excess_amt = (empty($company_invoice->invoice_excess_amt)) ? 0 : $company_invoice->invoice_excess_amt;\n $excess_paid = $company_invoice->invoice_excess_amt;\n $excess_refunded = empty($user_refund[0]) ? 0 : $user_refund[0];\n $excess_remain = round($excess_paid, 2) - round($excess_refunded, 2);\n $company_invoice->excess_refunded = round($excess_refunded, 2);\n $company_invoice->excess_remain = round($excess_remain, 2);\n\n $company_invoice->invoiced_on = ($company_invoice->invoiced_on == NULL || $company_invoice->invoiced_on == '0000-00-00 00:00:00') ? '' : date('d-m-Y', strtotime($company_invoice->invoiced_on));\n $company_invoice->discount_label = rtrim($this->course->get_metadata_on_parameter_id($company_invoice->discount_type), ', ');\n $gst_label = ($company_invoice->total_gst > 0) ? 'GST ON, ' : 'GST OFF ';\n if ($company_invoice->total_gst > 0) {\n $gst_label .= rtrim($this->course->get_metadata_on_parameter_id($company_invoice->gst_rule), ', ');\n }\n $company_invoice->gst_label = $gst_label;\n $company_invoice->trainees = $this->classtraineemodel->get_company_trainees_by_payid1($company_invoice->pymnt_due_id);\n foreach ($company_invoice->trainees as $k => $row) {\n $company_invoice->trainees[$k]->subsidy_recd_date = (($row->subsidy_recd_date == '0000-00-00') || ($row->subsidy_recd_date == null)) ? '' : date('d-m-Y', strtotime($row->subsidy_recd_date));\n $amount_paid = empty($user_paid[$row->user_id]) ? 0 : $user_paid[$row->user_id];\n $amount_refund = empty($user_refund[$row->user_id]) ? 0 : $user_refund[$row->user_id];\n $company_invoice->trainees[$k]->amount_paid = round($amount_paid, 2);\n $company_invoice->trainees[$k]->amount_refund = round($amount_refund, 2);\n $company_invoice->trainees[$k]->amount_remain = round(($amount_paid - $amount_refund), 2);\n }\n $company_invoice->subsidy_type = $this->classtraineemodel->get_subsidy_type($this->tenant_id);\n \n echo json_encode($company_invoice);\n exit();\n }",
"public function make_payment_refund($order, $amount)\n {\n\n if (!($details = $this->get_payment_details($order))) {\n return null;\n }\n\n $request = array(\n 'charge_id' => $details['id'],\n 'amount' => $amount,\n );\n\n WC_Gateway_Orangepay::log('Orangepay - make_payment_refund() request parameters: ' . $order->get_order_number() . ': ' . wc_print_r($request, true));\n\n $raw_response = wp_safe_remote_post(\n $this->endpoint . '/refunds',\n array(\n 'method' => 'POST',\n 'timeout' => 300,\n 'user-agent' => 'WooCommerce/' . WC()->version,\n 'headers' => array(\n 'Content-Type' => 'application/json;',\n 'Authorization' => 'Bearer ' . $this->gateway->get_option('api_token')\n ),\n 'body' => json_encode($request),\n 'httpversion' => '1.1',\n )\n );\n\n WC_Gateway_Orangepay::log('Orangepay - make_payment_refund() response: ' . wc_print_r($raw_response, true));\n\n if (isset($raw_response['body']) && ($response = json_decode($raw_response['body'], true))) {\n if (isset($response['data'])) {\n $data = $response['data'];\n if (isset($data['charge'])) {\n $charge = $data['charge'];\n if (isset($charge['included'])) {\n foreach ($charge['included'] as $included) {\n if ($included['type'] === 'refund') {\n return $included['id'];\n }\n }\n }\n }\n }\n }\n\n return null;\n }",
"function _getTransactionDetails($transaction_id) {\t\t\n\t\t// Set request-specific fields.\n\t\t$transactionID = urlencode($transaction_id);\n\t\t$this->nvpStr = \"&TRANSACTIONID=$transactionID\";\t\n\t\t\t\n\t\treturn $this->query(\"RefundTransaction\");\n\t}",
"function fn_yandex_checkpoint_get_refund_receipt($refund_data, $order_info, $currency)\n{\n /** @var \\Tygh\\Addons\\RusTaxes\\ReceiptFactory $receipt_factory */\n $receipt_factory = Tygh::$app['addons.rus_taxes.receipt_factory'];\n\n $receipt = $receipt_factory->createReceiptFromOrder($order_info, $currency, false);\n\n if (!$receipt) {\n return null;\n }\n\n foreach ($refund_data['products'] as $cart_id => $product) {\n if ($product['is_returned'] == 'N') {\n $receipt->removeItem($cart_id, ReceiptItem::TYPE_PRODUCT);\n } else {\n $receipt->setItemQuantity($cart_id, ReceiptItem::TYPE_PRODUCT, $product['amount']);\n }\n }\n\n if (isset($refund_data['refund_shipping']) && $refund_data['refund_shipping'] == 'N') {\n $receipt->removeItem(0, ReceiptItem::TYPE_SHIPPING);\n }\n\n if (isset($refund_data['refund_surcharge']) && $refund_data['refund_surcharge'] == 'N') {\n $receipt->removeItem(0, ReceiptItem::TYPE_SURCHARGE);\n }\n\n if (Registry::get('addons.gift_certificates.status') == 'A'\n && !empty($order_info['gift_certificates'])\n && isset($refund_data['certificates'])\n ) {\n foreach ($refund_data['certificates'] as $cart_id => $certificate) {\n if ($certificate['is_returned'] == 'N') {\n $receipt->removeItem($cart_id, ReceiptItem::TYPE_GIFT_CERTIFICATE);\n }\n }\n }\n\n /**\n * Executes after building receipt to refund via Yandex.Checkpoint, allows to modify receipt.\n *\n * @param array $refund_data Refund info (returned products, refunded shipping etc.)\n * @param array $order_info Order info\n * @param string $currency Currency code\n * @param Receipt $receipt Receipt instance\n */\n fn_set_hook('yandex_checkpoint_build_refunded_order_post', $refund_data, $order_info, $currency, $receipt);\n\n $receipt->allocateDiscountByUnit();\n\n return fn_yandex_checkpoint_convert_receipt($receipt, MWSClient::YANDEX_CHECKPOINT_RUB);\n}",
"function spgateway_credit_refund($params) {\n\n $amount = $params['amount']; # Format: ##.##\n $TotalAmount = round($amount);\n $transid = $params['transid'];\n\n # 是否為測試模式\n $posturl = ($params['testMode']==\"on\") ? 'https://ccore.spgateway.com/MPG/mpg_gateway'\n : 'https://core.spgateway.com/MPG/mpg_gateway' ;\n\n // post data\n $PostData = http_build_query(\n array( 'RespondType' => 'String',\n 'Version' => '1.0',\n 'Amt' => $TotalAmount,\n 'TradeNo' => $transid,\n 'TimeStamp' => time(),\n 'IndexType' => '2',\n 'CloseType' => '2'\n ));\n $PostData = trim(\n bin2hex(\n mcrypt_encrypt( MCRYPT_RIJNDAEL_128,\n $params['HashKey'],\n spgateway_credit_addpadding($PostData),\n MCRYPT_MODE_CBC,\n $params['HashIV'])\n )\n );\n\n // post\n $post = array( 'MerchantID_' => $params['MerchantID'],\n 'PostData_' => $PostData);\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $posturl);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $post);\n if ($params['testMode']=='on') curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); // On dev server only!\n $result = curl_exec($ch);\n curl_close($ch);\n\n parse_str(trim($result),$result);\n\n switch($result['Status']){\n case 'SUCCESS':\n case 'TRA10045':\n return array('status'=>'success', 'rawdata'=>$result, 'transid'=>$result['TradeNo'], 'fees'=>0);\n case 'TRA10058':\n case 'TRA10675':\n case 'TRA10013':\n case 'TRA10035':\n return array('status'=>'declined', 'rawdata'=>$result);\n default:\n return array('status'=>'error', 'rawdata'=>$result);\n }\n}",
"public function index(Office $office, Refund $refund)\n {\n $budgetEdit = new ContractBudgetEdit;\n $budgetEdit = $office->contract_budget_edits()\n ->where('refund_id','=',$refund->id)\n ->orderBy('contract_edit_date','asc')\n ->get();\n return ContractBudgetEditResource::collection($budgetEdit);\n //return COntractBudgetEditResource::collection($office->contract_budget_edits()->get());\n // $contract_edits = new ContractBudgetEdit;\n // $contract_edits = $office->contract_budget_edits()\n // ->where(\"refund_id\",\"=\",$refund->id)\n // ->get();\n\n // return COntractBudgetEditResource::collection($contract_edits);\n }",
"public function closeOrder_get() {\n extract($_GET);\n $result = $this->feeds_model->closeOrder($order_id);\n return $this->response($result);\n }",
"public function getRefundDetails($requestParameters = array());",
"public function refund()\n\t{\n\t\trequirePermission(\"canRefund\");\n\n\t\t$id = intval($this->input->get(\"id\"));\n\t\t$costDp = intval($this->input->get(\"costDp\"));\n\t\t$accountId = intval($this->input->get(\"accountId\"));\n\t\t\n\t\tif(!$id || !is_numeric($id))\n\t\t{\n\t\t\tdie();\n\t\t}\n\n\t\tif ($costDp != \"Free\") {\n\t\t\tif(!$costDp || !is_numeric($costDp))\n\t\t\t{\n\t\t\t\tdie();\n\t\t\t}\n\t\t}\n\n\t\tif(!$accountId || !is_numeric($accountId))\n\t\t{\n\t\t\tdie();\n\t\t}\n\n\t\tif ($costDp != \"Free\") {\n\t\t\tif ($costDp > 0) {\n\t\t\t\t$userDp = intval($this->recup_model->getDp($accountId));\n\t\t\t\tif(!$userDp || !is_numeric($userDp))\n\t\t\t\t{\n\t\t\t\t\tdie(\"Problème lors de l'acquisition des users dps.\");\n\t\t\t\t}\n\t\t\t\t$this->internal_user_model->setDp($accountId, $userDp+$costDp);\n\t\t\t}\n\t\t}\n\t\t$this->recup_model->editEtat($this->realms->getRealm(1)->getCharacters()->getConnection(), $id, 8);\n\t}",
"public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(RefundsPeer::REFNO, $key, Criteria::EQUAL);\n }",
"protected function _updateRefundDetails()\n {\n $sQuery = \"SELECT BESTITAMAZONREFUNDID\n FROM bestitamazonrefunds\n WHERE STATE = 'Pending'\n AND BESTITAMAZONREFUNDID != ''\";\n\n $aResult = $this->_getContainer()->getDatabase()->getAll($sQuery);\n\n $this->_oLogger->info(\n 'Fetched orders and processed',\n array('orderNumbers' => array_keys($aResult))\n );\n\n foreach ($aResult as $aRow) {\n $oData = $this->_getContainer()->getClient()->getRefundDetails($aRow['BESTITAMAZONREFUNDID']);\n\n if (isset($oData->GetRefundDetailsResult->RefundDetails->RefundStatus->State)) {\n $this->_addToMessages(\n \"Refund ID: {$oData->GetRefundDetailsResult->RefundDetails->RefundReferenceId} - \"\n .\"Status: {$oData->GetRefundDetailsResult->RefundDetails->RefundStatus->State}<br/>\"\n );\n }\n }\n }",
"function it_exchange_refund_url_for_authorizenet( $url ) {\n\t$settings = it_exchange_get_option( 'addon_authorizenet' );\n\t$url = $settings['authorizenet-sandbox-mode'] ? AUTHORIZE_NET_AIM_API_SANDBOX_URL : AUTHORIZE_NET_AIM_API_LIVE_URL;\n\n\treturn $url;\n}",
"public function getRefundID()\n {\n return $this->refundID;\n }",
"public function view_refund()\n\n {\n $itemData['item'] = Product::getrefundItem();\n\n $data = ['itemData' => $itemData];\n\n return view('admin.refund')->with($data);\n }",
"public function queryCancelTransactionLog(string $orderReference): SpyPaymentAfterPayTransactionLogQuery;",
"public function outOperation(){\n $this->inventory->setQuantity($this->inventory->getQuantity() - $this->getQuantity());\n $this->type = \"OUT\";\n }",
"public function readrefundsAction()\n {\n $this->getResponse()->setBody(self::getHelper()->readrefunds());\n\n }",
"public function doRefund() {\n\t\t\n\t\t$this->load->language('extension/payment/hoolah_refund');\n\t\tif (!empty($this->request->post['transaction_id']) && isset($this->request->post['refund_full']) && !empty($this->request->post['description'])) {\n\t\t\t$this->load->model('extension/payment/hoolah');\n\n\t\t\tif ($this->request->post['refund_full'] == 0 && $this->request->post['amount'] == 0) {\n\t\t\t\t$this->session->data['error'] = $this->language->get('error_partial_amt');\n\t\t\t\t$this->response->redirect($this->url->link('extension/payment/hoolah/refund', 'token=' . $this->session->data['token'] . '&tid=' . $this->request->get['tid'] . '&order_id=' . $this->request->get['order_id'], true));\n\t\t\t} else {\n\t\t\t\t$order_transaction = $this->model_extension_payment_hoolah->getHoolahOrderTransactionStatus($this->request->get['order_id'], 'APPROVED');\n\t\t\t \n\t\t\t // get sku order\n\t\t $orders = $this->model_extension_payment_hoolah->getOrderProducts($this->request->get['order_id']);\n\t\t\n\t\t\t\tif (isset($order_transaction)) {\n\t\t\t\t $call_data['transaction_id'] = $order_transaction['id'];\n\t\t\t\t $call_data['uuid'] = $order_transaction['uuid'];\n\t\t\t\t $call_data['description'] = $this->request->post['description'];\n\t\t\t\t $call_data['order_id'] = $this->request->post['order_id'];\n\t\t\t\t \n\t\t\t\t\tif ($this->request->post['refund_full'] == 1) {\n\t\t\t\t\t\t$call_data['REFUNDTYPE'] = 'Full';\n\t\t\t\t\t\t$call_data['AMT'] = $order_transaction['total'];\n\t\t\t\t\t\n\t\t\t\t\t\t// submit to hoolah api\n\t\t\t\t\t $result = $this->model_extension_payment_hoolah->initiate_fullrefund($call_data);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$call_data['REFUNDTYPE'] = 'Partial';\n\t\t\t\t\t\t$call_data['AMT'] = $this->request->post['amount'];\n\t\t\t\t\t\t$call_data['sku'] = $orders[0]['sku'];\n\t\t\t\t\t\t$call_data['CURRENCYCODE'] = $this->request->post['currency_code'];\n\t\t\t\t\t\t\n\t\t\t\t\t\t// submit to hoolah api\n\t\t\t\t\t $result = $this->model_extension_payment_hoolah->initiate_partialrefund($call_data);\n\t\t\t\t\t}\n\t\t\t\t\t$refund_details = array();\n foreach($result->details AS $rows) {\n $refund_details[] = $rows;\n }\n \n $refund = array();\n $refund['order_id'] = $order_transaction['order_id'];\n $refund['uuid'] = $order_transaction['uuid'];\n $refund['status'] = $result->status;\n $refund['orderType'] = $order_transaction['orderType'];\n $refund['total'] = $call_data['AMT'];\n $refund['tax'] = $order_transaction['tax'];\n $refund['shipping_fee'] = $order_transaction['shipping_fee'];\n $refund['currency'] = $order_transaction['currency'];\n $refund['requestId'] = $result->requestId;\n $refund['code'] = $result->code;\n $refund['message'] = $result->message;\n $refund['details'] = json_encode($refund_details);\n $refund['createdAt'] = date('Y-m-d H:i:s');\n $refund['date_added'] = date('Y-m-d H:i:s');\n \n // save it to transaction tbl\n $this->model_extension_payment_hoolah->addHoolahOrderTransactionRefund($refund);\n \n if($result->code == 'accepted' || $result->code == 'in_process' || $result->code == 'in_process') {\n //redirect back to the order\n\t\t\t\t\t\t$this->response->redirect($this->url->link('sale/order/info', 'token=' . $this->session->data['token'] . '&order_id=' . $this->request->get['order_id'], true));\n \n } else {\n $this->session->data['error'] = $result->message;\n\t\t\t\t\t $this->response->redirect($this->url->link('extension/payment/hoolah/refund', 'token=' . $this->session->data['token'] . '&tid=' . $this->request->get['tid'] . '&order_id=' . $this->request->get['order_id'], true));\n }\n\t\t\t\t} else {\n\t\t\t\t\t$this->session->data['error'] = $this->language->get('error_data');\n\t\t\t\t\t$this->response->redirect($this->url->link('extension/payment/hoolah/refund', 'token=' . $this->session->data['token'] . '&tid=' . $this->request->get['tid'] . '&order_id=' . $this->request->get['order_id'], true));\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$this->session->data['error'] = $this->language->get('error_data');\n\t\t\t$this->response->redirect($this->url->link('extension/payment/hoolah/refund', 'token=' . $this->session->data['token'] . '&tid=' . $this->request->get['tid'] . '&order_id=' . $this->request->get['order_id'], true));\n\t\t}\n\t}",
"public function testGetOrderDetailByTransactionIdInvalid(){\n \n \tPayU::$apiLogin = PayUTestUtil::API_LOGIN;\n \tPayU::$apiKey = PayUTestUtil::API_KEY;\n \tEnvironment::setReportsCustomUrl(PayUTestUtil::REPORTS_CUSTOM_URL); \n \n \t$parameters = array(PayUParameters::TRANSACTION_ID => 'InvalidTransactionId');\n \n \t$response = PayUReports::getOrderDetailByReferenceCode($parameters);\n \n }",
"function sell($amount,$symbol){\n //user should be the owner of the stock if he wants to sell\n if($symbol==\"Book\" && $this->bookstock_buy>0){\n echo $this->new_account.\" sold Book Stock\\n\";\n echo \"Transaction Time:\";\n echo date('Y-m-d H:i:s').\"\\n\";\n echo \"Total balance of \".$this->new_account.\" is:\".$this->totalamount.\"\\n\";\n $this->bookstock_buy--;\n $this->object_linkedlist->remove_last();\n }\n elseif($symbol==\"Newspaper\" && $this->newspaperstock_buy>0){\n echo $this->new_account.\" sold Newspaper Stock\\n\";\n echo \"Transaction Time:\";\n echo date('Y-m-d H:i:s').\"\\n\";\n echo \"Total balance of \".$this->new_account.\" is:\".$this->totalamount.\"\\n\";\n $this->newspaperstock_buy--;\n $this->object_linkedlist->remove_last();\n }\n }",
"function retrieveFunds() {\n return -58.98;\n }",
"function wp_aff_handle_woocommerce_order_refund($order_id) {\n wp_affiliate_log_debug(\"WooCommerce Affiliate integration - order refunded. Order ID: \" . $order_id, true);\n //$order = new WC_Order($order_id);\n $txn_id = $order_id;\n wp_aff_handle_refund($txn_id);\n}",
"function FetchStockTrnsfReqTrans()\n {\n $sql=\"SELECT * FROM INVT_T_SREQ_HEAD ORDER BY SRQH_TXN_NO ASC\";\n return $this->db->query($sql, $return_object = TRUE)->result_array();\n }",
"public function hookActionProductCancel($params)\n {\n if ($params['action'] === CancellationActionType::STANDARD_REFUND) {\n $order = $params['order'];\n $cart_id = $order->id_cart;\n $cart = new Cart($cart_id);\n\n // realizamos la consulta de base de datos para el tiketNumber\n $query = 'SELECT * FROM '._DB_PREFIX_.'kushkipagos WHERE `cart_id` = \\''.$cart_id.'\\' limit 1 ';\n $order_kushki = Db::getInstance()->executeS($query);\n\n $ticket_number = $order_kushki[0][\"ticket_number\"];\n $kushkiToken = $order_kushki[0][\"token\"];\n\n $currency_order = new Currency((int)((int)$params[\"order\"]->id_currency));\n\n $amount = $this->getAmountValues($cart);\n\n $obj_amount = array_merge($amount, array(\"currency\" =>$currency_order->iso_code));\n // llamamos al endpoint de refund\n $refund = $this->callUrlRefund($obj_amount, $ticket_number);\n\n if ( ! $refund ) {\n throw new PrestaShopException('An error occurred while attempting to create the refund using the payment gateway API.');\n }else{\n if ($refund->isSuccessful()) {\n //cambiamos el status a refunded\n $history = new OrderHistory();\n $history->id_order = (int)$order->id;\n $history->changeIdOrderState(7, (int)($order->id));\n $order->setCurrentState(7);\n PrestaShopLogger::addLog('Kushki Refund CORRECTO en orden' . $order->id . ' Ticket number: ' . $refund->getTicketNumber(), 1);\n $this->saveDataRefund($kushkiToken, $refund->getTicketNumber(), $cart_id, (int)$order->id, (int)Configuration::get('PS_OS_REFUND'), $order->total_paid, \"kushkipagos\", \"refund\", (int)$order->id_currency, $order->secure_key, \"initialized\" );\n } else {\n PrestaShopLogger::addLog('Kushki Refund FALLIDO en orden '.$order->id.' Message ' . $refund->getResponseText(), 3);\n throw new OrderException('Hubo un error en el refund de esta orden.');\n }\n }\n\n } else if ($params['action'] === CancellationActionType::PARTIAL_REFUND) {\n throw new OrderException('Kushki no puede hacer devoluciones parciales, debe hacer la devolución del total del pedido');\n }\n }",
"function _refundItemAmount($type = '', $itemIds = array())\r\n {\r\n $ItemUserConditions = array(\r\n 'OR' => array(\r\n array(\r\n 'ItemUser.is_paid' => 1,\r\n 'ItemUser.is_repaid' => 0,\r\n 'ItemUser.is_canceled' => 0,\r\n 'ItemUser.payment_gateway_id' => ConstPaymentGateways::Wallet\r\n ) ,\r\n array(\r\n 'ItemUser.is_paid' => 0,\r\n 'ItemUser.is_repaid' => 0,\r\n 'ItemUser.is_canceled' => 0,\r\n 'ItemUser.payment_gateway_id' => array(\r\n ConstPaymentGateways::CreditCard,\r\n ConstPaymentGateways::PayPalAuth,\r\n ConstPaymentGateways::AuthorizeNet,\r\n )\r\n )\r\n )\r\n );\r\n if (!empty($itemIds)) {\r\n $conditions['Item.id'] = $itemIds;\r\n } elseif (!empty($type) && $type == 'cron') {\r\n $conditions['Item.item_status_id'] = array(\r\n ConstItemStatus::Expired,\r\n ConstItemStatus::Canceled\r\n );\r\n }\r\n $items = $this->find('all', array(\r\n 'conditions' => $conditions,\r\n 'contain' => array(\r\n 'ItemUser' => array(\r\n 'User' => array(\r\n 'fields' => array(\r\n 'User.username',\r\n 'User.email',\r\n 'User.id',\r\n 'User.cim_profile_id',\r\n ) ,\r\n 'UserProfile' => array(\r\n 'fields' => array(\r\n 'UserProfile.first_name',\r\n 'UserProfile.last_name'\r\n ) ,\r\n ) ,\r\n ) ,\r\n 'PaypalDocaptureLog' => array(\r\n 'fields' => array(\r\n 'PaypalDocaptureLog.authorizationid',\r\n 'PaypalDocaptureLog.dodirectpayment_amt',\r\n 'PaypalDocaptureLog.id',\r\n 'PaypalDocaptureLog.currencycode'\r\n )\r\n ) ,\r\n 'PaypalTransactionLog' => array(\r\n 'fields' => array(\r\n 'PaypalTransactionLog.id',\r\n 'PaypalTransactionLog.authorization_auth_exp',\r\n 'PaypalTransactionLog.authorization_auth_id',\r\n 'PaypalTransactionLog.authorization_auth_amount',\r\n 'PaypalTransactionLog.authorization_auth_status'\r\n )\r\n ) ,\r\n 'AuthorizenetDocaptureLog' => array(\r\n 'fields' => array(\r\n 'AuthorizenetDocaptureLog.id',\r\n 'AuthorizenetDocaptureLog.authorize_amt',\r\n )\r\n ) ,\r\n 'conditions' => $ItemUserConditions,\r\n ) ,\r\n 'Merchant' => array(\r\n 'fields' => array(\r\n 'Merchant.name',\r\n 'Merchant.id',\r\n 'Merchant.url',\r\n 'Merchant.zip',\r\n 'Merchant.address1',\r\n 'Merchant.address2',\r\n 'Merchant.city_id'\r\n ) ,\r\n 'City' => array(\r\n 'fields' => array(\r\n 'City.id',\r\n 'City.name',\r\n 'City.slug',\r\n )\r\n ) ,\r\n 'State' => array(\r\n 'fields' => array(\r\n 'State.id',\r\n 'State.name'\r\n )\r\n ) ,\r\n 'Country' => array(\r\n 'fields' => array(\r\n 'Country.id',\r\n 'Country.name',\r\n 'Country.slug',\r\n )\r\n )\r\n ) ,\r\n 'Attachment' => array(\r\n 'fields' => array(\r\n 'Attachment.id',\r\n 'Attachment.dir',\r\n 'Attachment.filename',\r\n 'Attachment.width',\r\n 'Attachment.height'\r\n )\r\n ) ,\r\n 'City' => array(\r\n 'fields' => array(\r\n 'City.id',\r\n 'City.name',\r\n 'City.slug',\r\n )\r\n ) ,\r\n ) ,\r\n 'recursive' => 3,\r\n ));\r\n App::import('Model', 'EmailTemplate');\r\n $this->EmailTemplate = new EmailTemplate();\r\n App::import('Core', 'ComponentCollection');\r\n $collection = new ComponentCollection();\r\n App::import('Component', 'Email');\r\n $this->Email = new EmailComponent($collection);\r\n if (!empty($items)) {\r\n $itemIds = array();\r\n App::import('Component', 'Paypal');\r\n $this->Paypal = new PaypalComponent($collection);\r\n $paymentGateways = $this->User->Transaction->PaymentGateway->find('all', array(\r\n 'conditions' => array(\r\n 'PaymentGateway.id' => array(\r\n ConstPaymentGateways::CreditCard,\r\n ConstPaymentGateways::AuthorizeNet\r\n ) ,\r\n ) ,\r\n 'contain' => array(\r\n 'PaymentGatewaySetting' => array(\r\n 'fields' => array(\r\n 'PaymentGatewaySetting.key',\r\n 'PaymentGatewaySetting.test_mode_value',\r\n 'PaymentGatewaySetting.live_mode_value',\r\n ) ,\r\n ) ,\r\n ) ,\r\n 'recursive' => 1\r\n ));\r\n foreach($paymentGateways as $paymentGateway) {\r\n if ($paymentGateway['PaymentGateway']['id'] == ConstPaymentGateways::CreditCard) {\r\n if (!empty($paymentGateway['PaymentGatewaySetting'])) {\r\n foreach($paymentGateway['PaymentGatewaySetting'] as $paymentGatewaySetting) {\r\n if ($paymentGatewaySetting['key'] == 'directpay_API_UserName') {\r\n $paypal_sender_info['API_UserName'] = $paymentGateway['PaymentGateway']['is_test_mode'] ? $paymentGatewaySetting['test_mode_value'] : $paymentGatewaySetting['live_mode_value'];\r\n }\r\n if ($paymentGatewaySetting['key'] == 'directpay_API_Password') {\r\n $paypal_sender_info['API_Password'] = $paymentGateway['PaymentGateway']['is_test_mode'] ? $paymentGatewaySetting['test_mode_value'] : $paymentGatewaySetting['live_mode_value'];\r\n }\r\n if ($paymentGatewaySetting['key'] == 'directpay_API_Signature') {\r\n $paypal_sender_info['API_Signature'] = $paymentGateway['PaymentGateway']['is_test_mode'] ? $paymentGatewaySetting['test_mode_value'] : $paymentGatewaySetting['live_mode_value'];\r\n }\r\n }\r\n $paypal_sender_info['is_testmode'] = $paymentGateway['PaymentGateway']['is_test_mode'];\r\n }\r\n }\r\n if ($paymentGateway['PaymentGateway']['id'] == ConstPaymentGateways::AuthorizeNet) {\r\n if (!empty($paymentGateway['PaymentGatewaySetting'])) {\r\n foreach($paymentGateway['PaymentGatewaySetting'] as $paymentGatewaySetting) {\r\n if ($paymentGatewaySetting['key'] == 'authorize_net_api_key') {\r\n $authorize_sender_info['api_key'] = $paymentGateway['PaymentGateway']['is_test_mode'] ? $paymentGatewaySetting['test_mode_value'] : $paymentGatewaySetting['live_mode_value'];\r\n }\r\n if ($paymentGatewaySetting['key'] == 'authorize_net_trans_key') {\r\n $authorize_sender_info['trans_key'] = $paymentGateway['PaymentGateway']['is_test_mode'] ? $paymentGatewaySetting['test_mode_value'] : $paymentGatewaySetting['live_mode_value'];\r\n }\r\n }\r\n }\r\n $authorize_sender_info['is_test_mode'] = $paymentGateway['PaymentGateway']['is_test_mode'];\r\n }\r\n }\r\n foreach($items as $item) {\r\n if (!empty($item['ItemUser'])) {\r\n $ItemUserIds = array();\r\n\t\t\t\t\t$itemUserIdData = array();\r\n\t\t\t\t\t$itemIds = array();\r\n foreach($item['ItemUser'] as $item_user) {\r\n //do void for credit card\r\n if ($item_user['payment_gateway_id'] != ConstPaymentGateways::Wallet) {\r\n if ($item_user['payment_gateway_id'] == ConstPaymentGateways::AuthorizeNet) {\r\n require_once (APP . 'vendors' . DS . 'CIM' . DS . 'AuthnetCIM.class.php');\r\n if ($authorize_sender_info['is_test_mode']) {\r\n $cim = new AuthnetCIM($authorize_sender_info['api_key'], $authorize_sender_info['trans_key'], true);\r\n } else {\r\n $cim = new AuthnetCIM($authorize_sender_info['api_key'], $authorize_sender_info['trans_key']);\r\n }\r\n $cim->setParameter('customerProfileId', $item_user['User']['cim_profile_id']);\r\n $cim->setParameter('customerPaymentProfileId', $item_user['payment_profile_id']);\r\n $cim->setParameter('transId', $item_user['cim_transaction_id']);\r\n $cim->voidCustomerProfileTransaction();\r\n // And if enbaled n Credit docapture amount and item discount amount is not equal, add amount to user wallet and update transactions //\r\n if (Configure::read('wallet.is_handle_wallet')) {\r\n if ($item_user['AuthorizenetDocaptureLog']['authorize_amt'] != $item['Item']['discount_amount']) {\r\n $update_wallet = '';\r\n $update_wallet = ($item['Item']['price']*$item_user['quantity']) -$item_user['AuthorizenetDocaptureLog']['authorize_amt'];\r\n //Updating transactions\r\n $data = array();\r\n $data['Transaction']['user_id'] = $item_user['user_id'];\r\n $data['Transaction']['foreign_id'] = ConstUserIds::Admin;\r\n $data['Transaction']['class'] = 'SecondUser';\r\n $data['Transaction']['amount'] = $update_wallet;\r\n $data['Transaction']['transaction_type_id'] = ConstTransactionTypes::AddedToWallet;\r\n $transaction_id = $this->User->Transaction->log($data);\r\n if (!empty($transaction_id)) {\r\n $this->User->updateAll(array(\r\n 'User.available_balance_amount' => 'User.available_balance_amount +' . $update_wallet\r\n ) , array(\r\n 'User.id' => $item_user['user_id']\r\n ));\r\n }\r\n }\r\n } // END act like groupon wallet funct., //\r\n if ($cim->isSuccessful()) {\r\n if (!empty($itemuser['AuthorizenetDocaptureLog']['id'])) {\r\n $data_authorize_docapture_log['AuthorizenetDocaptureLog']['id'] = $itemuser['AuthorizenetDocaptureLog']['id'];\r\n $data_authorize_docapture_log['AuthorizenetDocaptureLog']['payment_status'] = 'Cancelled';\r\n $this->ItemUser->AuthorizenetDocaptureLog->save($data_authorize_docapture_log);\r\n }\r\n return true;\r\n }\r\n } else {\r\n $payment_response = array();\r\n if ($item_user['payment_gateway_id'] == ConstPaymentGateways::CreditCard) {\r\n $post_info['authorization_id'] = $item_user['PaypalDocaptureLog']['authorizationid'];\r\n } else if ($item_user['payment_gateway_id'] == ConstPaymentGateways::PayPalAuth) {\r\n $post_info['authorization_id'] = $item_user['PaypalTransactionLog']['authorization_auth_id'];\r\n }\r\n $post_info['note'] = __l('Item Payment refund');\r\n //call void function in paypal component\r\n $payment_response = $this->Paypal->doVoid($post_info, $paypal_sender_info);\r\n //update payment responses\r\n if (!empty($payment_response)) {\r\n if ($item_user['payment_gateway_id'] == ConstPaymentGateways::CreditCard) {\r\n $data_paypal_docapture_log['PaypalDocaptureLog']['id'] = $item_user['PaypalDocaptureLog']['id'];\r\n foreach($payment_response as $key => $value) {\r\n $data_paypal_docapture_log['PaypalDocaptureLog']['dovoid_' . strtolower($key) ] = $value;\r\n }\r\n $data_paypal_docapture_log['PaypalDocaptureLog']['dovoid_response'] = serialize($payment_response);\r\n $data_paypal_docapture_log['PaypalDocaptureLog']['payment_status'] = 'Cancelled';\r\n //update PaypalDocaptureLog table\r\n $this->ItemUser->PaypalDocaptureLog->save($data_paypal_docapture_log);\r\n // And if enbaled n Credit docapture amount and item discount amount is not equal, add amount to user wallet and update transactions //\r\n if (Configure::read('wallet.is_handle_wallet')) {\r\n if ($data_paypal_docapture_log['PaypalDocaptureLog']['original_amount'] != $item['Item']['discount_amount']) {\r\n $update_wallet = '';\r\n $update_wallet = ($item['Item']['price']*$item_user['quantity']) -$item_user['PaypalDocaptureLog']['dodirectpayment_amt'];\r\n //Updating transactions\r\n $data = array();\r\n $data['Transaction']['user_id'] = $item_user['user_id'];\r\n $data['Transaction']['foreign_id'] = ConstUserIds::Admin;\r\n $data['Transaction']['class'] = 'SecondUser';\r\n $data['Transaction']['amount'] = $update_wallet;\r\n $data['Transaction']['transaction_type_id'] = ConstTransactionTypes::AddedToWallet;\r\n $transaction_id = $this->User->Transaction->log($data);\r\n if (!empty($transaction_id)) {\r\n $this->User->updateAll(array(\r\n 'User.available_balance_amount' => 'User.available_balance_amount +' . $update_wallet\r\n ) , array(\r\n 'User.id' => $item_user['user_id']\r\n ));\r\n }\r\n }\r\n } // END act like groupon wallet funct., //\r\n\r\n } else if ($item_user['payment_gateway_id'] == ConstPaymentGateways::PayPalAuth) {\r\n $data_paypal_capture_log['PaypalTransactionLog']['id'] = $item_user['PaypalTransactionLog']['id'];\r\n foreach($payment_response as $key => $value) {\r\n $data_paypal_capture_log['PaypalTransactionLog']['void_' . strtolower($key) ] = $value;\r\n }\r\n $data_paypal_capture_log['PaypalTransactionLog']['void_data'] = serialize($payment_response);\r\n $data_paypal_capture_log['PaypalTransactionLog']['payment_status'] = 'Cancelled';\r\n $data_paypal_capture_log['PaypalTransactionLog']['error_no'] = '0';\r\n //update PaypalTransactionLog table\r\n $this->ItemUser->PaypalTransactionLog->save($data_paypal_capture_log);\r\n // And if enabled n PayPal docapture amount and item discount amount is not equal, add amount to user wallet and update transactions //\r\n if (Configure::read('wallet.is_handle_wallet')) {\r\n if ($item_user['PaypalTransactionLog']['orginal_amount'] != $item['Item']['discount_amount']) {\r\n $update_wallet = '';\r\n $update_wallet = ($item['Item']['price']*$item_user['quantity']) -$item_user['PaypalTransactionLog']['authorization_auth_amount'];\r\n //Updating transactions\r\n $data = array();\r\n $data['Transaction']['user_id'] = $item_user['user_id'];\r\n $data['Transaction']['foreign_id'] = ConstUserIds::Admin;\r\n $data['Transaction']['class'] = 'SecondUser';\r\n $data['Transaction']['amount'] = $update_wallet;\r\n $data['Transaction']['transaction_type_id'] = ConstTransactionTypes::AddedToWallet;\r\n $transaction_id = $this->User->Transaction->log($data);\r\n if (!empty($transaction_id)) {\r\n $this->User->updateAll(array(\r\n 'User.available_balance_amount' => 'User.available_balance_amount +' . $update_wallet\r\n ) , array(\r\n 'User.id' => $item_user['user_id']\r\n ));\r\n }\r\n }\r\n } // END act like groupon wallet funct., //\r\n\r\n }\r\n }\r\n }\r\n //authorization_auth_amount\r\n\r\n } else {\r\n $transaction['Transaction']['user_id'] = $item_user['user_id'];\r\n $transaction['Transaction']['foreign_id'] = $item_user['id'];\r\n $transaction['Transaction']['class'] = 'ItemUser';\r\n $transaction['Transaction']['amount'] = $item_user['discount_amount'];\r\n $transaction['Transaction']['transaction_type_id'] = (!empty($item_user['is_gift'])) ? ConstTransactionTypes::ItemGiftRefund : ConstTransactionTypes::ItemBoughtRefund;\r\n $this->ItemUser->User->Transaction->log($transaction);\r\n //update user balance\r\n $this->ItemUser->User->updateAll(array(\r\n 'User.available_balance_amount' => 'User.available_balance_amount +' . $item_user['discount_amount'],\r\n ) , array(\r\n 'User.id' => $item_user['user_id']\r\n ));\r\n }\r\n /* sending mail to all subscribers starts here */\r\n $city = (!empty($item['Merchant']['City']['name'])) ? $item['Merchant']['City']['name'] : '';\r\n $state = (!empty($item['Merchant']['State']['name'])) ? $item['Merchant']['State']['name'] : '';\r\n $country = (!empty($item['Merchant']['Country']['name'])) ? $item['Merchant']['Country']['name'] : '';\r\n $address = (!empty($item['Merchant']['address1'])) ? $item['Merchant']['address1'] : '';\r\n $address.= (!empty($item['Merchant']['address2'])) ? ', ' . $item['Merchant']['address2'] : '';\r\n $address.= (!empty($item['Merchant']['City']['name'])) ? ', ' . $item['Merchant']['City']['name'] : '';\r\n $address.= (!empty($item['Merchant']['State']['name'])) ? ', ' . $item['Merchant']['State']['name'] : '';\r\n $address.= (!empty($item['Merchant']['Country']['name'])) ? ', ' . $item['Merchant']['Country']['name'] : '';\r\n $address.= (!empty($item['Merchant']['zip'])) ? ', ' . $item['Merchant']['zip'] : '';\r\n $language_code = $this->getUserLanguageIso($item_user['User']['id']);\r\n $template = $this->EmailTemplate->selectTemplate('Item Amount Refunded', $language_code);\r\n $emailFindReplace = array(\r\n '##SITE_URL##' => Cache::read('site_url_for_shell', 'long') ,\r\n '##USER_NAME##' => $item_user['User']['username'],\r\n '##SITE_NAME##' => Configure::read('site.name') ,\r\n '##ITEM_NAME##' => $item['Item']['name'],\r\n '##MERCHANT_NAME##' => $item['Merchant']['name'],\r\n '##MERCHANT_ADDRESS##' => $address,\r\n '##CITY_NAME##' => $item['City']['0']['name'],\r\n '##FROM_EMAIL##' => $this->changeFromEmail(($template['from'] == '##FROM_EMAIL##') ? Configure::read('EmailTemplate.from_email') : $template['from']) ,\r\n '##BUY_PRICE##' => Configure::read('site.currency') . $item['Item']['price'],\r\n '##MERCHANT_SITE##' => $item['Merchant']['url'],\r\n '##CONTACT_URL##' => Cache::read('site_url_for_shell', 'long') . preg_replace('/\\//', '', 'contactus', 1) ,\r\n '##ITEM_URL##' => Cache::read('site_url_for_shell', 'long') . preg_replace('/\\//', '', Router::url(array(\r\n 'controller' => 'items',\r\n 'action' => 'view',\r\n $item['Item']['slug'],\r\n 'admin' => false\r\n ) , false) , 1) ,\r\n '##ITEM_LINK##' => Cache::read('site_url_for_shell', 'long') . preg_replace('/\\//', '', Router::url(array(\r\n 'controller' => 'items',\r\n 'action' => 'view',\r\n $item['Item']['slug'],\r\n 'admin' => false\r\n ) , false) , 1) ,\r\n '##SITE_LOGO##' => Cache::read('site_url_for_shell', 'long') . preg_replace('/\\//', '', Router::url(array(\r\n 'controller' => 'img',\r\n 'action' => 'blue-theme',\r\n 'logo-email.png',\r\n 'admin' => false\r\n ) , false) , 1) ,\r\n );\r\n $this->Email->from = ($template['from'] == '##FROM_EMAIL##') ? Configure::read('EmailTemplate.from_email') : $template['from'];\r\n $this->Email->replyTo = ($template['reply_to'] == '##REPLY_TO_EMAIL##') ? Configure::read('EmailTemplate.reply_to_email') : $template['reply_to'];\r\n $this->Email->to = $this->formatToAddress($item_user);\r\n $this->Email->subject = strtr($template['subject'], $emailFindReplace);\r\n $this->Email->content = strtr($template['email_content'], $emailFindReplace);\r\n $this->Email->sendAs = ($template['is_html']) ? 'html' : 'text';\r\n $this->Email->send($this->Email->content);\r\n $ItemUserIds[] = $item_user['id'];\r\n\t\t\t\t\t\t$itemIds[] = $item['Item']['id'];\r\n // SubItem: Resetting the actual item array //\r\n if (!empty($temp_item)) {\r\n $item['Item'] = $temp_item;\r\n }\r\n\t\t\t\t\t\t// after save fields //\r\n\t\t\t\t\t\t$data_for_aftersave = array();\r\n\t\t\t\t\t\t$data_for_aftersave['item_id'] = $item['Item']['id'];\r\n\t\t\t\t\t\t$data_for_aftersave['item_user_id'] = $item_user['id'];\r\n\t\t\t\t\t\t$data_for_aftersave['user_id'] = $item_user['user_id'];\r\n\t\t\t\t\t\t$data_for_aftersave['merchant_id'] = $item['Merchant']['id'];\r\n\t\t\t\t\t\t$data_for_aftersave['payment_gateway_id'] = $item_user['payment_gateway_id'];\r\n\t\t\t\t\t\t$itemUserIdData[] = $data_for_aftersave;\r\n }\r\n if (!empty($ItemUserIds)) {\r\n //is_repaid field updated\r\n $this->ItemUser->updateAll(array(\r\n 'ItemUser.is_repaid' => 1,\r\n ) , array(\r\n 'ItemUser.id' => $ItemUserIds\r\n ));\r\n\t\t\t\t\t\t$this->updateAll(array(\r\n\t\t\t\t\t\t\t'Item.item_user_count' => 0,\r\n\t\t\t\t\t\t) , array(\r\n\t\t\t\t\t\t\t'Item.id' => $itemIds\r\n\t\t\t\t\t\t));\r\n\t\t\t\t\t\tforeach($itemUserIdData as $itemUserData) {\r\n\t\t\t\t\t\t\t$this->_updateAfterPurchase($itemUserData, 'cancel');\r\n\t\t\t\t\t\t}\r\n }\r\n }\r\n $refundedItemIds[] = $item['Item']['id'];\r\n }\r\n if (!empty($refundedItemIds)) {\r\n foreach($refundedItemIds as $refunded_item_id) {\r\n $data = array();\r\n $data['Item']['id'] = $refunded_item_id;\r\n $data['Item']['item_status_id'] = ConstItemStatus::Refunded; // Already updated in model itself, calling it again for affiliate behaviour\r\n $this->save($data);\r\n }\r\n }\r\n }\r\n }",
"static function getUnpaidDepositReport() {\n global $wpdb;\n $resultset = $wpdb->get_results(\n \"SELECT guest_name, checkin_date, checkout_date, payment_total, data_href, booking_reference, \n booking_source, booked_date, notes, viewed_yn, created_date\n FROM wp_lh_rpt_unpaid_deposit\n WHERE job_id IN (SELECT CAST(value AS UNSIGNED) FROM wp_lh_job_param WHERE name = 'allocation_scraper_job_id' AND job_id = (SELECT MAX(job_id) FROM wp_lh_jobs WHERE classname = 'com.macbackpackers.jobs.UnpaidDepositReportJob' AND status = 'completed'))\n ORDER BY checkin_date\");\n\n if($wpdb->last_error) {\n throw new DatabaseException($wpdb->last_error);\n }\n\n return $resultset;\n }",
"public function checkRefund($condition)\n {\n $url = $this->weconnectDomain . \"/weixin/refunds\";\n $result = $this->_curl(self::METHOD_POST, $url, 'channel', $condition);\n LogUtil::info(['url' => 'POST ' . $url, 'response' => $result], 'channel');\n return $result;\n }",
"public function Refund($Payload){\n\t\t\tif(empty($Payload['Body'])){\n\t\t\t\tthrow new Exception('body can not be empty.');\n\t\t\t}\n\t\t\t$Payload['Verb']='POST';\n\t\t\t$Payload['URL']='/V1/creditmemo/refund';\n\t\t\t$Payload['Body']=json_encode($Payload['Body']);\n\t\t\treturn $this->Execute($Payload);\n\t\t}",
"public function CallRefund( $payKey, $transactionId, $trackingId, $receiverEmailArray, $receiverAmountArray )\r\n {\r\n /* Gather the information to make the Refund call.\r\n The variable nvpstr holds the name value pairs\r\n */\r\n \r\n $nvpstr = \"\";\r\n \r\n // conditionally required fields\r\n if (\"\" != $payKey)\r\n {\r\n $nvpstr = \"payKey=\" . urlencode($payKey);\r\n if (0 != count($receiverEmailArray))\r\n {\r\n reset($receiverEmailArray);\r\n while (list($key, $value) = each($receiverEmailArray))\r\n {\r\n if (\"\" != $value)\r\n {\r\n $nvpstr .= \"&receiverList.receiver(\" . $key . \").email=\" . urlencode($value);\r\n }\r\n }\r\n }\r\n if (0 != count($receiverAmountArray))\r\n {\r\n reset($receiverAmountArray);\r\n while (list($key, $value) = each($receiverAmountArray))\r\n {\r\n if (\"\" != $value)\r\n {\r\n $nvpstr .= \"&receiverList.receiver(\" . $key . \").amount=\" . urlencode($value);\r\n }\r\n }\r\n }\r\n }\r\n elseif (\"\" != $trackingId)\r\n {\r\n $nvpstr = \"trackingId=\" . urlencode($trackingId);\r\n if (0 != count($receiverEmailArray))\r\n {\r\n reset($receiverEmailArray);\r\n while (list($key, $value) = each($receiverEmailArray))\r\n {\r\n if (\"\" != $value)\r\n {\r\n $nvpstr .= \"&receiverList.receiver(\" . $key . \").email=\" . urlencode($value);\r\n }\r\n }\r\n }\r\n if (0 != count($receiverAmountArray))\r\n {\r\n reset($receiverAmountArray);\r\n while (list($key, $value) = each($receiverAmountArray))\r\n {\r\n if (\"\" != $value)\r\n {\r\n $nvpstr .= \"&receiverList.receiver(\" . $key . \").amount=\" . urlencode($value);\r\n }\r\n }\r\n }\r\n }\r\n elseif (\"\" != $transactionId)\r\n {\r\n $nvpstr = \"transactionId=\" . urlencode($transactionId);\r\n // the caller should only have 1 entry in the email and amount arrays\r\n if (0 != count($receiverEmailArray))\r\n {\r\n reset($receiverEmailArray);\r\n while (list($key, $value) = each($receiverEmailArray))\r\n {\r\n if (\"\" != $value)\r\n {\r\n $nvpstr .= \"&receiverList.receiver(\" . $key . \").email=\" . urlencode($value);\r\n }\r\n }\r\n }\r\n if (0 != count($receiverAmountArray))\r\n {\r\n reset($receiverAmountArray);\r\n while (list($key, $value) = each($receiverAmountArray))\r\n {\r\n if (\"\" != $value)\r\n {\r\n $nvpstr .= \"&receiverList.receiver(\" . $key . \").amount=\" . urlencode($value);\r\n }\r\n }\r\n }\r\n }\r\n\r\n /* Make the Refund call to PayPal */\r\n $resArray = $this->hash_call(\"Refund\", $nvpstr);\r\n\r\n /* Return the response array */\r\n return $resArray;\r\n }"
] | [
"0.6470383",
"0.6230701",
"0.6001157",
"0.5860692",
"0.56648463",
"0.54503405",
"0.53639793",
"0.5333833",
"0.5327841",
"0.5293347",
"0.5265661",
"0.5254047",
"0.52480954",
"0.52000606",
"0.51784474",
"0.51726896",
"0.5170205",
"0.510956",
"0.51017684",
"0.507402",
"0.50397724",
"0.5016652",
"0.49946943",
"0.49837103",
"0.4962471",
"0.4948525",
"0.49278954",
"0.49225867",
"0.49043873",
"0.48973578",
"0.48852238",
"0.48741832",
"0.48678595",
"0.48638123",
"0.48528978",
"0.4851642",
"0.48499367",
"0.48318484",
"0.48270842",
"0.48260516",
"0.48225018",
"0.4814786",
"0.47980827",
"0.47836313",
"0.4766538",
"0.47659495",
"0.47592324",
"0.47545412",
"0.47499934",
"0.47443184",
"0.47396985",
"0.47301278",
"0.47186893",
"0.47060215",
"0.47055566",
"0.47039714",
"0.46988258",
"0.4697944",
"0.46949553",
"0.46869442",
"0.46778503",
"0.4672425",
"0.46577445",
"0.46552247",
"0.46516925",
"0.46502307",
"0.4632952",
"0.4625512",
"0.46247345",
"0.46188468",
"0.46175206",
"0.46149403",
"0.46127123",
"0.46083027",
"0.45966136",
"0.45948339",
"0.45889142",
"0.45864642",
"0.45745736",
"0.45721635",
"0.45718098",
"0.45714808",
"0.45699087",
"0.45688337",
"0.45614982",
"0.4551578",
"0.4549447",
"0.45411345",
"0.45283207",
"0.45233032",
"0.45198795",
"0.4516134",
"0.45048374",
"0.44979304",
"0.44978318",
"0.44941354",
"0.44929108",
"0.44843146",
"0.44656038",
"0.44605583"
] | 0.59511244 | 3 |
Query refund by out refund number. | public function queryByOutRefundNumber(string $outRefundNumber)
{
return $this->query($outRefundNumber, 'out_refund_no');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function byOutTradeNumber(string $number, string $refundNumber, int $totalFee, int $refundFee, array $optional = [])\n {\n return $this->refund($refundNumber, $totalFee, $refundFee, array_merge($optional, ['out_trade_no' => $number]));\n }",
"public function refund();",
"public function queryRefundTransactionLog(string $orderReference): SpyPaymentAfterPayTransactionLogQuery;",
"public function getRefundByReference(string $refund_reference): RefundInterface;",
"public function processRefund($data) {\n\t\t// provide the EziDebit API endpoint\n\t\t$soapclient = new SoapClient($this->nonPci);\n\n\t\t$params = [\n\t\t\t\t'DigitalKey' => $this->digitalKey,\n\t\t\t\t'PaymentID' => $data['paymentId'],\n\t\t\t\t'BankReceiptID' => $data['bankReceiptId'],\n\t\t\t\t'RefundAmountInCents' => $data['refundAmountInCents']\n\t\t];\n\n\t\treturn $response = $soapclient->processRefund($params);\n\t}",
"public function refund($url, $orderUUID, $amount);",
"public function getRefundId()\n {\n return $this->getParameter('refundId');\n }",
"public function refund($options);",
"public function show(Refund $refund)\n {\n //\n }",
"public static function getRefund($number)\n {\n $om = \\Magento\\Framework\\App\\ObjectManager::getInstance();\n $resource = $om->get('\\Magento\\Framework\\App\\ResourceConnection');\n $id = $resource->getConnection('default')->fetchOne(\n 'SELECT `entity_id` FROM `' . $resource->getTableName('sales_creditmemo') . \"` WHERE `increment_id` = '\" . $number . \"'\");\n\n $creditMemo = $om->create('\\Magento\\Sales\\Model\\Order\\Creditmemo')->load($id);\n if (empty($number) === true || empty($creditMemo) === true || $number != $creditMemo->getIncrementId()) {\n return null;\n }\n\n $ret = [ ];\n $ret ['number'] = $creditMemo->getOrder()->getIncrementId();\n // Number of the Creditmemo.\n $ret ['customer_number'] = $creditMemo->getIncrementId();\n $ret ['date'] = date('d.m.Y', strtotime($creditMemo->getCreatedAt()));\n $ret ['amount'] = $creditMemo->getGrandTotal();\n\n return $ret;\n }",
"public function refundCancel($refundHandle);",
"public function get_company_invoice_payment_refund() {\n $invoice = $this->input->post('invoice');\n $data = $this->classtraineemodel->company_invoice($invoice);\n if ($data->company_id[0] == 'T') {\n $tenant_details = fetch_tenant_details($data->company_id);\n $data->company_name = $tenant_details->tenant_name;\n } else {\n $company_details = $this->company->get_company_details($this->tenant_id, $data->company_id);\n $data->company_name = $company_details[0]->company_name;\n }\n $data->discount_label = rtrim($this->course->get_metadata_on_parameter_id($data->discount_type), ', ');\n $gst_label = ($data->total_gst > 0) ? 'GST ON, ' : 'GST OFF ';\n if ($data->total_gst > 0) {\n $gst_label .= rtrim($this->course->get_metadata_on_parameter_id($data->gst_rule), ', ');\n }\n $data->gst_label = $gst_label;\n $data->inv_date = date('d/m/Y', strtotime($data->inv_date));\n $data->amount_refund = round($data->amount_refund, 2);\n $refund_details = $refund_details = $this->classtraineemodel->get_refund_paid_details($invoice);\n foreach ($refund_details as $k => $row) {\n if ($row->refnd_reason != 'OTHERS') {\n $refund_details[$k]->refnd_reason = $this->course->get_metadata_on_parameter_id($row->refnd_reason);\n } else {\n $refund_details[$k]->refnd_reason = 'Others (' . $row->refnd_reason_ot . ')';\n }\n\n $refund_details[$k]->refund_on = date('d/m/Y', strtotime($row->refund_on));\n $refund_details[$k]->mode_of_refund = $this->course->get_metadata_on_parameter_id($row->mode_of_refund);\n }\n $res = array('data' => $data, 'refund' => $refund_details);\n echo json_encode($res);\n exit();\n }",
"public function setRefundId($value)\n {\n return $this->setParameter('refundId', $value);\n }",
"public static function getrefundItem()\n {\n \n $value=DB::table('product_refund')->join('users','users.id','product_refund.buyer_id')->join('product','product.product_id','product_refund.product_id')->orderBy('product_refund.dispute_id', 'desc')->get(); \n return $value;\n\t\n }",
"static function getRefundHistory() {\n global $wpdb;\n $resultset = $wpdb->get_results(\n \"SELECT r.id, r.reservation_id, r.booking_reference, r.email, r.first_name, r.last_name, r.amount, r.description, \n sf.charge_id, sr.auth_vendor_tx_code, COALESCE(sf.ref_status, sr.ref_status) AS refund_status, \n sr.refund_status_detail, COALESCE(sf.ref_response, sr.ref_response) AS refund_response,\n COALESCE(sf.last_updated_date, sr.last_updated_date, r.last_updated_date) AS last_updated_date \n FROM wp_tx_refund r \n LEFT OUTER JOIN wp_stripe_tx_refund sf ON sf.id = r.id\n LEFT OUTER JOIN wp_sagepay_tx_refund sr ON sr.id = r.id\n ORDER BY r.id DESC\" );\n \n if($wpdb->last_error) {\n throw new DatabaseException($wpdb->last_error);\n }\n return $resultset;\n }",
"public function getRefundID()\n {\n return $this->refundID;\n }",
"public function BeanstreamRefund($paymentInfo=array()) {\t\r\n\t\t$amount=urlencode($paymentInfo['amount']);\t\t\r\n\t\t$transactionID=urlencode($paymentInfo['transactionID']);\r\n\t\t$orderno=urlencode($paymentInfo['orderno']);\t\t\t\r\n $currencyCode=strtolower($paymentInfo['currency']);\t\t\t\r\n\t\t$nvpStr = \"&trnType=R&trnOrderNumber=$orderno&adjId=$transactionID&trnAmount=$amount\";\t\t\r\n\t\t$resArray=$this->hash_call('ReturnType',$nvpStr,$currencyCode);\r\n\t\treturn $resArray;\r\n\t\t\r\n\t}",
"function get_refund_by_ccode($ccode,$currentdate) {\r\n\tglobal $db;\r\n\t$M_R_query=\"SELECT merchants.currency_code, YEAR(transaction_alipay.trans_datetime) AS year, MONTH(transaction_alipay.trans_datetime) AS month, COUNT(DISTINCT transaction_alipay.id_transaction_id) AS transcount, SUM(transaction_alipay.refund_amount) AS transamount FROM merchants JOIN transaction_alipay ON transaction_alipay.merchant_id = merchants.mer_map_id AND merchants.currency_code= '$ccode' AND transaction_alipay.transaction_type IN ('2','s2') AND transaction_alipay.result_code='SUCCESS' AND MONTH(transaction_alipay.trans_datetime) = MONTH('$currentdate') GROUP BY year, month\";\r\n\t$transactionsDetails = $db->rawQuery($M_R_query);\r\n\treturn $transactionsDetails;\r\n}",
"public function queryByOutTradeNumber(string $outTradeNumber)\n {\n return $this->query($outTradeNumber, 'out_trade_no');\n }",
"public function refund(Varien_Object $oPayment, $nAmount)\n\t{\n\t\tMage::log(\" --- Snap* Hosted Payments API : refund --- \");\n\n\t\tif(empty($nAmount))\n\t\t\t$nAmount=null;\n\n\t\tif ($oPayment->getLastTransId())\n\t\t{\n\t\t\t// build the request\n\t\t\t$oOrder = $oPayment->getOrder();\n\t\t\t$aMACParamKeys = array('code','action','merchant_order_id','txn_id');\n\t\t\t$aRequest = $this->_buildAPIRequest(array(\n\t\t\t\t'action' => 'credit',\n\t\t\t\t'merchant_order_id' => $oOrder->getRealOrderId(),\n\t\t\t\t'txn_id' => $oPayment->getLastTransId(),\n\t\t\t\t'amount' => (!is_null($nAmount) ? self::_currencyAmount($nAmount) : $nAmount),\n\t\t\t), $aMACParamKeys);\n\t\t\tMage::log($aRequest);\n\n\t\t\t// post the request\n\t\t\t$aResult = $this->_postAPIRequest($aRequest);\n\t\t\tMage::log($aResult);\n\n\t\t\t// parse the response\n\t\t\tif ($aResult['success'] === true && isset($aResult['status']) && strtolower($aResult['status']) == 'approved') // approved\n\t\t\t{\n\t\t\t\tMage::log('approved');\n\t\t\t\tif($aResult['txn_id'] != null)\n\t\t\t\t\t$oPayment->setLastTransId($aResult['txn_id']);\n\t\t\t\t$oPayment->setStatus(self::STATUS_SUCCESS);\n\t\t\t\t$oPayment->getOrder()->addStatusToHistory($oPayment->getOrder()->getStatus(), $this->_getHelper()->__('Payment has been refunded via Snap* Hosted Payments Checkout (transid # '.$aResult['txn_id'].').'));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$oPayment->setStatus(self::STATUS_ERROR);\n\t\t\t\tif ($aResult['success'] === true && isset($aResult['status']) && strtolower($aResult['status']) == 'declined') // declined\n\t\t\t\t{\n\t\t\t\t\tMage::log('declined');\n\t\t\t\t\t$sError = 'Payment refund request was declined by Snap* Hosted Payments Checkout.'.(!empty($aResult['message']) ? ' '.$aResult['message'] : '');\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tMage::log('failure');\n\t\t\t\t\t$sError = 'Payment refund request failed.'.(!empty($aResult['message']) ? ' '.$aResult['message'] : '');\n\t\t\t\t}\n\t\t\t\tMage::getSingleton('adminhtml/session')->addError($this->_getHelper()->__($sError));\n\t\t\t\t$oPayment->getOrder()->addStatusToHistory($oPayment->getOrder()->getStatus(), $this->_getHelper()->__($sError));\n\t\t\t\tMage::throwException($sError);\n\t\t\t}\n\t\t}\n\n\t\treturn $this;\n\t}",
"public function refund($params)\n {\n return $this->request(Resource::RESOURCE_ORDER_REFUND, $params);\n }",
"protected function _updateRefundDetails()\n {\n $sQuery = \"SELECT BESTITAMAZONREFUNDID\n FROM bestitamazonrefunds\n WHERE STATE = 'Pending'\n AND BESTITAMAZONREFUNDID != ''\";\n\n $aResult = $this->_getContainer()->getDatabase()->getAll($sQuery);\n\n $this->_oLogger->info(\n 'Fetched orders and processed',\n array('orderNumbers' => array_keys($aResult))\n );\n\n foreach ($aResult as $aRow) {\n $oData = $this->_getContainer()->getClient()->getRefundDetails($aRow['BESTITAMAZONREFUNDID']);\n\n if (isset($oData->GetRefundDetailsResult->RefundDetails->RefundStatus->State)) {\n $this->_addToMessages(\n \"Refund ID: {$oData->GetRefundDetailsResult->RefundDetails->RefundReferenceId} - \"\n .\"Status: {$oData->GetRefundDetailsResult->RefundDetails->RefundStatus->State}<br/>\"\n );\n }\n }\n }",
"public function RefundTxn() {\r\n\r\n $ch = curl_init();\r\n\r\n $CURLParameters = http_build_query(array(\r\n // Our default parameters!\r\n \"key\" => $this->key,\r\n \"appid\" => $this->game,\r\n // This can vary from request to request, sometimes its steamid or steamids or even an array.\r\n \"steamid\" => $this->steamid,\r\n // Custom Queries below here.\r\n \"orderid\" => $this->orderid,\r\n ));\r\n\r\n curl_setopt($ch, CURLOPT_URL, \"https://partner.steam-api.com/\" . $this->interface . \"/RefundTxn/v2/\");\r\n\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\n curl_setopt($ch, CURLOPT_POST, 1);\r\n curl_setopt($ch, CURLOPT_POSTFIELDS, $CURLParameters);\r\n $CURLResponse = json_decode(curl_exec($ch));\r\n $CURLResponseCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\r\n curl_close($ch);\r\n\r\n\r\n // Error handling improved!\r\n\r\n if ($CURLResponseCode != 200) {\r\n if ($CURLResponseCode == 400) {\r\n throw new exceptions\\SteamRequestParameterException(\"The Order ID or another parameter is invalid!\");\r\n }\r\n if ($CURLResponseCode == 401) {\r\n throw new exceptions\\SteamException(\"App ID or API Key is invalid.\");\r\n }\r\n throw new exceptions\\SteamRequestException(\"$CURLResponseCode Request Error.\");\r\n }\r\n\r\n if ($CURLResponse->response->result == \"OK\") {\r\n return true;\r\n }\r\n\r\n throw new exceptions\\SteamRequestException(json_encode($CURLResponse->response->error));\r\n }",
"function get_refund_or_order()\n{\n\t// Fail\n}",
"public function addRefund($bill, $refund, $order);",
"public function refundOrder(Request $request)\n {\n $refund_data['merc_refund_ref_no'] = $request->merc_refund_ref_no;\n $refund_data['orderid'] = $request->orderid;\n $refund_data['transaction_id'] = $request->transaction_id;\n $refund_data['transaction_date'] = $request->transaction_date;\n $refund_data['refund_amount'] = $request->refund_amount;\n $refund_data['txn_amount'] = $request->txn_amount;\n\n $response = BilldeskHmac::refundOrder($refund_data);\n }",
"function getRefundOrOrder()\n{\n\t// Fail\n}",
"public function refund($mixed = null) {\n\t\t$validParameters = array(\n\t\t\t'(orderv2\\refund)',\n\t\t);\n\t\t$args = func_get_args();\n\t\t$this->_checkArguments($args, $validParameters);\n\t\treturn $this->__soapCall('refund', $this->make_soap_params($mixed));\n\t}",
"public function refunds_export_xls() {\n $tenant_id = $this->tenant_id;\n $company = $this->input->get('company');\n $companies = $this->classTraineeModel->get_company_for_paidinvoice($tenant_id);\n $company_arr = array();\n foreach ($companies as $row) {\n $company_arr[$row->company_id] = $row->company_name;\n }\n $invoice_id = $this->input->get('invoice_id');\n $start_date = $this->input->get('start_date');\n $end_date = $this->input->get('end_date');\n $offset = ($pageno * $records_per_page);\n $field = ($this->input->get('f')) ? $this->input->get('f') : 'inv.invoice_id';\n $order_by = ($this->input->get('o')) ? $this->input->get('o') : 'DESC';\n $tabledata = $this->reportsModel->get_refund_paid($tenant_id, $records_per_page, $offset, $field, $order_by, $company, $invoice_id, $start_date, $end_date);\n $invs = array();\n foreach ($tabledata as $k => $row) {\n if ($row->refnd_reason == 'OTHERS') {\n $tabledata[$k]->refnd_reason = \"Others (\" . $row->refnd_reason_ot . \")\";\n } else {\n $tabledata[$k]->refnd_reason = $this->courseModel->get_metadata_on_parameter_id($row->refnd_reason);\n }\n if ($row->refund_type == 'INDV') {\n $invs[$row->invoice_id] = $row->invoice_id;\n }\n }\n $tb_user = $this->reportsModel->get_refund_paid_user($invs);\n $tableuser = array();\n foreach ($tb_user as $row) {\n $tableuser[$row->invoice_id]['name'] = $row->first_name . ' ' . $row->last_name;\n $tableuser[$row->invoice_id]['taxcode'] = $this->mask_format($row->tax_code);\n }\n $this->load->helper('export_helper');\n $count_tabledata = count($tabledata);\n $excel_titles = array('Inv #', 'Taxcode', 'Name', 'Refund Dt.', 'Refund Amt.', 'Reason', 'Refunded By');\n $excel_data = array();\n for ($i = 0; $i < $count_tabledata; $i++) {\n $k = $tabledata[$i]->invoice_id;\n if ($tabledata[$i]->refund_type == 'INDV') {\n $taxcode = $tableuser[$k]['taxcode'];\n $name = $tableuser[$k]['name'];\n } else {\n if ($tabledata[$i]->company_id[0] == 'T') {\n $tenant_details = fetch_tenant_details($tabledata[$i]->company_id);\n $taxcode = $tenant_details->tenant_name;\n $name = $tenant_details->tenant_name . ' (Company)';\n } else {\n $taxcode = $tabledata[$i]->comp_regist_num;\n $name = $tabledata[$i]->company_name . ' (Company)';\n }\n }\n $excel_data[$i][] = $tabledata[$i]->invoice_id;\n $excel_data[$i][] = $taxcode;\n $excel_data[$i][] = $name;\n $excel_data[$i][] = date('d/m/Y', strtotime($tabledata[$i]->refund_on));\n $excel_data[$i][] = '$ ' . number_format($tabledata[$i]->amount_refund, 2, '.', '');\n $excel_data[$i][] = $tabledata[$i]->refnd_reason;\n $excel_data[$i][] = $tabledata[$i]->first_name . \" \" . $tabledata[$i]->last_name;\n }\n if (!empty($tabledata)) {\n if (empty($start_date) && empty($end_date)) {\n $period = ' for ' . date('F d Y, l');\n } else {\n $period = 'for the period';\n if (!empty($start_date))\n $period .= ' from ' . date('F d Y', DateTime::createFromFormat('d-m-Y', $start_date)->getTimestamp());\n if (!empty($end_date))\n $period .= ' to ' . date('F d Y', DateTime::createFromFormat('d-m-Y', $end_date)->getTimestamp());\n }\n if (!empty($company)) {\n $period .= ' \\'' . $company_arr[$company] . '\\'';\n }\n if (!empty($invoice_id)) {\n $period .= ' - \\' Invoice No.: ' . $invoice_id . '\\'';\n }\n }\n $excel_filename = 'refunds.xls';\n $excel_sheetname = 'Refunds';\n $excel_main_heading = 'Accounting Reports - Refunds' . $period;\n export_page_fields($excel_titles, $excel_data, $excel_filename, $excel_sheetname, $excel_main_heading);\n }",
"function get_refundlast_by_ccode($ccode_last,$lastmonthdate) {\r\n\tglobal $db;\r\n\t$M_R_query=\"SELECT merchants.currency_code, YEAR(transaction_alipay.trans_datetime) AS year, MONTH(transaction_alipay.trans_datetime) AS month, COUNT(DISTINCT transaction_alipay.id_transaction_id) AS transcount, SUM(transaction_alipay.refund_amount) AS transamount FROM merchants JOIN transaction_alipay ON transaction_alipay.merchant_id = merchants.mer_map_id AND merchants.currency_code= '$ccode_last' AND transaction_alipay.transaction_type IN ('2','s2') AND transaction_alipay.result_code='SUCCESS' AND MONTH(transaction_alipay.trans_datetime) = MONTH('$lastmonthdate') GROUP BY year, month\";\r\n\t$transactionsDetails = $db->rawQuery($M_R_query);\r\n\treturn $transactionsDetails;\r\n}",
"public function renderBuyerRefundOverviewAction(Request $request)\r\n {\r\n $payoutId = (int) $request->get('payout', null);\r\n\r\n $em = $this->getDoctrine()->getManager();\r\n\r\n $payout = $em->find('YilinkerCoreBundle:Payout', $payoutId);\r\n\r\n if (!$payout) {\r\n throw $this->createNotFoundException('Sorry not existing');\r\n }\r\n\r\n return $this->render('YilinkerBackendBundle:Transaction:buyer_refund_overview.html.twig', compact('payout'));\r\n }",
"function _doRefund($oID, $amount = 0) {\r\n global $db, $messageStack;\r\n $new_order_status = (int)MODULE_PAYMENT_AUTHORIZENET_ECHECK_REFUNDED_ORDER_STATUS_ID;\r\n if ($new_order_status == 0) $new_order_status = 1;\r\n $proceedToRefund = true;\r\n $refundNote = strip_tags(zen_db_input($_POST['refnote']));\r\n if (isset($_POST['refconfirm']) && $_POST['refconfirm'] != 'on') {\r\n $messageStack->add_session(MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_REFUND_CONFIRM_ERROR, 'error');\r\n $proceedToRefund = false;\r\n }\r\n if (isset($_POST['buttonrefund']) && $_POST['buttonrefund'] == MODULE_PAYMENT_AUTHORIZENET_ECHECK_ENTRY_REFUND_BUTTON_TEXT) {\r\n $refundAmt = (float)$_POST['refamt'];\r\n $new_order_status = (int)MODULE_PAYMENT_AUTHORIZENET_ECHECK_REFUNDED_ORDER_STATUS_ID;\r\n if ($refundAmt == 0) {\r\n $messageStack->add_session(MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_INVALID_REFUND_AMOUNT, 'error');\r\n $proceedToRefund = false;\r\n }\r\n }\r\n if (isset($_POST['cc_number']) && trim($_POST['cc_number']) == '') {\r\n $messageStack->add_session(MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_CC_NUM_REQUIRED_ERROR, 'error');\r\n }\r\n if (isset($_POST['trans_id']) && trim($_POST['trans_id']) == '') {\r\n $messageStack->add_session(MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_TRANS_ID_REQUIRED_ERROR, 'error');\r\n $proceedToRefund = false;\r\n }\r\n\r\n /**\r\n * Submit refund request to gateway\r\n */\r\n if ($proceedToRefund) {\r\n $submit_data = array('x_type' => 'CREDIT',\r\n 'x_card_num' => trim($_POST['cc_number']),\r\n 'x_amount' => number_format($refundAmt, 2),\r\n 'x_trans_id' => trim($_POST['trans_id'])\r\n );\r\n unset($response);\r\n $response = $this->_sendRequest($submit_data);\r\n $response_code = $response[0];\r\n $response_text = $response[3];\r\n $response_alert = $response_text . ($this->commError == '' ? '' : ' Communications Error - Please notify webmaster.');\r\n $this->reportable_submit_data['Note'] = $refundNote;\r\n $this->_debugActions($response);\r\n\r\n if ($response_code != '1') {\r\n $messageStack->add_session($response_alert, 'error');\r\n } else {\r\n // Success, so save the results\r\n $sql_data_array = array('orders_id' => $oID,\r\n 'orders_status_id' => (int)$new_order_status,\r\n 'date_added' => 'now()',\r\n 'comments' => 'REFUND INITIATED. Trans ID:' . $response[6] . ' ' . $response[4]. \"\\n\" . ' Gross Refund Amt: ' . $response[9] . \"\\n\" . $refundNote,\r\n 'customer_notified' => 0\r\n );\r\n zen_db_perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array);\r\n $db->Execute(\"update \" . TABLE_ORDERS . \"\r\n set orders_status = '\" . (int)$new_order_status . \"'\r\n where orders_id = '\" . (int)$oID . \"'\");\r\n $messageStack->add_session(sprintf(MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_REFUND_INITIATED, $response[9], $response[6]), 'success');\r\n return true;\r\n }\r\n }\r\n return false;\r\n }",
"public function a_user_looking_for_data_refund()\n {\n /**\n * first todo\n * todo auth|login|middleware\n * alternative use ->loginAs(Model::find(id))\n */\n $this->user_login();\n $this->browse(function (Browser $browser) {\n $assertSee = 'Data Refund Modal';\n $tanggal = '2019-05-31';\n $uraian = 'Salah Top Up Saldo'; // value='keterangan'\n $jumlah = '8400000';\n $jumlahSee = 'Rp. 8.400.000,00,-';\n $browser\n /**\n * #path_url-02 cabang_path()\n * don't forget to put path link after execute link/move/change address.url\n * in this case we have move from user_login\n */\n ->assertPathIs($this->cabang_path())\n /**\n * ?clickLink('param')\n * the function for this\n * <a href='x'> param </a>\n */\n ->clickLink('Data Permodalan')\n ->clickLink('List Data Refund Saldo')\n // measure against , the bot seen a page ,\n // for capture laters -> finalize js loading screen\n ->assertSee($assertSee)\n // capture the task\n ->screenshot('UserViewDataPermodalan[LIST-REFUND-SALDO](1)')\n\n /**\n * select('name', 'value-option')\n * looking for view\n */\n ->select('perpage', '10')\n ->press('Oke')\n ->assertSee($assertSee)\n ->screenshot('UserViewDataPermodalan[LIST-REFUND-SALDO](2)')\n\n ->select('perpage', '25')\n ->press('Oke')\n ->assertSee($assertSee)\n ->screenshot('UserViewDataPermodalan[LIST-REFUND-SALDO](3)')\n\n ->select('perpage', '50')\n ->press('Oke')\n ->assertSee($assertSee)\n ->screenshot('UserViewDataPermodalan[LIST-REFUND-SALDO](4)')\n\n ->select('perpage', '100')\n ->press('Oke')\n ->assertSee($assertSee)\n ->screenshot('UserViewDataPermodalan[LIST-REFUND-SALDO](5)')\n // end of select\n\n /**\n * searching\n */\n // [tanggal]\n ->select('by', 'tanggal')\n // some case value more prefered use ID not CLASS , sometime make anError\n ->value('#q', $tanggal) //search\n ->screenshot('UserViewDataPermodalan[LIST-REFUND-SALDO](6)')\n // press ('value-of-button')\n ->press('Oke')\n ->assertSee($tanggal) //text from data by search\n ->screenshot('UserViewDataPermodalan[LIST-REFUND-SALDO](6.1)')\n\n // [uraian|keterangan]\n ->select('by', 'uraian')\n // some case value more prefered use ID not CLASS , sometime make anError\n ->value('#q', $uraian) //search\n ->screenshot('UserViewDataPermodalan[LIST-REFUND-SALDO](7.1)')\n // press ('value-of-button')\n ->press('Oke')\n ->assertSee($uraian) //text from data by search\n ->screenshot('UserViewDataPermodalan[LIST-REFUND-SALDO](7.2)')\n\n // [jumlah]\n ->select('by', 'jumlah')\n // some case value more prefered use ID not CLASS , sometime make anError\n ->value('#q', $jumlah) //search\n ->screenshot('UserViewDataPermodalan[LIST-REFUND-SALDO](8.1)')\n // press ('value-of-button')\n ->press('Oke')\n ->assertSee($jumlahSee) //text from data by search\n ->screenshot('UserViewDataPermodalan[LIST-REFUND-SALDO](8.2)')\n // end\n ;\n });\n }",
"public function checkRefund($condition)\n {\n $url = $this->weconnectDomain . \"/weixin/refunds\";\n $result = $this->_curl(self::METHOD_POST, $url, 'channel', $condition);\n LogUtil::info(['url' => 'POST ' . $url, 'response' => $result], 'channel');\n return $result;\n }",
"public function queryByRefundId(string $refundId)\n {\n return $this->query($refundId, 'refund_id');\n }",
"public function refundRequest()\n {\n $request = new Request\\Refund;\n return $this->applyAuthSettings($request);\n }",
"public function Refund($request)\n {\n $transactionID = $request->Refund->TransactionID;\n if (empty($transactionID)) {\n die(\"Refund transaction ID missing\");\n }\n $jsonRequest = $this->fixObjtoJSON($request);\n $response = $this->PostToRapidAPI(\"Transaction/$transactionID/Refund\", $jsonRequest);\n return $response;\n }",
"public function refund($requestParameters = array());",
"abstract public function refund( Payment $payment );",
"public function getRefundDetails($requestParameters = array());",
"public function refund(){\n\t\treturn $this->hasMany('OrderRefund','order_id','order_id');\n\t}",
"public function findByRefundId($refundid)\n {\n $repo = \\XLite\\Core\\Database::getRepo('\\XLite\\Module\\Digiwallet\\Payment\\Model\\TargetPayRefund');\n $query = $repo->createQueryBuilder('digiwallet_refund')->where('digiwallet_refund.refund_id = :refundid')->setParameter('refundid', $refundid)->getQuery();\n $result = $query->getResult();\n if(!empty($result)){\n return $result[0];\n }\n return null;\n }",
"public function query_out_transactions(){\n\t\t$response = $this->execute($this->query_out_transaction_url);\n\t\tif(!$response){\n\t\t\tthrow new Exception(\"error in communication\");\n\t\t}\n\t\treturn json_decode($response,true);\n\t}",
"public function readrefundsAction()\n {\n $this->getResponse()->setBody(self::getHelper()->readrefunds());\n\n }",
"function get_merchant_refund_by_ccode($ccode,$currentdate,$merchant_id) {\n\tglobal $db;\n\t$M_R_query=\"SELECT merchants.currency_code, YEAR(transaction_alipay.trans_datetime) AS year, MONTH(transaction_alipay.trans_datetime) AS month, COUNT(DISTINCT transaction_alipay.id_transaction_id) AS transcount, SUM(transaction_alipay.refund_amount) AS transamount FROM merchants JOIN transaction_alipay ON transaction_alipay.merchant_id = merchants.mer_map_id AND merchants.currency_code= '$ccode' AND transaction_alipay.transaction_type IN ('2','s2') AND transaction_alipay.merchant_id = '$merchant_id' AND transaction_alipay.result_code='SUCCESS' AND MONTH(transaction_alipay.trans_datetime) = MONTH('$currentdate') GROUP BY year, month\";\n\t$transactionsDetails = $db->rawQuery($M_R_query);\n\treturn $transactionsDetails;\n}",
"public function byTransactionId(string $transactionId, string $refundNumber, int $totalFee, int $refundFee, array $optional = [])\n {\n return $this->refund($refundNumber, $totalFee, $refundFee, array_merge($optional, ['transaction_id' => $transactionId]));\n }",
"public function worldlinePaymentRefund($refundId, $scopeId = null);",
"public function index(Office $office, Refund $refund)\n {\n $budgetEdit = new ContractBudgetEdit;\n $budgetEdit = $office->contract_budget_edits()\n ->where('refund_id','=',$refund->id)\n ->orderBy('contract_edit_date','asc')\n ->get();\n return ContractBudgetEditResource::collection($budgetEdit);\n //return COntractBudgetEditResource::collection($office->contract_budget_edits()->get());\n // $contract_edits = new ContractBudgetEdit;\n // $contract_edits = $office->contract_budget_edits()\n // ->where(\"refund_id\",\"=\",$refund->id)\n // ->get();\n\n // return COntractBudgetEditResource::collection($contract_edits);\n }",
"public function renderBuyerRefundAction (Request $request)\r\n {\r\n $dateFromCarbon = Carbon::now()->addMonth(-1)->format('m/d/Y');\r\n $dateToCarbon = Carbon::now()->addDays(1)->format('m/d/Y');\r\n\r\n $em = $this->getDoctrine()->getManager();\r\n\r\n $userOrderRepository = $em->getRepository('YilinkerCoreBundle:UserOrder');\r\n $refundsQuery = $userOrderRepository->getBuyerRefundList()\r\n ->filterBy(array(\r\n 'name' => $request->get('searchKeyword', ''),\r\n 'dateFrom' => $request->get('dateFrom', $dateFromCarbon),\r\n 'dateTo' => $request->get('dateTo', $dateToCarbon)\r\n ));\r\n\r\n $refundCount = count($refundsQuery->getResult(Query::HYDRATE_SCALAR));\r\n\r\n $refunds = $refundsQuery->select(array(\r\n 'Dispute.disputeId',\r\n 'Dispute.ticket',\r\n 'this.orderId',\r\n 'this.invoiceNumber',\r\n 'Dispute.disputeId',\r\n 'GROUP_CONCAT(OrderProduct.orderProductId) as orderProduct',\r\n 'User.userId as buyerUserId',\r\n 'User.firstName as buyerFirstName',\r\n 'User.lastName as buyerLastName',\r\n 'User.email as buyerEmail',\r\n 'User.contactNumber as buyerContactNumber'\r\n ))\r\n ->page($request->get('page', 1))\r\n ->getResult(Query::HYDRATE_ARRAY);\r\n\r\n return $this->render('YilinkerBackendBundle:Transaction:buyer_refund.html.twig', array(\r\n 'refunds' => $refunds,\r\n 'refundCount' => $refundCount,\r\n 'pageLimit' => self::PAGE_LIMIT\r\n ));\r\n }",
"public function renderBuyerRefundOverviewPrintAction(Request $request)\r\n {\r\n $payoutId = (int) $request->get('payout', null);\r\n\r\n $em = $this->getDoctrine()->getManager();\r\n\r\n $payout = $em->find('YilinkerCoreBundle:Payout', $payoutId);\r\n\r\n if (!$payout) {\r\n throw $this->createNotFoundException('Sorry not existing');\r\n }\r\n\r\n return $this->render('YilinkerBackendBundle:Transaction:buyer_refund_overview_print.html.twig', array(\r\n 'payout' => $payout,\r\n ));\r\n }",
"public function GetRefund($payInId) {\n return $this->GetObject('payins_getrefunds', $payInId, '\\P4M\\MangoPayBundle\\MangoPaySDK\\Refund');\n }",
"public function testRefund()\n {\n print \"testRefund()\\n\";\n\n // TODO: Impl\n\n $this->fail();\n }",
"function get_refund_by_ccode($ccode,$currentdate) {\n\tglobal $db;\n\t$M_R_query=\"SELECT merchants.currency_code, YEAR(gp_transaction.gp_trans_datetime) AS year, MONTH(gp_transaction.gp_trans_datetime) AS month, COUNT(DISTINCT gp_transaction.gp_transaction_id) AS transcount, SUM(gp_transaction.gp_amount) AS transamount FROM merchants JOIN gp_transaction ON gp_transaction.gp_merchant_id = merchants.mer_map_id AND merchants.currency_code= '$ccode' AND gp_transaction.gp_transaction_type IN ('2','s2') AND gp_transaction.gp_status='success' AND MONTH(gp_transaction.gp_trans_datetime) = MONTH('$currentdate') GROUP BY year, month\";\n\t$transactionsDetails = $db->rawQuery($M_R_query);\n\treturn $transactionsDetails;\n}",
"public function refundTransaction() {\n //not implemented\n }",
"function bankopen_refund($params)\n{\n // Gateway Configuration Parameters\n $APIKey = $params['APIKey'];\n $APISecret = $params['APISecret'];\n $testMode = $params['testMode'];\n $dropdownField = $params['dropdownField'];\n $radioField = $params['radioField'];\n $textareaField = $params['textareaField'];\n\n // Transaction Parameters\n $transactionIdToRefund = $params['transid'];\n $refundAmount = $params['amount'];\n $currencyCode = $params['currency'];\n\n // Client Parameters\n $firstname = $params['clientdetails']['firstname'];\n $lastname = $params['clientdetails']['lastname'];\n $email = $params['clientdetails']['email'];\n $address1 = $params['clientdetails']['address1'];\n $address2 = $params['clientdetails']['address2'];\n $city = $params['clientdetails']['city'];\n $state = $params['clientdetails']['state'];\n $postcode = $params['clientdetails']['postcode'];\n $country = $params['clientdetails']['country'];\n $phone = $params['clientdetails']['phonenumber'];\n\n // System Parameters\n $companyName = $params['companyname'];\n $systemUrl = $params['systemurl'];\n $langPayNow = $params['langpaynow'];\n $moduleDisplayName = $params['name'];\n $moduleName = $params['paymentmethod'];\n $whmcsVersion = $params['whmcsVersion'];\n\n // perform API call to initiate refund and interpret result\n\n return array(\n // 'success' if successful, otherwise 'declined', 'error' for failure\n 'status' => 'success',\n // Data to be recorded in the gateway log - can be a string or array\n 'rawdata' => $responseData,\n // Unique Transaction ID for the refund transaction\n 'transid' => $refundTransactionId,\n // Optional fee amount for the fee value refunded\n 'fees' => $feeAmount,\n );\n}",
"final public static function transactionSentForRefund()\n {\n return self::get(2057);\n }",
"public function refund($orderId, $amount = null, $reason = '')\n {\n $payload = array_merge([\n 'order_id' => $orderId,\n 'reason' => $reason,\n ], $this->paddleOptions());\n\n if ($amount) {\n $payload['amount'] = $amount;\n }\n\n return Cashier::post('/payment/refund', $payload)['response']['refund_request_id'];\n }",
"function findByOutCode($postcode) {\n // TODO: Replace this with a PROPER incode/outcode splitter!!\n $outcode = str_replace(\" \",\"\",$postcode); // Remove space\n $outcode = substr($outcode,0,strlen($outcode)-3); // This should leave us with the postcode less the last 3 chars, the outcode\n \n $select = $this->select()\n ->from($this->_name,array('riskarea'))\n ->where('postcode = ?', $outcode)\n ->where('startdate < ?', date(\"Y-m-d\"))\n ->where('enddate > ?', date(\"Y-m-d\"));\n $row = $this->fetchRow($select);\n \n if(!empty($row))\n {\n $returnVal = $row->riskarea;\n }\n else {\n // Can't find by outcode - log a warning\n Application_Core_Logger::log(\"Can't find by outcode in table {$this->_name} (postcode = {$outcode})\", 'warning');\n $returnVal = null;\n }\n return $returnVal;\n }",
"public function export($mode = 'all', $orderBy = 'id_desc')\n { \n if($_POST)\n {\n $categories = $this->refund->getCategoryPairs();\n $currencySign = $this->loadModel('common', 'sys')->getCurrencySign();\n $deptList = $this->loadModel('tree')->getPairs('', 'dept');\n $users = $this->loadModel('user')->getList();\n $userPairs = array();\n $userDepts = array();\n foreach($users as $key => $user) \n {\n $userPairs[$user->account] = $user->realname;\n $userDepts[$user->account] = zget($deptList, $user->dept, ' ');\n }\n\n /* Create field lists. */\n $fields = explode(',', $this->config->refund->list->exportFields);\n foreach($fields as $key => $fieldName)\n {\n $fieldName = trim($fieldName);\n $fields[$fieldName] = isset($this->lang->refund->$fieldName) ? $this->lang->refund->$fieldName : $fieldName;\n unset($fields[$key]);\n }\n $fields['dept'] = $this->lang->user->dept;\n\n $refunds = array();\n if($mode == 'all')\n {\n $refundQueryCondition = $this->session->refundQueryCondition;\n if(strpos($refundQueryCondition, 'limit') !== false) $refundQueryCondition = substr($refundQueryCondition, 0, strpos($refundQueryCondition, 'limit'));\n $stmt = $this->dbh->query($refundQueryCondition);\n while($row = $stmt->fetch()) $refunds[$row->id] = $row;\n }\n if($mode == 'thisPage')\n {\n $stmt = $this->dbh->query($this->session->refundQueryCondition);\n while($row = $stmt->fetch()) $refunds[$row->id] = $row;\n }\n\n foreach($refunds as $refund)\n {\n $refund->createdBy = zget($userPairs, $refund->createdBy);\n $refund->createdDate = substr($refund->createdDate, 0, 10);\n $refund->dept = zget($userDepts, $refund->createdBy);\n $refund->category = zget($categories, $refund->category);\n $refund->money = zget($currencySign, $refund->currency) . $refund->money;\n $refund->status = zget($this->lang->refund->statusList, $refund->status);\n\n $related = array();\n foreach(explode(',', $refund->related) as $account) \n {\n if(empty($account)) continue;\n $related[] = zget($userPairs, $account);\n }\n\n $refund->related = implode(',', $related);\n $refund->reviewer = zget($userPairs, $refund->firstReviewer) . ' ' . zget($userPairs, $refund->secondReviewer);\n $refund->refundBy = zget($userPairs, $refund->refundBy);\n $refund->refundDate = substr($refund->refundDate, 0, 10);\n }\n\n $this->post->set('fields', $fields);\n $this->post->set('rows', $refunds);\n $this->post->set('kind', 'refund');\n $this->fetch('file', 'export2CSV' , $_POST);\n }\n\n $this->display();\n }",
"public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(RefundsPeer::REFNO, $key, Criteria::EQUAL);\n }",
"public function actionGetOut($order_id=999)\n {\n $obj = $this->c->getOrderObj($order_id);\n \n $ret = '';\n if ($obj) {\n foreach ($obj->houseContract->contracts as $contract)\n $ret .= $contract->getContractText();\n } else {\n echo 'no obj ';\n }\n $ret = iconv('utf-8', 'gbk', $ret);\n print_r($ret);\n echo 'job done!';\n }",
"public function search_counter_referral($input){\n\t\tglobal $con;\n\t\t$query=\"\";\n\t\t$check_input=(int)$input;\n\t\tif($check_input>0){\n\t\t\t$query=\"SELECT * FROM counter_referrals\n\t\t\t\t\tWHERE counter_ref_id=\\\"$check_input\\\"\";\n\t\t}else{\n\t\t\t$query=\"SELECT * FROM counter_referrals\n\t\t\t\t\tWHERE patient_name LIKE \\\"%$input%\\\" OR patient_surname LIKE \\\"%$input%\\\" \n\t\t\t\t\tOR (from_hospital_name LIKE \\\"%$input%\\\" OR to_hospital_name LIKE \\\"%$input%\\\")\n\t\t\t\t\t\";\n\t\t}\n\t\treturn $this->select($con,$query);\n\t}",
"public function view_refund()\n\n {\n $itemData['item'] = Product::getrefundItem();\n\n $data = ['itemData' => $itemData];\n\n return view('admin.refund')->with($data);\n }",
"public function testIssueRefund()\n {\n }",
"public function refund(Request $request)\n {\n\n $payment = new Refund($request);\n\n $payment = $payment->refundOrder(false);\n\n if ($payment instanceof ResponseInterface) {\n\n return json_decode($payment->getBody()->__toString());\n\n }\n\n return new JsonResponse($payment, 200);\n\n }",
"public function createRefundItemEntry($data) {\n\n $query_string = \"INSERT INTO \" . DB_PREFIX . \"iyzico_order_refunds SET\";\n $data_array = array();\n foreach ($data as $key => $value) {\n $data_array[] = \"`$key` = '\" . $this->db->escape($value) . \"'\";\n }\n $data_string = implode(\", \", $data_array);\n $query_string .= $data_string;\n $query_string .= \";\";\n $this->db->query($query_string);\n return $this->db->getLastId();\n }",
"public static function checkRefund($purchase_token,$order_id,$buyer_id,$vendor_id)\n {\n\n $get=DB::table('product_refund')->where('purchase_token','=', $purchase_token)->where('order_id','=', $order_id)->where('buyer_id','=', $buyer_id)->where('vendor_id','=', $vendor_id)->where('dispute_status','!=', 'declined')->get();\n\t$value = $get->count(); \n return $value;\n\t\n }",
"public function refund(Request $request)\n {\n $merchantAuthentication = new AnetAPI\\MerchantAuthenticationType();\n $merchantAuthentication->setName(env('ANET_API_LOGIN_ID'));\n $merchantAuthentication->setTransactionKey(env('ANET_TRANSACTION_KEY'));\n\n // Set the transaction's refId\n $refId = 'ref' . time();\n\n // Create the payment data for a credit card\n $creditCard = new AnetAPI\\CreditCardType();\n $creditCard->setCardNumber($request->cc_number);\n $creditCard->setExpirationDate($request->input('expiry_year') . \"-\" . $request->input('expiry_month'));\n\n $paymentOne = new AnetAPI\\PaymentType();\n $paymentOne->setCreditCard($creditCard);\n\n //create a transaction\n $transactionRequest = new AnetAPI\\TransactionRequestType();\n $transactionRequest->setTransactionType(\"refundTransaction\");\n $transactionRequest->setAmount($request->amount);\n $transactionRequest->setPayment($paymentOne);\n $transactionRequest->setRefTransId($request->transactionReference);\n\n\n $request = new AnetAPI\\CreateTransactionRequest();\n $request->setMerchantAuthentication($merchantAuthentication);\n $request->setRefId($refId);\n $request->setTransactionRequest($transactionRequest);\n $controller = new AnetController\\CreateTransactionController($request);\n $response = $controller->executeWithApiResponse(ANetEnvironment::PRODUCTION);\n\n if ($response != null) {\n $tresponse = $response->getTransactionResponse();\n if ($response->getMessages()->getResultCode() == \"Ok\") {\n if ($tresponse != null && $tresponse->getMessages() != null) {\n $message_text = $tresponse->getMessages()[0]->getDescription() . \", Response code: \" . $tresponse->getResponseCode() . \", Refund SUCCESS: \" . $tresponse->getTransId();\n $msg_type = \"successMessage\";\n return redirect()->route('orderList')->with($msg_type, $message_text);\n } else {\n $message_text = \"Transaction Failed\";\n $msg_type = \"errorMessage\";\n if ($tresponse->getErrors() != null) {\n $message_text = $tresponse->getErrors()[0]->getErrorText();\n $msg_type = \"errorMessage\";\n }\n }\n } else {\n if ($tresponse != null && $tresponse->getErrors() != null) {\n $message_text = $tresponse->getErrors()[0]->getErrorText();\n } else {\n $message_text = $response->getMessages()->getMessage()[0]->getText();\n }\n $msg_type = \"errorMessage\";\n }\n } else {\n $message_text = \"No response returned\";\n $msg_type = \"errorMessage\";\n }\n\n return redirect()->route('refundView')->with($msg_type, $message_text);\n }",
"function filter_mellat_pay_channel_pay_refunds($transaction){\n return $transaction;\n}",
"public function obtain_inoutdebt($acc_number)\n\t{\n\t return $this->db->select('inoutdebt')\n\t\t ->from('pamm_accounts') \n\t\t ->where(\"login\",$acc_number)\n\t\t ->get()->result();\n\t}",
"public function refund()\n\t{\n\t\trequirePermission(\"canRefund\");\n\n\t\t$id = intval($this->input->get(\"id\"));\n\t\t$costDp = intval($this->input->get(\"costDp\"));\n\t\t$accountId = intval($this->input->get(\"accountId\"));\n\t\t\n\t\tif(!$id || !is_numeric($id))\n\t\t{\n\t\t\tdie();\n\t\t}\n\n\t\tif ($costDp != \"Free\") {\n\t\t\tif(!$costDp || !is_numeric($costDp))\n\t\t\t{\n\t\t\t\tdie();\n\t\t\t}\n\t\t}\n\n\t\tif(!$accountId || !is_numeric($accountId))\n\t\t{\n\t\t\tdie();\n\t\t}\n\n\t\tif ($costDp != \"Free\") {\n\t\t\tif ($costDp > 0) {\n\t\t\t\t$userDp = intval($this->recup_model->getDp($accountId));\n\t\t\t\tif(!$userDp || !is_numeric($userDp))\n\t\t\t\t{\n\t\t\t\t\tdie(\"Problème lors de l'acquisition des users dps.\");\n\t\t\t\t}\n\t\t\t\t$this->internal_user_model->setDp($accountId, $userDp+$costDp);\n\t\t\t}\n\t\t}\n\t\t$this->recup_model->editEtat($this->realms->getRealm(1)->getCharacters()->getConnection(), $id, 8);\n\t}",
"public function refund(array $options = [])\n {\n // TODO: Implement refund() method.\n }",
"public function getCashReceipt($txn_ref){\n\n $remits = Remittance::where('transaction_reference',$txn_ref)->first();\n $data =[];\n\n if($remits ){\n\n $invoiceIds = json_decode($remits->invoice_id,true);\n\n $year = substr($remits->month, 0,4);\n $month = substr($remits->month, 5,2);\n $BS = Revenue::select('revenues.id','users.name as agentName','services.name as serviceName','revenue_points.name as revPtName',\n 'lgas.name as lgaName','revenues.invoice','revenues.amount','revenues.created_at as date')\n ->join('users','users.userable_id','revenues.agent_id')\n ->join('services','services.id','revenues.service_id')\n ->join('revenue_points','revenue_points.id','revenues.revenue_point_id')\n ->join('lgas','lgas.id','revenue_points.lga_id')\n ->whereYear('revenues.created_at', '=', $year)\n ->whereMonth('revenues.created_at', '=', $month)\n ->where('users.role_id',env('AGENT'))\n //->where([[DB::raw('date(revenues.created_at)'),DB::raw('date(\"' . $remits->month . '\")')],['users.role_id',env('AGENT')]] )\n ->get();\n\n\n $QP = QuickPrintInvoice::select('quick_print_invoices.id','users.name as agentName','services.name as serviceName','revenue_points.name as revPtName',\n 'lgas.name as lgaName','quick_print_invoices.invoice','quick_print_invoices.amount','quick_print_invoices.created_at as date')\n ->join('users','users.userable_id','quick_print_invoices.agent_id')\n ->join('services','services.id','quick_print_invoices.service_id')\n ->join('revenue_points','revenue_points.id','quick_print_invoices.revenue_point_id')\n ->join('lgas','lgas.id','revenue_points.lga_id')\n ->whereYear('quick_print_invoices.created_at', '=', $year)\n ->whereMonth('quick_print_invoices.created_at', '=', $month)\n ->where('users.role_id',env('AGENT'))\n\n // ->where([[DB::raw('date(quick_print_invoices.created_at)'),DB::raw('date(\"' . $remits->month . '\")')],['users.role_id',env('AGENT')]])\n\n ->get();\n\n\n\n $invoiceIds = json_decode($remits->invoice_id,true);\n\n if(!empty($invoiceIds)){\n extract($invoiceIds);\n\n $i=0;\n foreach($BS as $bs){\n\n foreach ($b as $id){\n if($bs['id'] == $id )\n {\n $data[$i]['sn'] = $i+1;\n $data[$i]['collectorName'] = $bs['agentName'];\n $data[$i]['serviceName'] = $bs['serviceName'];\n $data[$i]['lgaName'] = $bs['lgaName'];\n $data[$i]['revPtName'] = $bs['revPtName'];\n $data[$i]['amount'] = $bs['amount'];\n $data[$i]['invoice'] = $bs['invoice'];\n $data[$i]['date'] = $bs['date'];\n $i++;\n }\n }\n }\n\n foreach($QP as $qp){\n\n foreach ($q as $id){\n if($qp['id'] == $id )\n {\n $data[$i]['sn'] = $i+1;\n $data[$i]['collectorName'] = $qp['agentName'];\n $data[$i]['serviceName'] = $qp['serviceName'];\n $data[$i]['lgaName'] = $qp['lgaName'];\n $data[$i]['revPtName'] = $qp['revPtName'];\n $data[$i]['amount'] = $qp['amount'];\n $data[$i]['invoice'] = $qp['invoice'];\n $data[$i]['date'] = $qp['date'];\n $i++;\n }\n }\n }\n\n }\n\n\n\n }\n\n\n\n\n return response()->json(['status' => 'success',\n 'data' => $data\n ]);\n\n }",
"public function ongoing_referrals($from_hospital_id,$options,$status,$number,$input){\n\t\tglobal $con;\n\t\t$query=\"SELECT * FROM referrals \n\t\t\t\tWHERE from_hospital_id=\\\"$from_hospital_id\\\"\n\t\t\t\t\";\n\t\tif($options==1){\n\t\t\t$query.=\" AND status=\\\"$status\\\"\";\n\t\t}elseif($options==2){\n\t\t\t$query.=\" AND referral_id=\\\"$number\\\"\";\n\t\t}elseif($options==3){\n\t\t\t$query.=\" AND patient_fname LIKE \\\"%$input%\\\" OR patient_lname LIKE \\\"%$input%\\\" OR (patient_phone LIKE \\\"%$input%\\\" OR to_hospital_name LIKE \\\"%$input%\\\")\";\n\t\t}\n\t\t$query.=\" AND status!='DELETED' ORDER BY referral_id DESC\";\n\t\t$result=$this->select($con,$query);\n\t\treturn $result;\n\t}",
"public function setRefundStamp($stamp)\n {\n $this->setParameter('refundStamp', self::toString($stamp));\n }",
"public function getHandle($no)\n {\n if (is_object($no) and isset($no->Id)) {\n return $no;\n }\n\n return $this->client\n ->Quotation_FindByNumber([\n 'number'=>$no,\n ])\n ->Quotation_FindByNumberResult;\n }",
"public function refundCharge($reference, $amount)\n {\n $url = 'gpx/merchant/transactions/refund';\n\n try {\n $res = $this->client->request('POST', $url, ['json' => ['ref'=>$reference, 'seckey' =>$this->config_vars['secret_key'], 'amount' => $amount]]);\n\n return $res->getBody();\n } catch (TransferException $e) {\n $response = $e->getResponse();\n $this->logger->error('An error occurred trying to refund the charge', ['request' => Psr7\\str($e->getRequest()), 'response' => Psr7\\str($e->getResponse())]);\n\n return $response->getBody();\n }\n }",
"public function consulta_payu($orderId)\n {\n $this->init_payu();\n //Ingresa aquí el código de referencia de la orden.\n //history id: 7765626\n $parameters = array(PayUParameters::ORDER_ID => $orderId);\n\n try {\n $order = PayUReports::getOrderDetail($parameters);\n } catch (Exception $e) {\n $order = $e->getMessage();\n }\n\n return $order;\n\n }",
"public function search_trainee_refundpayment() {\n $invoice_id = $this->input->post('invoice_id');\n $taxcode_id = $this->input->post('taxcode_id');\n $trainee_id = $this->input->post('trainee_id');\n $result['data'] = $this->classtraineemodel->search_trainee_refundpayment($invoice_id, $taxcode_id, $trainee_id, $this->tenant_id);\n if (empty($result['data'])) {\n $result['trainer'] = $this->get_trainee_name();\n } \n echo json_encode($result);\n exit();\n }",
"public function testRefundPurchase() {\n\t\t$this->key_pairs = array(\n\t\t\t'tag' => $this->process_tag,\n\t\t\t'status' => 'completed',\n\t\t);\n\t\t$this->process_transactions = CrudTable\\read_rows( 'transactions', $this->key_pairs, false );\n\n\t\tif ( ! empty( $this->process_transactions ) ) {\n\t\t\t$request = TestHelpers::refundPurchaseRequest( $this->tag, $this->process_tag );\n\t\t\t$this->transactions = TestHelpers::refundPurchase( $this->http_client, $request );\n\n\t\t\t$this->assertIsArray( $this->transactions );\n\t\t\t$this->assertArrayHasKey( '0', $this->transactions );\n\n\t\t\t$this->assertEquals( $this->transactions[0]['alias'], $this->process_transactions[0]['alias'] );\n\t\t\t$this->assertEquals( $this->transactions[0]['user'], $this->process_transactions[0]['user'] );\n\t\t\t$this->assertEquals( $this->transactions[0]['cart'], $this->process_transactions[0]['cart'] );\n\t\t\t$this->assertEquals( $this->transactions[0]['transactionid'], $this->process_transactions[0]['transactionid'] );\n\t\t\t$this->assertEquals( abs( $this->transactions[0]['saleid'] ), abs( $this->process_transactions[0]['saleid'] ) );\n\t\t\t$this->assertEquals( $this->transactions[0]['currency'], $this->process_transactions[0]['currency'] );\n\t\t\t$this->assertEquals( $this->transactions[0]['status'], $this->process_transactions[0]['status'] );\n\t\t\t$this->assertEquals( $this->transactions[0]['saleid'], $this->process_transactions[0]['saleid'] );\n\n\t\t\t$this->assertEquals( 'refund', $this->transactions[0]['type'] );\n\t\t\t$this->assertEmpty( $this->transactions[0]['tokenid'] );\n\t\t\t$this->assertNotEmpty( $this->transactions[0]['refundid'] );\n\t\t\t$this->assertEmpty( $this->transactions[0]['redirect_url'] );\n\n\t\t} else {\n\t\t\t$request = TestHelpers::createPurchaseRequest( $this->process_tag );\n\t\t\t$transactions = TestHelpers::createPurchase( $this->http_client, $request );\n\t\t\t$this->assertIsArray( $transactions );\n\t\t\t$this->assertArrayHasKey( '0', $transactions );\n\t\t\t$this->assertNotEmpty( $transactions[0]['redirect_url'] );\n\t\t\t$this->assertEquals( 'created', $transactions[0]['status'] );\n\n\t\t\techo 'For complete REFUND PURCHASE test, you must pay and restart this tests.' . PHP_EOL;\n\t\t\techo 'Link for pay - ' . $transactions[0]['redirect_url'] . PHP_EOL;\n\t\t}\n\t}",
"public function refund($transactionId, $orderId, $description, array $options = array())\n {\n $params = $options;\n\n $params['IDENTIFIER'] = $this->identifier;\n $params['OPERATIONTYPE'] = 'refund';\n $params['DESCRIPTION'] = $description;\n $params['TRANSACTIONID'] = $transactionId;\n $params['VERSION'] = self::API_VERSION;\n $params['ORDERID'] = $orderId;\n\n $params['HASH'] = $this->hash($params);\n\n return $this->requests($this->getDirectLinkUrls(), $params);\n }",
"public function getRefundOption()\n {\n return $this->refundOption;\n }",
"public function getRefundAmount()\n {\n return $this->refundAmount;\n }",
"public function test_receive_refund()\n {\n\n $payumService = m::spy('Recca0120\\LaravelPayum\\Service\\PayumService');\n $token = uniqid();\n\n /*\n |------------------------------------------------------------\n | Act\n |------------------------------------------------------------\n */\n\n $payumService\n ->shouldReceive('receiveRefund')->with($token)->andReturn($token);\n\n $controller = new PaymentController();\n\n /*\n |------------------------------------------------------------\n | Assert\n |------------------------------------------------------------\n */\n\n $controller->receiveRefund($payumService, $token);\n $payumService->shouldHaveReceived('receiveRefund')->with($token)->once();\n }",
"public function refund():bool {\n request::xhr(\"orders/refund\", \"csrf_token=\".run::$runner->user->csrf.\"&id=\".substr($this->ID, 1),run::$runner->user->session);\n return true;\n }",
"function wp_aff_handle_woocommerce_order_refund($order_id) {\n wp_affiliate_log_debug(\"WooCommerce Affiliate integration - order refunded. Order ID: \" . $order_id, true);\n //$order = new WC_Order($order_id);\n $txn_id = $order_id;\n wp_aff_handle_refund($txn_id);\n}",
"public function findByOrderId($order_id)\n {\n $repo = \\XLite\\Core\\Database::getRepo('\\XLite\\Module\\Digiwallet\\Payment\\Model\\TargetPayRefund');\n $query = $repo->createQueryBuilder('digiwallet_refund')->where('digiwallet_refund.order_id = :order_id')->setParameter('order_id', $order_id)->getQuery();\n $result = $query->getResult();\n return $result;\n }",
"function _get_uids_by_bout_number($bid, $tid) {\n $uids = array();\n $result = db_query('SELECT id.draw_number, id.uid FROM {iwps_draw} as id LEFT JOIN {iwps_bout_schematic} as ibs ON (ibs.draw_number = id.draw_number) WHERE ibs.bid = :bid AND id.tid = :tid', array(':bid' => $bid, ':tid' => $tid));\n foreach ($result as $record) {\n $uids[] = $record->uid;\n }\n return $uids;\n}",
"public function get_company_refundpayment() {\n $invoice_id = $this->input->post('invoice');\n $company_id = $this->input->post('company');\n $company_received = $this->classtraineemodel->company_payment_recd($invoice_id);\n $user_paid = array();\n foreach ($company_received as $k => $v) {\n $user_paid[$v->user_id] = $v->amount_recd;\n }\n $company_received = $this->classtraineemodel->company_payment_refund($invoice_id);\n $user_refund = array();\n foreach ($company_received as $k => $v) {\n $user_refund[$v->user_id] = $v->refund_amount;\n }\n $company_invoice = $this->classtraineemodel->company_invoice($invoice_id);\n $company_invoice->invoice_excess_amt = (empty($company_invoice->invoice_excess_amt)) ? 0 : $company_invoice->invoice_excess_amt;\n $excess_paid = $company_invoice->invoice_excess_amt;\n $excess_refunded = empty($user_refund[0]) ? 0 : $user_refund[0];\n $excess_remain = round($excess_paid, 2) - round($excess_refunded, 2);\n $company_invoice->excess_refunded = round($excess_refunded, 2);\n $company_invoice->excess_remain = round($excess_remain, 2);\n\n $company_invoice->invoiced_on = ($company_invoice->invoiced_on == NULL || $company_invoice->invoiced_on == '0000-00-00 00:00:00') ? '' : date('d-m-Y', strtotime($company_invoice->invoiced_on));\n $company_invoice->discount_label = rtrim($this->course->get_metadata_on_parameter_id($company_invoice->discount_type), ', ');\n $gst_label = ($company_invoice->total_gst > 0) ? 'GST ON, ' : 'GST OFF ';\n if ($company_invoice->total_gst > 0) {\n $gst_label .= rtrim($this->course->get_metadata_on_parameter_id($company_invoice->gst_rule), ', ');\n }\n $company_invoice->gst_label = $gst_label;\n $company_invoice->trainees = $this->classtraineemodel->get_company_trainees_by_payid1($company_invoice->pymnt_due_id);\n foreach ($company_invoice->trainees as $k => $row) {\n $company_invoice->trainees[$k]->subsidy_recd_date = (($row->subsidy_recd_date == '0000-00-00') || ($row->subsidy_recd_date == null)) ? '' : date('d-m-Y', strtotime($row->subsidy_recd_date));\n $amount_paid = empty($user_paid[$row->user_id]) ? 0 : $user_paid[$row->user_id];\n $amount_refund = empty($user_refund[$row->user_id]) ? 0 : $user_refund[$row->user_id];\n $company_invoice->trainees[$k]->amount_paid = round($amount_paid, 2);\n $company_invoice->trainees[$k]->amount_refund = round($amount_refund, 2);\n $company_invoice->trainees[$k]->amount_remain = round(($amount_paid - $amount_refund), 2);\n }\n $company_invoice->subsidy_type = $this->classtraineemodel->get_subsidy_type($this->tenant_id);\n \n echo json_encode($company_invoice);\n exit();\n }",
"static function checkBanqReturn($ref, $mnt, $orderoid=NULL){\n // recherche de la commande par sa référence et vérification de son montant\n // si tout ok retour de l'oid sinon NULL\n XLogs::critical(get_class(),'::checkBanqReturn order :'.$ref.' - '.$mnt);\n if ($orderoid != NULL)\n $sqloid = ' and KOID=\\''.$orderoid.'\\'';\n else\n $sqloid = '';\n $rs = selectQueryGetAll('select KOID, TOTALTTC from '.self::$tableORDER.' where REFERENCE = \\''.$ref.'\\''.$sqloid);\n if (count($rs) != 1){\n XLogs::critical(get_class(),'::checkBanqReturn order :'.$ref.' '.$mnt.' not unique order : '.count($rs));\n return NULL;\n } else {\n // mise en forme du montant et vérification (?) a faire ...\n return $rs[0]['KOID'];\n }\n return NULL;\n }",
"public function refund( $invoiceId, $value )\n\t\t{\n\t\t\tif ( is_numeric( $invoiceId ) && is_numeric( $value ) ) {\n\t\t\t\treturn $this->_tableTransactions->update(\n\t\t\t\t\tarray (\n\t\t\t\t\t\t'refunded' => $value\n\t\t\t\t\t),\n\t\t\t\t\t\"`invoice_id` = $invoiceId\"\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn false;\n\t\t}",
"public function getRefundAmount()\n {\n return $this->refund_amount;\n }",
"public static function refund($params)\n {\n $requestor = Ferbuy_ApiRequestor::getInstance();\n\n $post_data = array(\n 'command' => $params['currency'].$params['amount'],\n 'output_type' => self::OUTPUT_TYPE,\n 'site_id' => $requestor->_siteId,\n 'transaction_id' => $params['transaction_id'],\n );\n $post_data['checksum'] = $requestor->sign($post_data);\n\n $response = $requestor->request('post', '/RefundTransaction', $post_data);\n return $response;\n }",
"public function fetchRefund(array $parameters = [])\n {\n return $this->createRequest('\\Omnipay\\VnPay\\Message\\FetchRefundRequest', $parameters);\n }",
"public function getRefunds() {\n $orders = Order::where('status', 'refund')->with('orderitems', 'shippings')->get();\n return view('backend.admin.order.refund')->with('orders', $orders);\n }",
"public function make_payment_refund($order, $amount)\n {\n\n if (!($details = $this->get_payment_details($order))) {\n return null;\n }\n\n $request = array(\n 'charge_id' => $details['id'],\n 'amount' => $amount,\n );\n\n WC_Gateway_Orangepay::log('Orangepay - make_payment_refund() request parameters: ' . $order->get_order_number() . ': ' . wc_print_r($request, true));\n\n $raw_response = wp_safe_remote_post(\n $this->endpoint . '/refunds',\n array(\n 'method' => 'POST',\n 'timeout' => 300,\n 'user-agent' => 'WooCommerce/' . WC()->version,\n 'headers' => array(\n 'Content-Type' => 'application/json;',\n 'Authorization' => 'Bearer ' . $this->gateway->get_option('api_token')\n ),\n 'body' => json_encode($request),\n 'httpversion' => '1.1',\n )\n );\n\n WC_Gateway_Orangepay::log('Orangepay - make_payment_refund() response: ' . wc_print_r($raw_response, true));\n\n if (isset($raw_response['body']) && ($response = json_decode($raw_response['body'], true))) {\n if (isset($response['data'])) {\n $data = $response['data'];\n if (isset($data['charge'])) {\n $charge = $data['charge'];\n if (isset($charge['included'])) {\n foreach ($charge['included'] as $included) {\n if ($included['type'] === 'refund') {\n return $included['id'];\n }\n }\n }\n }\n }\n }\n\n return null;\n }",
"function hook_commerce_adyen_refund_received(\\Commerce\\Adyen\\Payment\\Transaction\\Refund $transaction, \\stdClass $order) {\n\n}",
"public function update(Request $request, Refund $refund)\n {\n //\n $all = $request->all();\n\n\n if($all['status'] == 2){\n $config = Lib_make::getConfig();\n $appid = $config['appid'];\n $mchid = $config['mch_id'];\n $out_trade_no = $refund->order_number;\n $total_fee = $refund->price;\n $refund_fee = $refund->price;\n $mch_secret = $config['mch_secret'];\n $key_pem = $config['key_pem'];\n $cert_pem = $config['cert_pem'];\n $result = initiatingRefund($out_trade_no,$total_fee,$refund_fee,$mchid,$appid,$mch_secret,$key_pem,$cert_pem);\n if($result['result_code'] == 'SUCCESS' && $result['return_code'] == 'SUCCESS'){\n $int = $refund->update($all);\n return ajaxSuccess();\n }else{\n return ajaxError('退款失败 联系管理员' );\n }\n\n }\n $int = $refund->update($all);\n if (!$int) return ajaxError('添加失败' );\n return ajaxSuccess();\n }",
"public function index(DepositRefundDataTable $depositRefundDataTable)\n {\n $refundedDepos = DepositRefund::query()->get()->pluck('lease_id');\n $serviceBill = ServiceOption::where('code',deposit)->first();\n\n $bills = BillDetail::query()\n ->select('bills.lease_id')\n ->leftJoin('bills','bills.id','=','bill_details.bill_id')\n ->where('bill_details.service_bill_id',$serviceBill->id)\n ->get()->pluck('lease_id')->toArray();\n return $depositRefundDataTable->render('deposit_refunds.index',[\n 'leases'=> Lease::where('status',false)\n ->select('leases.*')\n ->whereIn('leases.id',$bills)\n ->whereNotIn('leases.id',$refundedDepos->toArray())\n ->with(['masterfile','unit'])->get()\n ]);\n }",
"public function getRefundStatus()\n {\n return $this->refundStatus;\n }"
] | [
"0.62180483",
"0.5886423",
"0.5576089",
"0.55759174",
"0.538651",
"0.5346416",
"0.53318256",
"0.53263605",
"0.52578115",
"0.5233923",
"0.5190454",
"0.5182684",
"0.5145772",
"0.5143019",
"0.5080008",
"0.5052677",
"0.5029043",
"0.50286967",
"0.49866453",
"0.49849376",
"0.4971623",
"0.49609593",
"0.4947109",
"0.4945198",
"0.4933282",
"0.49141863",
"0.4912516",
"0.4911114",
"0.48970857",
"0.48956305",
"0.4895195",
"0.4887426",
"0.48741522",
"0.48738897",
"0.48722503",
"0.48570988",
"0.48538238",
"0.4853331",
"0.4841057",
"0.4814089",
"0.48114553",
"0.47959653",
"0.47904348",
"0.4785982",
"0.47844344",
"0.47674227",
"0.47637382",
"0.47592705",
"0.47463343",
"0.4741171",
"0.47385505",
"0.47336614",
"0.47260398",
"0.46995673",
"0.46984547",
"0.46938908",
"0.468556",
"0.46723828",
"0.4659416",
"0.4637395",
"0.46209145",
"0.46058393",
"0.46007714",
"0.45976958",
"0.45809326",
"0.45755097",
"0.45694953",
"0.45582157",
"0.45469666",
"0.453158",
"0.45303053",
"0.45175388",
"0.4517326",
"0.45161444",
"0.45127448",
"0.4512547",
"0.45124745",
"0.45081037",
"0.45066184",
"0.45000705",
"0.44927496",
"0.44812116",
"0.44783974",
"0.44770184",
"0.44729826",
"0.44718602",
"0.44717225",
"0.44625875",
"0.44585007",
"0.44570857",
"0.44511282",
"0.44480798",
"0.44379526",
"0.44283426",
"0.4428329",
"0.4427151",
"0.44243976",
"0.44194156",
"0.44183925",
"0.44045222"
] | 0.7322755 | 0 |
Query refund by refund id. | public function queryByRefundId(string $refundId)
{
return $this->query($refundId, 'refund_id');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function findByRefundId($refundid)\n {\n $repo = \\XLite\\Core\\Database::getRepo('\\XLite\\Module\\Digiwallet\\Payment\\Model\\TargetPayRefund');\n $query = $repo->createQueryBuilder('digiwallet_refund')->where('digiwallet_refund.refund_id = :refundid')->setParameter('refundid', $refundid)->getQuery();\n $result = $query->getResult();\n if(!empty($result)){\n return $result[0];\n }\n return null;\n }",
"public function setRefundId($value)\n {\n return $this->setParameter('refundId', $value);\n }",
"public function findById($id)\n {\n $repo = \\XLite\\Core\\Database::getRepo('\\XLite\\Module\\Digiwallet\\Payment\\Model\\TargetPayRefund');\n $query = $repo->createQueryBuilder('digiwallet_refund')->where('digiwallet_refund.id = :id')->setParameter('id', $id)->getQuery();\n $result = $query->getResult();\n if(!empty($result)){\n return $result[0];\n }\n return null;\n }",
"public function getRefundByReference(string $refund_reference): RefundInterface;",
"public function getRefundId()\n {\n return $this->getParameter('refundId');\n }",
"public function refund();",
"public function getRefundID()\n {\n return $this->refundID;\n }",
"public function show(Refund $refund)\n {\n //\n }",
"public static function getPayLaterRefund($charge_id, $refund_id, $params = [])\n {\n $requiredParams = [\n \n ];\n \n self::validateParams($params, $requiredParams);\n \n $url = static::classUrl() . '/charges/'.$charge_id.'/refunds/'.$refund_id;\n \n return static::_request('GET', $url, $params);\n }",
"public static function isRefundable($id) {\r\n \r\n try {\r\n return Doctrine_Query::create ()->from ( 'DomainsTlds dt' )\r\n \t\t\t\t\t\t\t\t->where('dt.isrefundable = ?', true)\r\n \t\t\t\t\t\t\t\t->addWhere('dt.tld_id = ?', $id)\r\n\t\t\t\t\t\t\t\t\t\t\t->addWhere('dt.isp_id = ?',Shineisp_Registry::get('ISP')->isp_id)\r\n \t\t\t\t\t\t\t\t->execute ( array (), Doctrine_Core::HYDRATE_ARRAY );\r\n } catch (Exception $e) {\r\n die ( $e->getMessage () );\r\n }\r\n }",
"public function findByOrderId($order_id)\n {\n $repo = \\XLite\\Core\\Database::getRepo('\\XLite\\Module\\Digiwallet\\Payment\\Model\\TargetPayRefund');\n $query = $repo->createQueryBuilder('digiwallet_refund')->where('digiwallet_refund.order_id = :order_id')->setParameter('order_id', $order_id)->getQuery();\n $result = $query->getResult();\n return $result;\n }",
"public function refund($resource_id, $amount)\n\t{\n\t\t$amount = (double)$amount;\n\t\ttry\n\t\t{\n\t\t\t$resource = $this->findSale($resource_id);\n\t\t}\n\t\tcatch(Exception $sale_exception)\n\t\t{\n\t\t\t$resource = $this->findCapture($resource_id);\n\t\t}\n\n\t\t$refund_url = false;\n\t\tforeach($resource->links as $resource_link)\n\t\t{\n\t\t\tif($resource_link->rel == 'refund')\n\t\t\t{\n\t\t\t\t$refund_url = $resource_link;\n\t\t\t}\n\t\t}\n\t\tif($refund_url === false)\n\t\t{\n\t\t\tthrow new Exception('Payment cannot be refunded.');\n\t\t}\n\n\t\t$refundRequestArray = array(\n\t\t\t\t'amount' => array(\n\t\t\t\t\t'total' => $this->_formatAmount($amount, $resource->amount->currency),\n\t\t\t\t\t'currency' => $resource->amount->currency,\n\t\t\t\t\t)\n\t\t\t);\n\t\trequire_once DIR_FS_CATALOG.'/gm/classes/JSON.php';\n\t\t$json = MainFactory::create('Services_JSON');\n\t\t$refundRequestJSON = $json->encodeUnsafe($refundRequestArray);\n\n\t\t$ppRefundRequest = MainFactory::create('PayPalRestRequest', $refund_url->method, $refund_url->href, $refundRequestJSON);\n\t\t$ppRestService = MainFactory::create('PayPalRestService');\n\t\t$response = $ppRestService->performRequest($ppRefundRequest);\n\t\t$response_object = $response->getResponseObject();\n\t\tif($response_object === false)\n\t\t{\n\t\t\t$text = MainFactory::create('PayPalText');\n\t\t\tthrow new Exception($text->get_text('error_decoding_response'));\n\t\t}\n\t\tif($response->getResponseCode() != '201')\n\t\t{\n\t\t\tthrow new Exception('Error refunding payment: '.$response_object->name.' '.$response_object->message);\n\t\t}\n\t}",
"public function worldlinePaymentRefund($refundId, $scopeId = null);",
"public function processRefund($data) {\n\t\t// provide the EziDebit API endpoint\n\t\t$soapclient = new SoapClient($this->nonPci);\n\n\t\t$params = [\n\t\t\t\t'DigitalKey' => $this->digitalKey,\n\t\t\t\t'PaymentID' => $data['paymentId'],\n\t\t\t\t'BankReceiptID' => $data['bankReceiptId'],\n\t\t\t\t'RefundAmountInCents' => $data['refundAmountInCents']\n\t\t];\n\n\t\treturn $response = $soapclient->processRefund($params);\n\t}",
"public function refund(){\n\t\treturn $this->hasMany('OrderRefund','order_id','order_id');\n\t}",
"public function pushRefundTransaction($id)\n {\n $this->data['ecommerce']['refund']['actionField'] = array('id' => $id);\n }",
"public function refund($refund, $apiContext = null, $restCall = null)\n {\n ArgumentValidator::validate($this->getId(), \"Id\");\n ArgumentValidator::validate($refund, 'refund');\n $payLoad = $refund->toJSON();\n $json = self::executeCall(\n \"/v1/payments/sale/{$this->getId()}/refund\",\n \"POST\",\n $payLoad,\n null,\n $apiContext,\n $restCall\n );\n $ret = new Refund();\n $ret->fromJson($json);\n return $ret;\n }",
"public function refund($refund, $apiContext = null, $restCall = null)\n {\n ArgumentValidator::validate($this->getId(), \"Id\");\n ArgumentValidator::validate($refund, 'refund');\n $payLoad = $refund->toJSON();\n $json = self::executeCall(\n \"/v1/payments/capture/{$this->getId()}/refund\",\n \"POST\",\n $payLoad,\n null,\n $apiContext,\n $restCall\n );\n $ret = new Refund();\n $ret->fromJson($json);\n return $ret;\n }",
"public static function getrefundItem()\n {\n \n $value=DB::table('product_refund')->join('users','users.id','product_refund.buyer_id')->join('product','product.product_id','product_refund.product_id')->orderBy('product_refund.dispute_id', 'desc')->get(); \n return $value;\n\t\n }",
"public function refund($transactionId, $orderId, $description, array $options = array())\n {\n $params = $options;\n\n $params['IDENTIFIER'] = $this->identifier;\n $params['OPERATIONTYPE'] = 'refund';\n $params['DESCRIPTION'] = $description;\n $params['TRANSACTIONID'] = $transactionId;\n $params['VERSION'] = self::API_VERSION;\n $params['ORDERID'] = $orderId;\n\n $params['HASH'] = $this->hash($params);\n\n return $this->requests($this->getDirectLinkUrls(), $params);\n }",
"public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(RefundsPeer::REFNO, $key, Criteria::EQUAL);\n }",
"public function refund($params)\n {\n return $this->request(Resource::RESOURCE_ORDER_REFUND, $params);\n }",
"public function findById($id, $refresh = false) {\n\n\t\t$data = Cache::get($this->_cacheKey.$id);\n\n\t\tif ($data == NULL || $refresh == true) {\n\t\t\t$refund = $this->refund_model->find($id);\n\t\t\tif ($refund != NULL) {\n\n\t\t\t\t$data \t\t\t\t\t= new StdClass;\n\t\t\t\t$data->id \t\t\t\t= $refund->id;\n\t\t\t\t$data->payment_id \t\t= $refund->payment_id;\n\t\t\t\t$data->job_id \t\t\t= $refund->job_id;\n\t\t\t\t$data->requested_by \t= $refund->requested_by;\n\t\t\t\t$data->amount \t\t\t= $refund->amount;\n\t\t\t\t$data->reason \t\t\t= $refund->reason;\n\t\t\t\t$data->status\t\t\t= strtoupper($refund->status);\n\t\t\t\t$data->created_at\t\t= date('d M, Y', strtotime($refund->created_at));\n\n\t\t\t\tCache::forever($this->_cacheKey.$id,$data);\t\t\t\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\treturn NULL;\n\t\t\t}\n\t\t}\n\n\t\t// to get payment details\n\t\t$data->payment = new StdClass;\n\t\t$paymentData = $this->payment_model->find($data->payment_id);\n\t\tif ($paymentData != NULL) {\n\t\t\t$data->payment = $paymentData;\n\t\t}\n\t\t\n\t\t// to get requested user name\n\t\t$data->requested_by_name = '';\n\t\t$userData = $this->user_model->find($data->requested_by);\n\t\tif ($userData != NULL) {\n\t\t\t$data->requested_by_name = $userData->first_name.' '.$userData->last_name;\n\t\t}\n\n\t\t// to get job name\n\t\t$data->job_name = '';\n\t\t$jobData = $this->job_model->find($data->job_id);\n\t\tif ($jobData != NULL) {\n\t\t\t$data->job_name = $jobData->name;\n\t\t}\n\n\t\treturn $data;\n\n\t}",
"public function GetRefund($payInId) {\n return $this->GetObject('payins_getrefunds', $payInId, '\\P4M\\MangoPayBundle\\MangoPaySDK\\Refund');\n }",
"protected function _updateRefundDetails()\n {\n $sQuery = \"SELECT BESTITAMAZONREFUNDID\n FROM bestitamazonrefunds\n WHERE STATE = 'Pending'\n AND BESTITAMAZONREFUNDID != ''\";\n\n $aResult = $this->_getContainer()->getDatabase()->getAll($sQuery);\n\n $this->_oLogger->info(\n 'Fetched orders and processed',\n array('orderNumbers' => array_keys($aResult))\n );\n\n foreach ($aResult as $aRow) {\n $oData = $this->_getContainer()->getClient()->getRefundDetails($aRow['BESTITAMAZONREFUNDID']);\n\n if (isset($oData->GetRefundDetailsResult->RefundDetails->RefundStatus->State)) {\n $this->_addToMessages(\n \"Refund ID: {$oData->GetRefundDetailsResult->RefundDetails->RefundReferenceId} - \"\n .\"Status: {$oData->GetRefundDetailsResult->RefundDetails->RefundStatus->State}<br/>\"\n );\n }\n }\n }",
"public function queryRefundTransactionLog(string $orderReference): SpyPaymentAfterPayTransactionLogQuery;",
"public function refund($options);",
"public function refund($mixed = null) {\n\t\t$validParameters = array(\n\t\t\t'(orderv2\\refund)',\n\t\t);\n\t\t$args = func_get_args();\n\t\t$this->_checkArguments($args, $validParameters);\n\t\treturn $this->__soapCall('refund', $this->make_soap_params($mixed));\n\t}",
"public function gETRefundIdReferenceCaptureRequest($refund_id)\n {\n // verify the required parameter 'refund_id' is set\n if ($refund_id === null || (is_array($refund_id) && count($refund_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $refund_id when calling gETRefundIdReferenceCapture'\n );\n }\n\n $resourcePath = '/refunds/{refundId}/reference_capture';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // path params\n if ($refund_id !== null) {\n $resourcePath = str_replace(\n '{' . 'refundId' . '}',\n ObjectSerializer::toPathValue($refund_id),\n $resourcePath\n );\n }\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n []\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n [],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function refund($url, $orderUUID, $amount);",
"function createRefund($payload, $charge_id) {\r\n $end_point = $this->tpi_server_domain . '/payment/xendit/credit-card/charges/' . $charge_id . '/refund';\r\n\r\n $args = array(\r\n 'headers' => $this->defaultHeader(),\r\n 'timeout' => WC_Xendit_PG_API::DEFAULT_TIME_OUT,\r\n 'body' => json_encode($payload)\r\n );\r\n $response = wp_remote_post($end_point, $args);\r\n $jsonResponse = json_decode($response['body'], true);\r\n\r\n return $jsonResponse;\r\n }",
"public function refund($orderId, $amount = null, $reason = '')\n {\n $payload = array_merge([\n 'order_id' => $orderId,\n 'reason' => $reason,\n ], $this->paddleOptions());\n\n if ($amount) {\n $payload['amount'] = $amount;\n }\n\n return Cashier::post('/payment/refund', $payload)['response']['refund_request_id'];\n }",
"public function get_company_invoice_payment_refund() {\n $invoice = $this->input->post('invoice');\n $data = $this->classtraineemodel->company_invoice($invoice);\n if ($data->company_id[0] == 'T') {\n $tenant_details = fetch_tenant_details($data->company_id);\n $data->company_name = $tenant_details->tenant_name;\n } else {\n $company_details = $this->company->get_company_details($this->tenant_id, $data->company_id);\n $data->company_name = $company_details[0]->company_name;\n }\n $data->discount_label = rtrim($this->course->get_metadata_on_parameter_id($data->discount_type), ', ');\n $gst_label = ($data->total_gst > 0) ? 'GST ON, ' : 'GST OFF ';\n if ($data->total_gst > 0) {\n $gst_label .= rtrim($this->course->get_metadata_on_parameter_id($data->gst_rule), ', ');\n }\n $data->gst_label = $gst_label;\n $data->inv_date = date('d/m/Y', strtotime($data->inv_date));\n $data->amount_refund = round($data->amount_refund, 2);\n $refund_details = $refund_details = $this->classtraineemodel->get_refund_paid_details($invoice);\n foreach ($refund_details as $k => $row) {\n if ($row->refnd_reason != 'OTHERS') {\n $refund_details[$k]->refnd_reason = $this->course->get_metadata_on_parameter_id($row->refnd_reason);\n } else {\n $refund_details[$k]->refnd_reason = 'Others (' . $row->refnd_reason_ot . ')';\n }\n\n $refund_details[$k]->refund_on = date('d/m/Y', strtotime($row->refund_on));\n $refund_details[$k]->mode_of_refund = $this->course->get_metadata_on_parameter_id($row->mode_of_refund);\n }\n $res = array('data' => $data, 'refund' => $refund_details);\n echo json_encode($res);\n exit();\n }",
"function _doRefund($oID, $amount = 0) {\r\n global $db, $messageStack;\r\n $new_order_status = (int)MODULE_PAYMENT_AUTHORIZENET_ECHECK_REFUNDED_ORDER_STATUS_ID;\r\n if ($new_order_status == 0) $new_order_status = 1;\r\n $proceedToRefund = true;\r\n $refundNote = strip_tags(zen_db_input($_POST['refnote']));\r\n if (isset($_POST['refconfirm']) && $_POST['refconfirm'] != 'on') {\r\n $messageStack->add_session(MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_REFUND_CONFIRM_ERROR, 'error');\r\n $proceedToRefund = false;\r\n }\r\n if (isset($_POST['buttonrefund']) && $_POST['buttonrefund'] == MODULE_PAYMENT_AUTHORIZENET_ECHECK_ENTRY_REFUND_BUTTON_TEXT) {\r\n $refundAmt = (float)$_POST['refamt'];\r\n $new_order_status = (int)MODULE_PAYMENT_AUTHORIZENET_ECHECK_REFUNDED_ORDER_STATUS_ID;\r\n if ($refundAmt == 0) {\r\n $messageStack->add_session(MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_INVALID_REFUND_AMOUNT, 'error');\r\n $proceedToRefund = false;\r\n }\r\n }\r\n if (isset($_POST['cc_number']) && trim($_POST['cc_number']) == '') {\r\n $messageStack->add_session(MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_CC_NUM_REQUIRED_ERROR, 'error');\r\n }\r\n if (isset($_POST['trans_id']) && trim($_POST['trans_id']) == '') {\r\n $messageStack->add_session(MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_TRANS_ID_REQUIRED_ERROR, 'error');\r\n $proceedToRefund = false;\r\n }\r\n\r\n /**\r\n * Submit refund request to gateway\r\n */\r\n if ($proceedToRefund) {\r\n $submit_data = array('x_type' => 'CREDIT',\r\n 'x_card_num' => trim($_POST['cc_number']),\r\n 'x_amount' => number_format($refundAmt, 2),\r\n 'x_trans_id' => trim($_POST['trans_id'])\r\n );\r\n unset($response);\r\n $response = $this->_sendRequest($submit_data);\r\n $response_code = $response[0];\r\n $response_text = $response[3];\r\n $response_alert = $response_text . ($this->commError == '' ? '' : ' Communications Error - Please notify webmaster.');\r\n $this->reportable_submit_data['Note'] = $refundNote;\r\n $this->_debugActions($response);\r\n\r\n if ($response_code != '1') {\r\n $messageStack->add_session($response_alert, 'error');\r\n } else {\r\n // Success, so save the results\r\n $sql_data_array = array('orders_id' => $oID,\r\n 'orders_status_id' => (int)$new_order_status,\r\n 'date_added' => 'now()',\r\n 'comments' => 'REFUND INITIATED. Trans ID:' . $response[6] . ' ' . $response[4]. \"\\n\" . ' Gross Refund Amt: ' . $response[9] . \"\\n\" . $refundNote,\r\n 'customer_notified' => 0\r\n );\r\n zen_db_perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array);\r\n $db->Execute(\"update \" . TABLE_ORDERS . \"\r\n set orders_status = '\" . (int)$new_order_status . \"'\r\n where orders_id = '\" . (int)$oID . \"'\");\r\n $messageStack->add_session(sprintf(MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_REFUND_INITIATED, $response[9], $response[6]), 'success');\r\n return true;\r\n }\r\n }\r\n return false;\r\n }",
"public function gETRefundIdOrderRequest($refund_id)\n {\n // verify the required parameter 'refund_id' is set\n if ($refund_id === null || (is_array($refund_id) && count($refund_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $refund_id when calling gETRefundIdOrder'\n );\n }\n\n $resourcePath = '/refunds/{refundId}/order';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // path params\n if ($refund_id !== null) {\n $resourcePath = str_replace(\n '{' . 'refundId' . '}',\n ObjectSerializer::toPathValue($refund_id),\n $resourcePath\n );\n }\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n []\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n [],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function trigger( $refund ) {\n if ( ! $this->is_enabled() ) {\n return;\n }\n\n $seller = dokan()->vendor->get( $refund->get_seller_id() );\n\n if ( ! is_a( $seller, '\\WeDevs\\Dokan\\Vendor\\Vendor' ) ) {\n return;\n }\n\n $this->object = $seller;\n $order_id = $refund->get_order_id();\n $refund_amount = $refund->get_refund_amount();\n $refund_reason = $refund->get_refund_reason();\n $status = 'canceled';\n $seller_mail = $seller->get_email();\n $order_url = esc_url(\n add_query_arg(\n array(\n 'order_id' => $order_id,\n '_view_mode' => 'email',\n 'permission' => '1',\n ), dokan_get_navigation_url( 'orders' )\n )\n );\n\n $this->placeholders = array(\n '{seller_name}' => $seller->get_name(),\n '{amount}' => wc_price( $refund_amount ),\n '{reason}' => $refund_reason,\n '{order_id}' => $order_id,\n '{status}' => $status,\n '{order_link}' => $order_url,\n '{site_name}' => $this->get_from_name(),\n '{site_url}' => site_url(),\n );\n\n $this->data = array(\n 'seller_name' => $seller->get_name(),\n 'amount' => wc_price( $refund_amount ),\n 'reason' => $refund_reason,\n 'order_id' => $order_id,\n 'status' => $status,\n 'order_link' => $order_url,\n 'site_name' => $this->get_from_name(),\n 'site_url' => site_url(),\n );\n\n $this->setup_locale();\n $this->send( $seller_mail, $this->get_subject(), $this->get_content(), $this->get_headers(), $this->get_attachments() );\n $this->restore_locale();\n }",
"public function getRefundDetails($requestParameters = array());",
"public function Refund($request)\n {\n $transactionID = $request->Refund->TransactionID;\n if (empty($transactionID)) {\n die(\"Refund transaction ID missing\");\n }\n $jsonRequest = $this->fixObjtoJSON($request);\n $response = $this->PostToRapidAPI(\"Transaction/$transactionID/Refund\", $jsonRequest);\n return $response;\n }",
"public function refund()\n\t{\n\t\trequirePermission(\"canRefund\");\n\n\t\t$id = intval($this->input->get(\"id\"));\n\t\t$costDp = intval($this->input->get(\"costDp\"));\n\t\t$accountId = intval($this->input->get(\"accountId\"));\n\t\t\n\t\tif(!$id || !is_numeric($id))\n\t\t{\n\t\t\tdie();\n\t\t}\n\n\t\tif ($costDp != \"Free\") {\n\t\t\tif(!$costDp || !is_numeric($costDp))\n\t\t\t{\n\t\t\t\tdie();\n\t\t\t}\n\t\t}\n\n\t\tif(!$accountId || !is_numeric($accountId))\n\t\t{\n\t\t\tdie();\n\t\t}\n\n\t\tif ($costDp != \"Free\") {\n\t\t\tif ($costDp > 0) {\n\t\t\t\t$userDp = intval($this->recup_model->getDp($accountId));\n\t\t\t\tif(!$userDp || !is_numeric($userDp))\n\t\t\t\t{\n\t\t\t\t\tdie(\"Problème lors de l'acquisition des users dps.\");\n\t\t\t\t}\n\t\t\t\t$this->internal_user_model->setDp($accountId, $userDp+$costDp);\n\t\t\t}\n\t\t}\n\t\t$this->recup_model->editEtat($this->realms->getRealm(1)->getCharacters()->getConnection(), $id, 8);\n\t}",
"static function getRefundHistory() {\n global $wpdb;\n $resultset = $wpdb->get_results(\n \"SELECT r.id, r.reservation_id, r.booking_reference, r.email, r.first_name, r.last_name, r.amount, r.description, \n sf.charge_id, sr.auth_vendor_tx_code, COALESCE(sf.ref_status, sr.ref_status) AS refund_status, \n sr.refund_status_detail, COALESCE(sf.ref_response, sr.ref_response) AS refund_response,\n COALESCE(sf.last_updated_date, sr.last_updated_date, r.last_updated_date) AS last_updated_date \n FROM wp_tx_refund r \n LEFT OUTER JOIN wp_stripe_tx_refund sf ON sf.id = r.id\n LEFT OUTER JOIN wp_sagepay_tx_refund sr ON sr.id = r.id\n ORDER BY r.id DESC\" );\n \n if($wpdb->last_error) {\n throw new DatabaseException($wpdb->last_error);\n }\n return $resultset;\n }",
"public function refundRequest()\n {\n $request = new Request\\Refund;\n return $this->applyAuthSettings($request);\n }",
"public function get($id)\n {\n $transaction = $this->refundWithoutReceiptTransactionFactory->create();\n $this->resourceModel->load($transaction, $id);\n if (! $transaction->getId()) {\n throw new NoSuchEntityException(__('Unable to find refund transaction with ID \"%1\"', $id));\n }\n return $transaction;\n }",
"public function refund($requestParameters = array());",
"public function refundCancel($refundHandle);",
"public function readrefundsAction()\n {\n $this->getResponse()->setBody(self::getHelper()->readrefunds());\n\n }",
"public function a_user_looking_for_data_refund()\n {\n /**\n * first todo\n * todo auth|login|middleware\n * alternative use ->loginAs(Model::find(id))\n */\n $this->user_login();\n $this->browse(function (Browser $browser) {\n $assertSee = 'Data Refund Modal';\n $tanggal = '2019-05-31';\n $uraian = 'Salah Top Up Saldo'; // value='keterangan'\n $jumlah = '8400000';\n $jumlahSee = 'Rp. 8.400.000,00,-';\n $browser\n /**\n * #path_url-02 cabang_path()\n * don't forget to put path link after execute link/move/change address.url\n * in this case we have move from user_login\n */\n ->assertPathIs($this->cabang_path())\n /**\n * ?clickLink('param')\n * the function for this\n * <a href='x'> param </a>\n */\n ->clickLink('Data Permodalan')\n ->clickLink('List Data Refund Saldo')\n // measure against , the bot seen a page ,\n // for capture laters -> finalize js loading screen\n ->assertSee($assertSee)\n // capture the task\n ->screenshot('UserViewDataPermodalan[LIST-REFUND-SALDO](1)')\n\n /**\n * select('name', 'value-option')\n * looking for view\n */\n ->select('perpage', '10')\n ->press('Oke')\n ->assertSee($assertSee)\n ->screenshot('UserViewDataPermodalan[LIST-REFUND-SALDO](2)')\n\n ->select('perpage', '25')\n ->press('Oke')\n ->assertSee($assertSee)\n ->screenshot('UserViewDataPermodalan[LIST-REFUND-SALDO](3)')\n\n ->select('perpage', '50')\n ->press('Oke')\n ->assertSee($assertSee)\n ->screenshot('UserViewDataPermodalan[LIST-REFUND-SALDO](4)')\n\n ->select('perpage', '100')\n ->press('Oke')\n ->assertSee($assertSee)\n ->screenshot('UserViewDataPermodalan[LIST-REFUND-SALDO](5)')\n // end of select\n\n /**\n * searching\n */\n // [tanggal]\n ->select('by', 'tanggal')\n // some case value more prefered use ID not CLASS , sometime make anError\n ->value('#q', $tanggal) //search\n ->screenshot('UserViewDataPermodalan[LIST-REFUND-SALDO](6)')\n // press ('value-of-button')\n ->press('Oke')\n ->assertSee($tanggal) //text from data by search\n ->screenshot('UserViewDataPermodalan[LIST-REFUND-SALDO](6.1)')\n\n // [uraian|keterangan]\n ->select('by', 'uraian')\n // some case value more prefered use ID not CLASS , sometime make anError\n ->value('#q', $uraian) //search\n ->screenshot('UserViewDataPermodalan[LIST-REFUND-SALDO](7.1)')\n // press ('value-of-button')\n ->press('Oke')\n ->assertSee($uraian) //text from data by search\n ->screenshot('UserViewDataPermodalan[LIST-REFUND-SALDO](7.2)')\n\n // [jumlah]\n ->select('by', 'jumlah')\n // some case value more prefered use ID not CLASS , sometime make anError\n ->value('#q', $jumlah) //search\n ->screenshot('UserViewDataPermodalan[LIST-REFUND-SALDO](8.1)')\n // press ('value-of-button')\n ->press('Oke')\n ->assertSee($jumlahSee) //text from data by search\n ->screenshot('UserViewDataPermodalan[LIST-REFUND-SALDO](8.2)')\n // end\n ;\n });\n }",
"public function refund():bool {\n request::xhr(\"orders/refund\", \"csrf_token=\".run::$runner->user->csrf.\"&id=\".substr($this->ID, 1),run::$runner->user->session);\n return true;\n }",
"public static function refund_vat_number( $refund_id ) {\n\t\tupdate_post_meta( $refund_id, '_billing_vat_number', get_post_meta( wp_get_post_parent_id( $refund_id ), '_billing_vat_number', true ) );\n\t\tupdate_post_meta( $refund_id, '_billing_country', get_post_meta( wp_get_post_parent_id( $refund_id ), '_billing_country', true ) );\n\t\tupdate_post_meta( $refund_id, '_order_currency', get_post_meta( wp_get_post_parent_id( $refund_id ), '_order_currency', true ) );\n\t}",
"public function getById(RequisitionId $id)\n {\n }",
"public function addRefund($bill, $refund, $order);",
"public function processRefund($id_transaction_stripe, $amount, $original_transaction)\n\t{\n\t\tif (!$this->backward)\n\t\t\treturn;\n\n\t\tinclude(dirname(__FILE__).'/lib/Stripe.php');\n\t\t\\Stripe\\Stripe::setApiKey(Configuration::get('STRIPE_MODE') ? Configuration::get('STRIPE_PRIVATE_KEY_LIVE') : Configuration::get('STRIPE_PRIVATE_KEY_TEST'));\n\n\t\t/* Try to process the refund and catch any error message */\n\t\ttry\n\t\t{\n\t\t\t$charge = \\Stripe\\Charge::retrieve($id_transaction_stripe);\n\t\t\tif($original_transaction['source']==\"card\")\n\t\t\t$result_json = $charge->refund(array('amount' => $amount * 100));\n\t\t\telse\n $result_json = $charge->refunds->create(array('amount' => $amount * 100,\"refund_address\" => $original_transaction['btc_address']));\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t$this->_errors['stripe_refund_error'] = $e->getMessage();\n\t\t\tif (class_exists('Logger'))\n\t\t\t\tLogger::addLog($this->l('Stripe - Refund transaction failed').' '.$e->getMessage(), 2, null, 'Cart', (int)$this->context->cart->id, true);\n\t\t}\n\t\t\n\t\tif(!isset($this->_errors['stripe_refund_error']))\n\t\tDb::getInstance()->Execute('\n\t\tINSERT INTO '._DB_PREFIX_.'stripepro_transaction (type, source, id_stripe_customer, id_cart, id_order,\n\t\tid_transaction, amount, status, currency, cc_type, cc_exp, cc_last_digits, fee, mode, date_add)\n\t\tVALUES (\\'refund\\',\\''.$original_transaction['source'].'\\', '.(int)$original_transaction['id_stripe_customer'].', '.(int)$original_transaction['id_cart'].', '.\n\t\t(int)$original_transaction['id_order'].', \\''.pSQL($id_transaction_stripe).'\\',\n\t\t\\''.(float)$amount.'\\', \\''.(!isset($this->_errors['stripe_refund_error']) ? 'paid' : 'unpaid').'\\', \\''.pSQL($result_json->currency).'\\',\n\t\t\\'\\', \\'\\', 0, 0, \\''.(Configuration::get('STRIPE_MODE') ? 'live' : 'test').'\\', NOW())');\n\t}",
"public function process_refund($order_id, $amount = null, $reason = '') {\n $order = wc_get_order( $order_id );\n $refundResponse = $this->refund( $order, $order_id, $amount, $reason );\n\n if ($refundResponse == '200') return true;\n else {\n $this->setLogError($refundResponse);\n return new WP_Error( 'midtrans_refund_error', $refundResponse);\n }\n }",
"public function CreateRefund($transferId, $refund, $idempotencyKey = null)\n {\n return $this->CreateObject('transfers_createrefunds', $refund, '\\MangoPay\\Refund', $transferId, null, $idempotencyKey);\n }",
"public function execute(int $orderId): array\n {\n $transactions = [];\n\n $captureTransactions = $this->allTransactionsFinder->execute(\n OrderTransactions::CAPTURE_ACTION,\n $orderId,\n OrderTransactions::SUCCESS_STATUS\n );\n\n foreach ($captureTransactions as $captureTransaction) {\n //Check if the capture is linked to an invoice & if so, check if the invoice is paid or not.\n if ($captureTransaction->getInvoiceId() !== null) {\n $invoice = $this->invoiceRepository->get($captureTransaction->getInvoiceId());\n\n if ((int)$invoice->getState() === Invoice::STATE_PAID) {\n //If the capture is linked to a paid invoice then we don't need to refund it.\n continue;\n }\n }\n\n $totalRefunded = 0.00;\n $amountUsedOnInvoice = 0.0;\n $refundTransactions = $this->orderTransactions->getRefundTransactionsFromCapture(\n $captureTransaction->getTransactionId()\n );\n\n //Loop all refunds to increment the total refunded from the capture transaction.\n foreach ($refundTransactions as $refundTransaction) {\n $totalRefunded += $refundTransaction->getAmount();\n }\n\n //If the capture has already been refunded in full.\n if ($this->floatComparator->equal($totalRefunded, $captureTransaction->getAmount())) {\n continue;\n }\n\n //The max we can refund, based on what has been refunded before.\n $maxToRefund = $captureTransaction->getAmount() - $totalRefunded;\n\n //Get all child captures.\n $childCaptures = $this->orderTransactions->getChildCapturesTransactionsFromCapture(\n $captureTransaction->getTransactionId()\n );\n\n foreach ($childCaptures as $childCapture) {\n //Check if the capture is linked to an invoice & if so, check if the invoice is paid or not.\n if ($childCapture->getInvoiceId() !== null) {\n $invoice = $this->invoiceRepository->get($childCapture->getInvoiceId());\n\n //Child capture was used to pay an invoice that is in paid state, so we can't refund it.\n if ((int)$invoice->getState() === Invoice::STATE_PAID) {\n $amountUsedOnInvoice += $childCapture->getAmount();\n }\n }\n }\n\n //What we should refund, what has not been used on a paid invoice.\n $amountToRefundOnCapture = $captureTransaction->getAmount() - $amountUsedOnInvoice;\n\n //Check if the amount to refund is not greater than the max to refund.\n if ($this->floatComparator->greaterThan($amountToRefundOnCapture, $maxToRefund)) {\n $amountToRefundOnCapture = $maxToRefund;\n }\n\n //Add capture to the list of transaction, with the amount to refund.\n $transactions[] = [\n 'transaction' => $captureTransaction,\n 'amountToCancel' => $amountToRefundOnCapture\n ];\n }\n\n $authorizeTransactions = $this->allTransactionsFinder->execute(\n OrderTransactions::AUTHORIZE_ACTION,\n $orderId,\n OrderTransactions::SUCCESS_STATUS\n );\n\n foreach ($authorizeTransactions as $authorizeTransaction) {\n $amountUsedOnCapture = 0.00;\n $totalVoided = 0.00;\n\n $voidTransactions = $this->orderTransactions->getVoidTransactionsFromAuthorize(\n $authorizeTransaction->getTransactionId()\n );\n\n //Calculate the total voided on the give authorize transaction.\n foreach ($voidTransactions as $voidTransaction) {\n $totalVoided += $voidTransaction->getAmount();\n }\n\n //The authorized transaction has been voided in full, no need to go any further.\n if ($this->floatComparator->equal($totalVoided, $authorizeTransaction->getAmount())) {\n continue;\n }\n\n //The max we can refund, based on what has been refunded before.\n $maxToVoid = $authorizeTransaction->getAmount() - $totalVoided;\n\n $captureTransactions = $this->orderTransactions->getCaptureTransactionsFromAuthorize(\n $authorizeTransaction->getTransactionId()\n );\n\n foreach ($captureTransactions as $captureTransaction) {\n $amountUsedOnCapture += $captureTransaction->getAmount();\n }\n\n //If the authorized transactions has been captured in full, no need to go any further.\n if ($this->floatComparator->equal($amountUsedOnCapture, $authorizeTransaction->getAmount())) {\n continue;\n }\n\n //What we should void, what has not been captured.\n $amountToVoidOnAuthorize = $authorizeTransaction->getAmount() - $amountUsedOnCapture;\n\n //Check if the amount to void is not greater than the max to void.\n if ($this->floatComparator->greaterThan($amountToVoidOnAuthorize, $maxToVoid)) {\n $amountToVoidOnAuthorize = $maxToVoid;\n }\n\n //Add capture to the list of transaction, with the amount to refund.\n $transactions[] = [\n 'transaction' => $authorizeTransaction,\n 'amountToCancel' => $amountToVoidOnAuthorize\n ];\n }\n\n return $transactions;\n }",
"public function testRefundPurchase() {\n\t\t$this->key_pairs = array(\n\t\t\t'tag' => $this->process_tag,\n\t\t\t'status' => 'completed',\n\t\t);\n\t\t$this->process_transactions = CrudTable\\read_rows( 'transactions', $this->key_pairs, false );\n\n\t\tif ( ! empty( $this->process_transactions ) ) {\n\t\t\t$request = TestHelpers::refundPurchaseRequest( $this->tag, $this->process_tag );\n\t\t\t$this->transactions = TestHelpers::refundPurchase( $this->http_client, $request );\n\n\t\t\t$this->assertIsArray( $this->transactions );\n\t\t\t$this->assertArrayHasKey( '0', $this->transactions );\n\n\t\t\t$this->assertEquals( $this->transactions[0]['alias'], $this->process_transactions[0]['alias'] );\n\t\t\t$this->assertEquals( $this->transactions[0]['user'], $this->process_transactions[0]['user'] );\n\t\t\t$this->assertEquals( $this->transactions[0]['cart'], $this->process_transactions[0]['cart'] );\n\t\t\t$this->assertEquals( $this->transactions[0]['transactionid'], $this->process_transactions[0]['transactionid'] );\n\t\t\t$this->assertEquals( abs( $this->transactions[0]['saleid'] ), abs( $this->process_transactions[0]['saleid'] ) );\n\t\t\t$this->assertEquals( $this->transactions[0]['currency'], $this->process_transactions[0]['currency'] );\n\t\t\t$this->assertEquals( $this->transactions[0]['status'], $this->process_transactions[0]['status'] );\n\t\t\t$this->assertEquals( $this->transactions[0]['saleid'], $this->process_transactions[0]['saleid'] );\n\n\t\t\t$this->assertEquals( 'refund', $this->transactions[0]['type'] );\n\t\t\t$this->assertEmpty( $this->transactions[0]['tokenid'] );\n\t\t\t$this->assertNotEmpty( $this->transactions[0]['refundid'] );\n\t\t\t$this->assertEmpty( $this->transactions[0]['redirect_url'] );\n\n\t\t} else {\n\t\t\t$request = TestHelpers::createPurchaseRequest( $this->process_tag );\n\t\t\t$transactions = TestHelpers::createPurchase( $this->http_client, $request );\n\t\t\t$this->assertIsArray( $transactions );\n\t\t\t$this->assertArrayHasKey( '0', $transactions );\n\t\t\t$this->assertNotEmpty( $transactions[0]['redirect_url'] );\n\t\t\t$this->assertEquals( 'created', $transactions[0]['status'] );\n\n\t\t\techo 'For complete REFUND PURCHASE test, you must pay and restart this tests.' . PHP_EOL;\n\t\t\techo 'Link for pay - ' . $transactions[0]['redirect_url'] . PHP_EOL;\n\t\t}\n\t}",
"public function refund( $invoiceId, $value )\n\t\t{\n\t\t\tif ( is_numeric( $invoiceId ) && is_numeric( $value ) ) {\n\t\t\t\treturn $this->_tableTransactions->update(\n\t\t\t\t\tarray (\n\t\t\t\t\t\t'refunded' => $value\n\t\t\t\t\t),\n\t\t\t\t\t\"`invoice_id` = $invoiceId\"\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn false;\n\t\t}",
"function wp_aff_handle_woocommerce_order_refund($order_id) {\n wp_affiliate_log_debug(\"WooCommerce Affiliate integration - order refunded. Order ID: \" . $order_id, true);\n //$order = new WC_Order($order_id);\n $txn_id = $order_id;\n wp_aff_handle_refund($txn_id);\n}",
"public function export_payment_refund($payid) {\n if (empty($payid)) {\n return show_404();\n }\n $result = $this->get_payid_details($payid, 1);\n if ($result['data']->enrolment_mode == 'COMPSPON') {\n if ($result['data']->company_id[0] == 'T') {\n $tenant_details = fetch_tenant_details($result['data']->company_id);\n $trainee_det = $tenant_details->tenant_name;\n } else {\n $company_details = $this->company->get_company_details($this->tenant_id, $result['data']->company_id);\n $trainee_det = $company_details[0]->company_name;\n }\n } else {\n $trainee_details = $this->classtraineemodel->get_trainee_by_pymnt_due_id($payid);\n $trainee_det = $trainee_details->first_name . ' ' . $trainee_details->last_name;\n $trainee_id = $trainee_details->user_id;\n }\n $this->load->helper('pdf_reports_helper');\n generate_trainee_payment_refund($result, $refund_arr, $trainee_det);\n }",
"public function make_payment_refund($order, $amount)\n {\n\n if (!($details = $this->get_payment_details($order))) {\n return null;\n }\n\n $request = array(\n 'charge_id' => $details['id'],\n 'amount' => $amount,\n );\n\n WC_Gateway_Orangepay::log('Orangepay - make_payment_refund() request parameters: ' . $order->get_order_number() . ': ' . wc_print_r($request, true));\n\n $raw_response = wp_safe_remote_post(\n $this->endpoint . '/refunds',\n array(\n 'method' => 'POST',\n 'timeout' => 300,\n 'user-agent' => 'WooCommerce/' . WC()->version,\n 'headers' => array(\n 'Content-Type' => 'application/json;',\n 'Authorization' => 'Bearer ' . $this->gateway->get_option('api_token')\n ),\n 'body' => json_encode($request),\n 'httpversion' => '1.1',\n )\n );\n\n WC_Gateway_Orangepay::log('Orangepay - make_payment_refund() response: ' . wc_print_r($raw_response, true));\n\n if (isset($raw_response['body']) && ($response = json_decode($raw_response['body'], true))) {\n if (isset($response['data'])) {\n $data = $response['data'];\n if (isset($data['charge'])) {\n $charge = $data['charge'];\n if (isset($charge['included'])) {\n foreach ($charge['included'] as $included) {\n if ($included['type'] === 'refund') {\n return $included['id'];\n }\n }\n }\n }\n }\n }\n\n return null;\n }",
"function _getTransactionDetails($transaction_id) {\t\t\n\t\t// Set request-specific fields.\n\t\t$transactionID = urlencode($transaction_id);\n\t\t$this->nvpStr = \"&TRANSACTIONID=$transactionID\";\t\n\t\t\t\n\t\treturn $this->query(\"RefundTransaction\");\n\t}",
"public function refund($orderId, array $options = [])\n {\n return Paddle::refundPayment($orderId, $options);\n }",
"public function checkRefund($condition)\n {\n $url = $this->weconnectDomain . \"/weixin/refunds\";\n $result = $this->_curl(self::METHOD_POST, $url, 'channel', $condition);\n LogUtil::info(['url' => 'POST ' . $url, 'response' => $result], 'channel');\n return $result;\n }",
"public static function accept($id,$refund,$reject)\n {\n $items=DB::table('order_items')\n ->select('order_items.item_id',\n 'order_items.quantity',\n 'order_items.confirmed',\n 'products.stock'\n )\n ->where('order_items.order_id',$id)\n ->join('products','products.id','=','order_items.item_id')\n ->get();\n foreach($items as $item){\n if($item->confirmed===1){\n $new_stock=$item->stock - $item->quantity;\n if($new_stock>0)\n DB::table('products')\n ->where('id',$item->item_id)\n ->update(['stock'=>$new_stock]);\n else\n DB::table('order_items')\n ->where('order_id',$id)\n ->where('item_id',$item->item_id)\n ->update(['confirmed'=>0]);\n }\n }\n return Order::where('id',$id)\n ->update(['status'=>'ACCEPTED',\n 'refund_amount'=>$refund,\n 'rejected_items'=>$reject]);\n }",
"public function RefundTxn() {\r\n\r\n $ch = curl_init();\r\n\r\n $CURLParameters = http_build_query(array(\r\n // Our default parameters!\r\n \"key\" => $this->key,\r\n \"appid\" => $this->game,\r\n // This can vary from request to request, sometimes its steamid or steamids or even an array.\r\n \"steamid\" => $this->steamid,\r\n // Custom Queries below here.\r\n \"orderid\" => $this->orderid,\r\n ));\r\n\r\n curl_setopt($ch, CURLOPT_URL, \"https://partner.steam-api.com/\" . $this->interface . \"/RefundTxn/v2/\");\r\n\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\n curl_setopt($ch, CURLOPT_POST, 1);\r\n curl_setopt($ch, CURLOPT_POSTFIELDS, $CURLParameters);\r\n $CURLResponse = json_decode(curl_exec($ch));\r\n $CURLResponseCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\r\n curl_close($ch);\r\n\r\n\r\n // Error handling improved!\r\n\r\n if ($CURLResponseCode != 200) {\r\n if ($CURLResponseCode == 400) {\r\n throw new exceptions\\SteamRequestParameterException(\"The Order ID or another parameter is invalid!\");\r\n }\r\n if ($CURLResponseCode == 401) {\r\n throw new exceptions\\SteamException(\"App ID or API Key is invalid.\");\r\n }\r\n throw new exceptions\\SteamRequestException(\"$CURLResponseCode Request Error.\");\r\n }\r\n\r\n if ($CURLResponse->response->result == \"OK\") {\r\n return true;\r\n }\r\n\r\n throw new exceptions\\SteamRequestException(json_encode($CURLResponse->response->error));\r\n }",
"public function process_refund( $order_id, $amount = null, $reason = '' ) {\n\t\t$details = $this->get_transaction_details( $order_id );\n\t\t$is_order_txn_id_active = $this->is_transaction_active( $details );\n\t\t$txn_type = $is_order_txn_id_active ? self::TXN_TYPE_REVERSAL : self::TXN_TYPE_REFUND;\n\n\t\t$order = new WC_Order( $order_id );\n\t\t$request = $this->prepare_request( $txn_type, $order );\n\t\t$response = $this->submit_request( $request );\n\t\t$is_successful = $this->handle_response( $request, $response );\n\n\t\tif ($is_successful) {\n\t\t\t$note_text = sprintf(\n\t\t\t\t'%s%s was reversed or refunded. Transaction ID: %s ',\n\t\t\t\tget_woocommerce_currency_symbol(), $amount, $response->transactionReference->transactionId\n\t\t\t);\n\n\t\t\t$order->add_order_note($note_text);\n\t\t}\n\n\t\treturn $is_successful;\n\t}",
"public function Refund($Payload){\n\t\t\tif(empty($Payload['Body'])){\n\t\t\t\tthrow new Exception('body can not be empty.');\n\t\t\t}\n\t\t\t$Payload['Verb']='POST';\n\t\t\t$Payload['URL']='/V1/creditmemo/refund';\n\t\t\t$Payload['Body']=json_encode($Payload['Body']);\n\t\t\treturn $this->Execute($Payload);\n\t\t}",
"public function fetch($id, $ref = '')\n {\n global $conf;\n\n // Check parameters\n if (empty($id) && empty($ref)) return -1;\n\n $sql = \"SELECT c.rowid, c.entity, c.ref, ref_supplier, c.fk_soc, c.fk_statut, c.amount_ht, c.total_ht, c.total_ttc, c.tva as total_vat,\";\n $sql.= \" c.localtax1, c.localtax2, \";\n $sql.= \" c.date_creation, c.date_valid, c.date_approve, c.date_approve2,\";\n $sql.= \" c.fk_user_author, c.fk_user_valid, c.fk_user_approve, c.fk_user_approve2,\";\n $sql.= \" c.date_commande as date_commande, c.date_livraison as date_livraison, c.fk_cond_reglement, c.fk_mode_reglement, c.fk_projet as fk_project, c.remise_percent, c.source, c.fk_input_method,\";\n $sql.= \" c.fk_account,\";\n $sql.= \" c.note_private, c.note_public, c.model_pdf, c.extraparams, c.billed,\";\n $sql.= \" c.fk_multicurrency, c.multicurrency_code, c.multicurrency_tx, c.multicurrency_total_ht, c.multicurrency_total_tva, c.multicurrency_total_ttc,\";\n $sql.= \" cm.libelle as methode_commande,\";\n $sql.= \" cr.code as cond_reglement_code, cr.libelle as cond_reglement_libelle, cr.libelle_facture as cond_reglement_libelle_doc,\";\n $sql.= \" p.code as mode_reglement_code, p.libelle as mode_reglement_libelle\";\n $sql.= ', c.fk_incoterms, c.location_incoterms';\n $sql.= ', i.libelle as libelle_incoterms';\n $sql.= \" FROM \".MAIN_DB_PREFIX.\"commande_fournisseur as c\";\n $sql.= \" LEFT JOIN \".MAIN_DB_PREFIX.\"c_payment_term as cr ON c.fk_cond_reglement = cr.rowid\";\n $sql.= \" LEFT JOIN \".MAIN_DB_PREFIX.\"c_paiement as p ON c.fk_mode_reglement = p.id\";\n $sql.= \" LEFT JOIN \".MAIN_DB_PREFIX.\"c_input_method as cm ON cm.rowid = c.fk_input_method\";\n $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_incoterms as i ON c.fk_incoterms = i.rowid';\n $sql.= \" WHERE c.entity = \".$conf->entity;\n if ($ref) $sql.= \" AND c.ref='\".$this->db->escape($ref).\"'\";\n else $sql.= \" AND c.rowid=\".$id;\n\n dol_syslog(get_class($this).\"::fetch\", LOG_DEBUG);\n $resql = $this->db->query($sql);\n if ($resql)\n {\n $obj = $this->db->fetch_object($resql);\n if (! $obj)\n {\n $this->error='Bill with id '.$id.' not found';\n dol_syslog(get_class($this).'::fetch '.$this->error);\n return 0;\n }\n\n $this->id\t\t\t\t\t= $obj->rowid;\n $this->entity\t\t\t\t= $obj->entity;\n\n $this->ref\t\t\t\t\t= $obj->ref;\n $this->ref_supplier\t\t\t= $obj->ref_supplier;\n $this->socid\t\t\t\t= $obj->fk_soc;\n $this->fourn_id\t\t\t\t= $obj->fk_soc;\n $this->statut\t\t\t\t= $obj->fk_statut;\n $this->billed\t\t\t\t= $obj->billed;\n $this->user_author_id\t\t= $obj->fk_user_author;\n $this->user_valid_id\t\t= $obj->fk_user_valid;\n $this->user_approve_id\t\t= $obj->fk_user_approve;\n $this->user_approve_id2\t\t= $obj->fk_user_approve2;\n $this->total_ht\t\t\t\t= $obj->total_ht;\n $this->total_tva\t\t\t= $obj->total_vat;\n $this->total_localtax1\t\t= $obj->localtax1;\n $this->total_localtax2\t\t= $obj->localtax2;\n $this->total_ttc\t\t\t= $obj->total_ttc;\n $this->date\t\t\t\t\t= $this->db->jdate($obj->date_creation);\n $this->date_valid\t\t\t= $this->db->jdate($obj->date_valid);\n $this->date_approve\t\t\t= $this->db->jdate($obj->date_approve);\n $this->date_approve2\t\t= $this->db->jdate($obj->date_approve2);\n $this->date_commande\t\t= $this->db->jdate($obj->date_commande); // date we make the order to supplier\n\t\t\t$this->date_livraison = $this->db->jdate($obj->date_livraison);\n $this->remise_percent\t\t= $obj->remise_percent;\n $this->methode_commande_id\t= $obj->fk_input_method;\n $this->methode_commande\t\t= $obj->methode_commande;\n\n $this->source\t\t\t\t= $obj->source;\n $this->fk_project\t\t\t= $obj->fk_project;\n $this->cond_reglement_id\t= $obj->fk_cond_reglement;\n $this->cond_reglement_code\t= $obj->cond_reglement_code;\n $this->cond_reglement\t\t= $obj->cond_reglement_libelle;\n $this->cond_reglement_doc\t= $obj->cond_reglement_libelle_doc;\n $this->fk_account = $obj->fk_account;\n $this->mode_reglement_id\t= $obj->fk_mode_reglement;\n $this->mode_reglement_code\t= $obj->mode_reglement_code;\n $this->mode_reglement\t\t= $obj->mode_reglement_libelle;\n $this->note\t\t\t\t\t= $obj->note_private; // deprecated\n $this->note_private\t\t\t= $obj->note_private;\n $this->note_public\t\t\t= $obj->note_public;\n $this->modelpdf\t\t\t\t= $obj->model_pdf;\n\n\t\t\t//Incoterms\n\t\t\t$this->fk_incoterms = $obj->fk_incoterms;\n\t\t\t$this->location_incoterms = $obj->location_incoterms;\n\t\t\t$this->libelle_incoterms = $obj->libelle_incoterms;\n\n\t\t\t// Multicurrency\n\t\t\t$this->fk_multicurrency \t\t= $obj->fk_multicurrency;\n\t\t\t$this->multicurrency_code \t\t= $obj->multicurrency_code;\n\t\t\t$this->multicurrency_tx \t\t= $obj->multicurrency_tx;\n\t\t\t$this->multicurrency_total_ht \t= $obj->multicurrency_total_ht;\n\t\t\t$this->multicurrency_total_tva \t= $obj->multicurrency_total_tva;\n\t\t\t$this->multicurrency_total_ttc \t= $obj->multicurrency_total_ttc;\n\n $this->extraparams\t\t\t= (array) json_decode($obj->extraparams, true);\n\n $this->db->free($resql);\n\n // Retreive all extrafield\n // fetch optionals attributes and labels\n $this->fetch_optionals();\n\n if ($this->statut == 0) $this->brouillon = 1;\n\n /*\n * Lines\n */\n $result=$this->fetch_lines();\n if ($result < 0)\n {\n \treturn -1;\n }\n else\n {\n \treturn 1;\n }\n }\n else\n {\n $this->error=$this->db->error().\" sql=\".$sql;\n return -1;\n }\n }",
"public function getByReceiptId() {\n\t\t$data = Request::inputs();\n\t\t$validator = new Validator;\n\t\t$validation = $validator->make( $data, [\n\t\t\t'id' => 'required|max:20',\n\t\t] );\n\t\t// validate\n\t\t$validation->validate();\n\t\tif ( $validation->fails() ) {\n\t\t\t$errors = $validation->errors();;\n\n\t\t\treturn responseJson( [ 'data' => $errors->firstOfAll() ] );\n\t\t}\n\t\t$order = new Order();\n\n\t\treturn responseJson( $order->where( 'receipt_id', '=', $data['id'] )->get() );\n\n\t}",
"public function doRefund() {\n\t\t\n\t\t$this->load->language('extension/payment/hoolah_refund');\n\t\tif (!empty($this->request->post['transaction_id']) && isset($this->request->post['refund_full']) && !empty($this->request->post['description'])) {\n\t\t\t$this->load->model('extension/payment/hoolah');\n\n\t\t\tif ($this->request->post['refund_full'] == 0 && $this->request->post['amount'] == 0) {\n\t\t\t\t$this->session->data['error'] = $this->language->get('error_partial_amt');\n\t\t\t\t$this->response->redirect($this->url->link('extension/payment/hoolah/refund', 'token=' . $this->session->data['token'] . '&tid=' . $this->request->get['tid'] . '&order_id=' . $this->request->get['order_id'], true));\n\t\t\t} else {\n\t\t\t\t$order_transaction = $this->model_extension_payment_hoolah->getHoolahOrderTransactionStatus($this->request->get['order_id'], 'APPROVED');\n\t\t\t \n\t\t\t // get sku order\n\t\t $orders = $this->model_extension_payment_hoolah->getOrderProducts($this->request->get['order_id']);\n\t\t\n\t\t\t\tif (isset($order_transaction)) {\n\t\t\t\t $call_data['transaction_id'] = $order_transaction['id'];\n\t\t\t\t $call_data['uuid'] = $order_transaction['uuid'];\n\t\t\t\t $call_data['description'] = $this->request->post['description'];\n\t\t\t\t $call_data['order_id'] = $this->request->post['order_id'];\n\t\t\t\t \n\t\t\t\t\tif ($this->request->post['refund_full'] == 1) {\n\t\t\t\t\t\t$call_data['REFUNDTYPE'] = 'Full';\n\t\t\t\t\t\t$call_data['AMT'] = $order_transaction['total'];\n\t\t\t\t\t\n\t\t\t\t\t\t// submit to hoolah api\n\t\t\t\t\t $result = $this->model_extension_payment_hoolah->initiate_fullrefund($call_data);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$call_data['REFUNDTYPE'] = 'Partial';\n\t\t\t\t\t\t$call_data['AMT'] = $this->request->post['amount'];\n\t\t\t\t\t\t$call_data['sku'] = $orders[0]['sku'];\n\t\t\t\t\t\t$call_data['CURRENCYCODE'] = $this->request->post['currency_code'];\n\t\t\t\t\t\t\n\t\t\t\t\t\t// submit to hoolah api\n\t\t\t\t\t $result = $this->model_extension_payment_hoolah->initiate_partialrefund($call_data);\n\t\t\t\t\t}\n\t\t\t\t\t$refund_details = array();\n foreach($result->details AS $rows) {\n $refund_details[] = $rows;\n }\n \n $refund = array();\n $refund['order_id'] = $order_transaction['order_id'];\n $refund['uuid'] = $order_transaction['uuid'];\n $refund['status'] = $result->status;\n $refund['orderType'] = $order_transaction['orderType'];\n $refund['total'] = $call_data['AMT'];\n $refund['tax'] = $order_transaction['tax'];\n $refund['shipping_fee'] = $order_transaction['shipping_fee'];\n $refund['currency'] = $order_transaction['currency'];\n $refund['requestId'] = $result->requestId;\n $refund['code'] = $result->code;\n $refund['message'] = $result->message;\n $refund['details'] = json_encode($refund_details);\n $refund['createdAt'] = date('Y-m-d H:i:s');\n $refund['date_added'] = date('Y-m-d H:i:s');\n \n // save it to transaction tbl\n $this->model_extension_payment_hoolah->addHoolahOrderTransactionRefund($refund);\n \n if($result->code == 'accepted' || $result->code == 'in_process' || $result->code == 'in_process') {\n //redirect back to the order\n\t\t\t\t\t\t$this->response->redirect($this->url->link('sale/order/info', 'token=' . $this->session->data['token'] . '&order_id=' . $this->request->get['order_id'], true));\n \n } else {\n $this->session->data['error'] = $result->message;\n\t\t\t\t\t $this->response->redirect($this->url->link('extension/payment/hoolah/refund', 'token=' . $this->session->data['token'] . '&tid=' . $this->request->get['tid'] . '&order_id=' . $this->request->get['order_id'], true));\n }\n\t\t\t\t} else {\n\t\t\t\t\t$this->session->data['error'] = $this->language->get('error_data');\n\t\t\t\t\t$this->response->redirect($this->url->link('extension/payment/hoolah/refund', 'token=' . $this->session->data['token'] . '&tid=' . $this->request->get['tid'] . '&order_id=' . $this->request->get['order_id'], true));\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$this->session->data['error'] = $this->language->get('error_data');\n\t\t\t$this->response->redirect($this->url->link('extension/payment/hoolah/refund', 'token=' . $this->session->data['token'] . '&tid=' . $this->request->get['tid'] . '&order_id=' . $this->request->get['order_id'], true));\n\t\t}\n\t}",
"public function testRefund()\n {\n print \"testRefund()\\n\";\n\n // TODO: Impl\n\n $this->fail();\n }",
"public static function refundTransaction($transactionId, $specificAmount = null, $comment = null)\n {\n $instance = self::getInstance();\n $transaction = self::getTransactionInformations($transactionId);\n\n $params = array(\n 'version' => self::API_VERSION,\n 'transactionID' => $transactionId,\n 'payment' => array(\n 'amount' => (isset($specificAmount) ? round($specificAmount * 100) : $transaction['payment']['amount']),\n 'currency' => $transaction['payment']['currency'],\n 'mode' => 'CPT',\n 'action' => 421,\n 'contractNumber' => $transaction['payment']['contractNumber'],\n ),\n 'sequenceNumber' => null,\n 'comment' => $comment,\n );\n\n // Do refund\n $result = $instance->doRefund($params);\n\n return $result;\n }",
"public function setRefundID($refundID)\n {\n $this->refundID = $refundID;\n return $this;\n }",
"public function createRefundItemEntry($data) {\n\n $query_string = \"INSERT INTO \" . DB_PREFIX . \"iyzico_order_refunds SET\";\n $data_array = array();\n foreach ($data as $key => $value) {\n $data_array[] = \"`$key` = '\" . $this->db->escape($value) . \"'\";\n }\n $data_string = implode(\", \", $data_array);\n $query_string .= $data_string;\n $query_string .= \";\";\n $this->db->query($query_string);\n return $this->db->getLastId();\n }",
"public function ajax_swedbank_pay_refund() {\n\t\tif ( ! wp_verify_nonce( $_REQUEST['nonce'], 'swedbank_pay' ) ) {\n\t\t\texit( 'No naughty business' );\n\t\t}\n\n\t\t$order_id = (int) $_REQUEST['order_id'];\n\t\t$order = wc_get_order( $order_id );\n\n\t\ttry {\n\t\t\t// Create the refund object.\n\t\t\t$refund = wc_create_refund(\n\t\t\t\tarray(\n\t\t\t\t\t'amount' => $order->get_total(),\n\t\t\t\t\t'reason' => __( 'Full refund.', 'swedbank-pay-woocommerce-checkout' ),\n\t\t\t\t\t'order_id' => $order_id,\n\t\t\t\t\t'refund_payment' => true\n\t\t\t\t)\n\t\t\t);\n\n\t\t\tif ( is_wp_error( $refund ) ) {\n\t\t\t\tthrow new Exception( $refund->get_error_message() );\n\t\t\t}\n\n\t\t\twp_send_json_success( __( 'Refund has been successful.', 'swedbank-pay-woocommerce-checkout' ) );\n\t\t} catch ( Exception $e ) {\n\t\t\twp_send_json_error( $e->getMessage() );\n\t\t}\n\t}",
"public function refund($transactionId)\n {\n try {\n $numberOfTransactions = $this->transaction->whereTransactionId($transactionId)->count();\n\n if ($numberOfTransactions > 1) {\n return Response::HTTP_CONFLICT;\n }\n\n $transaction = $this->transactionById($transactionId); \n\n $amount = $transaction->total_amount;\n\n $refundTransaction = $transaction->replicate();\n $refundTransaction->total_amount = -1 * abs($amount);\n $refundTransaction->created_at = Carbon::parse(now());\n\n $refundTransaction->save();\n\n return Response::HTTP_CREATED;\n } catch (Exception $e) {\n Log::warning('Error: Transaction Refund Failed. Message: ' . $e->getMessage());\n return Response::HTTP_UNPROCESSABLE_ENTITY;\n } \n }",
"public static function find($id){\n return Purchase::find($id);\n }",
"public function renderBuyerRefundAction (Request $request)\r\n {\r\n $dateFromCarbon = Carbon::now()->addMonth(-1)->format('m/d/Y');\r\n $dateToCarbon = Carbon::now()->addDays(1)->format('m/d/Y');\r\n\r\n $em = $this->getDoctrine()->getManager();\r\n\r\n $userOrderRepository = $em->getRepository('YilinkerCoreBundle:UserOrder');\r\n $refundsQuery = $userOrderRepository->getBuyerRefundList()\r\n ->filterBy(array(\r\n 'name' => $request->get('searchKeyword', ''),\r\n 'dateFrom' => $request->get('dateFrom', $dateFromCarbon),\r\n 'dateTo' => $request->get('dateTo', $dateToCarbon)\r\n ));\r\n\r\n $refundCount = count($refundsQuery->getResult(Query::HYDRATE_SCALAR));\r\n\r\n $refunds = $refundsQuery->select(array(\r\n 'Dispute.disputeId',\r\n 'Dispute.ticket',\r\n 'this.orderId',\r\n 'this.invoiceNumber',\r\n 'Dispute.disputeId',\r\n 'GROUP_CONCAT(OrderProduct.orderProductId) as orderProduct',\r\n 'User.userId as buyerUserId',\r\n 'User.firstName as buyerFirstName',\r\n 'User.lastName as buyerLastName',\r\n 'User.email as buyerEmail',\r\n 'User.contactNumber as buyerContactNumber'\r\n ))\r\n ->page($request->get('page', 1))\r\n ->getResult(Query::HYDRATE_ARRAY);\r\n\r\n return $this->render('YilinkerBackendBundle:Transaction:buyer_refund.html.twig', array(\r\n 'refunds' => $refunds,\r\n 'refundCount' => $refundCount,\r\n 'pageLimit' => self::PAGE_LIMIT\r\n ));\r\n }",
"public function refundSale($refundRequest, $apiContext = null, $restCall = null)\n {\n ArgumentValidator::validate($this->getId(), \"Id\");\n ArgumentValidator::validate($refundRequest, 'refundRequest');\n $payLoad = $refundRequest->toJSON();\n $json = self::executeCall(\n \"/v1/payments/sale/{$this->getId()}/refund\",\n \"POST\",\n $payLoad,\n null,\n $apiContext,\n $restCall\n );\n $ret = new DetailedRefund();\n $ret->fromJson($json);\n return $ret;\n }",
"public function refundOrder(Request $request)\n {\n $refund_data['merc_refund_ref_no'] = $request->merc_refund_ref_no;\n $refund_data['orderid'] = $request->orderid;\n $refund_data['transaction_id'] = $request->transaction_id;\n $refund_data['transaction_date'] = $request->transaction_date;\n $refund_data['refund_amount'] = $request->refund_amount;\n $refund_data['txn_amount'] = $request->txn_amount;\n\n $response = BilldeskHmac::refundOrder($refund_data);\n }",
"public function refundTransaction() {\n //not implemented\n }",
"public function update(Request $request, Refund $refund)\n {\n //\n $all = $request->all();\n\n\n if($all['status'] == 2){\n $config = Lib_make::getConfig();\n $appid = $config['appid'];\n $mchid = $config['mch_id'];\n $out_trade_no = $refund->order_number;\n $total_fee = $refund->price;\n $refund_fee = $refund->price;\n $mch_secret = $config['mch_secret'];\n $key_pem = $config['key_pem'];\n $cert_pem = $config['cert_pem'];\n $result = initiatingRefund($out_trade_no,$total_fee,$refund_fee,$mchid,$appid,$mch_secret,$key_pem,$cert_pem);\n if($result['result_code'] == 'SUCCESS' && $result['return_code'] == 'SUCCESS'){\n $int = $refund->update($all);\n return ajaxSuccess();\n }else{\n return ajaxError('退款失败 联系管理员' );\n }\n\n }\n $int = $refund->update($all);\n if (!$int) return ajaxError('添加失败' );\n return ajaxSuccess();\n }",
"function hook_commerce_adyen_refund_received(\\Commerce\\Adyen\\Payment\\Transaction\\Refund $transaction, \\stdClass $order) {\n\n}",
"public function getRefunds() {\n $orders = Order::where('status', 'refund')->with('orderitems', 'shippings')->get();\n return view('backend.admin.order.refund')->with('orders', $orders);\n }",
"public function getRefundStatus()\n {\n return $this->refundStatus;\n }",
"public function byTransactionId(string $transactionId, string $refundNumber, int $totalFee, int $refundFee, array $optional = [])\n {\n return $this->refund($refundNumber, $totalFee, $refundFee, array_merge($optional, ['transaction_id' => $transactionId]));\n }",
"public function CreateRefund($payInId, $refund) {\n return $this->CreateObject('payins_createrefunds', $refund, '\\P4M\\MangoPayBundle\\MangoPaySDK\\Refund', $payInId);\n }",
"public function view_refund()\n\n {\n $itemData['item'] = Product::getrefundItem();\n\n $data = ['itemData' => $itemData];\n\n return view('admin.refund')->with($data);\n }",
"public function test_receive_refund()\n {\n\n $payumService = m::spy('Recca0120\\LaravelPayum\\Service\\PayumService');\n $token = uniqid();\n\n /*\n |------------------------------------------------------------\n | Act\n |------------------------------------------------------------\n */\n\n $payumService\n ->shouldReceive('receiveRefund')->with($token)->andReturn($token);\n\n $controller = new PaymentController();\n\n /*\n |------------------------------------------------------------\n | Assert\n |------------------------------------------------------------\n */\n\n $controller->receiveRefund($payumService, $token);\n $payumService->shouldHaveReceived('receiveRefund')->with($token)->once();\n }",
"public function refund(array $options = [])\n {\n // TODO: Implement refund() method.\n }",
"public function issueCaseRefund($caseId){\n return $response = $this->send(HttpClient::POST, sprintf('casemanagement/%s/issue_refund', $caseId)));\n }",
"public function void_order_refunds( $order_id ) {\n\n\t\t$order = wc_get_order( $order_id );\n\n\t\tif ( ! $order ) {\n\t\t\treturn;\n\t\t}\n\n\t\t/**\n\t\t * Filter whether refunds should be voided along with their parent order.\n\t\t *\n\t\t * @since 1.0.0\n\t\t * @param bool $void_refunds\n\t\t */\n\t\tif ( ! apply_filters( 'wc_avatax_void_order_refunds', true ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t/**\n\t\t * Fire before voiding order refunds.\n\t\t *\n\t\t * @since 1.0.0\n\t\t * @param int $order_id The order ID\n\t\t */\n\t\tdo_action( 'wc_avatax_before_order_refunds_voided', $order_id );\n\n\t\t$refunds = $order->get_refunds();\n\t\t$failed_refunds = array();\n\n\t\tforeach ( $refunds as $refund ) {\n\n\t\t\ttry {\n\n\t\t\t\t$response = wc_avatax()->get_api()->void_refund( $refund );\n\n\t\t\t\t$this->add_status( $refund, 'voided' );\n\n\t\t\t\t$void_data = $response->get_void_data();\n\n\t\t\t\t// Set a couple of reference meta values in case we need them in the future\n\t\t\t\tupdate_post_meta( SV_WC_Order_Compatibility::get_prop( $refund, 'id' ), '_wc_avatax_transaction_id', $void_data['transaction_id'] );\n\t\t\t\tupdate_post_meta( SV_WC_Order_Compatibility::get_prop( $refund, 'id' ), '_wc_avatax_doc_id', $void_data['document_id'] );\n\n\t\t\t\t$order->add_order_note( sprintf( __( 'Refund #%s voided in Avalara', 'woocommerce-avatax' ), SV_WC_Order_Compatibility::get_prop( $refund, 'id' ) ) );\n\n\t\t\t} catch ( SV_WC_API_Exception $e ) {\n\n\t\t\t\tif ( wc_avatax()->logging_enabled() ) {\n\t\t\t\t\twc_avatax()->log( $e->getMessage() );\n\t\t\t\t}\n\n\t\t\t\t$this->add_status( $refund, 'error' );\n\n\t\t\t\t$failed_refunds[] = SV_WC_Order_Compatibility::get_prop( $refund, 'id' );\n\t\t\t}\n\t\t}\n\n\t\t// If something went wrong, leave an order note\n\t\tif ( ! empty( $failed_refunds ) ) {\n\n\t\t\t// Generalize the note if all refunds failed\n\t\t\tif ( count( $refunds ) === count( $failed_refunds ) ) {\n\n\t\t\t\t$error = __( 'Refunds could not be voided. Please void manually from your Avalara Control Panel.', 'woocommerce-avatax' );\n\n\t\t\t// Otherwise, list the refund IDs\n\t\t\t} else {\n\n\t\t\t\t$refund_ids = implode( ', #', $failed_refunds );\n\n\t\t\t\t$error = sprintf( __( 'Some refunds could not be voided. Please void refund %s manually from your Avalara Control Panel.', 'woocommerce-avatax' ),\n\t\t\t\t\t'#' . $refund_ids\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t$order->add_order_note( $this->error_prefix . ' ' . $error );\n\t\t}\n\n\t\t/**\n\t\t * Fire after voiding order refunds.\n\t\t *\n\t\t * @since 1.0.0\n\t\t * @param int $order_id The order ID\n\t\t */\n\t\tdo_action( 'wc_avatax_after_order_refunds_voided', $order_id );\n\t}",
"public function get_summons_details_by_id($id)\n\t{\n\t\t$query = $this->db->get_where('summons_details', array('id' => $id));\n\t\treturn $query;\n\t}",
"public function testCanMakeUpdateRefundMessage()\n {\n $opt = new DocRefundUpdateRefundOptions([\n //Other parameters omitted\n 'ticketNumber' => '17246548165740',\n 'tourCode' => '01JUL86LH11A',\n 'refundedItinerary' => [\n new RefundItinOpt([\n 'company' => 'AF',\n 'origin' => 'NCE',\n 'destination' => 'PAR'\n ])\n ]\n ]);\n\n $msg = new UpdateRefund($opt);\n\n $this->assertEquals('17246548165740', $msg->ticketNumber->documentDetails->number);\n $this->assertNull($msg->ticketNumber->documentDetails->type);\n\n $this->assertEquals('01JUL86LH11A', $msg->tourInformation->tourInformationDetails->tourCode);\n\n $this->assertCount(1, $msg->refundedItinerary);\n $this->assertEquals('AF', $msg->refundedItinerary[0]->airlineCodeRfndItinerary->companyIdentification->operatingCompany);\n $this->assertEquals('NCE', $msg->refundedItinerary[0]->originDestinationRfndItinerary->origin);\n $this->assertEquals('PAR', $msg->refundedItinerary[0]->originDestinationRfndItinerary->destination);\n\n $this->assertEmpty($msg->ticket);\n $this->assertEmpty($msg->interactiveFreeText);\n $this->assertEmpty($msg->fopGroup);\n $this->assertEmpty($msg->taxDetailsInformation);\n $this->assertEmpty($msg->dateTimeInformation);\n $this->assertNull($msg->referenceInformation);\n $this->assertNull($msg->travellerPriorityInfo);\n $this->assertNull($msg->refundedRoute);\n $this->assertNull($msg->travellerInformation);\n $this->assertNull($msg->monetaryInformation);\n $this->assertNull($msg->pricingDetails);\n $this->assertNull($msg->commission);\n $this->assertNull($msg->structuredAddress);\n $this->assertNull($msg->userIdentification);\n $this->assertNull($msg->feeGroup);\n $this->assertNull($msg->firstAndLastSegmentDates);\n $this->assertNull($msg->originAndDestination);\n $this->assertNull($msg->transactionContext);\n\n }",
"public function revoke_referral_on_refund( $order_id = 0 ) {\n\n\t\tif( ! affiliate_wp()->settings->get( 'revoke_on_refund' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$this->reject_referral( $order_id );\n\n\t}",
"public function edit($id)\n {\n $depositRefund = $this->depositRefundRepository->findWithoutFail($id);\n\n if (empty($depositRefund)) {\n Flash::error('Deposit Refund not found');\n\n return redirect(route('depositRefunds.index'));\n }\n\n return view('deposit_refunds.edit')->with('depositRefund', $depositRefund);\n }",
"function get_refund_by_ccode($ccode,$currentdate) {\r\n\tglobal $db;\r\n\t$M_R_query=\"SELECT merchants.currency_code, YEAR(transaction_alipay.trans_datetime) AS year, MONTH(transaction_alipay.trans_datetime) AS month, COUNT(DISTINCT transaction_alipay.id_transaction_id) AS transcount, SUM(transaction_alipay.refund_amount) AS transamount FROM merchants JOIN transaction_alipay ON transaction_alipay.merchant_id = merchants.mer_map_id AND merchants.currency_code= '$ccode' AND transaction_alipay.transaction_type IN ('2','s2') AND transaction_alipay.result_code='SUCCESS' AND MONTH(transaction_alipay.trans_datetime) = MONTH('$currentdate') GROUP BY year, month\";\r\n\t$transactionsDetails = $db->rawQuery($M_R_query);\r\n\treturn $transactionsDetails;\r\n}",
"function referalRefunding($item_id = null)\r\n {\r\n App::import('Model', 'ItemUser');\r\n $this->ItemUser = new ItemUser();\r\n $item_users = $this->ItemUser->find('all', array(\r\n 'conditions' => array(\r\n 'Item.id' => $item_id,\r\n 'Item.item_status_id' => ConstItemStatus::Tipped,\r\n 'ItemUser.referred_by_user_id !=' => '0'\r\n ) ,\r\n 'fields' => array(\r\n 'ItemUser.referred_by_user_id',\r\n 'ItemUser.item_id',\r\n 'ItemUser.user_id',\r\n 'SUM(ItemUser.quantity) as referred_user_total_purchased_quantity',\r\n ) ,\r\n 'group' => array(\r\n 'ItemUser.referred_by_user_id'\r\n ) ,\r\n 'contain' => array(\r\n 'Item' => array(\r\n 'fields' => array(\r\n 'Item.id',\r\n 'Item.price',\r\n )\r\n ) ,\r\n ) ,\r\n 'recursive' => 1\r\n ));\r\n foreach($item_users as $item_user) {\r\n if ($item_user[0]['referred_user_total_purchased_quantity'] >= Configure::read('referral.no_of_refer_to_get_a_refund')) { // If creteria matches for refund\r\n $check_refer = $this->ItemReferrer->find('first', array(\r\n 'conditions' => array(\r\n 'ItemReferrer.user_id' => $item_user['ItemUser']['referred_by_user_id'],\r\n 'ItemReferrer.item_id' => $item_user['ItemUser']['item_id'],\r\n ) ,\r\n 'recursive' => -1\r\n ));\r\n $refer_data = $this->ItemUser->find('first', array(\r\n 'conditions' => array(\r\n 'ItemUser.user_id' => $item_user['ItemUser']['referred_by_user_id'],\r\n 'ItemUser.item_id' => $item_user['ItemUser']['item_id'],\r\n ) ,\r\n 'recursive' => -1\r\n ));\r\n if (empty($check_refer)) { // If empty, refer amount\r\n // Add amount to referral user amount //\r\n if (Configure::read('referral.refund_type') == ConstReferralRefundType::RefundItemAmount) {\r\n $refund_amount = $refer_data['ItemUser']['discount_amount']/$refer_data['ItemUser']['quantity'];\r\n } else {\r\n $refund_amount = Configure::read('referral.refund_amount');\r\n }\r\n $this->User->updateAll(array(\r\n 'User.available_balance_amount' => 'User.available_balance_amount + ' . $refund_amount,\r\n\t\t\t\t\t\t'User.total_referral_earned_amount' => 'User.total_referral_earned_amount + ' . $refund_amount,\r\n ) , array(\r\n 'User.id' => $item_user['ItemUser']['referred_by_user_id']\r\n ));\r\n $this->User->updateAll(array(\r\n 'User.available_balance_amount' => 'User.available_balance_amount + ' . $refund_amount,\r\n\t\t\t\t\t\t'User.total_referral_earned_amount' => 'User.total_referral_earned_amount + ' . $refund_amount,\r\n ) , array(\r\n 'User.id' => $item_user['ItemUser']['user_id']\r\n ));\r\n\t\t\t\t\t$this->User->ItemUser->updateAll(array(\r\n\t\t\t\t\t\t'ItemUser.referral_commission_amount ' => $refund_amount,\r\n\t\t\t\t\t\t'ItemUser.is_referral_commission_sent ' => 1,\r\n\t\t\t\t\t\t'ItemUser.referral_commission_type ' => ConstReferralCommissionType::XRefer\r\n\t\t\t\t\t) , array(\r\n\t\t\t\t\t\t'ItemUser.id' => $item_user['ItemUser']['user_id']\r\n\t\t\t\t\t));\r\n $data = array();\r\n $data['Transaction']['user_id'] = $item_user['ItemUser']['referred_by_user_id'];\r\n $data['Transaction']['foreign_id'] = ConstUserIds::Admin;\r\n $data['Transaction']['class'] = 'SecondUser';\r\n $data['Transaction']['amount'] = $refund_amount;\r\n $data['Transaction']['transaction_type_id'] = ConstTransactionTypes::ReferralAddedToWallet;\r\n $this->User->Transaction->save($data);\r\n // Insert Record into ItemReferrrer //\r\n $referrer = array();\r\n $referrer['ItemReferrer']['user_id'] = $item_user['ItemUser']['referred_by_user_id'];\r\n $referrer['ItemReferrer']['item_id'] = $item_user['Item']['id'];\r\n $referrer['ItemReferrer']['earned_amount'] = $refund_amount;\r\n $referrer['ItemReferrer']['refferral_count'] = Configure::read('referral.no_of_refer_to_get_a_refund');\r\n $this->ItemReferrer->save($referrer);\r\n } else {\r\n $this->ItemReferrer->updateAll(array(\r\n 'ItemReferrer.total_purchased_referral_count' => 'ItemReferrer.total_purchased_referral_count + ' . 1,\r\n ) , array(\r\n 'ItemReferrer.item_id' => $item_user['Item']['id'],\r\n 'ItemReferrer.id' => $check_refer['ItemReferrer']['id']\r\n ));\r\n }\r\n }\r\n }\r\n }",
"public function setRefundStamp($stamp)\n {\n $this->setParameter('refundStamp', self::toString($stamp));\n }",
"abstract public function refund( Payment $payment );",
"public function getRefundAmount()\n {\n return $this->refundAmount;\n }"
] | [
"0.67405534",
"0.6687322",
"0.6669049",
"0.6320114",
"0.6278996",
"0.62699735",
"0.621692",
"0.6108209",
"0.608311",
"0.6026661",
"0.5987161",
"0.58856887",
"0.5877624",
"0.5838832",
"0.5820302",
"0.58139753",
"0.5774107",
"0.5749362",
"0.5712895",
"0.56928724",
"0.5687586",
"0.56572837",
"0.56435",
"0.5625532",
"0.5598291",
"0.55955404",
"0.556911",
"0.5567936",
"0.5556049",
"0.5543355",
"0.55343604",
"0.5520506",
"0.5514673",
"0.5510306",
"0.550821",
"0.54893225",
"0.5460041",
"0.543529",
"0.54270196",
"0.54268104",
"0.5410792",
"0.5406211",
"0.540121",
"0.54007894",
"0.53864753",
"0.53840846",
"0.5329195",
"0.5326948",
"0.53004736",
"0.53004575",
"0.52835023",
"0.5280676",
"0.5280324",
"0.52571183",
"0.5245112",
"0.524264",
"0.5205266",
"0.5197544",
"0.5196369",
"0.51874876",
"0.5178171",
"0.5176752",
"0.51668197",
"0.51457024",
"0.51314014",
"0.5130182",
"0.50969285",
"0.50926757",
"0.5088459",
"0.508469",
"0.5084087",
"0.5071674",
"0.5056886",
"0.5044598",
"0.5035907",
"0.5028385",
"0.5026212",
"0.50180775",
"0.50177914",
"0.50019014",
"0.49939048",
"0.49898478",
"0.4973905",
"0.4973109",
"0.49718195",
"0.4964527",
"0.49616548",
"0.4961124",
"0.49523002",
"0.4948019",
"0.49404553",
"0.4926918",
"0.49164844",
"0.49126866",
"0.49076203",
"0.49048796",
"0.48966855",
"0.48906088",
"0.48853618",
"0.48853418"
] | 0.67472875 | 0 |
Export Data Mata Kuliah ke Excel | public function get()
{
$objPHPExcel = new PHPExcel();
$worksheet = $objPHPExcel->createSheet(0);
for ($cell='A'; $cell <= 'G'; $cell++)
{
$worksheet->getStyle($cell.'1')->getFont()->setBold(true);
}
$worksheet->getStyle('A1:G1')->applyFromArray(
array(
'alignment' => array(
'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER,
),
'borders' => array(
'allborders' => array(
'style' => PHPExcel_Style_Border::BORDER_THIN,
'color' => array('rgb' => '000000')
)
),
'fill' => array(
'type' => PHPExcel_Style_Fill::FILL_SOLID,
'color' => array('rgb' => 'F2F2F2')
)
)
);
// Header dokumen
$worksheet->setCellValue('A1', 'NO.')
->setCellValue('B1', 'Kode MK')
->setCellValue('C1', 'Mata Kuliah')
->setCellValue('D1', 'Mata Kuliah (Asing)')
->setCellValue('E1', 'Jumlah SKS')
->setCellValue('F1', 'Semester')
->setCellValue('G1', 'Konsentrasi');
$this->db->join('concentration', 'course.concentration_id = concentration.concentration_id', 'left');
$row_cell = 2;
foreach($this->db->get('course')->result() as $key => $value)
{
$worksheet->setCellValue('A'.$row_cell, ++$key)
->setCellValue('B'.$row_cell, $value->course_code)
->setCellValue('C'.$row_cell, $value->course_name)
->setCellValue('D'.$row_cell, $value->course_name_english)
->setCellValue('E'.$row_cell, $value->sks)
->setCellValue('F'.$row_cell, ucfirst($value->semester))
->setCellValue('G'.$row_cell, $value->concentration_name);
$row_cell++;
}
// Sheet Title
$worksheet->setTitle("DATA MATA KULIAH");
$objPHPExcel->setActiveSheetIndex(0);
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\
header('Content-Disposition: attachment; filename="DATA-MATA-KULIAH.xlsx"');
$objWriter->save("php://output");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function exportToExcel(){\n\t\theader('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'); \n\t\theader(\"Content-Disposition: attachment; filename = DataNilaiMataKuliah.xls\"); \n\t\t$data['data_nilai'] = $this->Database_Nilai->ambil_data(); \n\t\t$this->load->view('export', $data);\n\t}",
"public function export_data_anggota_keluarga()\n {\n $spreadsheet = new Spreadsheet();\n $currentData = $this->AnggotaKeluargaModel->findAll();\n // tulis header/nama kolom \n $spreadsheet->setActiveSheetIndex(0)\n ->setCellValue('A1', 'No. KK')\n ->setCellValue('B1', 'No. KTP')\n ->setCellValue('C1', 'Nama')\n ->setCellValue('D1', 'Tempat Lahir')\n ->setCellValue('E1', 'Tanggal Lahir')\n ->setCellValue('F1', 'Jenis Kelamin')\n ->setCellValue('G1', 'Status Perkawinan')\n ->setCellValue('H1', 'Pendidikan')\n ->setCellValue('I1', 'Pekerjaan')\n ->setCellValue('J1', 'Catatan');\n\n $column = 2;\n // tulis data mobil ke cell\n foreach ($currentData as $data) {\n $spreadsheet->setActiveSheetIndex(0)\n ->setCellValue('A' . $column, $data['noKK'])\n ->setCellValue('B' . $column, $data['noKTP'])\n ->setCellValue('C' . $column, $data['nama'])\n ->setCellValue('D' . $column, $data['tempatLahir'])\n ->setCellValue('E' . $column, $data['tanggalLahir'])\n ->setCellValue('F' . $column, $data['jenisKelamin'])\n ->setCellValue('G' . $column, $data['statusPerkawinan'])\n ->setCellValue('H' . $column, $data['pendidikan'])\n ->setCellValue('I' . $column, $data['pekerjaan'])\n ->setCellValue('J' . $column, $data['catatan']);\n $column++;\n }\n // tulis dalam format .xlsx\n $writer = new Xlsx($spreadsheet);\n $fileName = 'Data Anggota Keluarga';\n\n // Redirect hasil generate xlsx ke web client\n header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\n header('Content-Disposition: attachment;filename=' . $fileName . '.xlsx');\n header('Cache-Control: max-age=0');\n\n $writer->save('php://output');\n }",
"function export(){\n\n $this->load->model(\"MBenang\");\n\n $this->load->library(\"excel\");\n\n $object = new PHPExcel();\n\n $object->setActiveSheetIndex(0);\n\n // Nama Field Baris Pertama\n $table_columns = $this->MBenang->getColoumnName();\n\n $column = 0;\n\n $object->getActiveSheet()->setCellValueByColumnAndRow($column, 1, 'Data Master Benang');\n\n $object->getActiveSheet()->setTitle('Data Master Benang');\n\n foreach($table_columns as $field){\n\n\n $object->getActiveSheet()->setCellValueByColumnAndRow($column, 2, $field);\n\n $object->getActiveSheet()->getColumnDimension()->setAutoSize(true);\n\n $object->getSheet(0)->getStyle('A3:C3')->getBorders()->getAllBorders()->getColor()->setRGB('949FA8');\n\n $column++;\n\n }\n\n $benang_data = $this->MBenang->fetch_data();\n\n $excel_row = 3;\n\n foreach($benang_data as $row){\n\n $object->getActiveSheet()->setCellValueByColumnAndRow(0, $excel_row, $row->kd_jenis);\n\n $object->getActiveSheet()->setCellValueByColumnAndRow(1, $excel_row, $row->jenis_benang);\n\n $excel_row++;\n\n }\n\n $object_writer = PHPExcel_IOFactory::createWriter($object, 'Excel2007');\n\n header('Content-Type: application/vnd.ms-excel');\n\n header('Content-Disposition: attachment;filename=\"Data-master-benang.xls\"');\n\n $object_writer->save('php://output');\n\n }",
"public function exportExcel() \n {\n $st = ST::select(\n 'no_st',\n 'tanggal_st',\n 'tujuan_st',\n 'tipe', \n 'bidang',\n 'uraian',\n \n 'tanggal_mulai',\n 'tanggal_selesai',\n 'hp',\n 'no_laporan',\n 'tanggal_laporan',\n\n 'penanggung_jawab_id',\n 'pengendali_mutu_id',\n 'pengendali_teknis_id',\n 'ketua_tim_id', \n \n 'lokasi', \n 'biaya',\n 'km_id',\n 'costsheet_id'\n \n )->get();\n\n \n\n return Excel::create('data_tugas', function($excel) use ($st){\n $excel->sheet('st_bpkp', function($sheet) use ($st) {\n $sheet->fromArray($st);\n });\n })->download('xls');\n\n }",
"public function export(){\n \n // Skrip berikut ini adalah skrip yang bertugas untuk meng-export data tadi ke excel\n header(\"Content-type: application/vnd-ms-excel\");\n header(\"Content-Disposition: attachment; filename=Data_Transaksi.xls\");\n \n $data['header_transaksi'] = $this->header_transaksi_model->listing();\n $this->load->view('admin/export/vw_laporan_excel', $data);\n\n }",
"public function exportExcel()\n {\n /** Fuente de Datos Eloquent */\n $data = User::all();\n\n /** Creamos nuestro archivo Excel */\n Excel::create('usuarios', function ($excel) use ($data) {\n\n /** Creamos una hoja */\n $excel->sheet('Hoja Uno', function ($sheet) use ($data) {\n /**\n * Insertamos los datos en la hoja con el método with/fromArray\n * Parametros: (\n * Datos,\n * Valores del encabezado de la columna,\n * Celda de Inicio,\n * Comparación estricta de los valores del encabezado\n * Impresión de los encabezados\n * )*/\n $sheet->with($data, null, 'A1', false, false);\n });\n\n /** Descargamos nuestro archivo pasandole la extensión deseada (xls, xlsx) */\n })->download('xlsx');///** Descarga del documento en csv ->download('csv');\n }",
"function export_nik_unins_lunas()\n\t{\n\t\t$excel_id=$this->uri->segment(3);\n\t\t$datas = $this->model_transaction->get_lunas_gagal($excel_id);\n\t\t\n\t\t// Create new PHPExcel object\n\t\t$objPHPExcel = $this->phpexcel;\n\t\t// Set document properties\n\t\t$objPHPExcel->getProperties()->setCreator(\"MICROFINANCE\")\n\t\t\t\t\t\t\t\t\t ->setLastModifiedBy(\"MICROFINANCE\")\n\t\t\t\t\t\t\t\t\t ->setTitle(\"Office 2007 XLSX Test Document\")\n\t\t\t\t\t\t\t\t\t ->setSubject(\"Office 2007 XLSX Test Document\")\n\t\t\t\t\t\t\t\t\t ->setDescription(\"REPORT, generated using PHP classes.\")\n\t\t\t\t\t\t\t\t\t ->setKeywords(\"REPORT\")\n\t\t\t\t\t\t\t\t\t ->setCategory(\"Test result file\");\n\t\t\t\t\t\t\t\t\t \n\t\t$objPHPExcel->setActiveSheetIndex(0); \n\t\t\n\t\t/*\n\t\t| BORDER OPTION\n\t\t*/\n\t\t$styleArray['borders']['outline']['style']=PHPExcel_Style_Border::BORDER_THIN;\n\t\t$styleArray['borders']['outline']['color']['rgb']='000000';\n\t\t/*\n\t\t| SET COLUMN WIDTH\n\t\t*/\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('A')->setWidth(15);\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('B')->setWidth(30);\n\n\t\t/*\n\t\t| ROW HEADER TITLE\n\t\t*/\n\t\t$row=1;\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('A'.$row,\"List Pelunasan Tidak Sesuai\");\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row)->getFont()->setBold(true);\n\t\t\n\t\t$row+=1;\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('A'.$row,\"NIK\");\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('B'.$row,\"Nama\");\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row.':B'.$row)->getFont()->setBold(true);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row.':A'.$row)->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('B'.$row.':B'.$row)->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row.':B'.$row)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n\t\t$row+=1;\n\t\t/*\n\t\t| ROW DATA\n\t\t*/\n\t\tfor($i=0;$i<count($datas);$i++){\n\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('A'.$row,$datas[$i]['nik']);\n\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('B'.$row,$datas[$i]['nama']);\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row.':B'.$row)->getFont()->setSize(11);\n\t\t\t$row++;\n\t\t}\n\n\t\theader('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\n\t\theader('Content-Disposition: attachment;filename=\"PELUNASAN TIDAK SESUAI.xlsx\"');\n\t\theader('Cache-Control: max-age=0');\n\n\t\t$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');\n\t\t$objWriter->save('php://output');\n\t}",
"public function export_excel()\n\t{\n\t$data = array(\n array ('Name', 'Surname'),\n array('Schwarz', 'Oliver'),\n array('Test', 'Peter')\n );\n\t\t\n\t\t//$data = $this->db->get('test')->result_array();\n\t\t$this->load->library('Excel-Generation/excel_xml');\n\t\t$this->excel_xml->addArray($data);\n\t\t$this->excel_xml->generateXML('my-test');\n\t}",
"public function export() \n \t\t{\n \t\t$data = $this->model_patient->export();\n \t\t#load PHPExcel library\n \t\t$this->excel->setActiveSheetIndex(0);\n \t\t#name the worksheet\n \t\t$this->excel->getActiveSheet()->setTitle('Data Pasien SN Health Center');\n \n \t\t#STYLING\n \t\t$styleArray = array('borders' => array('allborders' => array('style' => PHPExcel_Style_Border::BORDER_THIN,'color' => array('argb' => '0000'))));\n \n \t\t#set report header\n \t\t$this->excel->getActiveSheet()->getStyle('A:K')->getFont()->setName('Times New Roman');\n \t\t$this->excel->getActiveSheet()->mergeCells('A1:K1');\n \t\t$this->excel->getActiveSheet()->setCellValue('A1', 'DAFTAR PASIEN APLIKASI SN HEALTH CENTER');\n \t\t$this->excel->getActiveSheet()->getStyle('A1')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t$this->excel->getActiveSheet()->getStyle('A1')->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n \t\t$this->excel->getActiveSheet()->getStyle('A1')->getFont()->setBold(true);\n \t\t$this->excel->getActiveSheet()->getStyle('A1')->getFont()->setSize(12);\n \n \n \t\t//set column name\n \t\t$this->excel->getActiveSheet()->setCellValue('A2', 'No');\n \t\t$this->excel->getActiveSheet()->setCellValue('B2', 'Nomor Registrasi');\n \t\t$this->excel->getActiveSheet()->setCellValue('C2', 'Nomor KTP');\n \t\t$this->excel->getActiveSheet()->setCellValue('D2', 'Nama');\n \t\t$this->excel->getActiveSheet()->setCellValue('E2', 'Jenis Kelamin');\n \t\t$this->excel->getActiveSheet()->setCellValue('F2', 'Tanggal Lahir');\n \t\t$this->excel->getActiveSheet()->setCellValue('G2', 'Agama');\n \t\t$this->excel->getActiveSheet()->setCellValue('H2', 'Pekerjaan');\n \t\t$this->excel->getActiveSheet()->setCellValue('I2', 'Nomor HP');\n \t\t$this->excel->getActiveSheet()->setCellValue('J2', 'Alamat');\n \t\t$this->excel->getActiveSheet()->setCellValue('K2', 'Tanggal & Waktu Registrasi');\n \n\t\t\t $this->excel->getActiveSheet()->getStyle('A2:K2')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('A')->setWidth(4);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('B')->setWidth(30);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('C')->setWidth(25);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('D')->setWidth(30);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('E')->setWidth(15);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('F')->setWidth(15);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('G')->setWidth(15);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('H')->setWidth(15);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('I')->setWidth(15);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('J')->setWidth(40);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('K')->setWidth(25);\n \n \t\t$no = 3;\n \t\t$nomor = 1;\n \t\tforeach ($data as $v) \n \t\t{\n \t\t\t\n \t\t\t$this->excel->getActiveSheet()->getStyle('A' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('A' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('A' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->setCellValue('A' . $no, $nomor);\n\n \t\t\t$this->excel->getActiveSheet()->getStyle('B' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('B' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('B' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->setCellValue('B' . $no, $v->patient_noregis);\n\n \t\t\t$this->excel->getActiveSheet()->getStyle('C' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('C' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('C' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->setCellValue('C' . $no, strval($v->patient_noktp));\n\n \t\t\t$this->excel->getActiveSheet()->getStyle('D' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('D' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('D' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n\t\t\t\t$this->excel->getActiveSheet()->setCellValue('D' . $no, $v->patient_name);\n\t\t\t\t \n \t\t\t$this->excel->getActiveSheet()->getStyle('E' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('E' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('E' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n\t\t\t\t$this->excel->getActiveSheet()->setCellValue('E' . $no, $v->patient_sex);\n\t\t\t\t \n \t\t\t$this->excel->getActiveSheet()->getStyle('F' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('F' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('F' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n\t\t\t\t$this->excel->getActiveSheet()->setCellValue('F' . $no, $v->patient_datebirth);\n\n \t\t\t$this->excel->getActiveSheet()->getStyle('G' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('G' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('G' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n\t\t\t\t$this->excel->getActiveSheet()->setCellValue('G' . $no, $v->patient_religion);\n\t\t\t\t \n \t\t\t$this->excel->getActiveSheet()->getStyle('H' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('H' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('H' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n\t\t\t\t$this->excel->getActiveSheet()->setCellValue('H' . $no, $v->patient_job);\n\t\t\t\t \n \t\t\t$this->excel->getActiveSheet()->getStyle('I' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('I' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('I' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n\t\t\t\t$this->excel->getActiveSheet()->setCellValue('I' . $no, $v->patient_phone);\n\t\t\t\t \n\t\t\t\t$this->excel->getActiveSheet()->getStyle('J' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('J' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('J' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n\t\t\t\t\t\t$this->excel->getActiveSheet()->setCellValue('J' . $no, $v->patient_address);\n\t\t\t\t\t\t\n\t\t\t\t$this->excel->getActiveSheet()->getStyle('K' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('K' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('K' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->setCellValue('K' . $no, $v->patient_registerdate);\n\t\t\t\t\n\t\t\t\t$no++;\n \t\t\t$nomor++;\n \t\t}\n \n \t\t$this->excel->getActiveSheet()->getStyle('A2:K' . ($no - 1))->applyFromArray($styleArray);\n \t\tob_end_clean();\n \t\t$filename = 'Daftar Pasien Aplikasi SN Health Center.xls'; //save our workbook as this file name\n \t\theader('Content-Type: application/vnd.ms-excel'); //mime type\n \t\theader('Content-Disposition: attachment;filename=\"' . $filename . '\"'); //tell browser what's the file name\n \t\theader('Cache-Control: max-age=0'); //no cache\n \t\t$objWriter = PHPExcel_IOFactory::createWriter($this->excel, 'Excel5');\n \t\t$objWriter->save('php://output');\n \n \t\tredirect('admin/patient');\n \t\t}",
"public function export(){\n include APPPATH.'third_party/PHPExcel/Classes/PHPExcel.php';\n \n // Panggil class PHPExcel nya\n $excel = new PHPExcel();\n\n // Settingan awal fil excel\n $excel->getProperties()->setCreator('My Notes Code')\n ->setLastModifiedBy('My Notes Code')\n ->setTitle(\"Data Buku\")\n ->setSubject(\"tb_buku\")\n ->setDescription(\"Laporan Semua Data Buku\")\n ->setKeywords(\"Data Buku\");\n\n // Buat sebuah variabel untuk menampung pengaturan style dari header tabel\n $style_col = array(\n 'font' => array('bold' => true), // Set font nya jadi bold\n 'alignment' => array(\n 'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER, // Set text jadi ditengah secara horizontal (center)\n 'vertical' => PHPExcel_Style_Alignment::VERTICAL_CENTER // Set text jadi di tengah secara vertical (middle)\n ),\n 'borders' => array(\n 'top' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border top dengan garis tipis\n 'right' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border right dengan garis tipis\n 'bottom' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border bottom dengan garis tipis\n 'left' => array('style' => PHPExcel_Style_Border::BORDER_THIN) // Set border left dengan garis tipis\n )\n );\n\n // Buat sebuah variabel untuk menampung pengaturan style dari isi tabel\n $style_row = array(\n 'alignment' => array(\n 'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER, // Set text jadi ditengah secara horizontal (center)\n 'vertical' => PHPExcel_Style_Alignment::VERTICAL_CENTER // Set text jadi di tengah secara vertical (middle)\n ),\n 'borders' => array(\n 'top' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border top dengan garis tipis\n 'right' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border right dengan garis tipis\n 'bottom' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border bottom dengan garis tipis\n 'left' => array('style' => PHPExcel_Style_Border::BORDER_THIN) // Set border left dengan garis tipis\n )\n );\n\n $excel->setActiveSheetIndex(0)->setCellValue('A1', \"RELASI INTI MEDIA ( FAMILIA, ISTANA MEDIA, QUDSI MEDIA DAN FORUM )\"); // Set kolom A1 dengan tulisan \"DATA SISWA\"\n $excel->setActiveSheetIndex(0)->setCellValue('A2', \"Jl. Permadi Nyutran RT/RW. 61/19 MJ II No. 1606 C, Wirogunan, Mergangsan, Yogyakarta 55151\"); // Set kolom A1 dengan tulisan \"DATA SISWA\"\n $excel->setActiveSheetIndex(0)->setCellValue('A3', \"Email: [email protected] Telp: (0274) 2870300\"); // Set kolom A1 dengan tulisan \"DATA SISWA\"\n $excel->setActiveSheetIndex(0)->setCellValue('A5', \"DATA BUKU\");\n $excel->getActiveSheet()->mergeCells('A1:N1'); // Set Merge Cell pada kolom A1 sampai E1\n $excel->getActiveSheet()->mergeCells('A2:N2'); // Set Merge Cell pada kolom A1 sampai E1\n $excel->getActiveSheet()->mergeCells('A3:N3'); // Set Merge Cell pada kolom A1 sampai E1\n $excel->getActiveSheet()->mergeCells('A5:N5'); // Set Merge Cell pada kolom A1 sampai E1\n $excel->getActiveSheet()->getStyle('A1')->getFont()->setBold(TRUE); // Set bold kolom A1\n $excel->getActiveSheet()->getStyle('A5')->getFont()->setBold(TRUE); // Set bold kolom A1\n $excel->getActiveSheet()->getStyle('A1')->getFont()->setSize(15); // Set font size 15 untuk kolom A1\n $excel->getActiveSheet()->getStyle('A5')->getFont()->setSize(15);\n $excel->getActiveSheet()->getStyle('A1')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $excel->getActiveSheet()->getStyle('A2')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $excel->getActiveSheet()->getStyle('A3')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $excel->getActiveSheet()->getStyle('A5')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER); // Set text center untuk kolom A1\n\n // Buat header tabel nya pada baris ke 3\n $excel->setActiveSheetIndex(0)->setCellValue('A7', \"NO\"); // Set kolom A3 dengan tulisan \"NO\"\n $excel->setActiveSheetIndex(0)->setCellValue('B7', \"KODE BUKU\"); // Set kolom A3 dengan tulisan \"NO\"\n $excel->setActiveSheetIndex(0)->setCellValue('C7', \"JUDUL\"); // Set kolom B3 dengan tulisan \"NIS\"\n $excel->setActiveSheetIndex(0)->setCellValue('D7', \"KATEGORI\"); // Set kolom C3 dengan tulisan \"NAMA\"\n $excel->setActiveSheetIndex(0)->setCellValue('E7', \"PENULIS\"); // Set kolom D3 dengan tulisan \"JENIS KELAMIN\"\n $excel->setActiveSheetIndex(0)->setCellValue('F7', \"PENERBIT\");\n $excel->setActiveSheetIndex(0)->setCellValue('G7', \"UKURAN\");\n $excel->setActiveSheetIndex(0)->setCellValue('H7', \"JUMLAH HALAMAN\");\n $excel->setActiveSheetIndex(0)->setCellValue('I7', \"ISBN\");\n $excel->setActiveSheetIndex(0)->setCellValue('J7', \"TAHUN TERBIT\");\n $excel->setActiveSheetIndex(0)->setCellValue('K7', \"HARGA (Rp)\");\n $excel->setActiveSheetIndex(0)->setCellValue('L7', \"STOK\");\n $excel->setActiveSheetIndex(0)->setCellValue('M7', \"KETERANGAN\");\n $excel->setActiveSheetIndex(0)->setCellValue('N7', \"STATUS\");\n\n // Apply style header yang telah kita buat tadi ke masing-masing kolom header\n $excel->getActiveSheet()->getStyle('A7')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('B7')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('C7')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('D7')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('E7')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('F7')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('G7')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('H7')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('I7')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('J7')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('K7')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('L7')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('M7')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('N7')->applyFromArray($style_col);\n\n\n // Panggil function view yang ada di SiswaModel untuk menampilkan semua data siswanya\n $buku = $this->buku_model->showAllBuku();\n\n $no = 1; // Untuk penomoran tabel, di awal set dengan 1\n $numrow = 8; // Set baris pertama untuk isi tabel adalah baris ke 4\n foreach($buku as $data){ // Lakukan looping pada variabel siswa\n $excel->setActiveSheetIndex(0)->setCellValue('A'.$numrow, $no);\n $excel->setActiveSheetIndex(0)->setCellValue('B'.$numrow, $data->kd_buku);\n $excel->setActiveSheetIndex(0)->setCellValue('C'.$numrow, $data->judul);\n $excel->setActiveSheetIndex(0)->setCellValue('D'.$numrow, $data->nama_kategori);\n $excel->setActiveSheetIndex(0)->setCellValue('E'.$numrow, $data->nama_penulis);\n $excel->setActiveSheetIndex(0)->setCellValue('F'.$numrow, $data->nama_penerbit);\n $excel->setActiveSheetIndex(0)->setCellValue('G'.$numrow, $data->ukuran);\n $excel->setActiveSheetIndex(0)->setCellValue('H'.$numrow, $data->jml_halaman);\n $excel->setActiveSheetIndex(0)->setCellValue('I'.$numrow, $data->isbn);\n $excel->setActiveSheetIndex(0)->setCellValue('J'.$numrow, $data->thn_terbit);\n $excel->setActiveSheetIndex(0)->setCellValue('K'.$numrow, $data->harga);\n $excel->setActiveSheetIndex(0)->setCellValue('L'.$numrow, $data->stok);\n $excel->setActiveSheetIndex(0)->setCellValue('M'.$numrow, $data->keterangan);\n $excel->setActiveSheetIndex(0)->setCellValue('N'.$numrow, $data->status);\n \n // Apply style row yang telah kita buat tadi ke masing-masing baris (isi tabel)\n $excel->getActiveSheet()->getStyle('A'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('B'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('C'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('D'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('E'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('F'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('G'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('H'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('I'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('J'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('K'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('L'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('M'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('N'.$numrow)->applyFromArray($style_row);\n \n $no++; // Tambah 1 setiap kali looping\n $numrow++; // Tambah 1 setiap kali looping\n }\n\n // Set width kolom\n $excel->getActiveSheet()->getColumnDimension('A')->setWidth(5); // Set width kolom A\n $excel->getActiveSheet()->getColumnDimension('B')->setWidth(13); // Set width kolom B\n $excel->getActiveSheet()->getColumnDimension('C')->setWidth(60); // Set width kolom C\n $excel->getActiveSheet()->getColumnDimension('D')->setWidth(25); // Set width kolom D\n $excel->getActiveSheet()->getColumnDimension('E')->setWidth(40); // Set width kolom E\n $excel->getActiveSheet()->getColumnDimension('F')->setWidth(15); // Set width kolom E\n $excel->getActiveSheet()->getColumnDimension('G')->setWidth(13); // Set width kolom E\n $excel->getActiveSheet()->getColumnDimension('H')->setWidth(20); // Set width kolom E\n $excel->getActiveSheet()->getColumnDimension('I')->setWidth(20); // Set width kolom E\n $excel->getActiveSheet()->getColumnDimension('J')->setWidth(15); // Set width kolom E\n $excel->getActiveSheet()->getColumnDimension('K')->setWidth(18); // Set width kolom E\n $excel->getActiveSheet()->getColumnDimension('L')->setWidth(10); // Set width kolom E\n $excel->getActiveSheet()->getColumnDimension('M')->setWidth(40); // Set width kolom E\n $excel->getActiveSheet()->getColumnDimension('N')->setWidth(15); // Set width kolom E\n \n // Set height semua kolom menjadi auto (mengikuti height isi dari kolommnya, jadi otomatis)\n $excel->getActiveSheet()->getDefaultRowDimension()->setRowHeight(-1);\n\n // Set orientasi kertas jadi LANDSCAPE\n $excel->getActiveSheet()->getPageSetup()->setOrientation(PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE);\n\n // Set judul file excel nya\n $excel->getActiveSheet(0)->setTitle(\"Laporan Data Buku\");\n $excel->setActiveSheetIndex(0);\n\n // Proses file excel\n header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\n header('Content-Disposition: attachment; filename=\"Data Buku.xlsx\"'); // Set nama file excel nya\n header('Cache-Control: max-age=0');\n\n $write = PHPExcel_IOFactory::createWriter($excel, 'Excel2007');\n $write->save('php://output');\n }",
"public function export_excel(){\n // Load plugin PHPExcel nya\n include APPPATH.'third_party/PHPExcel/PHPExcel.php';\n \n // Panggil class PHPExcel nya\n $excel = new PHPExcel();\n // Settingan awal fil excel\n $excel->getProperties()->setCreator('SIMITA')\n ->setLastModifiedBy('SIMITA')\n ->setTitle(\"Data Koneksi Internet\")\n ->setSubject(\"Koneksi Internet\")\n ->setDescription(\"Laporan Data Koneksi Internet\")\n ->setKeywords(\"Laporan\");\n // Buat sebuah variabel untuk menampung pengaturan style dari header tabel\n $style_col = array(\n 'font' => array('bold' => true), // Set font nya jadi bold\n 'alignment' => array(\n 'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER, // Set text jadi ditengah secara horizontal (center)\n 'vertical' => PHPExcel_Style_Alignment::VERTICAL_CENTER // Set text jadi di tengah secara vertical (middle)\n ),\n 'borders' => array(\n 'top' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border top dengan garis tipis\n 'right' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border right dengan garis tipis\n 'bottom' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border bottom dengan garis tipis\n 'left' => array('style' => PHPExcel_Style_Border::BORDER_THIN) // Set border left dengan garis tipis\n )\n );\n // Buat sebuah variabel untuk menampung pengaturan style dari isi tabel\n $style_row = array(\n 'alignment' => array(\n 'vertical' => PHPExcel_Style_Alignment::VERTICAL_CENTER // Set text jadi di tengah secara vertical (middle)\n ),\n 'borders' => array(\n 'top' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border top dengan garis tipis\n 'right' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border right dengan garis tipis\n 'bottom' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border bottom dengan garis tipis\n 'left' => array('style' => PHPExcel_Style_Border::BORDER_THIN) // Set border left dengan garis tipis\n )\n );\n $excel->setActiveSheetIndex(0)->setCellValue('A1', \"LAPORAN DATA INVENTORY INTERNET CABANG\"); // Set kolom A1 dengan tulisan \"DATA SISWA\"\n $excel->getActiveSheet()->mergeCells('A1:G1'); // Set Merge Cell pada kolom A1 sampai E1\n $excel->getActiveSheet()->getStyle('A1')->getFont()->setBold(TRUE); // Set bold kolom A1\n $excel->getActiveSheet()->getStyle('A1')->getFont()->setSize(15); // Set font size 15 untuk kolom A1\n $excel->getActiveSheet()->getStyle('A1')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER); // Set text center untuk kolom A1\n // Buat header tabel nya pada baris ke 3\n $excel->setActiveSheetIndex(0)->setCellValue('A3', \"NO\"); // Set kolom A3 \n $excel->setActiveSheetIndex(0)->setCellValue('B3', \"CABANG\"); // Set kolom B3 \n $excel->setActiveSheetIndex(0)->setCellValue('C3', \"PROVIDER\"); // Set kolom C3 \n $excel->setActiveSheetIndex(0)->setCellValue('D3', \"NO.PELANGGAN\"); // Set kolom D3 \n $excel->setActiveSheetIndex(0)->setCellValue('E3', \"IP PUBLIC\"); // Set kolom E3 \n $excel->setActiveSheetIndex(0)->setCellValue('F3', \"Tgl. Kontrak\");\n $excel->setActiveSheetIndex(0)->setCellValue('G3', \"Tgl. Habis Kontrak\");\n // Apply style header yang telah kita buat tadi ke masing-masing kolom header\n $excel->getActiveSheet()->getStyle('A3')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('B3')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('C3')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('D3')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('E3')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('F3')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('G3')->applyFromArray($style_col);\n $internet = $this->m_internet->semua()->result();\n $no = 1; // Untuk penomoran tabel, di awal set dengan 1\n $numrow = 4; // Set baris pertama untuk isi tabel adalah baris ke 4\n foreach($internet as $data){ // Lakukan looping pada variabel\n $excel->setActiveSheetIndex(0)->setCellValue('A'.$numrow, $no);\n $excel->setActiveSheetIndex(0)->setCellValue('B'.$numrow, $data->nama_cabang);\n $excel->setActiveSheetIndex(0)->setCellValue('C'.$numrow, $data->nama_provider);\n $excel->setActiveSheetIndex(0)->setCellValue('D'.$numrow, $data->nomor_pelanggan);\n $excel->setActiveSheetIndex(0)->setCellValue('E'.$numrow, $data->ip_public);\n $excel->setActiveSheetIndex(0)->setCellValue('F'.$numrow, $data->tanggal_kontrak);\n $excel->setActiveSheetIndex(0)->setCellValue('G'.$numrow, $data->masa_kontrak);\n \n // Apply style row yang telah kita buat tadi ke masing-masing baris (isi tabel)\n $excel->getActiveSheet()->getStyle('A'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('B'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('C'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('D'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('E'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('F'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('G'.$numrow)->applyFromArray($style_row);\n \n $no++; // Tambah 1 setiap kali looping\n $numrow++; // Tambah 1 setiap kali looping\n }\n // Set width kolom\n $excel->getActiveSheet()->getColumnDimension('A')->setWidth(5); // Set width kolom A\n $excel->getActiveSheet()->getColumnDimension('B')->setWidth(30); // Set width kolom B\n $excel->getActiveSheet()->getColumnDimension('C')->setWidth(25); // Set width kolom C\n $excel->getActiveSheet()->getColumnDimension('D')->setWidth(20); // Set width kolom D\n $excel->getActiveSheet()->getColumnDimension('E')->setWidth(25); // Set width kolom E\n $excel->getActiveSheet()->getColumnDimension('F')->setWidth(25);\n $excel->getActiveSheet()->getColumnDimension('G')->setWidth(25);\n \n // Set height semua kolom menjadi auto (mengikuti height isi dari kolommnya, jadi otomatis)\n $excel->getActiveSheet()->getDefaultRowDimension()->setRowHeight(-1);\n // Set orientasi kertas jadi LANDSCAPE\n $excel->getActiveSheet()->getPageSetup()->setOrientation(PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE);\n // Set judul file excel nya\n $excel->getActiveSheet(0)->setTitle(\"Laporan Data Siswa\");\n $excel->setActiveSheetIndex(0);\n // Proses file excel\n header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\n header('Content-Disposition: attachment; filename=\"Laporan Koneksi Internet.xlsx\"'); // Set nama file excel nya\n header('Cache-Control: max-age=0');\n $write = PHPExcel_IOFactory::createWriter($excel, 'Excel2007');\n $write->save('php://output');\n }",
"public function export()\n\t{\n\t\tinclude APPPATH . 'third_party/PHPExcel/PHPExcel.php';\n\n\t\t// Panggil class PHPExcel nya\n\t\t$excel = new PHPExcel();\n\n\t\t// Settingan awal fil excel\n\t\t$excel->getProperties()->setCreator('PT Pelindo')\n\t\t\t->setLastModifiedBy('PT Pelindo')\n\t\t\t->setTitle(\"Rekap Rapor Akhlak\")\n\t\t\t->setSubject(\"Rekap Rapor Akhlak\")\n\t\t\t->setDescription(\"Rekap Rapor Akhlak\")\n\t\t\t->setKeywords(\"Rekap Rapor Akhlak\");\n\n\t\t// Buat sebuah variabel untuk menampung pengaturan style dari header tabel\n\t\t$style_col = array(\n\t\t\t'font' => array('bold' => true), // Set font nya jadi bold\n\t\t\t'alignment' => array(\n\t\t\t\t'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER, // Set text jadi ditengah secara horizontal (center)\n\t\t\t\t'vertical' => PHPExcel_Style_Alignment::VERTICAL_CENTER // Set text jadi di tengah secara vertical (middle)\n\t\t\t),\n\t\t\t'borders' => array(\n\t\t\t\t'top' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border top dengan garis tipis\n\t\t\t\t'right' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border right dengan garis tipis\n\t\t\t\t'bottom' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border bottom dengan garis tipis\n\t\t\t\t'left' => array('style' => PHPExcel_Style_Border::BORDER_THIN) // Set border left dengan garis tipis\n\t\t\t)\n\t\t);\n\n\t\t// Buat sebuah variabel untuk menampung pengaturan style dari isi tabel\n\t\t$style_row = array(\n\t\t\t'alignment' => array(\n\t\t\t\t'vertical' => PHPExcel_Style_Alignment::VERTICAL_CENTER // Set text jadi di tengah secara vertical (middle)\n\t\t\t),\n\t\t\t'borders' => array(\n\t\t\t\t'top' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border top dengan garis tipis\n\t\t\t\t'right' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border right dengan garis tipis\n\t\t\t\t'bottom' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border bottom dengan garis tipis\n\t\t\t\t'left' => array('style' => PHPExcel_Style_Border::BORDER_THIN) // Set border left dengan garis tipis\n\t\t\t)\n\t\t);\n\n\t\t$excel->setActiveSheetIndex(0)->setCellValue('A1', \"Rekap Rapor Akhlak\"); // Set kolom A1 dengan tulisan \"Rekap Rapor Akhlak\"\n\t\t$excel->getActiveSheet()->mergeCells('A1:J1'); // Set Merge Cell pada kolom A1 sampai E1\n\t\t$excel->getActiveSheet()->getStyle('A1')->getFont()->setBold(TRUE); // Set bold kolom A1\n\t\t$excel->getActiveSheet()->getStyle('A1')->getFont()->setSize(15); // Set font size 15 untuk kolom A1\n\t\t$excel->getActiveSheet()->getStyle('A1')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER); // Set text center untuk kolom A1\n\n\t\t// Buat header tabel nya pada baris ke 3\n\t\t$excel->setActiveSheetIndex(0)->setCellValue('A3', \"NO\"); // Set kolom A3 dengan tulisan \"NO\"\n\t\t$excel->setActiveSheetIndex(0)->setCellValue('B3', \"NAMA CABANG\"); // Set kolom B3 dengan tulisan \"NIS\"\n\t\t$excel->setActiveSheetIndex(0)->setCellValue('C3', \"NILAI AMANAH\"); // Set kolom C3 dengan tulisan \"NAMA\"\n\t\t$excel->setActiveSheetIndex(0)->setCellValue('D3', \"NILAI KOMPETEN\"); // Set kolom D3 dengan tulisan \"JENIS KELAMIN\"\n\t\t$excel->setActiveSheetIndex(0)->setCellValue('E3', \"NILAI HARMONIS\"); // Set kolom E3 dengan tulisan \"ALAMAT\"\n\t\t$excel->setActiveSheetIndex(0)->setCellValue('F3', \"NILAI LOYAL\"); // Set kolom E3 dengan tulisan \"ALAMAT\"\n\t\t$excel->setActiveSheetIndex(0)->setCellValue('G3', \"NILAI ADAPTIF\"); // Set kolom E3 dengan tulisan \"ALAMAT\"\n\t\t$excel->setActiveSheetIndex(0)->setCellValue('H3', \"NILAI KOLABORATIF\"); // Set kolom E3 dengan tulisan \"ALAMAT\"\n\t\t$excel->setActiveSheetIndex(0)->setCellValue('I3', \"NILAI TOTAL\"); // Set kolom E3 dengan tulisan \"ALAMAT\"\n\t\t$excel->setActiveSheetIndex(0)->setCellValue('J3', \"TANGGAL UPLOAD\"); // Set kolom E3 dengan tulisan \"ALAMAT\"\n\n\t\t// Apply style header yang telah kita buat tadi ke masing-masing kolom header\n\t\t$excel->getActiveSheet()->getStyle('A3')->applyFromArray($style_col);\n\t\t$excel->getActiveSheet()->getStyle('B3')->applyFromArray($style_col);\n\t\t$excel->getActiveSheet()->getStyle('C3')->applyFromArray($style_col);\n\t\t$excel->getActiveSheet()->getStyle('D3')->applyFromArray($style_col);\n\t\t$excel->getActiveSheet()->getStyle('E3')->applyFromArray($style_col);\n\t\t$excel->getActiveSheet()->getStyle('F3')->applyFromArray($style_col);\n\t\t$excel->getActiveSheet()->getStyle('G3')->applyFromArray($style_col);\n\t\t$excel->getActiveSheet()->getStyle('H3')->applyFromArray($style_col);\n\t\t$excel->getActiveSheet()->getStyle('I3')->applyFromArray($style_col);\n\t\t$excel->getActiveSheet()->getStyle('J3')->applyFromArray($style_col);\n\n\t\t// Panggil function view yang ada di SiswaModel untuk menampilkan semua data siswanya\n\t\t$siswa = $this->RaporModel->view();\n\n\t\t$no = 1; // Untuk penomoran tabel, di awal set dengan 1\n\t\t$numrow = 4; // Set baris pertama untuk isi tabel adalah baris ke 4\n\t\tforeach ($siswa as $data) { // Lakukan looping pada variabel siswa\n\t\t\t$excel->setActiveSheetIndex(0)->setCellValue('A' . $numrow, $no);\n\t\t\t$excel->setActiveSheetIndex(0)->setCellValue('B' . $numrow, $data->cabang);\n\t\t\t$excel->setActiveSheetIndex(0)->setCellValue('C' . $numrow, $data->nilai_amanah . '%');\n\t\t\t$excel->setActiveSheetIndex(0)->setCellValue('D' . $numrow, $data->nilai_kompeten . '%');\n\t\t\t$excel->setActiveSheetIndex(0)->setCellValue('E' . $numrow, $data->nilai_harmonis . '%');\n\t\t\t$excel->setActiveSheetIndex(0)->setCellValue('F' . $numrow, $data->nilai_loyal . '%');\n\t\t\t$excel->setActiveSheetIndex(0)->setCellValue('G' . $numrow, $data->nilai_adaptif . '%');\n\t\t\t$excel->setActiveSheetIndex(0)->setCellValue('H' . $numrow, $data->nilai_kolab . '%');\n\t\t\t$excel->setActiveSheetIndex(0)->setCellValue('I' . $numrow, $data->nilai_total . '%');\n\t\t\t$excel->setActiveSheetIndex(0)->setCellValue('J' . $numrow, $data->created_at);\n\n\t\t\t// Apply style row yang telah kita buat tadi ke masing-masing baris (isi tabel)\n\t\t\t$excel->getActiveSheet()->getStyle('A' . $numrow)->applyFromArray($style_row);\n\t\t\t$excel->getActiveSheet()->getStyle('B' . $numrow)->applyFromArray($style_row);\n\t\t\t$excel->getActiveSheet()->getStyle('C' . $numrow)->applyFromArray($style_row);\n\t\t\t$excel->getActiveSheet()->getStyle('D' . $numrow)->applyFromArray($style_row);\n\t\t\t$excel->getActiveSheet()->getStyle('E' . $numrow)->applyFromArray($style_row);\n\t\t\t$excel->getActiveSheet()->getStyle('F' . $numrow)->applyFromArray($style_row);\n\t\t\t$excel->getActiveSheet()->getStyle('G' . $numrow)->applyFromArray($style_row);\n\t\t\t$excel->getActiveSheet()->getStyle('H' . $numrow)->applyFromArray($style_row);\n\t\t\t$excel->getActiveSheet()->getStyle('I' . $numrow)->applyFromArray($style_row);\n\t\t\t$excel->getActiveSheet()->getStyle('J' . $numrow)->applyFromArray($style_row);\n\n\t\t\t$no++; // Tambah 1 setiap kali looping\n\t\t\t$numrow++; // Tambah 1 setiap kali looping\n\t\t}\n\n\t\t// Set width kolom\n\t\t$excel->getActiveSheet()->getColumnDimension('A')->setWidth(2); // Set width kolom A\n\t\t$excel->getActiveSheet()->getColumnDimension('B')->setWidth(14); // Set width kolom B\n\t\t$excel->getActiveSheet()->getColumnDimension('C')->setWidth(14); // Set width kolom C\n\t\t$excel->getActiveSheet()->getColumnDimension('D')->setWidth(16); // Set width kolom D\n\t\t$excel->getActiveSheet()->getColumnDimension('E')->setWidth(16); // Set width kolom E\n\t\t$excel->getActiveSheet()->getColumnDimension('F')->setWidth(12); // Set width kolom E\n\t\t$excel->getActiveSheet()->getColumnDimension('G')->setWidth(14); // Set width kolom E\n\t\t$excel->getActiveSheet()->getColumnDimension('H')->setWidth(19); // Set width kolom E\n\t\t$excel->getActiveSheet()->getColumnDimension('I')->setWidth(12); // Set width kolom E\n\t\t$excel->getActiveSheet()->getColumnDimension('J')->setWidth(19); // Set width kolom E\n\n\t\t// Set height semua kolom menjadi auto (mengikuti height isi dari kolommnya, jadi otomatis)\n\t\t$excel->getActiveSheet()->getDefaultRowDimension()->setRowHeight(-1);\n\n\t\t// Set orientasi kertas jadi LANDSCAPE\n\t\t$excel->getActiveSheet()->getPageSetup()->setOrientation(PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE);\n\n\t\t// Set judul file excel nya\n\t\t$excel->getActiveSheet(0)->setTitle(\"Rekap Rapor Akhlak\");\n\t\t$excel->setActiveSheetIndex(0);\n\n\t\t// Proses file excel\n\t\theader('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\n\t\theader('Content-Disposition: attachment; filename=\"Rekap Rapor Akhlak.xlsx\"'); // Set nama file excel nya\n\t\theader('Cache-Control: max-age=0');\n\n\t\t$write = PHPExcel_IOFactory::createWriter($excel, 'Excel2007');\n\t\t$write->save('php://output');\n\t}",
"function export_nik_unins_angsuran()\n\t{\n\t\t$angsuran_id=$this->uri->segment(3);\n\t\t$datas = $this->model_transaction->get_angsuran_unins($angsuran_id);\n\n\t\t// Create new PHPExcel object\n\t\t$objPHPExcel = $this->phpexcel;\n\t\t// Set document properties\n\t\t$objPHPExcel->getProperties()->setCreator(\"MICROFINANCE\")\n\t\t\t\t\t\t\t\t\t ->setLastModifiedBy(\"MICROFINANCE\")\n\t\t\t\t\t\t\t\t\t ->setTitle(\"Office 2007 XLSX Test Document\")\n\t\t\t\t\t\t\t\t\t ->setSubject(\"Office 2007 XLSX Test Document\")\n\t\t\t\t\t\t\t\t\t ->setDescription(\"REPORT, generated using PHP classes.\")\n\t\t\t\t\t\t\t\t\t ->setKeywords(\"REPORT\")\n\t\t\t\t\t\t\t\t\t ->setCategory(\"Test result file\");\n\t\t\t\t\t\t\t\t\t \n\t\t$objPHPExcel->setActiveSheetIndex(0); \n\t\t\n\t\t/*\n\t\t| BORDER OPTION\n\t\t*/\n\t\t$styleArray['borders']['outline']['style']=PHPExcel_Style_Border::BORDER_THIN;\n\t\t$styleArray['borders']['outline']['color']['rgb']='000000';\n\t\t/*\n\t\t| SET COLUMN WIDTH\n\t\t*/\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('A')->setWidth(15);\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('B')->setWidth(30);\n\n\t\t/*\n\t\t| ROW HEADER TITLE\n\t\t*/\n\t\t$row=1;\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('A'.$row,\"List Angsuran Non-Debet\");\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row)->getFont()->setBold(true);\n\t\t\n\t\t$row+=1;\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('A'.$row,\"NIK\");\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('B'.$row,\"Nama\");\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row.':B'.$row)->getFont()->setBold(true);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row.':A'.$row)->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('B'.$row.':B'.$row)->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row.':B'.$row)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n\t\t$row+=1;\n\t\t/*\n\t\t| ROW DATA\n\t\t*/\n\t\tfor($i=0;$i<count($datas);$i++){\n\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('A'.$row,$datas[$i]['nik']);\n\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('B'.$row,$datas[$i]['nama']);\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row.':B'.$row)->getFont()->setSize(11);\n\t\t\t$row++;\n\t\t}\n\n\t\theader('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\n\t\theader('Content-Disposition: attachment;filename=\"ANGSURAN NON-DEBET.xlsx\"');\n\t\theader('Cache-Control: max-age=0');\n\n\t\t$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');\n\t\t$objWriter->save('php://output');\n\t}",
"public function export() \n \t\t{\n \t\t$data = $this->model_user->export();\n \t\t#load PHPExcel library\n \t\t$this->excel->setActiveSheetIndex(0);\n \t\t#name the worksheet\n \t\t$this->excel->getActiveSheet()->setTitle('Data User SN Health Care');\n \n \t\t#STYLING\n \t\t$styleArray = array('borders' => array('allborders' => array('style' => PHPExcel_Style_Border::BORDER_THIN,'color' => array('argb' => '0000'))));\n \n \t\t#set report header\n \t\t$this->excel->getActiveSheet()->getStyle('A:I')->getFont()->setName('Times New Roman');\n \t\t$this->excel->getActiveSheet()->mergeCells('A1:J1');\n \t\t$this->excel->getActiveSheet()->setCellValue('A1', 'DAFTAR USER APLIKASI SN HEALTH CARE');\n \t\t$this->excel->getActiveSheet()->getStyle('A1')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t$this->excel->getActiveSheet()->getStyle('A1')->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n \t\t$this->excel->getActiveSheet()->getStyle('A1')->getFont()->setBold(true);\n \t\t$this->excel->getActiveSheet()->getStyle('A1')->getFont()->setSize(12);\n \n \n \t\t//set column name\n \t\t$this->excel->getActiveSheet()->setCellValue('A2', 'No');\n \t\t$this->excel->getActiveSheet()->setCellValue('B2', 'Nama');\n \t\t$this->excel->getActiveSheet()->setCellValue('C2', 'Jenis Kelamin');\n \t\t$this->excel->getActiveSheet()->setCellValue('D2', 'Tanggal Lahir');\n \t\t$this->excel->getActiveSheet()->setCellValue('E2', 'Email');\n \t\t$this->excel->getActiveSheet()->setCellValue('F2', 'Password');\n \t\t$this->excel->getActiveSheet()->setCellValue('G2', 'Nomor Handphone');\n \t\t$this->excel->getActiveSheet()->setCellValue('H2', 'Wilayah');\n \t\t$this->excel->getActiveSheet()->setCellValue('I2', 'Alamat');\n \t\t$this->excel->getActiveSheet()->setCellValue('J2', 'Tanggal & Waktu Registrasi');\n \n\t\t\t $this->excel->getActiveSheet()->getStyle('A2:J2')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('A')->setWidth(4);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('B')->setWidth(30);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('C')->setWidth(15);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('D')->setWidth(15);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('E')->setWidth(30);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('F')->setWidth(30);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('G')->setWidth(20);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('H')->setWidth(30);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('I')->setWidth(40);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('J')->setWidth(25);\n \n \t\t$no = 3;\n \t\t$nomor = 1;\n \t\tforeach ($data as $v) \n \t\t{\n \t\t\t\n \t\t\t$this->excel->getActiveSheet()->getStyle('A' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('A' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('A' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->setCellValue('A' . $no, $nomor);\n\n \t\t\t$this->excel->getActiveSheet()->getStyle('B' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('B' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('B' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->setCellValue('B' . $no, $v->user_name);\n\n \t\t\t$this->excel->getActiveSheet()->getStyle('C' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('C' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('C' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->setCellValue('C' . $no, $v->user_sex);\n\n \t\t\t$this->excel->getActiveSheet()->getStyle('D' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('D' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('D' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n\t\t\t\t$this->excel->getActiveSheet()->setCellValue('D' . $no, $v->user_datebirth);\n\t\t\t\t \n \t\t\t$this->excel->getActiveSheet()->getStyle('E' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('E' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('E' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n\t\t\t\t$this->excel->getActiveSheet()->setCellValue('E' . $no, $v->user_email);\n\t\t\t\t \n \t\t\t$this->excel->getActiveSheet()->getStyle('F' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('F' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('F' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n\t\t\t\t$this->excel->getActiveSheet()->setCellValue('F' . $no, $v->user_password);\n\n \t\t\t$this->excel->getActiveSheet()->getStyle('G' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('G' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('G' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n\t\t\t\t$this->excel->getActiveSheet()->setCellValue('G' . $no, $v->user_phone);\n\t\t\t\t \n \t\t\t$this->excel->getActiveSheet()->getStyle('H' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('H' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('H' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n\t\t\t\t$this->excel->getActiveSheet()->setCellValue('H' . $no, $v->district_name);\n\t\t\t\t \n \t\t\t$this->excel->getActiveSheet()->getStyle('I' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('I' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('I' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n\t\t\t\t$this->excel->getActiveSheet()->setCellValue('I' . $no, $v->user_address);\n\t\t\t\t \n\t\t\t\t$this->excel->getActiveSheet()->getStyle('J' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('J' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('J' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->setCellValue('J' . $no, $v->user_registerdate);\n\t\t\t\t\n\t\t\t\t$no++;\n \t\t\t$nomor++;\n \t\t}\n \n \t\t$this->excel->getActiveSheet()->getStyle('A2:J' . ($no - 1))->applyFromArray($styleArray);\n \t\tob_end_clean();\n \t\t$filename = 'Daftar User Aplikasi SN Health Care.xls'; //save our workbook as this file name\n \t\theader('Content-Type: application/vnd.ms-excel'); //mime type\n \t\theader('Content-Disposition: attachment;filename=\"' . $filename . '\"'); //tell browser what's the file name\n \t\theader('Cache-Control: max-age=0'); //no cache\n \t\t$objWriter = PHPExcel_IOFactory::createWriter($this->excel, 'Excel5');\n \t\t$objWriter->save('php://output');\n \n \t\tredirect('admin/user');\n \t\t}",
"public function excel()\n {\n Excel::create('ReporteExcel', function($excel) {\n $excel->sheet('EdadGenero', function($sheet) {\n $usersinfo = User::select(DB::raw(\"users.cc as Cedula_Ciudadania, users.lastname as Apellidos, users.name as Nombres, users.email as Email, users.cellphone as Celular, users.department as DepartamentoNac, users.city as CiudadNac, users.created_at as FechaRegistro\"))->get();\n $sheet->fromArray($usersinfo);\n });\n })->export('xls');\n\n }",
"function export(){\n header(\"Content-type: aplication/vnd-ms-excel\");\n header(\"Content-Disposition: attachment; filename=Data_Siswa.xls\");\n \n $data ['siswa'] = $this->SiswaModel->view();\n $this->load->view('export', $data);\n }",
"public function export() \n {\n return Excel::download(new EmployesListe, 'employe.xlsx');\n }",
"public function export_excel()\n {\n return (new SiswaExport)->download('StudentList.xlsx');\n }",
"public function excel()\r\n {\r\n $data = $this->AdminJobModel->getJobsForCSV($this->xssCleanInput('ids'));\r\n $data = sortForCSV(objToArr($data));\r\n $excel = new SimpleExcel('csv'); \r\n $excel->writer->setData($data);\r\n $excel->writer->saveFile('jobs'); \r\n exit;\r\n }",
"public function exportCatProcesosExcel(){\n return Excel::download(new ExcelExportCatProcesos, 'Cat_Procesos_'.date('d-m-Y').'.xlsx');\n }",
"public function export()\n {\n include APPPATH . 'third_party/PHPExcel.php';\n\n // Panggil class PHPExcel nya\n $excel = new PHPExcel();\n\n date_default_timezone_set('Asia/Jakarta');\n $date = date(\"mY\");\n\n // Settingan awal fil excel\n $excel->getProperties()->setCreator('Admin PTPN VIII (' .$this->session->userdata('status_login'). ')')\n ->setLastModifiedBy('Admin PTPN VIII (' .$this->session->userdata('status_login'). ')')\n ->setTitle(\"Data A1\" .$date)\n ->setSubject(\"A1\" .$date)\n ->setDescription(\"Laporan Data A1\" .$date)\n ->setKeywords(\"Data A1\" .$date);\n\n // Buat sebuah variabel untuk menampung pengaturan style dari header tabel\n $style_col = array(\n 'font' => array('bold' => true), // Set font nya jadi bold\n 'alignment' => array(\n 'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER, // Set text jadi ditengah secara horizontal (center)\n 'vertical' => PHPExcel_Style_Alignment::VERTICAL_CENTER // Set text jadi di tengah secara vertical (middle)\n ),\n 'borders' => array(\n 'top' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border top dengan garis tipis\n 'right' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border right dengan garis tipis\n 'bottom' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border bottom dengan garis tipis\n 'left' => array('style' => PHPExcel_Style_Border::BORDER_THIN) // Set border left dengan garis tipis\n )\n );\n // Buat sebuah variabel untuk menampung pengaturan style dari isi tabel\n $style_row = array(\n 'alignment' => array(\n 'vertical' => PHPExcel_Style_Alignment::VERTICAL_CENTER // Set text jadi di tengah secara vertical (middle)\n ),\n 'borders' => array(\n 'top' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border top dengan garis tipis\n 'right' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border right dengan garis tipis\n 'bottom' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border bottom dengan garis tipis\n 'left' => array('style' => PHPExcel_Style_Border::BORDER_THIN) // Set border left dengan garis tipis\n )\n );\n\n // Buat header tabel nya pada baris ke 1\n $excel->setActiveSheetIndex(0)->setCellValue('A1', \"NPP\");\n $excel->setActiveSheetIndex(0)->setCellValue('B1', \"NAMA\");\n $excel->setActiveSheetIndex(0)->setCellValue('C1', \"NM_PGL\");\n $excel->setActiveSheetIndex(0)->setCellValue('D1', \"GLR_DPN\");\n $excel->setActiveSheetIndex(0)->setCellValue('E1', \"GLR_BLK\");\n $excel->setActiveSheetIndex(0)->setCellValue('F1', \"TPT_LAHIR\");\n $excel->setActiveSheetIndex(0)->setCellValue('G1', \"TGL_LAHIR\");\n $excel->setActiveSheetIndex(0)->setCellValue('H1', \"KELAMIN\");\n $excel->setActiveSheetIndex(0)->setCellValue('I1', \"GOL_DARAH\");\n $excel->setActiveSheetIndex(0)->setCellValue('J1', \"AGAMA\");\n $excel->setActiveSheetIndex(0)->setCellValue('K1', \"ALAMAT\");\n $excel->setActiveSheetIndex(0)->setCellValue('L1', \"KOTA\");\n $excel->setActiveSheetIndex(0)->setCellValue('M1', \"TINGGAL\");\n $excel->setActiveSheetIndex(0)->setCellValue('N1', \"SIPIL\");\n $excel->setActiveSheetIndex(0)->setCellValue('O1', \"STAT_IS\");\n $excel->setActiveSheetIndex(0)->setCellValue('P1', \"TGL_NIKAH\");\n $excel->setActiveSheetIndex(0)->setCellValue('Q1', \"TGL_CERAI\");\n $excel->setActiveSheetIndex(0)->setCellValue('R1', \"KANDUNG\");\n $excel->setActiveSheetIndex(0)->setCellValue('S1', \"ANGKAT\");\n $excel->setActiveSheetIndex(0)->setCellValue('T1', \"TANGGUNG\");\n $excel->setActiveSheetIndex(0)->setCellValue('U1', \"TGL_PPH\");\n $excel->setActiveSheetIndex(0)->setCellValue('V1', \"KD_PEND\");\n $excel->setActiveSheetIndex(0)->setCellValue('W1', \"TGL_SK\");\n $excel->setActiveSheetIndex(0)->setCellValue('X1', \"NO_SK\");\n $excel->setActiveSheetIndex(0)->setCellValue('Y1', \"KD_KELAS\");\n $excel->setActiveSheetIndex(0)->setCellValue('Z1', \"KLS_TMT\");\n $excel->setActiveSheetIndex(0)->setCellValue('AA1', \"KLS_SK\");\n $excel->setActiveSheetIndex(0)->setCellValue('AB1', \"GOL\");\n $excel->setActiveSheetIndex(0)->setCellValue('AC1', \"MK\");\n $excel->setActiveSheetIndex(0)->setCellValue('AD1', \"GOL_TMT\");\n $excel->setActiveSheetIndex(0)->setCellValue('AE1', \"GOL_SK\");\n $excel->setActiveSheetIndex(0)->setCellValue('AF1', \"GPO\");\n $excel->setActiveSheetIndex(0)->setCellValue('AG1', \"KD_KBN\");\n $excel->setActiveSheetIndex(0)->setCellValue('AH1', \"KD_ADF\");\n $excel->setActiveSheetIndex(0)->setCellValue('AI1', \"KD_JAB\");\n $excel->setActiveSheetIndex(0)->setCellValue('AJ1', \"NAMA_JAB\");\n $excel->setActiveSheetIndex(0)->setCellValue('AK1', \"KD_BUD\");\n $excel->setActiveSheetIndex(0)->setCellValue('AL1', \"JAB_TMT\");\n $excel->setActiveSheetIndex(0)->setCellValue('AM1', \"JAB_SK\");\n $excel->setActiveSheetIndex(0)->setCellValue('AN1', \"JAB_TGL\");\n $excel->setActiveSheetIndex(0)->setCellValue('AO1', \"ASTEK\");\n $excel->setActiveSheetIndex(0)->setCellValue('AP1', \"TASPEN\");\n $excel->setActiveSheetIndex(0)->setCellValue('AQ1', \"NO_KK\");\n $excel->setActiveSheetIndex(0)->setCellValue('AR1', \"NO_NIK\");\n $excel->setActiveSheetIndex(0)->setCellValue('AS1', \"NO_BPJS\");\n $excel->setActiveSheetIndex(0)->setCellValue('AT1', \"TGL_MPP\");\n $excel->setActiveSheetIndex(0)->setCellValue('AU1', \"TGL_PEN\");\n $excel->setActiveSheetIndex(0)->setCellValue('AV1', \"MKTHN\");\n $excel->setActiveSheetIndex(0)->setCellValue('AW1', \"MKBLN\");\n $excel->setActiveSheetIndex(0)->setCellValue('AX1', \"MKHR\");\n $excel->setActiveSheetIndex(0)->setCellValue('AY1', \"MPP\");\n $excel->setActiveSheetIndex(0)->setCellValue('AZ1', \"STAT_REC\");\n\n // Apply style header yang telah kita buat tadi ke masing-masing kolom header\n $excel->getActiveSheet()->getStyle('A1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('B1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('C1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('D1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('E1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('F1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('G1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('H1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('I1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('J1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('K1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('L1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('M1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('N1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('O1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('P1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_DATE_DDMMYYYY);\n $excel->getActiveSheet()->getStyle('Q1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_DATE_DDMMYYYY);\n $excel->getActiveSheet()->getStyle('R1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('S1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('T1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('U1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('V1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('W1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('X1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('Y1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('Z1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AA1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AB1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AC1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AD1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AE1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AF1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AG1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AH1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AI1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AJ1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AK1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AL1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AM1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AN1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AO1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AP1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AQ1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AR1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AS1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AT1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AU1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AV1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AW1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AX1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AY1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AZ1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n\n // Menampilkan semua data dari tabel rekao A1\n $numrow = 2; // Set baris pertama untuk isi tabel adalah baris ke 2\n $sdm01 = $this->Model_admin->tampil_a1();\n foreach ($sdm01->result_array() as $i) { // Lakukan looping pada variabel siswa\n $excel->setActiveSheetIndex(0)->setCellValueExplicit('A' . $numrow, $i['npp'], PHPExcel_Cell_DataType::TYPE_STRING);\n $excel->setActiveSheetIndex(0)->setCellValue('B' . $numrow, $i['nama']);\n $excel->setActiveSheetIndex(0)->setCellValue('C' . $numrow, $i['nm_pgl']);\n $excel->setActiveSheetIndex(0)->setCellValue('D' . $numrow, $i['glr_dpn']);\n $excel->setActiveSheetIndex(0)->setCellValue('E' . $numrow, $i['glr_blk']);\n $excel->setActiveSheetIndex(0)->setCellValue('F' . $numrow, $i['kota_lhr']);\n $excel->setActiveSheetIndex(0)->setCellValue('G' . $numrow, date('d-m-Y', strtotime($i['tgl_lhr'])));\n $excel->setActiveSheetIndex(0)->setCellValue('H' . $numrow, $i['j_kelamin']);\n $excel->setActiveSheetIndex(0)->setCellValue('I' . $numrow, $i['gol_darah']);\n $excel->setActiveSheetIndex(0)->setCellValue('J' . $numrow, $i['agama']);\n $excel->setActiveSheetIndex(0)->setCellValue('K' . $numrow, $i['alamat_tgl']);\n $excel->setActiveSheetIndex(0)->setCellValue('L' . $numrow, '');\n $excel->setActiveSheetIndex(0)->setCellValue('M' . $numrow, '1');\n $excel->setActiveSheetIndex(0)->setCellValue('N' . $numrow, $i['st_sipil']);\n\n $sdm02 = $this->Model_admin->get_sdm02_a1($i['npp']);\n foreach ($sdm02 as $a) {\n\n $excel->setActiveSheetIndex(0)->setCellValue('O' . $numrow, '');\n $excel->setActiveSheetIndex(0)->setCellValue('P' . $numrow, date('d-m-Y', strtotime($a['tgl_nkh'])));\n $excel->setActiveSheetIndex(0)->setCellValue('Q' . $numrow, date('d-m-Y', strtotime($a['tgl_cerai'])));\n }\n\n $sdm02 = $this->Model_admin->get_sdm02_a1_anak($i['npp']);\n foreach ($sdm02 as $b) {\n $excel->setActiveSheetIndex(0)->setCellValue('R' . $numrow, '');\n $excel->setActiveSheetIndex(0)->setCellValue('S' . $numrow, '');\n $excel->setActiveSheetIndex(0)->setCellValue('T' . $numrow, $b['tanggungan']);\n $excel->setActiveSheetIndex(0)->setCellValue('U' . $numrow, '');\n }\n\n $sdm03 = $this->Model_admin->get_sdm03_a1($i['npp']);\n foreach ($sdm03 as $c) {\n $excel->setActiveSheetIndex(0)->setCellValueExplicit('V' . $numrow, $c['kd_pend'], PHPExcel_Cell_DataType::TYPE_STRING);\n }\n\n $excel->setActiveSheetIndex(0)->setCellValue('W' . $numrow, date('d-m-Y', strtotime($i['tgl_masuk'])));\n\n $sdm08 = $this->Model_admin->get_sdm08_a1($i['npp']);\n foreach ($sdm08 as $d) {\n\n $excel->setActiveSheetIndex(0)->setCellValue('X' . $numrow, $d['no_sk']);\n }\n\n $sdm16 = $this->Model_admin->get_sdm16_a1($i['npp']);\n foreach ($sdm16 as $e) {\n $excel->setActiveSheetIndex(0)->setCellValue('Y' . $numrow, $e['kd_kelas']);\n $excel->setActiveSheetIndex(0)->setCellValue('Z' . $numrow, date('d-m-Y', strtotime($e['kls_tmt'])));\n $excel->setActiveSheetIndex(0)->setCellValue('AA' . $numrow, $e['kls_sk']);\n }\n\n $sdm16 = $this->Model_admin->get_sdm16_a1_akhir($i['npp']);\n foreach ($sdm16 as $a) {\n $excel->setActiveSheetIndex(0)->setCellValueExplicit('AB' . $numrow, $a['golongan'], PHPExcel_Cell_DataType::TYPE_STRING);\n $excel->setActiveSheetIndex(0)->setCellValueExplicit('AC' . $numrow, $a['mk'], PHPExcel_Cell_DataType::TYPE_STRING);\n $excel->setActiveSheetIndex(0)->setCellValue('AD' . $numrow, date('d-m-Y', strtotime($a['gol_tmt'])));\n $excel->setActiveSheetIndex(0)->setCellValue('AE' . $numrow, $a['gol_sk']);\n $excel->setActiveSheetIndex(0)->setCellValue('AF' . $numrow, '');\n }\n\n $sdm08 = $this->Model_admin->get_sdm08_a1_akhir($i['npp']);\n foreach ($sdm08 as $a) {\n $excel->setActiveSheetIndex(0)->setCellValueExplicit('AG' . $numrow, $a['kd_kbn'], PHPExcel_Cell_DataType::TYPE_STRING);\n $excel->setActiveSheetIndex(0)->setCellValueExplicit('AH' . $numrow, $a['kd_adf'], PHPExcel_Cell_DataType::TYPE_STRING);\n $excel->setActiveSheetIndex(0)->setCellValueExplicit('AI' . $numrow, $a['kd_jab'], PHPExcel_Cell_DataType::TYPE_STRING);\n\n $jab = $this->Model_admin->get_jabatan($a['kd_jab']);\n foreach ($jab as $jab) {\n $excel->setActiveSheetIndex(0)->setCellValue('AJ' . $numrow, $jab['nama']);\n }\n\n $excel->setActiveSheetIndex(0)->setCellValueExplicit('AK' . $numrow, $a['kd_bud'], PHPExcel_Cell_DataType::TYPE_STRING);\n $excel->setActiveSheetIndex(0)->setCellValue('AL' . $numrow, date('d-m-Y', strtotime($a['jab_tmt'])));\n $excel->setActiveSheetIndex(0)->setCellValue('AM' . $numrow, $a['jab_sk']);\n $excel->setActiveSheetIndex(0)->setCellValue('AN' . $numrow, date('d-m-Y', strtotime($a['jab_tgl'])));\n }\n\n\n $excel->setActiveSheetIndex(0)->setCellValueExplicit('AO' . $numrow, $i['no_astek'], PHPExcel_Cell_DataType::TYPE_STRING);\n $excel->setActiveSheetIndex(0)->setCellValueExplicit('AP' . $numrow, $i['no_pens'], PHPExcel_Cell_DataType::TYPE_STRING);\n $excel->setActiveSheetIndex(0)->setCellValueExplicit('AQ' . $numrow, $i['no_kk'], PHPExcel_Cell_DataType::TYPE_STRING);\n $excel->setActiveSheetIndex(0)->setCellValueExplicit('AR' . $numrow, $i['no_nik'], PHPExcel_Cell_DataType::TYPE_STRING);\n $excel->setActiveSheetIndex(0)->setCellValueExplicit('AS' . $numrow, $i['no_bpjs'], PHPExcel_Cell_DataType::TYPE_STRING);\n\n $sdm16 = $this->Model_admin->get_sdm16_a1_akhir($i['npp']);\n $golongan = $sdm16[0]['golongan'];\n $golongan = (int)$golongan;\n if ($golongan >= 0 and $golongan <= 8) {\n $tgl_pen = date('Y-m-d', strtotime('+55 year +1 month', strtotime($i['tgl_lhr'])));\n $tgl_mpp = date('Y-m-d', strtotime('-6 month', strtotime($tgl_pen)));\n $excel->setActiveSheetIndex(0)->setCellValue('AT' . $numrow, date('01-m-Y', strtotime($tgl_mpp)));\n $excel->setActiveSheetIndex(0)->setCellValue('AU' . $numrow, date('01-m-Y', strtotime($tgl_pen)));\n }\n if ($golongan >= 9 and $golongan <= 16) {\n $tgl_pen = date('Y-m-d', strtotime('+56 year +1 month', strtotime($i['tgl_lhr'])));\n $tgl_mpp = date('Y-m-d', strtotime('-6 month', strtotime($tgl_pen)));\n $excel->setActiveSheetIndex(0)->setCellValue('AT' . $numrow, date('01-m-Y', strtotime($tgl_mpp)));\n $excel->setActiveSheetIndex(0)->setCellValue('AU' . $numrow, date('01-m-Y', strtotime($tgl_pen)));\n }\n\n $sdm01 = $this->Model_admin->tampil_a1($i['npp'])->result_array();\n $skrng = date_create($sdm01[0]['tgl_masuk']);\n $tgl_pen = date_create($tgl_pen);\n\n $diff = date_diff($skrng, $tgl_pen);\n\n if ($diff->y > 57) {\n $excel->setActiveSheetIndex(0)->setCellValue('AV' . $numrow, '');\n $excel->setActiveSheetIndex(0)->setCellValue('AW' . $numrow, '');\n $excel->setActiveSheetIndex(0)->setCellValue('AX' . $numrow, '');\n $excel->setActiveSheetIndex(0)->setCellValue('AY' . $numrow, '');\n $excel->setActiveSheetIndex(0)->setCellValue('AZ' . $numrow, '');\n } else {\n $excel->setActiveSheetIndex(0)->setCellValue('AV' . $numrow, $diff->y);\n $excel->setActiveSheetIndex(0)->setCellValue('AW' . $numrow, $diff->m);\n $excel->setActiveSheetIndex(0)->setCellValue('AX' . $numrow, $diff->d);\n $excel->setActiveSheetIndex(0)->setCellValue('AY' . $numrow, '');\n $excel->setActiveSheetIndex(0)->setCellValue('AZ' . $numrow, '');\n }\n\n // Apply style row yang telah kita buat tadi ke masing-masing baris (isi tabel)\n $excel->getActiveSheet()->getStyle('A' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('B' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('C' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('D' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('E' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('F' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('G' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('H' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('I' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('J' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('K' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('L' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('M' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('N' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('O' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('P' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('Q' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('R' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('S' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('T' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('U' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('V' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('W' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('X' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('Y' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('Z' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AA' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AB' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AC' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AD' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AE' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AF' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AG' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AH' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AI' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AJ' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AK' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AL' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AM' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AN' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AO' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AP' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AQ' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AR' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AS' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AT' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AU' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AV' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AW' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AX' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AY' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AZ' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n\n $numrow++; // Tambah 1 setiap kali looping\n }\n\n\n // Set width kolom\n $excel->getActiveSheet()->getColumnDimension('A')->setWidth(15);\n $excel->getActiveSheet()->getColumnDimension('B')->setWidth(30);\n $excel->getActiveSheet()->getColumnDimension('C')->setWidth(30);\n $excel->getActiveSheet()->getColumnDimension('D')->setWidth(10);\n $excel->getActiveSheet()->getColumnDimension('E')->setWidth(10);\n $excel->getActiveSheet()->getColumnDimension('F')->setWidth(10);\n $excel->getActiveSheet()->getColumnDimension('G')->setWidth(10);\n $excel->getActiveSheet()->getColumnDimension('H')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('I')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('J')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('K')->setWidth(50);\n $excel->getActiveSheet()->getColumnDimension('L')->setWidth(20);\n $excel->getActiveSheet()->getColumnDimension('M')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('N')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('O')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('P')->setWidth(10);\n $excel->getActiveSheet()->getColumnDimension('Q')->setWidth(10);\n $excel->getActiveSheet()->getColumnDimension('R')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('S')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('T')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('U')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('V')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('W')->setWidth(10);\n $excel->getActiveSheet()->getColumnDimension('X')->setWidth(25);\n $excel->getActiveSheet()->getColumnDimension('Y')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('Z')->setWidth(10);\n $excel->getActiveSheet()->getColumnDimension('AA')->setWidth(25);\n $excel->getActiveSheet()->getColumnDimension('AB')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('AC')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('AD')->setWidth(10);\n $excel->getActiveSheet()->getColumnDimension('AE')->setWidth(25);\n $excel->getActiveSheet()->getColumnDimension('AF')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('AG')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('AH')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('AI')->setWidth(10);\n $excel->getActiveSheet()->getColumnDimension('AJ')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('AK')->setWidth(10);\n $excel->getActiveSheet()->getColumnDimension('AL')->setWidth(25);\n $excel->getActiveSheet()->getColumnDimension('AM')->setWidth(10);\n $excel->getActiveSheet()->getColumnDimension('AN')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('AO')->setWidth(15);\n $excel->getActiveSheet()->getColumnDimension('AP')->setWidth(15);\n $excel->getActiveSheet()->getColumnDimension('AQ')->setWidth(15);\n $excel->getActiveSheet()->getColumnDimension('AR')->setWidth(15);\n $excel->getActiveSheet()->getColumnDimension('AS')->setWidth(15);\n $excel->getActiveSheet()->getColumnDimension('AT')->setWidth(10);\n $excel->getActiveSheet()->getColumnDimension('AU')->setWidth(10);\n $excel->getActiveSheet()->getColumnDimension('AV')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('AW')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('AX')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('AY')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('AZ')->setWidth(5);\n\n // Set height semua kolom menjadi auto (mengikuti height isi dari kolommnya, jadi otomatis)\n $excel->getActiveSheet()->getDefaultRowDimension()->setRowHeight(-1);\n\n // Set orientasi kertas jadi LANDSCAPE\n $excel->getActiveSheet()->getPageSetup()->setOrientation(PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE);\n\n date_default_timezone_set('Asia/Jakarta');\n $date = date(\"mY\");\n\n // Set judul file excel nya\n $excel->getActiveSheet(0)->setTitle(\"Data A1\");\n $excel->setActiveSheetIndex(0);\n\n // Proses file excel\n header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\n header('Content-Disposition: attachment; filename=\"Data A1' . $date . '.xlsx\"'); // Set nama file excel nya\n header('Cache-Control: max-age=0');\n\n header('Content-Transfer-Encoding: binary');\n header('Accept-Ranges: bytes');\n header('Cache-control: no-cache, pre-check=0, post-check=0');\n header('Cache-control: private');\n header('Pragma: private');\n header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // any date in the past\n\n $write = PHPExcel_IOFactory::createWriter($excel, 'Excel2007');\n $write->save('php://output');\n }",
"public function exportExcelAction(){\r\n $fileName = 'siege.xls';\r\n $content = $this->getLayout()->createBlock('reseauchx_reservationreseau/adminhtml_siege_grid')->getExcelFile();\r\n $this->_prepareDownloadResponse($fileName, $content);\r\n }",
"public function export() \n {\n return Excel::download(new TraineeExport, 'trainees.xlsx');\n }",
"public function DowloadExcel()\n {\n return $export->sheet('sheetName', function($sheet)\n {\n\n })->export('xls');\n }",
"public function exportExcelAction()\n {\n $contenedor = $this->container;\n\n $xlsExport = $contenedor->get('xls.service_xls2007');\n\n $xlsExport->excelObj->getProperties()->setCreator(\"Proyecto Base\")\n ->setLastModifiedBy(\"Proyecto Base\")\n ->setTitle(\"Demo Excel\")\n ->setSubject(\"Demo Excel\")\n ->setDescription(\"Demo Excel\")\n ->setKeywords(\"demo excel proyecto base\")\n ->setCategory(\"demo\");\n\n $xlsExport->excelObj->setActiveSheetIndex(0)\n ->setCellValue('A2', 'Título Columna 1')\n ->setCellValue('B2', 'Título Columna 2');\n\n $xlsExport->excelObj->setActiveSheetIndex(0)\n ->setCellValue('A1', \"Este el el valor de la celda\")\n ->setCellValue('B1', \"Otro valor\");\n\n $xlsExport->excelObj->getActiveSheet()->setTitle(\"Demo\");\n\n // Set active sheet index to the first sheet, so Excel opens this as the first sheet\n $xlsExport->excelObj->setActiveSheetIndex(0);\n\n //create the response\n $response = $xlsExport->getResponse();\n $response->headers->set('Content-Type', 'text/vnd.ms-excel; charset=utf-8');\n $response->headers->set('Content-Disposition', 'attachment;filename=demo_excel.xls');\n\n // If you are using a https connection, you have to set those two headers for compatibility with IE <9\n $response->headers->set('Pragma', 'public');\n $response->headers->set('Cache-Control', 'maxage=1');\n return $response;\n }",
"public function action_export_obic(){\n\t\t$objPHPExcel = new \\PHPExcel();\n\t\t//add header\n $header = [\n '会社NO', '伝票番号', '発生日', 'システム分類', 'サイト番号', '仕訳区分', '伝票区分', '事業所コード', '行番号', '借方総勘定科目コード',\n '借方補助科目コード', '借方補助内訳科目コード', '借方部門コード', '借方取引先コード', '借方税区分', '借方税込区分',\n '借方金額', '借方消費税額', '借方消費税本体科目コード', '借方分析コード1', '借方分析コード2', '借方分析コード3', '借方分析コード4', '借方分析コード5',\n '借方資金コード', '借方プロジェクトコード', '貸方総勘定科目コード', '貸方補助科目コード', '貸方補助内訳科目コード', '貸方部門コード',\n '貸方取引先コード', '貸方税区分', '貸方税込区分', '貸方金額', '貸方消費税額', '貸方消費税本体科目コード',\n '貸方分析コード1', '貸方分析コード2', '貸方分析コード3', '貸方分析コード4', '貸方分析コード5', '貸方資金コード',\n '貸方プロジェクトコード', '明細摘要', '伝票摘要', 'ユーザID', '借方事業所コード', '貸方事業所コード'\n ];\n\n $objPHPExcel->getProperties()->setCreator('VisionVietnam')\n ->setLastModifiedBy('Phong Phu')\n ->setTitle('Office 2007 Document')\n ->setSubject('Office 2007 Document')\n ->setDescription('Document has been generated by PHP')\n ->setKeywords('Office 2007 openxml php')\n ->setCategory('OBIC File');\n $last_column = null;\n $explicit = [7,8,10,11,12,13,15,16,27,28,29,30,32];\n\n foreach($header as $i=>$v){\n\t\t\t$column = \\PHPExcel_Cell::stringFromColumnIndex($i);\n\t\t\t$objPHPExcel->setActiveSheetIndex(0)->setCellValue($column.'1',$v);\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle($column.'1')\n\t\t\t\t\t\t->applyFromArray([\n\t\t\t\t\t\t 'font' => [\n\t\t\t\t\t\t 'name' => 'Times New Roman',\n\t\t\t\t\t\t 'bold' => true,\n\t\t\t\t\t\t 'italic' => false,\n\t\t\t\t\t\t 'size' => 10,\n\t\t\t\t\t\t 'color' => ['rgb'=> \\PHPExcel_Style_Color::COLOR_WHITE]\n\t\t\t\t\t\t ],\n\t\t\t\t\t\t 'alignment' => [\n\t\t\t\t\t\t 'horizontal' => \\PHPExcel_Style_Alignment::HORIZONTAL_CENTER,\n\t\t\t\t\t\t 'vertical' => \\PHPExcel_Style_Alignment::VERTICAL_CENTER,\n\t\t\t\t\t\t 'wrap' => false\n\t\t\t\t\t\t ]\n\t\t\t\t\t\t]);\n switch($i+1){\n case 4:\n case 15:\n case 16:\n case 18:\n $width = 20;\n break;\n case 13:\n case 14:\n case 20:\n case 21:\n case 22:\n case 23:\n case 24:\n case 25:\n case 30:\n case 31:\n $width = 25;\n break;\n case 10:\n case 11:\n case 12:\n case 19:\n case 26:\n case 27:\n case 28:\n $width = 30;\n break;\n case 29:\n case 44:\n case 45:\n $width = 40;\n break;\n default:\n $width = 15;\n break;\n }\n $objPHPExcel->getActiveSheet()->getColumnDimension($column)->setWidth($width);\n $last_column = $column;\n }\n //decode params\n $param = \\Input::param();\n parse_str(base64_decode($param['p']), $params);\n //get form payment content\n $rows = $this->generate_content($params);\n $i = 0;\n foreach($rows as $row){\n\t\t\tforeach($row as $k=>$v){\n\t\t\t\t$column = \\PHPExcel_Cell::stringFromColumnIndex($k);\n\t\t\t\tif(in_array($k+1,$explicit)){\n\t\t\t\t\t$objPHPExcel->setActiveSheetIndex()->setCellValueExplicit($column.($i+2),$v,\\PHPExcel_Cell_DataType::TYPE_STRING);\n\t\t\t\t}else{\n\t\t\t\t\t$objPHPExcel->setActiveSheetIndex()->setCellValue($column.($i+2),$v);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A1:'.$last_column.'1')->getFill()->setFillType(\\PHPExcel_Style_Fill::FILL_SOLID);\n $objPHPExcel->getActiveSheet()->getStyle('A1:'.$last_column.'1')->getFill()->getStartColor()->setRGB('5f5f5f');\n\n\t\t$objWriter = \\PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');\n\t\tob_end_clean();\n\n\t\theader(\"Last-Modified: \". gmdate(\"D, d M Y H:i:s\") .\" GMT\");\n header(\"Cache-Control: max-age=0\");\n header('Content-Type: application/vnd.ms-excel');\n header('Content-Disposition: attachment;filename=\"obic-'.date('Y-m-d').'.xls\"');\n $objWriter->save('php://output');\n\t\texit;\n }",
"public function exportCatFuncionesExcel(){\n return Excel::download(new ExcelExportCatFunciones, 'Cat_Funciones_'.date('d-m-Y').'.xlsx');\n }",
"public function exportExcel()\n {\n $evaluaciones = Evaluacion::get()->toArray();\n\n return Excel::create('ListadoEvaluaciones', function($excel) use ($evaluaciones) {\n $excel->sheet('Evaluaciones', function($sheet) use ($evaluaciones)\n {\n $sheet->fromArray($evaluaciones);\n });\n })->download('xlsx');\n }",
"function exportExcel($expTitle, $expCellName, $expTableData) {\n $xlsTitle = iconv('utf-8', 'gb2312', $expTitle); //文件名称\n $fileName = $xlsTitle . $_SESSION['loginAccount'] . date('_YmdHis'); //or $xlsTitle 文件名称可根据自己情况设定\n $cellNum = count($expCellName);\n $dataNum = count($expTableData);\n vendor(\"PhpExcel.PHPExcel\", '', '.php');\n $objPHPExcel = new \\PHPExcel();\n $cellName = array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'AA', 'AB', 'AC', 'AD', 'AE', 'AF', 'AG', 'AH', 'AI', 'AJ', 'AK', 'AL', 'AM', 'AN', 'AO', 'AP', 'AQ', 'AR', 'AS', 'AT', 'AU', 'AV', 'AW', 'AX', 'AY', 'AZ');\n\n //$objPHPExcel->getActiveSheet(0)->mergeCells('A1:'.$cellName[$cellNum-1].'1');//合并单元格\n //$objPHPExcel->setActiveSheetIndex(0)->setCellValue('A1', $expTitle.' Export time:'.date('Y-m-d H:i:s')); \n for ($i = 0; $i < $cellNum; $i++) {\n $objPHPExcel->setActiveSheetIndex(0)->setCellValue($cellName[$i] . '1', $expCellName[$i][1]);\n }\n // Miscellaneous glyphs, UTF-8 \n for ($i = 0; $i < $dataNum; $i++) {\n for ($j = 0; $j < $cellNum; $j++) {\n $objPHPExcel->getActiveSheet(0)->setCellValueExplicit($cellName[$j] . ($i + 2), $expTableData[$i][$expCellName[$j][0]], \\PHPExcel_Cell_DataType::TYPE_STRING2);\n }\n }\n\n header('pragma:public');\n header('Content-type:application/vnd.ms-excel;charset=utf-8;name=\"' . $xlsTitle . '.xls\"');\n header(\"Content-Disposition:attachment;filename=$fileName.xls\"); //attachment新窗口打印inline本窗口打印\n $objWriter = \\PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');\n $objWriter->save('php://output');\n exit;\n}",
"public function export()\n {\n return Excel::download(new SiswaExport($this->siswaModel), 'Siswa.xlsx');\n }",
"public function test()\n {\n\t\t$data = Session::get('exdata');\n $title = ['id', 'name', 'sex'];\n\n\n $spreadsheet = new Spreadsheet();\n $worksheet = $spreadsheet->getActiveSheet();\n //设置工作表标题名称\n $worksheet->setTitle('测试Excel');\n\n //表头\n //设置单元格内容\n foreach ($title as $key => $value) {\n $worksheet->setCellValueByColumnAndRow($key + 1, 1, $value);\n }\n\t\tLog::write($data, 'exdataT');\n $row = 2; //第二行开始\n foreach ($data as $item) {\n $column = 1;\n foreach ($item as $value) {\n $worksheet->setCellValueByColumnAndRow($column, $row, $value);\n $column++;\n }\n $row++;\n }\n\n # 保存为xlsx\n $filename = '测试Excel.xlsx';\n $writer = IOFactory::createWriter($spreadsheet, 'Xlsx');\n $writer->save($filename);\n \n header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\n header('Content-Disposition: attachment;filename=\"'.$filename.'\"');\n header('Cache-Control: max-age=0');\n $writer->save('php://output');\n\n }",
"public function exportExcelAction()\n {\n $fileName = 'ifeedback.xls';\n $content = $this->getLayout()->createBlock('bs_kst/adminhtml_ifeedback_grid')\n ->getExcelFile();\n $this->_prepareDownloadResponse($fileName, $content);\n }",
"public function download()\n {\n return \\Excel::download(new UsersExport, 'data_buku_yang_dipinjam.xlsx'); \n }",
"public function export()\n {\n return Excel::download(new UsersExport, 'users.xlsx');\n }",
"function export_log_trx_pendebetan()\n\t{\n\t\t$trx_date=$this->uri->segment(3);\n\t\t$angsuran_id=$this->uri->segment(4);\n\t\t$datas = $this->model_transaction->get_log_trx_pendebetan($trx_date,$angsuran_id);\n\t\t$data_angsuran_temp = $this->model_transaction->get_mfi_angsuran_temp_by_angsuran_id($angsuran_id);\n\n\t\t// Create new PHPExcel object\n\t\t$objPHPExcel = $this->phpexcel;\n\t\t// Set document properties\n\t\t$objPHPExcel->getProperties()->setCreator(\"MICROFINANCE\")\n\t\t\t\t\t\t\t\t\t ->setLastModifiedBy(\"MICROFINANCE\")\n\t\t\t\t\t\t\t\t\t ->setTitle(\"Office 2007 XLSX Test Document\")\n\t\t\t\t\t\t\t\t\t ->setSubject(\"Office 2007 XLSX Test Document\")\n\t\t\t\t\t\t\t\t\t ->setDescription(\"REPORT, generated using PHP classes.\")\n\t\t\t\t\t\t\t\t\t ->setKeywords(\"REPORT\")\n\t\t\t\t\t\t\t\t\t ->setCategory(\"Test result file\");\n\t\t\t\t\t\t\t\t\t \n\t\t$objPHPExcel->setActiveSheetIndex(0); \n\t\t\n\t\t/*\n\t\t| BORDER OPTION\n\t\t*/\n\t\t$styleArray['borders']['outline']['style']=PHPExcel_Style_Border::BORDER_THIN;\n\t\t$styleArray['borders']['outline']['color']['rgb']='000000';\n\t\t/*\n\t\t| SET COLUMN WIDTH\n\t\t*/\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('A')->setWidth(15);\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('B')->setWidth(30);\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('C')->setWidth(20);\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('D')->setWidth(20);\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('E')->setWidth(20);\n\n\t\t/*\n\t\t| ROW HEADER TITLE\n\t\t*/\n\t\t$row=1;\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('A'.$row,\"List Angsuran Ter Debet\");\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row)->getFont()->setBold(true);\n\t\t\n\t\t$row+=2;\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('A'.$row,\"NIK\");\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('B'.$row,\"Nama\");\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('C'.$row,\"Jumlah Pembayaran\");\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('D'.$row,\"Jumlah Terdebet\");\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('E'.$row,\"Selisih\");\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row.':E'.$row)->getFont()->setBold(true);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row.':A'.$row)->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('B'.$row.':B'.$row)->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('C'.$row.':C'.$row)->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('D'.$row.':D'.$row)->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('E'.$row.':E'.$row)->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row.':E'.$row)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n\t\t$row+=1;\n\t\t/*\n\t\t| ROW DATA\n\t\t*/\n\t\tfor($i=0;$i<count($datas);$i++){\n\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('A'.$row,$datas[$i]['nik']);\n\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('B'.$row,$datas[$i]['nama']);\n\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('C'.$row,$datas[$i]['jumlah_bayar']);\n\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('D'.$row,$datas[$i]['jumlah_angsuran']);\n\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('E'.$row,($datas[$i]['jumlah_bayar']-$datas[$i]['jumlah_angsuran']));\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row.':E'.$row)->getFont()->setSize(11);\n\t\t\t$row++;\n\t\t}\n\n\t\theader('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\n\t\theader('Content-Disposition: attachment;filename=\"ANGSURAN TER DEBET_'.$data_angsuran_temp['keterangan'].'.xlsx\"');\n\t\theader('Cache-Control: max-age=0');\n\n\t\t$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');\n\t\t$objWriter->save('php://output');\n\t}",
"function exportexcel($data,$title,$filename){\n header(\"Content-type:application/octet-stream\");\n header(\"Accept-Ranges:bytes\");\n header(\"Content-type:application/vnd.ms-excel\");\n header(\"Content-Disposition:attachment;filename=\".$filename.\".xls\");\n header(\"Pragma: no-cache\");\n header(\"Expires: 0\");\n //导出xls 开始\n if (!empty($title)){\n foreach ($title as $k => $v) {\n $title[$k]=iconv(\"UTF-8\", \"GB2312\",$v);\n }\n $title= implode(\"\\t\", $title);\n echo \"$title\\n\";\n }\n if (!empty($data)){\n foreach($data as $key=>$val){\n foreach ($val as $ck => $cv) {\n $data[$key][$ck]=iconv(\"UTF-8\", \"GB2312\", $cv);\n }\n $data[$key]=implode(\"\\t\", $data[$key]);\n }\n echo implode(\"\\n\",$data);\n }\n}",
"public function exportExcelAction()\n {\n $fileName = 'kstitem.xls';\n $content = $this->getLayout()->createBlock('bs_kst/adminhtml_kstitem_grid')\n ->getExcelFile();\n $this->_prepareDownloadResponse($fileName, $content);\n }",
"public function exportExcel($type);",
"public function export(){\n header(\"Content-type: application/vnd-ms-excel\");\n header(\"Content-Disposition: attachment; filename=Data_Card.xls\");\n \n $data['card'] = $this->Card_model->get_all_card();\n $this->load->view('card/export', $data);\n }",
"public function companiessExport(){\n \n return Excel::download( new CompaniesExport , 'companies.xls');\n\n }",
"function area($tahun, $area, $berdasarkan)\n {\n $this->load->helper('exportexcel');\n $namaFile = \"transaksi_area.xls\";\n $judul = \"Transaksi\";\n $tablehead = 4;\n $tablebody = 5;\n $nourut = 1;\n //penulisan header\n header(\"Pragma: public\");\n header(\"Expires: 0\");\n header(\"Cache-Control: must-revalidate, post-check=0,pre-check=0\");\n header(\"Content-Type: application/force-download\");\n header(\"Content-Type: application/octet-stream\");\n header(\"Content-Type: application/download\");\n header(\"Content-Disposition: attachment;filename=\" . $namaFile . \"\");\n header(\"Content-Transfer-Encoding: binary \");\n $area2 = \"\";\n $berdasarkan2 = \"\";\n if ($area == \"-\") {\n $area = \"Semua\";\n $area2 = \"\";\n }\n if ($berdasarkan == \"-\") {\n $berdasarkan = \"Semua\";\n $berdasarkan2 = \"\";\n }\n\n xlsBOF();\n xlsWriteLabel(0, 0, \"Laporan\");\n xlsWriteLabel(1, 0, \"Tahun\");\n xlsWriteLabel(2, 0, \"Nama\");\n xlsWriteLabel(0, 1, $berdasarkan);\n xlsWriteLabel(1, 1, $tahun);\n xlsWriteLabel(2, 1, $area);\n $kolomhead = 0;\n xlsWriteLabel($tablehead, $kolomhead++, \"No\");\n xlsWriteLabel($tablehead, $kolomhead++, \"No Faktur\");\n xlsWriteLabel($tablehead, $kolomhead++, \"Tgl Kirim\");\n xlsWriteLabel($tablehead, $kolomhead++, \"Jatuh Tempo\");\n xlsWriteLabel($tablehead, $kolomhead++, \"ID Pelanggan\");\n xlsWriteLabel($tablehead, $kolomhead++, \"Nama Pelanggan\");\n xlsWriteLabel($tablehead, $kolomhead++, \"Nama Barang\");\n xlsWriteLabel($tablehead, $kolomhead++, \"QTY\");\n xlsWriteLabel($tablehead, $kolomhead++, \"Satuan\");\n xlsWriteLabel($tablehead, $kolomhead++, \"Kota\");\n xlsWriteLabel($tablehead, $kolomhead++, \"Kecamatan\");\n xlsWriteLabel($tablehead, $kolomhead++, \"Kelurahan\");\n xlsWriteLabel($tablehead, $kolomhead++, \"No Telpon\");\n xlsWriteLabel($tablehead, $kolomhead++, \"Surveyor\");\n xlsWriteLabel($tablehead, $kolomhead++, \"Debt\");\n xlsWriteLabel($tablehead, $kolomhead++, \"Jumlah\");\n\n $record = $this->mLap->laporan_area($tahun, $area2, $berdasarkan2);\n $total = 0;\n foreach ($record as $data) {\n $kolombody = 0;\n xlsWriteNumber($tablebody, $kolombody++, $nourut);\n xlsWriteLabel($tablebody, $kolombody++, $data->id_transaksi);\n xlsWriteLabel($tablebody, $kolombody++, $data->tgl_transaksi);\n xlsWriteLabel($tablebody, $kolombody++, $data->jatuh_tempo);\n xlsWriteLabel($tablebody, $kolombody++, $data->id_pelanggan);\n xlsWriteLabel($tablebody, $kolombody++, $data->nama_pelanggan);\n xlsWriteLabel($tablebody, $kolombody++, $data->nama_barang);\n xlsWriteNumber($tablebody, $kolombody++, $data->qty);\n xlsWriteLabel($tablebody, $kolombody++, $data->satuan);\n xlsWriteLabel($tablebody, $kolombody++, $data->kota);\n xlsWriteLabel($tablebody, $kolombody++, $data->kecamatan);\n xlsWriteLabel($tablebody, $kolombody++, $data->kelurahan);\n xlsWriteLabel($tablebody, $kolombody++, $data->no_telp);\n xlsWriteLabel($tablebody, $kolombody++, $data->nama_karyawan);\n xlsWriteLabel($tablebody, $kolombody++, $data->username);\n xlsWriteNumber($tablebody, $kolombody++, $data->subtotal);\n $tablebody++;\n $nourut++;\n $total += $data->subtotal;\n }\n xlsWriteLabel($tablebody, 14, 'Total');\n xlsWriteNumber($tablebody, 15, $total);\n xlsEOF();\n exit();\n }",
"public function exportATraiterAction(Request $request){\n \t// Recherche des courriers\n \t$em = $this->getDoctrine()->getManager();\n \t$results = $em->getRepository('PenderieDefaultBundle:Dossier')->getRefusAutomatiqueATraiter();\n \n \t// ask the service for a Excel5\n \t$phpExcelObject = $this->get('phpexcel')->createPHPExcelObject();\n \t$now = new \\DateTime();\n \t$titre = \"Export des dossiers refus auto. à traiter\";\n \t$nomFichier = \"export_refus_automatique_a_traiter_\".$now->format('Y-m-d_h-i-s');\n \n \t$phpExcelObject->getProperties()->setCreator(\"Siplec Création\")\n \t->setLastModifiedBy(\"Siplec Création\")\n \t->setTitle($titre)\n \t->setSubject($titre)\n \t->setDescription($titre.\" - \".$now->format('d/m/Y H:i:s'));\n \n \t$phpExcelObject->setActiveSheetIndex(0)\n \t->setCellValue('A1', $titre)\n \t->setCellValue('A2', \"Date de génération : \".$now->format('d/m/Y H:i:s'))\n \t->setCellValue('A3', \"Effectué par : \".$this->getUser())\n \t->fromArray($results, NULL, 'A5');\n \t$phpExcelObject->getActiveSheet()->setTitle('Export');\n \t// Set active sheet index to the first sheet, so Excel opens this as the first sheet\n \t$phpExcelObject->setActiveSheetIndex(0);\n \n \t// create the writer\n \t$writer = $this->get('phpexcel')->createWriter($phpExcelObject, 'Excel5');\n \t// create the response\n \t$response = $this->get('phpexcel')->createStreamedResponse($writer);\n \t// adding headers\n \t$response->headers->set('Content-Type', 'text/vnd.ms-excel; charset=utf-8');\n \t$response->headers->set('Content-Disposition', \"attachment;filename=$nomFichier.xls\");\n \t$response->headers->set('Pragma', 'public');\n \t$response->headers->set('Cache-Control', 'maxage=1');\n \n \treturn $response;\n }",
"public function export()\n\t\t {\n\t\t\t return Excel::download(new UsersExport, 'users.xlsx');\n\t\t }",
"public function download_category_excel_sheet() {\n $spreadsheet = new Spreadsheet();\n $sheet = $spreadsheet->getActiveSheet();\n $sheet->setCellValue('A1', 'ar_name');\n $sheet->setCellValue('B1', 'en_name');\n $sheet->setCellValue('C1', 'discount');\n\n $writer = new Xlsx($spreadsheet);\n\n $filename = 'add_category_template';\n\n header('Content-Type: application/vnd.ms-excel');\n header('Content-Disposition: attachment;filename=\"' . $filename . '.xlsx\"');\n\n $writer->save('php://output');\n }",
"public function excel()\n {\n Excel::create('Lista de vehiculos', function($excel) {\n $excel->sheet('Excel sheet', function($sheet) {\n //otra opción -> $products = Product::select('name')->get();\n\n $vehiculo = Transporte::join('empleados', 'empleados.id', '=', 'transportes.chofer_id')\n ->select('transportes.nombre_Unidad','transportes.no_Serie','transportes.placas','transportes.poliza_Seguro','transportes.vigencia_Seguro','transportes.aseguradora','transportes.m3_Unidad','transportes.capacidad', \\DB::raw(\"concat(empleados.nombre,' ',empleados.apellidos) as 'name'\"))\n ->where('empleados.estado', 'Activo')\n ->get(); \n $sheet->fromArray($vehiculo);\n $sheet->row(1,['Nombre Vehiculo','Numero Serie','Placas','Poliza Seguro','Vigencia Seguro','Aseguradora','Capacidad Ubica','Capacidad','Nombre Chofer']);\n\n $sheet->setOrientation('landscape');\n });\n })->export('xls');\n }",
"public function excel()\n { \n return Excel::download(new ReporteGraduados, 'graduado.xlsx');\n }",
"function ambil_paket_export_excel(){\r\n\t\t//POST varibale here\r\n\t\t$apaket_faktur=trim(@$_POST[\"apaket_faktur\"]);\r\n\t\t$apaket_faktur=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$apaket_faktur);\r\n\t\t$apaket_faktur=str_replace(\"'\", \"\\'\",$apaket_faktur);\r\n\t\t$apaket_cust=trim(@$_POST[\"apaket_cust\"]);\r\n\t\t$apaket_paket=trim(@$_POST[\"apaket_paket\"]);\r\n\t\t$apaket_sisa=trim(@$_POST[\"apaket_sisa\"]);\r\n\t\t$apaket_jenis=trim(@$_POST[\"apaket_jenis\"]);\r\n\t\t$apaket_jenis_kadaluarsa=trim(@$_POST[\"apaket_jenis_kadaluarsa\"]);\r\n\t\t$apaket_kadaluarsa=trim(@$_POST[\"apaket_kadaluarsa\"]);\r\n\t\t$apaket_kadaluarsa_akhir=trim(@$_POST[\"apaket_kadaluarsa_akhir\"]);\r\n\t\t$apaket_tgl_faktur=trim(@$_POST[\"apaket_tgl_faktur\"]);\r\n\t\t$apaket_tgl_faktur_akhir=trim(@$_POST[\"apaket_tgl_faktur_akhir\"]);\r\n\t\t$apaket_jenis=trim(@$_POST[\"apaket_jenis\"]);\r\n\t\t$apaket_transaksi_start=trim(@$_POST[\"apaket_tgl_transaksi_start\"]);\r\n\t\t$apaket_transaksi_end=trim(@$_POST[\"apaket_tgl_transaksi_end\"]);\r\n\t\t$apaket_tidak_transaksi_start=trim(@$_POST[\"apaket_tidak_tgl_transaksi_start\"]);\r\n\t\t$apaket_tidak_transaksi_end=trim(@$_POST[\"apaket_tidak_tgl_transaksi_end\"]);\r\n\t\t$option=$_POST['currentlisting'];\r\n\t\t$filter=$_POST[\"query\"];\r\n\t\t\r\n\t\t$query = $this->m_master_ambil_paket->ambil_paket_export_excel($apaket_faktur\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t,$apaket_cust\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t,$apaket_paket\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t,$apaket_kadaluarsa\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t,$apaket_kadaluarsa_akhir\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t,$apaket_tgl_faktur\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t,$apaket_tgl_faktur_akhir\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t,$apaket_jenis\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t,$apaket_jenis_kadaluarsa\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t,$apaket_sisa,$apaket_transaksi_start, $apaket_transaksi_end, $apaket_tidak_transaksi_start, $apaket_tidak_transaksi_end\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t,$option\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t,$filter);\r\n\t\t\r\n\t\tto_excel($query,\"pengambilan_paket\"); \r\n\t\techo '1';\r\n\t\t\t\r\n\t}",
"public function exportExcelAction()\n {\n $fileName = 'curriculumdoc.xls';\n $content = $this->getLayout()->createBlock('bs_curriculumdoc/adminhtml_curriculumdoc_grid')\n ->getExcelFile();\n $this->_prepareDownloadResponse($fileName, $content);\n }",
"function export_xls() {\n $engagementconfs = Configure::read('engagementConf');\n $this->set('engagementconfs',$engagementconfs);\n $data = $this->Session->read('xls_export');\n //$this->Session->delete('xls_export'); \n $this->set('rows',$data);\n $this->render('export_xls','export_xls');\n }",
"public function export(Kelas $kelas)\n {\n $name = \"import nilai kelas {$kelas->nama_lengkap}.xlsx\";\n return Excel::download(new RaportExport($kelas), $name);\n }",
"function daftar_ambil_paket_export_excel(){\r\n\t\t//POST varibale here\r\n\t\t$dapaket_dpaket = isset($_POST['dapaket_dpaket']) ? $_POST['dapaket_dpaket'] : 0;\r\n\t\t$rawat_nama=trim(@$_POST[\"rawat_nama\"]);\r\n\t\t$dapaket_jumlah=trim(@$_POST[\"dapaket_jumlah\"]);\r\n\t\t$cust_nama=trim(@$_POST[\"cust_nama\"]);\r\n\t\t$tgl_ambil=trim(@$_POST[\"tgl_ambil\"]);\r\n\t\t$referal=trim(@$_POST[\"referal\"]);\r\n\t\t$keterangan=trim(@$_POST[\"keterangan\"]);\r\n\t\t$dapaket_stat_dok=trim(@$_POST[\"dapaket_stat_dok\"]);\r\n\t\t$option=$_POST['currentlisting'];\r\n\t\t$filter=$_POST[\"query\"];\r\n\t\t\r\n\t\t$query = $this->m_master_ambil_paket->daftar_ambil_paket_export_excel($rawat_nama\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ,$dapaket_jumlah\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ,$tgl_ambil\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ,$referal\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ,$keterangan\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ,$dapaket_stat_dok\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ,$cust_nama\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ,$option\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ,$filter,$dapaket_dpaket);\r\n\t\t\r\n\t\tto_excel($query,\"pengambilan_paket\"); \r\n\t\techo '1';\r\n\t\t\t\r\n\t}",
"public function export_excel2()\n\t{\n\t\t$this->load->library('phpexcel');\n\t\t$this->load->view('admin/function/xls_format');\n\t}",
"public function exportToExcel()\n {\n $data = $this->index();\n $availment_per_month_per_client = [];\n $availment_per_month_per_client['data'] = $data;\n // // use return view(path.of.blade.file, $data);\n return Excel::download(new AvailmentPerMonthPerClientExport($availment_per_month_per_client['data']), 'AVAILMENT PER MONTH PER CLIENT REPORT.xlsx');\n // return $data;\n }",
"public function export()\n {\n return Excel::download(new ProductExport, 'products.xlsx');\n // return (new ProductExport)->download('products.pdf', \\Maatwebsite\\Excel\\Excel\\::MDPDF);\n }",
"public function sales_report_export_xls() {\n\n //Read page parameter to display report\n $tenant_id = $this->session->userdata('userDetails')->tenant_id;\n $sales_exec = $this->input->get('sales_exec');\n $start_date = $this->input->get('start');\n $end_date = $this->input->get('end');\n \n\n $tabledata = $this->reportsModel->get_sales_report_data_xls($tenant_id, $start_date, $end_date, $sales_exec);\n $this->load->helper('export_helper');\n \n export_sales_report_xls($tabledata);\n }",
"function export_finance_canceled_angsuran()\n\t{\n\t\t$angsuran_id=$this->uri->segment(3);\n\t\t$datas = $this->model_transaction->get_angsuran_canceled($angsuran_id);\n\n\t\t// Create new PHPExcel object\n\t\t$objPHPExcel = $this->phpexcel;\n\t\t// Set document properties\n\t\t$objPHPExcel->getProperties()->setCreator(\"MICROFINANCE\")\n\t\t\t\t\t\t\t\t\t ->setLastModifiedBy(\"MICROFINANCE\")\n\t\t\t\t\t\t\t\t\t ->setTitle(\"Office 2007 XLSX Test Document\")\n\t\t\t\t\t\t\t\t\t ->setSubject(\"Office 2007 XLSX Test Document\")\n\t\t\t\t\t\t\t\t\t ->setDescription(\"REPORT, generated using PHP classes.\")\n\t\t\t\t\t\t\t\t\t ->setKeywords(\"REPORT\")\n\t\t\t\t\t\t\t\t\t ->setCategory(\"Test result file\");\n\t\t\t\t\t\t\t\t\t \n\t\t$objPHPExcel->setActiveSheetIndex(0); \n\t\t\n\t\t/*\n\t\t| BORDER OPTION\n\t\t*/\n\t\t$styleArray['borders']['outline']['style']=PHPExcel_Style_Border::BORDER_THIN;\n\t\t$styleArray['borders']['outline']['color']['rgb']='000000';\n\t\t/*\n\t\t| SET COLUMN WIDTH\n\t\t*/\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('A')->setWidth(15);\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('B')->setWidth(30);\n\n\t\t/*\n\t\t| ROW HEADER TITLE\n\t\t*/\n\t\t$row=1;\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('A'.$row,\"List Angsuran Dibatalkan\");\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row)->getFont()->setBold(true);\n\t\t\n\t\t$row+=1;\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('A'.$row,\"No. Pembiayaan\");\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('B'.$row,\"Nama\");\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row.':B'.$row)->getFont()->setBold(true);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row.':A'.$row)->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('B'.$row.':B'.$row)->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row.':B'.$row)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n\t\t$row+=1;\n\t\t/*\n\t\t| ROW DATA\n\t\t*/\n\t\tfor($i=0;$i<count($datas);$i++){\n\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('A'.$row,$datas[$i]['account_financing_no']);\n\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('B'.$row,$datas[$i]['nama']);\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row.':B'.$row)->getFont()->setSize(11);\n\t\t\t$row++;\n\t\t}\n\n\t\theader('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\n\t\theader('Content-Disposition: attachment;filename=\"ANGSURAN DIBATALKAN.xlsx\"');\n\t\theader('Cache-Control: max-age=0');\n\n\t\t$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');\n\t\t$objWriter->save('php://output');\n\t}",
"private function _downloadApplyExcel($dataProvider) {\r\n $objPHPExcel = new \\PHPExcel();\r\n \r\n // Set document properties\r\n $objPHPExcel->getProperties()\r\n ->setCreator(\"wuliu.youjian8.com\")\r\n ->setLastModifiedBy(\"wuliu.youjian8.com\")\r\n ->setTitle(\"youjian logistics order\")\r\n ->setSubject(\"youjian logistics order\")\r\n ->setDescription(\"youjian logistics order\")\r\n ->setKeywords(\"youjian logistics order\")\r\n ->setCategory(\"youjian logistics order\");\r\n $datas = $dataProvider->query->all();\r\n if ($datas) {\r\n $objPHPExcel->setActiveSheetIndex(0)\r\n ->setCellValue('A1', '申请人')\r\n ->setCellValue('B1', '开户行')\r\n ->setCellValue('C1', '状态')\r\n ->setCellValue('D1', '申请时间')\r\n ->setCellValue('E1', '会员号')\r\n ->setCellValue('F1', '开户名')\r\n ->setCellValue('G1', '银行卡号')\r\n ->setCellValue('H1', '银行')\r\n ->setCellValue('I1', '金额')\r\n ->setCellValue('J1', '付款时间')\r\n ->setCellValue('K1', '付款人');\r\n $i = 2;\r\n $objPHPExcel->setActiveSheetIndex(0)->getStyle('E')->getNumberFormat()->setFormatCode(\\PHPExcel_Style_NumberFormat::FORMAT_TEXT);\r\n $objPHPExcel->setActiveSheetIndex(0)->getStyle('G')->getNumberFormat()->setFormatCode(\\PHPExcel_Style_NumberFormat::FORMAT_TEXT);\r\n $objPHPExcel->setActiveSheetIndex(0)->getStyle('I')->getNumberFormat()->setFormatCode(\\PHPExcel_Style_NumberFormat::FORMAT_TEXT);\r\n foreach ($datas as $model) {\r\n // Add some data\r\n $objPHPExcel->setActiveSheetIndex(0)->setCellValue('A'.$i, ArrayHelper::getValue($model, 'userTrueName.user_truename'));\r\n $objPHPExcel->setActiveSheetIndex(0)->setCellValue('B'.$i, ArrayHelper::getValue($model, 'bankInfo.bank_info_bank_address'));\r\n $objPHPExcel->setActiveSheetIndex(0)->setCellValue('C'.$i, $model->getStatusName());\r\n $objPHPExcel->setActiveSheetIndex(0)->setCellValue('D'.$i, date('Y-m-d H:i', $model->add_time));\r\n $objPHPExcel->setActiveSheetIndex(0)->setCellValueExplicit('E'.$i, ''.ArrayHelper::getValue($model, 'userTrueName.username'));\r\n $objPHPExcel->setActiveSheetIndex(0)->setCellValue('F'.$i, ArrayHelper::getValue($model, 'bankInfo.bank_info_account_name'));\r\n $objPHPExcel->setActiveSheetIndex(0)->setCellValueExplicit('G'.$i, ''.ArrayHelper::getValue($model, 'bankInfo.bank_info_card_no'));\r\n $objPHPExcel->setActiveSheetIndex(0)->setCellValue('H'.$i, ArrayHelper::getValue($model, 'bankInfo.bank_info_bank_name'));\r\n $objPHPExcel->setActiveSheetIndex(0)->setCellValueExplicit('I'.$i, ''.$model->amount);\r\n $objPHPExcel->setActiveSheetIndex(0)->setCellValue('J'.$i, $model->pay_time?date('Y-m-d H:i', $model->pay_time):'');\r\n $objPHPExcel->setActiveSheetIndex(0)->setCellValue('K'.$i, $model->pay_user_id?ArrayHelper::getValue($model, 'adminUserName.username'):'');\r\n $i++;\r\n }\r\n }\r\n \r\n // Rename worksheet\r\n $objPHPExcel->getActiveSheet()->setTitle('提现记录');\r\n \r\n \r\n // Set active sheet index to the first sheet, so Excel opens this as the first sheet\r\n $objPHPExcel->setActiveSheetIndex(0);\r\n \r\n \r\n // Redirect output to a client’s web browser (Excel5)\r\n header('Content-Type: application/vnd.ms-excel');\r\n header('Content-Disposition: attachment;filename=\"提现记录.xls\"');\r\n header('Cache-Control: max-age=0');\r\n // If you're serving to IE 9, then the following may be needed\r\n header('Cache-Control: max-age=1');\r\n \r\n // If you're serving to IE over SSL, then the following may be needed\r\n header ('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past\r\n header ('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); // always modified\r\n header ('Cache-Control: cache, must-revalidate'); // HTTP/1.1\r\n header ('Pragma: public'); // HTTP/1.0\r\n \r\n $objWriter = \\PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');\r\n $objWriter->save('php://output');\r\n exit;\r\n }",
"function exportToExcel($exportConfigData){\n $files = glob('../lib/Excel/*');\n if(isset($files[0])){\n unlink($files[0]); \n }\n\n if(!isset($exportConfigData['exportOptions'])){\n return;\n }\n\n $marginTop = 1;\n $marginLeft = 1;\n\n include_once('../lib/PHPExcel/IOFactory.php');\n\n $feildsNum = count($exportConfigData['exportOptions']);\n if(isset($_SESSION['sort'])){\n $sortBy = $_SESSION['sort'];\n unset($_SESSION['sort']);\n }\n $first = NULL;\n $second = NULL;\n if(isset($exportConfigData[\"groupingOptions\"])){\n if(isset($exportConfigData[\"groupingOptions\"][\"first\"])){\n $first = trim($exportConfigData[\"groupingOptions\"][\"first\"]);\n }\n if(isset($exportConfigData[\"groupingOptions\"][\"second\"])){\n $second = trim($exportConfigData[\"groupingOptions\"][\"second\"]);\n }\n }\n $query = excelGroupByQuery($first, $second);\n $q = $GLOBALS['db']->query($query);\n\n //set the desired name of the excel file\n if(isset($exportConfigData['title'])){\n $fileName = $exportConfigData['title'];\n } else{\n $fileName = \"excelSheet\";\n }\n \n $objPHPExcel = new PHPExcel();\n\n // Set document properties\n $objPHPExcel->getProperties()->setCreator(\"Me\")->setLastModifiedBy(\"Me\")->setTitle($exportConfigData['title'])->setSubject($exportConfigData['title'])->setDescription(\"Excel Sheet\")->setKeywords(\"Excel Sheet\")->setCategory(\"Me\");\n\n // Set active sheet index to the first sheet, so Excel opens this as the first sheet\n $objPHPExcel->setActiveSheetIndex(0);\n\n $headerStyle = array('font' => array('size' => 15,'bold' => true,'color' => array('rgb' => '444444')));\n\n // Printing Feilds Header Name\n for($i=0; $i<$feildsNum; $i++){\n $objPHPExcel->getActiveSheet()->setCellValue( chr(66 + $i) . \"\" . ($marginTop + 1), $exportConfigData['exportOptions'][$i]);\n $objPHPExcel->getActiveSheet()->getStyle(chr(66 + $i) . \"\" . ($marginTop + 1))->applyFromArray($headerStyle);\n }\n\n // Printing Data\n $rows = $q->fetchAll();\n $rowsNum = count($rows);\n for($j = 0; $j < $rowsNum; $j++){\n for($i=0; $i<$feildsNum; $i++){\n $objPHPExcel->getActiveSheet()->setCellValue( chr(66 + $i) . \"\" . ($marginTop + 2 + $j), $rows[$j][$exportConfigData['exportOptions'][$i]]);\n }\n }\n\n // Set worksheet title\n $objPHPExcel->getActiveSheet()->setTitle($fileName);\n\n $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');\n $objWriter->save('../lib/Excel/' . $fileName . '.xlsx');\n\n // Redirect output to a client’s web browser (Excel2007)\n /*\n header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\n header('Content-Disposition: attachment;filename=\"' . $fileName . '.xlsx\"');\n header('Cache-Control: max-age=0');\n\n $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');\n $objWriter->save('php://output');*/\n }",
"public function actionExportExcel()\n {\n //$searchModel = new SecuritasSearch();\n //$dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n $session = Yii::$app->session;\n $renderHarvestPlantReport = $session->get('renderHarvestPlantReport');\n\n $objReader = \\PHPExcel_IOFactory::createReader('Excel2007');\n $template = Yii::getAlias('@app/views/'.$this->id).'/_export.xlsx';\n $objPHPExcel = $objReader->load($template);\n $activeSheet = $objPHPExcel->getActiveSheet();\n $border_style= [\n 'borders' => [\n 'allborders' => [\n 'style' =>\\PHPExcel_Style_Border::BORDER_THIN,\n 'color' => ['argb' => '000000'],\n ]\n ]\n ];\n $text_center = ['horizontal' => \\PHPExcel_Style_Alignment::HORIZONTAL_CENTER];\n $font_bold9 = ['font' => [\n 'bold' => true,\n 'color' => ['rgb' => '000000'],\n 'size' => 9,\n 'name' => 'Calibri',\n ]];\n $font_bold8 = ['font' => [\n 'bold' => true,\n 'color' => ['rgb' => '000000'],\n 'size' => 8,\n 'name' => 'Calibri',\n ]];\n $bg_gray = [\n 'fill' => [\n 'type' => \\PHPExcel_Style_Fill::FILL_SOLID,\n 'color' => ['rgb' => 'dddddd']\n ]\n ];\n\n $activeSheet->setCellValue('G2', 'print at '.date('d-M-Y H:i:s'));\n\n $years = 'Semua';\n if(!empty($renderHarvestPlantReport['years'])){\n $years = implode(', ', $renderHarvestPlantReport['years']);\n }\n $activeSheet->setCellValue('C3', $years);\n\n $quarters = 'Semua';\n if(!empty($renderHarvestPlantReport['quarters'])){\n $quarters = implode(', ', $renderHarvestPlantReport['quarters']);\n }\n $activeSheet->setCellValue('C4', $quarters);\n\n $states = 'Semua';\n if(!empty($renderHarvestPlantReport['states'])){\n $states = implode(', ', $renderHarvestPlantReport['states']);\n }\n $activeSheet->setCellValue('C5', $states);\n\n $typePlants2 = 'Semua';\n if(!empty($renderHarvestPlantReport['typePlants2'])){\n $typePlants2 = implode(', ', $renderHarvestPlantReport['typePlants2']);\n }\n $activeSheet->setCellValue('C7', $typePlants2);\n\n $typePlants = $renderHarvestPlantReport['typePlants'];\n $stateCount = $renderHarvestPlantReport['stateCount'];\n $startRow = 11;\n $i=0;\n foreach ($typePlants as $typePlant) {\n if($i==0) $row = $startRow+$i;\n else $row++;\n //$activeSheet->insertNewRowBefore($row,1);\n $activeSheet->setCellValue('A'.$row, Helpers::columnLetter($i+1));\n $activeSheet->setCellValue('B'.$row, $typePlant->name);\n $activeSheet->getStyle(\"A\".$row.\":B\".$row)->applyFromArray($font_bold9);\n $activeSheet->getStyle(\"A\".$row.\":A\".$row)->getAlignment()->applyFromArray($text_center);\n $plants = Plant::find()\n ->where(['type_plant_id'=>$typePlant->id])\n ->all();\n $idx_plant = 0;\n foreach ($plants as $plant) {\n //$activeSheet->insertNewRowBefore($row,1);\n $row++;\n $activeSheet->setCellValue('B'.$row, $idx_plant+1);\n $activeSheet->setCellValue('C'.$row, $plant->name);\n $activeSheet->getStyle(\"B\".$row.\":C\".$row)->applyFromArray($font_bold8);\n $activeSheet->getStyle(\"B\".$row.\":B\".$row)->getAlignment()->applyFromArray($text_center);\n\n $where['plant_id']=$plant->id;\n if(!empty($renderHarvestPlantReport['years'])) $where['year']=$renderHarvestPlantReport['years'];\n if(!empty($renderHarvestPlantReport['quarters'])) $where['quarter']=$renderHarvestPlantReport['quarters'];\n if(!empty($renderHarvestPlantReport['stateIds'])) $where['state_id']=$renderHarvestPlantReport['stateIds'];\n $harvestPlants = HarvestPlant::find()\n ->select(\"\n sum(param1) as sparam1,\n sum(param2) as sparam2,\n sum(param3) as sparam3,\n sum(param4) as sparam4,\n sum(param5) as sparam5,\n group_concat(note1) as gcnote1,\n group_concat(note2) as gcnote2,\n group_concat(note3) as gcnote3,\n group_concat(note4) as gcnote4,\n group_concat(note5) as gcnote5,\n count(state_id) as cstate\n \")\n ->where($where)\n ->asArray()\n ->one();\n $params = explode('|', $typePlant->params);\n $units = explode('|', $typePlant->units);\n if(count($params)>0 and count($units)>0 and count($params)==count($units)){\n $combines = array_combine($params, $units);\n $idx = 1;\n $row++;\n $starRowTable = $row;\n $activeSheet->setCellValue('B'.$row, 'NO');\n $activeSheet->setCellValue('C'.$row, 'PARAMETER');\n $activeSheet->setCellValue('D'.$row, 'NILAI');\n $activeSheet->setCellValue('E'.$row, 'SATUAN');\n $activeSheet->setCellValue('F'.$row, 'KETERANGAN');\n $activeSheet->setCellValue('G'.$row, 'DATA MASUK');\n $activeSheet->getStyle('B'.$row.':G'.$row)->applyFromArray($bg_gray);\n foreach ($combines as $param => $unit) {\n $row++;\n $activeSheet->setCellValue('B'.$row, $idx);\n $activeSheet->setCellValue('C'.$row, $param);\n $activeSheet->setCellValue('D'.$row, $harvestPlants['sparam'.$idx]);\n $activeSheet->setCellValue('E'.$row, $unit);\n //$activeSheet->getStyle(\"F\".$row)->getAlignment()->setWrapText(true);\n //$activeSheet->getDefaultRowDimension()->setRowHeight(-1);\n $activeSheet->getRowDimension($row)->setRowHeight(-1);\n $activeSheet->setCellValue('F'.$row, $harvestPlants['gcnote'.$idx]. ' lorem ipsum sit dolor amet lorem ipsum sit dolor amet lorem ipsum sit dolor amet lorem ipsum sit dolor amet ');\n $data = number_format(($harvestPlants['cstate']/$stateCount)*100,2);\n $activeSheet->setCellValue('G'.$row, $data.'%');\n $idx++;\n }\n $activeSheet->getStyle(\"B\".$starRowTable.\":G\".$row)->applyFromArray($border_style);\n $activeSheet->getStyle(\"B\".$starRowTable.\":G\".$row)->getAlignment()->applyFromArray($text_center);\n $activeSheet->getStyle(\"F\".($starRowTable+1).\":F\".$row)->getAlignment()->setWrapText(true);\n\n }\n $row++;\n $idx_plant++;\n }\n $i++;\n }\n header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\n header('Content-Disposition: attachment;filename=\"'.$this->id.'_'.date('YmdHis').'.xlsx\"');\n header('Cache-Control: max-age=0');\n $objWriter = \\PHPExcel_IOFactory::createWriter($objPHPExcel, \"Excel2007\");\n $objWriter->save('php://output');\n exit;\n }",
"public function actionExport()\n {\n // export data to excel file\n return $this->render('export');\n }",
"public function export(Request $request)\n {\n //trait validasi\n \t$this->validate($request,[\n \t\t'jurusan' => 'required',\n \t\t'status' => 'required',\n \t]);\n \t//mengambil data peserta berdasarkan filter->jurusan dan filter->status\n \t$peserta_list = Peserta::whereIn('id_jurusan',$request->get('jurusan'))\n \t\t\t\t\t\t\t->whereIn('id_status',$request->get('status'))\n \t\t\t\t\t\t\t->get();\n //membuat file excel dengan nama-> Data PSB Panjatek\n \t$excel = Excel::create('Data PSB SMK Panjatek-'.date('YmdHis'), function($excel) use($peserta_list){\n //Set Property\n $excel->setTitle('Data PSB SMK Panjatek')\n ->setCreator(Auth::user()->name);\n //memberi nama Sheet\n $excel->sheet('Data PSB SMK Panjatek', function($sheet) use($peserta_list){\n $row = 1;\n //style sheeet excel\n $sheet->freezeFirstRow();\n //memakai border untuk header\n $sheet->cells('A1:AT1', function($cells) {\n\t\t\t\t $cells->setFont(array(\n\t\t\t\t\t 'family' => 'Calibri',\n\t\t\t\t\t 'size' => '16',\n\t\t\t\t\t 'bold' => true\n\t\t\t\t\t));\n\t\t\t\t\t$cells->setBorder('A1:AT1', 'thin');\n\t\t\t\t});\n //header\n $sheet->row($row,[\n 'No.Pendaftaran',\n 'Nama Lengkap',\n 'Status',\n 'Program Keahlian',\n 'Email',\n 'Tempat Lahir',\n 'Tanggal Lahir',\n 'Jenis Kelamin',\n 'Agama',\n 'Alamat',\n 'No.Telp',\n 'No.HP',\n 'Tahun Lulus',\n 'File Foto',\n\n 'Nama Sekolah Asal',\n 'Alamat Sekolah Asal',\n\n 'Nama Ayah',\n 'Tempat Lahir Ayah',\n 'Tanggal Lahir Ayah',\n 'Agama Ayah',\n 'Pendidikan Ayah',\n 'Pekerjaan Ayah',\n 'Penghasilan Ayah',\n 'No.Telp Ayah',\n 'No.HP Ayah',\n 'Alamat Ayah',\n\n 'Nama Ibu',\n 'Tempat Lahir Ibu',\n 'Tanggal Lahir Ibu',\n 'Agama Ibu',\n 'Pendidikan Ibu',\n 'Pekerjaan Ibu',\n 'Penghasilan Ibu',\n 'No.Telp Ibu',\n 'No.HP Ibu',\n 'Alamat Ibu',\n\n 'Nama Wali',\n 'Tempat Lahir Wali',\n 'Tanggal Lahir Wali',\n 'Agama Wali',\n 'Pendidikan Wali',\n 'Pekerjaan Wali',\n 'Penghasilan Wali',\n 'No.Telp Wali',\n 'No.HP Wali',\n 'Alamat Wali',\n\n ]);\n //data peserta PSB\n foreach($peserta_list as $peserta){\n $sheet->row(++$row, [\n $peserta->id,\n $peserta->nama,\n $peserta->status->nama,\n $peserta->jurusan->nama,\n $peserta->user->email,\n $peserta->tempat_lahir,\n $peserta->tanggal_lahir->format('d-m-Y'),\n $peserta->jenis_kelamin,\n $peserta->agama,\n $peserta->alamat,\n $peserta->telepon,\n $peserta->no_hp,\n $peserta->tahun_lulus,\n $peserta->foto,\n\n $peserta->sekolah->nama,\n $peserta->sekolah->alamat,\n\n $peserta->ayah->nama,\n $peserta->ayah->tempat_lahir,\n $peserta->ayah->tanggal_lahir->format('d-m-Y'),\n $peserta->ayah->agama,\n $peserta->ayah->pendidikan,\n $peserta->ayah->pekerjaan,\n $peserta->ayah->gaji,\n $peserta->ayah->telepon,\n $peserta->ayah->no_hp,\n $peserta->ayah->alamat,\n\n $peserta->ibu->nama,\n $peserta->ibu->tempat_lahir,\n $peserta->ibu->tanggal_lahir->format('d-m-Y'),\n $peserta->ibu->agama,\n $peserta->ibu->pendidikan,\n $peserta->ibu->pekerjaan,\n (!empty($peserta->ibu->gaji)) ? $peserta->ibu->gaji : '-',\n $peserta->ibu->telepon,\n $peserta->ibu->no_hp,\n $peserta->ibu->alamat,\n\n $peserta->wali->nama,\n $peserta->wali->tempat_lahir,\n (!empty($peserta->wali->tanggal_lahir)) ? $peserta->wali->tanggal_lahir->format('d-m-Y') : '-',\n $peserta->wali->agama,\n $peserta->wali->pendidikan,\n $peserta->wali->pekerjaan,\n (!empty($peserta->wali->gaji)) ? $peserta->wali->gaji : '-',\n $peserta->wali->telepon,\n $peserta->wali->no_hp,\n $peserta->wali->alamat,\n ]);\n }\n });\n })->export('xls');\n }",
"public function actionExport(){\t\n\t\t$tglIn=date(\"Y-m-d\");\n\t\t\t\n\t\t//Search STATUS\n\t\t$searchModel = new StoreSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\t\t\t\t\n\t\t//Models\n\t\t$model=$dataProvider->getModels();\n\t\t//Models\n\t\t$aryStore=ArrayHelper::toArray($model);\t\t\t\n\t\t\n\t\t// print_r($aryStore);\n\t\t// die();\n\t\t//Excute - Export Excel.\t\t\n\t\t$excel_content = [\n\t\t\t[\n\t\t\t\t'sheet_name' => 'RasaSayang-Store',\t\t\t\t\t\n\t\t\t\t'sheet_title' => [\n\t\t\t\t\t['OUTLET_BARCODE','OUTLET_NM','LOCATE','LOCATE_SUB','ALAMAT','PIC','TLP','STATUS','CREATE_BY','CREATE_AT','UPDATE_BY,UPDATE_AT']\n\t\t\t\t],\n\t\t\t\t'ceils' =>$aryStore,\n\t\t\t\t'freezePane' => 'A2',\n\t\t\t\t'headerColor' => Postman4ExcelBehavior::getCssClass(\"header\"),\n\t\t\t\t'columnGroup'=>[''],\n\t\t\t\t'autoSize'=>false,\n\t\t\t\t'headerStyle'=>[\t\t\t\t\t\n\t\t\t\t\t[\n\t\t\t\t\t\t'OUTLET_BARCODE' => ['font-size'=>'8','align'=>'center','width'=>'28.14','valign'=>'center','wrap'=>true],\n\t\t\t\t\t\t'OUTLET_NM' => ['font-size'=>'8','align'=>'center','width'=>'8.14','valign'=>'center'],\t\t\t\t\t\t\t\n\t\t\t\t\t\t'LOCATE' =>['font-size'=>'8','align'=>'center','width'=>'11','valign'=>'center'],\n\t\t\t\t\t\t'LOCATE_SUB' =>['font-size'=>'8','align'=>'center','width'=>'11','valign'=>'center'],\n\t\t\t\t\t\t'ALAMAT' =>['font-size'=>'8','align'=>'center','width'=>'11','valign'=>'center'],\n\t\t\t\t\t\t'PIC' => ['font-size'=>'8','align'=>'center','width'=>'7','valign'=>'center'],\n\t\t\t\t\t\t'TLP' =>['font-size'=>'8','align'=>'center','width'=>'29.29','wrap'=>true,'valign'=>'center',], \n\t\t\t\t\t\t'STATUS' =>['font-size'=>'8','align'=>'center','width'=>'34.14','wrap'=>true,'valign'=>'center',],\n\t\t\t\t\t\t'CREATE_BY' => ['font-size'=>'8','align'=>'center','width'=>'34.14','wrap'=>true,'valign'=>'center',],\n\t\t\t\t\t\t'CREATE_AT' => ['font-size'=>'8','align'=>'center','width'=>'34.14','wrap'=>true,'valign'=>'center',],\t\t\t\t\t\n\t\t\t\t\t\t'UPDATE_BY' => ['font-size'=>'8','align'=>'center','width'=>'14.86','valign'=>'center'],\t\t\t\t\t\t\n\t\t\t\t\t\t'UPDATE_AT' => ['font-size'=>'8','align'=>'center','width'=>'15','valign'=>'center']\n\t\t\t\t\t]\n\t\t\t\t\t\n\t\t\t\t],\n\t\t\t\t'contentStyle'=>[\n\t\t\t\t\t[\t\t\t\t\t\t\n\t\t\t\t\t\t'OUTLET_BARCODE' => ['font-size'=>'8','align'=>'left',],\n\t\t\t\t\t\t'OUTLET_NM' => ['font-size'=>'8','align'=>'left'],\t\t\t\t\t\t\t \n\t\t\t\t\t\t'LOCATE' =>['font-size'=>'8','align'=>'center'],\n\t\t\t\t\t\t'LOCATE_SUB' =>['font-size'=>'8','align'=>'center'],\n\t\t\t\t\t\t'ALAMAT' =>['font-size'=>'8','align'=>'center'],\n\t\t\t\t\t\t'PIC' => ['font-size'=>'8','align'=>'center'],\n\t\t\t\t\t\t'TLP' =>['font-size'=>'8','align'=>'left'],\n\t\t\t\t\t\t'STATUS' =>['font-size'=>'8','align'=>'left'],\n\t\t\t\t\t\t'KOMPENSASI' => ['font-size'=>'8','align'=>'left'],\n\t\t\t\t\t\t'CREATE_BY' => ['font-size'=>'8','align'=>'left'],\n\t\t\t\t\t\t'CREATED_BY' => ['font-size'=>'8','align'=>'left'],\t\t\t\t\t\t\n\t\t\t\t\t\t'UPDATE_BY' => ['font-size'=>'8','align'=>'center'],\t\t\t\t\t\t\n\t\t\t\t\t\t'UPDATE_AT' => ['align'=>'left']\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t]\n\t\t\t\t], \n\t\t\t\t'oddCssClass' => Postman4ExcelBehavior::getCssClass(\"odd\"),\n\t\t\t\t'evenCssClass' => Postman4ExcelBehavior::getCssClass(\"even\"),\n\t\t\t],\t\t\t\n\t\t];\n\t\t$excel_file = \"RasaSayang-Store\".\"-\".$tglIn;\n\t\t$this->export4excel($excel_content, $excel_file,0); \n\t}",
"public function exportar_productos_requerimientos($com_id){\n date_default_timezone_set('America/Lima');\n $componente = $this->model_componente->get_componente($com_id); //// DATOS COMPONENTE\n $fase=$this->model_faseetapa->get_fase($componente[0]['pfec_id']); /// DATOS FASE\n $proyecto = $this->model_proyecto->get_id_proyecto($fase[0]['proy_id']); //// DATOS PROYECTO\n $prod=$this->requerimientos_operaciones($com_id);\n //la fecha de exportación sera parte del nombre del archivo Excel\n $fecha = date(\"d-m-Y H:i:s\");\n\n //Inicio de exportación en Excel\n header('Content-type: application/vnd.ms-excel;charset=UTF-8');\n header(\"Content-Disposition: attachment; filename=Reporte_requerimientos_Operación_\".$componente[0]['com_componente'].\"_$fecha.xls\"); //Indica el nombre del archivo resultante\n header(\"Pragma: no-cache\");\n header(\"Expires: 0\");\n\n echo '\n <table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" class=\"tabla\">\n <tr class=\"modo1\">\n <td colspan=\"21\"></td>\n </tr>\n <tr class=\"modo1\">\n <td colspan=\"21\">\n <FONT FACE=\"courier new\" size=\"1\">\n <b>ENTIDAD : </b>'.$this->session->userdata('entidad').'<br>\n <b>PLAN OPERATIVO ANUAL POA : </b> ' . $this->gestion . '<br>\n <b>REPORTE : </b> REQUERIMIENTOS POR OPERACIONES REGISTRADAS<br>\n <b>ACTIVIDAD : </b>'.$proyecto[0]['aper_programa'].''.$proyecto[0]['aper_proyecto'].''.$proyecto[0]['aper_actividad'].' - '.mb_convert_encoding(''.$proyecto[0]['proy_nombre'], 'cp1252', 'UTF-8').'<br>\n <b>SUB ACTIVIDAD : </b>'.$componente[0]['serv_cod'].'-'.mb_convert_encoding(''.$componente[0]['com_componente'], 'cp1252', 'UTF-8').'<br>\n </font>\n </td>\n </tr>\n </table><br>';\n echo \"\".$prod.\"\";\n }",
"function export($config, $view) {\n\t\t$objPHPExcel = new PHPExcel();\n\t\t$objPHPExcel->getProperties()->setCreator('HITS Soluciones Informáticas');\n\t\t$objPHPExcel->getActiveSheetIndex(0);\n\t\t$objPHPExcel->getActiveSheet()->setTitle($config['title']);//Titulo como variable\n\t\t$column = 0;\n\t\t$row = 1;\n\t\tif($config['header']) {\n\t\t\tforeach ($config['header'] as $header) {\n\t\t\t\t$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($column, $row, $header);\n\t\t\t\t$column++;\n\t\t\t}\n\t\t\t$column = 0;\n\t\t\t$row++;\n\t\t}\n\t\tforeach ($view as $record) {\n\t\t\tforeach ($record as $value) {\n\t\t\t\t$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($column, $row, $value);\n\t\t\t\t$column++;\n\t\t\t}\n\t\t\t$column = 0;\n\t\t\t$row++;\n\t\t}\n\t\tfor ($i = 'A'; $i <= 'Z'; $i++){\n\t\t\t$objPHPExcel->getActiveSheet()->getColumnDimension($i)->setAutoSize(true); \n\t\t}\n\t\t$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');\n\t\theader('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\n\t\theader('Content-Disposition: attachment;filename=\"'.$config['title'].'.xlsx');\n\t\theader('Cache-Control: max-age=0');\n\t\t$objWriter->save('php://output');\n\t}",
"public function exportExcelAction()\n {\n $fileName = 'equipment.xls';\n $content = $this->getLayout()->createBlock('bs_logistics/adminhtml_equipment_grid')\n ->getExcelFile();\n $this->_prepareDownloadResponse($fileName, $content);\n }",
"function master_jual_rawat_export_excel(){\r\n\t\t//POST varibale here\r\n\t\t$jrawat_nobukti=trim(@$_POST[\"jrawat_nobukti\"]);\r\n\t\t$jrawat_nobukti=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$jrawat_nobukti);\r\n\t\t$jrawat_nobukti=str_replace(\"'\", '\"',$jrawat_nobukti);\r\n\t\t$jrawat_cust=trim(@$_POST[\"jrawat_cust\"]);\r\n\t\t$jrawat_diskon=trim(@$_POST[\"jrawat_diskon\"]);\r\n\t\t$jrawat_cashback=trim(@$_POST[\"jrawat_cashback\"]);\r\n\t\t$jrawat_voucher=trim(@$_POST[\"jrawat_voucher\"]);\r\n\t\t$jrawat_voucher=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$jrawat_voucher);\r\n\t\t$jrawat_voucher=str_replace(\"'\", '\"',$jrawat_voucher);\r\n\t\t$jrawat_cara=trim(@$_POST[\"jrawat_cara\"]);\r\n\t\t$jrawat_cara=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$jrawat_cara);\r\n\t\t$jrawat_cara=str_replace(\"'\", '\"',$jrawat_cara);\r\n\t\t$jrawat_bayar=trim(@$_POST[\"jrawat_bayar\"]);\r\n\t\t$jrawat_keterangan=trim(@$_POST[\"jrawat_keterangan\"]);\r\n\t\t$jrawat_keterangan=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$jrawat_keterangan);\r\n\t\t$jrawat_keterangan=str_replace(\"'\", '\"',$jrawat_keterangan);\r\n\t\t$jrawat_stat_dok=trim(@$_POST[\"jrawat_stat_dok\"]);\r\n\t\t$jrawat_stat_dok=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$jrawat_stat_dok);\r\n\t\t$jrawat_stat_dok=str_replace(\"'\", '\"',$jrawat_stat_dok);\r\n\t\t\r\n\t\t$jrawat_tgl_start=trim(@$_POST[\"jrawat_tgl_start\"]);\r\n\t\t$jrawat_tgl_end=trim(@$_POST[\"jrawat_tgl_end\"]);\r\n\t\t\r\n\t\t$option=$_POST['currentlisting'];\r\n\t\t$filter=$_POST[\"query\"];\r\n\t\t\r\n\t\t$query = $this->m_master_jual_rawat->master_jual_rawat_export_excel($jrawat_nobukti\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t,$jrawat_cust\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t,$jrawat_diskon\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t,$jrawat_stat_dok\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t,$jrawat_cashback\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t,$jrawat_voucher\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t,$jrawat_cara\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t,$jrawat_bayar\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t,$jrawat_keterangan\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t,$jrawat_tgl_start\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t,$jrawat_tgl_end\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t,$option\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t,$filter);\r\n\t\t\r\n\t\tto_excel($query,\"master_jual_rawat\"); \r\n\t\techo '1';\r\n\t\t\t\r\n\t}",
"public function export(){\n\t $list_id = $this->uri->segment(3);\n\t $list_name = $this->distributiondata->getinfobyid('title',$list_id); \n\t \t$query = $this->distributionemails->getbyattribute('list_id',$list_id);\n\t\t\tif ($query->num_rows() > 0){\n\t\t\t\t$header[] = \"Email\";\n\t\t\t\t$header[] = \"Owner\";\n\t\t\t\t$header[] = \"Domains\";\n\t\t\t\t$this->exportxls->addHeader($header);\n\t\t\t\t\n\t\t\t\tforeach ($query->result() as $row){\n\t\t\t\t\t\n\t\t\t\t\t\t$data_row = array();\n\t\t\t\t\t\t$data_row[] = $row->email;\n\t\t\t\t\t\t$data_row[] = $row->owner;\n\t\t\t\t\t\t$data_row[] = $row->domains;\n\t\t\t\t\t\t$this->exportxls->addRow($data_row);\n\t\t\t\t }\n\t\t\t}\n\t\t\n\t\t$list_name = str_replace(' ','',strtolower($list_name));\n\t\t$this->exportxls->sendFile($list_name.'.xls');\n\t}",
"public function horometersExcel(){ \n return Excel::download(new HorometersExport, 'horometros-list-'.date('Y-m-d_H:i:s').'.xlsx');\n }",
"function alat_export_excel(){\r\n\t\t//POST varibale here\r\n\t\t$alat_id=trim(@$_POST[\"alat_id\"]);\r\n\t\t$alat_nama=trim(@$_POST[\"alat_nama\"]);\r\n\t\t$alat_nama=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$alat_nama);\r\n\t\t$alat_nama=str_replace(\"'\", '\"',$alat_nama);\r\n\t\t$alat_jumlah=trim(@$_POST[\"alat_jumlah\"]);\r\n\t\t$alat_aktif=trim(@$_POST[\"alat_aktif\"]);\r\n\t\t$alat_aktif=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$alat_aktif);\r\n\t\t$alat_aktif=str_replace(\"'\", '\"',$alat_aktif);\r\n\t\t$alat_creator=trim(@$_POST[\"alat_creator\"]);\r\n\t\t$alat_creator=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$alat_creator);\r\n\t\t$alat_creator=str_replace(\"'\", '\"',$alat_creator);\r\n\t\t$alat_date_create=trim(@$_POST[\"alat_date_create\"]);\r\n\t\t$alat_update=trim(@$_POST[\"alat_update\"]);\r\n\t\t$alat_update=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$alat_update);\r\n\t\t$alat_update=str_replace(\"'\", '\"',$alat_update);\r\n\t\t$alat_date_update=trim(@$_POST[\"alat_date_update\"]);\r\n\t\t$alat_revised=trim(@$_POST[\"alat_revised\"]);\r\n\t\t$option=$_POST['currentlisting'];\r\n\t\t$filter=$_POST[\"query\"];\r\n\t\t\r\n\t\t$query = $this->m_alat->alat_export_excel($alat_id ,$alat_nama ,$alat_jumlah ,$alat_aktif ,$alat_creator ,$alat_date_create ,$alat_update ,$alat_date_update ,$alat_revised ,$option,$filter);\r\n\t\t\r\n\t\tto_excel($query,\"alat\"); \r\n\t\techo '1';\r\n\t\t\t\r\n\t}",
"public function exportExcelAction()\n {\n $fileName = 'offer.xls';\n $content = $this->getLayout()->createBlock('mfb_myflyingbox/adminhtml_offer_grid')\n ->getExcelFile();\n $this->_prepareDownloadResponse($fileName, $content);\n }",
"public function exportExcelAction()\n {\n $fileName = 'handovertwo.xls';\n $content = $this->getLayout()->createBlock('bs_handover/adminhtml_handovertwo_grid')\n ->getExcelFile();\n $this->_prepareDownloadResponse($fileName, $content);\n }",
"public function exportExcelAction()\n {\n $fileName = 'traineedoc.xls';\n $content = $this->getLayout()->createBlock('bs_traineedoc/adminhtml_traineedoc_grid')\n ->getExcelFile();\n $this->_prepareDownloadResponse($fileName, $content);\n }",
"public function exportExcelAction()\n {\n $fileName = 'aircraft.xls';\n $content = $this->getLayout()->createBlock('bs_misc/adminhtml_aircraft_grid')\n ->getExcelFile();\n $this->_prepareDownloadResponse($fileName, $content);\n }",
"public function actionExport() {\n $models = Package::model()->findAll();\n //code\n $objPHPExcel = new PHPExcel();\n /** Error reporting */\n error_reporting(E_ALL);\n ini_set('display_errors', TRUE);\n ini_set('display_startup_errors', TRUE);\n define('EOL', (PHP_SAPI == 'cli') ? PHP_EOL : '<br />');\n date_default_timezone_set('Europe/London');\n /** PHPExcel_IOFactory */\n $objReader = new PHPExcel;\n $objReader = PHPExcel_IOFactory::createReader('Excel2007');\n $path = Yii::app()->basePath . '/../export/template.xlsx';\n $pathExport = Yii::app()->basePath . '/../export/daftar paket.xlsx';\n $objPHPExcel = $objReader->load($path);\n $objPHPExcel->setActiveSheetIndex(0);\n// \" Add new data to the template\"\n $sheet = $objPHPExcel->getActiveSheet();\n $row = 5;\n $rowData1 = $row - 1;\n $rowData2 = $row - 1;\n $rowData3 = $row - 1;\n $rowData4 = $row - 1;\n $rowData5 = $row - 1;\n $sheet->insertNewRowBefore($row, (count($models) - 1));\n for ($i = 1; $i <= count($models); $i++) {\n $sheet->setCellValue('A' . (($row - 2) + $i), $i);\n }\n foreach ($models as $model) {\n $sheet->setCellValue('B' . $rowData1++, \"$model->code\");\n $sheet->setCellValueExplicit('C' . $rowData2++, $model->ppk_code, PHPExcel_Cell_DataType::TYPE_STRING);\n $sheet->setCellValue('D' . $rowData3++, $model->limit);\n $sheet->setCellValue('E' . $rowData4++, $model->getTotal($model->code)[\"realization\"]);\n $sheet->setCellValue('F' . $rowData5++, $model->getTotal($model->code)[\"restMoney\"]);\n }\n $objPHPExcel->getActiveSheet()->setTitle('Daftar Paket');\n\n $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');\n $objWriter->save($pathExport);\n header('Content-Description: File Transfer');\n header('Content-Type: application/octet-stream');\n header('Content-Disposition: attachment; filename=' . basename($pathExport));\n header('Content-Transfer-Encoding: binary');\n header('Expires: 0');\n header('Cache-Control: must-revalidate');\n header('Pragma: public');\n header('Content-Length: ' . filesize($pathExport));\n readfile($pathExport);\n unlink($pathExport);\n exit;\n//code\n }",
"public function penerima_data_bansos()\n {\n $spreadsheet = new Spreadsheet();\n $currentData = $this->BansosModel->findAll();\n // tulis header/nama kolom \n $spreadsheet->setActiveSheetIndex(0)\n ->setCellValue('A1', 'No. KK')\n ->setCellValue('B1', 'Kepala Keluarga')\n ->setCellValue('C1', 'ID Bansos')\n ->setCellValue('D1', 'Nama Bansos')\n ->setCellValue('E1', 'Kategori')\n ->setCellValue('F1', 'Pendamping')\n ->setCellValue('G1', 'Nominal')\n ->setCellValue('H1', 'Status Anggota');\n\n $column = 2;\n // tulis data mobil ke cell\n foreach ($currentData as $data) {\n $spreadsheet->setActiveSheetIndex(0)\n ->setCellValue('A' . $column, $data['noKK'])\n ->setCellValue('B' . $column, $data['kepalaKeluarga'])\n ->setCellValue('C' . $column, $data['idBansos'])\n ->setCellValue('D' . $column, $data['namaBansos'])\n ->setCellValue('E' . $column, $data['kategori'])\n ->setCellValue('F' . $column, $data['pendamping'])\n ->setCellValue('G' . $column, $data['nominal'])\n ->setCellValue('H' . $column, $data['statusAnggota']);\n $column++;\n }\n // tulis dalam format .xlsx\n $writer = new Xlsx($spreadsheet);\n $fileName = 'Data Penerima Bansos';\n\n // Redirect hasil generate xlsx ke web client\n header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\n header('Content-Disposition: attachment;filename=' . $fileName . '.xlsx');\n header('Cache-Control: max-age=0');\n\n $writer->save('php://output');\n }",
"public function exportXLS()\n {\n $contact = Contact::all();\n Excel::create('List Contact', function($excel) use ($contact) {\n\n $excel->sheet('List Contact', function($sheet) use ($contact) {\n\n $sheet->fromArray($contact);\n\n });\n\n })->export('xlsx');\n }",
"public function export2Excel($mode = 'depositor')\n {\n if($_POST)\n {\n $data = $this->trade->getExportData($mode);\n\n $excelData = new stdclass();\n $excelData->dataList = $data;\n $excelData->fileName = $this->post->fileName ? $this->post->fileName : $this->lang->trade->excel->title->$mode;\n\n $this->app->loadClass('excel')->export($excelData, $this->post->fileType);\n }\n\n $tradeDates = $this->trade->getDatePairs('all');\n\n $years = array(date('Y') => date('Y'));\n foreach($tradeDates as $tradeDate)\n {\n $year = substr($tradeDate, 0, 4);\n $years[$year] = $year;\n }\n\n $this->view->title = $this->lang->export;\n $this->view->fileName = $this->lang->trade->excel->title->$mode;\n $this->view->years = $years;\n $this->display();\n }",
"public function exportar_productos($com_id){\n date_default_timezone_set('America/Lima');\n $componente = $this->model_componente->get_componente($com_id); //// DATOS COMPONENTE\n $fase=$this->model_faseetapa->get_fase($componente[0]['pfec_id']); /// DATOS FASE\n $proyecto = $this->model_proyecto->get_id_proyecto($fase[0]['proy_id']); //// DATOS PROYECTO\n if($proyecto[0]['tp_id']!=4){\n $proyecto = $this->model_proyecto->get_datos_proyecto_unidad($fase[0]['proy_id']); //// DATOS PROYECTO\n }\n\n $prod=$this->rep_list_operaciones($com_id,2);\n //la fecha de exportación sera parte del nombre del archivo Excel\n $fecha = date(\"d-m-Y H:i:s\");\n\n //Inicio de exportación en Excel\n header('Content-type: application/vnd.ms-excel;charset=UTF-8');\n header(\"Content-Disposition: attachment; filename=Reporte_Operación_\".$componente[0]['com_componente'].\"_$fecha.xls\"); //Indica el nombre del archivo resultante\n header(\"Pragma: no-cache\");\n header(\"Expires: 0\");\n\n echo '\n <table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" class=\"tabla\">\n <tr class=\"modo1\">\n <td colspan=\"24\"></td>\n </tr>\n <tr class=\"modo1\">\n <td colspan=\"24\">\n '.$this->cabecera_2020($com_id,2).'\n </td>\n </tr>\n </table><br>';\n echo \"\".$prod.\"\";\n }",
"public function exportproductos()\n {\n $producto = DB::table('producto as p')\n ->join('categoria as c','p.idcategoria','=','c.idcategoria')\n ->join('marca as m','p.idmarca','=','m.idmarca')\n ->select('p.idproducto','p.codigobarra','c.nombre as categoria','p.nombre','m.nombre as marca','p.descripcion','p.imagen','p.condicion')\n ->orderBy('p.idproducto','asc')->get();\n \n //creamos el archivo y le ponemos el nombre, tambien usamos el arreglo o lista de categorias del modelo\n Excel::create('Productos', function($excel) use($producto) {\n \n //aqui establecemos el nombre del sheet o de la hoja de excel \n $excel->sheet('Productos', function($sheet) use($producto) {\n \n //aqui establecemos con el rango de celda con las que vamosa trabajor\n $sheet->mergeCells('A1:G1');\n \n //nos ubicamos enl a primera fila y accedemos a sus metodos como su fuente, el tipo de fuente, tamano etc\n $sheet->row(1, function ($row) {\n $row->setFontFamily('Comic Sans MS');\n $row->setFontSize(35);\n });\n \n //establecemos a la fila una un margen de celda de 40\n $sheet->setHeight(1, 40);\n \n // en la fila 1 nos huicamos y establecemos el titulo de la tabla\n $sheet->row(1, array('Productos Registrados'));\n \n //apartir de este rango de la celda del titulo establecemos el color de fondo que es verde y aliniamos el texto\n $sheet->cells('A1:G1', function($cells) {\n $cells->setBackground('green');\n $cells->setAlignment('center');\n });\n \n $sheet->cells('A2:G2', function($cells) {\n $cells->setBackground('#6ccbd8');\n });\n \n $sheet->setBorder('A1:G'. (count($producto) + 2), 'thin');\n \n $sheet->appendRow(2,array('N.','Codigo Barra','Categoria','Nombre','Marca','Descripcion','Estado'));\n \n \n $count = 3;\n $quantity = 1;\n $activos = 0;\n $inactivos = 0;\n \n foreach($producto as $prod)\n {\n $estado = '';\n if($prod->condicion)\n {\n $estado = 'Activo';\n $sheet->appendRow($count,array($quantity,$prod->codigobarra,$prod->categoria,$prod->nombre,$prod->marca,$prod->descripcion,$estado));\n $sheet->setHeight($count, 15);\n $count += 1;\n $quantity +=1;\n $activos +=1;\n \n }\n else\n {\n $estado = 'Inactivo';\n $sheet->appendRow($count,array($quantity,$prod->codigobarra,$prod->categoria,$prod->nombre,$prod->marca,$prod->descripcion,$estado));\n $sheet->row($count,function($row){\n $row->setBackground('#d4514a');\n });\n $sheet->setHeight($count, 15);\n $count += 1;\n $quantity +=1;\n $inactivos +=1;\n }\n }\n \n $sheet->appendRow($count+3,array('Activos',$activos));\n $sheet->cells('A'. ($count+3) . ':B' . ($count+3), function($cells) {\n $cells->setBackground('#26f094');\n });\n \n \n // aqui van los resultados de los total de activos e inactivos asi como su desi}o del mismo \n $sheet->setBorder('A'. ($count+3) . ':B' . ($count+5), 'thin');\n \n $sheet->appendRow($count+4,array('Inactivos',$inactivos));\n \n $sheet->cells('A'. ($count+4) . ':B' . ($count+4), function($cells) {\n $cells->setBackground('#d4514a');\n });\n \n $sheet->appendRow($count+5,array('Total',($activos+$inactivos)));\n $sheet->cells('A'. ($count+5) . ':B' . ($count+5), function($cells) {\n $cells->setBackground('#feff4e');\n });\n \n \n });\n\n })->export('xls');\n }",
"public function exportar_alineacion($obj_id){\n $obj=$this->model_mestrategico->get_objetivos_estrategicos($obj_id);\n\n date_default_timezone_set('America/Lima');\n \n $fecha = date(\"d-m-Y H:i:s\");\n $operaciones=$this->alineacion_pei_poa($obj_id);\n //Inicio de exportación en Excel\n header('Content-type: application/vnd.ms-excel');\n header(\"Content-Disposition: attachment; filename=OBJETIVO_ESTRATEGICO\".$obj_id.\"_$fecha.xls\"); //Indica el nombre del archivo resultante\n header(\"Pragma: no-cache\");\n header(\"Expires: 0\");\n echo \"\";\n echo \"\".$operaciones.\"\";\n }",
"public function exportExcelAction()\n {\n $fileName = 'traineecert.xls';\n $content = $this->getLayout()->createBlock('bs_traineecert/adminhtml_traineecert_grid')\n ->getExcelFile();\n $this->_prepareDownloadResponse($fileName, $content);\n }",
"public function exportarexcel(Request $request){\n // 0- ORDEN FILTROS\n //ORDENAMIENTO\n // ASCENDENTE - DESCENTE\n $this->m_canuint_ordene=$request->m_canuint_ordene;\n // NOMBRE CAMPO\n $this->m_canuint_campos=$request->m_canuint_campos;\n // FILTROS\n $this->m_caplaca_filtro=$request->m_caplaca;\n $this->m_canuint_filtro=$request->m_canuint;\n $this->m_nucociu_filtro=$request->m_nucociu;\n $this->m_cadacon_filtro=$request->m_cadacon;\n $this->m_caidpac_filtro=$request->m_caidpac;\n $this->m_caestad_filtro=$request->m_caestad;\n $this->m_causreg_filtro=$request->m_causreg;\n $this->m_causact_filtro=$request->m_causact;\n\n // Obtiene fecha y hora actual\n $fecha_actual = new DateTime();\n // Convierte fecha y hora actual a texto\n $cadena_fecha_actual = $fecha_actual->format(\"d/m/Y/h/i/s/a\");\n // Nombre archivo exportacion\n $nombre_archivo = 'vehiculos_'.$cadena_fecha_actual;\n\n Excel::create($nombre_archivo, function($excel) {\n $excel->sheet('Vehículos', function($sheet) {\n\n // 0- CONSULTA \n $vehiculos = Capmvehi::Nuipe($this->m_caplaca_filtro)->\n Numerointerno($this->m_canuint_filtro)->\n Nombre_ciudad($this->m_nucociu_filtro)->\n Nombre_contacto($this->m_cadacon_filtro)->\n Codigo_nacional($this->m_caidpac_filtro)->\n estado($this->m_caestad_filtro)->\n usuario_registra($this->m_causreg_filtro)->\n usuario_actualiza($this->m_causact_filtro)->\n orderBy($this->m_canuint_campos,$this->m_canuint_ordene)->get();\n\n foreach($vehiculos as $vehiculo){\n $ciudad = Capmciud::where('m_nucodig',$vehiculo->m_nucociu)->first();\n $departamento = Capmdepa::where('m_nucodig',$ciudad->m_nucodep)->first();\n $pais = Capmpais::where('m_nucodig',$departamento->m_nucopai)->first();\n $oficina_registro = Capmsucu::where('m_nucodig',$vehiculo->m_nuofici)->first();\n\n $ciudad_x[]=$ciudad->m_canuint;\n $departamento_x[]=$departamento->m_canuint;\n $pais_x[]=$pais->m_canuint;\n }\n\n // 1- EMPRESA RAZON SOCIAL\n $emp_raz_soc = Auth::user()->empresa->m_carazso;\n // 2- EMPRESA NUIPE\n $emp_nui_pes = Auth::user()->empresa->m_caplaca;\n // 3- OFICINA NOMBRE\n $ofi_nom_bre = Auth::user()->oficina->m_canuint;\n // 4- OFICINA UBICACION REGIONAL - VARIABLE GLOBAL\n // Session::get('glo_ofi_ubi_reg'\n // 5- APLICATIVO NOMBRE\n $app_nom_bre = 'mistiquetes.com';\n // 6- TITULO CONSULTA\n $tit_con_sul = 'CONSULTA DE VEHICULOS';\n\n // 20- TOTAL REGISTROS\n $tot_reg_ist = $vehiculos->Count();\n // 21- GENERADO FECHA HORA\n $fecha_hora = new DateTime();\n\n setlocale(LC_TIME,\"es_ES\");\n date_default_timezone_set ('America/Bogota');\n $fec_hor_gen = strftime(\"El %A, %d de %B del %Y - %r - Spreadsheet (Hoja de calculo)\");\n // 22- GENERADO USUARIO\n $usu_gen_era = Auth::user()->name;\n // 23- GENERADO NOTICIA\n $not_cla_con = 'Aplican cláusulas de confidencialidad en el manejo de información';\n\n\n // 1- EMPRESA RAZON SOCIAL\n $sheet->row(1, array($emp_raz_soc));\n // ESTILO\n $sheet->mergeCells('A1:L1');\n $sheet->row(1, function ($row) {\n $row->setFontFamily('Arial');\n $row->setFontSize(14);\n });\n\n // 2- EMPRESA NUIPE\n $sheet->row(2, array($emp_nui_pes));\n // ESTILO\n $sheet->mergeCells('A2:L2');\n $sheet->row(2, function ($row) {\n $row->setFontFamily('Arial');\n $row->setFontSize(12);\n });\n\n // 3- OFICINA NOMBRE\n $sheet->row(3, array($ofi_nom_bre));\n // ESTILO\n $sheet->mergeCells('A3:L3');\n $sheet->row(3, function ($row) {\n $row->setFontFamily('Arial');\n $row->setFontSize(12);\n });\n\n // 4- OFICINA UBICACION REGIONAL\n $sheet->row(4, array(Session::get('glo_ofi_ubi_reg')));\n // ESTILO\n $sheet->mergeCells('A4:L4');\n $sheet->row(4, function ($row) {\n $row->setFontFamily('Arial');\n $row->setFontSize(12);\n });\n\n // 5- APLICATIVO NOMBRE\n $sheet->row(5, array($app_nom_bre));\n // ESTILO\n $sheet->mergeCells('A5:L5');\n $sheet->row(5, function ($row) {\n $row->setFontFamily('Arial');\n $row->setFontSize(12);\n });\n\n // 6- TITULO CONSULTA\n $sheet->row(6, array($tit_con_sul));\n // IMPORTANTE: ESTILO - UNA CELDA ANTES DE LA FINAL\n $sheet->mergeCells('A6:AD6');\n $sheet->row(6, function ($row) {\n $row->setFontFamily('Arial');\n $row->setFontSize(12);\n });\n\n // ENCABEZADOS\n $sheet->row(7, [\n 'Identificador', 'NUIP', 'DV',\n 'Tipo de documento','Conductor',\n 'Primer nombre','Segundo nombre','Primer apellido','Segundo apellido',\n 'Dirección','Ciudad','Departamento','País',\n 'Telefóno fijo', 'Telefóno móvil', 'Portal Web',\n 'Correo electrónico', 'Contacto', 'Código autorización',\n 'Código nacional', 'Estado',\n 'Vínculo empresarial', 'Oficina de registro',\n 'Registro', 'Usuario', 'actualizado', 'Usuario',\n 'Total registros', 'Generado fecha - hora', 'Generado usuario', 'Noticia'\n ]);\n\n // ESTILO\n $sheet->Cells('A7:Z7');\n $sheet->row(7, function ($row) {\n // Fuente\n $row->setFontFamily('Arial');\n // Negrita\n $row->setFontWeight('bold');\n // Tamaño\n $row->setFontSize(10);\n // Alineamiento\n $row->setAlignment('center');\n // Fondo\n $row->setBackground('#4eb24d');\n // Bordes - Set all borders (top, right, bottom, left)\n $row->setBorder('thin','thin','thin','thin');\n });\n\n // REGISTROS\n //13-10-2018\n $j=0;\n foreach($vehiculos as $index => $vehiculo) {\n\n // ESTILO\n $sheet->Cells('A8:Z100000');\n $sheet->row($index+8, function ($row) {\n $row->setFontFamily('Arial');\n $row->setFontSize(10);\n });\n\n if ($index) {\n $sheet->row($index+8, [\n $vehiculo->m_nucodig,\n $vehiculo->m_caplaca, $vehiculo->m_nudiver,\n $vehiculo->tiposdocumentos->m_canuint,\n $vehiculo->m_canuint,\n $vehiculo->m_caprnom, $vehiculo->m_casenom,\n $vehiculo->m_caprape, $vehiculo->m_caseape,\n $vehiculo->m_cadirec, $vehiculo->ciudades->m_canuint,\n $departamento_x[$j],\n $pais_x[$j],\n $vehiculo->m_catelfi, $vehiculo->m_camovil, $vehiculo->m_casitew,\n $vehiculo->m_cacorel, $vehiculo->m_cadacon, $vehiculo->m_caautna,\n $vehiculo->m_caidpac, $vehiculo->m_caestad,\n $vehiculo->m_caviemp, $vehiculo->oficina_registro->m_canuint,\n $vehiculo->created_at, $vehiculo->usuario_registra->name,\n $vehiculo->updated_at, $vehiculo->usuario_actualiza->name,\n ]);\n } else {\n $sheet->row($index+8, [\n $vehiculo->m_nucodig,\n $vehiculo->m_caplaca, $vehiculo->m_nudiver,\n $vehiculo->tiposdocumentos->m_canuint,\n $vehiculo->m_canuint,\n $vehiculo->m_caprnom, $vehiculo->m_casenom,\n $vehiculo->m_caprape, $vehiculo->m_caseape,\n $vehiculo->m_cadirec, $vehiculo->ciudades->m_canuint,\n $departamento_x[$j],\n $pais_x[$j],\n $vehiculo->m_catelfi, $vehiculo->m_camovil, $vehiculo->m_casitew,\n $vehiculo->m_cacorel, $vehiculo->m_cadacon, $vehiculo->m_caautna,\n $vehiculo->m_caidpac, $vehiculo->m_caestad,\n $vehiculo->m_caviemp, $vehiculo->oficina_registro->m_canuint,\n $vehiculo->created_at, $vehiculo->usuario_registra->name,\n $vehiculo->updated_at, $vehiculo->usuario_actualiza->name,\n $tot_reg_ist, $fec_hor_gen, $usu_gen_era, $not_cla_con\n ]);\n }\n //13-10-2018\n $j++;\n }\n\n // PIE\n // ESTILO\n $sheet->row(($tot_reg_ist+9), function ($row) {\n // Fuente\n $row->setFontFamily('Arial');\n // Negrita\n $row->setFontWeight('bold');\n // Tamaño\n $row->setFontSize(10);\n // Alineamiento\n $row->setAlignment('center');\n // Fondo\n $row->setBackground('#4eb24d');\n // Bordes - Set all borders (top, right, bottom, left)\n $row->setBorder('thin','thin','thin','thin');\n });\n \n });\n })->export('xlsx');\n\n return redirect()->route('vehiculos.index');\n \n }",
"public function exportExcelAction()\n {\n $fileName = 'coursedoc.xls';\n $content = $this->getLayout()->createBlock('bs_coursedoc/adminhtml_coursedoc_grid')\n ->getExcelFile();\n $this->_prepareDownloadResponse($fileName, $content);\n }",
"public function export_sales_report(){\n $sales_report = DB::table('orders')\n ->select('*')\n ->get();\n\n $sales_array[] = array('Invoice ID','Customer Name','Total', 'Discount','Sales Date');\n\n foreach ($sales_report as $item) {\n $customer_details = unserialize($item->customer_details);\n\n $sales_array[] = array(\n 'Invoice ID' => $item->id,\n 'Customer Name' => $customer_details['customer_name'],\n 'Total' => $item->total,\n 'Discount' => $item->discount,\n 'Sales Date' => date('d M Y', strtotime($item->created_at))\n );\n\n }\n //create excel\n Excel::create('Sales Report', function($excel) use($sales_array) {\n $excel->sheet('Sales Report', function($sheet) use($sales_array) {\n $sheet->fromArray($sales_array);\n });\n })->download('xls');\n\n }",
"function cabang_export_excel(){\r\n\t\t//POST varibale here\r\n\t\t$cabang_id=trim(@$_POST[\"cabang_id\"]);\r\n\t\t$cabang_kode=trim(@$_POST[\"cabang_kode\"]);\r\n\t\t$cabang_kode=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cabang_kode);\r\n\t\t$cabang_kode=str_replace(\"'\", '\"',$cabang_kode);\r\n\t\t$cabang_kode_akun=trim(@$_POST[\"cabang_kode_akun\"]);\r\n\t\t$cabang_kode_akun=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cabang_kode_akun);\r\n\t\t$cabang_kode_akun=str_replace(\"'\", '\"',$cabang_kode_akun);\r\n\t\t$cabang_nama=trim(@$_POST[\"cabang_nama\"]);\r\n\t\t$cabang_nama=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cabang_nama);\r\n\t\t$cabang_nama=str_replace(\"'\", '\"',$cabang_nama);\r\n\t\t$cabang_alamat=trim(@$_POST[\"cabang_alamat\"]);\r\n\t\t$cabang_alamat=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cabang_alamat);\r\n\t\t$cabang_alamat=str_replace(\"'\", '\"',$cabang_alamat);\r\n\t\t$cabang_kota=trim(@$_POST[\"cabang_kota\"]);\r\n\t\t$cabang_kota=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cabang_kota);\r\n\t\t$cabang_kota=str_replace(\"'\", '\"',$cabang_kota);\r\n\t\t$cabang_kodepos=trim(@$_POST[\"cabang_kodepos\"]);\r\n\t\t$cabang_kodepos=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cabang_kodepos);\r\n\t\t$cabang_kodepos=str_replace(\"'\", '\"',$cabang_kodepos);\r\n\t\t$cabang_propinsi=trim(@$_POST[\"cabang_propinsi\"]);\r\n\t\t$cabang_propinsi=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cabang_propinsi);\r\n\t\t$cabang_propinsi=str_replace(\"'\", '\"',$cabang_propinsi);\r\n\t\t$cabang_keterangan=trim(@$_POST[\"cabang_keterangan\"]);\r\n\t\t$cabang_keterangan=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cabang_keterangan);\r\n\t\t$cabang_keterangan=str_replace(\"'\", '\"',$cabang_keterangan);\r\n\t\t$cabang_aktif=trim(@$_POST[\"cabang_aktif\"]);\r\n\t\t$cabang_aktif=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cabang_aktif);\r\n\t\t$cabang_aktif=str_replace(\"'\", '\"',$cabang_aktif);\r\n\t\t$cabang_pajak=trim(@$_POST[\"cabang_pajak\"]);\r\n\t\t$cabang_pajak=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cabang_pajak);\r\n\t\t$cabang_pajak=str_replace(\",\", \",\",$cabang_pajak);\r\n\t\t$cabang_pajak=str_replace(\"'\", '\"',$cabang_pajak);\r\n\t\t$option=$_POST['currentlisting'];\r\n\t\t$filter=$_POST[\"query\"];\r\n\t\t\r\n\t\t$query = $this->m_cabang->cabang_export_excel($cabang_id ,$cabang_kode,$cabang_kode_akun,$cabang_nama ,$cabang_alamat ,$cabang_kota ,$cabang_kodepos ,$cabang_propinsi ,$cabang_keterangan ,$cabang_aktif ,$option,$filter,$cabang_pajak);\r\n\t\t\r\n\t\tto_excel($query,\"cabang\"); \r\n\t\techo '1';\r\n\t\t\t\r\n\t}",
"function excel_export($template = 0) {\n $data = $this->tour->get_tours()->result_object();\n $this->load->helper('report');\n $rows = array();\n $row = array(lang('tour_tour_id'), lang('tour_tour_name'), lang('tour_action_name_key'), lang('tour_sort'), lang('tour_deleted'));\n\n $n = 1;\n $rows[] = $row;\n foreach ($data as $r) {\n $row = array(\n $n ++,\n $r->tour_name,\n $r->action_name_key,\n $r->sort,\n $r->deleted,\n );\n $rows[] = $row;\n }\n\n $content = array_to_csv($rows);\n\n if ($template) {\n force_download('tours_export_mass_update.csv', $content);\n } else {\n force_download('tours_export.csv', $content);\n }\n exit;\n }",
"public function actionExport()\n\t{\n\n\t\t$dataProvider=new CActiveDataProvider('Consegne', array(\n\t\t\t'sort'=>array(\n\t \t\t'defaultOrder'=>array(\n\t \t\t\t'id_archive'=>false\n\t \t\t)\n\t \t\t),\n\t\t));\n\n\t\t$Creator = Yii::app()->params['nomeAssociazione'];\n\t\t$LastModifiedBy = \"Sergio Casizzone\";\n\t\t$Title = \"Office 2007 XLSX Test Document\";\n\t\t$Subject = \"Office 2007 XLSX Test Document\";\n\t\t$Description = \"Estrazione dati per Office 2007 XLSX, generated using PHP classes.\";\n\t\t$Keywords = \"office 2007 openxml php\";\n\t\t$Category = \"export\";\n\n\t\t// Create new PHPExcel object\n\t\t$objPHPExcel = new PHPExcel();\n\t\t// Set document properties\n\t\t$objPHPExcel->getProperties()->setCreator($Creator)\n\t\t\t\t\t\t\t\t\t ->setLastModifiedBy($LastModifiedBy)\n\t\t\t\t\t\t\t\t\t ->setTitle($Title)\n\t\t\t\t\t\t\t\t\t ->setSubject($Subject)\n\t\t\t\t\t\t\t\t\t ->setDescription($Description)\n\t\t\t\t\t\t\t\t\t ->setKeywords($Keywords)\n\t\t\t\t\t\t\t\t\t ->setCategory($Category);\n\n\t\t// Add header\n\t\t$colonne = array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u');\n\t\t$intestazione = array(\n\t\t\t\"ID\",\n\t\t\t\"Data Inserimento\",\n\t\t\t\"ID User che inserisce\",\n\t\t\t\"Nome User che inserisce\",\n\t\t\t\"Codice Fiscale\",\n\t\t\t\"Nome\",\n\t\t\t\"Cognome\",\n\t\t\t\"Telefono\",\n\t\t\t\"Adulti\",\n\t\t\t\"Neonati\",\n\t\t\t\"Indirizzo\",\n\t\t\t\"Quartiere\",\n\t\t\t\"Municipalità\",\n\t\t\t\"Alert se < 7gg\",\n\t\t\t\"ID User in consegna\",\n\t\t\t\"Nome User in consegna\",\n\t\t\t\"Pacco in consegna\",\n\t\t\t\"Data presa in carico\",\n\t\t\t\"Consegnato\",\n\t\t\t\"Data consegna\",\n\t\t\t\"Note\"\n\t\t);\n\n\t\tforeach ($colonne as $n => $l){\n\t\t\t$objPHPExcel->setActiveSheetIndex(0)\n\t\t\t\t\t\t->setCellValue($l.'1', $intestazione[$n]);\n\t\t}\n\t\t$transactions = new CDataProviderIterator($dataProvider);\n\t\t$riga = 2;\n\t\t$Rows = 1; //$transactions->totalItemCount;\n\n\t\tforeach($transactions as $item) {\n\t\t\t// Miscellaneous glyphs, UTF-8\n\t\t\t$objPHPExcel->setActiveSheetIndex(0)\n\t\t\t ->setCellValue('A'.$riga, $item->id_archive)\n\t\t\t ->setCellValue('B'.$riga, date(\"d/m/Y\",$item->data))\n\t\t\t\t\t\t->setCellValue('C'.$riga, $item->id_user)\n\t\t\t\t\t\t->setCellValue('D'.$riga, Users::model()->findByPk($item->id_user)->email)\n\t\t\t\t\t\t->setCellValue('E'.$riga, $item->codfisc)\n\t\t\t\t\t\t->setCellValue('F'.$riga, $item->nome)\n\t\t\t\t\t\t->setCellValue('G'.$riga, $item->cognome)\n\t\t\t\t\t\t->setCellValue('H'.$riga, $item->telefono)\n\t\t\t\t\t\t->setCellValue('I'.$riga, $item->adulti)\n\t\t\t\t\t\t->setCellValue('J'.$riga, $item->bambini)\n\t\t\t\t\t\t->setCellValue('K'.$riga, $item->indirizzo.\" \".$item->civico)\n\t\t\t\t\t\t->setCellValue('L'.$riga, $item->quartiere)\n\t\t\t\t\t\t->setCellValue('M'.$riga, $item->municipalita)\n\t\t\t\t\t\t->setCellValue('N'.$riga, $item->trigger_alert)\n\t\t\t\t\t\t->setCellValue('O'.$riga, $item->id_volontario)\n\t\t\t\t\t\t->setCellValue('P'.$riga, ($item->id_volontario == 0) ? '' : Users::model()->findByPk($item->id_volontario)->email)\n\t\t\t\t\t\t->setCellValue('Q'.$riga, $item->in_consegna)\n\t\t\t\t\t\t->setCellValue('R'.$riga, ($item->time_inconsegna == 0) ? '' : date(\"d/m/Y H:i:s\",$item->time_inconsegna))\n\t\t\t\t\t\t->setCellValue('S'.$riga, $item->consegnato)\n\t\t\t\t\t\t->setCellValue('T'.$riga, ($item->time_consegnato == 0) ? '' : date(\"d/m/Y H:i:s\",$item->time_consegnato))\n\t\t\t\t\t\t->setCellValue('U'.$riga, $item->note);\n\n\t\t\t$riga++;\n\t\t\t$Rows++;\n\t\t}\n\n\t\t// Rename worksheet\n\t\t$objPHPExcel->getActiveSheet()->setTitle('export');\n\t\t// Set active sheet index to the first sheet, so Excel opens this as the first sheet\n\t\t$objPHPExcel->setActiveSheetIndex(0);\n\t\t// Redirect output to a client’s web browser (Excel5)\n\t\t$time = time();\n\t\t$date = date('Y/m/d H:i:s', $time);\n\t\theader('Content-Type: application/vnd.ms-excel');\n\t\theader('Content-Disposition: attachment;filename=\"'.$date.'-export.xls\"');\n\t\theader('Cache-Control: max-age=0');\n\t\t// If you're serving to IE 9, then the following may be needed\n\t\theader('Cache-Control: max-age=1');\n\t\t// If you're serving to IE over SSL, then the following may be needed\n\t\theader ('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past\n\t\theader ('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); // always modified\n\t\theader ('Cache-Control: cache, must-revalidate'); // HTTP/1.1\n\t\theader ('Pragma: public'); // HTTP/1.0\n\t\t$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');\n\t\t$objWriter->save('php://output');\n\t}",
"public function exportarexcel(Request $request){\n\n // 0- ORDEN FILTROS\n //ORDENAMIENTO\n // ASCENDENTE - DESCENTE\n $this->m_canombr_ordene=$request->m_canombr_ordene;\n // NOMBRE CAMPO\n $this->m_canombr_campos=$request->m_canombr_campos;\n // FILTROS\n $this->m_canombr_filtro=$request->m_canombr;\n $this->m_cacodna_filtro=$request->m_cacodna;\n $this->m_caestad_filtro=$request->m_caestad;\n $this->m_causreg_filtro=$request->m_causreg;\n $this->m_causact_filtro=$request->m_causact;\n \n // Obtiene fecha y hora actual\n $fecha_actual = new DateTime();\n // Convierte fecha y hora actual a texto\n $cadena_fecha_actual = $fecha_actual->format(\"d/m/Y/h/i/s/a\");\n // Nombre archivo exportacion\n $nombre_archivo = 'tipos_carrocerias_'.$cadena_fecha_actual;\n\n Excel::create($nombre_archivo, function($excel) {\n $excel->sheet('tipos_carrocerias', function($sheet) {\n\n // 0- CONSULTA\n if($this->m_canombr_campos==\"llave_compuesta\"){\n $tiposcarrocerias = Capmtica::nombre($this->m_canombr_filtro)->\n Codigo_nacional($this->m_cacodna_filtro)->\n estado($this->m_caestad_filtro)->\n usuario_registra($this->m_causreg_filtro)->\n usuario_actualiza($this->m_causact_filtro)->\n orderBy(' Capmtica.m_canombr',$this->m_canombr_ordene)->get();\n }else{\n $tiposcarrocerias = Capmtica::nombre($this->m_canombr_filtro)->\n Codigo_nacional($this->m_cacodna_filtro)->\n estado($this->m_caestad_filtro)->\n usuario_registra($this->m_causreg_filtro)->\n usuario_actualiza($this->m_causact_filtro)->\n orderBy($this->m_canombr_campos,$this->m_canombr_ordene)->get();\n }\n\n // 1- EMPRESA RAZON SOCIAL\n $emp_raz_soc = Auth::user()->empresa->m_carazso;\n // 2- EMPRESA NUIPE\n $emp_nui_pes = Auth::user()->empresa->m_canuipe;\n // 3- OFICINA NOMBRE\n $ofi_nom_bre = Auth::user()->oficina->m_canombr;\n // 4- OFICINA UBICACION REGIONAL - VARIABLE GLOBAL\n // Session::get('glo_ofi_ubi_reg'\n // 5- APLICATIVO NOMBRE\n $app_nom_bre = 'mistiquetes.com';\n // 6- TITULO CONSULTA\n $tit_con_sul = 'CONSULTA TIPOS CARROCERIA VEHICULO';\n\n // 20- TOTAL REGISTROS\n $tot_reg_ist = $tiposcarrocerias->Count();\n // 21- GENERADO FECHA HORA\n $fecha_hora = new DateTime();\n\n setlocale(LC_TIME,\"es_ES\");\n date_default_timezone_set ('America/Bogota');\n $fec_hor_gen = strftime(\"El %A, %d de %B del %Y - %r - Spreadsheet (Hoja de calculo)\");\n // 22- GENERADO USUARIO\n $usu_gen_era = Auth::user()->name;\n // 23- GENERADO NOTICIA\n $not_cla_con = 'Aplican cláusulas de confidencialidad en el manejo de información';\n\n\n // 1- EMPRESA RAZON SOCIAL\n $sheet->row(1, array($emp_raz_soc));\n // ESTILO\n $sheet->mergeCells('A1:L1');\n $sheet->row(1, function ($row) {\n $row->setFontFamily('Arial');\n $row->setFontSize(14);\n });\n\n // 2- EMPRESA NUIPE\n $sheet->row(2, array($emp_nui_pes));\n // ESTILO\n $sheet->mergeCells('A2:L2');\n $sheet->row(2, function ($row) {\n $row->setFontFamily('Arial');\n $row->setFontSize(12);\n });\n\n // 3- OFICINA NOMBRE\n $sheet->row(3, array($ofi_nom_bre));\n // ESTILO\n $sheet->mergeCells('A3:L3');\n $sheet->row(3, function ($row) {\n $row->setFontFamily('Arial');\n $row->setFontSize(12);\n });\n\n // 4- OFICINA UBICACION REGIONAL\n $sheet->row(4, array(Session::get('glo_ofi_ubi_reg')));\n // ESTILO\n $sheet->mergeCells('A4:L4');\n $sheet->row(4, function ($row) {\n $row->setFontFamily('Arial');\n $row->setFontSize(12);\n });\n\n // 5- APLICATIVO NOMBRE\n $sheet->row(5, array($app_nom_bre));\n // ESTILO\n $sheet->mergeCells('A5:L5');\n $sheet->row(5, function ($row) {\n $row->setFontFamily('Arial');\n $row->setFontSize(12);\n });\n\n // 6- TITULO CONSULTA\n $sheet->row(6, array($tit_con_sul));\n // ESTILO\n $sheet->mergeCells('A6:K6');\n $sheet->row(6, function ($row) {\n $row->setFontFamily('Arial');\n $row->setFontSize(12);\n });\n\n // ENCABEZADOS\n $sheet->row(7, [\n 'Identificador', 'Tipo carroceria vehículo',\n 'Código nacional', 'Estado',\n 'Registro', 'Usuario', 'actualizado', 'Usuario',\n 'Total registros', 'Generado fecha - hora', 'Generado usuario', 'Noticia'\n ]);\n\n // ESTILO\n $sheet->Cells('A7:Z7');\n $sheet->row(7, function ($row) {\n // Fuente\n $row->setFontFamily('Arial');\n // Negrita\n $row->setFontWeight('bold');\n // Tamaño\n $row->setFontSize(10);\n // Alineamiento\n $row->setAlignment('center');\n // Fondo\n $row->setBackground('#4eb24d');\n // Bordes - Set all borders (top, right, bottom, left)\n $row->setBorder('thin','thin','thin','thin');\n });\n\n // REGISTROS\n foreach($tiposcarrocerias as $index => $tipocarroceria) {\n\n // ESTILO\n $sheet->Cells('A8:Z100000');\n $sheet->row($index+8, function ($row) {\n $row->setFontFamily('Arial');\n $row->setFontSize(10);\n });\n\n if ($index) {\n $sheet->row($index+8, [\n $tipocarroceria->m_nucodig, $tipocarroceria->m_canombr,\n $tipocarroceria->m_cacodna, $tipocarroceria->m_caestad,\n $tipocarroceria->created_at, $tipocarroceria->usuario_registra->name,\n $tipocarroceria->updated_at, $tipocarroceria->usuario_actualiza->name,\n ]);\n } else {\n $sheet->row($index+8, [\n $tipocarroceria->m_nucodig, $tipocarroceria->m_canombr,\n $tipocarroceria->m_cacodna, $tipocarroceria->m_caestad,\n $tipocarroceria->created_at, $tipocarroceria->usuario_registra->name,\n $tipocarroceria->updated_at, $tipocarroceria->usuario_actualiza->name,\n $tot_reg_ist, $fec_hor_gen, $usu_gen_era, $not_cla_con\n ]);\n }\n }\n\n // PIE\n // ESTILO\n $sheet->row(($tot_reg_ist+9), function ($row) {\n // Fuente\n $row->setFontFamily('Arial');\n // Negrita\n $row->setFontWeight('bold');\n // Tamaño\n $row->setFontSize(10);\n // Alineamiento\n $row->setAlignment('center');\n // Fondo\n $row->setBackground('#4eb24d');\n // Bordes - Set all borders (top, right, bottom, left)\n $row->setBorder('thin','thin','thin','thin');\n }); \n });\n })->export('xlsx');\n\n return redirect()->route('tipos-carrocerias.index');\n \n }",
"public function export()\n {\n // Ajout des accès pour la visualisation des données\n $dataRule = frontController::getSession('role')['dataRule']['Code_App'];\n\n $filterList = $dataRule['FILTER'];\n foreach ($filterList as $filter => $default) {\n if (!isset($filterList[$filter]['default']))\n $filterList[$filter] = array('default' => true);\n }\n\n $codeModel = new codeModel();\n\n // Récupération de la liste des codes\n $codeList = $codeModel->getCodeListByStatusList($filterList);\n\n\n // Traduction des statuts\n $translateStatusList = $this->getTranslate('Status_List');\n\n\n $dataModel = new dataModel();\n\n // Récupération de la liste des données\n $codeDataList = $dataModel->getDataList('Code_App');\n\n // traduction des données\n $translateData = $this->getTranslate('Data_List');\n\n\n // Création du fichier Excel\n $spreadsheet = new PhpOffice\\PhpSpreadsheet\\Spreadsheet();\n $sheet = $spreadsheet->getActiveSheet();\n $sheet->setTitle('Code List');\n\n\n if (frontController::haveRight('view', 'Code_App')) {\n // Ecriture des données\n $currentColumn = 1;\n $currentRow = 1;\n\n // Parcours de toute les données disponible\n foreach ($dataRule as $dataBaseName => $rule) {\n if ($dataBaseName != 'FILTER') {\n // Ecriture du nom de la donnée\n $sheet->setCellValueByColumnAndRow($currentColumn, $currentRow, $this->getVerifyTranslate($translateData, $codeDataList[$dataBaseName]['name']));\n $sheet->getCellByColumnAndRow($currentColumn, $currentRow)\n ->getStyle()\n ->getFill()\n ->setFillType(\\PhpOffice\\PhpSpreadsheet\\Style\\Fill::FILL_SOLID)\n ->getStartColor()\n ->setARGB('FF9999FF');\n $sheet->getCellByColumnAndRow($currentColumn, $currentRow)\n ->getStyle()\n ->getFont()\n ->setBold(true);\n $currentRow = $currentRow + 1;\n\n // Ecriture de toute les données disponibles\n foreach ($codeList as $key => $code) {\n switch ($dataBaseName) {\n case 'STATUS':\n if ($code[$dataBaseName] != '')\n $sheet->setCellValueByColumnAndRow($currentColumn, $currentRow, $this->getVerifyTranslate($translateStatusList, $code[$dataBaseName]));\n else\n $sheet->setCellValueByColumnAndRow($currentColumn, $currentRow, '');\n break;\n\n default:\n $sheet->setCellValueByColumnAndRow($currentColumn, $currentRow, $code[$dataBaseName]);\n break;\n }\n $currentRow = $currentRow + 1;\n }\n\n // Passage à la colonne suivante\n $currentColumn = $currentColumn + 1;\n $currentRow = 1;\n }\n }\n\n // Récupération de la dernière colonne\n $maxColumn = PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate::stringFromColumnIndex($currentColumn - 1);\n\n // Ajout du filtre automatique pour chaque colonne\n $sheet->setAutoFilter('A1:' . $maxColumn . '1');\n\n // Centrage du texte\n $sheet->getStyle('A1:' . $maxColumn . (count($codeList) + 1))->getAlignment()->setHorizontal('center');\n\n // Ajout de la taille automatique pour chaque colonne\n foreach (range(1, $currentColumn - 1) as $columnID) {\n $sheet->getColumnDimension(PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate::stringFromColumnIndex($columnID))->setWidth(150);\n $sheet->getColumnDimension(PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate::stringFromColumnIndex($columnID))->setAutoSize(true);\n }\n }\n\n // Vérification des droits utilisateurs\n if (frontController::haveRight('view', 'Code_App')) {\n $fileName = './tmp/Code_Export_' . date('d-m-Y_H-i-s') . '.xlsx';\n\n header('Content-Type: application/vnd.ms-excel');\n header('Content-Disposition: attachment;filename=\"' . $fileName . '\"');\n header('Cache-Control: max-age=0');\n\n // Ecriture du fichier Excel\n $writer = new PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx($spreadsheet);\n $writer->save('php://output');\n }\n else\n header('Location: /code');\n }",
"public function exportExcel($params)\n {\n $spreadsheet = new Spreadsheet();\n \n $spreadsheet->setActiveSheetIndex(0);\n \n $sheet = $spreadsheet->getActiveSheet();\n \n $setBorderArray = array(\n 'borders' => array(\n 'allBorders' => array(\n 'borderStyle' => Border::BORDER_THIN,\n 'color' => array('argb' => '000000'),\n ),\n ),\n );\n\n $sheet->getColumnDimension('A')->setWidth(5);\n $sheet->getColumnDimension('B')->setWidth(25);\n $sheet->getColumnDimension('C')->setWidth(30);\n $sheet->getColumnDimension('D')->setWidth(30);\n $sheet->getColumnDimension('E')->setWidth(30);\n\n $sheet->setCellValue('A3', strtoupper('No'));\n $sheet->setCellValue('B3', strtoupper('Nama'));\n $sheet->setCellValue('C3', strtoupper('Alamat'));\n $sheet->setCellValue('D3', strtoupper('Telepon'));\n $sheet->setCellValue('E3', strtoupper('Email'));\n \n\n $spreadsheet->getActiveSheet()->setCellValue('A1', 'DATA PENULIS');\n\n $spreadsheet->getActiveSheet()->getStyle('A3:E3')->getFill()->setFillType(Fill::FILL_SOLID);\n $spreadsheet->getActiveSheet()->getStyle('A3:E3')->getFill()->getStartColor()->setARGB('d8d8d8');\n $spreadsheet->getActiveSheet()->mergeCells('A1:E1');\n $spreadsheet->getActiveSheet()->getDefaultRowDimension('3')->setRowHeight(25);\n $sheet->getStyle('A1:E3')->getFont()->setBold(true);\n $sheet->getStyle('A1:E3')->getAlignment()->setHorizontal(Alignment::HORIZONTAL_CENTER);\n\n $row = 3;\n $i=1;\n\n $searchModel = new PenulisSearch();\n\n foreach($searchModel->getQuerySearch($params)->all() as $data){\n\n $row++;\n $sheet->setCellValue('A' . $row, $i);\n $sheet->setCellValue('B' . $row, $data->nama);\n $sheet->setCellValue('C' . $row, $data->alamat);\n $sheet->setCellValue('D' . $row, $data->telepon);\n $sheet->setCellValue('E' . $row, $data->email);\n \n $i++;\n }\n\n $sheet->getStyle('A3:E' . $row)->getAlignment()->setHorizontal(Alignment::HORIZONTAL_CENTER);\n $sheet->getStyle('D3:E' . $row)->getAlignment()->setHorizontal(Alignment::HORIZONTAL_CENTER);\n $sheet->getStyle('E3:E' . $row)->getAlignment()->setHorizontal(Alignment::HORIZONTAL_CENTER);\n\n\n $sheet->getStyle('C' . $row)->getAlignment()->setHorizontal(Alignment::HORIZONTAL_CENTER);\n\n $sheet->getStyle('A3:E' . $row)->applyFromArray($setBorderArray);\n\n $filename = time() . 'Data Penulis.xlsx';\n $path = 'exports/' . $filename;\n $writer = new Xlsx($spreadsheet);\n $writer->save($path);\n\n return $this->redirect($path);\n }",
"public function exportFile($type, $id=null){\n\n if ($id == null){\n\n $gerencias = Gerencia::all();\n\n return \\Excel::create('Gerencias', function($excel) use ($gerencias) {\n \n $excel->sheet('Data Gerencias', function($sheet) use ($gerencias)\n \n {\n $sheet->row(1, ['Gerencia Comercial', 'Dirección Comercial', 'Titular', 'Correo', 'Telélefono'\n\n ]);\n\n foreach ($gerencias as $key => $gerencia) {\n $sheet->row( $key + 2, [\n $gerencia->name, $gerencia->direccion->name, $gerencia->titular, $gerencia->email, $gerencia->phone\n ]);\n }\n \n });\n \n })->export($type);\n\n }else{\n\n $gerencia = Gerencia::find($id);\n\n return \\Excel::create($gerencia->name, function($excel) use ($gerencia) {\n \n $excel->sheet($gerencia->name, function($sheet) use ($gerencia) {\n $sheet->row(1, ['Gerencia Comercial', 'Dirección Comercial', 'Titular', 'Correo', 'Teléfono'\n ]);\n\n $sheet->row( 2, [\n $gerencia->name, $gerencia->direccion->name, $gerencia->titular, $gerencia->email, $gerencia->phone\n ]);\n \n });\n \n $excel->sheet('Data Oficinas', function($sheet) use ($gerencia) {\n\n $sheet->row(1, ['Oficina', 'Supervisor', 'Correo', 'Teléfono'\n\n ]);\n\n foreach ($gerencia->oficinas as $oficina) {\n\n foreach ($oficina->supervisors as $key => $supervisor) {\n $sheet->row( $key + 2, [\n $oficina->name, $supervisor->name, $supervisor->email, $supervisor->phone\n ]);\n }\n \n }\n \n });\n\n foreach ($gerencia->oficinas as $oficina) {\n $excel->sheet($oficina->name, function($sheet) use ($oficina) {\n $sheet->row(1, ['p00', 'Nombre', 'Rol', 'Correo', 'Teléfono', 'Oficina'\n ]);\n foreach ($oficina->history as $key => $personal) {\n $sheet->row( $key + 2, [\n $personal->personal->p00, $personal->personal->name, $personal->rol->name, $personal->personal->email, $personal->personal->phone, $personal->oficina->name\n ]);\n }\n });\n }\n })->export($type);\n }\n }",
"function absenrich_export_excel(){\r\n\t\t//POST varibale here\r\n\t\t$gudang_id=trim(@$_POST[\"gudang_id\"]);\r\n\t\t$gudang_nama=trim(@$_POST[\"gudang_nama\"]);\r\n\t\t$gudang_nama=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$gudang_nama);\r\n\t\t$gudang_nama=str_replace(\"'\", '\"',$gudang_nama);\r\n\t\t$gudang_lokasi=trim(@$_POST[\"gudang_lokasi\"]);\r\n\t\t$gudang_lokasi=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$gudang_lokasi);\r\n\t\t$gudang_lokasi=str_replace(\"'\", '\"',$gudang_lokasi);\r\n\t\t$gudang_keterangan=trim(@$_POST[\"gudang_keterangan\"]);\r\n\t\t$gudang_keterangan=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$gudang_keterangan);\r\n\t\t$gudang_keterangan=str_replace(\"'\", '\"',$gudang_keterangan);\r\n\t\t$gudang_aktif=trim(@$_POST[\"gudang_aktif\"]);\r\n\t\t$gudang_aktif=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$gudang_aktif);\r\n\t\t$gudang_aktif=str_replace(\"'\", '\"',$gudang_aktif);\r\n\t\t$gudang_creator=trim(@$_POST[\"gudang_creator\"]);\r\n\t\t$gudang_creator=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$gudang_creator);\r\n\t\t$gudang_creator=str_replace(\"'\", '\"',$gudang_creator);\r\n\t\t$gudang_date_create=trim(@$_POST[\"gudang_date_create\"]);\r\n\t\t$absenrich_updater=trim(@$_POST[\"absenrich_updater\"]);\r\n\t\t$absenrich_updater=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$absenrich_updater);\r\n\t\t$absenrich_updater=str_replace(\"'\", '\"',$absenrich_updater);\r\n\t\t$gudang_date_update=trim(@$_POST[\"gudang_date_update\"]);\r\n\t\t$gudang_revised=trim(@$_POST[\"gudang_revised\"]);\r\n\t\t$option=$_POST['currentlisting'];\r\n\t\t$filter=$_POST[\"query\"];\r\n\t\t\r\n\t\t$query = $this->m_absensi_enrichment->absenrich_export_excel($gudang_id ,$gudang_nama ,$gudang_lokasi ,$gudang_keterangan ,$gudang_aktif ,$gudang_creator ,$gudang_date_create ,$absenrich_updater ,$gudang_date_update ,$gudang_revised ,$option,$filter);\r\n\t\t\r\n\t\tto_excel($query,\"absensi_enrichment\"); \r\n\t\techo '1';\r\n\t\t\t\r\n\t}",
"public function export()\n {\n // Ajout des accès pour la visualisation des données\n $dataRule = frontController::getSession('role')['dataRule']['Mold_App'];\n\n $filterList = $dataRule['FILTER'];\n foreach ($filterList as $filter => $default) {\n if (!isset($filterList[$filter]['default']))\n $filterList[$filter] = array('default' => true);\n }\n\n $moldModel = new moldModel();\n\n // Récupération de la liste des moules\n $moldList = $moldModel->getMoldListByStatusList($filterList);\n\n\n // Traduction des statuts\n $translateStatusList = $this->getTranslate('Status_List');\n\n // Traduction des localisations\n $translateLocationTypeList = $this->getTranslate('Location_List');\n\n\n $dataModel = new dataModel();\n\n // Récupération de la liste des données\n $moldDataList = $dataModel->getDataList('Mold_App');\n\n // traduction des données\n $translateData = $this->getTranslate('Data_List');\n\n\n // Création du fichier Excel\n $spreadsheet = new PhpOffice\\PhpSpreadsheet\\Spreadsheet();\n $sheet = $spreadsheet->getActiveSheet();\n $sheet->setTitle('Mold List');\n\n\n if (frontController::haveRight('view', 'Mold_App')) {\n // Ecriture des données\n $currentColumn = 1;\n $currentRow = 1;\n\n // Parcours de toute les données disponible\n foreach ($dataRule as $dataBaseName => $rule) {\n if ($dataBaseName != 'FILTER') {\n // Ecriture du nom de la donnée\n $sheet->setCellValueByColumnAndRow($currentColumn, $currentRow, $this->getVerifyTranslate($translateData, $moldDataList[$dataBaseName]['name']));\n $sheet->getCellByColumnAndRow($currentColumn, $currentRow)\n ->getStyle()\n ->getFill()\n ->setFillType(\\PhpOffice\\PhpSpreadsheet\\Style\\Fill::FILL_SOLID)\n ->getStartColor()\n ->setARGB('FF9999FF');\n $sheet->getCellByColumnAndRow($currentColumn, $currentRow)\n ->getStyle()\n ->getFont()\n ->setBold(true);\n $currentRow = $currentRow + 1;\n\n // Ecriture de toute les données disponibles\n foreach ($moldList as $key => $mold) {\n switch ($dataBaseName) {\n case 'STATUT':\n if ($mold[$dataBaseName] != '')\n $sheet->setCellValueByColumnAndRow($currentColumn, $currentRow, $this->getVerifyTranslate($translateStatusList, $mold[$dataBaseName]));\n else\n $sheet->setCellValueByColumnAndRow($currentColumn, $currentRow, '');\n break;\n\n case 'LOCATION_TYPE':\n if ($mold[$dataBaseName] != '')\n $sheet->setCellValueByColumnAndRow($currentColumn, $currentRow, $this->getVerifyTranslate($translateLocationTypeList, $mold[$dataBaseName]));\n else\n $sheet->setCellValueByColumnAndRow($currentColumn, $currentRow, '');\n break;\n\n default:\n $sheet->setCellValueByColumnAndRow($currentColumn, $currentRow, $mold[$dataBaseName]);\n break;\n }\n $currentRow = $currentRow + 1;\n }\n\n // Passage à la colonne suivante\n $currentColumn = $currentColumn + 1;\n $currentRow = 1;\n }\n }\n\n // Récupération de la dernière colonne\n $maxColumn = PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate::stringFromColumnIndex($currentColumn - 1);\n\n // Ajout du filtre automatique pour chaque colonne\n $sheet->setAutoFilter('A1:' . $maxColumn . '1');\n\n // Centrage du texte\n $sheet->getStyle('A1:' . $maxColumn . (count($moldList) + 1))->getAlignment()->setHorizontal('center');\n\n // Ajout de la taille automatique pour chaque colonne\n foreach (range(1, $currentColumn - 1) as $columnID) {\n $sheet->getColumnDimension(PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate::stringFromColumnIndex($columnID))->setWidth(150);\n $sheet->getColumnDimension(PhpOffice\\PhpSpreadsheet\\Cell\\Coordinate::stringFromColumnIndex($columnID))->setAutoSize(true);\n }\n }\n\n // Vérification des droits utilisateurs\n if (frontController::haveRight('view', 'Mold_App')) {\n $fileName = './tmp/Mold_Export_' . date('d-m-Y_H-i-s') . '.xlsx';\n\n header('Content-Type: application/vnd.ms-excel');\n header('Content-Disposition: attachment;filename=\"' . $fileName . '\"');\n header('Cache-Control: max-age=0');\n\n // Ecriture du fichier Excel\n $writer = new PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx($spreadsheet);\n $writer->save('php://output');\n }\n else\n header('Location: /mold');\n }",
"public function exportToxls(){\n\t\t//echo \"exportToxls\";exit;\t\t\n\t\t$tskstatus = ManageTaskStatus::select('id as Sr.No.', 'status_name')->where('deleted_status', '=', 0)->get(); \t\t\n\t\t$getCount = $tskstatus->count(); \n\n if ($getCount < 1) { \n\t\t\t return false;\t\t\t \n } else {\n\t\t\t//export to excel\n\t\t\tExcel::create('Status Data', function($excel) use($tskstatus){\n\t\t\t\t$excel->sheet('Status', function($sheet) use($tskstatus){\n\t\t\t\t\t$sheet->fromArray($tskstatus);\n\t\t\t\t});\n\t\t\t})->export('xlsx');\t\t\t\t\n\t\t}\t\t\t\t\n\t}",
"public function export()\n\t{\n\t\t$countries = Country::withTrashed()->get();\n\t\t$csvArray = [];\n\t\t$count = 0;\n\n\t\tforeach($countries as $country) {\n\t\t\t$countryArray = [\n\t\t\t\t'#' => ++$count,\n\t\t\t\t'Country Name' => $country->country_name,\n\t\t\t\t'Created At' => $country['created_at']->toDateTimeString(),\n\t\t\t\t'Updated At' => $country['updated_at']->toDateTimeString()\n\t\t\t];\n\n\t\t\tif($country->isDeleted()) {\n\t\t\t\t$countryArray['Deleted At'] = $country['deleted_at']->toDateTimeString();\n\t\t\t}\n\n\t\t\tarray_push($csvArray, $countryArray);\n\t\t}\n\n\t\tExcel::create('List of Church associated countries', function($excel) use($csvArray) {\n\n\t\t\t// Set the title\n\t\t $excel->setTitle('Church associated countries');\n\n\t\t // Chain the setters\n\t\t $excel->setCreator('Charisse May Dalida')\n\t\t ->setCompany('Crist Lopez');\n\n\t\t\t$excel->sheet('Records', function($sheet) use($csvArray) {\n\n\t\t\t\t$sheet->with($csvArray);\n\t\t\t\t$sheet->setAutoFilter(); // Auto filter for entire sheet\n\t\t\t\t$sheet->freezeFirstRow();\n\t\t\t\t$sheet->row(1, function($row) {// Set black background\n\n\t\t\t\t // call cell manipulation methods\n\t\t\t\t $row->setFontWeight('bold');\n\n\t\t\t\t});\n\n\t\t\t});\n\t\t})->export('xls');\n\t}",
"public function download_excel($id)\n\t{\n // load to_excel_helper (untuk membuat laporan dengan format excel)\n $this->load->helper('to_excel');\n\n // parameter OK\n if(! empty($id))\n {\n // kelas\n $kelas = $this->db->select('nama')->where('id', $id)->get('biodata');\n\t\t\t\n\t\t\t\n\t\t\t$nama_file = 'REKAP_ABSEN_KELAS_' . $kelas . '_SEMESTER_' . $id;\n\t\t\t\n to_excel($kelas, $nama_file);\n }\n // parameter tidak lengkap\n else\n {\n $this->session->set_flashdata('pesan', 'Proses pembuatan data rekap (Excel) gagal. Parameter tidak lengkap.');\n redirect(base_url());\n }\n\t}",
"private function _downloadSnLogExcel($dataProvider) {\r\n $objPHPExcel = new \\PHPExcel();\r\n \r\n // Set document properties\r\n $objPHPExcel->getProperties()\r\n ->setCreator(\"wuliu.youjian8.com\")\r\n ->setLastModifiedBy(\"wuliu.youjian8.com\")\r\n ->setTitle(\"youjian logistics order\")\r\n ->setSubject(\"youjian logistics order\")\r\n ->setDescription(\"youjian logistics order\")\r\n ->setKeywords(\"youjian logistics order\")\r\n ->setCategory(\"youjian logistics order\");\r\n $datas = $dataProvider->query->all();\r\n if ($datas) {\r\n $objPHPExcel->setActiveSheetIndex(0)\r\n ->setCellValue('A1', '编号')\r\n ->setCellValue('B1', '票号')\r\n ->setCellValue('C1', '金额')\r\n ->setCellValue('D1', '实收金额')\r\n ->setCellValue('E1', '交款人')\r\n ->setCellValue('F1', '收款人')\r\n ->setCellValue('G1', '收款时间')\r\n ->setCellValue('H1', '送货状态')\r\n ->setCellValue('I1', '收款状态')\r\n ->setCellValue('J1', '备注');\r\n $i = 2;\r\n foreach ($datas as $model) {\r\n // Add some data\r\n $objPHPExcel->setActiveSheetIndex(0)->setCellValue('A'.$i, $model->number);\r\n $objPHPExcel->setActiveSheetIndex(0)->setCellValue('B'.$i, $model->order_sn);\r\n $objPHPExcel->setActiveSheetIndex(0)->setCellValueExplicit('C'.$i, ''.$model->amount);\r\n $objPHPExcel->setActiveSheetIndex(0)->setCellValue('D'.$i, $model->rel_amount);\r\n $objPHPExcel->setActiveSheetIndex(0)->setCellValue('E'.$i, $model->receiving);\r\n $objPHPExcel->setActiveSheetIndex(0)->setCellValue('F'.$i, ArrayHelper::getValue($model, 'userTrueName.user_truename'));\r\n $objPHPExcel->setActiveSheetIndex(0)->setCellValue('G'.$i, date(\"Y-m-d H:i\", $model->add_time));\r\n $objPHPExcel->setActiveSheetIndex(0)->setCellValue('H'.$i, $model->getOrderState());\r\n $objPHPExcel->setActiveSheetIndex(0)->setCellValue('I'.$i, $model->getGoodsPriceState());\r\n $objPHPExcel->setActiveSheetIndex(0)->setCellValue('J'.$i, $model->getRemarkExcel());\r\n $i++;\r\n }\r\n }\r\n \r\n // Rename worksheet\r\n $objPHPExcel->getActiveSheet()->setTitle('票号收款列表');\r\n \r\n \r\n // Set active sheet index to the first sheet, so Excel opens this as the first sheet\r\n $objPHPExcel->setActiveSheetIndex(0);\r\n \r\n \r\n // Redirect output to a client’s web browser (Excel5)\r\n header('Content-Type: application/vnd.ms-excel');\r\n header('Content-Disposition: attachment;filename=\"票号收款列表.xls\"');\r\n header('Cache-Control: max-age=0');\r\n // If you're serving to IE 9, then the following may be needed\r\n header('Cache-Control: max-age=1');\r\n \r\n // If you're serving to IE over SSL, then the following may be needed\r\n header ('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past\r\n header ('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); // always modified\r\n header ('Cache-Control: cache, must-revalidate'); // HTTP/1.1\r\n header ('Pragma: public'); // HTTP/1.0\r\n \r\n $objWriter = \\PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');\r\n $objWriter->save('php://output');\r\n exit;\r\n }",
"public function Excel($periode)\n {\n $query = $this->M_LapPerangkinganNilai->ExportExcel($periode);\n $this->excel_generator->set_query($query);\n $this->excel_generator->set_header(array('ID CALON', 'NAMA CALON','KOMPETENSI','INTERVIEW','KONSISTENSI','HASIL','KETERANGAN'));\n $this->excel_generator->set_column(array('calon_id', 'nm_calon','kompetensi','interview','konsistensi','hasil_akhir','keterangan'));\n $this->excel_generator->set_width(array(10, 20, 15, 15,15,15,15));\n $this->excel_generator->exportTo2007('Perangkingan Nilai Periode '.tanggal($periode));\n }",
"private function excelExport()\r\n {\r\n $result = true;\r\n // Extension\r\n if ($this->extensionType == 'Excel2007') {\r\n $this->fileName .= isset($this->extension) ? '.' . $this->extension : '.xlsx';\r\n } elseif ($this->extensionType == 'Excel5') {\r\n $this->fileName .= isset($this->extension) ? '.' . $this->extension : '.xls';\r\n } elseif ($this->extensionType == 'csv') {\r\n $this->fileName .= isset($this->extension) ? '.' . $this->extension : '.csv';\r\n } else {\r\n $this->log(CLogger::LEVEL_ERROR, 'Extension type is not supported.');\r\n $result = false;\r\n }\r\n // File\r\n if (!$this->stream)\r\n $this->filePath .= DIRECTORY_SEPARATOR . $this->fileName;\r\n // Header & Cell Styles\r\n if (!isset($this->headerStyle))\r\n $this->headerStyle = array(\r\n 'borders' => array(\r\n 'outline' => array(\r\n 'style' => PHPExcel_Style_Border::BORDER_THIN,\r\n 'color' => array('argb' => '000000')\r\n )\r\n ),\r\n 'font' => array(\r\n 'bold' => true\r\n )\r\n );\r\n if (!isset($this->cellStyle))\r\n $this->cellStyle = array(\r\n 'borders' => array(\r\n 'outline' => array(\r\n 'style' => PHPExcel_Style_Border::BORDER_THIN,\r\n 'color' => array('argb' => '000000')\r\n )\r\n )\r\n );\r\n // Columns\r\n if (!isset($this->columns)) {\r\n $this->columns = array();\r\n $allColumns = $this->model->getAttributes();\r\n foreach ($allColumns as $key => $value) {\r\n $this->columns[] = array(\r\n 'field' => $key,\r\n 'label' => $this->model->getAttributeLabel($key),\r\n 'type' => PHPExcel_Cell_DataType::TYPE_STRING,\r\n 'width' => 25,\r\n 'value' => null,\r\n 'itemAlias' => null,\r\n 'formatter' => null,\r\n 'headerStyle' => null,\r\n 'cellStyle' => null,\r\n 'visible' => true,\r\n );\r\n }\r\n if (is_null($allColumns) || count($allColumns) == 0) {\r\n $this->log(CLogger::LEVEL_ERROR, 'No column is available.');\r\n $result = false;\r\n }\r\n } else {\r\n $valid = true;\r\n foreach ($this->columns as $column) {\r\n if (!isset($column['field']) || !isset($column['label'])) {\r\n $valid = false;\r\n }\r\n }\r\n if (!$valid) {\r\n $this->log(CLogger::LEVEL_ERROR, 'An invalid column is provided. field and label attributes must be provided.');\r\n $result = false;\r\n }\r\n }\r\n if (isset($this->dataProvider)) {\r\n try {\r\n // PHPExcel instance\r\n $excel = new PHPExcel();\r\n PHPExcel_Cell::setValueBinder(new PHPExcel_Cell_AdvancedValueBinder());\r\n $excel->setActiveSheetIndex(0);\r\n $sheet = $excel->getActiveSheet();\r\n // Header\r\n $offset = 0;\r\n for ($column = 0; $column < count($this->columns); $column++) {\r\n if (isset($this->columns[$column]['visible']) && !$this->columns[$column]['visible']) {\r\n $offset++;\r\n } else {\r\n $sheet->getStyleByColumnAndRow($column-$offset, 1)->applyFromArray(isset($this->columns[$column]['headerStyle']) ? $this->columns[$column]['headerStyle'] : $this->headerStyle);\r\n $sheet->getCellByColumnAndRow($column-$offset, 1)->setValueExplicit($this->columns[$column]['label'], PHPExcel_Cell_DataType::TYPE_STRING);\r\n $sheet->getColumnDimensionByColumn($column-$offset)->setWidth(isset($this->columns[$column]['width']) ? $this->columns[$column]['width'] : 25);\r\n }\r\n }\r\n // Rows\r\n for ($row = 0; $row < count($this->dataProvider); $row++) {\r\n $offset = 0;\r\n for ($column = 0; $column < count($this->columns); $column++) {\r\n if (isset($this->columns[$column]['visible']) && !$this->columns[$column]['visible']) {\r\n $offset++;\r\n } else {\r\n $value = $this->getValue($row, $column);\r\n $sheet->getStyleByColumnAndRow($column-$offset, $row + 2)->applyFromArray(isset($this->columns[$column]['cellStyle']) ? $this->columns[$column]['cellStyle'] : $this->cellStyle);\r\n $sheet->getCellByColumnAndRow($column-$offset, $row + 2)->setValueExplicit($value, isset($this->columns[$column]['type']) ? $this->columns[$column]['type'] : PHPExcel_Cell_DataType::TYPE_STRING);\r\n }\r\n }\r\n $sheet->getRowDimension($row + 2)->setRowHeight(-1);\r\n }\r\n ob_end_clean();\r\n ob_start();\r\n $objWriter = PHPExcel_IOFactory::createWriter($excel, $this->extensionType);\r\n if ($this->stream) {\r\n header('Content-Type: application/vnd.ms-excel');\r\n header('Content-Disposition: attachment;filename=\"' . $this->fileName . '\"');\r\n header('Cache-Control: max-age=0');\r\n $objWriter->save('php://output');\r\n $excel->disconnectWorksheets();\r\n $result = true;\r\n } else {\r\n $objWriter->save($this->filePath);\r\n $excel->disconnectWorksheets();\r\n $result = Yii::app()->getBaseUrl(true).DIRECTORY_SEPARATOR.$this->mainPath.DIRECTORY_SEPARATOR.$this->subPath.DIRECTORY_SEPARATOR.$this->fileName;\r\n $result = str_replace(DIRECTORY_SEPARATOR, '/', $result);\r\n \r\n }\r\n } catch (Exception $e) {\r\n $this->log(CLogger::LEVEL_ERROR, 'PHPExcel Exception : ' . $e->getMessage());\r\n $result = false;\r\n }\r\n } else {\r\n $this->log(CLogger::LEVEL_ERROR, 'No data is provided.');\r\n $result = false;\r\n }\r\n return $result;\r\n }",
"function perform_export()\n {\n global $CFG;\n require_once($CFG->dirroot.'/blocks/bcgt/lib.php');\n global $CFG, $USER;\n $name = preg_replace(\"/[^a-z 0-9]/i\", \"\", $this->get_name());\n \n ob_clean();\n header(\"Pragma: public\");\n header('Content-Type: application/vnd.ms-excel; charset=utf-8');\n header('Content-Disposition: attachment; filename=\"'.$name.'.xlsx\"'); \n header(\"Cache-Control: must-revalidate, post-check=0, pre-check=0\");\n header(\"Cache-Control: private\", false);\n\n require_once $CFG->dirroot . '/blocks/bcgt/lib/PHPExcel/Classes/PHPExcel.php';\n \n $objPHPExcel = new \\PHPExcel();\n $objPHPExcel->getProperties()\n ->setCreator(fullname($USER))\n ->setLastModifiedBy(fullname($USER))\n ->setTitle($this->get_name())\n ->setSubject($this->get_name())\n ->setDescription($this->get_description());\n\n // Remove default sheet\n $objPHPExcel->removeSheetByIndex(0);\n \n $sheetIndex = 0;\n \n // Set current sheet\n $objPHPExcel->createSheet($sheetIndex);\n $objPHPExcel->setActiveSheetIndex($sheetIndex);\n $objPHPExcel->getActiveSheet()->setTitle(\"Report\");\n \n $rowNum = 1;\n\n // Headers\n if(isset($this->header))\n {\n if(!$this->has_split_header())\n {\n $col = 0;\n foreach($this->header AS $head)\n {\n $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col, $rowNum, $head);\n $col++;\n }\n $rowNum++;\n }\n else\n {\n //foreach row\n foreach($this->header AS $row)\n {\n $col = 0;\n foreach($row AS $rowObj)\n {\n $columnCount = $rowObj->colCount;\n $columnContent = $rowObj->content;\n //add all the cells, \n //thenmerge\n $startCol = $col;\n for($i=0;$i<$columnCount;$i++)\n {\n if($i == 0)\n {\n $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col, $rowNum, $columnContent);\n }\n else\n {\n $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col, $rowNum, '');\n }\n $col++;\n }\n $endCol = $col;\n if($columnCount != 1)\n {\n $objPHPExcel->getActiveSheet()->mergeCells(''.PHPExcel_Cell::stringFromColumnIndex($startCol).\n ''.$rowNum.':'.PHPExcel_Cell::stringFromColumnIndex($endCol - 1).''.$rowNum);\n }\n \n \n }\n $rowNum++;\n }\n } \n \n }\n //data\n if(isset($this->data))\n {\n foreach($this->data AS $data)\n {\n $col = 0;\n foreach($data AS $cell)\n { \n if(is_a($cell, 'stdClass'))\n {\n $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col, $rowNum, $this->build_excell_cell($cell));\n $objPHPExcel->getActiveSheet()->getStyle(''.PHPExcel_Cell::stringFromColumnIndex($col).''.$rowNum)->applyFromArray(\n array(\n 'fill' => array(\n 'type' => PHPExcel_Style_Fill::FILL_SOLID,\n 'color' => $this->get_excell_cell_color($cell)\n ),\n 'borders' => array(\n 'outline' => array(\n 'style' => PHPExcel_Style_Border::BORDER_THIN,\n 'color' => array('rgb'=>'cfcfcf')\n )\n )\n )\n ); \n if(isset($cell->colspan) && $cell->colspan > 1)\n {\n $objPHPExcel->getActiveSheet()->mergeCells(''.PHPExcel_Cell::stringFromColumnIndex($col).\n ''.$rowNum.':'.PHPExcel_Cell::stringFromColumnIndex($col + ($cell->colspan - 1)).''.$rowNum);\n \n $col = $col + ($cell->colspan - 1);\n }\n }\n else\n {\n $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col, $rowNum, $cell);\n }\n \n $col++;\n } \n $rowNum++;\n }\n }\n \n // Freeze rows and cols (everything to the left of D and above 2)\n $objPHPExcel->getActiveSheet()->freezePane($this->get_frozen_panes());\n \n // End\n $objPHPExcel->setActiveSheetIndex(0);\n $objWriter = \\PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');\n\n ob_clean();\n $objWriter->save('php://output');\n \n exit;\n }",
"public function export_to_excel($part)\n {\n // Init\n $table = [];\n $columns = [];\n\n $master_opsional = [];\n foreach (MasterOpsional::all() as $index => $item) {\n $master_opsional[$item['id_master_opsional']] = $item['opsional_master_ops']; \n }\n\n // print_r(MasterJenisAset::all());die();\n // Set column\n $columns = array_merge($columns, \n $this->get_column_responden(),\n $this->get_column_karak_rumah_tangga(),\n $this->get_column_pekerjaan_rumah_tangga(),\n $this->get_column_aset_rumah_tangga(),\n $this->get_column_kesehatan(),\n $this->get_column_perahu(),\n $this->get_column_alat_tangkap(),\n $this->get_column_tenaga_penggerak(),\n $this->get_column_aset_pendukung_usaha(),\n $this->get_column_biaya_tetap(),\n $this->get_column_biaya_variabel(),\n $this->get_column_penerimaan_usaha(),\n $this->get_column_ketenagakerjaan(),\n $this->get_column_konsumsi_pangan(),\n $this->get_column_konsumsi_non_pangan(),\n $this->get_column_partisiasi_sosial(),\n $this->get_column_partisiasi_organisasi(),\n $this->get_column_partisiasi_politik(),\n $this->get_column_rasa_percaya_masy(),\n $this->get_column_rasa_percaya_org(),\n $this->get_column_rasa_percaya_pol(),\n $this->get_column_nilai_norma()\n );\n \n $table[] = $columns;\n\n // Set data each responden\n // foreach (Responden::all() as $key => $value) {\n $i = $part - 1;\n $limit = 100;\n\n foreach (Responden::skip($i * $limit)->take($limit)->get() as $key => $value) {\n $row = [];\n $row = array_merge($row, \n $this->get_data_responden($value->id_responden),\n $this->get_data_karak_rumah_tangga($value->id_responden),\n $this->get_data_pekerjaan_rumah_tangga($value->id_responden),\n $this->get_data_aset_rumah_tangga($value->id_responden),\n $this->get_data_kesehatan($value->id_responden),\n $this->get_data_perahu($value->id_responden),\n $this->get_data_alat_tangkap($value->id_responden),\n $this->get_data_tenaga_penggerak($value->id_responden),\n $this->get_data_aset_pendukung_usaha($value->id_responden),\n $this->get_data_biaya_tetap($value->id_responden),\n $this->get_data_biaya_variabel($value->id_responden),\n $this->get_data_penerimaan_usaha($value->id_responden),\n $this->get_data_ketenagakerjaan($value->id_responden),\n $this->get_data_konsumsi_pangan($value->id_responden),\n $this->get_data_konsumsi_non_pangan($value->id_responden),\n $this->get_data_partisipasi_sosial($value->id_responden, $master_opsional),\n $this->get_data_partisipasi_organisasi($value->id_responden, $master_opsional),\n $this->get_data_partisipasi_politik($value->id_responden, $master_opsional),\n $this->get_data_rasa_percaya_masy($value->id_responden, $master_opsional),\n $this->get_data_rasa_percaya_org($value->id_responden, $master_opsional),\n $this->get_data_rasa_percaya_pol($value->id_responden, $master_opsional),\n $this->get_data_nilai_norma($value->id_responden, $master_opsional)\n );\n\n $table[] = $row;\n }\n // echo 'kolom: ' . count($table[0]) . '<br>';\n // echo 'data: ' . count($table[1]);\n // print_r($table); \n // die();\n\n Excel::create('Panelkanas_2016_Rekod_' . (($i * $limit) + 1) . '_' . (($i * $limit) + $limit), function($excel) use($table){\n $excel->sheet('Sheet1', function($sheet) use($table){\n $sheet->fromArray(\n $table,\n null,\n 'A1',\n false,\n false\n );\n\n\n // Set format of cell\n $sheet->row(1, function($row) {\n // call cell manipulation methods\n $row->setFontWeight('bold');\n\n });\n });\n\n })->export('xlsx');\n }"
] | [
"0.8031421",
"0.79440135",
"0.7891493",
"0.78352374",
"0.7747519",
"0.7734909",
"0.75899935",
"0.75708073",
"0.75437886",
"0.7542766",
"0.7486423",
"0.7427744",
"0.741639",
"0.7403237",
"0.7400088",
"0.7336463",
"0.73049176",
"0.73028296",
"0.7296454",
"0.7257007",
"0.7256273",
"0.7206016",
"0.71806055",
"0.7137353",
"0.7132592",
"0.711135",
"0.71076006",
"0.7074337",
"0.70581824",
"0.7030235",
"0.70091575",
"0.6996448",
"0.6991358",
"0.69818175",
"0.69784075",
"0.6977212",
"0.6969767",
"0.6951",
"0.6929643",
"0.6929459",
"0.69067526",
"0.6902166",
"0.69018364",
"0.6898166",
"0.6895579",
"0.6886966",
"0.6881366",
"0.68805224",
"0.6872372",
"0.68705046",
"0.6867024",
"0.68648005",
"0.6863562",
"0.68518466",
"0.6851815",
"0.6849165",
"0.68368846",
"0.68365353",
"0.68363965",
"0.68307155",
"0.6829709",
"0.6827319",
"0.6819628",
"0.6817316",
"0.6794907",
"0.6773635",
"0.6766873",
"0.67667806",
"0.67611986",
"0.6758366",
"0.6755857",
"0.6752731",
"0.6733986",
"0.669672",
"0.6694161",
"0.66915756",
"0.6683214",
"0.66789556",
"0.6662273",
"0.6661914",
"0.66565394",
"0.665036",
"0.664905",
"0.66485465",
"0.66474825",
"0.66472644",
"0.66424406",
"0.6637763",
"0.6624335",
"0.6623593",
"0.6618686",
"0.6608299",
"0.66025543",
"0.6596934",
"0.65844965",
"0.65825135",
"0.6570073",
"0.65587384",
"0.6550064",
"0.6543467",
"0.6536611"
] | 0.0 | -1 |
Normalize rules if needed. | public function normalizeRules($rules): array
{
if (\is_string($rules)) {
$rules = $this->parseRules($rules);
}
if (!\is_array($rules)) {
throw new \UnexpectedValueException('The rules should be an array or string');
}
return $this->cancelOnFail($rules);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function normalize() {}",
"public function normalize()\n {\n }",
"protected abstract function rules();",
"abstract public function parseRules();",
"abstract public function rules();",
"abstract public function rules();",
"abstract public function rules();",
"abstract public function rules();",
"protected function makeRules()\n {\n foreach ($this->model->rules as $key => $value) {\n if (str_contains($value, 'unique')) {\n // find posittion\n $pos = strpos($value, 'unique') - 1;\n $final = substr($value, 0, $pos);\n $this->model->rules[$key] = $final;\n }\n }\n\n }",
"public function commonRules() {\n $this->sanitize();\n $rules = [\n 'first_name' => 'required|min:2|max:40|regex:/' . only_alpha_valid,\n 'last_name' => 'required|min:2|max:40|regex:/' . only_alpha_valid,\n 'date_of_birth' => 'required',\n 'telephone_no' => 'required|min:5|max:20|regex:/' . numeric_space_valid,\n 'address' => 'required|min:5|max:100',\n 'city' => 'required|min:2|max:40',\n 'postal_code' => 'required|min:4|max:7|regex:/'.alpha_numeric_valid,\n 'county' => 'required',\n 'country' => 'required',\n 'howfinds_id' => 'required',\n 'howfinds_other' => 'required',\n 'image' => 'image|max:' . img_maxsize\n ];\n if (!empty(Request::all())) {\n if (Request::get('howfinds_id') != '-1') {\n unset($rules['howfinds_other']);\n }\n }\n return $rules;\n }",
"protected function normaliseRules(array $rules)\n {\n // We can simply call Validator::make($data, $rules)->getRules() to get the normalised rules,\n // but Laravel will ignore any nested array rules (`ids.*')\n // unless the key referenced (`ids`) exists in the dataset and is a non-empty array\n // So we'll create a single-item array for each array parameter\n $values = collect($rules)\n ->filter(function ($value, $key) {\n return Str::contains($key, '.*');\n })->mapWithKeys(function ($value, $key) {\n if (Str::endsWith($key, '.*')) {\n // We're dealing with a simple array of primitives\n return [Str::substr($key, 0, -2) => [Str::random()]];\n } elseif (Str::contains($key, '.*.')) {\n // We're dealing with an array of objects\n [$key, $property] = explode('.*.', $key);\n\n // Even though this will be overwritten by another property declaration in the rules, we're fine.\n // All we need is for Laravel to see this key exists\n return [$key => [[$property => Str::random()]]];\n }\n })->all();\n\n // Now this will return the complete ruleset.\n // Nested array parameters will be present, with '*' replaced by '0'\n $newRules = Validator::make($values, $rules)->getRules();\n\n // Transform the key names back from 'ids.0' to 'ids.*'\n return collect($newRules)->mapWithKeys(function ($val, $paramName) use ($rules) {\n if (Str::contains($paramName, '.0')) {\n $genericArrayKeyName = str_replace('.0', '.*', $paramName);\n\n // But only if that was the original value\n if (isset($rules[$genericArrayKeyName])) {\n $paramName = $genericArrayKeyName;\n }\n }\n\n return [$paramName => $val];\n })->toArray();\n }",
"function clearRules()\n {\n $this->rules = array();\n }",
"public function clearRules()\n {\n $this->rules = array();\n }",
"public function rules();",
"public function rules();",
"public function rules();",
"protected function processRules() {\n $this->rules = array(\n 'dang-ky' => 'auth/register',\n 'lay-lai-mat-khau' => 'auth/forgotpassword',\n 'tim-kiem-san-pham' => 'product/search',\n 'tin-tuc/gioi-thieu' => 'site/about',\n 'doi-tac' => 'partner/index',\n 'tuyen-dung' => 'recruitment/list',\n 'dai-ly' => 'agency/list',\n 'tin-tuc/<title>-<id:\\d+>' => 'news/list',\n 'tin-tuc' => 'news/list',\n 'tin-tuc/chi-tiet/<title>-<id:\\d+>' => 'news/detail',\n 'lien-he' => 'site/contact',\n 'danh-muc-san-pham/<title>-<id:\\d+>-<sort>' => 'product/catalog',\n 'danh-muc-san-pham/<title>-<id:\\d+>' => 'product/catalog',\n 'nhan-hang/<name>-<id:\\d+>-<mid:\\d+>-<sort>' => 'product/manufacture',\n 'nhan-hang/<name>-<id:\\d+>-<mid:\\d+>' => 'product/manufacture',\n 'san-pham/<title>-<id:\\d+>' => 'product/detail',\n 'gio-hang' => 'shoppingcart/order',\n 'gio-hang/them-<id:\\d+>' => 'shoppingcart/add',\n \n '<controller:\\w+>/<id:\\d+>' => '<controller>/view',\n '<controller:\\w+>/<action:\\w+>/<id:\\d+>' => '<controller>/<action>',\n '<controller:\\w+>/<action:\\w+>' => '<controller>/<action>',\n );\n // Run parent\n parent::processRules();\n }",
"abstract function rules();",
"abstract protected function getValidationRules();",
"public static function allRules()\n {\n }",
"protected function normalize()\r\n\t{\r\n\t\tif ($this->isFetched())\r\n\t\t{\r\n\t\t\tif ($this->validationInfo)\r\n\t\t\t{\r\n\t\t\t\t$this->normalizedValue = $this->validationInfo->normalize($this->taintValue);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$this->normalizedValue = $this->taintValue;\r\n\t\t\t}\t\r\n\t\t}\r\n\t}",
"abstract protected function getRules();",
"private function setupRules()\n {\n // Validator::extend('rule', 'App\\Support\\Rules\\Rule@validate');\n // Validator::replacer('rule', 'App\\Support\\Rules\\Rule@message');\n }",
"public function normalize(): self;",
"abstract protected function setValidationRules(): array;",
"public function validateRules();",
"private static function getRules() {\n return [\n 'imeArtikla' => FILTER_SANITIZE_SPECIAL_CHARS,\n 'cenaArtikla' => FILTER_VALIDATE_FLOAT,\n 'opisArtikla' => FILTER_SANITIZE_SPECIAL_CHARS,\n 'kategorijaArtikla' => FILTER_SANITIZE_SPECIAL_CHARS,\n 'zalogaArtikla' => FILTER_VALIDATE_FLOAT,\n \n /*'year' => [\n 'filter' => FILTER_VALIDATE_INT,\n 'options' => [\n 'min_range' => 1800,\n 'max_range' => date(\"Y\")\n ]\n ]*/\n ];\n \n }",
"abstract protected function prepareFieldValidationRule($field_validation_rule);",
"public function rules($items = array()){\n //Merge the entered rules with the existing rules\n $this->rules = array_merge($this->rules, $items);\n }",
"protected function prepareForValidation()\n {\n $input = array_filter(\n $this->all(['voucher-start', 'voucher-end', 'centre', 'date-sent']),\n 'strlen'\n );\n\n foreach ($input as $key => $value) {\n if (in_array($key, ['voucher-start', 'voucher-end'])) {\n $clean = Voucher::cleanCodes((array)$value);\n $input[$key] = strtoupper((array_shift($clean)));\n }\n }\n // replace old input with new input\n $this->replace($input);\n }",
"protected function prepareForValidation()\n {\n if($this->input('slug')){\n $this->merge(['slug' => make_slug($this->input('slug'))]);\n }else{\n $this->merge(['slug' => make_slug($this->input('title'))]);\n }\n }",
"protected function processRules() {\n\n\t\t$active_lang = implode('|', array_keys( Yii::app()->params['languages'] ));\n\t\t$domain = Yii::app()->params['current_domain'];\n\t\t\n\t\t// if( ($urlrules = Yii::app()->cache->get('customurlrules')) === false )\n\t\t// {\n\t\t\t$_more = array();\n\t\t\t\n\t\t\t$dbCommand = Yii::app()->db->createCommand(\"SELECT alias, language FROM {{custompages}}\")->query();\n\t\t\t$urlRules = $dbCommand->readAll();\n\t\t\tforeach($urlRules as $rule)\n\t\t\t{\n\t\t\t\t$_more[ \"/<alias:({$rule['alias']})>\" ] = array('site/custompages/index');\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t$dbCommand = Yii::app()->db->createCommand(\"SELECT id, seoname FROM {{members}}\")->query();\n\t\t\t$urlUsers = $dbCommand->readAll();\n\t\t\tforeach($urlUsers as $uu)\n\t\t\t{\n\t\t\t\t$_more[ \"/user/<id:({$uu['id']})>-<alias:({$uu['seoname']})>\" ] = array('site/users/viewprofile');\n\t\t\t}\n\n\t\t\t$this->rules = array(\n\n\t\t\t\t//-----------------------ADMIN--------------\n\t\t\t\t\"/admin\" => 'admin/index/index',\n\t\t\t\t\"/admin/<_c:([a-zA-z0-9-]+)>\" => 'admin/<_c>/index',\n\t\t\t\t\"/admin/<_c:([a-zA-z0-9-]+)>/<_a:([a-zA-z0-9-]+)>\" => 'admin/<_c>/<_a>',\n\t\t\t\t\"/admin/<_c:([a-zA-z0-9-]+)>/<_a:([a-zA-z0-9-]+)>//*\" => 'admin/<_c>/<_a>/',\n\t\t\t\t//-----------------------ADMIN--------------\n\n //gii\n \"/gii\" => array('gii'),\n \"/gii/<_c:([a-zA-z0-9-_]+)>\" => array('gii/<_c>/'),\n \"/gii/<_c:([a-zA-z0-9-_]+)>/<_a:([a-zA-z0-9-_]+)>/*\" => array('gii/<_c>/<_a>/'),\n\n\t\t\t\t\"/products/category/<alias:.*?>\" => 'site/products/category/',\n \"/products/active/<type:(lowprice|cent|all)>/\" => 'site/products/active/',\n \"/products/ended/<type:(lowprice|cent|all)>/\" => 'site/products/ended/',\n \"/products/upcoming/<type:(lowprice|cent|all)>/\" => 'site/products/upcoming/',\n \"/products/label/<id:([a-zA-z0-9-_]+)?>\" => 'site/products/label/',\n \"/messagesShop/index/<shop_id:([a-zA-z0-9-_]+)?>\" => 'site/messagesShop/index/',\n \n \"/register/\" => 'site/profile/create/',\n \"/Anmeldung/\" => 'site/profile/create/',\n \n \"/search/detail/<condition:([a-zA-z0-9-_]+)?>\" => 'site/search/detail',\n \"/shop/search/<shop_id:([a-zA-z0-9-_]+)?>/<condition:([a-zA-z0-9-_]+)?>\" => 'site/shop/search/',\n \"/search.html/\" => 'site/search/search',\n \"/orders/customer/<shop_id:([a-zA-z0-9-_]+)>\" => 'site/orders/customer/',\n \"/admin/orders/vi_customer/<id:([a-zA-z0-9-_]+)>\" => 'site/admin/orders/vi_customer/',\n \"/shopRatings/detail/<shop_id:([a-zA-z0-9-_]+)>\" => 'site/shopRatings/detail/',\n \"/shopManager/detail/<shop_id:([a-zA-z0-9-_]+)>\" => 'site/shopManager/detail/',\n \"/custompages/detail/<alias:.*?>\" => 'site/custompages/detail',\n \"/shopNewsletter/sendNewletter/<shop_id:([a-zA-z0-9-_]+)>\" => 'site/shopNewsletter/sendNewletter/',\n \"/shopNewsletter/join/<shop_id:([a-zA-z0-9-_]+)>\" => 'site/shopNewsletter/join/',\n \"/blogshop/blog/<shop_id:([a-zA-z0-9-_]+)>/<blog_id:([a-zA-z0-9-_]+)>\" => 'site/blogshop/blog/',\n \"/blogshop/detail/<shop_id:([a-zA-z0-9-_]+)>\" => 'site/blogshop/detail/',\n \"/shop/sort/<shop_id:([a-zA-z0-9-_]+)>/<sort_id:([a-zA-z0-9-_]+)>\" => 'site/shop/sort/',\n \"/shop/contact/<shop_id:([a-zA-z0-9-_]+)>\" => 'site/shop/contact/',\n \"/shop/star/<shop_id:([a-zA-z0-9-_]+)>/<star:([a-zA-z0-9-_]+)>\" => 'site/shop/star/',\n \"/shop/findproduct/<shop_id:([a-zA-z0-9-_]+)>/<price:([a-zA-z0-9-_]+)>\" => 'site/shop/findproduct/',\n \"/shop/category/<shop_id:([a-zA-z0-9-_]+)>/<category_id:([a-zA-z0-9-_]+)>\" => 'site/shop/category/',\n \"/productsshop/detail/<shop_id:([a-zA-z0-9-_]+)>/<id:([a-zA-z0-9-_]+)>\" => 'site/productsShop/detail/',\n \"/productsshop/addComment\" => 'site/productsShop/addComment',\n \"/products/detail/<id:([a-zA-z0-9-_]+)>\" => 'site/products/detail/',\n \"/tags/detail/<slug:([a-zA-z0-9-_]+)>\" => 'site/tags/detail/',\n \"/shop/detail/<shop_id:([a-zA-z0-9-_]+)>\" => 'site/shop/detail/',\n \n \"/votes/voting/<type:(lowprice|cent|all)>/\" => 'site/votes/voting/',\n\n\t\t\t\t\"/<_a:(register|login|logout|verify)>\" => 'site/users/<_a>',\n\t\t\t\t\"/admin-login\" => 'site/users/admin',\n\t\t\t\t\"/forgot-password\" => 'site/users/lostpassword',\n\t\t\t\t\"/change-password\" => 'site/users/changepass',\n\t\t\t\t\"/contact-us\" => 'site/contactus/index',\n\t\t\t\t\"/messages\" => 'site/usermessages/index',\n\t\t\t\t\"/<_a:(viewmessage|sendmessage)>\" => 'site/usermessages/<_a>',\n\t\t\t\t// \"/invoices\" => 'site/transactions/index',\n\t\t\t\t// \"/buy-a-plan\" => 'site/transactions/buyplan',\n\t\t\t\t// \"/<_a:(earning|cashout)>\" => 'site/transactions/<_a>',\n\t\t\t\t// \"/<id:(\\d+)>-<ualias:(.*?)>/blog/<alias:(.*)>\" => array('site/blog/viewpost'),\n\t\t\t\t// Blogs\n\t\t\t\t\"/blog/category/<alias:(.*)>\" => 'site/blog/viewcategory',\n\t\t\t\t\"/blog/view/<alias:(.*)>\" => 'site/blog/viewpost',\n\n\t\t\t\t\"/\" => 'site/index/index',\n\t\t\t\t\"/<_c:([a-zA-z0-9-]+)>\" => 'site/<_c>/index',\n\t\t\t\t\"/<_c:([a-zA-z0-9-]+)>/<_a:([a-zA-z0-9-]+)>\" => 'site/<_c>/<_a>',\n\t\t\t\t\"/<_c:([a-zA-z0-9-]+)>/<_a:([a-zA-z0-9-]+)>//*\" => 'site/<_c>/<_a>/',\n \n \n \n\t\t\t);\n\n\t\t\t$urlrules = array_merge( $_more, $this->rules );\n\t\t\t//Yii::app()->cache->set('customurlrules', $urlrules);\n\t\t// }\n\t\t\n\t\t$this->rules = $urlrules;\n\t\t\n // Run parent\n parent::processRules();\n\n }",
"protected function _generateRules()\n {\n }",
"protected function setUpValidationRules()\n {\n $statuses = array_keys(static::$statuses);\n\n static::$rules = [\n 'title' => 'required',\n 'slug' => 'required|unique:pages,slug,' . $this->id,\n 'status' => 'in:' . implode(',', $statuses),\n ];\n }",
"abstract public function rules(): array;",
"abstract public function rules(): array;",
"abstract public function rules(): array;",
"public static function getRules() {\n return [\n 'title' => FILTER_SANITIZE_SPECIAL_CHARS,\n 'author' => FILTER_SANITIZE_SPECIAL_CHARS,\n 'description' => FILTER_SANITIZE_SPECIAL_CHARS,\n 'price' => FILTER_VALIDATE_FLOAT,\n 'year' => [\n 'filter' => FILTER_VALIDATE_INT,\n 'options' => [\n 'min_range' => 1800,\n 'max_range' => date(\"Y\")\n ]\n ]\n ];\n }",
"public function setRules() {\n }",
"public function rules()\n {\n //no rules\n return [];\n }",
"public function rules()\n\t{\n\t\treturn Answer::updateValidation($this);\n\t}",
"protected function prepareValidations() {}",
"public function rules()\n\t{\n\t\treturn PaginateHelper::getRules([\n\t\t\t'groupid'\t=> 'array',\n\t\t\t'groupid.*'\t=> 'integer',\n\t\t\t'hostid'\t=> 'array',\n\t\t\t'hostid.*'\t=> 'integer',\n\t\t\t'host'\t\t=> 'string|max:255',\n\t\t],\n\t\t[\n\t\t\t'hostid',\n\t\t\t'host'\n\t\t],\n\t\t[\n\t\t\t'hostid',\n\t\t\t'host'\n\t\t]);\n\t}",
"protected function prepareForValidation()\n {\n $merge = [];\n\n if ($this->valtotal) {\n $merge['valtotal'] = Format::strToFloat($this->valtotal);\n }\n\n $this->merge($merge);\n }",
"abstract protected function validationRules() : array;",
"public static function getStandardValidationRules() : array\n {\n }",
"public function rules()\n {\n }",
"public function rules()\n {\n\n $rules = [\n 'blogs_status' => 'required',\n 'blogs_logo' => 'required|image',\n 'ar.blogs_title' => 'max:250',\n 'ar.blogs_desc' => '',\n 'en.blogs_title' => 'max:250',\n 'en.blogs_desc' => '',\n ];\n\n $languages = Language::active()->get();\n\n // foreach ($languages as $languag) {\n\n // $rules[ $languag->locale. '.blogs_title' ] = 'required|max:250';\n // $rules[ $languag->locale. '.blogs_desc' ] = 'required';\n // }\n\n if ($this->isMethod('PUT')) {\n $rules['blogs_logo'] = 'nullable|image';\n }\n\n return $rules;\n }",
"function sanitizeFields()\n\t{\n\t\tif(isset($this->sanitize) && isset($this->data[$this->name]))\n\t\t{\n\t\t\tforeach($this->data[$this->name] as $field => $value)\n\t\t\t{\n\t\t\t\tif(isset($this->sanitize[$field]))\n\t\t\t\t{\n\t\t\t\t\tif(!is_array($this->sanitize[$field]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->data[$this->name][$field] = $this->sanitize($this->data[$this->name][$field], $this->sanitize[$field]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tforeach($this->sanitize[$field] as $action)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->data[$this->name][$field] = $this->sanitize($this->data[$this->name][$field], $action);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"public function setupValidatorRules()\n { }",
"public function run() {\n \n foreach( $this->validation_rules as $var=>$opt) {\n \n /*\n $default_opt = [\n 'min' => false,\n 'max' => false,\n 'required' => false,\n ];\n $opt = array_merge($default_opt,$opt);\n */\n \n //if compulsary field is not set then no point validating further\n if(isset($opt['set']) && !$this->is_set($var)) {\n continue;\n } \n \n /* Trim whitespace from beginning and end of variable */\n if( array_key_exists('trim', $opt) ) {\n $this->source[$var] = trim( $this->source[$var] );\n }\n \n $is_required = false;\n \n //if required field is empty then no point validating further\n if( isset($opt['required']) && !$this->not_empty($var) ) {\n continue;\n }\n \n if( isset($opt['required']) ) {\n unset($opt['required']);\n $is_required = true;\n }\n \n if( isset($opt['set']) )\n unset($opt['set']);\n \n if( isset($opt['trim']) )\n unset($opt['trim']);\n \n foreach( $opt as $rule_type=>$rule_val ) {\n $raw_field_value = isset($this->source[$var]) ? $this->source[$var] : false;\n \n /*\n if(is_string($raw_field_value) && strlen($raw_field_value) == 0 && !$is_required)\n continue;\n */\n $result = true;\n if( method_exists($this, 'validate_'.$rule_type) ) {\n $t_params = is_array($rule_val) ? array_merge([$var], $rule_val) : [$var, $rule_val];\n //$result = call_user_func_array([$this, 'validate_'.$rule_type], [$var, $rule_val]);\n $result = call_user_func_array([$this, 'validate_'.$rule_type], $t_params);\n }\n elseif( method_exists($this->caller_obj, $rule_type) ) {\n $t_params = is_array($rule_val) ? array_merge([$this, $raw_field_value], $rule_val) : [$this, $raw_field_value, $rule_val];\n $result = call_user_func_array([$this->caller_obj, $rule_type], $t_params);\n }\n elseif( function_exists($rule_type) ) {\n $t_params = is_array($rule_val) ? array_merge([$this, $raw_field_value], $rule_val) : [$this, $raw_field_value, $rule_val];\n $result = call_user_func_array($rule_type, $t_params);\n }\n \n if($result === false)\n break;\n }\n }\n }",
"public function rules()\n {\n return array_merge(\n $this->contact->rules(),\n $this->anamnesi->rules()\n );\n }",
"public function validate()\n {\n foreach ( $this->rules as $key => $rules ) {\n foreach ( $rules as $type => $rule ) {\n if ( $this->hasErrors( $key ) )\n break;\n $this->validateRule( $key, $type, $rule );\n }\n }\n }",
"protected function buildRules()\n {\n $this->rules = [\n 'title' => 'required|min:5|max:255',\n 'category_id' => 'required',\n 'condition_id' => 'required',\n 'description' => 'required|min:5|max:255',\n 'request' => 'required|min:5|max:255',\n ];\n\n $this->messages = [\n 'required' => 'Este campo es requerido.',\n 'title.max' => 'No debe ser mayor a :max caracteres.',\n 'title.min' => 'No debe ser menor a :min caracteres.',\n 'request.min' => 'No debe ser menor a :min caracteres.',\n ];\n\n // El request trae imagenes nuevas o va a remover imagenes\n $image_files = $this->file('image');\n $remove_images = $this->input('remove_images', []);\n\n $validate_images = true;\n $article_id = $this->route()->getParameter('article_id');\n\n if ($article_id) {\n $article = Article::findOrFail($article_id);\n $validate_images = $article->images->count() < count($remove_images);\n }\n\n if ($validate_images) {\n foreach (range(0, count($image_files) - 1) as $index) {\n $this->rules['image.' . $index] = 'required|image';\n $this->messages['image.' . $index . '.image'] = 'Una de las imagenes no es válida.';\n }\n }\n }",
"public function clearRules()\r\n\t{\r\n\t \t$this->mapping_rules = array();\r\n\t}",
"abstract public function sanitize();",
"public function removeValidation() {\n\n\t\t$fields = $this->getFields();\n\n\t\tforeach ($fields as $field) {\n\t\t\t$field->clearValidationRules();\n\t\t}\n\t}",
"function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CoverImageID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_TrackID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Status' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Rank' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CreateDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}",
"public function rules()\n {\n //\n }",
"public function rules()\n\t{\n\t\treturn(parent::rules());\n\t}",
"public function rules()\n\t{\n // will receive user inputs.\n return array(\n array('short_content, title, content, post_type', 'required', 'on' => 'News, UpdateNews'),\n array('slug, status', 'safe')\n );\n }",
"public function __construct()\n {\n $this->pluralRules = Pluralize::all();\n $this->singularRules = Singularize::all();\n $this->aplicator = new Rules();\n \n foreach (Irregularize::all() as $rule) {\n $this->irregularSingles[$rule[0]] = $rule[1];\n $this->irregularPlurals[$rule[1]] = $rule[0];\n }\n \n foreach (Uncountable::all() as $rule) {\n $this->addUncountableRule($rule);\n }\n }",
"private function process()\n {\n foreach ($this->rules as $key => $rule)\n {\n $exp = explode('|', $rule);\n\n foreach ($exp as $method)\n {\n if (strstr($method, ':')) list($method, $param) = explode(':', $method, 2);\n else $param = '';\n \n $input = array_get($this->input, $key);\n\n if (method_exists($this, \"process_$method\") === false)\n {\n if (!$input) continue;\n \n if (array_key_exists($method, self::$custom))\n {\n if (call_user_func(self::$custom[$method], $input, $param, $this) !== true) $this->set_error($key, $method);\n } else {\n throw new ValidatorNotFound(\"No validator exists for [$method]\");\n }\n } else {\n if (($input || $method == 'required') && $this->{\"process_$method\"}($input, $param, $this) !== true) $this->set_error($key, $method);\n }\n }\n }\n }",
"public function rules()\n {\n if( $this->is('category/store') ) {\n return $this->createRules();\n return $this->messages();\n } \n elseif ( $this->is('category/update/{id}') ) {\n return $this->updateRules();\n return $this->messages();\n }\n }",
"public function rules()\n {\n $this->reformatData();\n\n $rules = [\n \"title\" => \"required|max:200\",\n \"content\" => \"required\",\n \"category_id\" => \"required|exists:categories,id\",\n \"cover\" => [\"nullable\"],\n \"tags\" => \"required\"\n ];\n\n if($this->method() == \"POST\") {\n $rules[\"cover\"][0] = [\"required\", \"image\"];\n }\n\n if($this->method() === \"PUT\" && $this->cover !== null) {\n $rules[\"cover\"][] = \"image\";\n }\n\n return $rules;\n }",
"protected function processNormalization(NormalizeValueContext $context): void\n {\n $value = $context->getResult();\n if (null !== $value && $this->isValueNormalizationRequired($value)) {\n if ($context->isRangeAllowed() && str_contains($value, $context->getRangeDelimiter())) {\n $context->setResult($this->normalizeRangeValue($value, $context->getRangeDelimiter()));\n } elseif ($context->isArrayAllowed()) {\n $context->setResult($this->normalizeArrayValue($value, $context->getArrayDelimiter()));\n } else {\n $this->validateValue($value);\n $context->setResult($this->normalizeValue($value));\n }\n }\n $context->setProcessed(true);\n }",
"protected function preValidate() {}",
"public function processTransformationRules()\n {\n $rulesText = '';\n\n #-----------------------------------------------------------------------------\n # If auto-generated rules were specified, generate the rules,\n # otherwise, get the from the configuration\n #-----------------------------------------------------------------------------\n if ($this->configuration->getTransformRulesSource() === Configuration::TRANSFORM_RULES_DEFAULT) {\n $rulesText = $this->autoGenerateRules();\n } else {\n $rulesText = $this->configuration->getTransformationRules();\n }\n \n $tablePrefix = $this->configuration->getTablePrefix();\n $schemaGenerator = new SchemaGenerator($this->dataProject, $this->configuration, $this->logger);\n\n list($schema, $parseResult) = $schemaGenerator->generateSchema($rulesText);\n\n ###print \"\\n\".($schema->toString()).\"\\n\";\n\n $this->schema = $schema;\n\n return $parseResult;\n }",
"protected function prepareForValidation()\n {\n if($this->name != null) {\n $this->merge([\n 'name' => filter_var($this->name, FILTER_SANITIZE_STRING),\n ]);\n }\n\n if($this->email != null) {\n $this->merge([\n 'email' => filter_var(trim($this->email), FILTER_SANITIZE_EMAIL),\n ]);\n }\n\n if($this->leader != null) {\n $this->merge([\n 'leader' => filter_var($this->leader, FILTER_SANITIZE_STRING),\n ]);\n }\n\n if($this->gruplac != null) {\n $this->merge([\n 'gruplac' => filter_var(trim($this->gruplac), FILTER_SANITIZE_URL),\n ]);\n }\n\n if($this->minciencias_code != null) {\n $this->merge([\n 'minciencias_code' => filter_var(trim($this->minciencias_code), FILTER_SANITIZE_STRING),\n ]);\n }\n\n if($this->minciencias_category != null) {\n $this->merge([\n 'minciencias_category' => filter_var($this->minciencias_category, FILTER_SANITIZE_STRING),\n ]);\n }\n\n if($this->website != null) {\n $this->merge([\n 'website' => filter_var(trim($this->website), FILTER_SANITIZE_URL),\n ]);\n }\n\n if($this->educational_institution_id != null) {\n $this->merge([\n 'educational_institution_id' => (integer) filter_var($this->educational_institution_id, FILTER_SANITIZE_NUMBER_INT),\n ]);\n }\n }",
"public function setUpdateRules()\n {\n $this->validationRules['nic'] = $this->validationRules['nic'] . ',' . $this->id;\n }",
"public function rules()\n {\n $rules = [];\n $cat = null;\n \n // CREATE\n if (in_array($this->method(), ['POST', 'CREATE'])) {\n $rules = [\n 'parent' => 'required|not_in:0',\n 'category' => 'required|not_in:0',\n 'post_type' => 'required|not_in:0',\n 'company_name' => 'required|mb_between:2,200|whitelist_word_title',\n 'company_description' => 'required|mb_between:5,1000|whitelist_word',\n 'title' => 'required|mb_between:2,200|whitelist_word_title',\n 'description' => 'required|mb_between:5,2000|whitelist_word',\n 'salary_type' => 'required|not_in:0',\n 'contact_name' => 'required|mb_between:2,200',\n 'email' => 'max:100|whitelist_email|whitelist_domain',\n 'phone' => 'max:20',\n 'city' => 'required|not_in:0',\n ];\n \n // Check 'logo' is required\n if ($this->file('logo')) {\n $rules['logo'] = 'required|image|mimes:' . getUploadFileTypes('image') . '|max:' . (int)config('settings.upload_max_file_size', 1000);\n }\n \n // Recaptcha\n if (config('settings.activation_recaptcha')) {\n $rules['g-recaptcha-response'] = 'required';\n }\n }\n \n // UPDATE\n if (in_array($this->method(), ['PUT', 'PATCH', 'UPDATE'])) {\n $rules = [\n 'category' => 'required|not_in:0',\n 'post_type' => 'required|not_in:0',\n 'company_name' => 'required|mb_between:2,200|whitelist_word_title',\n 'company_description' => 'required|mb_between:50,1000|whitelist_word',\n 'title' => 'required|mb_between:10,200|whitelist_word_title',\n 'description' => 'required|mb_between:50,2000|whitelist_word',\n 'salary_type' => 'required|not_in:0',\n 'contact_name' => 'required|mb_between:2,200',\n 'email' => 'max:100|whitelist_email|whitelist_domain',\n 'phone' => 'max:20',\n 'city' => 'required|not_in:0',\n ];\n \n // Check 'logo' is required\n if ($this->file('logo')) {\n $rules['logo'] = 'required|image|mimes:' . getUploadFileTypes('image') . '|max:' . (int)config('settings.upload_max_file_size', 1000);\n }\n }\n \n // COMMON\n \n // Location\n if (in_array(config('country.admin_type'), ['1', '2']) && config('country.admin_field_active') == 1) {\n $rules['admin_code'] = 'required|not_in:0';\n }\n \n // Email\n if ($this->filled('email')) {\n $rules['email'] = 'email|' . $rules['email'];\n }\n if (isEnabledField('email')) {\n if (isEnabledField('phone') && isEnabledField('email')) {\n if (Auth::check()) {\n $rules['email'] = 'required_without:phone|' . $rules['email'];\n } else {\n // Email address is required for Guests\n $rules['email'] = 'required|' . $rules['email'];\n }\n } else {\n $rules['email'] = 'required|' . $rules['email'];\n }\n }\n \n // Phone\n if ($this->filled('phone')) {\n $rules['phone'] = 'phone:' . $this->input('country', config('country.code')) . ',mobile|' . $rules['phone'];\n }\n if (isEnabledField('phone')) {\n if (isEnabledField('phone') && isEnabledField('email')) {\n $rules['phone'] = 'required_without:email|' . $rules['phone'];\n } else {\n $rules['phone'] = 'required|' . $rules['phone'];\n }\n }\n \n return $rules;\n }",
"public function rules($data);",
"public function rules()\n {\n if($this->isMethod('post')) {\n return $this->storeRules();\n }\n else if($this->isMethod('put') || $this->isMethod('patch')){\n return $this->updateRules();\n }\n }",
"public function rules()\n {\n return []\n //\n ;\n }",
"public function rules(): array;",
"public function rules(): array;",
"abstract public function rules() : array;",
"public function rules()\n {\n $rules = parent::rules();\n $extra_rules = [];\n $rules = array_merge($rules, $extra_rules);\n return $rules;\n }",
"protected function sanitize() {}",
"public static function applyValidation() {\n foreach (self::$_rules as $rk => $rv) {\n $_element = self::$_rules[$rk];\n if (is_array($_element)) {\n foreach ($_element as $key => $ruleValue) {\n if (!self::$_elements[$rk]['inValid']) {\n $method = \"_\" . $key;\n self::$_inputElement = $rk;\n self::$_elementValue = self::$_values[$rk];\n self::$_validationRule = $key;\n self::$_ruleValue = $ruleValue;\n\n self::$method();\n }\n }\n }\n }\n\n if (count(self::$_response) == 0) {\n return true;\n }\n\n return self::$_response;\n }",
"function getValidationRules() {\n\t\treturn array(\n\t\t\t'_MovieID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CountryID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_BroadCastDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t\t'_CreatedDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}",
"public function flushRules()\n {\n $this->rewriteRules();\n flush_rewrite_rules();\n }",
"public function rules()\n {\n return parent::rules();\n }",
"public function validationRules( array $input );",
"public function initRules() {\n $config = Context::$appConfig;\n if (isset($config->interceptRules['pre'])) {\n $this->preRules = $config->interceptRules['pre'];\n }\n if (isset($config->interceptRules['post'])) {\n $this->postRules = $config->interceptRules['post'];\n }\n }",
"public function rules()\n {\n if ($this->isMethod('PATCH')) {\n return $this->filterWithModelConfiguration(I18nLang::class, I18nLang::getPatchRules());\n } elseif ($this->isMethod('PUT')) {\n return $this->filterWithModelConfiguration(I18nLang::class, I18nLang::getPutRules());\n } else {\n // @fixme Api documentation generator method \"GET\" for update... return PUT method rules\n return $this->filterWithModelConfiguration(I18nLang::class, I18nLang::getPutRules());\n }\n }",
"protected function compile()\n\t{\n\t\t// Initialize an array for the applicable rules\n\t\t$applicable_rules = array();\n\t\t\n\t\t// Get the scope for this instance of ACL\n\t\t$scope = $this->scope();\n\n\t\t// Resolve rules that currently have wildcards\n\t\tACL::resolve_rules($scope);\n\t\t\n\t\t// Re-index the scope array with numbers for looping\n\t\t$scope = array_values($scope);\n\t\t\n\t\t// Get all the rules that could apply to this request\n\t\tfor ($i = 2; $i >= 0; $i--)\n\t\t{\n\t\t\t// Get the key for the scope\n\t\t\t$key = ACL::key($scope);\n\t\t\t\n\t\t\t// Look in the rules array for a rule matching the key\n\t\t\tif ($rule = Arr::get(self::$_rules, $key, FALSE))\n\t\t\t{\n\t\t\t\t$applicable_rules[$key] = $rule;\n\t\t\t}\n\n\t\t\t// Remove part of the scope so the next iteration can cascade to another rule\n\t\t\t$scope[$i] = '';\n\t\t}\n\t\t\n\t\t// Get default rule\n\t\t$default_key = ACL::KEY_SEPARATOR.ACL::KEY_SEPARATOR;\n\t\t$applicable_rules[$default_key] = Arr::get(self::$_rules, $default_key);\n\n\t\t// Reverse the rules. Compile from the bottom up\n\t\t$applicable_rules = array_reverse($applicable_rules);\n\n\t\t// Compile the rule\n\t\tforeach ($applicable_rules as $rule)\n\t\t{\n\t\t\t$this->rule = Arr::overwrite($this->rule, $rule->as_array());\n\t\t}\n\t}",
"public function initRules()\n {\n $this->rules['email'] = V::email();\n $this->rules['password'] = V::alnum()->noWhitespace()->length(4, 20)->setName('Password');\n $this->rules['first_name'] = V::alpha()->noWhitespace()->length(4, 20)->setName('First name');\n $this->rules['last_name'] = V::alpha()->noWhitespace()->length(4, 20)->setName('Last name');\n }",
"protected function get_validation_rules()\n {\n }",
"public function rules()\n {\n $this->sanitize();\n return [\n 'event_id' => 'required',\n 'member_id' => 'required',\n 'guild_pts' => 'required',\n 'position' => 'required',\n 'solo_pts' => 'required',\n 'league_id' => 'required',\n 'solo_rank' => 'required',\n 'global_rank' => 'required',\n ];\n }",
"protected function prepareForValidation()\n {\n \n //Filling uncaught parameters to blank default value\n foreach($this->columns_rules as $column => $rules){\n if(empty($this->get($column))) {\n $this->request->add([$column => '']); \n }\n }\n\n }",
"public function rules()\n {\n $this->setOrdenarPor();\n return parent::rules();\n }",
"public function rules()\n\t{\n\t\t$defaults = array();\n\t\t$toggles = array();\n\t\t$custom = array();\n\t\t$required = array();\n\n\t\tforeach($this->searchFields as $field=>$data)\n\t\t{\n\t\t\t$type = $this->getSearchFieldType($field);\n\t\t\tif ($type == 'toggle')\n\t\t\t\t$toggles[] = $field;\n\t\t\telseif ($type == 'required')\n\t\t\t\t$required[] = $field;\n\t\t\telseif (empty($data['rule']) || !is_array($data['rule']))\n\t\t\t\t$defaults[] = $field;\n\n\t\t\tif (isset($data['rule']) && is_array($data['rule']))\n\t\t\t\t$custom[] = $data['rule'];\n\t\t}\n\n\t\treturn array_merge(array(\n\t\t\tarray(implode(', ', $required), 'required'),\n\t\t\tarray(implode(', ', $toggles), 'in', 'range' => array('Y','N','I')),\n\t\t\tarray(implode(', ', $defaults), 'length', 'max'=>200)\n\t\t), $custom);\n\t}",
"public function rules() {\n\t\t// 全リクエスト共通ルールと継承先ルールのマージ\n\t\t// 同一のキーがあれば継承先ルールで上書き\n\t\treturn array_merge($this->__base_rules, $this->rules);\n }",
"public function rules()\n {\n $rules = [\n // 'status' => 'required',\n ];\n\n $languages = Language::where('status', 1)->sorted()->get();\n foreach ($languages as $language) {\n $rules[$language->locale. '.title'] = 'required';\n $rules[$language->locale. '.description'] = 'required';\n }\n\n if ($this->isMethod('PATCH')) {\n $rules['photo'] = 'image';\n }\n return $rules;\n }",
"public function getRules() {}",
"public function rules() {\n return $this->get_from_model(__FUNCTION__);\n }",
"public static function clear_rules()\n\t{\n\t\t// Remove all rules\n\t\tself::$_rules = array();\n\t\t\n\t\t// Decompile existing rules for ACL instances\n\t\tACL::clear_compiled_rules();\n\t\t\n\t\t// Re-add a default rule\n\t\tACL::add_rule(ACL::rule());\n\t}",
"public function buildRules(): void\n {\n }",
"abstract public function getValidationRules(): array;"
] | [
"0.692929",
"0.6690017",
"0.65640426",
"0.62578565",
"0.6246226",
"0.6246226",
"0.6246226",
"0.6246226",
"0.62010145",
"0.6159709",
"0.6113649",
"0.6096934",
"0.608035",
"0.6050879",
"0.6050879",
"0.6050879",
"0.60319525",
"0.6007516",
"0.6006241",
"0.5988299",
"0.59064955",
"0.5885137",
"0.5882596",
"0.58814424",
"0.5858944",
"0.5783311",
"0.5775238",
"0.57555705",
"0.574287",
"0.573228",
"0.5724152",
"0.5714818",
"0.5703752",
"0.56879294",
"0.56706005",
"0.56706005",
"0.56706005",
"0.5656577",
"0.5642319",
"0.5639883",
"0.5634259",
"0.5631238",
"0.5624104",
"0.5619095",
"0.5610473",
"0.5597355",
"0.5594202",
"0.5574864",
"0.5564184",
"0.55629694",
"0.5553644",
"0.55528194",
"0.554684",
"0.5546043",
"0.5543029",
"0.5539585",
"0.55351377",
"0.55279654",
"0.5526366",
"0.5518601",
"0.55139494",
"0.5507208",
"0.5498992",
"0.5498313",
"0.5493995",
"0.5490405",
"0.54859227",
"0.5480855",
"0.5479967",
"0.5475058",
"0.5471817",
"0.5464606",
"0.54635483",
"0.54608804",
"0.5455921",
"0.5455921",
"0.54520017",
"0.54490024",
"0.54476583",
"0.5445549",
"0.54423696",
"0.5437435",
"0.54290104",
"0.5427798",
"0.5423428",
"0.5420067",
"0.540973",
"0.54097223",
"0.5406014",
"0.5402938",
"0.5400184",
"0.54001325",
"0.5396225",
"0.53912264",
"0.5390348",
"0.5387322",
"0.53868604",
"0.53825706",
"0.5380089",
"0.5376942"
] | 0.5478352 | 69 |
Parse string representation of the rules and make it array. Rule Format: `rule1:key1:value11,value12;key2:value22|rule2:key21:value21|rule3` | protected function parseRules(string $rules): array
{
$parsed = [];
foreach (\explode('|', $rules) as $rule) {
if (false === \strpos($rule, ':')) {
$parsed[$rule] = [];
continue;
}
list($name, $options) = \explode(':', $rule, 2);
$parsed[$name] = $this->parseOptions($options);
}
return $parsed;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function parseStringRule($rules)\n {\n $parameters = array();\n\n // The format for specifying validation rules and parameters follows an\n // easy {rule}:{parameters} formatting convention. For instance the\n // rule \"Max:3\" states that the value may only be three letters.\n if (strpos($rules, ':') !== false) {\n list($rules, $parameter) = explode(':', $rules, 2);\n\n $parameters = $this->parseParameters($rules, $parameter);\n }\n\n return array(studly_case(trim($rules)), $parameters);\n }",
"protected function parseStringRule($rules)\n {\n $parameters = [];\n // The format for specifying validation rules and parameters follows an\n // easy {rule}:{parameters} formatting convention. For instance the\n // rule \"Max:3\" states that the value may only be three letters.\n if (strpos($rules, ':') !== false) {\n list($rules, $parameter) = explode(':', $rules, 2);\n $parameters = $this->parseParameters($rules, $parameter);\n }\n return [strtolower(trim($rules)), $parameters];\n }",
"protected function _parseRuleString($ruleString) {\n $ruleSets = array();\n\n if (strpos($ruleString, \"|\") !== FALSE) {\n $ruleSets = explode(\"|\", $ruleString);\n } else {\n $ruleSets[] = $ruleString;\n }\n\n return $ruleSets;\n }",
"private function splitRule(string $ruleData) : array\r\n {\r\n $pos = strpos($ruleData, ':');\r\n if ($pos === false) {\r\n return [ $ruleData ];\r\n }\r\n\r\n return [\r\n substr($ruleData, 0, $pos),\r\n explode(',', substr($ruleData, $pos + 1))\r\n ];\r\n }",
"public function parse(string $string): array;",
"protected function parseRules($rules)\n {\n foreach ($rules as &$rule) {\n $rule = explode('|', $rule);\n }\n\n return $rules;\n }",
"public function makeRules()\n {\n $this->rules = [];\n preg_match_all(\"/([.#a-z0-9-]*)\\s?({[^}]*})/i\", $this->contents(), $comands);\n foreach ($comands[1] as $k => $selector) {\n preg_match_all(\"/([a-z0-9-]*):([^;]*);/i\", $comands[2][$k], $declarations);\n $this->rules[$selector] = [];\n foreach ($declarations[1] as $i => $property) {\n $this->rules[$selector][$property] = $declarations[2][$i];\n }\n }\n }",
"public function parse($string)\n {\n return [];\n }",
"function fusion_string_to_array( $string ) {\n\n\t// If already an array, return early.\n\tif ( is_array( $string ) ) {\n\t\treturn $string;\n\t}\n\n\t$string = stripslashes( $string );\n\n\tif ( empty( $string ) ) {\n\t\treturn false;\n\t}\n\n\t$result = [];\n\t$pairs = explode( '&', $string );\n\n\tforeach ( $pairs as $key => $pair ) {\n\t\t// Use the original parse_str() on each element.\n\t\tparse_str( $pair, $params );\n\n\t\t$k = key( $params );\n\n\t\tif ( ! isset( $result[ $k ] ) ) {\n\t\t\t$result += $params;\n\t\t} else {\n\t\t\t$result[ $k ] = fusion_array_merge_recursive( $result[ $k ], $params[ $k ] );\n\t\t}\n\t}\n\n\treturn $result;\n}",
"abstract public function parseRules();",
"protected function parse($string)\n {\n $this->setStringToBeParsed($string);\n\n // save for source map generation\n // $this->env->setFileContent($this->env->currentFileInfo->importedFile->getPath(), $this->input);\n\n $rules = $this->parsePrimary();\n // has the whole string been parsed?\n if ($this->position < $this->length) {\n throw new ILess_Exception_Parser(sprintf('There was an error while parsing the string. Near `%s`.',\n // FIXME: what about utf8?\n substr($this->input, $this->position, strpos($this->input, \"\\n\", $this->position) - $this->position)),\n null, $this->position, $this->env->currentFileInfo);\n }\n\n return $rules;\n }",
"public static function parseParameters(string $rule, string $parameter) : array\n {\n if (strtolower($rule) == 'regex') {\n return [$parameter];\n }\n\n return str_getcsv($parameter);\n }",
"protected static function parseStringRule($callables)\n {\n $parameters = [];\n\n if (strpos($callables, ':') !== false) {\n [$callables, $parameter] = explode(':', $callables, 2);\n\n $parameters = static::parseParameters($callables, $parameter);\n }\n\n return [trim($callables), $parameters];\n }",
"protected function explodeRules($rules) {\n foreach ($rules as $key => &$rule) {\n $rule = (is_string($rule)) ? explode('|', $rule) : $rule;\n }\n\n return $rules;\n }",
"private static final function parseRules($code)\n {\n $rules = array();\n foreach (preg_split(\"#\\r?\\n#\", $code) as $line) {\n if (!preg_match('#^(?<input>\\w+)\\s+to\\s+(?<output>\\w+)\\s+as\\s+(?<relationship>\\w+)(\\s+(?<options>.+))?$#', $line, $match))\n continue;\n\n $rule = new stdClass();\n\n $rule->input = $match['input' ];\n $rule->output = $match['output'];\n $rule->relationship = $match['relationship' ];\n if (!isset($match['options']))\n $rule->options = array();\n else\n $rule->options = preg_split('#\\s+#', $match['options']);\n\n $rules[] = $rule;\n }\n\n return $rules;\n }",
"function _parseLine($line) {\n\t$line = trim($line);\n\n\t$array = array();\n\n\tif (preg_match('/^-(.*):$/',$line)) {\n\t\t// It's a mapped sequence\n\t\t$key = trim(substr(substr($line,1),0,-1));\n\t\t$array[$key] = '';\n\t} elseif ($line[0] == '-' && substr($line,0,3) != '---') {\n\t\t// It's a list item but not a new stream\n\t\tif (strlen($line) > 1) {\n\t\t$value = trim(substr($line,1));\n\t\t// Set the type of the value. Int, string, etc\n\t\t$value = $this->_toType($value);\n\t\t$array[] = $value;\n\t\t} else {\n\t\t$array[] = array();\n\t\t}\n\t} elseif (preg_match('/^(.+):/',$line,$key)) {\n\t\t// It's a key/value pair most likely\n\t\t// If the key is in double quotes pull it out\n\t\tif (preg_match('/^([\"\\'](.*)[\"\\'](\\s)*:)/',$line,$matches)) {\n\t\t$value = trim(str_replace($matches[1],'',$line));\n\t\t$key = $matches[2];\n\t\t} else {\n\t\t// Do some guesswork as to the key and the value\n\t\t$explode = explode(':',$line);\n\t\t$key = trim($explode[0]);\n\t\tarray_shift($explode);\n\t\t$value = trim(implode(':',$explode));\n\t\t}\n\n\t\t// Set the type of the value. Int, string, etc\n\t\t$value = $this->_toType($value);\n\t\tif (empty($key)) {\n\t\t$array[] = $value;\n\t\t} else {\n\t\t$array[$key] = $value;\n\t\t}\n\t}\n\treturn $array;\n\t}",
"protected function splitRulePath(string $rulePath) : array\n {\n $rulePath = explode('::', $rulePath);\n\n return [$rulePath[0], explode(',', $rulePath[1])];\n }",
"public function fromString(string $string): array;",
"public function parseRule($rules)\n {\n if (is_array($rules)) {\n return $this->parseArrayRule($rules);\n }\n\n return $this->parseStringRule($rules);\n }",
"public function parseSettings($settings) {\n # already array?\n if (!is_string($settings)) {\n return $settings;\n }\n $parts = explode(',', trim($settings));\n $s = array();\n foreach ($parts as $k => $v) {\n $kv = explode('=', trim($v));\n # convert all key values to lowercase to ease against simple typos\n $key = strtolower(trim($kv[0]));\n $s[$key] = trim($kv[1]);\n }\n return $s;\n }",
"function http_spreaker_parse($txt)\n{\n $needed_parts = array('nonce'=>1, 'username'=>1, 'timestamp'=>1, 'response'=>1);\n $data = array();\n $data = explode(\":\",$txt);\n $arrayReturn = array();\n if(count($needed_parts) != count($data)){\n \treturn false;\n }\n $i = 0;\n foreach($needed_parts as $key => $val){\n \t$arrayReturn[$key] = $data[$i];\n \t$i++;\n }\n return $arrayReturn;\n}",
"public static function splitShorthand($shorthand) {\n $rule = null;\n $message = '';\n $opts = array();\n\n // rule:o1,o2,o3\n // rule:o1,o2:The message here!\n if (strpos($shorthand, ':') !== false) {\n $parts = explode(':', $shorthand, 3);\n $rule = $parts[0];\n\n if (!empty($parts[1])) {\n $opts = $parts[1];\n\n if (strpos($opts, ',') !== false) {\n $opts = explode(',', $opts);\n } else {\n $opts = array($opts);\n }\n }\n\n if (!empty($parts[2])) {\n $message = $parts[2];\n }\n\n // rule\n } else {\n $rule = $shorthand;\n }\n\n return array(\n 'rule' => $rule,\n 'message' => $message,\n 'options' => $opts\n );\n }",
"function parse_response_array($string) {\n $response_string_array = explode(\"&\", $string);\n\n $proper_array = array();\n\n foreach ($response_string_array as $value) {\n list($key, $val) = explode(\"=\", $value);\n\n $val = urldecode($val);\n\n $proper_array[\"$key\"] = $val;\n }\n unset($key);\n unset($val);\n\n return $proper_array;\n }",
"public static function parse(string $content): array\n {\n $lines = explode(\"\\n\", $content);\n\n $object = [];\n\n foreach ($lines as $line) {\n if (preg_match('/^\\s*([\\w\\.\\-]+)\\s*=\\s*(.*)?\\s*$/', $line, $matches)) {\n $key = $matches[1];\n $value = $matches[2] ?? '';\n\n $length = $value ? strlen($value) : 0;\n if ($length > 0 && strpos($value, '\"') === 0 && substr($value, -1) === '\"') {\n $value = preg_replace('/\\\\n/gm', \"\\n\", $value);\n }\n\n $value = trim(preg_replace('/(^[\\'\"]|[\\'\"]$)/', '', $value));\n\n $object[$key] = $value;\n }\n }\n\n return $object;\n }",
"protected function parseAnnotations($str)\n {\n $annotations = [];\n preg_match_all($this->dataPattern, $str, $found);\n foreach ($found[2] as $key => $value) {\n $annotations[ $this->sanitizeKey($found[1][$key]) ][] = $this->parseValue(trim($value), $found[1][$key]);\n }\n\n return $annotations;\n }",
"public static function emailListStringToArray ($string, $allowSpace = true)\r\n\t{\r\n\t\t# Determine the match\r\n\t\t$match = ($allowSpace ? \",\\s?\" : ',');\r\n\t\t\r\n\t\t# Split\r\n\t\t#!# NB This will catch addresses that contain a comma or semi-colon, but those should be very rare even if they are allowed in the RFC!\r\n\t\t$addresses = preg_split (\"/{$match}/\", trim ($string), NULL, PREG_SPLIT_NO_EMPTY);\r\n\t\t\r\n\t\t# Return the array\r\n\t\treturn $addresses;\r\n\t}",
"protected function parseParameters($rule, $parameter)\n {\n if (strtolower($rule) == 'regex')\n return array($parameter);\n\n return str_getcsv($parameter);\n }",
"private function parseRules(array $rules)\n {\n $parameters = [];\n foreach ($rules as $name => $options) {\n $parameters[$name] = [\n 'required' => isset($options['required']) ? boolval($options['required']) : false,\n 'type' => isset($options['type']) ? $options['type'] : 'string',\n 'empty' => isset($options['empty']) ? boolval($options['empty']) : null,\n 'callback' => isset($options['callback']) && is_callable($options['callback']) ? $options['callback'] : null,\n 'callbackMessage' => isset($options['callbackMessage']) ? $options['callbackMessage'] : null,\n 'values' => isset($options['values']) ? $options['values'] : null,\n 'typeOptions' => [],\n ];\n }\n return $parameters;\n }",
"public static function scsv_to_array( $string, bool $to_json = false ) {\n\t\t\t$string = stripslashes( $string );\n\n\t\t\t$lines = array_map( 'trim', preg_split( '/(\\r\\n|\\r|\\n)/', $string ) );\n\n\t\t\tif ( count( $lines ) === 0 ) {\n\t\t\t\treturn array();\n\t\t\t}\n\n\t\t\t// Removes null items.\n\t\t\t$keys = array_map( 'trim', str_getcsv( $lines[0] ) );\n\t\t\t$ideal_length = count( $keys );\n\n\t\t\t// Removes elements that do not have the correct number of parameters (though it's OK if they're blank, long as there's enough?).\n\t\t\t$data = array();\n\t\t\tforeach ( array_slice( $lines, 1 ) as $line ) {\n\t\t\t\t$s = str_getcsv( $line );\n\t\t\t\tif ( count( $s ) === $ideal_length ) {\n\t\t\t\t\tarray_push( $data, $s );\n\t\t\t\t} elseif ( count( $s ) > $ideal_length ) { // Helpful in case of trailing commas.\n\t\t\t\t\tarray_push( $data, array_slice( $s, 0, $ideal_length ) );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Maps values to the keys.\n\t\t\t$output = array();\n\t\t\tfor ( $i = 0; $i < count( $data ); $i++ ) {\n\t\t\t\t array_push( $output, array_combine( $keys, array_map( 'trim', $data[ $i ] ) ) ); // Default delineator is ','.\n\t\t\t}\n\n\t\t\tif ( true === $to_json ) {\n\t\t\t\treturn wp_json_encode( $lines );\n\t\t\t}\n\n\t\t\treturn $output;\n\n\t\t}",
"public function rules(): array\n {\n $rule = [];\n switch ($this->getUri()->getPath()) {\n case '/api/v1/mine/dynamic/big_income_config_create':\n $rule = [\n 'coin_symbol' => [\n 'required',\n 'string',\n ],\n 'num' => [\n 'required',\n 'string',\n ],\n 'person_num' => [\n 'required',\n 'string',\n ],\n 'percent' => [\n 'required',\n 'string',\n ],\n ];\n break;\n case '/api/v1/mine/dynamic/big_income_config_update':\n $rule = [\n 'config_id' => [\n 'required',\n 'integer',\n ],\n 'coin_symbol' => [\n 'required',\n 'string',\n ]\n ];\n break;\n case '/api/v1/mine/dynamic/big_income_config_del':\n $rule = [\n 'config_id' => [\n 'required',\n 'integer',\n ],\n 'coin_symbol' => [\n 'required',\n 'string',\n ]\n ];\n break;\n }\n return $rule;\n }",
"public function parse_str_raw($str, &$array=array()) {\n\t\t$str = rawurldecode($str);\n\t\t$str = trim($str, $sep1.' ');\n\t\t$arr = explode($sep1, $str);\n\t\t\n\t\t$result = array();\n\t\tif (count($arr)) {\n\t\t\tforeach ($arr AS $_str) {\n\t\t\t\t$_arr = explode($sep2, $_str);\n\t\t\t\t$_arr[0] = trim($_arr[0]);\n\t\t\t\tif ($_arr[0] !== '') {\n\t\t\t\t\t$result[$_arr[0]] = isset($_arr[1])?trim($_arr[1]):'';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$array = $result;\n\t}",
"public function getValidationRules(): array\n {\n if ($this->validatorForEach) {\n return [\n new ParameterValidationRule(Validator::callback(function ($value) {\n $items = UnpackCSV::un($value, $this->separator);\n return Validator::each($this->validatorForEach->getValidator())->validate($items);\n }), $this->validatorForEach->getDescription())\n ];\n } else {\n return [];\n }\n }",
"private function ical_rrule($value)\n\t{\n\t$rrule = explode(';', $value);\n\tforeach ($rrule as $line)\n\t{\n\t\t$rcontent = explode('=', $line);\n\t\t$result[$rcontent[0]] = $rcontent[1];\n\t}\n\treturn $result;\n\t}",
"public static function parseArgs($args) {\n if (preg_match_all ( \"/([^\\\\[^\\\\]]+)/\", $args, $matches )) {\n $params = explode ( ',', $matches [1] [0] );\n $toReturn = array ( );\n foreach ( $params as $p ) {\n @list ( $key, $value ) = explode ( '=>', $p );\n $toReturn [preg_replace ( \"/[\\\\' ]+/\", \"\", $key )] = preg_replace ( \"/[\\\\' ]+/\", \"\", $value );\n }\n return $toReturn;\n }\n return $args;\n }",
"public function rules(): array\n {\n return [\n 'option_toggle' => 'sometimes|required',\n 'import_file' => 'required_if:option_toggle,on|mimes:csv,txt',\n 'delimiter' => 'required_with:recipients',\n ];\n }",
"public function key_value_from_string( $text = '' ) {\n\t\tpreg_match( '/([^:]+)(;[^:]+)?[:]([\\w\\W]*)/', $text, $matches );\n\n\t\tif ( 0 == count( $matches ) )\n\t\t\treturn false;\n\n\t\treturn array( $matches[1], $matches[3] );\n\t}",
"public function rules(){\n $rules = [];\n if(!empty($this->rules)){\n foreach ($this->rules as $action => $rule) {\n $regex = \"*\" . $action;\n if($this->is($regex)){\n $rules = $rule;\n break;\n }\n }\n }\n return $rules;\n }",
"public function __invoke(string $value) : array\n {\n if ($value !== '') {\n return $this->parseRawValue($value);\n }\n return [];\n }",
"function str_to_array($str,$key){\n\t\t//remove the . from last line\n\t\t$str = trim($str,'.');\n\t\treturn explode($key,$str);\n\t}",
"private function parseInputValues()\r\n {\r\n parse_str(file_get_contents(\"php://input\"),$data);\r\n\r\n $data = reset($data);\r\n \r\n $data = preg_split('/------.*\\nContent-Disposition: form-data; name=/', $data);\r\n \r\n $this->inputValues = array();\r\n \r\n foreach($data as $input)\r\n {\r\n // get key\r\n preg_match('/\"([^\"]+)\"/', $input, $key);\r\n \r\n // get data\r\n $input = preg_replace('/------.*--/', '', $input);\r\n \r\n // Store to an array\r\n $this->inputValues[$key[1]] = trim(str_replace($key[0], '', $input));\r\n }\r\n }",
"public function _parse_to_func_array($in) {\n\t\tif (preg_match('/^(.+)\\[(.+)\\]$/', $in, $matches)) {\n\t\t\t$rule = $matches[1];\n\t\t\t$params = ($matches[2] != '') ? explode(',', str_replace(', ', '', trim($matches[2]))) : array();\n\t\t}\n\t\telse {\n\t\t\t$rule = $in;\n\t\t\t$params = array();\n\t\t}\n\t\t\n\t\treturn array($rule, $params);\n\t}",
"function splitvalues($str)\n{\n\t$arr=array();\n\tif($str==\"\")\n\t{\n\t\t$arr[] = \"\";\n\t\treturn $arr;\n\t}\n\t$start=0;\n\t$i=0;\n\t$inquot=false;\n\twhile($i<=strlen($str))\n\t{\n\t\tif($i<strlen($str) && substr($str,$i,1)=='\"')\n\t\t\t$inquot=!$inquot;\n\t\telse if($i==strlen($str) || !$inquot && substr($str,$i,1)==',')\n\t\t{\n\t\t\t$val=substr($str,$start,$i-$start);\n\t\t\t$start=$i+1;\n\t\t\tif(strlen($val) && substr($val,0,1)=='\"')\n\t\t\t{\n\t\t\t\t$val=substr($val,1,strlen($val)-2);\n\t\t\t\t$val=str_replace('\"\"','\"',$val);\n\t\t\t}\n\t\t\t\n\t\t\tif( $val !== FALSE )\n\t\t\t$arr[]=$val;\n\t\t}\n\t\t$i++;\n\t}\n\treturn $arr;\n}",
"protected function explodeRules($rules)\n {\n $new_rules = array();\n foreach ($rules as $key => $rule) {\n $new_rules[] = (is_string($rule)) ? explode('|', $rule) : $rule;\n }\n\n return $new_rules;\n }",
"public function formatRules($rules)\n {\n $return = [];\n\n foreach ($rules as $key => $value)\n {\n switch ($key)\n {\n case 'password':\n case 'bf2_ranked':\n case 'bf2_bots':\n case 'bf2_dedicated':\n $return[$key] = (((int)$value) == 1) ? \"True\" : \"False\";\n break;\n case 'bf2_anticheat':\n case 'bf2_friendlyfire':\n case 'bf2_globalunlocks':\n case 'bf2_autobalanced':\n $return[$key] = (((int)$value) == 1) ? \"Enabled\" : \"Disabled\";\n break;\n case 'bf2_novehicles':\n $return[$key] = (((int)$value) == 0) ? \"Enabled\" : \"Disabled\";\n break;\n case 'roundtime':\n case 'timelimit':\n $return[$key] = TimeHelper::SecondsToHms((int)$value);\n break;\n case 'bf2_teamratio':\n $return[$key] = (int)$value;\n break;\n case 'teams':\n $return['team1score'] = 0;\n $return['team2score'] = 0;\n if (is_array($value) && count($value) == 2)\n {\n $return['team1score'] = $value[0]['score'];\n $return['team2score'] = $value[1]['score'];\n }\n break;\n default:\n $return[$key] = $value;\n break;\n }\n }\n\n return $return;\n }",
"protected function processFrom(string $string): array\n {\n return \\json_decode($string, true);\n }",
"public function parseLine(string $line): array;",
"public function _parse_to_array($in) {\n\t\t$string = str_replace(' ', '', trim($in));\n\t\t\n\t\tif ( ! empty($string)) {\n\t\t\treturn (array) explode('|', $string);\n\t\t}\n\t\telse {\n\t\t\treturn array();\n\t\t}\n\t}",
"private static function parseArray($val)\n {\n $result = array();\n $openBrackets = 0;\n $openString = false;\n $openCurlyBraces = 0;\n $openLString = false;\n $buffer = '';\n\n $strLen = strlen($val);\n for($i = 0; $i < $strLen; $i++)\n {\n if($val[$i] == '[' && !$openString && !$openLString)\n {\n $openBrackets++;\n\n if($openBrackets == 1)\n {\n // Skip first and last brackets.\n continue;\n }\n }\n elseif($val[$i] == ']' && !$openString && !$openLString)\n {\n $openBrackets--;\n\n if($openBrackets == 0)\n {\n // Allow terminating commas before the closing bracket\n if(trim($buffer) != '')\n {\n $result[] = self::parseValue( trim($buffer) );\n }\n\n if (!self::checkDataType($result))\n {\n throw new Exception('Data types cannot be mixed in an array: ' . $buffer);\n }\n // Skip first and last brackets. We're finish.\n return $result;\n }\n }\n elseif($val[$i] == '\"' && $val[$i - 1] != \"\\\\\" && !$openLString)\n {\n $openString = !$openString;\n }\n elseif($val[$i] == \"'\" && !$openString) {\n $openLString = !$openLString;\n }\n elseif($val[$i] == \"{\" && !$openString && !$openLString) {\n $openCurlyBraces++;\n }\n elseif($val[$i] == \"}\" && !$openString && !$openLString) {\n $openCurlyBraces--;\n }\n \n if( ($val[$i] == ',' || $val[$i] == '}') && !$openString && !$openLString && $openBrackets == 1 && $openCurlyBraces == 0)\n {\n if ($val[$i] == '}') {\n $buffer .= $val[$i];\n }\n\n $buffer = trim($buffer);\n if (!empty($buffer)) {\n $result[] = self::parseValue($buffer);\n\n if (!self::checkDataType($result))\n {\n throw new Exception('Data types cannot be mixed in an array: ' . $buffer);\n }\n }\n $buffer = '';\n }\n else\n {\n $buffer .= $val[$i];\n }\n }\n\n // If we're here, something went wrong.\n throw new Exception('Wrong array definition: ' . $val);\n }",
"public static function cssStyleToArray($style): array\n {\n $result = [];\n foreach (explode(';', (string)$style) as $property) {\n $property = explode(':', $property);\n if (count($property) > 1) {\n $result[trim($property[0])] = trim($property[1]);\n }\n }\n\n return $result;\n }",
"protected function parseFields($input): array\n {\n $input = $input ?: '';\n if (is_array($input)) {\n return $input;\n }\n\n $fields = array();\n foreach (preg_split('{(?:\\([^\\(]*\\))(*SKIP)(*F)|\\s+}', $input) as $value) {\n $elements = explode(':', $value);\n $name = $elements[0];\n $fieldAttributes = array();\n if (strlen($name)) {\n $fieldAttributes['fieldName'] = $name;\n $type = isset($elements[1]) ? $elements[1] : 'string';\n preg_match_all('{(.*)\\((.*)\\)}', $type, $matches);\n $fieldAttributes['type'] = isset($matches[1][0]) ? $matches[1][0] : $type;\n $length = null;\n if ('string' === $fieldAttributes['type']) {\n $fieldAttributes['length'] = $length;\n }\n if (isset($matches[2][0]) && $length = $matches[2][0]) {\n $attributesFound = array();\n if (false !== strpos($length, '=')) {\n preg_match_all('{([^,= ]+)=([^,= ]+)}', $length, $result);\n $attributesFound = array_combine($result[1], $result[2]);\n } else {\n $fieldAttributes['length'] = $length;\n }\n $fieldAttributes = array_merge($fieldAttributes, $attributesFound);\n foreach (array('length', 'precision', 'scale') as $intAttribute) {\n if (isset($fieldAttributes[$intAttribute])) {\n $fieldAttributes[$intAttribute] = (int) $fieldAttributes[$intAttribute];\n }\n }\n foreach (array('nullable', 'unique') as $boolAttribute) {\n if (isset($fieldAttributes[$boolAttribute])) {\n $fieldAttributes[$boolAttribute] = filter_var($fieldAttributes[$boolAttribute], FILTER_VALIDATE_BOOLEAN);\n }\n }\n }\n\n $fields[$name] = $fieldAttributes;\n }\n }\n\n return $fields;\n }",
"protected function parseParameters($rule, $parameter)\n {\n if (strtolower($rule) === 'regex') {\n return [$parameter];\n }\n return str_getcsv($parameter);\n }",
"public static function explode_lines_key_value_pairs($value) {\n preg_match_all(\"/([^=\\r\\n]+)=([^\\r\\n]+)/\", $value, $pairs);\n $pairs[1] = array_map('trim', $pairs[1]);\n $pairs[2] = array_map('trim', $pairs[2]);\n if (count($pairs[1]) == count($pairs[2]) && count($pairs[1]) != 0) {\n return array_combine($pairs[1], $pairs[2]);\n }\n else {\n return [];\n }\n }",
"public static function extractSettingValues($string)\n {\n $values = [];\n $errors = [];\n\n $list = \\explode(\"\\n\", $string);\n $list = \\array_map('trim', $list);\n $list = \\array_filter($list, 'strlen');\n\n foreach ($list as $position => $text) {\n // Check for an explicit key.\n $matches = [];\n if (\\preg_match('/(.*)=(.*)/', $text, $matches)) {\n // Trim key and value to avoid unwanted spaces issues.\n $key = \\trim($matches[1]);\n $value = \\trim($matches[2]);\n $values[$key] = $value;\n } else {\n $errors[] = $position;\n }\n }\n\n return [$values, $errors];\n }",
"public function parse_array($value)\n\t{\n\t\tif ($value==null)\n\t\t\treturn array();\n\t\t\n\t\tif (is_array($value))\n\t\t\treturn $value;\n\t\t\t\n\t\t$value=trim($value,'{}');\n\t\t$result=explode(',',$value);\n\t\t\n\t\tfor($i=0; $i<count($result); $i++)\n\t\t\tif ($result[$i]=='NULL')\n\t\t\t\t$result[$i]=null;\n\t\t\t\t\n\t\treturn $result;\n\t}",
"public static function stringToArray($str)\n {\n $parsed = [];\n $addresses = explode(',', $str);\n\n foreach ($addresses as $address) {\n $split = explode(' <', trim($address));\n\n if (trim($split[0]) === '') {\n continue;\n }\n\n if (!empty($split[1])) { // eg. John Doe <[email protected]>\n $name = trim($split[0]);\n $addr = trim(rtrim($split[1], '>'));\n } else { // eg. [email protected]\n $name = null;\n $addr = trim($split[0]);\n }\n\n $parsed[$addr] = $name;\n }\n\n return $parsed;\n }",
"protected static function parseInlineValues($string)\n {\n $values = array();\n $value = '';\n $string = str_replace(array('\\\\', \"''\"), array('\\\\\\\\', \"\\\\'\"), $string);\n $strLen = strlen($string);\n $cursor = 0;\n while ($cursor < $strLen) {\n switch ($string[$cursor]) {\n case '\\\\':\n $value .= $string[$cursor + 1];\n $cursor++;\n break;\n case ',':\n $values[] = $value;\n $value = '';\n break;\n case \"'\":\n if (empty($value)) {\n $value = $string[$cursor + 1];\n $cursor++;\n }\n break;\n default:\n $value .= $string[$cursor];\n }\n $cursor++;\n }\n\n if (!empty($value)) {\n $values[] = $value;\n }\n\n return $values;\n }",
"private function loadFromString($input) {\n\t//--\n\t$lines = explode(\"\\n\", (string)$input);\n\t//--\n\tforeach($lines as $k => $v) {\n\t\t$lines[$k] = (string) rtrim((string)$v, \"\\r\");\n\t} //end foreach\n\t//--\n\treturn (array) $lines;\n\t//--\n}",
"public static function parse($str)\n {\n $uri = new self($str);\n\n return array(\n $uri->driver,\n $uri->username,\n $uri->password,\n $uri->host,\n $uri->path,\n );\n }",
"protected function parseArrayRule(array $rules)\n {\n return array(studly_case(trim(array_get($rules, 0))), array_slice($rules, 1));\n }",
"function create_rules_from_ini($ini_array)\n\t{\n\t\t\n\t\t$rulesOptions = array(\n\t\t\"Case_insensitive\",\n\t\t\"higher_than\",\n\t\t\"exclude\",\n\t\t\"longer_than\",\n\t\t\"max\"\n\t\t);\n\t\t\n\t\t$rulesArray = array();\n\t\tforeach ($ini_array as $key => $value) {\n\t\t\tif (in_array($key, $rulesOptions)) {\n\t\t\t\t$rulesArray[] = $key . \" = \" . $value;\n\t\t\t}\n\t\t}\n\t\treturn $rulesArray;\n\t}",
"protected function parse_style_string( $style_string ) {\n\t\t// We need to turn the style string into an associative array of styles first.\n\t\t$style_string = trim( $style_string, \" \\t\\n\\r\\0\\x0B;\" );\n\t\t$elements = preg_split( '/(\\s*:\\s*|\\s*;\\s*)/', $style_string );\n\n\t\tif ( 0 !== count( $elements ) % 2 ) {\n\t\t\t// Style string was malformed, try to process as good as possible by stripping the last element.\n\t\t\tarray_pop( $elements );\n\t\t}\n\n\t\t$chunks = array_chunk( $elements, 2 );\n\n\t\t// phpcs:ignore PHPCompatibility.FunctionUse.NewFunctions.array_columnFound -- WP Core provides a polyfill.\n\t\treturn array_combine( array_column( $chunks, 0 ), array_column( $chunks, 1 ) );\n\t}",
"public function parse($input) {\n\t//--\n\treturn (array) $this->loadWithSource((array)$this->loadFromString((string)$input));\n\t//--\n}",
"public function parse($string);",
"function magictoolbox_WordPress_MagicScroll_parse_option_from_string($options) {\n $opt = array();\n\n $options = explode(\";\", $options);\n array_pop($options);\n\n foreach ($options as $value) {\n $value = trim($value);\n if (!empty($value)) {\n $value = explode(\":\", $value);\n // $opt[$value[0]] = trim($value[1]);\n $k = array_shift($value);\n $v = join(\":\",$value);\n $opt[$k] = trim($v);\n }\n }\n return $opt;\n}",
"function tokenText($str)\n{\n $matches = preg_split(\"/\\;\\s*\\\\$/uism\", $str);\n $object = array();\n foreach ($matches as $match) {\n preg_match(\"/\\\\$?(\\w+)\\:(.*)/uism\", trim($match), $_matches);\n $object[$_matches[1]] = rtrim($_matches[2], \";\");\n }\n return $object;\n}",
"private function parseLine() {\n $hash = array();\n $line = explode(':', fgets($this->handle));\n $key = array_shift($line);\n\n $hash[$key] = trim(implode(\":\", $line));\n \n return $hash;\n }",
"function uri_safe_batch_decode($str, $delimiter = '|', $hexify = TRUE)\n{\n\t$str = uri_safe_decode($str, $hexify);\n\t$tmp = explode($delimiter, $str);\n\t$params = array();\n\tforeach($tmp as $val)\n\t{\n\t\t$key_val = explode('/', $val);\n\t\tif (count($key_val) >= 2)\n\t\t{\n\t\t\tif (strncmp($key_val[1], '??', 2) === 0)\n\t\t\t{\n\t\t\t\t$key_val[1] = unserialize(substr($key_val[1], 2));\n\t\t\t}\n\t\t\t$params[$key_val[0]] = $key_val[1];\n\t\t}\n\t}\n\treturn $params;\n}",
"function make_line_rules($str)\n{\n\tglobal $line_rules;\n\tstatic $pattern, $replace;\n\n\tif (! isset($pattern)) {\n\t\t$pattern = array_map(create_function('$a',\n\t\t\t'return \\'/\\' . $a . \\'/\\';'), array_keys($line_rules));\n\t\t$replace = array_values($line_rules);\n\t\tunset($line_rules);\n\t}\n\n\treturn preg_replace($pattern, $replace, $str);\n}",
"public function parse($line) {\r\n $data = array();\r\n \r\n foreach ($this->regx_parse as $types => $parser) {\r\n\t\t\t$subject = $this->_get_subject($parser,$data,$line);\r\n\t\t\t\r\n\t\t\tif ((!is_null($subject)) && (isset($parser['value']))) {\r\n\t\t\t\t$test = $parser['value'];\r\n\t\t\t\tpreg_match($test,$subject,$matches);\r\n\t\t\t\t\r\n\t\t\t\t$count = 1;\r\n $types = explode(' ',$types);\r\n foreach ($types as $type) {\r\n if (!empty($matches)) {\r\n $data[$type] = $matches[$count];\r\n } else {\r\n $data[$type] = null;\r\n }\r\n $count++;\r\n }\r\n\t\t\t\t\r\n\t\t\t}\r\n }\r\n \r\n return $data;\r\n }",
"private function unpackStyles($styleString)\n {\n $styleList = explode(';', $styleString);\n $styleArray = array();\n\n foreach ($styleList as $style)\n {\n if (strpos($style,':') !== false)\n {\n list($name, $value) = explode(':', $style);\n $styleArray[trim($name)] = trim($value);\n }\n }\n\n return $styleArray;\n }",
"function keyvalues($data) {\n $ret = [];\n $data = explode(PHP_EOL, $data);\n foreach($data as $k=>$v){\n if(empty($v)) continue;\n $vv = explode('=', $v);\n if(isset($vv[1])) {\n $ret[$vv[0]] = $vv[1];\n } else {\n $ret[] = $v;\n }\n }\n return $ret;\n}",
"function parse_query($str) {\n \n $str = html_entity_decode($str);\n\n $arr = array();\n \n $pairs = explode('&', $str);\n \n foreach ($pairs as $i) {\n list($name,$value) = explode('=', $i, 2);\n\n if (isset($arr[$name])) {\n if (is_array($arr[$name])) {\n $arr[$name][] = $value;\n }\n else {\n $arr[$name] = array($arr[$name], $value);\n }\n }\n else {\n $arr[$name] = $value;\n }\n }\n return $arr;\n }",
"function sugar_parse_values($line, $key) {\n $pair = explode(\"=\", $line);\n if (count($pair) > 1 && $pair[0] == $key) {\n $value = trim($pair[1]);\n if ($value) {\n return explode(\",\", $value);\n }\n }\n return NULL;\n}",
"function toArray($str)\n\t{\n\t\t$tmpItemArr = array_filter(explode('-dlm-',$str));\n\t\tforeach ($tmpItemArr as &$value) {\n \t\t$ItemArr = explode('-spl-', $value);\n\t\t\t$arr[$ItemArr[0]]['id'] = &$ItemArr[0]; // Item ID\n\t\t\t$arr[$ItemArr[0]]['qty'] = &$ItemArr[1]; // Item Quantity\n\t\t\t$arr[$ItemArr[0]]['cp'] = &$ItemArr[2]; // Item custom price\n\t\t\t$arr[$ItemArr[0]]['order'] = &$ItemArr[3]; // Item order\n\t\t}\n\t\treturn $arr;\n\t}",
"private static function parse(string $headers): array\n {\n $header = [];\n $matches = [];\n preg_match_all(\n '=^(.[^: ]+): ([^\\r\\n]*)=m',\n $headers,\n $matches,\n PREG_SET_ORDER\n );\n foreach ($matches as $line) {\n $header[(string) $line[1]] = $line[2];\n }\n\n return $header;\n }",
"public function parse($string, SG_Rule_Parser_Patterns $patterns);",
"function d2d_explode($string) {\n if (!is_string($string)) {\n return FALSE;\n }\n if (empty($string)) {\n return array();\n }\n // prepend two consecutive slashes by an '@' s.t. every slash followed\n // directly by a ',' resp. '=' really corresponds to an escaped character\n $string = str_replace('\\\\\\\\', '\\\\\\\\@', $string);\n // split array at ','-characters that are not preceded by a slash\n $array = preg_split('/(?<=[^\\\\\\\\]),|^,/', $string);\n $return_array = array();\n foreach ($array as $key => $value) {\n // split array at '='-characters that are not preceded by a slash\n $tokens = preg_split('/(?<=[^\\\\\\\\])=|^=/', $value);\n // not escaped '=' must occur exactly once, splitting the string into\n // exactly two strings\n if (sizeof($tokens) != 2) {\n return FALSE;\n }\n // undo first replacement for both tokens\n $parsed_key = str_replace('\\\\\\\\@', '\\\\\\\\', $tokens[0]);\n $parsed_value = str_replace('\\\\\\\\@', '\\\\\\\\', $tokens[1]);\n // unescape, i.e. remove slashes followed by a single character\n $parsed_key = preg_replace('/\\\\\\\\(.)/', '\\\\1', $parsed_key);\n $parsed_value = preg_replace('/\\\\\\\\(.)/', '\\\\1', $parsed_value);\n list($success, $decoded_parsed_value) = d2d_value_decode($parsed_value);\n if (!$success) {\n return FALSE;\n }\n $return_array[$parsed_key] = $decoded_parsed_value;\n }\n return $return_array;\n}",
"public function normalizeRules($rules): array\n {\n if (\\is_string($rules)) {\n $rules = $this->parseRules($rules);\n }\n\n if (!\\is_array($rules)) {\n throw new \\UnexpectedValueException('The rules should be an array or string');\n }\n\n return $this->cancelOnFail($rules);\n }",
"public function asArray() : array\n {\n return str_split($this->string);\n }",
"public static function parseString(string $string): array\n {\n $e = 0;\n $q1 = false;\n $q2 = false;\n $q = false;\n $a = [];\n $f = '';\n for ($i = 0; $i < strlen($string); $i++) {\n $c = $string[$i];\n if ($c === '\\\\') {\n $e++;\n }\n if ($e % 2 == 0) {\n if ($c === \"'\" && !$q2) {\n $q1 = !$q1;\n $q = true;\n } elseif ($c === '\"' && !$q1) {\n $q2 = !$q2;\n $q = true;\n }\n }\n if (!$q) {\n if ($c === ' ' && !$q1 && !$q2 && $e % 2 == 0) {\n if (strlen($f) > 0) $a[] = $f;\n $f = '';\n } else {\n if ($c !== '\\\\' || $e % 2 === 0) {\n $f .= $c;\n }\n }\n }\n if ($c !== '\\\\') {\n $e = 0;\n }\n $q = false;\n }\n if (strlen($f) > 0) $a[] = $f;\n return $a;\n }",
"private function _getSubRules($arrayRule = [])\n {\n $arrayRule = is_array($arrayRule) ? $arrayRule[0] : $arrayRule;\n $subrules = [];\n if (preg_match('#^(?P<rule>\\w+)\\[(?P<subrule>.*)\\]$#', $arrayRule, $matches) === 1 && isset($matches['subrule'])) {\n $subrules = explode(':', $matches['subrule']);\n }\n return $subrules;\n }",
"public function string2array($string, $delimiter = \",\"){\n\n\t\t$array = explode($delimiter, $string);\n\n\t\tforeach($array AS $key => &$value){\n\t\t\t$value = $this->clean($value);\n\t\t}\n\n\t\treturn $array;\n\t}",
"private function header2Array($str)\n {\n if (is_array($str)) return $str;\n \n $result = [];\n $array = explode(\"\\n\", trim(str_replace(\"\\r\\n\", \"\\n\", $str), \"\\n\"));\n foreach($array as $i => $line) {\n if ($i === 0) {\n $result['Http-Status'] = $line; // \"HTTP/1.1 200 OK\"\n } else {\n $header = explode(':', $line, 2);\n if (!$header[0]) continue;\n \n if (isset($header[1])) {\n $result[trim($header[0])] = trim($header[1]);\n } else {\n $result[] = trim($header[0]);\n }\n }\n }\n return $result;\n }",
"public function parse(string $source)\n {\n $lines = Splitter::splitLines($source);\n\n // remove headings from lines\n array_shift($lines);\n\n $result = [];\n\n $mappings = $this->mappings->mappings();\n\n $payload = new Payload();\n\n // process lines as CSV\n foreach ($lines as $line) {\n if (count($row = str_getcsv($line)) === count($mappings)) {\n $row = array_combine($mappings, $row);\n $this->process($row, $payload);\n $result[] = $row;\n }\n }\n \n return $payload;\n }",
"protected function parseEditorOptions($string)\n\t{\n\t\t$options = [];\n\t\t$substrings = preg_split('/,\\s*\\n|\\n/', trim($string));\n\t\tforeach ($substrings as $bits) {\n\t\t\t$option = explode(\":\", $bits, 2);\n\n\t\t\tif (count($option) == 2) {\n\t\t\t\t$value = trim(trim($option[1]), \"'\\\"\");\n\t\t\t\tif (($s = strtolower($value)) === 'false') {\n\t\t\t\t\t$value = false;\n\t\t\t\t} elseif ($s === 'true') {\n\t\t\t\t\t$value = true;\n\t\t\t\t}\n\t\t\t\t$options[trim($option[0])] = $value;\n\t\t\t}\n\t\t}\n\t\treturn $options;\n\t}",
"function sizesToArray($string){\n $sizesArray = explode(',',$string);\n $returnArray = array();\n foreach($sizesArray as $size){\n $s =explode(':',$size);\n $returnArray[] = array('size'=> $s[0], 'price' => $s[1],'quantity' => $s[2],'threshold' => $s[3]);\n }\n return $returnArray;\n}",
"protected function parsePipeString($pipe)\r\n {\r\n [$name, $parameters] = array_pad(explode(':', $pipe, 2), 2, []);\r\n\r\n if (is_string($parameters)) {\r\n $parameters = explode(',', $parameters);\r\n }\r\n\r\n return [$name, $parameters];\r\n }",
"protected function _parse(){\n\t\tforeach ($this->dataArray['tables']['nat']['default-chains'] as $a => &$b){\n\t\t\t$b['iptables-rules'] = array();\n\t\t\t$this->transformToIPTables($b['rules'], $b['iptables-rules']);\n\t\t}\n\t\t\n\t\t// Now the IP chains...\n\t\tforeach ($this->dataArray['tables']['nat']['ip-chains'] as &$e){\n\t\t\t$e['iptables-rules'] = array();\n\t\t\t$this->transformToIPTables($e['rules'], $e['iptables-rules']);\n\t\t}\n\t\t\n\t\t// And finally, the others...\n\t\tforeach ($this->dataArray['tables']['nat']['other-chains'] as $h => &$i){\n\t\t\t$i['iptables-rules'] = array();\n\t\t\t$this->transformToIPTables($i['rules'], $i['iptables-rules']);\n\t\t}\n\t}",
"function strToArray(&$string, &$array){\r\n $array = explode(\"\\n\", $string);\r\n }",
"public function parse(): array\n {\n unset($this->arguments[0]);\n $keyPairParams = [];\n foreach ($this->arguments as $argument) {\n $arguments = explode(self::CONSOLE_DELIMITER, strip_tags($argument));\n $parameterName = ltrim(reset($arguments), self::START_PARAMETER_WITH);\n $parameterValue = end($arguments);\n $keyPairParams[$parameterName] = $parameterValue;\n }\n return $keyPairParams;\n }",
"protected function parsePipeString($pipe)\n {\n list($name, $parameters) = array_pad(explode(':', $pipe, 2), 2, []);\n\n if (is_string($parameters)) {\n $parameters = explode(',', $parameters);\n }\n\n return [$name, $parameters];\n }",
"public function parse(array $tokens, array $rules, array $alias): array\n {\n $this->rules = $rules;\n $this->alias = $alias;\n\n $this->extractParams($tokens);\n $this->applyTypesToParams($tokens);\n $this->normalizeParam($tokens);\n\n return $tokens;\n }",
"static public function define_decode_rules() {\n $rules = array();\n\n $rules[] = new restore_decode_rule('LINKSETINDEX', '/mod/linkset/index.php?id=$1', 'course');\n $rules[] = new restore_decode_rule('LINKSETVIEWBYID', '/mod/linkset/view.php?id=$1', 'course_module');\n\n return $rules;\n\n }",
"protected function parse()\n {\n if($this->isRelationalKey()){\n $this->parsedValue = $this->makeRelationInstruction();\n } \n else {\n $this->parsedValue = $this->parseFlatValue($this->value);\n } \n }",
"public static function decomposeMsg (string $msg) : array {\n\t\tif (($pos = strpos ($msg, ':')) === false || ($command = \\DataLib::isInt (substr ($msg, 0, $pos))) === false || !Command::isCommand ($command)) {\n\t\t\treturn [ Command::INVALID ];\n\t\t}\n\t\treturn [\n\t\t\t$command,\n\t\t\tjson_decode (substr ($msg, $pos + 1), true)\n\t\t];\n\t}",
"function cfgString2CfgArray($cfgStr) {\r\n\r\n // Traverse the number of form elements:\r\n $tLines = explode(chr(10), $cfgStr);\r\n foreach($tLines as $k => $v) {\r\n\r\n // Initialize:\r\n $confData = array();\r\n $val = trim($v);\r\n\r\n // Accept a line as configuration if a) it is blank(! - because blank lines indicates new, unconfigured fields) or b) it is NOT a comment.\r\n if (!$val || strcspn($val, '#/')) {\r\n\r\n // Split:\r\n $parts = t3lib_div::trimExplode('|', $val);\r\n\r\n // Label:\r\n $confData['label'] = trim($parts[0]);\r\n\r\n // Field:\r\n $fParts = t3lib_div::trimExplode(',', $parts[1]);\r\n $fParts[0] = trim($fParts[0]);\r\n if (substr($fParts[0], 0, 1) == '*') {\r\n $confData['required'] = 1;\r\n $fParts[0] = substr($fParts[0], 1);\r\n }\r\n\r\n $typeParts = t3lib_div::trimExplode('=', $fParts[0]);\r\n $confData['type'] = trim(strtolower(end($typeParts)));\r\n\r\n if ($confData['type']) {\r\n if (count($typeParts) == 1) {\r\n $confData['fieldname'] = substr(ereg_replace('[^a-zA-Z0-9_]', '', str_replace(' ', '_', trim($parts[0]))), 0, 30);\r\n\r\n // Attachment names...\r\n if ($confData['type'] == 'file') {\r\n $confData['fieldname'] = 'attachment'.$attachmentCounter;\r\n $attachmentCounter = intval($attachmentCounter)+1;\r\n }\r\n } else {\r\n $confData['fieldname'] = str_replace(' ', '_', trim($typeParts[0]));\r\n }\r\n\r\n switch((string)$confData['type']) {\r\n case 'select':\r\n case 'radio':\r\n $confData['default'] = implode(chr(10), t3lib_div::trimExplode(',', $parts[2]));\r\n break;\r\n default:\r\n $confData['default'] = trim($parts[2]);\r\n break;\r\n }\r\n\r\n // Field configuration depending on the fields type:\r\n switch((string)$confData['type']) {\r\n case 'textarea':\r\n $confData['cols'] = $fParts[1];\r\n $confData['rows'] = $fParts[2];\r\n $confData['extra'] = strtoupper($fParts[3]) == 'OFF' ? 'OFF' :\r\n '';\r\n $confData['specialEval'] = trim($parts[3]);\r\n break;\r\n case 'input':\r\n case 'password':\r\n $confData['size'] = $fParts[1];\r\n $confData['max'] = $fParts[2];\r\n $confData['specialEval'] = trim($parts[3]);\r\n break;\r\n case 'file':\r\n $confData['size'] = $fParts[1];\r\n break;\r\n case 'select':\r\n $confData['size'] = intval($fParts[1])?$fParts[1]:\r\n '';\r\n $confData['autosize'] = strtolower(trim($fParts[1])) == 'auto' ? 1 :\r\n 0;\r\n $confData['multiple'] = strtolower(trim($fParts[2])) == 'm' ? 1 :\r\n 0;\r\n break;\r\n }\r\n }\r\n } else {\r\n // No configuration, only a comment:\r\n $confData = array(\r\n 'comment' => $val );\r\n }\r\n\r\n // Adding config array:\r\n $cfgArr[] = $confData;\r\n }\r\n\r\n // Return cfgArr\r\n return $cfgArr;\r\n }",
"private function _parseUrl() {\n if (($url = Utility\\Input::get(\"url\"))) {\n\n // Trim, sanitise and return a exploded URL string.\n return(explode(\"/\", filter_var(rtrim($url, \"/\"), FILTER_SANITIZE_URL)));\n }\n return [];\n }",
"private function extractRule($rule)\n\t{\n\t\t$ruleSegments = array();\n\t\t$ruleOperators = array();\n\t\t$ruleLen = strlen($rule);\n\t\t// index of proceed\n\t\t$iop = 0;\n\n\t\t// scan the rule string char by char $ios index of scanned\n\t\tfor ($ios = 0;$ios<$ruleLen;$ios++)\n\t\t{\n\t\t\tswitch ($rule[$ios])\n\t\t\t{\n\t\t\t\tcase '&':\n\t\t\t\tcase '|':\n\t\t\t\t\tif ($iop<$ios)\n\t\t\t\t\t{\n\t\t\t\t\t\t$ruleSegments[] = trim(substr($rule,$iop,$ios-$iop));\n\t\t\t\t\t\t$iop = $ios+1;\n\t\t\t\t\t}\n\t\t\t\t\t$ruleOperators[] = $rule[$ios];\n\t\t\t\tbreak;\n\n\t\t\t\tcase '(':\n\t\t\t\t\t$nestedBracketCount = 0;\n\t\t\t\t\tfor ($j = $ios+1;$j<$ruleLen;$j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tswitch ($rule[$j])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase ')':\n\t\t\t\t\t\t\t\tif (0 === $nestedBracketCount)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$breaketEnd = $j;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$nestedBracketCount--;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase '(':\n\t\t\t\t\t\t\t\t$nestedBracketCount++;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ($ruleLen === $j)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthrow new AgsInvalidParamsException(__CLASS__.'::'.__FUNCTION__,array('invalidRule'=>$rule));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// push entire content of the outtest breaket but itself into segments\n\t\t\t\t\t$ruleSegments[] = trim(substr($rule,$ios+1,$breaketEnd-$ios-1));\n\t\t\t\t\t// move ios to breaket end\n\t\t\t\t\t$ios = $breaketEnd;\n\t\t\t\t\t// +2 cuz the ')' and the operater after ')'\n\t\t\t\t\t$iop = $ios+2;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// reached string end\n\t\t\t// 抵达访问控制规则末端\n\t\t\tif ((($ruleLen-1 === $ios) && ($iop < $ruleLen))\n\t\t\t\t// the rest of first OR operator will be put in $this->_nextRule\n\t\t\t\t// so OR may be either the last orperator or not exist\n\t\t\t\t// 如果遇到 OR 操作符,那么控制规则剩下的部分都会放进 $this->_nextRule\n\t\t\t\t// 所以OR操作符要么是最后一个操作符要么不存在\n\t\t\t\t|| ('|' === $rule[$ios]))\n\t\t\t{\n\t\t\t\t$ruleSegments[] = trim(substr($rule,$iop));\n\t\t\t\t// leave scan loop\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t$segCount = count($ruleSegments);\n\t\t// the leaf node of rules tree,has one and only one executable rule\n\t\t// 规则树的末端节点,有且只有一条可执行的规则\n\t\tif (1 === $segCount)\n\t\t{\n\t\t\t$this->_rule = current($ruleSegments);\n\t\t}\n\t\t// or split down into child\n\t\t// 否则继续分解\n\t\telse\n\t\t{\n\t\t\t// if the last operator is OR,the last rule should be proceed later\n\t\t\t// or all rules should be put in children\n\t\t\t// 如果最后一个操作符是OR,最后一条规则后面再处理\n\t\t\t// 否则所有的规则都放进子节点\n\t\t\tfor ($i = 0; $i < (('|' === end($ruleOperators))?($segCount-1):$segCount); $i++)\n\t\t\t{\n\t\t\t\t$this->_childRules[] = new AgsAccessRule(array_shift($ruleSegments));\n\t\t\t}\n\n\t\t\t// if still segment remain,it must be the OR rule\n\t\t\t// 如果还有规则段剩下,必然是那条OR规则了\n\t\t\tif (count($ruleSegments))\n\t\t\t{\n\t\t\t\t$this->_nextRule = new AgsAccessRule(array_pop($ruleSegments));\n\t\t\t}\n\t\t}\n\t}",
"public function parseString($string)\n {\n $this->datas = [];\n $this->headers = [];\n $lines = str_getcsv($string, $this->endOfLine);\n\n foreach ($lines as $key => $line) {\n $data = $this->parseLine($line, $this->hasHeaders && $key === 0);\n\n if ($data === null) {\n continue;\n }\n\n if ($this->hasHeaders && $key === 0) {\n $this->headers = $data;\n } else {\n $this->datas[] = $data;\n }\n }\n\n return $this;\n }",
"public function rules(): array\n {\n return [\n 'id' => 'required|exists:cron_jobs', //任务ID\n 'command' => 'string|max:32', //任务名称\n 'argument' => 'array|max:5', //必须传递的参数\n 'option' => 'array|max:5', //可选传递的参数\n 'schedule' => 'string|max:32', //执行时间cron表达式\n 'status' => 'integer|in:0,1', //开启状态 0关闭 1开启\n 'remarks' => 'string|max:64', //定时任务用意描述备注\n ];\n }"
] | [
"0.658018",
"0.6578278",
"0.655893",
"0.6358298",
"0.6047468",
"0.59199643",
"0.58868444",
"0.57105577",
"0.5609912",
"0.5534459",
"0.55047154",
"0.5494693",
"0.5490263",
"0.5448547",
"0.5443454",
"0.544264",
"0.54305315",
"0.5400335",
"0.5381074",
"0.5342574",
"0.5279076",
"0.5273636",
"0.5267591",
"0.5247202",
"0.52285147",
"0.52270776",
"0.52091366",
"0.5198671",
"0.51932025",
"0.5185663",
"0.5183906",
"0.5166286",
"0.51451254",
"0.5138769",
"0.51295334",
"0.5122911",
"0.51225233",
"0.51130414",
"0.5105706",
"0.5088061",
"0.5084594",
"0.5079159",
"0.50769484",
"0.50769407",
"0.5072298",
"0.5066093",
"0.5063517",
"0.5053861",
"0.50527006",
"0.5044674",
"0.50407594",
"0.50334597",
"0.5024936",
"0.502305",
"0.5017311",
"0.50096047",
"0.49943992",
"0.49919903",
"0.49859837",
"0.49854657",
"0.4983394",
"0.49797028",
"0.49618647",
"0.4961814",
"0.49403203",
"0.49328113",
"0.4924236",
"0.4923779",
"0.49227226",
"0.49202698",
"0.49134585",
"0.4901241",
"0.4891742",
"0.48892856",
"0.48880696",
"0.48867413",
"0.48765686",
"0.48728615",
"0.48716414",
"0.48522568",
"0.48478317",
"0.48448953",
"0.4842447",
"0.48410854",
"0.48360813",
"0.4833565",
"0.48270425",
"0.48245513",
"0.48119935",
"0.48102653",
"0.48070973",
"0.4806808",
"0.48059395",
"0.48007497",
"0.47839788",
"0.47830567",
"0.47814414",
"0.47796264",
"0.47787756",
"0.47777846"
] | 0.6379038 | 3 |
Make the validator cancel on fail i.e bail on first ever invalid field. | protected function cancelOnFail(array $rules): array
{
if (!isset($rules['abort'])) {
return $rules;
}
unset($rules['abort']);
foreach ($rules as &$rule) {
$rule = (array) $rule + ['cancelOnFail' => true];
}
return $rules;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function setFailedValidationStatusCode();",
"protected function failedValidation(Validator $validator)\n {\n //\n }",
"public function validate()\n {\n parent::validate();\n if ( ! $this->getProject()->getId()) {\n $this->failedValidation($this->getValidatorInstance());\n }\n }",
"function fails() {\n return !($this->startValidation());\n }",
"protected function failedValidation(Validator $validator)\n {\n $this->transform($validator);\n }",
"public function validationHasFailed() {}",
"public function testGetErrorMessagesAfterValidationFailure()\n {\n $validator = new Callback(function ($input) {\n return ($input == 1) ? true : false;\n });\n\n $this->assertFalse($validator->isValid(2));\n $this->assertCount(1, $validator->errors());\n }",
"public function runValidation() {\n if ($this->formSubmitted()) {\n $this->_runValidation();\n }\n return;\n }",
"public function validate(): void\n {\n $errors = $this->getErrors();\n $this->throwExceptionIfErrors($errors);\n }",
"public function testGetErrorMessagesAfterValidationFailure()\n {\n $this->validator->isValid(-211);\n $this->assertCount(1, $this->validator->errors());\n }",
"public function getValidationFailed();",
"public function testValidationException()\n {\n $random = new Random($this->getValidatorStubFail());\n\n $random->validate();\n }",
"protected function Form_Validate() {\n // By default, we report that Custom Validations passed\n $blnToReturn = true;\n\n // Custom Validation Rules\n // TODO: Be sure to set $blnToReturn to false if any custom validation fails!\n\n $blnFocused = false;\n foreach ($this->GetErrorControls() as $objControl) {\n // Set Focus to the top-most invalid control\n if (!$blnFocused) {\n $objControl->Focus();\n $blnFocused = true;\n }\n\n // Blink on ALL invalid controls\n $objControl->Blink();\n }\n\n return $blnToReturn;\n }",
"protected function Form_Validate() {\n // By default, we report that Custom Validations passed\n $blnToReturn = true;\n\n // Custom Validation Rules\n // TODO: Be sure to set $blnToReturn to false if any custom validation fails!\n\n $blnFocused = false;\n foreach ($this->GetErrorControls() as $objControl) {\n // Set Focus to the top-most invalid control\n if (!$blnFocused) {\n $objControl->Focus();\n $blnFocused = true;\n }\n\n // Blink on ALL invalid controls\n $objControl->Blink();\n }\n\n return $blnToReturn;\n }",
"protected function performValidation()\n {\n // no required arguments\n }",
"public function testValidateMinusOne(): void\n {\n $this->assertTrue($this->validate(-1));\n }",
"public function clearFailedValidationData()\n {\n FormUtil::clearValidationFailedObjects($this->_objPath);\n }",
"public function setInvalid();",
"public function ignoreValidationErrors()\n {\n $this->ignoreValidationErrors = true;\n }",
"abstract public function runValidation();",
"public function doBeforeFailedInput(\\Closure $callback)\n {\n $this->failedInputCallback = $callback;\n return $this;\n }",
"public function validate() {\n if (!empty($this->value)) {\n parent::validate();\n }\n }",
"public function validate() {\n if (!empty($this->value)) {\n parent::validate();\n }\n }",
"public function validate(){\n\t\t\n\t\tparent::validate();\n\t\t\n\t\tif (isset($this->amount_limit)){\n\t\t\t\n\t\t\tif (!is_numeric($this->amount_limit))\n\t\t\t\t$this->errorAmountLimit = \"Podaj prawidłową kwotę.\";\n\t\t\t\n\t\t\tif ($this->amount_limit < 0)\n\t\t\t\t$this->errorAmountLimit = \"Kwota limitu nie może być ujemna.\";\n\t\t}\n\t\t\n\t\tif ($this->errorName != null || $this->errorAmountLimit != null){\n\t\t\t$this->success = false;\n\t\t}\n\n\t}",
"public function validate() {\n if (!empty($this->value)) {\n parent::validate();\n }\n }",
"protected function preValidate() {}",
"public function validation()\n {\n $this->assertFalse($this->denyValidator->validate(123));\n $this->assertFalse($this->denyValidator->validate('1234'));\n $this->assertFalse($this->denyValidator->validate(true));\n $this->assertFalse($this->denyValidator->validate(null));\n $this->assertFalse($this->denyValidator->validate(new stdClass()));\n }",
"public function validateAll(): void\n\t{\n\t\tif (!$this->isValid()) {\n\t\t\tthrow new Validator\\Exception(reset($this->errors) ?: 'Validation failed');\n\t\t}\n\t}",
"public function beforeSave()\n {\n $value = $this->getValue();\n try {\n $this->validate($value);\n } catch (\\Magento\\Framework\\Exception\\LocalizedException $e) {\n $msg = __('%1', $e->getMessage());\n $error = new \\Magento\\Framework\\Exception\\LocalizedException($msg, $e);\n throw $error;\n }\n }",
"public function failed()\n {\n // Do nothing\n }",
"public function validate() {\n if ($this->fails()) {\n throw new ValidationException($this);\n }\n }",
"public function validate()\n {\n $result = parent::validate();\n \n if ($result === true)\n $this->setErrorMessage('');\n else\n $this->setErrorMessage(Resources::getValue(Resources::SRK_FORM_ERRORGENERIC));\n \n return $result;\n }",
"public function validateCancel($data)\n {\n $validator = Validator::make($data, [\n 'transactionId' => 'required|integer'\n ]);\n\n if ($validator->fails()) {\n throw new \\Exception($validator->errors()->first());\n }\n }",
"public function testInvalid(): void\n {\n $validator = new ControlValidator();\n\n $this->assertFalse($validator->validate('arf12')->isValid());\n }",
"private function validate() {\n\t\n\t\t\treturn false;\n\t}",
"public function validate(): void\n {\n $this->validatingValue = method_exists($this, 'getValue') ? $this->getValue() : $this->validatingValue;\n\n /**\n * Executes each of the validation closures in reversed order only if the $validatingChain\n * property isn't empty.\n */\n if (!empty($this->validatingChain)) {\n foreach (array_reverse($this->validatingChain) as $function) {\n $function();\n }\n }\n }",
"protected function validateOrThrow() {}",
"protected abstract function doValidate($value);",
"protected abstract function doValidate($value);",
"public function skip_validation() \n\t{\n\t\t$this->skip_validation = TRUE;\n\t\treturn $this;\n\t}",
"public function validate()\n {\n foreach ($this->rules() as $attribute => $rules) {\n $value = $this->{$attribute};\n foreach ($rules as $rule) {\n $ruleName = $rule;\n if (!is_string($ruleName)) {\n $ruleName = $rule[0];\n }\n if ($ruleName === self::RULE_REQUIRED && !$value) {\n $this->addErrorForRule($attribute, self::RULE_REQUIRED);\n }\n if ($ruleName === self::RULE_EMAIL && !filter_var($value, FILTER_VALIDATE_EMAIL)) {\n $this->addErrorForRule($attribute, self::RULE_EMAIL);\n }\n if ($ruleName === self::RULE_MIN && strlen($value) < $rule['min']) {\n $this->addErrorForRule($attribute, self::RULE_MIN, $rule);\n }\n if ($ruleName === self::RULE_MAX && strlen($value) > $rule['max']) {\n $this->addErrorForRule($attribute, self::RULE_MAX, $rule);\n }\n if ($ruleName === self::RULE_MATCH && $value !== $this->{$rule['match']}) {\n $rule['match'] = $this->getLabel($rule['match']);\n $this->addErrorForRule($attribute, self::RULE_MATCH, $rule);\n }\n if ($ruleName === self::RULE_UNIQUE) {\n $className = $rule['class'];\n $uniqueAttr = $rule['attribute'] ?? $attribute;\n $tableName = $className::tableName();\n $statement = Application::$app->db->prepare(\"SELECT * FROM $tableName WHERE $uniqueAttr = :attr\");\n $statement->bindValue(\":attr\", $value);\n $statement->execute();\n $record = $statement->fetchObject();\n if ($record) {\n $this->addErrorForRule($attribute, self::RULE_UNIQUE, ['field' => $this->getLabel($attribute)]);\n }\n }\n }\n }\n\n return empty($this->errors);\n }",
"public function validate() {\n // loop through validators and run them\n foreach($this->form_fields as $field) {\n $field->valid = TRUE;\n // validate required items\n if ($field->required) {\n if ((strlen($field->value) == 0) || (empty($field->value)) || (is_null($field->value)) ) {\n $field->valid = FALSE; $this->form_errors++; \n if ((isset($field->default_error)) && (!empty($field->default_error))) {\n $field->error = $field->default_error;\n }\n else {\n $field->error = \"This field is required\";\n }\n }\n }\n // run validators for items that are not already failed\n if (($field->valid) && (!empty($field->validator)) && (is_array($field->validator))) {\n\n // skip empty fields\n if (empty($field->value)) { continue; }\n\n foreach($field->validator as $validator) {\n // run the function\n if (call_user_func($validator['func'],$field->value)) {\n $field->valid = TRUE;\n }\n else {\n $field->valid = FALSE; $this->form_errors++; \n if ((isset($validator['message'])) && (!empty($validator['message']))) {\n $field->error = $validator['message'];\n }\n else if ((isset($field->default_error)) && (!empty($field->default_error))) {\n $field->error = $field->default_error;\n }\n else {\n $field->error = \"This field contains an invalid value\";\n }\n // break out of the loop. No need to continue with validations if one has failed\n break;\n }\n }\n }\n $this->form_validated = TRUE;\n // run the post validate method to levy modifications against the validated input\n $this->postValidate();\n }\n return;\n }",
"public function validate()\n {\n parent::validate();\n if ( ! $this->getRelease()\n || in_array($this->getRelease()->getState(), [\n array_search('failed', config('projects.states')),\n array_search('destroyed', config('projects.states'))\n ])\n ) {\n $this->failedValidation($this->getValidatorInstance());\n }\n }",
"abstract function validator();",
"public function markAsFailed();",
"public function validation()\n {\n if ($this->validationHasFailed() == true) {\n return false;\n }\n }",
"function validateAgain () {\r\n return $this->_validateAgain;\r\n }",
"public function invalidate($field, $value = true) {\n if ($value == 'noMessage') {\n return;\n }\n if (!is_array($this->validationErrors)) {\n $this->validationErrors = array();\n }\n $this->validationErrors[$field] []= $value;\n }",
"public function failed();",
"protected function _validate() {\n\t}",
"public function invalidate($field, $value = true, $last = false) {\n\t\tparent::invalidate($field, $value);\n\t\tif (!$last) {\n\t\t\treturn;\n\t\t}\n\n\t\t$this->validator()->remove($field);\n\t}",
"public function testGetErrorMessagesAfterFailure()\n {\n $validator = new Integer();\n $validator->isValid(\"23\");\n $this->assertCount(1, $validator->errors());\n }",
"public function validator()\n {\n }",
"function validate() {\n\t\t\t$this->field['msg'] = ( isset( $this->field['msg'] ) ) ? $this->field['msg'] : esc_html__( 'You must provide a comma separated list of numerical values for this option.', 'redux-framework' );\n\n\t\t\tif ( ! is_numeric( str_replace( ',', '', $this->value ) ) || strpos( $this->value, ',' ) == false ) {\n\t\t\t\t$this->value = ( isset( $this->current ) ) ? $this->current : '';\n\t\t\t\t$this->field['current'] = $this->value;\n\n\t\t\t\t$this->error = $this->field;\n\t\t\t}\n\t\t}",
"function validate() {\n throw new Exception(\"Invalid validate call\");\n }",
"public function run($value)\n {\n \t$this->_failed_index = null;\n\t\tforeach($this->_items as $index=>$validator)\n\t\t{\n\t\t\tif(FALSE === $validator->isValid($value))\n\t\t\t{\n\t\t\t\t$this->_failed_index = $index;\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\treturn TRUE;\n }",
"public function validate()\n {\n if ($this->getSearchOperatorsControl()->getValue() === GridSearchDialogBase::OPER_LOGICAL_BETWEEN)\n {\n $this->argumentAltControl->setIsRequired(true);\n }\n \n return parent::validate();\n }",
"public function validate()\n {\n if ($this->getSearchOperatorsControl()->getValue() === GridSearchDialogBase::OPER_LOGICAL_BETWEEN)\n {\n $this->argumentAltControl->setIsRequired(true);\n }\n \n return parent::validate();\n }",
"public function _on_validate()\n {\n return true;\n }",
"public function validate()\r\n\t{\r\n\t\t// NOTE : cancel out the core Magento validator functionality, the payment gateway will overtake this task\r\n\t\t\r\n\t\treturn $this;\r\n\t}",
"public abstract function validation();",
"public function validate()\n {\n $comboMonth = $this->getChildren()->getControl($this->name . 'Month', true);\n $comboYear = $this->getChildren()->getControl($this->name . 'Year', true);\n $this->setErrorMessage('');\n \n if ($comboMonth->validate() && $comboYear->validate())\n return true;\n \n $errorMessage = $comboMonth->getErrorMessage();\n \n if ($errorMessage == '')\n $errorMessage = $comboYear->getErrorMessage();\n \n $this->setErrorMessage($errorMessage);\n \n return false;\n }",
"private function checkFailure() : void\n {\n $failure = (int) $this->session->get('failure', 0);\n $time = (int) $this->session->get('failure_time', time());\n if ($failure >= static::FAILURE) {\n if ($time >= time()) {\n throw new \\DomainException($this->i18n->t(\n 'setrun/user',\n 'Form is blocked for {min} minutes',\n ['min' => static::FAILURE_TIME / 60])\n );\n }\n $this->removeFailure();\n }\n }",
"public function verifyNow(): void\n {\n if (!$this->validate()) {\n throw new ValidationException($this);\n }\n }",
"public function dispense()\n {\n $this->addValidator('model', new Validator_HasValue());\n }",
"public function validationHasFailed(): bool;",
"public function denyNull(): self\n {\n $this->validatingChain[] = function () {\n if ($this->validatingValue === null) {\n $this->defaultMessageSet(\n self::VALIDATION_CANNOT_BE_NULL[1],\n self::VALIDATION_CANNOT_BE_NULL[0]\n );\n $this->throwFail();\n }\n };\n\n return $this;\n }",
"public function validate() {\n\t\treturn false;\n\t}",
"abstract protected function afterSuccessValidation();",
"public function validate($unsetInvalid = false);",
"public function validate() {\n//\t\tif( intval($this->params[\"startYear\"] < date(\"yyyy\"))) $this->add_validation_error(\"Season cannot exist in the past.\");\n\t}",
"abstract protected function getClearingValidator(): ValidatorInterface;",
"public function validate(){\n\t\t// Loop through model's rules array.\n\t\tforeach($this->rules() as $field => $rules){\n\t\t\t// Take the value of field this rule is for.\n\t\t\t$value = $this->{$field};\n\t\t\t// Loop through all rules for this field.\n\t\t\tforeach($rules as $rule){\n\t\t\t\t$ruleType = $rule;\n\t\t\t\t// If the rule is an array, not string, read its type from first index.\n\t\t\t\tif(is_array($ruleType)){\n\t\t\t\t\t$ruleType = $ruleType[0];\n\t\t\t\t}\n\n\t\t\t\t// Rule: field is required.\n\t\t\t\tif($ruleType === 'required' && !$value){\n\t\t\t\t\t$this->addError($field, 'required', $rule);\n\t\t\t\t}\n\t\t\t\t// Rule: field value must validate as email.\n\t\t\t\telse if($ruleType === 'email' && !filter_var($value, FILTER_VALIDATE_EMAIL)){\n\t\t\t\t\t$this->addError($field, 'email', $rule);\n\t\t\t\t}\n\t\t\t\t// Rule: string length comparisons.\n\t\t\t\telse if($ruleType === 'length'){\n\t\t\t\t\t// String has rule for minimum length.\n\t\t\t\t\tif(array_key_exists('min', $rule) && $rule['min'] > strlen($value)){\n\t\t\t\t\t\t$this->addError($field, 'min', $rule);\n\t\t\t\t\t}\n\t\t\t\t\t// String has rule for maximum length.\n\t\t\t\t\tif(array_key_exists('max', $rule) && $rule['max'] < strlen($value)){\n\t\t\t\t\t\t$this->addError($field, 'max', $rule);\n\t\t\t\t\t}\n\t\t\t\t\t// String has rule for exact length.\n\t\t\t\t\tif(array_key_exists('equal', $rule) && $rule['equal'] != strlen ($value)){\n\t\t\t\t\t\t$this->addError($field, 'equal', $rule);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Rule: field value must match comparison field's value.\n\t\t\t\telse if($ruleType === 'compare' && $value != $this->{$rule['field']}){\n\t\t\t\t\t$this->addError($field, 'compare', $rule);\n\t\t\t\t}\n\t\t\t\t// Rule: number comparisons.\n\t\t\t\telse if($ruleType === 'numeric'){\n\t\t\t\t\t// Value must validate to an integer number.\n\t\t\t\t\tif(array_key_exists('integer', $rule) && $rule['integer'] && filter_var($value, FILTER_VALIDATE_INT) === FALSE){\n\t\t\t\t\t\t$this->addError($field, 'integer', $rule);\n\t\t\t\t\t}\n\t\t\t\t\t// Value must validate to float number.\n\t\t\t\t\telse if((!array_key_exists('integer', $rule) || (array_key_exists('integer', $rule) && !$rule['integer'])) && filter_var($value, FILTER_VALIDATE_FLOAT) === FALSE){\n\t\t\t\t\t\t$this->addError($field, 'numeric', $rule);\n\t\t\t\t\t}\n\t\t\t\t\t// Value must be at least a minimum number.\n\t\t\t\t\tif(array_key_exists('min', $rule) && $rule['min'] > floatval($value)){\n\t\t\t\t\t\t$this->addError($field, 'numericmin', $rule);\n\t\t\t\t\t}\n\t\t\t\t\t// Value cannot be larger than a maximum number.\n\t\t\t\t\tif(array_key_exists('max', $rule) && $rule['max'] < floatval($value)){\n\t\t\t\t\t\t$this->addError($field, 'numericmax', $rule);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Rule: unique database entry.\n\t\t\t\telse if($ruleType === 'unique'){\n\t\t\t\t\t// Check for match in database.\n\t\t\t\t\t$found = $this->findOne([\"$field\" => \"$value\"]);\n\t\t\t\t\tif($found){\n\t\t\t\t\t\t$this->addError($field, 'unique', $rule);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t// Rule: on action only.\n\t\t\t\telse if($ruleType === 'on'){\n\t\t\t\t\t// If field is used on create only and request is not for create, field is not used.\n\t\t\t\t\tif($rule['action'] === 'create' && !$this->isCreate()){\n\t\t\t\t\t\t$this->ignoreFields[] = $field;\n\t\t\t\t\t}\n\t\t\t\t\t// IF field is used on update only and request is not for update, field is not used.\n\t\t\t\t\telse if($rule['action'] === 'update' && !$this->isUpdate()){\n\t\t\t\t\t\t$this->ignoreFields[] = $field;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn empty($this->errors);\n\t}",
"public function & validate() {\n\t\t# INitialize\n\t\t$fields =& $this->getFields();\n\t\t$this->validated = true;\n\t\t# Validate fields\n\t\tforeach ($fields as $field) {\n\t\t\t# Any soingle invalid field would cause to return invalid\n\t\t\tif (!$field->validate() && $this->validated) {\n\t\t\t\t# Mark as invalie\n\t\t\t\t$this->validated = false;\n\t\t\t}\n\t\t}\n\t\t# Return vaidation state\n\t\treturn $this->validated;\n\t}",
"public function validate(){\r\n\t\tif(array_get($this->entity, array_get($this->validate, 'fieldName')) != $this->fieldValue){\r\n\t\t\tHmsException::occur($fieldName. '必须等于', $this->fieldValue);\r\n\t\t}\r\n\t}",
"public function clearValidationErrors()\n {\n FormUtil::clearValidationErrors($this->_objPath);\n }",
"public function saveOrFail()\n {\n $this->save() === true ?: S\\throwEx(new ValidationException($this->getValidator()));\n }",
"function after_validation() {}",
"public function cancel()\n {\n $this->updateMode = false;\n $this->resetInputFields();\n }",
"public function cancel()\n {\n $this->updateMode = false;\n $this->resetInputFields();\n }",
"public function validate() {\n\n // Tell ourselves that the client has initiated validation.\n $this->hasRanValidation = true;\n\n // Sanitize and filter all of our field data.\n $this->filterFields();\n\n // Validate each field individually.\n foreach ($this->fields as $field) {\n\n // Skip fields with no rules.\n if (!$field->getGumpRules()) {\n continue;\n }\n\n // Validate this field.\n $fieldError = $field->validate();\n\n // Add any errors to our error log.\n if ($fieldError) {\n $this->addError($field, $fieldError);\n }\n }\n }",
"public function validate()\n {\n foreach ( $this->rules as $key => $rules ) {\n foreach ( $rules as $type => $rule ) {\n if ( $this->hasErrors( $key ) )\n break;\n $this->validateRule( $key, $type, $rule );\n }\n }\n }",
"public function callbackFail()\r\n {\r\n //$this->AddOutput(\"<p><i>Form was submitted and the Check() method returned false.</i></p>\");\r\n $this->redirectTo();\r\n }",
"public function validateElement() {\r\n if (!$this->object->validate()) {\r\n /** @var modValidator $validator */\r\n $validator = $this->object->getValidator();\r\n if ($validator->hasMessages()) {\r\n foreach ($validator->getMessages() as $message) {\r\n $this->addFieldError($message['field'], $this->modx->lexicon($message['message']));\r\n }\r\n }\r\n }\r\n }",
"public function callbackFail()\n {\n $this->AddOutput(\"<p><i>Form was submitted and the Check() method returned false.</i></p>\");\n $this->redirectTo();\n }",
"public function clearBeforeValidate(): ValidationResult\n {\n $this->isValid = true;\n $this->rules = null;\n return $this;\n }",
"public function callbackFail()\n {\n $this->AddOutput(\"<p><i>Form was submitted and the Check() method returned false.</i></p>\");\n }",
"public function setFailed()\n {\n $this->update(['status' => static::STATUS_FAILED]);\n }",
"public function fails()\n {\n if (!($this->validator instanceof \\Illuminate\\Validation\\Validator)) {\n throw new LogicException('No model was set. Nothing to validate.');\n }\n\n return $this->getValidator()->fails();\n }",
"protected function validate() {\r\n if ($this->getBaseAmount() <= 0)\r\n $this->errors->add(\"The base amount of alicuota must be greater than 0.\");\r\n// \t\t\telse\r\n// \t\t\t{\r\n// \t\t\t\t$relativeError = (($this->getTaxAmount() / $this->getBaseAmount() * 100) - $this->getTaxPercent());\r\n// \t\t\t\t$relativeError = $relativeError / $this->getTaxPercent();\r\n// \t\t\t\t$relativeError = NumberDataTypeHelper::truncate($relativeError, 2);\r\n// \t\t\t\tif (abs($relativeError) > 0.01)\r\n// \t\t\t\t\t$this->errors->add(\"The base and tax amount do not match with the alicuota ({$this->getName()}). Diference: $relativeError\");\r\n// \t\t\t}\r\n }",
"private static function setInvalidFlag($flag) {\n self::$_elements[self::$_inputElement]['inValid'] = $flag;\n }",
"function beforeValidate(&$Model) {\n extract($this->settings[$Model->alias]);\n $fields = array_diff_key($Model->data[$Model->alias], $schema);\n\n if(isset($Model->_origami_schema)) {\n $Model->_schema = am($Model->_schema, $Model->_origami_schema);\n }\n $id = $Model->id;\n $sAllGood = true;\n $emptyFields = array();\n // debug(serialize(array('rule' => 'alphaNumeric', 'required' => true, 'allowEmpty' => 'true', 'message' => 'Letters and Numbers Only, Please')));\n\n foreach ($fields as $key => $val) {\n $validation_result = $this->validateValue($Model, $key, $val);\n\n if ($validation_result === true) {\n continue;\n } else {\n if(!array_key_exists($key, $Model->validate)) {\n // $Model->validate[$key] = $validation_array; // unsure what this means!\n $Model->invalidate($key, $validation_result);\n }\n $sAllGood = false;\n }\n }\n\n // test for validation failures\n if($sAllGood) {\n // Reset the model schema to keep the database from issuing warnings about\n // missing fields, when origami datatypes have not been defined yet.\n $Model->schema(true);\n return true;\n }\n\n // re-add empty fields to keep the form helper happy\n $Model->data[$Model->alias] = am($Model->data[$Model->alias], $emptyFields);\n\n // fail\n return false;\n }",
"function Validator ($validateThis) {\r\n $this->errors=array();\r\n $this->validate($validateThis);\r\n }",
"public function denyEmpty(): self\n {\n $this->validatingChain[] = function () {\n if (empty($this->validatingValue)) {\n $this->defaultMessageSet(\n self::VALIDATION_CANNOT_BE_EMPTY[1],\n self::VALIDATION_CANNOT_BE_EMPTY[0]\n );\n $this->throwFail();\n }\n };\n\n return $this;\n }",
"function setValidationOption($fieldname, $innername, $value)\n\t{\n\t\t$this->setFieldInnerParam($fieldname, \"validation\", $innername, $value);\n\t}",
"protected function buildValidationCallback() {\n }",
"public function validation();",
"public function afterValidate() {\n\t\tif($this->allowFrom !== \"\"){\n\t\t\t$res\t= preg_split(\"/\\./\",$this->allowFrom);\n\t\t\t$this->allowFrom= sprintf(\"%03d\",$res[0]).\".\".sprintf(\"%03d\",$res[1]).\".\".sprintf(\"%03d\",$res[2]).\".\".sprintf(\"%03d\",$res[3]);\n\t\t}else{\n\t\t\t$this->allowFrom = NULL;\n\t\t}\n\t\t//----------------------------------------------------------------------\n\t\t$res\t= NULL;\n\t\t// ---------------------------------------------------------------------\n\t\tif($this->allowTo !== \"\"){\n\t\t\t$res\t= preg_split(\"/\\./\",$this->allowTo);\n\t\t\t$this->allowTo\t= sprintf(\"%03d\",$res[0]).\".\".sprintf(\"%03d\",$res[1]).\".\".sprintf(\"%03d\",$res[2]).\".\".sprintf(\"%03d\",$res[3]);\n\t\t}else{\n\t\t\t$this->allowTo = NULL;\n\t\t}\n\t\t//----------------------------------------------------------------------\n\t\tparent::afterValidate();\n\t}",
"protected function setValidationError(ValidationException $e){\n $this->validationError[] = $e->getError();\n }",
"private function checkError(): self\n {\n if (! $this->hasError()) {\n return $this;\n }\n\n $class = $this->get('class');\n\n if (is_null($class)) {\n $this->set('class', ' is-invalid');\n\n return $this;\n }\n\n return $this->set('class', $class.' is-invalid');\n }",
"public function validateFieldOrFlowOnNextStepForce(FlowEvent $event): void\n {\n if ($event->getAction()->getFocus()) {\n $this->validateFieldOrFlow($event);\n }\n }"
] | [
"0.59741604",
"0.596491",
"0.5835231",
"0.57893354",
"0.5642432",
"0.56411165",
"0.563559",
"0.5603203",
"0.5582724",
"0.5575153",
"0.5570884",
"0.55451936",
"0.55026716",
"0.54939973",
"0.5459693",
"0.5455833",
"0.54306674",
"0.5419358",
"0.54012436",
"0.5377463",
"0.53752613",
"0.5370747",
"0.5370747",
"0.53649354",
"0.5336104",
"0.53360724",
"0.53141445",
"0.52903396",
"0.5287117",
"0.5276868",
"0.52728224",
"0.5269686",
"0.52594733",
"0.5238994",
"0.5233012",
"0.52248013",
"0.52000725",
"0.5174576",
"0.5174576",
"0.5169174",
"0.5168581",
"0.51674306",
"0.5161092",
"0.51459664",
"0.5130843",
"0.51292",
"0.51263314",
"0.5124669",
"0.5123796",
"0.51210874",
"0.511811",
"0.5115372",
"0.5113628",
"0.5086736",
"0.50835294",
"0.50769037",
"0.5076728",
"0.5076728",
"0.5070806",
"0.50659585",
"0.5064163",
"0.50584096",
"0.50475395",
"0.50264937",
"0.50224316",
"0.5005909",
"0.50015396",
"0.50014174",
"0.4999533",
"0.4998593",
"0.49965012",
"0.49963984",
"0.49917504",
"0.49897465",
"0.49873334",
"0.49865064",
"0.4983192",
"0.49825212",
"0.497654",
"0.497654",
"0.49685377",
"0.49672312",
"0.4964533",
"0.49644962",
"0.49586377",
"0.4953286",
"0.4947416",
"0.49338692",
"0.49304697",
"0.4926448",
"0.4925951",
"0.4925504",
"0.4924788",
"0.49230772",
"0.49144113",
"0.49124974",
"0.48959145",
"0.4895745",
"0.48738855",
"0.4870149",
"0.48680133"
] | 0.0 | -1 |
function to create and populate database | function createDB($dbname){
$con =mysqli_connect('localhost', 'root', 'Threemodern789');
$query="CREATE DATABASE IF NOT EXISTS ".$dbname;
$tr=$con->query($query);
return $dbname;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function createDatabaseStructure() {}",
"private final function _createDbStructure()\n {\n if ($conn = $this->_getConnection()) {\n $installer = new lib_Install('install');\n try {\n $installer->install();\n } catch (Exception $e) {\n app::log($e->getMessage(), app::LOG_LEVEL_ERROR);\n }\n }\n }",
"private function initialiseDatabaseStructure(){\r\n $this->exec($this->userTableSQL);\r\n $query = \"INSERT INTO `user` (`userName`,`userEmail`,`userFirstName`,`userSurname`,`userPassword`,`userIsActive`,`userIsAdmin`) VALUES(?,?,?,?,?,?,?);\";\r\n $statement = $this->prepare($query);\r\n $password = md5('Halipenek3');\r\n $statement->execute(array('admin','[email protected]','Super','Admin',$password,1,1));\r\n\r\n //Create the knowledge Table\r\n $this->exec($this->knowledgeTableSQL);\r\n $this->exec($this->tagTableSQL);\r\n $this->exec($this->tagsTableSQL);\r\n }",
"abstract protected function initDB();",
"public function initDatabaseStructure( );",
"private function create()\n {\n if ($this->isRequired()) {\n $db = Database::getDatabaseConnection();\n $db->exec($this->getDropQuery());\n $db->exec($this->getCreateQuery());\n $this->populate($db);\n }\n }",
"private function make_db() {\n ee()->load->dbforge();\n $fields = array(\n 'id' => array('type' => 'varchar', 'constraint' => '32'),\n 'access' => array('type' => 'integer', 'constraint' => '10', 'unsigned' => true),\n 'data' => array('type' => 'text')\n );\n ee()->dbforge->add_field($fields);\n ee()->dbforge->add_key('id', true);\n ee()->dbforge->create_table($this->table_name);\n\n return true;\n }",
"private function createMainDatabaseRecords()\n {\n // get the .sql file\n $sql = (string) @file_get_contents( $this->plugin->getPath() . \"/Setup/install.sql\" );\n\n // insert it\n $this->db->exec( $sql );\n }",
"private function initDatabase() {\n \n \n \n }",
"public function acfedu_create_fill_db() {\n\t\t\t\t$this->acfedu_check_table();\n\t\t\t\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\t\t\t\tob_start();\n\t\t\t\tglobal $wpdb;\n //require_once( 'lib/import_nl.php' );\n //require_once( 'lib/import_be.php' );\n //require_once( 'lib/import_lux.php' );\n require_once( 'lib/import_id.php' );\n\t\t\t\t$sql = ob_get_clean();\n\t\t\t\tdbDelta( $sql );\n\t\t\t}",
"public function fill_db()\n {\n include('create_tables.php');\n\n $this->db->query($CLEAN);\n $this->db->query($APPTYPE);\n $this->db->query($BOOKINGS);\n $this->db->query($BUSINESSOWNER);\n $this->db->query($CUSTOMERS);\n $this->db->query($EMPLOYEES);\n $this->db->query($TIMESLOTS);\n $this->db->query($CANWORK);\n $this->db->query($HAVESKILL);\n $this->db->query($BUSINESS);\n $this->db->query($HOURS);\n }",
"function setupDatabase($db){\n\t\tif($db == null) throw new Exception(\"Database is not given\");\n\t\t\n $sqlBirthdays = \"\n CREATE TABLE IF NOT EXISTS `birthdays` (\n `key` int(11) NOT NULL AUTO_INCREMENT,\n `date` date NOT NULL,\n `name` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,\n PRIMARY KEY (`key`)\n\t\t);\";\n\t\t\n\t\t$sqlEvents =\"\n\t\tCREATE TABLE IF NOT EXISTS `events` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `title` text NOT NULL,\n `date` date NOT NULL,\n `time` time NOT NULL,\n `descr` mediumtext CHARACTER SET latin1 COLLATE latin1_german1_ci NOT NULL,\n `startdate` date NOT NULL,\n `enddate` date NOT NULL,\n PRIMARY KEY (`id`)\n );\";\n\n $sqlTicker = \"\n\t\tCREATE TABLE IF NOT EXISTS `tickermsg` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `startdate` date NOT NULL,\n `enddate` date NOT NULL,\n `message` text NOT NULL,\n PRIMARY KEY (`id`)\n );\";\n\n // Execute the create querys\n $db->query($sqlBirthdays);\n $db->query($sqlEvents);\n $db->query($sqlTicker);\n }",
"protected function createDatabase()\n {\n\n $databaseFileName = strtolower(str::plural($this->moduleName));\n\n // Create Schema only in monogo database\n $databaseDriver = config('database.default');\n if ($databaseDriver == 'mongodb') {\n $this->createSchema($databaseFileName);\n }\n }",
"public function generateDatabase()\n {\n $this->generateUserTable();\n $this->generateEmployerTable();\n $this->generateCandidateTable();\n $this->generateGuidTable();\n $this->generateWorkExperienceTable();\n $this->generateShortListTable();\n $this->generateQualTypeTable();\n $this->generateQualLevelTable();\n $this->generateQualificationsTable();\n $this->generateFieldTable();\n $this->generateSubFieldTable();\n $this->generateSkillTable();\n $this->generatePreferencesTable();\n }",
"protected function setupDBData()\n {\n /**\n * IMPORTANT NOTE : these functions must be executed sequentially in order for the command to work.\n */\n $this->setupProducts();\n $this->setupServerTypes();\n $this->setupServers();\n $this->setupUsers();\n }",
"private static function setupDB() {\n\t\t$tbl = self::$table;\n\t\t$dbw = wfGetDB( DB_MASTER );\n\t\twfDebugLog( __METHOD__, \"\\tCreating tables\\n\" );\n\t\t$dbw->query(\n\t\t\t\"CREATE TABLE IF NOT EXISTS $tbl ( pathway varchar(255), day varchar(50) )\", DB_MASTER\n\t\t);\n\t\twfDebugLog( __METHOD__, \"\\tDone!\\n\" );\n\t}",
"public function database() {\n\t\t$this->_check();\n\t\t$d['title_for_layout'] = __(\"Database creation\");\n\t\t$this->set($d);\n\t}",
"protected function populateDatabase()\n {\n\n $orm = $this->db->getOrm();\n\n // first clean the database to make shure to have no interferences\n // from existing data\n $orm->cleanResource('WbfsysText');\n $orm->cleanResource('WbfsysRoleGroup');\n $orm->cleanResource('WbfsysRoleUser');\n $orm->cleanResource('WbfsysSecurityArea');\n $orm->cleanResource('WbfsysSecurityAccess');\n $orm->cleanResource('WbfsysGroupUsers');\n\n // clear the cache\n $orm->clearCache();\n\n // Ein paar daten in der Datenbank\n $textPublic = $orm->newEntity('WbfsysText');\n $textPublic->access_key = 'text_public';\n $orm->insert($textPublic);\n\n $textAccess = $orm->newEntity('WbfsysText');\n $textAccess->access_key = 'text_access';\n $orm->insert($textAccess);\n\n $textNoAccess = $orm->newEntity('WbfsysText');\n $textNoAccess->access_key = 'text_no_access';\n $orm->insert($textNoAccess);\n\n // Gruppen Rollen\n $groupUnrelated = $orm->newEntity('WbfsysRoleGroup');\n $groupUnrelated->name = 'Unrelated';\n $groupUnrelated->access_key = 'unrelated';\n $groupUnrelated->level = Acl::DENIED;\n $orm->insert($groupUnrelated);\n\n $groupHasAccess = $orm->newEntity('WbfsysRoleGroup');\n $groupHasAccess->name = 'Has Access';\n $groupHasAccess->access_key = 'has_access';\n $groupHasAccess->level = Acl::DENIED;\n $orm->insert($groupHasAccess);\n\n $groupHasNoAccess = $orm->newEntity('WbfsysRoleGroup');\n $groupHasNoAccess->name = 'Has no Access';\n $groupHasNoAccess->access_key = 'has_no_access';\n $groupHasNoAccess->level = Acl::DENIED;\n $orm->insert($groupHasNoAccess);\n\n // user roles\n $userAnon = $orm->newEntity('WbfsysRoleUser');\n $userAnon->name = 'annon';\n $userAnon->level = Acl::DENIED;\n $orm->insert($userAnon);\n\n $userHasAccess = $orm->newEntity('WbfsysRoleUser');\n $userHasAccess->name = 'has_access';\n $userHasAccess->level = Acl::DENIED;\n $orm->insert($userHasAccess);\n\n $userHasDAccess = $orm->newEntity('WbfsysRoleUser');\n $userHasDAccess->name = 'has_dataset_access';\n $userHasDAccess->level = Acl::DENIED;\n $orm->insert($userHasDAccess);\n\n $userHasNoAccess = $orm->newEntity('WbfsysRoleUser');\n $userHasNoAccess->name = 'has_no_access';\n $userHasNoAccess->level = Acl::DENIED;\n $orm->insert($userHasNoAccess);\n\n // security areas\n $areaModPublic = $orm->newEntity('WbfsysSecurityArea');\n $areaModPublic->access_key = 'mod-public';\n $areaModPublic->id_level_listing = User::LEVEL_SUPERADMIN;\n $areaModPublic->id_level_access = User::LEVEL_SUPERADMIN;\n $areaModPublic->id_level_insert = User::LEVEL_SUPERADMIN;\n $areaModPublic->id_level_update = User::LEVEL_SUPERADMIN;\n $areaModPublic->id_level_delete = User::LEVEL_SUPERADMIN;\n $areaModPublic->id_level_admin = User::LEVEL_SUPERADMIN;\n $areaModPublic->id_ref_listing = User::LEVEL_SUPERADMIN;\n $areaModPublic->id_ref_access = User::LEVEL_SUPERADMIN;\n $areaModPublic->id_ref_insert = User::LEVEL_SUPERADMIN;\n $areaModPublic->id_ref_update = User::LEVEL_SUPERADMIN;\n $areaModPublic->id_ref_delete = User::LEVEL_SUPERADMIN;\n $areaModPublic->id_ref_admin = User::LEVEL_SUPERADMIN;\n $orm->insert($areaModPublic);\n\n $areaModAccess = $orm->newEntity('WbfsysSecurityArea');\n $areaModAccess->access_key = 'mod-has_access';\n $areaModAccess->id_level_listing = User::LEVEL_SUPERADMIN;\n $areaModAccess->id_level_access = User::LEVEL_SUPERADMIN;\n $areaModAccess->id_level_insert = User::LEVEL_SUPERADMIN;\n $areaModAccess->id_level_update = User::LEVEL_SUPERADMIN;\n $areaModAccess->id_level_delete = User::LEVEL_SUPERADMIN;\n $areaModAccess->id_level_admin = User::LEVEL_SUPERADMIN;\n $areaModAccess->id_ref_listing = User::LEVEL_SUPERADMIN;\n $areaModAccess->id_ref_access = User::LEVEL_SUPERADMIN;\n $areaModAccess->id_ref_insert = User::LEVEL_SUPERADMIN;\n $areaModAccess->id_ref_update = User::LEVEL_SUPERADMIN;\n $areaModAccess->id_ref_delete = User::LEVEL_SUPERADMIN;\n $areaModAccess->id_ref_admin = User::LEVEL_SUPERADMIN;\n $orm->insert($areaModAccess);\n\n $areaModNoAccess = $orm->newEntity('WbfsysSecurityArea');\n $areaModNoAccess->access_key = 'mod-no_access';\n $areaModNoAccess->id_level_listing = User::LEVEL_SUPERADMIN;\n $areaModNoAccess->id_level_access = User::LEVEL_SUPERADMIN;\n $areaModNoAccess->id_level_insert = User::LEVEL_SUPERADMIN;\n $areaModNoAccess->id_level_update = User::LEVEL_SUPERADMIN;\n $areaModNoAccess->id_level_delete = User::LEVEL_SUPERADMIN;\n $areaModNoAccess->id_level_admin = User::LEVEL_SUPERADMIN;\n $areaModNoAccess->id_ref_listing = User::LEVEL_SUPERADMIN;\n $areaModNoAccess->id_ref_access = User::LEVEL_SUPERADMIN;\n $areaModNoAccess->id_ref_insert = User::LEVEL_SUPERADMIN;\n $areaModNoAccess->id_ref_update = User::LEVEL_SUPERADMIN;\n $areaModNoAccess->id_ref_delete = User::LEVEL_SUPERADMIN;\n $areaModNoAccess->id_ref_admin = User::LEVEL_SUPERADMIN;\n $orm->insert($areaModNoAccess);\n\n // access\n $access1 = $orm->newEntity('WbfsysSecurityAccess');\n $access1->id_group = $groupHasAccess;\n $access1->id_area = $areaModAccess;\n $access1->access_level = Acl::LISTING;\n $this->acl->createAreaAssignment($access1,array(),true);\n\n // user role assignments\n $entityGUser = $orm->newEntity('WbfsysGroupUsers');\n $entityGUser->id_user = $userHasAccess;\n $entityGUser->id_group = $groupHasAccess;\n $entityGUser->id_area = $areaModAccess;\n $this->acl->createGroupAssignment($entityGUser);\n\n $entityGUser = $orm->newEntity('WbfsysGroupUsers');\n $entityGUser->id_user = $userHasDAccess;\n $entityGUser->id_group = $groupHasAccess;\n $entityGUser->id_area = $areaModAccess;\n $entityGUser->vid = $textAccess;\n $this->acl->createGroupAssignment($entityGUser);\n\n }",
"function CreateDB() {\n $sql = \"CREATE SCHEMA IF NOT EXISTS `mydb`\" .\n \"DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci ;\";\n performSQL($sql);\n}",
"public function setUpDatabase()\n\t{\n\t\t$schemes = new Schemes;\n\t\t$schemes->createRequestTable();\n\n\t Customer::create([\n\t 'email' => '[email protected]',\n\t 'first_name' => 'Osuagwu',\n\t 'last_name' => 'Emeka',\n\t 'phone_number' => \"09095685594\",\n\t 'image' => 'https://github.com/rakit/validation',\n\t 'location' => 'Lagos, Nigeria',\n\t 'sex' => 'Male',\n\t ]);\n\n\t Customer::create([\n\t 'email' => '[email protected]',\n\t 'first_name' => 'Mustafa',\n\t 'last_name' => 'Ozyurt',\n\t 'phone_number' => \"09095685594\",\n\t 'image' => 'https://github.com/rakit/validation',\n\t 'location' => 'Berlin, Germany',\n\t 'sex' => 'Male',\n\t ]);\n\t}",
"public function fillOutDb()\n {\n /* Fill out the Contacts table. BatchInsert is a good idea for that */\n $this->batchInsert('Contacts', ['name', 'surname', 'description'], self::InitialContacts);\n\n /* Prepare array for batchInsert request at first */\n $list = [];\n foreach(self::InitialPhoneNumbers as $name => $numbers){\n $query = new \\yii\\db\\Query();\n $contact_id = $query->select('id')->from('Contacts')->where(['name' => $name])->one();\n foreach($numbers as $number){\n $list[] = ['number' => $number, 'contact_id' => $contact_id['id']];\n }\n }\n\n /* Fill out the Numbers table */\n $this->batchInsert('Numbers', ['number', 'contact_id'], $list);\n }",
"function createDatabase() {\n $db = $this->db;\n\n $db->begin();\n // Create users table.\n // Username is unique and case insensitive.\n $db->exec(\n \"CREATE TABLE IF NOT EXISTS users (\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n username TEXT NOT NULL UNIQUE COLLATE NOCASE,\n password TEXT NOT NULL)\");\n // Create pictures table.\n $db->exec(\n \"CREATE TABLE IF NOT EXISTS pictures (\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n filename TEXT NOT NULL UNIQUE)\");\n $db->exec(\"CREATE INDEX picture_filename_idx ON pictures (FILENAME)\");\n // Create stories table.\n $db->exec(\n \"CREATE TABLE IF NOT EXISTS stories (\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title TEXT NOT NULL,\n authors TEXT NULL COLLATE NOCASE,\n short_title TEXT NOT NULL UNIQUE COLLATE NOCASE,\n picture_id INTEGER NOT NULL,\n post_date TEXT,\n created_by INTEGER NOT NULL,\n published INTEGER NOT NULL,\n CONSTRAINT FK_story_user_id\n FOREIGN KEY (created_by)\n REFERENCES users (id)\n ON DELETE NO ACTION\n ON UPDATE NO ACTION,\n CONSTRAINT FK_story_picture_id\n FOREIGN KEY (picture_id)\n REFERENCES pictures (id)\n ON DELETE CASCADE \n ON UPDATE CASCADE)\");\n //Create pages table.\n $db->exec(\n \"CREATE TABLE IF NOT EXISTS pages (\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n description TEXT NULL,\n picture_id INTEGER NOT NULL,\n story_id INTEGER NULL,\n page_number INTEGER NULL, \n post_date TEXT,\n created_by INTEGER NOT NULL,\n published INTEGER NOT NULL,\n CONSTRAINT FK_page_user_id\n FOREIGN KEY (created_by)\n REFERENCES users (id)\n ON DELETE NO ACTION\n ON UPDATE NO ACTION,\n CONSTRAINT FK_page_picture_id\n FOREIGN KEY (picture_id)\n REFERENCES pictures (id)\n ON DELETE CASCADE \n ON UPDATE CASCADE)\");\n $db->commit();\n\n $db->exec(\n \"CREATE VIEW fullStory AS\n SELECT pictures.filename,\n stories.id as sid, stories.title, stories.short_title, stories.post_date as story_post_date, stories.created_by as story_uid, stories.published as story_published,\n stories.authors, pages.id as pgid, pages.description, pages.page_number, pages.post_date as page_post_date, pages.created_by as page_uid, pages.published as page_published\n FROM stories\n INNER JOIN pictures on stories.picture_id = pictures.id\n LEFT JOIN pages on stories.id = pages.story_id\"\n );\n }",
"public function setupDatabase()\n\t{\n\n\t\t$installSql = $this->sourceDir . '/installation/sql/mysql/joomla.sql';\n\n\t\tif (0) //!file_exists($installSql))\n\t\t\tthrow new Exception(__METHOD__ . ' - Install SQL file not found in ' . $installSql, 1);\n\n\t\t$this->config->set('site_name', 'TEST ' . $this->config->get('target'));\n\t\t$this->config->set('db_name', $this->config->get('target'));\n\n\t\t$dbModel = new JacliModelDatabase($this->config);\n\n\t\t$this->out(sprintf('Creating database %s ...', $this->config->get('db_name')), false);\n\t\t$dbModel->createDB();\n\t\t$this->out('ok');\n\n\t\t$this->out('Populating database...', false);\n\t\t//$dbModel->populateDatabase($installSql);\n\t\t$this->out('ok');\n\n\t\t$this->out('Creating admin user...', false);\n\t\t$this->createAdminUser($dbModel);\n\t\t$this->out('ok');\n\n\t}",
"function create_database() \r\n {\r\n \t\t\t$this->tx_cbywebdav_devlog(1,\"create_database\",\"cby_webdav\",\"create_database\");\r\n\r\n // TODO\r\n return false;\r\n }",
"public function insertDatabase();",
"private function setupDB()\n\t{\n\t\t$query = 'CREATE TABLE IF NOT EXISTS games (\n\t\t\t\t\tid INT NOT NULL AUTO_INCREMENT PRIMARY KEY,\n\t\t\t\t\tdate DATETIME\n\t\t)';\n\t\tmysql_query($query);\n\t\t\n\t\t$query = 'CREATE TABLE IF NOT EXISTS moves (\n\t\t\t\t\tid INT NOT NULL AUTO_INCREMENT PRIMARY KEY,\n\t\t\t\t\tgame_id INT NOT NULL,\n\t\t\t\t\tmove_nr INT NOT NULL,\n\t\t\t\t\tfrom_x INT NOT NULL,\n\t\t\t\t\tfrom_y INT NOT NULL,\n\t\t\t\t\tto_x INT NOT NULL,\n\t\t\t\t\tto_y INT NOT NULL,\n\t\t \t\t\tINDEX (game_id),\n\t\t \t\t\tINDEX (move_nr)\n\t\t)';\n\t\tmysql_query($query);\n\t}",
"function mikado_create_db_tables() {\n\tinclude_once (WP_PLUGIN_DIR . '/mikado/lib/install-db.php');\t\t\t\n\tmikado_install_db();\n}",
"function CreateNewDatabase($destroyExistingDB = false, $createWithTestData = false) {\n if ($destroyExistingDB) {\n DropDB();\n }\n CreateDB();\n UseDB();\n CreateDateTable();\n CreatePublicHolidayTable();\n CreateAbsenceTypeTable();\n CreateCompanyRoleTable();\n CreateEmployeeTable();\n CreateApprovedAbsenceBookingTable();\n CreateApprovedAbsenceDateTable();\n CreateAdHocAbsenceRequestTable();\n CreateMainVacationRequestTable();\n// CreateDefaultRecords(\"admin\", \"[email protected]\",\"Zaq12wsx\",\"2015-01-01\", 19);\n if ($createWithTestData) {\n\n $annualLeave = CreateAbsenceType(\"Annual Leave\", 1, 1);\n $training = CreateAbsenceType(\"Training\", 0, 1);\n $sickness = CreateAbsenceType(\"Sickness\", 0, 0);\n $compasionate = CreateAbsenceType(\"Compasionate Leave\", 0, 1);\n\n $cashier = CreateCompanyRole(\"Cashier\", 3);\n $customerAdvisor = CreateCompanyRole(\"Customer Advisor\", 2);\n $manager = CreateCompanyRole(\"Manager\", 1);\n \n $filter[COMP_ROLE_NAME] = \"Admin\";\n $results = RetrieveCompanyRoles($filter);\n \n $admin = $results[0];\n\n $steveBrookstein = CreateEmployee(\"Steve Brookstein\", \n \"[email protected]\", \n \"Zaq12wsx\", \"2005-01-01\", 20, NULL, \n $cashier[COMP_ROLE_ID], 0, 0);\n\n $shayneWard = CreateEmployee(\"Shane Ward\", \n \"[email protected]\", \n \"Zaq12wsx\", \"2006-01-01\", 20, NULL, \n $cashier[COMP_ROLE_ID], 0, 0);\n\n\n $leonJackson = CreateEmployee(\"Leon Jackson\", \"[email protected]\", \n \"Zaq12wsx\", \"2008-01-01\", 20, NULL, \n $manager[COMP_ROLE_ID], 0, 0);\n\n $alexandraBurke = CreateEmployee(\"Alexandra Burke\", \"[email protected]\",\n \"Zaq12wsx\", \"2009-01-01\", 20, NULL, \n $cashier[COMP_ROLE_ID], 0, 0);\n\n $joeMcElderry = CreateEmployee(\"Joe McElderry\", \"[email protected]\",\n \"Zaq12wsx\", \"2010-01-01\", 20, NULL, \n $customerAdvisor[COMP_ROLE_ID], 0, 0);\n\n $mattCardle = CreateEmployee(\"Matt Cardle\", \"[email protected]\", \n \"Zaq12wsx\", \"2011-01-01\", 20, NULL, \n $customerAdvisor[COMP_ROLE_ID], 0, 0);\n \n $jamesArthur = CreateEmployee(\"James Arthur\", \"[email protected]\", \n \"Zaq12wsx\", \"2012-01-01\", 20, NULL, \n $customerAdvisor[COMP_ROLE_ID], 0, 0);\n\n $samBailey = CreateEmployee(\"Sam Bailey\", \"[email protected]\", \n \"Zaq12wsx\", \"2013-01-01\", 20, NULL, \n $customerAdvisor[COMP_ROLE_ID], 0, 0);\n\n $benHaenow = CreateEmployee(\"Ben Haenow\", \"[email protected]\", \n \"Zaq12wsx\", \"2014-01-01\", 20, NULL, \n $manager[COMP_ROLE_ID], 0, 1);\n\n\n $dates = RetrieveDates();\n\n if (count($dates) == 0) {\n date_default_timezone_set('UTC');\n\n // Start date\n $date = '2015-01-01';\n\n // End date\n $end_date = '2055-12-31';\n\n while (strtotime($date) <= strtotime($end_date)) {\n CreateDate($date, NULL);\n $date = date(\"Y-m-d\", strtotime(\"+1 day\", strtotime($date)));\n }\n }\n\n $dateID = RetrieveDateIDByDate(\"2015-04-03\");\n $goodFriday = CreatePublicHoliday(\"Good Friday\", $dateID);\n\n $dateID = RetrieveDateIDByDate(\"2015-04-06\");\n $easterMonday = CreatePublicHoliday(\"Easter Monday\", $dateID);\n\n $dateID = RetrieveDateIDByDate(\"2015-05-04\");\n $earlyMay = CreatePublicHoliday(\"Early May Bank Holiday\", $dateID);\n\n $dateID = RetrieveDateIDByDate(\"2015-05-25\");\n $springHoliday = CreatePublicHoliday(\"Spring Bank Holiday\", $dateID);\n\n $dateID = RetrieveDateIDByDate(\"2015-08-31\");\n $summerHoliday = CreatePublicHoliday(\"Summer Bank Holiday\", $dateID);\n\n $dateID = RetrieveDateIDByDate(\"2015-12-25\");\n $christmasDay = CreatePublicHoliday(\"Christmas Day\", $dateID);\n\n $dateID = RetrieveDateIDByDate(\"2015-12-28\");\n $boxingDay = CreatePublicHoliday(\"Boxing Day (substitute day)\", $dateID);\n\n $request = CreateMainVactionRequest($steveBrookstein[EMP_ID], \n \"2015-01-10\", \"2015-01-15\", \"2015-02-10\", \"2015-02-15\");\n\n $request = CreateMainVactionRequest($shayneWard[EMP_ID], \n \"2015-01-10\", \"2015-01-15\", \"2015-02-10\", \"2015-02-15\");\n \n\n \n $request = CreateMainVactionRequest($leonJackson[EMP_ID], \n \"2015-01-10\", \"2015-01-15\", \"2015-02-10\", \"2015-02-15\");\n \n $request = CreateMainVactionRequest($alexandraBurke[EMP_ID], \n \"2015-01-10\", \"2015-01-15\", \"2015-02-10\", \"2015-02-15\");\n \n $request = CreateMainVactionRequest($joeMcElderry [EMP_ID], \n \"2015-01-10\", \"2015-01-15\", \"2015-02-10\", \"2015-02-15\");\n \n $request = CreateMainVactionRequest($jamesArthur [EMP_ID], \n \"2015-01-10\", \"2015-01-15\", \"2015-02-10\", \"2015-02-15\");\n \n $request = CreateMainVactionRequest($mattCardle[EMP_ID], \n \"2015-01-10\", \"2015-01-15\", \"2015-02-10\", \"2015-02-15\");\n \n $request = CreateMainVactionRequest($samBailey[EMP_ID], \n \"2015-01-10\", \"2015-01-15\", \"2015-02-10\", \"2015-02-15\");\n \n $request = CreateMainVactionRequest($benHaenow [EMP_ID], \n \"2015-01-10\", \"2015-01-15\", \"2015-02-10\", \"2015-02-15\");\n\n\n $request = CreateAdHocAbsenceRequest($steveBrookstein[EMP_ID], \n \"2015-03-10\", \"2015-03-15\", $annualLeave[ABS_TYPE_ID]);\n \n $request = CreateAdHocAbsenceRequest($shayneWard[EMP_ID], \n \"2015-03-10\", \"2015-03-15\", $annualLeave[ABS_TYPE_ID]);\n \n\n \n $request = CreateAdHocAbsenceRequest($leonJackson[EMP_ID], \n \"2015-03-10\", \"2015-03-15\", $sickness[ABS_TYPE_ID]);\n \n $request = CreateAdHocAbsenceRequest($alexandraBurke[EMP_ID], \n \"2015-03-10\", \"2015-03-15\", $training[ABS_TYPE_ID]);\n \n $request = CreateAdHocAbsenceRequest($joeMcElderry[EMP_ID], \n \"2015-03-10\", \"2015-03-15\", $training[ABS_TYPE_ID]);\n \n $request = CreateAdHocAbsenceRequest($mattCardle[EMP_ID], \n \"2015-03-10\", \"2015-03-15\", $training[ABS_TYPE_ID]);\n \n $request = CreateAdHocAbsenceRequest($jamesArthur[EMP_ID], \n \"2015-03-10\", \"2015-03-15\", $training[ABS_TYPE_ID]);\n \n $request = CreateAdHocAbsenceRequest($samBailey[EMP_ID], \n \"2015-03-10\", \"2015-03-15\", $compasionate[ABS_TYPE_ID]);\n \n $request = CreateAdHocAbsenceRequest($benHaenow[EMP_ID], \n \"2015-03-10\", \"2015-03-15\", $compasionate[ABS_TYPE_ID]);\n \n \n $leonaLewis = CreateEmployee(\"Leona Lewis\", \"[email protected]\", \n \"Zaq12wsx\", \"2007-01-01\", 20, NULL, \n $admin[COMP_ROLE_ID], 1, 1);\n \n $request = CreateAdHocAbsenceRequest($leonaLewis[EMP_ID], \n \"2015-03-10\", \"2015-03-15\", $sickness[ABS_TYPE_ID]);\n \n $request = CreateMainVactionRequest($leonaLewis[EMP_ID], \n \"2015-01-10\", \"2015-01-15\", \"2015-02-10\", \"2015-02-15\");\n \n $request = CreateApprovedAbsenceBooking($leonaLewis[EMP_ID], \n \"2015-04-01\",\"2015-04-10\",\n $training[ABS_TYPE_ID]);\n }\n}",
"protected function _setupDb()\n {\n // First, delete the DB if it exists\n $this->_teardownDb();\n \n // Then, set up a clean new DB and return it\n list ($host, $port, $db) = $this->_getUrlParts();\n $db = trim($db, '/');\n \n return Sopha_Db::createDb($db, $host, $port);\n }",
"function wb_create_database($db_name, $con)\n{ \n\tif( !mysql_query(\"CREATE DATABASE IF NOT EXISTS $db_name\", $con) )\n\t\tdie( 'Could not create database: ' . mysql_error() );\n\tif( !mysql_select_db($db_name, $con) )\n\t\tdie( 'Could not select database: ' . mysql_error() );\n\t\n\twb_create_sitemap_table($con);\n\twb_create_content_table($con);\n\twb_create_users_table($con);\n\twb_create_permissions_table($con);\n\twb_create_comments_table($con);\n}",
"private function initDB(){\n $sql = \"\n CREATE SCHEMA IF NOT EXISTS `\".$this->_database.\"` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci ;\n USE `\".$this->_database.\"` ;\n \";\n try {\n $dbh = new PDO(\"mysql:host=$this->_host\", $this->_username, $this->_password,array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'));\n $dbh->exec($sql)\n or die(print_r($dbh->errorInfo(), true));\n } catch (PDOException $e) {\n $err_data = array('stmt'=>'on init');\n Helper_Error::setError( Helper_Error::ERROR_TYPE_DB , $e->getMessage() , $err_data , $e->getCode() );\n die(\"DB init ERROR: \". $e->getMessage());\n }\n }",
"private static function initialize_db() {\n\t\tif ( ! defined( 'WP_CLI_SNAPSHOT_DB' ) ) {\n\t\t\tdefine( 'WP_CLI_SNAPSHOT_DB', Utils\\trailingslashit( WP_CLI_SNAPSHOT_DIR ) . 'wp_snapshot.db' );\n\t\t}\n\n\t\tif ( ! ( file_exists( WP_CLI_SNAPSHOT_DB ) ) ) {\n\t\t\tself::create_tables();\n\n\t\t\treturn;\n\t\t}\n\n\t\t// phpcs:ignore PHPCompatibility.Extensions.RemovedExtensions.sqliteRemoved -- False positive.\n\t\tself::$dbo = new \\SQLite3( WP_CLI_SNAPSHOT_DB );\n\t}",
"function create() {\n\t\t$sqlStatements = array();\n\t\t$sqlStatements[] = \"CREATE DATABASE IF NOT EXISTS stumbleupon\";\n\t\t$sqlStatements[] = \"USE stumbleupon\";\n\t\t$sqlStatements[] = \"CREATE TABLE IF NOT EXISTS `siteViews` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `siteName` varchar(40) NOT NULL,\n\t`rating` int(5) NOT NULL,\n `timestamp` int(11) NOT NULL,\n `age` int(5) NOT NULL,\n `gender` int(5) NOT NULL,\n `city` varchar(30) NOT NULL,\n `state` varchar(30) NOT NULL,\n `country` varchar(30) NOT NULL,\n PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2250\";\n\t\t$sqlStatements[] = \"CREATE TABLE IF NOT EXISTS `tags` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n\t`viewId` int(11) NOT NULL,\n `siteName` varchar(40) NOT NULL,\n\t`rating` int(5) NOT NULL,\n `tag` varchar(30) NOT NULL,\n `count` int(5) NOT NULL,\n PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2250\";\n\t\texecuteSqlStatements($sqlStatements);\n\t}",
"function MetaDatabases() {}",
"public function initDb($configuration) {\n\n $dataSource = $configuration->dataSource();\n\n $dataSource->exec('DROP TABLE IF EXISTS user');\n $dataSource->exec('DROP TABLE IF EXISTS project');\n $dataSource->exec('DROP TABLE IF EXISTS projectInfo');\n $dataSource->exec('DROP TABLE IF EXISTS bug');\n $dataSource->exec('DROP TABLE IF EXISTS resource');\n $dataSource->exec('DROP TABLE IF EXISTS addSillyRecord');\n $dataSource->exec('DROP TABLE IF EXISTS sillyRecord');\n $dataSource->exec('DROP TABLE IF EXISTS uuidRecord');\n \n $dataSource->exec('\nCREATE TABLE user (\nuserId INTEGER PRIMARY KEY AUTOINCREMENT,\nname TEXT NOT NULL,\nfavoriteProjectId INTEGER\n )\n');\n\n $dataSource->exec('\nCREATE TABLE project (\nprojectId INTEGER PRIMARY KEY AUTOINCREMENT,\nname TEXT NOT NULL,\nmanagerUserId INTEGER NOT NULL\n)\n');\n\n $dataSource->exec('\nCREATE TABLE projectInfo (\nprojectInfoId INTEGER PRIMARY KEY AUTOINCREMENT,\nprojectId INTEGER NOT NULL,\ndescription TEXT NOT NULL\n)\n');\n\n $dataSource->exec('\nCREATE TABLE bug (\nbugId INTEGER PRIMARY KEY AUTOINCREMENT,\ntitle TEXT NOT NULL,\nbody TEXT NOT NULL,\nprojectId INTEGER NOT NULL,\nreporterUserId INTEGER NOT NULL,\nownerUserId INTEGER\n)\n');\n\n $dataSource->exec('\nCREATE TABLE resource (\nresourceId TEXT NOT NULL,\nname TEXT NOT NULL\n)\n');\n\n $dataSource->exec('\nCREATE TABLE sillyRecord (\nrecordId TEXT NOT NULL,\nname TEXT NOT NULL\n)\n');\n \n $dataSource->exec('\nCREATE TABLE addSillyRecord (\nrecordId TEXT NOT NULL,\nname TEXT NOT NULL\n)\n');\n \n $dataSource->exec('\nCREATE TABLE uuidRecord (\nrecordId TEXT NOT NULL\n)\n');\n \n $dataSource->exec('INSERT INTO user (userId, name) VALUES (100001, \"firstUser\")');\n $dataSource->exec('INSERT INTO user (userId, name) VALUES (100002, \"secondUser\")');\n\n $dataSource->exec('INSERT INTO user (userId, name) VALUES (55566, \"existingManager\")');\n $dataSource->exec('INSERT INTO user (userId, name) VALUES (67387, \"existingUser\")');\n\n $dataSource->exec('INSERT INTO project (projectId, name, managerUserId) VALUES (12345, \"Existing Project\", 55566)');\n $dataSource->exec('INSERT INTO bug (bugId, title, body, projectId, reporterUserId, ownerUserId) VALUES (521152, \"Existing Bug\", \"This bug existed from the time the database was created\", 12345, 67387, 55566)');\n \n $dataSource->exec('INSERT INTO user (userId, name, favoriteProjectId) VALUES (99990, \"circleUser\", 35570)');\n \n $dataSource->exec('INSERT INTO project (projectId, name, managerUserId) VALUES (35569, \"Circle Test\", 99990)');\n $dataSource->exec('INSERT INTO project (projectId, name, managerUserId) VALUES (35570, \"Circle Test (leaf)\", 55566)');\n \n }",
"public function loadDatabase(){\n $table = new Table('Textarea_Widgets');\n $table->add_column('Title', 'text');\n $table->add_column('Content', 'text');\n $table->add_column('WidgetName', 'text');\n $table->create();\n }",
"function createDatabase() {\n try {\n $pdoObject = new PDOObject();\n $pdoObject->createTables();\n $pdo = $pdoObject->getPDO();\n\n openFile($pdo);\n } catch (PDOException $e) {\n $e->getMessage();\n exit;\n } finally {\n unset($pdo);\n }\n}",
"public function createDatabase($database);",
"public function installDB()\n {\n Db::getInstance()->execute('CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'onehop_sms_rulesets` (\n `ruleid` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,\n `rule_name` varchar(200) NOT NULL,\n `template` varchar(100) NOT NULL,\n `label` varchar(100) NOT NULL,\n `senderid` varchar(100) NOT NULL,\n `active` enum(\"1\",\"0\") NOT NULL DEFAULT \"1\" \n ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8;');\n \n return Db::getInstance()->execute('CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'onehop_sms_templates` (\n `temp_id` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,\n `temp_name` varchar(200) NOT NULL,\n `temp_body` text NOT NULL,\n `submitdate` datetime NOT NULL\n ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8;');\n }",
"function Sql_DB_Create($db=\"\")\n {\n $query=$this->DB_Create_Query($db);\n $this->DB_Query($query);\n }",
"function serendipity_installDatabase() {\n global $serendipity;\n\n $queries = serendipity_parse_sql_tables(S9Y_INCLUDE_PATH . 'sql/db.sql');\n $queries = str_replace('{PREFIX}', $serendipity['dbPrefix'], $queries);\n\n foreach ($queries as $query) {\n serendipity_db_schema_import($query);\n }\n\n if (file_exists(S9Y_INCLUDE_PATH . 'sql/preload.sql')) {\n $queries = serendipity_parse_sql_inserts(S9Y_INCLUDE_PATH . 'sql/preload.sql');\n $queries = str_replace('{PREFIX}', $serendipity['dbPrefix'], $queries);\n foreach ($queries as $query) {\n serendipity_db_schema_import($query);\n }\n }\n}",
"protected function importDatabaseData() {}",
"public function database();",
"function migrate_db() {\r\n \r\n // $migrater->create_migrations_table();\r\n // $migrater->build_schema();\r\n }",
"private function createStructure(): void\n {\n $sql = 'BEGIN;\n CREATE TABLE Countries (\n Id INTEGER NOT NULL\n PRIMARY KEY,\n NameEn VARCHAR2,\n NameDe VARCHAR2\n );\n \n CREATE TABLE FilmTypes (\n Id INTEGER NOT NULL\n PRIMARY KEY,\n Name VARCHAR2,\n Code VARCHAR2\n );\n \n CREATE TABLE Images (\n Id INTEGER NOT NULL\n PRIMARY KEY,\n ImgFolder VARCHAR2,\n ImgName VARCHAR2,\n ImgDateManual VARCHAR2,\n ImgTechInfo VARCHAR2,\n FilmTypeId INTEGER,\n RatingId INTEGER,\n DateAdded INTEGER,\n LastChange INTEGER,\n ImgDesc VARCHAR2,\n ImgTitle VARCHAR2,\n Public INTEGER,\n DatePublished INTEGER,\n ImgDateOriginal INTEGER,\n ImgLat FLOAT,\n ImgLng FLOAT,\n ShowLoc INTEGER DEFAULT 1,\n CountryId INTEGER,\n LicenseId INTEGER\n );\n \n CREATE TABLE Exif (\n Make VARCHAR2,\n Model VARCHAR2,\n ImageWidth INTEGER,\n ImageHeight INTEGER,\n FileSize VARCHAR2,\n DateTimeOriginal INTEGER,\n ExposureTime VARCHAR2,\n FNumber INTEGER,\n ISO INTEGER,\n ExposureProgram VARCHAR2,\n MeteringMode VARCHAR2,\n Flash VARCHAR2,\n FocusDistance NUMERIC,\n ImgId INTEGER NOT NULL\n CONSTRAINT Exif_Images_Id_fk\n REFERENCES Images,\n GPSLatitude FLOAT,\n GPSLongitude FLOAT,\n GPSAltitude INTEGER,\n GPSAltitudeRef INTEGER,\n LensSpec VARCHAR,\n VibrationReduction TEXT,\n FileType VARCHAR,\n Lens VARCHAR,\n FocalLength VARCHAR,\n SyncDate TEXT DEFAULT NULL\n );\n \n CREATE UNIQUE INDEX Exif_ImgId_uindex\n ON Exif(ImgId);\n \n CREATE TABLE Images_Keywords (\n ImgId INTEGER NOT NULL,\n KeywordId INTEGER NOT NULL\n );\n \n CREATE TABLE Images_Locations (\n ImgId INTEGER,\n LocationId INTEGER\n );\n \n CREATE TABLE Images_ScientificNames (\n ImgId INTEGER NOT NULL,\n ScientificNameId INTEGER NOT NULL,\n SexId INTEGER NOT NULL,\n PRIMARY KEY (ImgId, ScientificNameId)\n );\n \n CREATE TABLE Images_Themes (\n ImgId INTEGER NOT NULL,\n ThemeId INTEGER NOT NULL\n );\n \n CREATE TABLE Images_fts_content (\n docid INTEGER\n PRIMARY KEY,\n c0ImgId,\n c1ImgFolder,\n c2ImgName,\n c3ImgTitle,\n c4ImgDesc,\n c5Theme,\n c6Country,\n c7Keywords,\n c8Locations,\n c9CommonNames,\n c10ScientificNames,\n c11Subject,\n c12Rating,\n c13ImgTitlePrefixes,\n c14ImgDescPrefixes,\n c15KeywordsPrefixes,\n c16CommonNamesPrefixes\n );\n \n CREATE TABLE Images_fts_docsize (\n docid INTEGER\n PRIMARY KEY,\n size BLOB\n );\n \n CREATE TABLE Images_fts_segdir (\n level INTEGER,\n idx INTEGER,\n start_block INTEGER,\n leaves_end_block INTEGER,\n end_block INTEGER,\n root BLOB,\n PRIMARY KEY (level, idx)\n );\n \n CREATE TABLE Images_fts_segments (\n blockid INTEGER\n PRIMARY KEY,\n block BLOB\n );\n \n CREATE TABLE Images_fts_stat (\n id INTEGER\n PRIMARY KEY,\n value BLOB\n );\n \n CREATE TABLE Keywords (\n Id INTEGER NOT NULL\n PRIMARY KEY,\n Name VARCHAR2\n );\n \n CREATE TABLE LicenseTypes (\n Id INTEGER NOT NULL\n CONSTRAINT LicenseTypes_pk\n PRIMARY KEY AUTOINCREMENT,\n NameEn TEXT\n );\n \n CREATE TABLE Licenses (\n Id INTEGER NOT NULL\n CONSTRAINT Licences_Id_pk\n PRIMARY KEY AUTOINCREMENT,\n Name TEXT NOT NULL,\n LabelEn TEXT,\n LabelDe TEXT,\n UrlLink TEXT,\n UrlLogo TEXT\n );\n \n CREATE TABLE Locations (\n Id INTEGER NOT NULL\n PRIMARY KEY,\n Name VARCHAR(1024)\n );\n \n CREATE TABLE Locations_Countries (\n LocationId INTEGER,\n CountryId INTEGER\n );\n \n CREATE TABLE Rating (\n Id INTEGER NOT NULL\n PRIMARY KEY,\n Name VARCHAR2,\n Value INTEGER\n );\n \n CREATE TABLE ScientificNames (\n Id INTEGER NOT NULL\n PRIMARY KEY,\n NameDe VARCHAR2,\n NameEn VARCHAR2,\n NameLa VARCHAR2,\n ThemeId INTEGER DEFAULT NULL\n );\n \n CREATE TABLE Sexes (\n Id INTEGER NOT NULL\n PRIMARY KEY,\n NameEn VARCHAR2,\n NameDe VARCHAR2,\n Symbol TEXT\n );\n \n CREATE TABLE SubjectAreas (\n Id INTEGER NOT NULL\n PRIMARY KEY,\n NameDe VARCHAR,\n NameEn VARCHAR\n );\n \n CREATE TABLE Themes (\n Id INTEGER NOT NULL\n PRIMARY KEY,\n NameDe VARCHAR2,\n SubjectAreaId INTEGER,\n NameEn VARCHAR\n );\n \n CREATE TABLE Xmp (\n ImgId INT\n CONSTRAINT Xmp_Images_Id_fk\n REFERENCES Images,\n CropTop FLOAT,\n CropLeft FLOAT,\n CropBottom FLOAT,\n CropRight FLOAT,\n CropAngle FLOAT,\n SyncDate TEXT DEFAULT NULL\n );\n \n CREATE UNIQUE INDEX Xmp_ImgId_uindex\n ON Xmp(ImgId);\n \n CREATE TABLE sqlite_master (\n type TEXT,\n name TEXT,\n tbl_name TEXT,\n rootpage INT,\n sql TEXT\n );\n \n CREATE TABLE sqlite_sequence (\n name,\n seq\n );\n \n CREATE TABLE sqlite_stat1 (\n tbl,\n idx,\n stat\n );\n \n COMMIT;';\n $this->db->exec($sql);\n print_r($this->db->errorInfo());\n }",
"function populate(){\n\t\t$this->db_tools->populate();\n\t\t$this->db_tools->echo_populate();\n\t}",
"public function createTables () {\n $this->usersDB->createTables();\n $this->categoriesDB->createTables();\n $this->itemsDB->createTables();\n }",
"protected function _initDbSchema() {\n\t\tif (!empty($this->schema)) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t#################################################################\n\t\t#\n\t\t# TABLE: feed\n\t\t#\n\t\t\n\t\t$this->schema['feed']['create'] = <<<SQL\nCREATE TABLE IF NOT EXISTS `feed` (\n\tid INTEGER PRIMARY KEY AUTOINCREMENT,\n\turl VARCHAR(255) UNIQUE,\n\ttitle VARCHAR(255),\n\t\n\ttype VARCHAR(1),\n\tstatus VARCHAR(1),\n\tcreated DATETIME,\n\tlastUpdated DATETIME,\n\n\tlastPolled DATETIME,\n\tnextPoll DATETIME\n);\nSQL;\n\n\t\t$this->schema['feed']['add'] = <<<SQL\nINSERT INTO `feed` \n(id, url, title, type, status, created, lastUpdated, lastPolled, nextPoll)\nVALUES\n(NULL, :url, :title, :type, :status, \n :created, :lastUpdated, :lastPolled, :nextPoll);\nSQL;\n\n\t\t$this->schema['feed']['updatePoll'] = <<<SQL\nUPDATE `feed` \nSET\n\tlastUpdated = :lastUpdated,\n\tlastPolled = :lastPolled\nWHERE\n\tid = :id\nSQL;\n\n\t\t$this->schema['feed']['getAll'] = <<<SQL\nSELECT * FROM `feed`;\nSQL;\n\n\t\t$this->schema['feed']['getById'] = <<<SQL\nSELECT * FROM `feed`\nWHERE\n\tid = :id;\nSQL;\n\n\t\t$this->schema['feed']['getByUrl'] = <<<SQL\nSELECT * FROM `feed`\nWHERE\n\turl = :url;\nSQL;\n\n\t\t$this->schema['feed']['deleteById'] = <<<SQL\nDELETE FROM `feed`\nWHERE\n\tid = :id;\nSQL;\n\n\t\t$this->schema['feed']['deleteByUrl'] = <<<SQL\nDELETE FROM `feed`\nWHERE\n\turl = :url;\nSQL;\n\n\t\t#################################################################\n\t\t#\n\t\t# TABLE: author\n\t\t#\n\n\t\t$this->schema['author']['create'] = <<<SQL\nCREATE TABLE IF NOT EXISTS `author` (\n\tid INTEGER PRIMARY KEY AUTOINCREMENT,\n\tname VARCHAR(255),\n\turl VARCHAR(255),\n\temail VARCHAR(255),\n\t\n\tUNIQUE(name, url)\n);\nSQL;\n\n\t\t$this->schema['author']['add'] = <<<SQL\nINSERT INTO `author`\n(id, name, url, email)\nVALUES\n(NULL, :name, :url, :email)\nSQL;\n\n\t\t$this->schema['author']['getAll'] = <<<SQL\nSELECT * FROM `author`;\nSQL;\n\n\t\t$this->schema['author']['getByName'] = <<<SQL\nSELECT * FROM `author`\nWHERE\n\tname = :name;\nSQL;\n\n\t\t$this->schema['author']['getById'] = <<<SQL\nSELECT * FROM `author`\nWHERE\n\tid = :id;\nSQL;\n\n\t\t$this->schema['author']['deleteByName'] = <<<SQL\nDELETE FROM `author`\nWHERE\n\tname = :name;\nSQL;\n\n\t\t$this->schema['author']['deleteById'] = <<<SQL\nDELETE FROM `author`\nWHERE\n\tid = :id;\nSQL;\n\n\n\t\t#################################################################\n\t\t#\n\t\t# TABLE: entry\n\t\t#\n\t\t\n\t\t$this->schema['entry']['create'] = <<<SQL\nCREATE TABLE IF NOT EXISTS `entry` (\n\trow_id INTEGER PRIMARY KEY AUTOINCREMENT,\n\turl VARCHAR(255),\n\ttitle VARCHAR(255),\n\tid VARCHAR(255) UNIQUE,\n\tauthor_id INTEGER,\n\tsummary TEXT,\n\tcontent TEXT,\n\tpublished DATETIME,\n\tupdated DATETIME\n\n);\nSQL;\n\n\t\t$this->schema['entry']['add'] = <<<SQL\nINSERT INTO `entry`\n(row_id, url, title, id, author_id, summary, content, published, updated)\nVALUES\n(NULL, :url, :title, :id, :author_id, :summary, :content, :published, :updated)\nSQL;\n\n\t\t$this->schema['entry']['getAll'] = <<<SQL\nSELECT * FROM `entry`;\nSQL;\n\n\t\t// TODO: Add join for author id\n\t\t$this->schema['entry']['getById'] = <<<SQL\nSELECT * FROM `entry`\nWHERE\n\trow_id = :row_id;\nSQL;\n\n\t\t// TODO: Add join for author id\n\t\t$this->schema['entry']['getByAtomId'] = <<<SQL\nSELECT * FROM `entry`\nWHERE\n\tid = :id;\nSQL;\n\n\t\t$this->schema['entry']['deleteById'] = <<<SQL\nDELETE FROM `entry`\nWHERE\n\trow_id = :row_id;\nSQL;\n\n\t\t$this->schema['entry']['deleteByAtomId'] = <<<SQL\nDELETE FROM `entry`\nWHERE\n\tid = :id;\nSQL;\n\n\n\n\t\t#################################################################\n\t\t#\n\t\t# TABLE: feedentry\n\t\t#\n\t\t\n\t\t$this->schema['feedentry']['create'] = <<<SQL\nCREATE TABLE IF NOT EXISTS `feedentry` (\n\tfeed_id INTEGER,\n\tentry_id INTEGER,\n\tcreated DATETIME,\n\n\tPRIMARY KEY(feed_id, entry_id)\t\n);\nSQL;\n\n\t$this->schema['feedentry']['add'] = <<<SQL\nINSERT INTO `feedentry`\n(feed_id, entry_id, created)\nVALUES\n(:feed_id, :entry_id, :created)\nSQL;\n\n\t$this->schema['feedentry']['getByFeedUrl'] = <<<SQL\nSELECT \n\trow_id, entry.url, entry.title, entry.id, \n\tauthor_id, summary, content,\n\tentry.published, entry.updated\nFROM entry\nLEFT JOIN feedentry ON entry.row_id = feedentry.entry_id\nLEFT JOIN feed ON feedentry.feed_id = feed.id\nWHERE\n\tfeed.url = :feed_url\nORDER BY entry.published DESC\nSQL;\n\n\n\t}",
"private function createDatabase()\n {\n // get entity manager\n $em = $this->modelManager;\n\n // get our schema tool\n $tool = new SchemaTool( $em );\n\n // ...\n $classes = array_map(\n function( $model ) use ( $em ) {\n return $em->getClassMetadata( $model );\n },\n $this->models\n );\n\n // remove them\n $tool->createSchema( $classes );\n }",
"function dbCreate() {\r\n $dbhost = 'localhost';\r\n $dbuser = 'admin';\r\n $dbpass = 'adminpass';\r\n $dbconn=mysqli_connect($dbhost,$dbuser,$dbpass);\r\n\r\n $query = \"DROP DATABASE IF EXISTS maindb;\";\r\n \r\n mysqli_query($dbconn, $query); \r\n\r\n $query = \"CREATE DATABASE IF NOT EXISTS maindb;\";\r\n \r\n mysqli_query($dbconn, $query);\r\n\r\n mysqli_close($dbconn);\r\n }",
"public function createFromConfig()\n { \n // Begin transation\n $this->pdo->beginTransaction();\n\n // Create tables\n foreach ($this->schema['create'] as $name => $schema) {\n $table = $this->tables[$name];\n $this->pdo->exec($this->getDropTable($table));\n $sql = $this->getCreateTable($table, $schema);\n $this->pdo->exec($sql);\n }\n\n // Commit changes\n $this->pdo->commit();\n }",
"function augmentDatabase() {\r\n\t}",
"function prepConfig() {\n\n global $db;\n global $lang;\n\n if($report = $db->query(\"CREATE DATABASE IF NOT EXISTS \".$lang[\"config_db_name\"].\"\")) {\n\n // Generate safety table\n if($report = $db->query(\"CREATE TABLE IF NOT EXISTS `\".$lang[\"config_db_name\"].\"`.`\".$lang[\"config_table_name\"].\"` ( `id` INT(6) NOT NULL AUTO_INCREMENT, `key` VARCHAR(100) NOT NULL, UNIQUE (`key`), `val` VARCHAR(100) NOT NULL , PRIMARY KEY (`id`)) ENGINE = InnoDB;\")) {\n\n return \"Ready\";\n\n } else {\n\n return \"Failed to create table. Error: \".$db->error;\n\n }\n\n } else {\n\n return \"Failed to create database. Error: \".$db->error;\n\n }\n\n }",
"function dbSetup($connection)\n{\n $error = NULL;\n // Create database unless it already exists\n $sql = \"CREATE DATABASE IF NOT EXISTS \". DATABASE_NAME;\n if ($connection->query($sql) != TRUE) {\n $error = $connection->error;\n }\n else\n {\n // Select the database \n $sql = \"USE \". DATABASE_NAME;\n if ($connection->query($sql) != TRUE) {\n $error = $connection->error;\n }\n else\n {\n // echo \"Creating parents.\";\n // Create Parents Table unless it already exists\n $sql = \"CREATE TABLE IF NOT EXISTS PARENTS (\n id int AUTO_INCREMENT PRIMARY KEY, \n firstname varchar(20), \n lastname varchar(30), \n email varchar(50), \n phone varchar(10), \n address varchar(30), \n city varchar(20), \n state varchar(2), \n zipcode varchar(15),\n childcount int);\";\n $connection->query($sql);\n \n // echo \"Creating children.\";\n // Create Children Table unless it already exists\n $sql = \"CREATE TABLE IF NOT EXISTS CHILDREN (\n id int AUTO_INCREMENT PRIMARY KEY,\n parent_id int,\n firstname varchar(20),\n lastname varchar(20),\n age int);\";\n $connection->query($sql);\n \n \n }\n }\n return ($error); \n}",
"public function prepareDatabase()\n {\n // If SQLite database does not exist, create it\n if ($this->config->database['connection'] === 'sqlite') {\n $path = $this->config->database['database'];\n if ( ! $this->fileExists($path) && is_dir(dirname($path))) {\n $this->write(\"Creating $path ...\");\n touch($path);\n }\n }\n }",
"public static function generateDatabase()\n\t{\n\t\t$entities\t=\tself::getEntities();\n\t\t$query\t\t=\tself::$current_db->query('SHOW TABLES');\n\t\t$tables\t\t=\tarray();\n\n\t\twhile($table = $query->fetch(\\PDO::FETCH_NUM))\n\t\t\t$tables[]\t=\tstrtolower($table[0]);\n\n\t\tforeach($entities as $entity)\n\t\t{\n\t\t\tif( ! in_array(strtolower($entity::getTableName()), $tables))\n\t\t\t\t$entity::createTable();\n\t\t\telse\n\t\t\t\t$entity::updateTable();\n\t\t}\n\t}",
"protected function initDatabaseRecord() {}",
"function createDatabaseStructure($wipe_out = false) {\n\t\tglobal $wpdb;\n\n\t\t$tables = array($this->get_wpdb_prefix().'courses' => 'CREATE TABLE `{table_name}` (\n\t\t\t\t\t\t\t `ID` int(11) NOT NULL AUTO_INCREMENT,\n\t\t\t\t\t\t\t `status` tinyint(1) DEFAULT 0,\n\t\t\t\t\t\t\t `archived` tinyint(1) DEFAULT 0,\n\t\t\t\t\t\t\t `accept_key` char(10) NOT NULL,\n\t\t\t\t\t\t\t `course_name` varchar(250) NOT NULL,\n\t\t\t\t\t\t\t `course_url` varchar(250) DEFAULT NULL,\n\t\t\t\t\t\t\t `message` text,\n\t\t\t\t\t\t\t PRIMARY KEY (`ID`)\n\t\t\t\t\t\t\t) ENGINE=InnoDB DEFAULT CHARSET=utf8',\n\t\t\t\t\t\t\t$this->get_wpdb_prefix().'teachers' => 'CREATE TABLE `{table_name}` (\n\t\t\t\t\t\t\t `ext_user_id` int(11) NOT NULL,\n\t\t\t\t\t\t\t `firstname` varchar(250) DEFAULT NULL,\n\t\t\t\t\t\t\t `lastname` varchar(250) DEFAULT NULL,\n\t\t\t\t\t\t\t `email` varchar(250) DEFAULT NULL,\n\t\t\t\t\t\t\t `organization` varchar(250) DEFAULT NULL,\n\t\t\t\t\t\t\t PRIMARY KEY (`ext_user_id`)\n\t\t\t\t\t\t\t) ENGINE=InnoDB DEFAULT CHARSET=utf8;',\n\t\t\t\t\t\t\t$this->get_wpdb_prefix().'courses_teacher_rel' => 'CREATE TABLE `{table_name}` (\n\t\t\t\t\t\t\t `id` int(11) NOT NULL AUTO_INCREMENT,\n\t\t\t\t\t\t\t `rel_courses_id` int(11) NOT NULL,\n\t\t\t\t\t\t\t `rel_teacher_id` int(11) NOT NULL,\n\t\t\t\t\t\t\t PRIMARY KEY (`id`),\n\t\t\t\t\t\t\t UNIQUE KEY `rel_courses_id` (`rel_courses_id`,`rel_teacher_id`),\n\t\t\t\t\t\t\t FOREIGN KEY (`rel_courses_id`) REFERENCES `'.$this->get_wpdb_prefix().'courses` (`ID`) ON DELETE CASCADE,\n\t\t\t\t\t\t\t FOREIGN KEY (`rel_teacher_id`) REFERENCES `'.$this->get_wpdb_prefix().'teachers` (`ext_user_id`) ON DELETE CASCADE\n\t\t\t\t\t\t\t) ENGINE=InnoDB DEFAULT CHARSET=utf8;',\n\t\t\t\t\t\t\t$this->get_wpdb_prefix().'assignments' => 'CREATE TABLE `{table_name}` (\n\t\t\t\t\t\t\t `id` int(11) NOT NULL AUTO_INCREMENT,\n\t\t\t\t\t\t\t `post_id` int(11) NOT NULL,\n\t\t\t\t\t\t\t `title` text,\n\t\t\t\t\t\t\t `excerpt` text,\n\t\t\t\t\t\t\t `url` VARCHAR(250),\n\t\t\t\t\t\t\t `start_date` timestamp NOT NULL DEFAULT \"0000-00-00 00:00:00\",\n\t\t\t\t\t\t\t `end_date` timestamp NOT NULL DEFAULT \"0000-00-00 00:00:00\",\n\t\t\t\t\t\t\t `course_id` int(11) NOT NULL,\n\t\t\t\t\t\t\t PRIMARY KEY (`id`),\n\t\t\t\t\t\t\t UNIQUE (`course_id`,`post_id`),\n\t\t\t\t\t\t\t FOREIGN KEY (`course_id`) REFERENCES `'.$this->get_wpdb_prefix().'courses` (`ID`) ON DELETE CASCADE\n\t\t\t\t\t\t\t) ENGINE=InnoDB DEFAULT CHARSET=utf8;',\n\t\t\t\t\t\t\t$this->get_wpdb_prefix().'groups' => ' CREATE TABLE `{table_name}` (\n\t\t\t\t\t\t\t `id` int(11) NOT NULL AUTO_INCREMENT,\n\t\t\t\t\t\t\t `group_name` varchar(250) NOT NULL,\n\t\t\t\t\t\t\t `group_key` char(32) DEFAULT NULL,\n\t\t\t\t\t\t\t `type` tinyint(1) DEFAULT 0,\n\t\t\t\t\t\t\t `course_id` int(11) NOT NULL,\n\t\t\t\t\t\t\t PRIMARY KEY (`id`), UNIQUE(`group_name`),\n\t\t\t\t\t\t\t FOREIGN KEY (`course_id`) REFERENCES `'.$this->get_wpdb_prefix().'courses` (`ID`) ON DELETE CASCADE\n\t\t\t\t\t\t\t) ENGINE=InnoDB DEFAULT CHARSET=utf8;',\n\t\t\t\t\t\t\t$this->get_wpdb_prefix().'classmates' => 'CREATE TABLE `{table_name}` (\n\t\t\t\t\t\t\t `id` int(11) NOT NULL AUTO_INCREMENT,\n\t\t\t\t\t\t\t `firstname` varchar(250) DEFAULT NULL,\n\t\t\t\t\t\t\t `lastname` varchar(250) DEFAULT NULL,\n\t\t\t\t\t\t\t `blog_url` text,\n\t\t\t\t\t\t\t `email` varchar(250) DEFAULT NULL,\n\t\t\t\t\t\t\t `course_id` int(11) NOT NULL,\n\t\t\t\t\t\t\t PRIMARY KEY (`id`),\n\t\t\t\t\t\t\t UNIQUE KEY `email` (`email`,`course_id`),\n\t\t\t\t\t\t\t FOREIGN KEY (`course_id`) REFERENCES `'.$this->get_wpdb_prefix().'courses` (`ID`) ON DELETE CASCADE\n\t\t\t\t\t\t\t) ENGINE=InnoDB DEFAULT CHARSET=utf8;',\n\t\t\t\t\t\t\t$this->get_wpdb_prefix().'classmates_group_rel' => 'CREATE TABLE `{table_name}` (\n\t\t\t\t\t\t\t `group_id` int(11) NOT NULL,\n\t\t\t\t\t\t\t `classmate_id` int(11) NOT NULL,\n\t\t\t\t\t\t\t `status` int(11) DEFAULT 0,\n\t\t\t\t\t\t\t PRIMARY KEY (`group_id`),\n\t\t\t\t\t\t\t UNIQUE KEY `group_id` (`group_id`,`classmate_id`),\n\t\t\t\t\t\t\t FOREIGN KEY (`group_id`) REFERENCES `'.$this->get_wpdb_prefix().'groups` (`id`) ON DELETE CASCADE,\n\t\t\t\t\t\t\t FOREIGN KEY (`classmate_id`) REFERENCES `'.$this->get_wpdb_prefix().'classmates` (`id`) ON DELETE CASCADE\n\t\t\t\t\t\t\t) ENGINE=InnoDB DEFAULT CHARSET=utf8;',\n\t\t\t\t\t\t\t$this->get_wpdb_prefix().'cron' => 'CREATE TABLE `{table_name}` (\n\t\t\t\t\t\t\t `hook` VARCHAR(250) NOT NULL,\n\t\t\t\t\t\t\t `scheduled_time` INT(11) NOT NULL,\n\t\t\t\t\t\t\t PRIMARY KEY (`hook`)\n\t\t\t\t\t\t\t) ENGINE=InnoDB DEFAULT CHARSET=utf8;');\n\t\tif($wipe_out) {\n\t\t\t$wpdb->query('SET FOREIGN_KEY_CHECKS = 0;');\n\t\t}\n\t\tforeach($tables as $table_name => $query) {\n\t\t\tif(!$wipe_out) {\n\t\t\t\t//IF table doesn't exist, create it\n\t\t\t\tif($wpdb->get_var('SHOW TABLES LIKE \"'.$table_name.'\"') != $table_name) {\n\t\t\t\t\trequire_once(ABSPATH.'wp-admin/includes/upgrade.php');\n\t\t\t\t\t$query = str_replace('{table_name}', $table_name, $query);\n\t\t\t\t\tdbDelta($query);\n\t\t\t\t\t//echo $query;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$wpdb->query('DROP TABLE '.$table_name);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Revert foreign_key_checks to 1\n\t\tif($wipe_out) {\n\t\t\t$wpdb->query('SET FOREIGN_KEY_CHECKS = 1;');\n\t\t} else {\n\t\t\t//Check also for some default options\n\t\t\t//If not found, add default values\n\t\t\tif($general_options = get_option('lepress-settings')) {\n\t\t\t\tif(is_null($this->get_option('courseRefreshTime'))) {\n\t\t\t\t\t$general_options['courseRefreshTime'] = 60;\n\t\t\t\t}\n\t\t\t\tif(is_null($this->get_option('classmatesRefreshTime'))) {\n\t\t\t\t\t$general_options['classmatesRefreshTime'] = 15;\n\t\t\t\t}\n\t\t\t\tif(is_null($this->get_option('assignmentsRefreshTime'))) {\n\t\t\t\t\t$general_options['assignmentsRefreshTime'] = 2;\n\t\t\t\t}\n\t\t\t\tif(array_diff($general_options, get_option('lepress-settings'))) {\n\t\t\t\t\tupdate_option('lepress-settings', $general_options);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n }",
"private function setupDatabase()\n {\n try {\n $db = new PDO(sprintf('mysql:host=%s;dbname=%s', $this->host, $this->dbName), $this->userName, $this->password);\n\n } catch (PDOException $e) {\n\n if (false != strpos($e->getMessage(), 'Unknown database')) {\n $db = new PDO(sprintf('mysql:host=%s', $this->host), $this->userName, $this->password);\n $db->exec(\"CREATE DATABASE IF NOT EXISTS `$this->dbName` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;\") or die(print_r($db->errorInfo(), true));\n\n } else {\n die('DB ERROR: ' . $e->getMessage());\n }\n\n $db = new PDO(sprintf('mysql:host=%s;dbname=%s', $this->host, $this->dbName), $this->userName, $this->password);\n }\n $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n return $db;\n }",
"public function migrate()\n {\n $db = new \\SQLite3(\"ATM.db\");\n\n $query = \"CREATE TABLE IF NOT EXISTS \" . $this->table_name . \" \";\n $fields = array();\n\n foreach($this->fields as $name=>$type) {\n $fields[] = \"$name $type\";\n }\n\n $query .= \"(\" . implode(\", \", $fields) . \")\";\n\n $db->exec($query);\n }",
"protected function seedDatabase(): void\n {\n $this->seedProductCategories();\n $this->seedProducts();\n }",
"private static function initDatabase() {\n\t\t\tif (self::Config('use_db')) {\n\t\t\t\t$host = self::Config('mysql_host');\n\t\t\t\t$user = self::Config('mysql_user');\n\t\t\t\t$pass = self::Config('mysql_password');\n\t\t\t\t$name = self::Config('mysql_dbname');\n\t\t\t\tDBManager::init($host, $user, $pass, $name);\n\t\t\t}\n\t\t}",
"function createDatabaseStructure($wipe_out = false) {\n\t\tglobal $wpdb;\n\t\t$tables = array($this->get_wpdb_prefix().'course_meta' =>\n\t\t\t\t\t\t\t\t\t'CREATE TABLE {table_name} (\n \t\t\t\t\t\t\t\t\t`cat_id` int(11) NOT NULL,\n \t\t\t\t\t\t\t\t\t`is_course` tinyint(1) DEFAULT 0,\n \t\t\t\t\t\t\t\t\t`access_type` tinyint(1) DEFAULT 0,\n \t\t\t\t\t\t\t\t\t`advertise` tinyint(1) DEFAULT 0,\n \t\t\t\t\t\t\t\t\t`is_closed` tinyint(1) DEFAULT 0,\n \t\t\t\t\t\t\t\t\tPRIMARY KEY (`cat_id`), UNIQUE(`cat_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;',\n \t\t\t\t\t\t\t\t$this->get_wpdb_prefix().'templates' =>\n\t\t\t\t\t\t\t\t\t'CREATE TABLE {table_name} (\n \t\t\t\t\t\t\t\t\t`id` int(11) NOT NULL AUTO_INCREMENT,\n \t\t\t\t\t\t\t\t\t`name` VARCHAR(250),\n \t\t\t\t\t\t\t\t\t`content` TEXT,\n \t\t\t\t\t\t\t\t\t`date` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\n \t\t\t\t\t\t\t\t\tPRIMARY KEY (`id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;',\n \t\t\t\t\t\t\t\t$this->get_wpdb_prefix().'students' =>\n \t\t\t\t\t\t\t\t\t'CREATE TABLE {table_name} (\n \t\t\t\t\t\t\t\t\t`id` int(11) NOT NULL AUTO_INCREMENT,\n \t\t\t\t\t\t\t\t\t`first_name` varchar(50) DEFAULT NULL,\n \t\t\t\t\t\t\t\t\t`last_name` varchar(50) DEFAULT NULL,\n \t\t\t\t\t\t\t\t\t`blog_url` text,\n \t\t\t\t\t\t\t\t\t`email` varchar(250) DEFAULT NULL,\n \t\t\t\t\t\t\t\t\tPRIMARY KEY (`id`), UNIQUE(`email`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;',\n \t\t\t\t\t\t\t\t$this->get_wpdb_prefix().'invitations' => 'CREATE TABLE {table_name} (\n \t\t\t\t\t\t\t\t\t`ID` int(11) NOT NULL AUTO_INCREMENT,\n \t\t\t\t\t\t\t\t\t`cat_id` int(11) NOT NULL,\n \t\t\t\t\t\t\t\t\t`invite_key` varchar(10) DEFAULT NULL,\n \t\t\t\t\t\t\t\t\t`expire_time` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\n \t\t\t\t\t\t\t\t\t`new_student_email` VARCHAR(250) NOT NULL,\n \t\t\t\t\t\t\t\t\tPRIMARY KEY (`ID`),\n \t\t\t\t\t\t\t\t\tFOREIGN KEY (`cat_id`)\n \t\t\t\t\t\t\t\t\tREFERENCES `'.$this->get_wpdb_prefix().'course_meta` (`cat_id`) ON DELETE CASCADE)\n \t\t\t\t\t\t\t\t\tENGINE=InnoDB DEFAULT CHARSET=utf8;',\n \t\t\t\t\t\t\t\t$this->get_wpdb_prefix().'subscriptions' =>\n \t\t\t\t\t\t\t\t\t'CREATE TABLE {table_name} (\n\t\t\t\t\t\t\t\t `id` int(11) NOT NULL AUTO_INCREMENT,\n\t\t\t\t\t\t\t\t `cat_id` int(11) NOT NULL,\n\t\t\t\t\t\t\t\t `student_id` int(11) NOT NULL,\n\t\t\t\t\t\t\t\t `status` tinyint(1) DEFAULT 0,\n\t\t\t\t\t\t\t\t `accept_key` char(10) DEFAULT NULL,\n\t\t\t\t\t\t\t\t `message` text,\n\t\t\t\t\t\t\t\t PRIMARY KEY (`id`),\n\t\t\t\t\t\t\t\t UNIQUE KEY(`cat_id`,`student_id`),\n\t\t\t\t\t\t\t\t FOREIGN KEY (`cat_id`) REFERENCES `'.$this->get_wpdb_prefix().'course_meta` (`cat_id`) ON DELETE CASCADE,\n\t\t\t\t\t\t\t\t FOREIGN KEY (`student_id`) REFERENCES `'.$this->get_wpdb_prefix().'students` (`id`) ON DELETE CASCADE\n\t\t\t\t\t\t\t\t) ENGINE=InnoDB DEFAULT CHARSET=utf8;',\n\t\t\t\t\t\t\t\t$this->get_wpdb_prefix().'teachers' => 'CREATE TABLE `{table_name}` (\n\t\t\t\t\t\t\t\t `id` int(11) NOT NULL AUTO_INCREMENT,\n\t\t\t\t\t\t\t\t `cat_id` int(11) NOT NULL,\n\t\t\t\t\t\t\t\t `wp_user_id` bigint(20) unsigned NOT NULL,\n\t\t\t\t\t\t\t\t PRIMARY KEY (`id`),\n\t\t\t\t\t\t\t\t UNIQUE KEY `cat_id` (`cat_id`,`wp_user_id`),\n\t\t\t\t\t\t\t\t KEY `wp_user_id` (`wp_user_id`),\n\t\t\t\t\t\t\t\t FOREIGN KEY (`cat_id`) REFERENCES `'.$this->get_wpdb_prefix().'course_meta` (`cat_id`) ON DELETE CASCADE\n\t\t\t\t\t\t\t\t) ENGINE=InnoDB DEFAULT CHARSET=utf8;',\n\t\t\t\t\t\t\t\t$this->get_wpdb_prefix().'student_groups' => 'CREATE TABLE `{table_name}` (\n\t\t\t\t\t\t\t\t `id` int(11) NOT NULL AUTO_INCREMENT,\n\t\t\t\t\t\t\t\t `student_id` int(11) NOT NULL,\n\t\t\t\t\t\t\t\t `group_name` varchar(250) DEFAULT NULL,\n\t\t\t\t\t\t\t\t `group_key` char(32) DEFAULT NULL,\n\t\t\t\t\t\t\t\t `type` tinyint(1) DEFAULT 0,\n\t\t\t\t\t\t\t\t PRIMARY KEY (`id`),\n\t\t\t\t\t\t\t\t UNIQUE KEY (`student_id`,`group_key`),\n\t\t\t\t\t\t\t\t FOREIGN KEY (`student_id`) REFERENCES `'.$this->get_wpdb_prefix().'students` (`id`)\n\t\t\t\t\t\t\t\t) ENGINE=InnoDB DEFAULT CHARSET=utf8;');\n\t\tif($wipe_out) {\n\t\t\t$wpdb->query('SET FOREIGN_KEY_CHECKS = 0;');\n\t\t}\n\t\tforeach($tables as $table_name => $query) {\n\t\t\t//IF table doesn't exist, create it\n\t\t\tif(!$wipe_out) {\n\t\t\t\tif($wpdb->get_var('SHOW TABLES LIKE \"'.$table_name.'\"') != $table_name) {\n\t\t\t\t\trequire_once(ABSPATH.'wp-admin/includes/upgrade.php');\n\t\t\t\t\t$query = str_replace('{table_name}', $table_name, $query);\n\t\t\t\t\tdbDelta($query);\n\t\t\t\t\t//echo $query;\n\t\t\t\t} else {\n\t\t\t\t\t//Update course_meta table and add extra column, if doesnt exist\n\t\t\t\t\t//TODO This will be removed in public release\n\t\t\t\t\tif($table_name == $this->get_wpdb_prefix().'course_meta') {\n\t\t\t\t\t\tif(!$wpdb->get_col('SELECT advertise FROM '.$table_name)) {\n\t\t\t\t\t\t\t$wpdb->query('ALTER TABLE '.$table_name.' ADD advertise TINYINT(1) DEFAULT 0');\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(!$wpdb->get_col('SELECT is_closed FROM '.$table_name)) {\n\t\t\t\t\t\t\t$wpdb->query('ALTER TABLE '.$table_name.' ADD is_closed TINYINT(1) DEFAULT 0');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$wpdb->query('DROP TABLE '.$table_name);\n\t\t\t}\n\t\t}\n\t\t//Revert foreign key check to 1\n\t\tif($wipe_out) {\n\t\t\t$wpdb->query('SET FOREIGN_KEY_CHECKS = 1;');\n\t\t}\n\t}",
"public function run()\n {\n db::truncate();\n foreach ([\n 'NP'=>'Draft','NJ'=>'Pending',\n 'CN'=>'Cancle','AJ'=>'Assigned',\n 'JC'=>'Evaluate','SC'=>'Success',\n ] as $key=>$value) {\n db::create([\n 'id'=>$key,\n 'name'=>$value\n ]);\n }\n }",
"function createDatabase(){\r\n $servername = \"localhost\";\r\n $username = \"root\";\r\n $password = \"\";\r\n \r\n // Create connection\r\n $conn = new mysqli($servername, $username, $password);\r\n \r\n // Check connection\r\n if ($conn->connect_error) {\r\n die(\"Connection failed: \" . $conn->connect_error);\r\n }\r\n \r\n // Create database\r\n $sql = \"CREATE DATABASE IF NOT EXISTS myDB;\";\r\n if ($conn->query($sql) === FALSE) {\r\n echo \"Error creating database: \" . $conn->error. \"<br>\";\r\n }\r\n $conn->close();\r\n setUp();\r\n}",
"function create_db3 () {\n\t\tglobal $wpdb;\n\t\t$create_query = 'CREATE TABLE `duotive_sidebars` (\n\t\t\t\t\t\t\t`ID` INT NOT NULL AUTO_INCREMENT ,\n\t\t\t\t\t\t\t`NAME` TEXT NOT NULL ,\n\t\t\t\t\t\t\t`DESCRIPTION` TEXT NOT NULL,\n\t\t\t\t\t\t\tPRIMARY KEY ( `ID` )\n\t\t\t\t\t\t) ENGINE = MYISAM ;\n\t\t\t\t\t\t';\n\t\t$create = $wpdb->get_results($create_query);\n\t}",
"public function migrateDb();",
"public function create() {\n\t\t$columns = implode(', ', array_keys($this->params));\n\t\t$bindings = substr(str_repeat(', ?', count($this->params)), 2);\n\t\t$sql = 'INSERT INTO ' . static::$table . ' (' . $columns . ') VALUES (' . $bindings . ');';\n\t\t$query = DBH()->prepare($sql);\n\t\t$query->execute(array_values($this->params));\n\t}",
"public function initDB() {\n\t\t$field = $this->factory->createILubFieldDefinition();\n\t\t$field->initDB();\n\t}",
"function db_startup(){\n\t\n\t}",
"public function createDatabase()\n {\n /** @var \\Shopware\\Components\\Model\\ModelManager $em */\n $em = $this->get('models');\n $tool = new \\Doctrine\\ORM\\Tools\\SchemaTool($em);\n\n $classes = [\n $em->getClassMetadata('Shopware\\CustomModels\\CustomSort\\ArticleSort'),\n ];\n\n try {\n $tool->createSchema($classes);\n } catch (\\Doctrine\\ORM\\Tools\\ToolsException $e) {\n //\n }\n }",
"static function create_temp_db() {\n\t\t$dbConn = DB::getConn();\n\t\t$dbname = 'tmpdb' . rand(1000000,9999999);\n\t\twhile(!$dbname || $dbConn->databaseExists($dbname)) {\n\t\t\t$dbname = 'tmpdb' . rand(1000000,9999999);\n\t\t}\n\t\t\n\t\t$dbConn->selectDatabase($dbname);\n\t\t$dbConn->createDatabase();\n\n\t\t$dbadmin = new DatabaseAdmin();\n\t\t$dbadmin->doBuild(true, false, true);\n\t\t\n\t\treturn $dbname;\n\t}",
"function install() {\n\t\t\n\t\t$con = mysql_connect(HOST,USERNAME,PASSWORD)\n\t\t\tor die(\"<p>Error connecting to database: \" . mysql_error() . \"</p>\");\n\t\t$db = new new_db; \n\t\t$db->createTables();\n\t\t\n\t\t}",
"function createDBTables() {\n $installer = new TrelloInstaller();\n return $installer->install();\n }",
"private function initializeStorage(): void\n\t{\n\t\t$this->connection->query('\n\t\t\tCREATE TABLE IF NOT EXISTS ticket (\n\t\t\t\tid INTEGER PRIMARY KEY AUTOINCREMENT,\n\t\t\t\tclient_id TEXT NOT NULL,\n\t\t\t\tcreated TEXT,\n\t\t\t\tdeposit TEXT,\n\t\t\t\trate TEXT\t\t\t\t\n\t\t\t);\n\t\t');\n\n\t\t$this->connection->query('\n\t\t\tCREATE TABLE IF NOT EXISTS ticket_item (\n\t\t\t\tid INTEGER PRIMARY KEY AUTOINCREMENT,\n\t\t\t\tticket_id INTEGER NOT NULL,\n\t\t\t\tname TEXT,\n\t\t\t\ttip TEXT,\n\t\t\t\tstatus TEXT,\n\t\t\t\trate TEXT,\t\t\n\t\t\t\tdate_time TEXT\t\t\t\t\n\t\t\t);\n\t\t');\n\t}",
"private function createDBTables(){\n\t\tif (!$this['db']->getSchemaManager()->tablesExist('bookings')){\n\t\t\t$this['db']->executeQuery(\"CREATE TABLE bookings (\n\t\t\t\tid INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,\n\t\t\t\tfirstName VARCHAR(40) NOT NULL,\n\t\t\t\tlastName VARCHAR(40) NOT NULL,\n\t\t\t\tphone VARCHAR(10) NOT NULL,\n\t\t\t\temail VARCHAR(20) DEFAULT NULL,\n\t\t\t\tbirthday DATE NOT NULL,\n\t\t\t\tstartDate DATE NOT NULL,\n\t\t\t\tendDate DATE NOT NULL,\n\t\t\t\tarrivalTime TIME DEFAULT NULL,\n\t\t\t\tadditionalInformation TEXT,\n\t\t\t\tnrOfPeople INT NOT NULL,\n\t\t\t\tpayingMethod VARCHAR(10) NOT NULL\n\t\t\t\t);\");\n\t\t}\n\t}",
"function configure_db() {\n //Old data is deleted before adding the new db structure\n $db = DB::getInstance();\n //$file = new File(CORE_INSTALLER_FILES_PATH.'/db/init.sql', 'r');\n if(!$db->query(file_get_contents(CORE_INSTALLER_FILES_PATH.'/db/init.sql'))->error()) {\n return true;\n }\n return false;\n}",
"protected function seedDatabase()\n {\n //$this->app->make('db')->table(static::TABLE_NAME)->delete();\n\n TestExtendedModel::create([\n 'unique_field' => '999',\n 'second_field' => null,\n 'name' => 'unchanged',\n 'active' => true,\n 'hidden' => 'invisible',\n ]);\n\n TestExtendedModel::create([\n 'unique_field' => '1234567',\n 'second_field' => '434',\n 'name' => 'random name',\n 'active' => false,\n 'hidden' => 'cannot see me',\n ]);\n\n TestExtendedModel::create([\n 'unique_field' => '1337',\n 'second_field' => '12345',\n 'name' => 'special name',\n 'active' => true,\n 'hidden' => 'where has it gone?',\n ]);\n }",
"protected function initDB() {\r\n\r\n $qry = $this->getMain()->getDatabase()->get(\"*\", [\"table\" => \"Games\", \"name\" => $this->getName()]);\r\n\r\n if($qry instanceof \\SQLite3Result) {\r\n\r\n if($qry->num_rows == 0) { // Game not initiated in the db.\r\n\r\n $id = $this->getMain()->getDatabase()->get(\"*\", [\"table\" => \"Games\"]);\r\n\r\n $v3 = $this->getLevel()->getSafeSpawn();\r\n\r\n $v3Ser = $v3->x . \",\" . $v3->y . \",\" . $v3->z; // V32String\r\n\r\n $this->getMain()->getDatabase()->insert(\"Games\", [$this->getName(), $v3Ser, $v3Ser, $this->getMain()->getMaxPlayers(), $this->getMain()->getWaitTime(), $this->getMain()->getSeekTime(), $this->getMain()->getSeekersPercentage(), $id->num_rows+1]); // Inserting the db with new queries\r\n\r\n }\r\n\r\n } else {\r\n\r\n throw new \\Exception(\"Could not contact database.\");\r\n\r\n }\r\n\r\n }",
"public static function setup_db()\r\n {\r\n $installed_ver = get_option( CART_CONVERTER . \"_db_version\" );\r\n\r\n // prevent create table when re-active plugin\r\n if ( $installed_ver != CART_CONVERTER_DB_VERSION ) {\r\n CartModel::setup_db();\r\n EmailModel::setup_db();\r\n //MailTemplateModel::setup_db();\r\n \r\n add_option( CART_CONVERTER . \"_db_version\", CART_CONVERTER_DB_VERSION );\r\n }\r\n }",
"function create_civ_db() {\n\tglobal $wpdb;\n\t$table_name = $wpdb->prefix . 'civ_slider';\n\n\t$sql = \"create table $table_name(\n id INT NOT NULL AUTO_INCREMENT, \n PRIMARY KEY(id),\n post_id int,\n img_order INT)\";\n\n\t$wpdb->query(\n\t\t'create table $table_name(\n\t id INT NOT NULL AUTO_INCREMENT, \n\t PRIMARY KEY(id),\n\t post_id int,\n\t img_order INT)' \n\t);\n}",
"public function setupDatabase()\n {\n exec('rm ' . storage_path() . '/testdb.sqlite');\n exec('cp ' . 'database/database.sqlite ' . storage_path() . '/testdb.sqlite');\n }",
"function setupDb(&$mdb2)\n{\n // loading the Manager module\n $mdb2->loadModule('Manager');\n $tableDefinition = array (\n 'id' => array (\n 'type' => 'integer',\n 'unsigned' => 1,\n 'notnull' => 1,\n 'default' => 0,\n ),\n 'name' => array (\n 'type' => 'text',\n 'length' => 300,\n 'notnull' => 1\n ),\n 'type' => array (\n 'type' => 'text',\n 'length' => 300,\n 'notnull' => 1\n ),\n 'lifespan' => array (\n 'type' => 'integer',\n 'unsigned' => 1,\n 'notnull' => 1,\n 'default' => 0,\n ),\n );\n \n $tableConstraints = array (\n 'primary' => true,\n 'fields' => array (\n 'id' => array()\n )\n );\n $mdb2->dropTable('tbl_animals');\n $mdb2->createTable('tbl_animals', $tableDefinition);\n $mdb2->createConstraint('tbl_animals', 'primary_key', $tableConstraints);\n $mdb2->createSequence('primary_key');\n \n}",
"function chdb_create($pathname, $data)\n{\n}",
"public function run()\n {\n $this->cleanDatabase();\n\n factory(User::class, 50)->create();\n factory(Document::class, 30)->create();\n }",
"function initialize()\n {\n $sql = \"\n CREATE TABLE IF NOT EXISTS `config` (`key` varchar(255) NOT NULL, `value` text NOT NULL, PRIMARY KEY (`key`)) ENGINE=MyISAM DEFAULT CHARSET=utf8;\n CREATE TABLE IF NOT EXISTS `secureconfig` (`key` varchar(255) NOT NULL, `value` text NOT NULL, PRIMARY KEY (`key`)) ENGINE=MyISAM DEFAULT CHARSET=utf8;\n \";\n try {\n $db = Base_Database::getConnection();\n $db->exec($sql);\n } catch (PDOException $e) {\n error_log('Initialize Base_Config failed: ' . $e->getMessage());\n die(\"An error occurred creating the configuration tables\");\n }\n }",
"function initdb()\n\t{\n\n\t\t$sql = \"\n\t\t\tCREATE TABLE IF NOT EXISTS User\n\t\t\t(\n\t\t\t\tuid integer PRIMARY KEY NOT NULL AUTO_INCREMENT,\n\t\t\t\tmobile varchar(255),\n\t\t\t\tusername varchar(255),\n\t\t\t\tpassword varchar(255),\n\t\t\t\twxnumber varchar(255),\n\t\t\t\tlast_login_time varchar(255),\n\t\t\t\tlast_login_ip varchar(255)\n\t\t\t)\n\t\t\";\n\n\t\t$sql2 = \"\n\t\t\tCREATE TABLE IF NOT EXISTS Profile\n\t\t\t(\n\t\t\t\tuser_id integer,\n\t\t\t\tsex int,\n\t\t\t\tmyqrcode varchar(255),\n\t\t\t\tarea varchar(255),\n\t\t\t\tpersonsign varchar(255),\n\t\t\t\tvcode varchar(255),\n\t\t\t\thead_pic_url varchar(255)\n\t\t\t)\n\t\t\";\n\n\t\t$fkSql = \"\n\t\t\tALTER TABLE Profile ADD CONSTRAINT user_uid_fk FOREIGN KEY (user_id) REFERENCES User (uid)\n\t\t\";\n\n\t\tDb::execute($sql);\n\t\tDb::execute($sql2);\n\t\tDb::execute($fkSql);\n\n\t\treturn 0;\n\t}",
"function SetupDatabase(){\n\n\t\t$pdo = $this->db->prepare(\"CREATE TABLE IF NOT EXISTS \n\t\t\tcolors (\n\t\t\t\tcID int AUTO_INCREMENT PRIMARY KEY,\n\t\t\t\tred int(3) NOT NULL,\n\t\t\t\tgreen int(3) NOT NULL,\n\t\t\t\tblue int(3) NOT NULL,\n\t\t\t\ttime varchar(20) NOT NULL);\n\t\t\t\");\n\t\tif($pdo->execute()){\n\t\t\techo \"Table colors created. Populating table colors.<br>\";\n\t\t}\n\t\t$pdo = $this->db->prepare(\"INSERT INTO colors (red,green,blue,time) VALUES (?,?,?,?)\");\n\n\t\tif($pdo->execute(array(247,42,220,date(\"Y-m-d H:i:s\")))){\n\t\t\t# yes it is a manly pink, you got a problem with that?\n\t\t\techo \"Table colors populated. <br>\";\n\t\t}\n\n\t}",
"private function initializeDatabase()\n\t{\n\t\tConfiguration::updateValue('SEUR_URLWS_SP', 'https://ws.seur.com/WSEcatalogoPublicos/servlet/XFireServlet/WSServiciosWebPublicos?wsdl');\n\t\tConfiguration::updateValue('SEUR_URLWS_R', 'https://ws.seur.com/webseur/services/WSCrearRecogida?wsdl');\n\t\tConfiguration::updateValue('SEUR_URLWS_E', 'https://ws.seur.com/webseur/services/WSConsultaExpediciones?wsdl');\n\t\tConfiguration::updateValue('SEUR_URLWS_A', 'https://ws.seur.com/webseur/services/WSConsultaAlbaranes?wsdl');\n\t\tConfiguration::updateValue('SEUR_URLWS_ET', 'http://cit.seur.com/CIT-war/services/ImprimirECBWebService?wsdl');\n\t\tConfiguration::updateValue('SEUR_URLWS_M', 'http://cit.seur.com/CIT-war/services/DetalleBultoPDFWebService?wsdl');\n\n\t\t/* Global configuration */\n\t\tConfiguration::updateValue('SEUR_Configured', 0);\n\t\tConfiguration::updateValue('SEUR_PRINTER_NAME', 'Generic / Text Only');\n\t\tConfiguration::updateValue('SEUR_REMCAR_CARGO', 5.5);\n\t\tConfiguration::updateValue('SEUR_REMCAR_CARGO_MIN', 0);\n\n\t\tif (Context::getContext()->shop->isFeatureActive() == true)\n\t\t{\n\t\t\t$fields = '(`id_seur_configuration`, `international_orders`, `seur_cod`, `pos`, `notification_advice_radio`, `notification_distribution_radio`, `print_type`, `tarifa`, `pickup`, `advice_checkbox`, `distribution_checkbox`, `id_shop`)';\n\t\t\t$values = '(NULL, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1)';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$fields = '(`id_seur_configuration`, `international_orders`, `seur_cod`, `pos`, `notification_advice_radio`, `notification_distribution_radio`, `print_type`, `tarifa`, `pickup`, `advice_checkbox`, `distribution_checkbox`)';\n\t\t\t$values = '(NULL, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0)';\n\t\t}\n\n\t\t$seur_configuration = 'INSERT INTO `'._DB_PREFIX_.'seur_configuration` '.$fields.' VALUES '.$values.';';\n\n\t\t$seur_merchant = 'INSERT INTO `'._DB_PREFIX_.'seur_merchant`\n\t\t\t(`id_seur_datos`, `user`, `pass`, `cit`, `ccc`, `nif_dni`, `name`, `first_name`, `franchise`, `company_name`, `street_type`, `street_name`, `street_number`, `staircase`, `floor`, `door`, `post_code`, `town`, `state`, `country`, `phone`, `fax`, `email`)\n\t\t\tVALUES (NULL, \"USER\", \"PASS\", \"CCC\", \"CIT\", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);';\n\n\t\treturn Db::getInstance()->Execute($seur_configuration) && Db::getInstance()->Execute($seur_merchant);\n\t}",
"function initialize() {\n\n switch ($this->type) {\n case 'sqlite':\n $query[0] = 'CREATE TABLE `enrolled` (\n `sid` INTEGER PRIMARY KEY,\n `first` TEXT ,\n `last` TEXT);';\n\n $query[1] = 'CREATE TABLE `paid` (\n `sid` INTEGER PRIMARY KEY);';\n\n $query[2] = 'CREATE TABLE `admin` (\n `sid` INTEGER PRIMARY KEY);';\n\n $query[3] = 'CREATE TABLE `log` (\n `id` INTEGER PRIMARY KEY AUTOINCREMENT,\n `sid` TEXT,\n `event` TEXT,\n `status` TEXT,\n `timestamp` TEXT);';\n \n $query[4] = 'CREATE TABLE `stage` (\n `id` INTEGER PRIMARY KEY AUTOINCREMENT,\n `sid` TEXT,\n `last` TEXT,\n `first` TEXT,\n `dest` TEXT);';\n\t\t\t\t \n\t\t\t\t$query[5] = 'CREATE TABLE `guest` (\n `sid` INTEGER PRIMARY KEY);';\n\n\t\t\t\t \n break;\n\n case 'mysql':\n\n $query[0] = 'CREATE TABLE IF NOT EXISTS `enrolled` (\n `sid` INT NOT NULL ,\n `first` VARCHAR(45) NULL ,\n `last` VARCHAR(45) NULL ,\n PRIMARY KEY (`sid`) );\n ENGINE = InnoDB;';\n\n $query[1] = 'CREATE TABLE IF NOT EXISTS `paid` (\n `sid` INT NOT NULL ,\n PRIMARY KEY (`sid`) )\n ENGINE = InnoDB;';\n\n $query[2] = 'CREATE TABLE IF NOT EXISTS `admin` (\n `sid` INT NOT NULL ,\n PRIMARY KEY (`sid`) )\n ENGINE = InnoDB;';\n\n $query[3] = 'CREATE TABLE IF NOT EXISTS `log` (\n `id` INT NOT NULL ,\n `sid` VARCHAR(45) NULL ,\n `status` VARCHAR(45) NULL,\n `event` VARCHAR(45) NULL ,\n `timestamp` DATETIME NULL ,\n PRIMARY KEY (`id`) )\n ENGINE = InnoDB;';\n\n break;\n\n default:\n throw new Exception($this->type . \" is not a valid database type.\");\n break;\n\n }\n\n foreach ($query as $insert) {\n $this->query($insert);\n }\n \n /**\n * Integrity Checking goes here\n */\n \n }",
"public function setUpDatabaseTables()\n {\n $table = new DModuleTable();\n $table -> setName(\"currencies\");\n $table -> addBigIncrements( \"id\" , true );\n $table -> addString( \"base\" , true);\n $table -> addLongText( 'rates' , true);\n $table -> addDateTime( 'added' , true );\n $table -> addBoolean( 'status' , true);\n $table -> addString( \"extra\" , false);\n $table -> addString( \"extra2\" , false);\n $this -> addTable( $table );\n }",
"public static function createDB($dbname) {\n\t\t\t$query = \"CREATE DATABASE IF NOT EXISTS `campDiaries`\";\n\t\t\tself::$db = DB::query($query);\n\t\t\t$select_db = mysqli_select_db(self::$con, 'campDiaries');\n\n\t\t\t//create tables\n\t\t\t$query = \"CREATE TABLE IF NOT EXISTS `users_test` (\n\t\t\t`userid` TINYINT(3) NOT NULL AUTO_INCREMENT,\n\t\t\t`username` VARCHAR(50) NOT NULL ,\n\t\t\t`password` VARCHAR(12) NOT NULL ,\n\t\t\t`age` TINYINT(2),\n\t\t\tPRIMARY KEY (`userid`)\";\n\t\t\tDB::query($query);\n\t\t}",
"function createDB() {\r\n\t\t\r\n\t\tif( $this->state != 1 ) return false;\r\n\t\t\r\n\t\tglobal $dbName;\r\n\t\t$r = mysql_query( \"CREATE DATABASE `$dbName` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;\" );\r\n\t\t$this->connect();\r\n\t\t\r\n\t\treturn $r;\r\n\t}",
"public function seed()\n\t{\n\t\t$this->createDataType();\n\t\t$this->createDataRowForColumns();\n\t}",
"public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n User::truncate();\n Employee::truncate();\n Company::truncate();\n\n $userQuantity = 200;\n $companiesQuantity = 100;\n $employeesQuantity = 100;\n\n factory(User::class, $userQuantity)->create();\n factory(Company::class, $companiesQuantity)->create();\n factory(Employee::class, $employeesQuantity)->create();\n }",
"public function __construct(){\n \n $this->create_tables();\n \n }",
"function init_tables(){\n $db = new PDO('sqlite:history.pyramid.sqlite');\n $db->exec(\"PRAGMA foreign_keys = ON\");\n $db->exec(\"drop table if exists areas\");\n $db->exec(\"drop table if exists codigos\");\n $db->exec(\"drop table if exists outs\");\n $db->exec(\"CREATE TABLE Areas (\n Id INTEGER PRIMARY KEY,\n out_date DATETIME DEFAULT CURRENT_TIMESTAMP,\n name TEXT,\n target INTEGER);\");\n $db->exec(\"CREATE TABLE codigos (\n Id INTEGER PRIMARY KEY,\n out_date DATETIME DEFAULT CURRENT_TIMESTAMP,\n name TEXT,\n target INTEGER);\");\n $db->exec(\"CREATE TABLE outs (\n Id INTEGER PRIMARY KEY,\n out_date DATETIME DEFAULT CURRENT_TIMESTAMP,\n name TEXT,\n target INTEGER);\");\n}",
"protected function initDatabase() {\n\t\t$this->config\t\t= new Config();\n\t\tDatabase::$host\t\t= $this->config->host;\n\t\tDatabase::$username\t= $this->config->username;\n\t\tDatabase::$password\t= $this->config->password;\n\t\tDatabase::$dbname\t= $this->config->dbname;\n\t}",
"function fillTable(): void\n{\n $sql = '\n SET autocommit=0; \n SET unique_checks=0;\n SET foreign_key_checks=0;\n INSERT INTO `products` (name, price, color) VALUES ' . generateTableData(1000001) . ';\n SET unique_checks=1;\n SET foreign_key_checks=1;\n COMMIT;\n ';\n\n DB::getInstance()->query($sql);\n}",
"protected function setUpTestDatabase() {}",
"function initDb()\n {\n global $database_host, $database_name, $database_user,$database_pass;\n\n $global=Frd::getGlobal();\n\n $db_config=array(\n 'host'=>$database_host,\n 'username'=>$database_user,\n 'password'=>$database_pass,\n 'dbname'=>$database_name\n );\n\n $db = Zend_Db::factory('pdo_mysql',$db_config);\n $db->query('set names utf8');\n Zend_Db_Table::setDefaultAdapter($db);\n $global->db=$db;\n\n $registry = Zend_Registry::getInstance();\n $registry->set(\"db_default\",$global->db);\n }"
] | [
"0.8169389",
"0.7550411",
"0.7463847",
"0.7422999",
"0.7405907",
"0.7302313",
"0.7281049",
"0.72488004",
"0.71930254",
"0.70953226",
"0.70805126",
"0.6987519",
"0.69793123",
"0.697648",
"0.69717646",
"0.69703853",
"0.69407576",
"0.68653405",
"0.6842097",
"0.68331635",
"0.6791636",
"0.6769326",
"0.6760727",
"0.67587024",
"0.6742074",
"0.670338",
"0.66282445",
"0.66230285",
"0.6613919",
"0.6592202",
"0.65797555",
"0.656198",
"0.6533218",
"0.6532972",
"0.6532584",
"0.6525612",
"0.65225613",
"0.6520762",
"0.6508021",
"0.6505306",
"0.64979017",
"0.6491156",
"0.64807713",
"0.64799964",
"0.64544386",
"0.64487904",
"0.6446885",
"0.64152277",
"0.64140075",
"0.6412504",
"0.6406613",
"0.64014435",
"0.64006925",
"0.63984233",
"0.6384773",
"0.63844025",
"0.63816553",
"0.6373492",
"0.63680637",
"0.63547707",
"0.634715",
"0.6342613",
"0.63421494",
"0.6328897",
"0.6313173",
"0.6311151",
"0.63068837",
"0.6304211",
"0.6294715",
"0.6291535",
"0.62899",
"0.6288799",
"0.62872624",
"0.6284888",
"0.62824553",
"0.6267348",
"0.6253823",
"0.6243541",
"0.62419105",
"0.62404746",
"0.62268734",
"0.6221447",
"0.6220398",
"0.62137425",
"0.62119615",
"0.6209514",
"0.62093395",
"0.620906",
"0.620639",
"0.6204455",
"0.6200107",
"0.6185842",
"0.61848164",
"0.6183571",
"0.6176851",
"0.61712664",
"0.61701274",
"0.61694515",
"0.6168635",
"0.61660445",
"0.6163617"
] | 0.0 | -1 |
Determine if the user is authorized to make this request. | public function authorize()
{
if ($this->user && ($this->user->hasPermission('manage_pages_contents') ) ) {
return true;
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function authorize()\n {\n if ($this->user() !== null) {\n return true;\n }\n return false;\n }",
"public function authorize()\n {\n return $this->user() !== null;\n }",
"public function authorize()\n {\n return $this->user() !== null;\n }",
"public function authorize()\n {\n return $this->user() != null;\n }",
"public function authorize(): bool\n {\n return $this->user() !== null;\n }",
"public function authorize(): bool\n {\n return $this->isUserAuthorised();\n }",
"public function authorize()\n {\n return !is_null($this->user());\n }",
"public function authorize()\n {\n return request()->user() != null;\n }",
"public function authorize()\n\t{\n\t\t// if user is updating his profile or a user is an admin\n\t\tif( $this->user()->isSuperAdmin() || !$this->route('user') ){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public function authorize()\n {\n // this was my best guess\n return $this->user()->id === $this->route('user')->id;\n }",
"public function isAuthorized()\n {\n return $this->cookieHelper->requestCookieExists('auth');\n }",
"public function authorize()\n {\n return !empty(Auth::user()) && ($this->user()->isAnAdmin() || $this->user()->hasRole('user'));\n }",
"public function authorize()\n {\n $originAccount = Account::find($this->get('origin_account_id'));\n return $originAccount->user_id == auth()->id();\n }",
"public function authorize()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default:\n return $this->user()->type == 'App\\\\Staff' ? true : false;\n break;\n }\n\n return false;\n }",
"public function authorize()\n {\n if($this->user()->role == \"admin\" || $this->user()->id == $this->request->get('author_id')) return true;\n else return false;\n }",
"public function authorize()\n {\n if(\\Auth::guest())\n {\n return false;\n } else {\n // Action 1 - Check if authenticated user is a superadmin\n if(\\Auth::User()->hasRole('superadmin'))\n return true;\n\n // Action 2 - Find UUID from request and compare to authenticated user\n $user = User::where('uuid', $this->user_uuid)->firstOrFail();\n if($user->id == \\Auth::User()->id)\n return true;\n\n // Action 3 - Fail request\n return false;\n }\n }",
"public function authorize()\n {\n $this->model = $this->route('user');\n\n $this->model = is_null($this->model) ? User::class : $this->model;\n\n return $this->isAuthorized();\n }",
"public function isAuthorized(): bool\n {\n // TODO: implement authorization check\n\n return true;\n }",
"public function isAuthorized() {}",
"public function authorize()\n {\n return request()->loggedin_role === 1;\n }",
"public function authorize()\n {\n $this->model = $this->route('user');\n\n if ($this->isEdit() && !is_null($this->model)) {\n if (!user()->hasPermissionTo('Administrations::admin.user') && $this->model->id != user()->id) {\n return false;\n }\n }\n\n $this->model = is_null($this->model) ? User::class : $this->model;\n\n return $this->isAuthorized();\n }",
"public function authorize()\n {\n $accessor = $this->user();\n\n return $accessor->isAdmin() || $accessor->hasKey('post-users');\n }",
"public function authorize()\n {\n $user = \\Auth::getUser();\n\n return $user->user_type == 1;\n }",
"public function authorize()\n {\n return auth()->check() ? true : false;\n }",
"public function authorize()\n {\n return auth()->check() ? true : false;\n }",
"public function authorize()\n {\n /**\n * @var User $user\n * @var Document $document\n */\n $user = Auth::user();\n $document = $this->route('document');\n\n return (int)$user->id === (int)$document->user_id;\n }",
"public function authorize()\n {\n switch (true) {\n case $this->wantsToList():\n case $this->wantsToShow():\n if ($this->hasRoles(['owner', 'administrator'])) {\n return true;\n }\n break;\n case $this->wantsToStore():\n case $this->wantsToUpdate():\n case $this->wantsToDestroy():\n if ($this->hasRoles(['owner'])) {\n return true;\n }\n break;\n }\n\n return false;\n }",
"public function authorize()\n {\n $user = JWTAuth::parseToken()->authenticate();\n $organisation = Organization::findOrFail($this->route('organizations'));\n return $organisation->admin_id == $user->id;\n }",
"public function authorize()\n {\n if($this->user()->isAdmin())\n return true;\n\n return false;\n }",
"function isAuthorized()\n {\n $authorized = parent::isAuthorized();\n return $authorized;\n }",
"public function authorize()\n {\n $user = auth('web')->user();\n if ($user && $user->active) {\n return true;\n }\n\n return false;\n }",
"public function authorize()\n {\n $this->user = User::query()->find($this->route()->parameter('user'));\n $this->merge(['verified' => $this->get('verified') ? 1 : 0]);\n\n return true;\n }",
"public function authorize()\n {\n $user = request()->user('api');\n return $user->isSenior();\n }",
"public function authorize()\n {\n return is_client_or_staff();\n }",
"public function isAuthorized() {\n\t\treturn true;\n\t}",
"public function authorize()\n {\n switch ($this->method()) {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }",
"public function authorize()\n {\n switch ($this->method()) {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }",
"public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin'])) {\n return true;\n } else {\n return false;\n }\n }",
"public function isAuthorized()\n\t{\n\t\t$sessionVal = Yii::$app->session->get($this->sessionParam);\n\t\treturn (!empty($sessionVal));\n\t}",
"public function authorize() {\n\n return auth()->user() && auth()->user()->username === $this->user->username;\n }",
"public function authorize()\n {\n return session('storefront_key') || request()->session()->has('api_credential');\n }",
"public function authorize()\n {\n if ($this->user()->isAdmin($this->route('organization'))) {\n return true;\n }\n\n return false;\n\n }",
"public function authorize()\n {\n return $this->user() && $this->user()->role === Constants::USER_ROLE_ADMIN;\n }",
"public function authorized()\n {\n return $this->accepted && ! $this->test_mode;\n }",
"public function authorize()\n {\n if (!auth()->check()) {\n return false;\n }\n return true;\n }",
"public function hasAuthorized() {\n return $this->_has(1);\n }",
"public function authorize()\n {\n $resource = Resource::find($this->route('id'));\n\n if (!$resource) {\n return true;\n }\n\n return $resource && $this->user()->can('access', $resource);\n }",
"public function authorize()\n {\n /*\n if ($this->loan_id && is_numeric($this->loan_id) && $loan = Loan::whereId($this->loan_id)->first()) {\n // loan_id belongs to requesting user\n return $loan && $this->user()->id == $loan->user_id;\n }\n */\n return true; // let rules handle it\n }",
"public function authorize()\n {\n //TODO Authorice Request (without Controller)\n return auth()->user()->role_id === 1;\n }",
"public function authorize(): bool\n {\n return $this->user()->id === $this->article->user->id;\n }",
"public function authorize()\n {\n return $this->user()->rol == 'admin' ? true : false;\n }",
"public function isAuth()\n {\n return $this->session->hasAuthorisation();\n }",
"public function authorize()\n {\n if(Auth::user())\n {\n return true;\n }\n else\n {\n return false;\n }\n }",
"public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin', 'hrmanager', 'hruser'])) {\n return true;\n } else {\n return false;\n }\n }",
"public function authorize()\n {\n return \\Auth::check() ? true : false;\n }",
"public function authorize()\n\t{\n\t\treturn true; //no user checking\n\t}",
"public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }",
"public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }",
"public function authorize()\n {\n return !empty(Auth::user());\n }",
"public function authorize()\n {\n return $this->groupHasUser() || $this->hasSeller();\n }",
"public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}",
"public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}",
"public function isAuthorized() {\n\t\t\n\t}",
"public function authorize()\n {\n if(Auth::check())\n {\n return (Auth::user()->has_world_admin_access);\n }\n return false;\n }",
"public function authorize()\n {\n if (!\\Auth::guest()) {\n $user = \\Auth::getUser();\n if ($user->type == User::USER_TYPE_ADMIN) {\n return true;\n }\n }\n\n return false;\n }",
"public function authorize()\n {\n if (auth()->user()->is_admin) {\n return true;\n }\n return false;\n }",
"public function authorize()\n {\n if ($this->user()->is_admin){\n return true;\n }\n else if ($this->method == \"PUT\"){\n if ($this->user()->id == $this->input('id')){\n return true;\n }\n }\n return false;\n }",
"public function authorize(): bool\n {\n return parent::authorize() && (int)$this->playList->user_id === auth()->user()->id;\n }",
"public function authorize() {\n\t\treturn $this->user()->is_admin;\n\t}",
"public function authorize()\n {\n if (Auth::check()) {\n \n return true;\n \n }\n return false;\n }",
"public function authorize()\n {\n $user = Auth::user();\n return $user && $user->rol == 'admin';\n }",
"public function authorize()\n\t{\n\t\t// Nutzern akzeptiert werden\n\t\tif(Auth::check())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public function authorize()\n {\n // TODO: Check if has business\n return session()->has('id');\n }",
"public function authorize()\n {\n if (auth()->check() && auth()->user()->isAdmin()) {\n return true;\n }\n\n return false;\n }",
"public function authorize()\n {\n return $this->auth->check();\n }",
"public function authorize() {\n\t\t$user = \\Auth::user();\n\n\t\tif ( $user->isAdmin() ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public function authorize()\n {\n if (auth()->user()->isAdmin() || auth()->user()->isCustomer()) {\n return true;\n }\n return false;\n }",
"public function authorize()\n {\n return $this->container['auth']->check();\n }",
"function isAuthorized($request) {\n return true;\n }",
"public function authorize()\n {\n return Auth::guest() || isMember();\n }",
"public function authorize()\n {\n return auth()->user() && auth()->user()->isCeo();\n }",
"public function authorize(): bool\n {\n $deckId = $this->request->get('deck_id');\n $userId = Deck::whereKey($deckId)->value('user_id');\n\n return $userId === user()->id;\n }",
"public function authorize()\n {\n return Auth::check() && Auth::user()->is_contractor;\n }",
"public function authorize()\n {\n return TRUE;\n }",
"public function authorize()\n {\n $user = User::find($this->id);\n\n if (!$user) {\n $user = User::where('no_ahli', $this->no_ahli)->first();\n }\n if ($user && $user->id == auth()->user()->id) return true;\n if (auth()->user()->is('admin')) return true;\n\n return false;\n }",
"public function authorize()\n {\n # if it's false, it will rejected\n return true;\n }",
"public function authorize()\n {\n $isValid = auth()->user()->is($this->route('task')->attempt->checklist->owner);\n\n return $isValid;\n }",
"public function authorize()\n {\n $user = Auth::user();\n\n return ($user->getRole() == 'admin');\n }",
"public function is_authorized() {\n\t\t$authorized = true;\n\t\tif ( $this->is_access_token_expired() ) {\n\t\t\t$authorized = false;\n\t\t}\n\n\t\treturn $authorized;\n\t}",
"public function authorize()\n {\n $user = User::findOrFail($this->route('id'));\n\n return $user->hasRole('admin') || $user->hasRole('teacher');\n }",
"public function authorize()\n {\n $project = \\App\\Project::find($this->request->get('project'));\n return $project && $project->isManager($this->user()->name);\n }",
"public function isAuthorized() {\n\t\treturn (bool)$this->_storage->hasData();\n\t}",
"public function authorize()\n {\n $idExpense = $this->input('expense');\n $expense = Expense::find($idExpense);\n\n return $expense && $this->user()->id == $expense->user_id;\n }",
"public function authorize()\n {\n // User system not implemented\n return true;\n }",
"public function authorize() : bool\n {\n // TODO check request to xhr in middleware\n return true;\n }",
"public function authorize()\n {\n $organizationId = (string) $this->route('id');\n\n $this->organization = Organization::findByUuidOrFail($organizationId);\n\n return $this->user()->can('show', [Organization::class, $this->organization]);\n }",
"public function authorize()\n {\n $user = $this->findFromUrl('user');\n return $this->user()->can('update', $user);\n }",
"public function authorize()\n {\n $user = Auth::user();\n $orderElement = OrderElement::find($this->input(\"order_element_id\"));\n $order = $orderElement->order;\n\n if ($user->id == $order->user_id) {\n return true;\n } else {\n return false;\n }\n }",
"public function authorize()\n {\n $current_user = auth()->user();\n $convention = Convention::find($this->route('convention_id'));\n\n // Use ClientPolicy here to authorize before checking the fields\n return $current_user->can('store', Convention::class)\n || $current_user->can('update', $convention);\n }",
"public function authorize()\n {\n if (session()->has('user'))\n {\n $participantController = new ParticipantController();\n\n return !$participantController->isParticipating($this->input('id_user'), $this->input('id_event'));\n }\n else\n {\n return false;\n }\n }",
"public function authorize()\n {\n return (Auth::user()->allowSuperAdminAccess || Auth::user()->allowAdminAccess);\n }"
] | [
"0.8401071",
"0.8377486",
"0.8377486",
"0.8344406",
"0.8253731",
"0.824795",
"0.8213121",
"0.8146598",
"0.81115526",
"0.8083369",
"0.7991986",
"0.79907674",
"0.79836637",
"0.79604936",
"0.79516214",
"0.79494005",
"0.79265946",
"0.7915068",
"0.79001635",
"0.7894822",
"0.7891453",
"0.7890965",
"0.7862504",
"0.78414804",
"0.78414804",
"0.7837965",
"0.78248763",
"0.7812292",
"0.7809632",
"0.77928597",
"0.7788316",
"0.7781619",
"0.77815884",
"0.7763308",
"0.7754035",
"0.7717961",
"0.7717961",
"0.77171147",
"0.77138597",
"0.7705001",
"0.7693082",
"0.7692783",
"0.76915383",
"0.76909506",
"0.76733255",
"0.7667128",
"0.7665592",
"0.7656238",
"0.7650853",
"0.764326",
"0.76431626",
"0.76431614",
"0.7635147",
"0.76311624",
"0.76294273",
"0.7627076",
"0.76207024",
"0.76207024",
"0.76139116",
"0.76036394",
"0.76035625",
"0.76035625",
"0.76032084",
"0.7602515",
"0.76007926",
"0.75971127",
"0.7588128",
"0.7586303",
"0.7581912",
"0.7563037",
"0.7554785",
"0.75526226",
"0.755171",
"0.75436753",
"0.75432944",
"0.7540682",
"0.7538806",
"0.75280696",
"0.751548",
"0.75149626",
"0.7501161",
"0.74959517",
"0.74956346",
"0.74911124",
"0.7489147",
"0.74858016",
"0.748033",
"0.7478443",
"0.7472642",
"0.7472576",
"0.7465409",
"0.7464371",
"0.74630046",
"0.7462218",
"0.7461453",
"0.7449168",
"0.74399257",
"0.74358094",
"0.7433247",
"0.7432659",
"0.74248093"
] | 0.0 | -1 |
Get the validation rules that apply to the request. | public function rules()
{
$rules = [
"pages" => 'required|array',
"pages.*" => 'required|exists:pages,id',
];
return $rules;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function rules()\n {\n $commons = [\n\n ];\n return get_request_rules($this, $commons);\n }",
"public function getRules()\n {\n return $this->validator->getRules();\n }",
"public function getValidationRules()\n {\n $rules = [];\n\n // Get the schema\n $schema = $this->getSchema();\n\n return $schema->getRules($this);\n }",
"public function rules()\n {\n return $this->validationRules;\n }",
"public function rules()\n {\n $rules = [];\n switch ($this->getMethod()):\n case \"POST\":\n $rules = [\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"PUT\":\n $rules = [\n 'id' => 'required|numeric',\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"DELETE\":\n $rules = [\n 'id' => 'required|numeric'\n ];\n break;\n endswitch;\n return $rules;\n }",
"public static function getRules()\n {\n return (new static)->getValidationRules();\n }",
"public function getRules()\n {\n return $this->validation_rules;\n }",
"public function getValidationRules()\n {\n return [];\n }",
"public function getValidationRules() {\n return [\n 'email' => 'required|email',\n 'name' => 'required|min:3',\n 'password' => 'required',\n ];\n }",
"public function rules()\n {\n if($this->isMethod('post')){\n return $this->post_rules();\n }\n if($this->isMethod('put')){\n return $this->put_rules();\n }\n }",
"public function rules()\n {\n $rules = [];\n\n // Validation request for stripe keys for stripe if stripe status in active\n if($this->has('stripe_status')){\n $rules[\"api_key\"] = \"required\";\n $rules[\"api_secret\"] = \"required\";\n $rules[\"webhook_key\"] = \"required\";\n }\n\n if($this->has('razorpay_status')){\n $rules[\"razorpay_key\"] = \"required\";\n $rules[\"razorpay_secret\"] = \"required\";\n $rules[\"razorpay_webhook_secret\"] = \"required\";\n }\n\n // Validation request for paypal keys for paypal if paypal status in active\n if($this->has('paypal_status')){\n $rules[\"paypal_client_id\"] = \"required\";\n $rules[\"paypal_secret\"] = \"required\";\n $rules[\"paypal_mode\"] = \"required_if:paypal_status,on|in:sandbox,live\";\n }\n\n\n return $rules;\n }",
"protected function getValidationRules()\n {\n $rules = [\n 'title' => 'required|min:3|max:255',\n ];\n\n return $rules;\n }",
"public function getRules()\n\t{\n\t\t$rules['user_id'] = ['required', 'exists:' . app()->make(User::class)->getTable() . ',id'];\n\t\t$rules['org_id'] = ['required', 'exists:' . app()->make(Org::class)->getTable() . ',id'];\n\t\t$rules['role'] = ['required', 'string', 'in:' . implode(',', Static::ROLES)];\n\t\t$rules['scopes'] = ['nullable', 'array'];\n\t\t$rules['ended_at'] = ['nullable', 'date'];\n\t\t$rules['photo_url'] = ['nullable', 'string'];\n\n\t\treturn $rules;\n\t}",
"public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n case 'PUT':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n }\n }",
"public function rules()\n {\n\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'min:6|same:password',\n 'role_id' => 'required'\n ];\n break;\n case 'PUT':\n case 'PATCH':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n\n default:\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n }\n return $rules;\n }",
"public function rules()\n {\n return $this->rules;\n }",
"public function rules()\n {\n return $this->rules;\n }",
"public function rules()\n {\n return $this->rules;\n }",
"public function rules()\n {\n return $this->rules;\n }",
"public function rules()\n {\n return $this->rules;\n }",
"public function rules()\n {\n return $this->rules;\n }",
"public function rules()\n {\n switch($this->method()) {\n case 'GET':\n return [];\n case 'POST':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'DELETE':\n return [];\n default:break;\n }\n \n }",
"public function rules($request) {\n $function = explode(\"@\", $request->route()[1]['uses'])[1];\n return $this->getRouteValidateRule($this->rules, $function);\n // // 获取请求验证的函数名\n // // ltrim(strstr($a,'@'),'@')\n // if (count(explode(\"@\", Request::route()->getActionName())) >= 2) {\n // $actionFunctionName = explode(\"@\", Request::route()->getActionName()) [1];\n // }\n\n // // 取配置并返回\n // if (isset($this->rules[$actionFunctionName])) {\n // if (is_array($this->rules[$actionFunctionName])) {\n // return $this->rules[$actionFunctionName];\n // }\n // else {\n // return $this->rules[$this->rules[$actionFunctionName]];\n // }\n // }\n // else {\n // return [];\n // }\n }",
"function getValidationRules() {\n\t\treturn array(\n\t\t\t'_MovieID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CountryID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_BroadCastDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t\t'_CreatedDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}",
"public function rules()\n {\n if ($this->method() === 'POST') {\n return $this->rulesForCreating();\n }\n\n return $this->rulesForUpdating();\n }",
"public function rules()\n {\n $validation = [];\n if ($this->method() == \"POST\") {\n $validation = [\n 'name' => 'required|unique:users',\n 'email' => 'required|unique:users|email',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'required|min:6',\n 'roles' => 'required',\n ];\n } elseif ($this->method() == \"PUT\") {\n $validation = [\n 'name' => 'required|unique:users,name,' . $this->route()->parameter('id') . ',id',\n 'email' => 'required|unique:users,email,' . $this->route()->parameter('id') . ',id|email',\n 'roles' => 'required',\n ];\n\n if ($this->request->get('change_password') == true) {\n $validation['password'] = 'required|min:6|confirmed';\n $validation['password_confirmation'] = 'required|min:6';\n }\n }\n\n return $validation;\n }",
"protected function getValidationRules()\n {\n $class = $this->model;\n\n return $class::$rules;\n }",
"public function rules()\n {\n $data = $this->request->all();\n $rules['username'] = 'required|email';\n $rules['password'] = 'required'; \n\n return $rules;\n }",
"public function rules()\n {\n $rules = $this->rules;\n\n $rules['fee'] = 'required|integer';\n $rules['phone'] = 'required|min:8|max:20';\n $rules['facebook'] = 'required|url';\n $rules['youtube'] = 'required|url';\n $rules['web'] = 'url';\n\n $rules['requestgender'] = 'required';\n $rules['serviceaddress'] = 'required|max:150';\n $rules['servicetime'] = 'required|max:150';\n $rules['language'] = 'required|max:150';\n $rules['bust'] = 'required|max:100|integer';\n $rules['waistline'] = 'required|max:100|integer';\n $rules['hips'] = 'required|max:100|integer';\n $rules['motto'] = 'max:50';\n\n return $rules;\n }",
"protected function getValidRules()\n {\n return $this->validRules;\n }",
"public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n {\n return [];\n }\n case 'POST':\n case 'PUT':\n {\n return [\n 'name' => 'required',\n ];\n }\n default:break;\n }\n }",
"public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n {\n return [\n 'mobile' => ['required','max:11','min:11'],\n 'code' => ['required','max:6','min:6'],\n 'avatar' => ['required'],\n 'wx_oauth' => ['required'],\n 'password' => ['nullable','min:6','max:20']\n ];\n }\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default: {\n return [];\n }\n }\n }",
"public function rules()\n {\n switch ($this->getRequestMethod()) {\n case 'index':\n return [\n 'full_name' => 'nullable|string',\n 'phone' => 'nullable|string',\n ];\n break;\n case 'store':\n return [\n 'crm_resource_id' => 'required|exists:crm_resources,id',\n 'channel' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$channel),\n 'call_status' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$call_statuses),\n ];\n break;\n default:\n return [];\n break;\n }\n }",
"public function rules()\n {\n //With password\n if(request('password') || request('password_confirmation')) {\n return array_merge($this->passwordRules(), $this->defaultRules());\n }\n //Without password\n return $this->defaultRules();\n }",
"public function rules()\n {\n $rules = [\n '_token' => 'required'\n ];\n\n foreach($this->request->get('emails') as $key => $val) {\n $rules['emails.'.$key] = 'required|email';\n }\n\n return $rules;\n }",
"function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CoverImageID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_TrackID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Status' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Rank' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CreateDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}",
"public function rules()\n { \n return $this->rules;\n }",
"public function getValidationRules()\n {\n if (method_exists($this, 'rules')) {\n return $this->rules();\n }\n\n $table = $this->getTable();\n $cacheKey = 'validate.' . $table;\n\n if (config('validate.cache') && Cache::has($cacheKey)) {\n return Cache::get($cacheKey);\n }\n\n // Get table info for model and generate rules\n $manager = DB::connection()->getDoctrineSchemaManager();\n $details = $manager->listTableDetails($table);\n $foreignKeys = $manager->listTableForeignKeys($table);\n\n $this->generateRules($details, $foreignKeys);\n\n if (config('validate.cache')) {\n Cache::forever($cacheKey, $this->rules);\n }\n\n return $this->rules;\n }",
"public function getValidationRules()\n {\n $rules = $this->getBasicValidationRules();\n\n if (in_array($this->type, ['char', 'string', 'text', 'enum'])) {\n $rules[] = 'string';\n if (in_array($this->type, ['char', 'string']) && isset($this->arguments[0])) {\n $rules[] = 'max:' . $this->arguments[0];\n }\n } elseif (in_array($this->type, ['timestamp', 'date', 'dateTime', 'dateTimeTz'])) {\n $rules[] = 'date';\n } elseif (str_contains(strtolower($this->type), 'integer')) {\n $rules[] = 'integer';\n } elseif (str_contains(strtolower($this->type), 'decimal')) {\n $rules[] = 'numeric';\n } elseif (in_array($this->type, ['boolean'])) {\n $rules[] = 'boolean';\n } elseif ($this->type == 'enum' && count($this->arguments)) {\n $rules[] = 'in:' . join(',', $this->arguments);\n }\n\n return [$this->name => join('|', $rules)];\n }",
"public function rules()\n {\n $rules = [];\n if ($this->isMethod('post')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n } elseif ($this->isMethod('put')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n }\n return $rules;\n }",
"public function validationRules()\n {\n return [];\n }",
"public function rules()\n {\n $rules = $this->rules;\n if(Request::isMethod('PATCH')){\n $rules['mg_name'] = 'required|min:2,max:16';\n }\n return $rules;\n }",
"function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_EventID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_SourceID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_HasEvent' => array(\n\t\t\t\t'inArray' => array('values' => array(self::HASEVENT_0, self::HASEVENT_1),),\n\t\t\t),\n\t\t);\n\t}",
"public function rules()\n {\n $rules = [];\n switch ($this->method()){\n case 'GET':\n $rules['mobile'] = ['required', 'regex:/^1[3456789]\\d{9}$/'];\n break;\n case 'POST':\n if($this->route()->getActionMethod() == 'sms') {\n $rules['area_code'] = ['digits_between:1,6'];\n if(in_array($this->get('type'), ['signup', 'reset_pay_pwd'])) {\n $rules['mobile'] = ['required', 'digits_between:5,20'];\n if($this->get('type') == 'signup' && !$this->get('area_code')) {\n $this->error('请选择区号');\n }\n }\n $rules['type'] = ['required', Rule::in(\\App\\Models\\Captcha::getSmsType())];\n }\n break;\n }\n return $rules;\n }",
"public function rules()\n {\n if ($this->isMethod('post')) {\n return $this->createRules();\n } elseif ($this->isMethod('put')) {\n return $this->updateRules();\n }\n }",
"public function rules()\n {\n $rules = [\n 'first_name' => ['required'],\n 'birthdate' => ['required', 'date', 'before:today'],\n ];\n\n if (is_international_session()) {\n $rules['email'] = ['required', 'email'];\n }\n\n if (should_collect_international_phone()) {\n $rules['phone'] = ['phone'];\n }\n\n if (is_domestic_session()) {\n $rules['phone'] = ['required', 'phone'];\n }\n\n return $rules;\n }",
"public function rules()\n {\n dd($this->request->get('answer'));\n foreach ($this->request->get('answer') as $key => $val)\n {\n $rules['answer.'.$key] = 'required';\n }\n\n return $rules;\n }",
"public function rules()\n {\n return static::$rules;\n }",
"function getRules() {\n\t\t$fields = $this->getFields();\n\t\t$allRules = array();\n\n\t\tforeach ($fields as $field) {\n\t\t\t$fieldRules = $field->getValidationRules();\n\t\t\t$allRules[$field->getName()] = $fieldRules;\n\t\t}\n\n\t\treturn $allRules;\n\t}",
"public static function getValidationRules(): array\n {\n return [\n 'name' => 'required|string|min:1|max:255',\n 'version' => 'required|float',\n 'type' => 'required|string',\n ];\n }",
"public function rules()\n {\n $rules = [\n 'name' => 'required',\n 'phone' => 'required|numeric',\n 'subject' => 'required',\n 'message' => 'required',\n 'email' => 'required|email',\n ];\n\n return $rules;\n }",
"public function getValidationRules(): array\n {\n return [\n 'email_address' => 'required|email',\n 'email_type' => 'nullable|in:html,text',\n 'status' => 'required|in:subscribed,unsubscribed,cleaned,pending',\n 'merge_fields' => 'nullable|array',\n 'interests' => 'nullable|array',\n 'language' => 'nullable|string',\n 'vip' => 'nullable|boolean',\n 'location' => 'nullable|array',\n 'location.latitude' => ['regex:/^[-]?(([0-8]?[0-9])\\.(\\d+))|(90(\\.0+)?)$/'], \n 'location.longitude' => ['regex:/^[-]?((((1[0-7][0-9])|([0-9]?[0-9]))\\.(\\d+))|180(\\.0+)?)$/'],\n 'marketing_permissions' => 'nullable|array',\n 'tags' => 'nullable|array'\n ];\n }",
"protected function getValidationRules()\n {\n return [\n 'first_name' => 'required|max:255',\n 'last_name' => 'required|max:255',\n 'email' => 'required|email|max:255',\n 'new_password' => 'required_with:current_password|confirmed|regex:' . config('security.password_policy'),\n ];\n }",
"public function rules()\n {\n // get 直接放行\n if( request()->isMethod('get') ){\n return []; // 规则为空\n }\n\n // 只在post的时候做验证\n return [\n 'username' => 'required|min:2|max:10', \n 'password' => 'required|min:2|max:10', \n 'email' => 'required|min:2|max:10|email', \n 'phoneNumber' => 'required|min:2|max:10', \n\n ];\n }",
"public function rules()\n {\n\n $rules = [\n 'id_tecnico_mantenimiento' => 'required',\n 'id_equipo_mantenimiento' => 'required'\n ];\n\n if ($this->request->has('status')) {\n $rules['status'] = 'required';\n }\n\n if ($this->request->has('log_mantenimiento')) {\n $rules['log_mantenimiento'] = 'required';\n }\n\n return $rules;\n }",
"public function rules()\n {\n $this->buildRules();\n return $this->rules;\n }",
"public function rules()\n {\n $rules = [];\n\n if ($this->isUpdate() || $this->isStore()) {\n $rules = array_merge($rules, [\n 'name' => 'required|string',\n 'email' => 'email',\n 'password' => 'confirmed|min:6',\n\n ]);\n }\n\n if ($this->isStore()) {\n $rules = array_merge($rules, [\n\n ]);\n }\n\n if ($this->isUpdate()) {\n $rules = array_merge($rules, [\n ]);\n }\n\n return $rules;\n }",
"public function rules()\n {\n switch (true) {\n case $this->wantsToList():\n $rules = $this->listRules;\n break;\n case $this->wantsToStore():\n $rules = $this->storeRules;\n break;\n case $this->wantsToUpdate():\n $this->storeRules['email'] = 'required|email|between:5,100|unique:users,email,' . $this->route('administrators');\n\n $rules = $this->storeRules;\n break;\n default:\n $rules = [];\n }\n\n return $rules;\n }",
"public function rules()\n {\n if($this->isMethod('post')) {\n return $this->storeRules();\n }\n else if($this->isMethod('put') || $this->isMethod('patch')){\n return $this->updateRules();\n }\n }",
"abstract protected function getValidationRules();",
"public function rules()\n\t{\n\t\treturn ModelHelper::getRules($this);\n\t}",
"public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return $this->getPostRules();\n case 'PUT':\n return $this->getPutRules();\n }\n }",
"public function rules()\n {\n $rules = [\n 'name' => 'required|string|min:2',\n 'email' => \"required|email|unique:users,email, {$this->request->get('user_id')}\",\n 'role_id' => 'required|numeric',\n 'group_id' => 'required|numeric',\n ];\n\n if ($this->request->has('password')){\n $rules['password'] = 'required|min:6';\n }\n\n return $rules;\n }",
"public function rules()\n {\n if($this->method() == 'POST')\n {\n return [\n 'reason'=>'required',\n 'date_from'=>'required',\n 'date_to'=>'required',\n 'attachment'=>'required',\n ];\n }\n }",
"public function rules()\n {\n $method = $this->method();\n if ($this->get('_method', null) !== null) {\n $method = $this->get('_method');\n }\n // $this->offsetUnset('_method');\n switch ($method) {\n case 'DELETE':\n case 'GET':\n break; \n case 'POST':\n $mailRules = \\Config::get('database.default').'.users';\n break;\n case 'PUT':\n $user = $this->authService->authJWTUserForm();\n $mailRules = \\Config::get('database.default').'.users,email,'.$user->getKey();\n break;\n case 'PATCH':\n break;\n default:\n break;\n }\n \n return [\n 'name' => 'required|string|max:256',\n 'email' => 'required|string|email|max:255|unique:'.$mailRules,\n 'password' => 'required|string|min:3',\n ];\n }",
"public function rules() {\n $rule = [\n 'value' => 'bail|required',\n ];\n if ($this->getMethod() == 'POST') {\n $rule += ['type' => 'bail|required'];\n }\n return $rule;\n }",
"public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n case 'PUT':\n case 'PATCH': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n default:\n break;\n }\n\n return [\n //\n ];\n }",
"public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST':\n case 'PUT':\n case 'PATCH': {\n return [\n 'name' => 'required|string|max:255',\n 'iso_code_2' => 'required|string|size:2',\n 'iso_code_3' => 'required|string|size:3',\n ];\n }\n default:\n return [];\n }\n }",
"public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n return [];\n case 'POST':\n return [\n 'name' => 'required|string',\n 'lastName' => 'string',\n 'gender' => 'boolean',\n 'avatar' => 'sometimes|mimes:jpg,png,jpeg|max:3048'\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'oldPassword' => 'required|string',\n 'newPassword' => 'required|string',\n ];\n default:\n break;\n }\n }",
"public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n {\n return [\n 'validation' => [\n 'accepted'\n ]\n ];\n }\n case 'POST':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'published_at_time' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n 'unpublished_time' => [\n 'nullable',\n ],\n ];\n }\n case 'PUT':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n ];\n }\n case 'PATCH':\n {\n return [];\n }\n default:\n break;\n }\n }",
"public function rules()\n {\n if (in_array($this->method(), ['PUT', 'PATCH'])) {\n $user = User::findOrFail(\\Request::input('id'))->first();\n\n array_forget($this->rules, 'email');\n $this->rules = array_add($this->rules, 'email', 'required|email|max:255|unique:users,email,' . $user->id);\n }\n\n return $this->rules;\n }",
"public function rules()\n {\n $method = explode('@', $this->route()->getActionName())[1];\n return $this->get_rules_arr($method);\n }",
"public function rules()\n {\n $rules = parent::rules();\n $extra_rules = [];\n $rules = array_merge($rules, $extra_rules);\n return $rules;\n }",
"public function rules()\n {\n\t\tswitch($this->method()) {\n\t\t\tcase 'POST':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tcase 'PUT':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tdefault:break;\n\t\t}\n }",
"public function rules()\n {\n $this->sanitize();\n return [\n 'event_id' => 'required',\n 'member_id' => 'required',\n 'guild_pts' => 'required',\n 'position' => 'required',\n 'solo_pts' => 'required',\n 'league_id' => 'required',\n 'solo_rank' => 'required',\n 'global_rank' => 'required',\n ];\n }",
"public function rules()\n {\n $this->rules['email'] = ['required', 'min:6', 'max:60', 'email'];\n $this->rules['password'] = ['required', 'min:6', 'max:60'];\n\n return $this->rules;\n }",
"public function getValidatorRules()\n {\n if ($validator = $this->getValidator()) {\n return $validator->getRulesForField($this->owner);\n }\n \n return [];\n }",
"public function getValidationRules() : array;",
"public function rules()\n {\n switch ($this->route()->getActionMethod()) {\n case 'login': {\n if ($this->request->has('access_token')) {\n return [\n 'access_token' => 'required',\n 'driver' => 'required|in:facebook,github,google',\n ];\n }\n return [\n 'email' => 'required|email',\n 'password' => 'required|min:6',\n ];\n }\n case 'register': {\n return [\n 'email' => 'required|email|unique:users,email',\n 'password' => 'required|min:6',\n 'name' => 'required',\n ];\n }\n default: return [];\n }\n }",
"public function rules()\n {\n Validator::extend('mail_address_available', function($attribute, $value, $parameters, $validator){\n return MailAddressSpec::isAvailable($value);\n });\n Validator::extend('password_available', function($attribute, $value, $parameters, $validator){\n return PassWordSpec::isAvailable($value);\n });\n\n return [\n 'mail_address' => [\n 'required',\n 'mail_address_available'\n ],\n 'password' => [\n 'required',\n 'password_available',\n ],\n ];\n }",
"public function rules()\n {\n switch (strtolower($this->method())) {\n case 'get':\n return $this->getMethodRules();\n case 'post':\n return $this->postMethodRules();\n case 'put':\n return $this->putMethodRules();\n case 'patch':\n return $this->patchMethodRules();\n case 'delete':\n return $this->deleteMethodRules();\n }\n }",
"public function rules()\n {\n /**\n * This is the original way, expecting post params for each user value\n */\n return [\n 'firstName' => 'required|min:2|max:255',\n 'lastName' => 'required|min:2|max:255',\n 'phone' => 'min:9|max:25',\n 'gender' => 'in:M,V',\n 'dateOfBirth' => 'before:today|after:1890-01-01',\n 'email' => 'email|min:12|max:255',\n ];\n }",
"public function getValidationRules(): array {\n\t\t$result = [];\n\t\t\n\t\tforeach ($this->getSections() as $section) {\n\t\t\t$result = array_merge($result, $section->getValidationRules());\n\t\t}\n\t\t\n\t\treturn $result;\n\t}",
"public function rules()\n\t{\n\t\t$rule = [];\n\t\tif(Request::path() == 'api/utility/upload-image'){\n\t\t\t$rule = [\n\t\t\t\t'imagePath' => 'required',\n\t\t\t];\n\t\t}else if(Request::path() == 'api/utility/check-transaction'){\n\t\t\t$rule = [\n\t\t\t\t'countNumber' => 'required',\n\t\t\t];\n\t\t}\n\t\treturn $rule;\n\t}",
"public function rules()\n {\n $rules = array();\n return $rules;\n }",
"public function rules()\n {\n $this->setValidator($this->operation_type);\n return $this->validator;\n }",
"public function rules()\n {\n switch($this->method()){\n case 'POST':\n return [\n 'name' => 'required',\n 'app_id' => 'required',\n 'account_id' => 'required',\n 'start_at' => 'required',\n 'end_at' => 'required',\n 'content' => 'required',\n ];\n break;\n default:\n return [];\n break;\n }\n\n }",
"protected function get_validation_rules()\n {\n }",
"public function rules()\n {\n $rules = [\n 'users' => 'required|array',\n ];\n\n foreach($this->request->get('users') as $key => $user) {\n $rules['users.'. $key . '.name'] = 'required|string|min:3|max:255';\n $rules['users.'. $key . '.phone'] = 'required|regex:/^[0-9\\+\\s]+$/|min:10|max:17';\n $rules['users.'. $key . '.country'] = 'required|string|min:2:max:3';\n }\n\n return $rules;\n }",
"public function rules()\n {\n $rules = [\n 'mail_driver' => 'required',\n 'mail_name' => 'required',\n 'mail_email' => 'required',\n ];\n\n $newRules = [];\n\n if($this->mail_driver == 'smtp') {\n $newRules = [\n 'mail_host' => 'required',\n 'mail_port' => 'required|numeric',\n 'mail_username' => 'required',\n 'mail_password' => 'required',\n 'mail_encryption' => 'required',\n ];\n }\n\n return array_merge($rules, $newRules);\n }",
"public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n $rules['location'] = 'required';\n $rules['end_recruit_date'] = 'required';\n $rules['time_taken'] = 'required';\n $rules['payment'] = 'required';\n $rules['objective'] = 'required';\n $rules['method_desc'] = 'required';\n $rules['health_condition'] = 'required';\n $rules['required_applicant'] = 'required|integer';\n $rules['applicant'] = 'nullable';\n $rules['datetime'] = 'required';\n\n return $rules;\n }",
"public function rules()\n {\n switch($this->method()) {\n\n case 'PUT':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n case 'POST':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n default:\n return [];\n }\n\n }",
"public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n\n return $rules;\n }",
"public function rules()\n {\n switch(Route::currentRouteName()){\n case 'adminBinding' :\n return [\n 'order_id' => 'required|integer',\n 'money' => 'required|numeric',\n ];\n case 'adminUnbinding' :\n return [\n 'order_id' => 'required|integer',\n 'pivot_id' => 'required|integer',\n ];\n case 'adminReceiptSave' :\n case 'adminReceiptUpdate' :\n return [\n 'customer_id' => 'required',\n 'receiptcorp' => 'required',\n 'account' => 'required',\n 'account_id' => 'required',\n 'bank' => 'required',\n 'currency_id' => 'required',\n 'advance_amount' => 'required|numeric',\n 'picture' => 'required',\n 'business_type' => 'required|in:1,2,3,4,5',\n 'exchange_type' => 'required_unless:currency_id,354|in:1,2',\n 'expected_received_at' => 'required|date_format:Y-m-d',\n ];\n case 'adminReceiptExchange' :\n return [\n 'rate' => 'required|numeric',\n ];\n default :\n return [];\n }\n }",
"public function rules()\n {\n $rules = [];\n $method = $this->getMethod();\n switch ($method) {\n case 'GET':\n if (Route::currentRouteName() === 'schoolActivity.getSchoolActivity') {\n $rules = [\n ];\n }\n break;\n }\n return $rules;\n }",
"public function rules()\n {\n $rules = new Collection();\n\n if (!$this->user() or !$this->user()->addresses()->count()) {\n $rules = $rules->merge($this->addressRules('billing'));\n if ($this->has('different_shipping_address')) {\n $rules = $rules->merge($this->addressRules('shipping'));\n }\n\n return $rules->toArray();\n }\n\n return $rules->merge([\n 'billing_address_id' => 'required|numeric',\n 'shipping_address_id' => 'required|numeric',\n ])->toArray();\n }",
"public function rules(): array\n {\n switch ($this->method()) {\n case 'POST':\n return $this->__rules() + $this->__post();\n case 'PUT':\n return $this->__rules() + $this->__put();\n default:\n return [];\n }\n }",
"public function defineValidationRules()\n {\n return [];\n }",
"public function rules(Request $request)\n {\n return Qc::$rules;\n }",
"public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'user_name' => 'nullable|string',\n 'excel' => 'nullable|file|mimes:xlsx',\n 'category' => 'required|int|in:' . implode(',', array_keys(UserMessage::$categories)),\n 'content' => 'required|string|max:500',\n 'member_status' => 'required|int|in:' . implode(',', array_keys(User::$statuses)),\n ];\n break;\n }\n }",
"public function rules()\n {\n return [\n 'lead_id' => [\n 'required', 'string',\n ],\n 'api_version' => [\n 'required', 'string',\n ],\n 'form_id' => [\n 'required', 'int',\n ],\n 'campaign_id' => [\n 'required', 'int',\n ],\n 'google_key' => [\n 'required', 'string', new GoogleKeyRule,\n ],\n ];\n }"
] | [
"0.8342703",
"0.80143493",
"0.7937251",
"0.79264987",
"0.79233825",
"0.79048395",
"0.78603816",
"0.7790699",
"0.77842164",
"0.77628785",
"0.7737272",
"0.7733618",
"0.7710535",
"0.7691693",
"0.76849866",
"0.7683038",
"0.7683038",
"0.7683038",
"0.7683038",
"0.7683038",
"0.7683038",
"0.7675849",
"0.76724476",
"0.76665044",
"0.7657698",
"0.7641827",
"0.7630892",
"0.76293766",
"0.7617708",
"0.76102096",
"0.7607475",
"0.7602442",
"0.7598732",
"0.7597544",
"0.75924",
"0.75915384",
"0.7588146",
"0.7581354",
"0.7555758",
"0.755526",
"0.7551423",
"0.7546329",
"0.7541439",
"0.75366044",
"0.75363225",
"0.7530296",
"0.7517988",
"0.75155175",
"0.7508439",
"0.75069886",
"0.7505724",
"0.749979",
"0.7495976",
"0.74949056",
"0.7492888",
"0.7491117",
"0.74901396",
"0.7489651",
"0.7486808",
"0.7486108",
"0.7479687",
"0.7478561",
"0.7469412",
"0.74635684",
"0.74619836",
"0.7461325",
"0.74591017",
"0.7455279",
"0.745352",
"0.7453257",
"0.7449877",
"0.74486",
"0.7441391",
"0.7440429",
"0.7435489",
"0.7435326",
"0.74341524",
"0.7430354",
"0.7429103",
"0.7423808",
"0.741936",
"0.74152505",
"0.7414828",
"0.741382",
"0.74126065",
"0.74105227",
"0.740555",
"0.7404385",
"0.74040926",
"0.74015605",
"0.73905706",
"0.73837525",
"0.73732615",
"0.7371123",
"0.7369176",
"0.73619753",
"0.73554605",
"0.73448825",
"0.7344659",
"0.73427117",
"0.73357755"
] | 0.0 | -1 |
Display a listing of the resource. | public function index(Request $request)
{
if($request->session()->has('ADMIN_LOGIN')){
return redirect('admin/deshboad');
}else{
return view('login');
}
return view('login');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }",
"public function listing();",
"function index() {\n\t\t$this->show_list();\n\t}",
"public function actionList() {\n $this->_getList();\n }",
"public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }",
"public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }",
"public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }",
"function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}",
"public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }",
"public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }",
"public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}",
"function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}",
"public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }",
"public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}",
"public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}",
"public function actionRestList() {\n\t $this->doRestList();\n\t}",
"public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }",
"public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }",
"public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}",
"public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}",
"public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }",
"public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }",
"public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }",
"public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }",
"public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}",
"public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }",
"public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}",
"public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }",
"public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }",
"public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }",
"public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}",
"public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }",
"public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }",
"public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }",
"public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }",
"public function index()\n {\n return Resources::collection(Checking::paginate());\n }",
"public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }",
"public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }",
"public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }",
"public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }",
"public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }",
"public function view(){\n\t\t$this->buildListing();\n\t}",
"public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }",
"public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }",
"public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }",
"public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }",
"public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }",
"public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }",
"public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }",
"public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }",
"public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}",
"public function listAction() {}",
"public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }",
"public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }",
"public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }",
"public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }",
"public function executeList()\n {\n $this->setTemplate('list');\n }",
"public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }",
"function listing() {\r\n\r\n }",
"public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }",
"public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }",
"public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }",
"public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}",
"public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }",
"public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}",
"public function _index(){\n\t $this->_list();\n\t}",
"public function index()\n {\n $this->booklist();\n }",
"function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}",
"public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }",
"public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }",
"public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }",
"public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }",
"public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }",
"public function indexAction() {\n $this->_forward('list');\n }",
"public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }",
"public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }",
"public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}",
"public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }",
"public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }",
"public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }",
"public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }",
"public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }",
"public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }",
"public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}",
"public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }",
"public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }",
"public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }",
"public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}",
"public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }",
"public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }",
"public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }",
"public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }",
"public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }",
"public function index()\n {\n return view('admin.resources.index');\n }",
"public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}"
] | [
"0.7447426",
"0.73628515",
"0.73007894",
"0.7249563",
"0.7164474",
"0.7148467",
"0.71320325",
"0.7104678",
"0.7103152",
"0.7100512",
"0.7048493",
"0.6994995",
"0.69899315",
"0.6935843",
"0.6899995",
"0.68999326",
"0.6892163",
"0.6887924",
"0.6867505",
"0.6851258",
"0.6831236",
"0.68033123",
"0.6797587",
"0.6795274",
"0.67868614",
"0.67610204",
"0.67426085",
"0.67303514",
"0.6727031",
"0.67257243",
"0.67257243",
"0.67257243",
"0.67195046",
"0.67067856",
"0.67063624",
"0.67045796",
"0.66655326",
"0.666383",
"0.66611767",
"0.66604036",
"0.66582054",
"0.6654805",
"0.6649084",
"0.6620993",
"0.66197145",
"0.6616024",
"0.66077465",
"0.6602853",
"0.6601494",
"0.6593894",
"0.65878326",
"0.6586189",
"0.6584675",
"0.65813804",
"0.65766823",
"0.65754175",
"0.657203",
"0.657202",
"0.65713936",
"0.65642136",
"0.6563951",
"0.6553249",
"0.6552584",
"0.6546312",
"0.6536654",
"0.6534106",
"0.6532539",
"0.6527516",
"0.6526785",
"0.6526042",
"0.65191233",
"0.6518727",
"0.6517732",
"0.6517689",
"0.65155584",
"0.6507816",
"0.65048593",
"0.6503226",
"0.6495243",
"0.6492096",
"0.6486592",
"0.64862204",
"0.6485348",
"0.6483991",
"0.64789015",
"0.6478804",
"0.64708763",
"0.6470304",
"0.64699143",
"0.6467142",
"0.646402",
"0.6463102",
"0.6460929",
"0.6458856",
"0.6454334",
"0.6453653",
"0.645357",
"0.6450551",
"0.64498454",
"0.64480853",
"0.64453584"
] | 0.0 | -1 |
Display a listing of the resource. | public function index()
{
$items=DB::table("employee")->get(); // this is get all the continents from DB
// dd($items);
return view ("employees.index")->with("items",$items);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }",
"public function listing();",
"function index() {\n\t\t$this->show_list();\n\t}",
"public function actionList() {\n $this->_getList();\n }",
"public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }",
"public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }",
"public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }",
"function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}",
"public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }",
"public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }",
"public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}",
"function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}",
"public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }",
"public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}",
"public function actionRestList() {\n\t $this->doRestList();\n\t}",
"public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}",
"public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }",
"public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }",
"public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}",
"public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}",
"public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }",
"public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }",
"public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }",
"public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }",
"public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}",
"public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }",
"public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}",
"public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }",
"public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }",
"public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }",
"public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}",
"public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }",
"public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }",
"public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }",
"public function index()\n {\n return Resources::collection(Checking::paginate());\n }",
"public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }",
"public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }",
"public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }",
"public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }",
"public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }",
"public function view(){\n\t\t$this->buildListing();\n\t}",
"public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }",
"public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }",
"public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }",
"public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }",
"public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }",
"public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }",
"public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }",
"public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }",
"public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }",
"public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}",
"public function listAction() {}",
"public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }",
"public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }",
"public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }",
"public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }",
"public function executeList()\n {\n $this->setTemplate('list');\n }",
"public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }",
"function listing() {\r\n\r\n }",
"public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }",
"public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }",
"public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}",
"public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }",
"public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }",
"public function _index(){\n\t $this->_list();\n\t}",
"public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}",
"function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}",
"public function index()\n {\n $this->booklist();\n }",
"public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }",
"public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }",
"public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }",
"public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }",
"public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }",
"public function indexAction() {\n $this->_forward('list');\n }",
"public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }",
"public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }",
"public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}",
"public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }",
"public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }",
"public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }",
"public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }",
"public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }",
"public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}",
"public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }",
"public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }",
"public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }",
"public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}",
"public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }",
"public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }",
"public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }",
"public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }",
"public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }",
"public function index()\n {\n return view('admin.resources.index');\n }",
"public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}"
] | [
"0.7446777",
"0.736227",
"0.73005503",
"0.72478926",
"0.71631265",
"0.71489686",
"0.7131636",
"0.7105969",
"0.71029514",
"0.7101372",
"0.70508176",
"0.6995128",
"0.69890636",
"0.6934895",
"0.6900203",
"0.6899281",
"0.6891734",
"0.6887235",
"0.68670005",
"0.6849741",
"0.6830523",
"0.6802689",
"0.6797",
"0.67957735",
"0.67871135",
"0.6760129",
"0.67427456",
"0.6730486",
"0.67272323",
"0.67255723",
"0.67255723",
"0.67255723",
"0.67177945",
"0.6707866",
"0.6706713",
"0.6704375",
"0.6664782",
"0.6662871",
"0.6660302",
"0.6659404",
"0.6656656",
"0.6653517",
"0.6647965",
"0.6620322",
"0.66185474",
"0.6618499",
"0.6606105",
"0.6600617",
"0.65996987",
"0.6594775",
"0.6587389",
"0.6585109",
"0.6581641",
"0.6581017",
"0.6577157",
"0.65747666",
"0.6572513",
"0.65721947",
"0.6570553",
"0.65646994",
"0.6563556",
"0.6554194",
"0.65529937",
"0.65460825",
"0.65368485",
"0.653429",
"0.65328294",
"0.6526759",
"0.6526695",
"0.6526284",
"0.65191334",
"0.65183175",
"0.65174305",
"0.651703",
"0.65141153",
"0.6507088",
"0.65061647",
"0.6504046",
"0.64942145",
"0.6491893",
"0.64883405",
"0.6486392",
"0.6485077",
"0.64846045",
"0.6478858",
"0.64756656",
"0.64726377",
"0.6471126",
"0.64701074",
"0.6467418",
"0.6462195",
"0.64618355",
"0.6459199",
"0.6457831",
"0.6454631",
"0.64533997",
"0.6451915",
"0.6450861",
"0.6449301",
"0.64492667",
"0.64469045"
] | 0.0 | -1 |
Show the form for creating a new resource. | public function create()
{
return view("employees.create");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view('resource.create');\n }",
"public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}",
"public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }",
"public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }",
"public function create()\n {\n return view ('forms.create');\n }",
"public function create ()\n {\n return view('forms.create');\n }",
"public function create()\n\t{\n\t\treturn view('faith.form');\n\t}",
"public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }",
"public function create()\n {\n return view(\"request_form.form\");\n }",
"public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }",
"public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle école'\n\t\t) ) );\n\t}",
"public function create()\n {\n return view($this->forms . '.create');\n }",
"public function create()\n {\n return view('restful.add');\n }",
"public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }",
"public function create()\n {\n return view('admin.createform');\n }",
"public function create()\n {\n return view('admin.forms.create');\n }",
"public function create()\n {\n return view('backend.student.form');\n }",
"public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function create()\n {\n return view('client.form');\n }",
"public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }",
"public function create()\n {\n return view('Form');\n }",
"public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }",
"public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}",
"public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }",
"public function create()\n {\n return view('backend.schoolboard.addform');\n }",
"public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}",
"public function create()\n {\n //\n return view('form');\n }",
"public function create()\n {\n return view('rests.create');\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return view(\"Add\");\n }",
"public function create(){\n return view('form.create');\n }",
"public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }",
"public function create()\n {\n\n return view('control panel.student.add');\n\n }",
"public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}",
"public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }",
"public function create()\n {\n return $this->cView(\"form\");\n }",
"public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }",
"public function create()\n {\n return view(\"dresses.form\");\n }",
"public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}",
"public function createAction()\n {\n// $this->view->form = $form;\n }",
"public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }",
"public function create()\n {\n return view('fish.form');\n }",
"public function create()\n {\n return view('users.forms.create');\n }",
"public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }",
"public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}",
"public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }",
"public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }",
"public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }",
"public function create()\n {\n return view('essentials::create');\n }",
"public function create()\n {\n return view('student.add');\n }",
"public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}",
"public function create()\n {\n return view('url.form');\n }",
"public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }",
"public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}",
"public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view('crud/add'); }",
"public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}",
"public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view(\"List.form\");\n }",
"public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}",
"public function create()\n {\n //load create form\n return view('products.create');\n }",
"public function create()\n {\n return view('article.addform');\n }",
"public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }",
"public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}",
"public function create()\n {\n return view('saldo.form');\n }",
"public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}",
"public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }",
"public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }",
"public function create()\n {\n return view('admin.inverty.add');\n }",
"public function create()\n {\n return view('Libro.create');\n }",
"public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }",
"public function create()\n {\n return view(\"familiasPrograma.create\");\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}",
"public function create()\n {\n return view(\"create\");\n }",
"public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}",
"public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n return view('forming');\n }",
"public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }",
"public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }",
"public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }",
"public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }",
"public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }",
"public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}",
"public function create()\n {\n return view('student::students.student.create');\n }",
"public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}"
] | [
"0.75948673",
"0.75948673",
"0.75863165",
"0.7577412",
"0.75727344",
"0.7500887",
"0.7434847",
"0.7433956",
"0.73892003",
"0.73531085",
"0.73364776",
"0.73125",
"0.7296102",
"0.7281891",
"0.72741455",
"0.72424185",
"0.7229325",
"0.7226713",
"0.7187349",
"0.7179176",
"0.7174283",
"0.7150356",
"0.71444064",
"0.71442676",
"0.713498",
"0.71283126",
"0.7123691",
"0.71158516",
"0.71158516",
"0.71158516",
"0.7112176",
"0.7094388",
"0.7085711",
"0.708025",
"0.70800644",
"0.70571953",
"0.70571953",
"0.70556754",
"0.70396435",
"0.7039549",
"0.7036275",
"0.703468",
"0.70305896",
"0.7027638",
"0.70265305",
"0.70199823",
"0.7018007",
"0.7004984",
"0.7003889",
"0.7000935",
"0.69973785",
"0.6994679",
"0.6993764",
"0.6989918",
"0.6986989",
"0.6966502",
"0.69656384",
"0.69564354",
"0.69518244",
"0.6951109",
"0.6947306",
"0.69444615",
"0.69423944",
"0.6941156",
"0.6937871",
"0.6937871",
"0.6936686",
"0.69345254",
"0.69318026",
"0.692827",
"0.69263744",
"0.69242257",
"0.6918349",
"0.6915889",
"0.6912884",
"0.691146",
"0.69103104",
"0.69085974",
"0.69040126",
"0.69014287",
"0.69012105",
"0.6900397",
"0.68951064",
"0.6893521",
"0.68932164",
"0.6891899",
"0.6891616",
"0.6891616",
"0.6889246",
"0.68880934",
"0.6887128",
"0.6884732",
"0.68822503",
"0.68809193",
"0.6875949",
"0.68739206",
"0.68739134",
"0.6870358",
"0.6869779",
"0.68696856",
"0.686877"
] | 0.0 | -1 |
Store a newly created resource in storage. | public function store(Request $request)
{
$request-> validate([
'firstname' => 'required|max:50',
'lastname' => 'required|max:50',
'email' => 'required|email|max:50',
'phone' => 'required|integer',
'gender' => 'required|max:1',
'empNo' => 'required|integer'
]);
DB::table("employee")->insert ([
'firstname'=>$request['firstname'],
'lastname'=>$request['lastname'],
'email'=>$request['email'],
'phone'=>$request['phone'],
'gender'=>$request['gender'],
'empNo'=>$request['empNo']
]);
Session::flash("msg","Created Successfully");
return redirect (route("employees.index"));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store($data, Resource $resource);",
"public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }",
"public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }",
"public function createStorage();",
"public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"function storeAndNew() {\n $this->store();\n }",
"public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }",
"public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }",
"public function store()\n\t{\n\t\t\n\t\t//\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}"
] | [
"0.72865677",
"0.7145327",
"0.71325725",
"0.6640912",
"0.66209733",
"0.65685713",
"0.652643",
"0.65095705",
"0.64490104",
"0.637569",
"0.63736665",
"0.63657933",
"0.63657933",
"0.63657933",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437"
] | 0.0 | -1 |
Display the specified resource. | public function show($id)
{
$item=DB::table("employee")->find($id);
if(!$item)
{
session()->flash("msg","Invalid ID");
}
return view("employees.show")->with('item',$item);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Resource $resource)\n {\n // not available for now\n }",
"public function show(Resource $resource)\n {\n //\n }",
"function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }",
"private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }",
"function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}",
"public function show(ResourceSubject $resourceSubject)\n {\n //\n }",
"public function show(ResourceManagement $resourcesManagement)\n {\n //\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function retrieve(Resource $resource);",
"public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }",
"public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function show(Dispenser $dispenser)\n {\n //\n }",
"public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }",
"public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}",
"public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }",
"public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}",
"public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }",
"public function get(Resource $resource);",
"public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }",
"public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }",
"function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}",
"public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }",
"public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }",
"function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}",
"public function edit(Resource $resource)\n {\n //\n }",
"public function show(rc $rc)\n {\n //\n }",
"public function show(Resolucion $resolucion)\n {\n //\n }",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }",
"public function show(Resena $resena)\n {\n }",
"public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}",
"public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }",
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }",
"public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }",
"public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }",
"public function display()\n\t{\n\t\tparent::display();\n\t}",
"public function show()\n\t{\n\t\t\n\t}",
"public function get_resource();",
"function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}",
"public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }",
"public function display($title = null)\n {\n echo $this->fetch($title);\n }",
"public function display(){}",
"public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}",
"public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}",
"public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }",
"public function display() {\n echo $this->render();\n }",
"#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}",
"public function show($id)\n\t{\n\t//\n\t}",
"public function show($id)\n\t{\n\t//\n\t}",
"public function show($id)\n {\n //\n $this->_show($id);\n }",
"function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }",
"public function show()\n\t{\n\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {}",
"static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}",
"public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}",
"public abstract function display();",
"public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }",
"public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"abstract public function resource($resource);",
"public function show(Response $response)\n {\n //\n }",
"public function show()\n {\n return auth()->user()->getResource();\n }",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}"
] | [
"0.8232636",
"0.81890994",
"0.68296117",
"0.64987075",
"0.649589",
"0.64692974",
"0.64633286",
"0.63640857",
"0.6307513",
"0.6281809",
"0.621944",
"0.61926234",
"0.61803305",
"0.6173143",
"0.61398774",
"0.6119022",
"0.61085826",
"0.6106046",
"0.60947937",
"0.6078597",
"0.6047151",
"0.60409963",
"0.6021287",
"0.5989136",
"0.5964405",
"0.5962407",
"0.59518087",
"0.59309924",
"0.5921466",
"0.5908002",
"0.5908002",
"0.5908002",
"0.59051657",
"0.5894554",
"0.5871459",
"0.5870088",
"0.586883",
"0.5851384",
"0.58168566",
"0.58166975",
"0.5815869",
"0.58056176",
"0.5799148",
"0.5795126",
"0.5791158",
"0.57857597",
"0.5783371",
"0.5761351",
"0.57592535",
"0.57587147",
"0.5746491",
"0.57460666",
"0.574066",
"0.5739448",
"0.5739448",
"0.57295275",
"0.57293373",
"0.5729069",
"0.57253987",
"0.57253987",
"0.57253987",
"0.57253987",
"0.57253987",
"0.57253987",
"0.57253987",
"0.57253987",
"0.57253987",
"0.57253987",
"0.57214445",
"0.57149816",
"0.5712036",
"0.5710076",
"0.57073003",
"0.5707059",
"0.5705454",
"0.5705454",
"0.5700382",
"0.56997055",
"0.5693362",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868"
] | 0.0 | -1 |
Show the form for editing the specified resource. | public function edit($id)
{
$item=DB::table("employee")->find($id);
if(!$item)
{
session()->flash("msg","Invalid ID");
}
return view("employees.edit")->with('item',$item);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function edit()\n {\n return view('hirmvc::edit');\n }",
"public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}",
"public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }",
"public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}",
"public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }",
"public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }",
"private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }",
"public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }",
"public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}",
"public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }",
"public function edit($model, $form);",
"function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}",
"public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}",
"public function edit()\n { \n return view('admin.control.edit');\n }",
"public function edit(Form $form)\n {\n //\n }",
"public function edit()\n {\n return view('common::edit');\n }",
"public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\r\n {\r\n return view('petro::edit');\r\n }",
"public function edit($id)\n {\n // show form edit user info\n }",
"public function edit()\n {\n return view('escrow::edit');\n }",
"public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }",
"public function edit()\n {\n return view('commonmodule::edit');\n }",
"public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit(form $form)\n {\n //\n }",
"public function actionEdit($id) { }",
"public function edit()\n {\n return view('admincp::edit');\n }",
"public function edit()\n {\n return view('scaffold::edit');\n }",
"public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }",
"public function edit()\n {\n return view('Person.edit');\n }",
"public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }",
"public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}",
"public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }",
"public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}",
"public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }",
"public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }",
"public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }",
"function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}",
"public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"protected function _edit(){\n\t\treturn $this->_editForm();\n\t}",
"public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }",
"public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }",
"public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}",
"public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}",
"public function edit($id)\n {\n return view('models::edit');\n }",
"public function edit()\n {\n return view('home::edit');\n }",
"public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }",
"public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }",
"public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }",
"public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('consultas::edit');\n }",
"public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }",
"public function edit()\n {\n return view('dashboard::edit');\n }",
"public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }",
"public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }",
"public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }",
"public function edit() {\n return view('routes::edit');\n }",
"public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }",
"public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('cataloguemodule::edit');\n }",
"public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }",
"public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }",
"public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }",
"public function edit()\n {\n return view('website::edit');\n }",
"public function edit()\n {\n return view('inventory::edit');\n }",
"public function edit()\n {\n return view('initializer::edit');\n }",
"public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }",
"public function edit($id)\n {\n return view('backend::edit');\n }",
"public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }",
"public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }",
"public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}",
"public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }",
"public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }",
"public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }",
"public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }",
"public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}"
] | [
"0.78550774",
"0.7692893",
"0.7273195",
"0.7242132",
"0.7170847",
"0.70622855",
"0.7053459",
"0.6982539",
"0.69467914",
"0.6945275",
"0.6941114",
"0.6928077",
"0.69019294",
"0.68976134",
"0.68976134",
"0.6877213",
"0.68636996",
"0.68592185",
"0.68566656",
"0.6844697",
"0.68336326",
"0.6811471",
"0.68060875",
"0.68047357",
"0.68018645",
"0.6795623",
"0.6791791",
"0.6791791",
"0.6787701",
"0.67837197",
"0.67791027",
"0.677645",
"0.6768301",
"0.6760122",
"0.67458534",
"0.67458534",
"0.67443407",
"0.67425704",
"0.6739898",
"0.6735328",
"0.6725465",
"0.6712817",
"0.6693891",
"0.6692419",
"0.6688581",
"0.66879624",
"0.6687282",
"0.6684741",
"0.6682786",
"0.6668777",
"0.6668427",
"0.6665287",
"0.6665287",
"0.66610634",
"0.6660843",
"0.66589665",
"0.66567147",
"0.66545695",
"0.66527975",
"0.6642529",
"0.6633056",
"0.6630304",
"0.6627662",
"0.6627662",
"0.66192114",
"0.6619003",
"0.66153085",
"0.6614968",
"0.6609744",
"0.66086483",
"0.66060555",
"0.6596137",
"0.65950733",
"0.6594648",
"0.65902114",
"0.6589043",
"0.6587102",
"0.65799844",
"0.65799403",
"0.65799177",
"0.657708",
"0.65760696",
"0.65739626",
"0.656931",
"0.6567826",
"0.65663105",
"0.65660435",
"0.65615267",
"0.6561447",
"0.6561447",
"0.65576506",
"0.655686",
"0.6556527",
"0.6555543",
"0.6555445",
"0.65552044",
"0.65543956",
"0.65543705",
"0.6548264",
"0.65475875",
"0.65447706"
] | 0.0 | -1 |
Update the specified resource in storage. | public function update(Request $request, $id)
{
$request-> validate([
'firstname' => 'required|max:50',
'lastname' => 'required|max:50',
'email' => 'required|email|max:50',
'phone' => 'required|integer',
'gender' => 'required|max:1',
'empNo' => 'required|integer'
]);
DB::table("employee")-> where('id',$id)->update ([
'firstname'=>$request['firstname'],
'lastname'=>$request['lastname'],
'email'=>$request['email'],
'phone'=>$request['phone'],
'gender'=>$request['gender'],
'empNo'=>$request['empNo']
]);
Session::flash("msg","Updated Successfully");
return redirect (route("employees.index"));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }",
"public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }",
"public function update(Request $request, Resource $resource)\n {\n //\n }",
"public function updateStream($resource);",
"public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }",
"protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }",
"public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }",
"public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}",
"public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }",
"public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }",
"protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }",
"public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }",
"public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }",
"public function update($path);",
"public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }",
"public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }",
"public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}",
"public function updateStream($path, $resource, Config $config)\n {\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }",
"public function update($data) {}",
"public function update($data) {}",
"public function putStream($resource);",
"public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function update($entity);",
"public function update($entity);",
"public function setResource($resource);",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }",
"public function isUpdateResource();",
"public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }",
"public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }",
"public function store($data, Resource $resource);",
"public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }",
"public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }",
"public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }",
"public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }",
"public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }",
"public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }",
"public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }",
"public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }",
"public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }",
"public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }",
"public function update(Qstore $request, $id)\n {\n //\n }",
"public function update(IEntity $entity);",
"protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }",
"public function update($request, $id);",
"function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}",
"public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }",
"public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }",
"protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }",
"abstract public function put($data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function testUpdateSupplierUsingPUT()\n {\n }",
"public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }",
"public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }",
"public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }",
"public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }",
"public abstract function update($object);",
"public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }",
"public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }",
"public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }",
"public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }",
"public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }",
"public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }",
"public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }",
"public function update($entity)\n {\n \n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }",
"public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }",
"public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }",
"public function update($id, $input);",
"public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }",
"public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}",
"public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }",
"public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }",
"public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }",
"public function update($id);",
"public function update($id);",
"private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }",
"public function put($path, $data = null);",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }",
"public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }",
"public function update(Entity $entity);",
"public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }",
"public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}",
"public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }",
"public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }",
"public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }"
] | [
"0.7425105",
"0.70612276",
"0.70558053",
"0.6896673",
"0.6582159",
"0.64491373",
"0.6346954",
"0.62114537",
"0.6145042",
"0.6119944",
"0.61128503",
"0.6099993",
"0.6087866",
"0.6052593",
"0.6018941",
"0.60060275",
"0.59715486",
"0.5946516",
"0.59400934",
"0.59377414",
"0.5890722",
"0.5860816",
"0.5855127",
"0.5855127",
"0.58513457",
"0.5815068",
"0.5806887",
"0.57525045",
"0.57525045",
"0.57337505",
"0.5723295",
"0.5714311",
"0.5694472",
"0.5691319",
"0.56879413",
"0.5669989",
"0.56565005",
"0.56505877",
"0.5646085",
"0.5636683",
"0.5633498",
"0.5633378",
"0.5632906",
"0.5628826",
"0.56196684",
"0.5609126",
"0.5601397",
"0.55944353",
"0.5582592",
"0.5581908",
"0.55813426",
"0.5575312",
"0.55717176",
"0.55661047",
"0.55624634",
"0.55614686",
"0.55608666",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55573726",
"0.5556878",
"0.5554201",
"0.5553069",
"0.55530256",
"0.5543788",
"0.55435944",
"0.55412996",
"0.55393505",
"0.55368495",
"0.5535236",
"0.5534954",
"0.55237365",
"0.5520468",
"0.55163723",
"0.55125296",
"0.5511168",
"0.5508345",
"0.55072427",
"0.5502385",
"0.5502337",
"0.5501029",
"0.54995877",
"0.54979175",
"0.54949397",
"0.54949397",
"0.54946727",
"0.5494196",
"0.54941916",
"0.54925025",
"0.5491807",
"0.5483321",
"0.5479606",
"0.5479408",
"0.5478678",
"0.54667485",
"0.5463411",
"0.5460588",
"0.5458525"
] | 0.0 | -1 |
Remove the specified resource from storage. | public function destroy($id)
{
DB::table("employee")->where('id',$id)->delete();
Session::flash("msg","Deleted Successfully");
return redirect (route("employees.index"));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }",
"public function destroy(Resource $resource)\n {\n //\n }",
"public function removeResource($resourceID)\n\t\t{\n\t\t}",
"public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }",
"public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }",
"public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }",
"public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }",
"protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }",
"public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }",
"public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }",
"public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}",
"public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}",
"public function delete(): void\n {\n unlink($this->getPath());\n }",
"public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }",
"public function remove($path);",
"function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}",
"public function delete(): void\n {\n unlink($this->path);\n }",
"private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }",
"public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function remove() {}",
"public function remove() {}",
"public function remove();",
"public function remove();",
"public function remove();",
"public function remove();",
"function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}",
"public function deleteImage(){\n\n\n Storage::delete($this->image);\n }",
"public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }",
"public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}",
"public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }",
"public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }",
"public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}",
"public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }",
"public function deleteImage(){\n \tStorage::delete($this->image);\n }",
"public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }",
"public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }",
"public function destroy($id)\n {\n Myfile::find($id)->delete();\n }",
"public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }",
"public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }",
"public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }",
"public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }",
"public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }",
"public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }",
"public function delete($path);",
"public function delete($path);",
"public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }",
"public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }",
"public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }",
"public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }",
"public function delete($path, $data = null);",
"public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }",
"public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }",
"public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }",
"public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }",
"public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }",
"public function del($path){\n\t\treturn $this->remove($path);\n\t}",
"public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }",
"public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}",
"public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }",
"public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }",
"public function revoke($resource, $permission = null);",
"public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }",
"function delete($path);",
"public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}",
"public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }",
"public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }",
"public function remove($filePath){\n return Storage::delete($filePath);\n }",
"public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }",
"public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }",
"public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }",
"public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }",
"function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }",
"public function remove($id);",
"public function remove($id);",
"public function deleted(Storage $storage)\n {\n //\n }",
"public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }",
"public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }",
"public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }",
"public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }",
"function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}",
"public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }",
"public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}",
"public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }",
"public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }"
] | [
"0.6672584",
"0.6659381",
"0.6635911",
"0.6632799",
"0.6626075",
"0.65424126",
"0.65416265",
"0.64648265",
"0.62882507",
"0.6175931",
"0.6129922",
"0.60893893",
"0.6054415",
"0.60428125",
"0.60064924",
"0.59337646",
"0.5930772",
"0.59199584",
"0.5919811",
"0.5904504",
"0.5897263",
"0.58962846",
"0.58951396",
"0.58951396",
"0.58951396",
"0.58951396",
"0.5880124",
"0.58690923",
"0.5863659",
"0.5809161",
"0.57735413",
"0.5760811",
"0.5753559",
"0.57492644",
"0.5741712",
"0.57334286",
"0.5726379",
"0.57144034",
"0.57096",
"0.5707689",
"0.5705895",
"0.5705634",
"0.5703902",
"0.5696585",
"0.5684331",
"0.5684331",
"0.56780374",
"0.5677111",
"0.5657287",
"0.5648262",
"0.5648085",
"0.5648012",
"0.5640759",
"0.5637738",
"0.5629985",
"0.5619264",
"0.56167465",
"0.5606877",
"0.56021434",
"0.5601949",
"0.55992156",
"0.5598557",
"0.55897516",
"0.5581397",
"0.5566926",
"0.5566796",
"0.55642897",
"0.55641",
"0.5556583",
"0.5556536",
"0.5550097",
"0.5543172",
"0.55422723",
"0.5540013",
"0.5540013",
"0.55371785",
"0.55365825",
"0.55300397",
"0.552969",
"0.55275744",
"0.55272335",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.5525997",
"0.5525624",
"0.5523911",
"0.5521122",
"0.5517412"
] | 0.0 | -1 |
Cast value from bool to scalar | public function toString($value): string
{
if (!$value instanceof DateTimeInterface) {
$value = new \DateTime($value);
}
return $value->format('Y-m-d H:i:s');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function o_castBool($value) {\n\t\t\treturn Obj::singleton()->castBool($value);\n\t\t}",
"function to_boolean($val);",
"public function castToBool($value);",
"#[@test]\n public function boolCast() {\n $this->assertSourcecodeEquals(\n '$s= (bool)$num;',\n $this->emit('$s= (bool)$num;')\n );\n }",
"function pdo_bool($value) {\n\tif (is_bool($value)) {\n\t\t$value = (int)$value;\n\t}\n\treturn $value;\n}",
"function boolval($val){\n return $val === 'true' ? true : false;\n}",
"public function convertFromSqlBoolean($value)\n {\n if ($value === null) {\n return null;\n }\n\n return (bool)$value;\n }",
"private static function castToType($value) {\n if ($value == \"true\" || $value == \"1\")\n return true;\n\n if ($value == \"false\" || $value == \"0\")\n return false;\n\n return $value;\n\n }",
"public function value(): bool\n {\n if (($val = $this->raw()) === null) {\n return false;\n }\n\n return (new Boolean)->decode($val);\n }",
"public function boolValue()\n {\n return $this->value;\n }",
"public function toBool() : bool\n {\n return boolval($this->value);\n }",
"public function convertToSqlBoolean(bool $value)\n {\n if (is_bool($value)) {\n return (int)$value;\n }\n\n return $value;\n }",
"function convertBooleanValues($table, $row)\n{\n global $db_lnk;\n $qry_val_arr = array(\n $table\n );\n $result = pg_query_params($db_lnk, 'SELECT * FROM information_schema.columns WHERE table_name = $1 ', $qry_val_arr);\n while ($field_details = pg_fetch_assoc($result)) {\n if ($field_details['data_type'] == 'boolean') {\n $row[$field_details['column_name']] = ($row[$field_details['column_name']] == 'f') ? 0 : 1;\n }\n }\n return $row;\n}",
"private function _convert_boolean(mixed $value): bool {\n\t\treturn Types::toBool($value);\n\t}",
"function boolval( $val ) {\r\n\t\treturn (bool) $val;\r\n\t}",
"private function boolArg($value)\n {\n return ($value ? 1 : null);\n }",
"private function __converter(&$value, $key) {\n\t\tif (is_bool($value)) {\n\t\t\t$value = ($value ? '1' : '0');\n\t\t}\n\t}",
"protected function castValue($value)\n {\n switch ($value) {\n case 'false':\n return false;\n\n case 'true':\n return true;\n }\n\n if (is_numeric($value)) {\n $value = intval($value);\n }\n\n return $value;\n }",
"public static function true(): self\n {\n return self::fromValue(Value::true());\n }",
"function b2s($b) {\n return ($b) ? 'TRUE' : 'FALSE';\n}",
"public function toBoolean(): bool\n {\n return !!$this->getValue();\n }",
"function boolval($var) {\r\n if (is_bool($var)) { return $var; }\r\n switch ($var) {\r\n case 'true': return true;\r\n case 'false': return false;\r\n default: throw new InvalidArgumentException('Cannot parse value '.$var);\r\n }\r\n}",
"protected function _toBoolean($value)\n\t{\n\t\tif (is_bool($value)) {\n\t\t\treturn $value;\n\t\t}\n\t\tif (is_int($value) || is_float($value)) {\n\t\t\treturn ($value !== 0);\n\t\t}\n\t\tif (is_string($value)) {\n\t\t\treturn ($value === 't' || $value === 'T' || $value === 'true');\n\t\t}\n\t\treturn (boolean)$value;\n\t}",
"public function isTrue()\n {\n \n return !!$this->value;\n \n }",
"function converter(&$value, $key){\n if($value === \"true\") {\n $value = TRUE;\n } elseif ($value === \"false\") {\n $value = FALSE;\n }\n if ($key === \"not\") {\n if ($value === \"1\") {\n $value = TRUE;\n }\n if ($value === \"0\") {\n $value = FALSE;\n }\n }\n }",
"public static function valueOf($arg)\n {\n if ($arg instanceof self) {\n return $arg;\n } else {\n return new self((bool)$arg);\n }\n }",
"function boolval($in, $strict = false) {\n\t\tif (is_bool($in)){\n\t\t\treturn $in;\n\t\t}\n\t\t$in = strtolower($in);\n\t\t$out = null;\n\t\tif (in_array($in, array('false', 'no', 'n', 'off', '0', 0, null), true)) {\n\t\t\t$out = false;\n\t\t} else if ($strict) {\n\t\t\tif (in_array($in, array('true', 'yes', 'y', 'on', '1', 1), true)) {\n\t\t\t\t$out = true;\n\t\t\t}\n\t\t} else {\n\t\t\t$out = ($in ? true : false);\n\t\t}\n\t\treturn $out;\n\t}",
"public function bool_to_bit( $value ) {\n\t\treturn ( ! empty( $value ) && 'false' !== $value ) ? '1' : '';\n\t}",
"function &bool(bool $value, string $namespace = 'default'): bool\n{\n $var = new Variable\\BoolVariable($value);\n Repository::add($var, $namespace);\n return $var->getValue();\n}",
"public function toBool()\n {\n $this->value = (bool) $this->value;\n\n return $this;\n }",
"public function getBoolField()\n {\n $value = $this->get(self::BOOL_FIELD);\n return $value === null ? (boolean)$value : $value;\n }",
"static function convertirBooleanToInt($bool) {\n if (is_bool($bool))\n return ($bool) ? 1 : 0;\n else\n return null;\n }",
"function bool_to_string($value) {\n return $value ? 'true' : 'false';\n }",
"public function intToBool()\n {\n /** @var ActiveRecord $activeRecord */\n $activeRecord = $this->owner;\n\n foreach ($activeRecord->getTableSchema()->columns as $column) {\n if (\n is_int($activeRecord->{$column->name})\n && $column->size === 1\n ) {\n $activeRecord->{$column->name} = (bool)$activeRecord->{$column->name};\n }\n }\n }",
"static function toBoolean ($v)\n {\n return is_string ($v) ? get (self::$BOOLEAN_VALUES, $v, false) : boolval ($v);\n }",
"function toBool ($value) {\n assert(count(func_get_args()) == 1);\n if (is_scalar($value)) {\n $convertedValue = filter_var($value, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE);\n if ($convertedValue !== null)\n return $convertedValue;\n }\n if (is_object($value) && hasMember($value, 'toBool'))\n return toBool($value->toBool());\n throw new RuntimeException('Unable to convert to bool.');\n}",
"public function getBool(): bool;",
"public function isScalar()\n {\n return \\is_scalar($this->value);\n }",
"public function isScalar()\n {\n return $this->type === self::SCALAR_TPYE;\n }",
"protected function _castValue ( $value ) {\n\t\t\tswitch ( $this->_settingType ) {\n\t\t\t\tcase self::TYPE_BOOLEAN: return $value == \"true\" ? true : false;\n\t\t\t\tcase self::TYPE_SWITCH: return $value ? \"on\" : \"off\";\n\t\t\t\tcase self::TYPE_INTEGER: return intval ( $value );\n\t\t\t\tcase self::TYPE_STRING: return \"$value\";\n\t\t\t\tdefault: return \"\";\n\t\t\t}\n\t\t}",
"function rest_sanitize_boolean($value)\n {\n }",
"static protected function evaluateScalar($scalar) {\n\t\t$scalar = trim ( $scalar );\n\t\t\n\t\tswitch (true) {\n\t\t\tcase 'null' == strtolower ( $scalar ) :\n\t\t\tcase '' == $scalar :\n\t\t\tcase '~' == $scalar :\n\t\t\t\treturn null;\n\t\t\tcase 0 === strpos ( $scalar, '!str' ) :\n\t\t\t\treturn ( string ) substr ( $scalar, 5 );\n\t\t\tcase 0 === strpos ( $scalar, '! ' ) :\n\t\t\t\treturn intval ( self::parseScalar ( substr ( $scalar, 2 ) ) );\n\t\t\tcase 0 === strpos ( $scalar, '!!php/object:' ) :\n\t\t\t\treturn unserialize ( substr ( $scalar, 13 ) );\n\t\t\tcase ctype_digit ( $scalar ) :\n\t\t\t\t$raw = $scalar;\n\t\t\t\t$cast = intval ( $scalar );\n\t\t\t\treturn '0' == $scalar [0] ? octdec ( $scalar ) : ((( string ) $raw == ( string ) $cast) ? $cast : $raw);\n\t\t\tcase in_array ( strtolower ( $scalar ), array ('true', 'on', '+', 'yes', 'y' ) ) :\n\t\t\t\treturn true;\n\t\t\tcase in_array ( strtolower ( $scalar ), array ('false', 'off', '-', 'no', 'n' ) ) :\n\t\t\t\treturn false;\n\t\t\tcase is_numeric ( $scalar ) :\n\t\t\t\treturn '0x' == $scalar [0] . $scalar [1] ? hexdec ( $scalar ) : floatval ( $scalar );\n\t\t\tcase 0 == strcasecmp ( $scalar, '.inf' ) :\n\t\t\tcase 0 == strcasecmp ( $scalar, '.NaN' ) :\n\t\t\t\treturn - log ( 0 );\n\t\t\tcase 0 == strcasecmp ( $scalar, '-.inf' ) :\n\t\t\t\treturn log ( 0 );\n\t\t\tcase preg_match ( '/^(-|\\+)?[0-9,]+(\\.[0-9]+)?$/', $scalar ) :\n\t\t\t\treturn floatval ( str_replace ( ',', '', $scalar ) );\n\t\t\tcase preg_match ( self::getTimestampRegex (), $scalar ) :\n\t\t\t\treturn strtotime ( $scalar );\n\t\t\tdefault :\n\t\t\t\treturn ( string ) $scalar;\n\t\t}\n\t}",
"function PrepBool(&$bool,$blnNullable = true) {\n $bool = (integer)$bool;\n }",
"public function testCastToBooleanTrue($data) {\n\t\t$this->assertTrue(Convertor::cast($data), \"[{$data}] is not Boolean TRUE\");\n\t}",
"function format_bool(mixed $input): string\n{\n return $input ? 'true' : 'false';\n}",
"public function boolToInt()\n {\n /** @var ActiveRecord $activeRecord */\n $activeRecord = $this->owner;\n\n foreach ($activeRecord->getTableSchema()->columns as $column) {\n if (is_bool($activeRecord->{$column->name}) && in_array($column->type, static::INTEGER_SCHEMA_TYPES)) {\n $activeRecord->{$column->name} = $activeRecord->{$column->name} ? 1 : 0;\n }\n }\n }",
"private function convert_to_boolean_attributes() {\n foreach ($this->attributes() as $attr => $val) {\n if (preg_match('/^can_/', $attr) || preg_match('/^is_/', $attr)) {\n $this->$attr = ($val == '1');\n }\n }\n }",
"static public function SQLBooleanValue( $value, $trueValue, $falseValue, $datatype = self::SQLVALUE_TEXT )\r\n\t{\r\n\t\tif( self::GetBooleanValue( $value ) )\r\n\t\t{\r\n\t\t $return_value = self::SQLValue( $trueValue, $datatype );\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t $return_value = self::SQLValue( $falseValue, $datatype );\r\n\t\t}\r\n\t\treturn $return_value;\r\n\t}",
"public final function & toBoolean () {\n # As previously written, go recursive down to find the toBoolean value of\n # a DT object;\n if ($this->varContainer instanceof B) {\n # Return the toBoolean () call of the function;\n return $this->varContainer->toBoolean ();\n } else {\n # Return the varContainer;\n return $this->varContainer;\n }\n }",
"function sqlBool($b, $db){\n\t$b = $db->real_escape_string($b);\n\tif ($b) return '1';\n\telse return '0';\n}",
"public function value2db($value=FALSE)\r\n {\r\n return $value;\r\n }",
"public function value($string)\n {\n switch ($this->type) {\n case Type::BOOL:\n if ($string == 'Y' || $string == '1') {\n return true;\n } else {\n return false;\n }\n break;\n case Type::INT:\n return intval($string);\n break;\n case Type::FLOAT:\n return floatval($string);\n break;\n default:\n return strval($string);\n }\n }",
"protected function toBool($value)\n\t{\n\t\tif ($value === true) {\n\t\t\treturn 'yes';\n\t\t}\n\t\treturn 'no';\n\t}",
"public function getBool(): ?BoolQuery;",
"public function db2value($value=FALSE)\r\n {\r\n return $value;\r\n }",
"public function getRealValue(string $value)\n {\n if ($value === \"true\") {\n return true;\n }\n\n if ($value === \"false\") {\n return false;\n }\n\n return $value;\n }",
"public static function boolean()\n {\n return self::builtinType('bool');\n }",
"public static function toBool($value) : bool\n\t{\n\t\tswitch(true) {\n\n\t\t\tcase is_bool($value) :\n\t\t\t\treturn $value;\n\n\t\t\tcase is_null($value) :\n\t\t\t\treturn false;\n\n\t\t\tcase is_scalar($value) :\n\t\t\t\treturn Str::toBool((string)$value);\n\n\t\t\tdefault :\n\t\t\t\treturn ! self::isEmpty($value);\n\t\t}\n\t}",
"public function toBoolean(): bool\n {\n return $this->boolean;\n }",
"function toBoolean(){\n\t\tif(in_array($this->lower(),array('','false','off','no','n','f'))){\n\t\t\treturn false;\n\t\t}\n\t\treturn (bool)$this->toString();\n\t}",
"public function getValue()\n {\n $value = $this->value;\n\n switch ($this->type) \n {\n case 'boolTrue':\n $value = true;\n break;\n\n case 'boolFalse':\n $value = false;\n break;\n\n case 'string':\n $value = str_replace(\"\\\\\", \"\", substr($value, 1, -1));\n break;\n\n case 'number':\n $value = $value + 0;\n break;\n\n case 'null':\n $value = null;\n break;\n }\n\n return $value;\n }",
"public static function boolean()\n {\n return Type::boolean();\n }",
"public function isValue()\n {\n return\n $this->type === 'string' ||\n $this->type === 'number' ||\n $this->type === 'null' ||\n $this->type === 'boolTrue' ||\n $this->type === 'boolFalse';\n }",
"public function toBoolean()\n {\n $key = $this->toLowerCase()->str;\n $map = array(\n 'true' => true,\n '1' => true,\n 'on' => true,\n 'yes' => true,\n 'false' => false,\n '0' => false,\n 'off' => false,\n 'no' => false,\n );\n\n if (array_key_exists($key, $map)) {\n return $map[$key];\n } elseif (is_numeric($this->str)) {\n return ((int) $this->str > 0);\n } else {\n return (bool) $this->regexReplace('[[:space:]]', '')->str;\n }\n }",
"abstract public function unescapeBoolean($bool);",
"function bool_s($boolean) {\n\treturn ($boolean ? 'true' : 'false');\n}",
"function mm_auto_update_make_bool( $value, $default = true ) {\n\tif ( 'false' === $value ) { $value = false; }\n\tif ( 'true' === $value ) { $value = true; }\n\tif ( true !== $value && false !== $value ) { $value = $default; }\n\treturn $value;\n}",
"function stage_bool_to_string($bool)\n{\n if (! is_bool($bool)) {\n $bool = wc_string_to_bool($bool);\n }\n return true === $bool ? 'yes' : 'no';\n}",
"public function testGetDataTableBooleanDataType() {\r\n\t\t// Insert border values into database\r\n\t\t$this->executeQuery('insert into POTEST (UUID, BOOLEAN_VALUE) values (\\'testuuid0\\',0)');\r\n\t\t$this->executeQuery('insert into POTEST (UUID, BOOLEAN_VALUE) values (\\'testuuid1\\',1)');\r\n\t\t// Extract datatable\r\n\t\t$datatable = $this->getPersistenceAdapter()->getDataTable('select BOOLEAN_VALUE from POTEST order by UUID');\r\n\t\t$datamatrix = $datatable->getDataMatrix();\r\n\t\t// Check strings for correct conversion\r\n\t\t$this->assertEquals('0', $datamatrix[0][0], 'Minimum boolean value is not converted to string as expected.');\r\n\t\t$this->assertEquals('1', $datamatrix[1][0], 'Maximum boolean value is not converted to string as expected.');\r\n\t}",
"static function toBoolean($data)\r\n {\r\n if(!is_string($data))\r\n return (bool) $data;\r\n switch(strtolower($data)) {\r\n case '1':\r\n case 'TRUE':\r\n case 'on':\r\n case 'yes':\r\n case 'y':\r\n return TRUE;\r\n default:\r\n return FALSE;\r\n }\r\n }",
"private function bool($value)\n\t{\n\t\t// We do *not* follow the string 0 php casting rule.\n\t\t// {if field} should be true if the user entered\n\t\t// something. Doesn't matter what it is.\n\t\tif ($value === '0')\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\n\t\treturn (bool) $value;\n\t}",
"function sanitize_bool( $value, $key, array $data ) {\n\tif ( is_bool( $value ) ) {\n\t\treturn $value;\n\t} elseif ( is_numeric( $value ) ) {\n\t\treturn (bool) $value;\n\t} elseif ( is_string( $value ) ) {\n\t\tif ( in_array( strtolower( $value ), array( 'true', 'on', 'yes' ), true ) ) {\n\t\t\treturn true;\n\t\t} elseif ( in_array( strtolower( $value ), array( 'false', 'off', 'no' ), true ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\treturn (bool) $value;\n}",
"function isBoolType($a = 0)\n{\n $b = (boolean)$a;\n\n echo \"число $a при переводе в булев тип изменится на '$b ' <br/>\n так как при переводе значение boolean будет = false(по правилам приведения типов)\";\n echo \"<br>\";\n var_dump($a, $b);\n}",
"function get_bool_or_null($value)\r\n{\r\n $temp = null ;\r\n\r\n if(is_null($value)){\r\n\r\n $temp .= \"<code style='font_size: 9px ; color:#3465a4 '>\" . PHP_EOL ;\r\n \r\n $temp .= 'null' . PHP_EOL;\r\n \r\n $temp .= \"</code><br>\"; \r\n\r\n }else if(is_bool($value)){\r\n $temp .= '<code style=\"font_size: 10px\">boolean </code>';\r\n \r\n $temp .= \"<code style='font_size: 9px ; color:#75507b '>\" . PHP_EOL ;\r\n \r\n $temp .= $value == true ? 'true' : 'false' . PHP_EOL;\r\n \r\n $temp .= \"</code><br>\";\r\n \r\n }\r\n\r\n return $temp ;\r\n}",
"public function toBooleanFilter($value)\n {\n return $value == '1' || $value == '0'\n ? filter_var($value, FILTER_VALIDATE_BOOLEAN)\n : $value;\n }",
"public static function prepareBool($value)\n {\n return (bool) $value;\n }",
"function bool(): Closure\n{\n return function ($value): bool {\n return (bool)$value;\n };\n}",
"public function toBool(): bool\n\t{\n\t\treturn false;\n\t}",
"public static function bool(): Type\n {\n return new Type(null, 'bool');\n }",
"function bool2str($data)\n {\n TRUE === $data && $data = 'true';\n FALSE === $data && $data = 'false';\n return $data;\n }",
"public function isScalar(): bool\n {\n return $this->phpType === self::INTEGER\n || $this->phpType === self::FLOAT\n || $this->phpType === self::STRING\n || $this->phpType === self::BOOLEAN\n || $this->phpType === self::NULL;\n }",
"function scalarReturnType($param1): bool {}",
"public function coerce($mValue) {\n if ($this->isNullable()) {\n if ($mValue === null || strtolower($mValue) === 'null' || $mValue === '') {\n return null;\n }\n }\n\n if ($mValue === 1 || $mValue === '1' || strtolower($mValue) === 'true') {\n return true;\n }\n\n if ($mValue === null || $mValue === 0 || $mValue === '0' || strtolower($mValue) === 'false') {\n return false;\n }\n\n if (is_array($mValue) && count($mValue) === 1) {\n return $this->coerce(reset($mValue));\n }\n\n return $mValue;\n }",
"public function convertValue(string $value)\n {\n if(preg_match('/^\\d+$/',$value)) {\n return (int) $value;\n }\n\n if(preg_match('/^\\d+[.]\\d+$/',$value)) {\n return (double) $value;\n }\n\n switch ($value) {\n case \"on\" :\n case \"yes\":\n case \"true\":\n return true;\n case \"off\":\n case \"no\":\n case \"false\":\n return false;\n default:\n return $value;\n }\n }",
"public static function normalize($value)\n {\n if ($value === true) {\n $value = \"true\";\n } elseif ($value === false) {\n $value = \"false\";\n }\n\n return $value;\n }",
"protected function castValue($cast, $value)\n {\n switch ($cast) {\n case 'integer';\n $value = (integer) $value;\n break;\n case 'boolean';\n $value = in_array($value, array('true', 't', 'yes', 'y'));\n break;\n case 'string':\n default:\n $value = (string) $value;\n }\n\n return $value;\n }",
"private function dbFeedBack($bool){\n if($bool == FALSE){\n //display '0' as false\n return \"{0}\"; \n }\n else{\n //display 1 as true\n return \"{1}\";\n } \n }",
"public static function value()\n {\n $args = func_get_args();\n $output = array_pop( $args );\n\n foreach( $args as $value )\n {\n if( $value || $value === false || $value === 0 )\n {\n return $value;\n }\n }\n return $output;\n }",
"public function set($value)\n\t{\n\t\treturn filter_var($value, FILTER_VALIDATE_BOOLEAN);\n\t}",
"public function set($value)\n\t{\n\t\treturn filter_var($value, FILTER_VALIDATE_BOOLEAN);\n\t}",
"public function testEmptyObjectCastedToBoolGivesTrue() {\n\t\t$this->asserttrue((bool)new stdClass());\n\t}",
"public function bool()\n {\n return filter_var($this->value, FILTER_VALIDATE_BOOLEAN);\n }",
"abstract public function cast($value);",
"abstract public function escapeBoolean($bool);",
"function read_boolean(&$payload) {\n return (bool) read_byte($payload);\n}",
"public function testBooleanField()\n {\n $field = $this->table->getField('trueorfalse'); // Boolean\n $this->assertInstanceOf('Metrol\\DBTable\\Field\\PostgreSQL\\Boolean',\n $field);\n $this->assertEquals('trueorfalse', $field->getName());\n\n $this->assertTrue($field->getPHPValue(1));\n $this->assertFalse($field->getPHPValue(0));\n $this->assertNull($field->getPHPValue(null));\n\n $this->assertTrue($field->isNullOk());\n $this->assertNull($field->getDefaultValue());\n\n $field = $this->table->getField('falsedef'); // Boolean, No Nulls, default False\n $this->assertInstanceOf('Metrol\\DBTable\\Field\\PostgreSQL\\Boolean', $field);\n $this->assertEquals('falsedef', $field->getName());\n\n $this->assertFalse($field->getPHPValue(null));\n\n // Check for an exception when in strict\n $field->setStrictValues();\n $x = false;\n\n try\n {\n $field->getPHPValue(null);\n }\n catch ( RangeException )\n {\n $x = true;\n }\n\n $this->assertTrue($x);\n\n $field = $this->table->getField('truedef'); // Boolean, No Nulls, default true\n $this->assertInstanceOf('Metrol\\DBTable\\Field\\PostgreSQL\\Boolean', $field);\n $this->assertEquals('truedef', $field->getName());\n\n $this->assertTrue($field->getPHPValue(null));\n $boundVal = $field->getSqlBoundValue(null);\n $valMarker = $boundVal->getValueMarker();\n\n $this->assertEquals('true', $boundVal->getBoundValues()[$valMarker]);\n }",
"public function wt_parse_bool_field($value) {\n if ('0' === $value) {\n return false;\n }\n\n if ('1' === $value) {\n return true;\n }\n\n // Don't return explicit true or false for empty fields or values like 'notify'.\n return wc_clean($value);\n }",
"private function formatScalarValue($value): string\n {\n if ($value === true) {\n return 'true';\n }\n if ($value === false) {\n return 'false';\n }\n if (is_float($value)) {\n return StringHelper::floatToString($value);\n }\n return (string)$value;\n }",
"public function scrubBool(bool $data) : bool;",
"public function testSaveDataTableBooleanDataType() {\r\n\t\t$minvalue = '0';\r\n\t\t$maxvalue = '1';\r\n\t\t// Store datatable\r\n\t\t$datatable = new avorium_core_data_DataTable(2, 2);\r\n\t\t$datatable->setHeader(0, 'UUID');\r\n\t\t$datatable->setHeader(1, 'BOOLEAN_VALUE');\r\n\t\t$datatable->setCellValue(0, 0, 'testuuid0');\r\n\t\t$datatable->setCellValue(0, 1, $minvalue);\r\n\t\t$datatable->setCellValue(1, 0, 'testuuid1');\r\n\t\t$datatable->setCellValue(1, 1, $maxvalue);\r\n\t\t$this->getPersistenceAdapter()->saveDataTable('POTEST', $datatable);\r\n\t\t// Read database via SQL\r\n\t\t$results = $this->executeQuery('select BOOLEAN_VALUE from POTEST order by UUID');\r\n\t\t// Compare values\r\n\t\t$this->assertEquals($minvalue, $results[0][0], 'Minimum boolean value is not converted from string as expected.');\r\n\t\t$this->assertEquals($maxvalue, $results[1][0], 'Maximum boolean value is not converted from string as expected.');\r\n\t}",
"public static function and_() {\n $result = new qti_variable('single', 'boolean', array('value' => true));\n $params = func_get_args();\n // Allow a single array as well as a parameter list\r\n if (count($params) == 1 && is_array($params[0])) {\r\n $params = $params[0];\r\n }\r\n foreach($params as $param) {\n if (!$param->value) {\n $result->value = false;\n return $result;\n }\n }\n return $result;\n }"
] | [
"0.7370923",
"0.701105",
"0.6979908",
"0.690697",
"0.67470014",
"0.6742344",
"0.668433",
"0.66799223",
"0.6673737",
"0.6666962",
"0.6644106",
"0.63914806",
"0.6372305",
"0.6365125",
"0.6295929",
"0.62507737",
"0.613024",
"0.61121047",
"0.60820866",
"0.60666656",
"0.6060294",
"0.6054228",
"0.60501236",
"0.6041763",
"0.60350835",
"0.60098314",
"0.60049254",
"0.5986227",
"0.5985051",
"0.597869",
"0.59750575",
"0.5950803",
"0.595049",
"0.59480846",
"0.5938011",
"0.59055483",
"0.589805",
"0.5897678",
"0.58920544",
"0.5890026",
"0.58832264",
"0.5873988",
"0.5864041",
"0.58525014",
"0.5816535",
"0.5816207",
"0.58017486",
"0.5801546",
"0.5796929",
"0.57844156",
"0.5779116",
"0.5771862",
"0.576645",
"0.57646465",
"0.5759557",
"0.5750148",
"0.57324827",
"0.56993914",
"0.5688616",
"0.5681787",
"0.5679858",
"0.56738514",
"0.56694484",
"0.5669169",
"0.56351894",
"0.5620542",
"0.56200397",
"0.56177264",
"0.5617213",
"0.56160206",
"0.56159306",
"0.56113863",
"0.56081223",
"0.55977446",
"0.5576967",
"0.55555165",
"0.55487156",
"0.5536914",
"0.55299747",
"0.55292124",
"0.55128014",
"0.5512525",
"0.5510661",
"0.55101526",
"0.5508538",
"0.55040926",
"0.5498538",
"0.54937863",
"0.5493625",
"0.5493625",
"0.54925036",
"0.5492495",
"0.5485985",
"0.5485359",
"0.54815596",
"0.54786223",
"0.546365",
"0.54613006",
"0.54590046",
"0.5449856",
"0.5441349"
] | 0.0 | -1 |
Cast value from scalar to type | public function fromString(string $value): \DateTime
{
return new \DateTime($value);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public function cast($value);",
"function cast($field, $value) {\n\t\t// if the column doesn't exist, don't cast the value\n\t\tif (!isset($this->columns[$field])) {\n\t\t\treturn $value;\n\t\t}\n\n\t\t// precast arrays\n\t\tif (is_array($value)) {\n\t\t\t$value = $this->columns[$field]->array_to_type(array_values($value));\n\t\t}\n\n\t\t// cast value\n\t\t$value = $this->columns[$field]->type_cast($value);\n\n\t\treturn $value;\n\n\t}",
"private function castValue($type, $value)\n {\n switch ($type) {\n case 'number':\n $value = (int) $value;\n break;\n case 'boolean':\n $value = boolval($value);\n break;\n case 'map':\n case 'object':\n $value = json_decode($value);\n break;\n default:\n break;\n }\n\n return $value;\n }",
"protected function typeCast($value) {\n\t\t# Cast\n\t\treturn (int) $value;\n\t}",
"protected function typecast($value)\n {\n if ($value === ''\n && !in_array(\n $this->type,\n [\n Schema::TYPE_TEXT,\n Schema::TYPE_STRING,\n Schema::TYPE_BINARY,\n Schema::TYPE_CHAR\n ],\n true)\n ) {\n return null;\n }\n\n if ($value === null\n || gettype($value) === $this->phpType\n || $value instanceof ExpressionInterface\n || $value instanceof Query\n ) {\n return $value;\n }\n\n if (is_array($value)\n && count($value) === 2\n && isset($value[1])\n && in_array($value[1], $this->getPdoParamTypes(), true)\n ) {\n return new PdoValue($value[0], $value[1]);\n }\n\n switch ($this->phpType) {\n case 'resource':\n case 'string':\n if (is_resource($value)) {\n return $value;\n }\n if (is_float($value)) {\n // ensure type cast always has . as decimal separator in all locales\n return str_replace(',', '.', (string) $value);\n }\n return (string) $value;\n case 'integer':\n if (is_bool($value)) {\n return ($value) ? 1 : 0;\n }\n return (int) $value;\n case 'boolean':\n return (boolean) $value;\n case 'double':\n return (double) $value;\n }\n\n return $value;\n }",
"abstract public function convertFromRawValue($value);",
"function variant_cast($variant, $type) {}",
"protected function _typecast($value) {\n\t\t$type = null;\t\t\n\n\t\tif (is_string($value)) {\n\t\t\t$type = 'string';\n\t\t}\n\t\tif (is_int($value)) {\n\t\t\t$type = 'int';\n\t\t}\n\t\tif (is_float($value)) {\n\t\t\t$type = 'double';\n\t\t}\n\t\tif (is_bool($value)) {\n\t\t\t$type = 'boolean';\n\t\t}\n\t\tif (is_array($value)) {\n\t\t\t$type = 'array';\n\t\t\t\n\t\t\t$valueKeys = array_keys($value);\n\t\t\tforeach($valueKeys as $vk) {\n\t\t\t\tif (!is_numeric($vk)) {\n\t\t\t\t\t$type = 'struct';\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $type;\n\t}",
"static function get_value($value, $type) {\n switch ($type) {\n case 'int':\n return (int)$value;\n break;\n case 'string':\n case 'text':\n case 'reference':\n return $value;\n break;\n case 'bool':\n return str_to_bool($value);\n break;\n case 'float':\n case 'double':\n return (float)$value;\n break;\n }\n\n return null;\n }",
"public function castTyped( // phpcs:ignore\n $value\n ): string;",
"public function cast($toType, $value) {\n\t\t$let = new DynamicScope(['*type-hint*' => $toType]);\n\t\treturn call_user_func($this->GetErForType('convert', $toType), $value);\n\t}",
"public function dbTypecast($value)\n {\n // to override this with annotation of explicit PDO type.\n return $this->typecast($value);\n }",
"function variant_cast($variant, $type)\n{\n}",
"public static function convertToNativeType($field, $value)\n {\n switch($field[\"type\"])\n {\n case \"number\":\n if(isset($field[\"field_options\"][\"integer_only\"]) && $field[\"field_options\"][\"integer_only\"])\n return intval($value);\n else\n return floatval($value);\n break; // defensive but not necessary\n case \"date\": // @todo: use a format attribute within field options accordig to date_parse_from_format function\n return $value;\n break;\n // @todo: file\n default:\n return $value;\n }\n }",
"public function cast( // phpcs:ignore\n $value\n ): string;",
"public function castType($value=null)\n {\n if (!is_null($value)) return (float)$value;\n return 0;\n }",
"private static function castToType($value) {\n if ($value == \"true\" || $value == \"1\")\n return true;\n\n if ($value == \"false\" || $value == \"0\")\n return false;\n\n return $value;\n\n }",
"public function cast(string $type)\n {\n switch ($type) {\n case 'int':\n return intval($this->get());\n case 'string':\n return strval($this->get());\n case 'float':\n return floatval($this->get());\n case 'array':\n return $this->castToArray($this->get());\n case 'date':\n return $this->castToDate($this->get());\n default:\n return $this->defaultCast($type, $this->get());\n }\n }",
"abstract public function convertFromDb($value, Entity\\ScalarField $field);",
"function fromDB($value, $type) {\n\t\t//everything is nullable\n\t\tif($value === null) return null;\n\t\t\n\t\tswitch($type) {\n\t\t\tcase 'datetime': // ISO-8601\n\t\t\tcase 'date':\n\t\t\t\treturn new DateTime($value);\n\t\t\tcase 'integer':\n\t\t\t\treturn (int) $value;\n\t\t\tcase 'boolean':\n\t\t\t\treturn (bool) $value;\n\t\t}\n\t\treturn $value;\n\t}",
"public function getValueType();",
"public function fromRaw($value)\n {\n $type = $this->getDataType();\n\n if ($type === 'json') {\n $value = json_decode($value, true);\n } elseif ($type === 'array') {\n $value = (array) $value;\n } elseif ($type === 'list') {\n $value = explode(',', $value);\n } elseif ($type === 'boolean') {\n $value = (bool) $value;\n } elseif ($type === 'integer') {\n $value = (int) $value;\n } elseif ($type === 'float') {\n $value = (float) $value;\n }\n\n return $value;\n }",
"function o_castInt($value) {\n\t\t\treturn Obj::singleton()->castInt($value);\n\t\t}",
"public static function getValue($value)\n\t{\n\t\tif(is_string($value)) {\n\t\t\tif($value instanceof DataTypes\\TypeString) {\n\t\t\t\treturn $value;\n\t\t\t} else {\n\t\t\t\treturn new DataTypes\\TypeString($value);\n\t\t\t}\n\t\t} else if(is_int($value)) {\n\t\t\tif($value instanceof DataTypes\\TypeInt) {\n\t\t\t\treturn $value;\n\t\t\t} else {\n\t\t\t\treturn new DataTypes\\TypeInt($value);\n\t\t\t}\n\t\t} else if(is_float($value)) {\n\t\t\tif($value instanceof DataTypes\\TypeFloat) {\n\t\t\t\treturn $value;\n\t\t\t} else {\n\t\t\t\treturn new DataTypes\\TypeFloat($value);\n\t\t\t}\n\t\t} else if(is_array($value)) {\n\t\t\tif($value instanceof DataTypes\\TypeArray) {\n\t\t\t\treturn $value;\n\t\t\t} else {\n\t\t\t\treturn new DataTypes\\TypeArray($value);\n\t\t\t}\n\t\t} else if(is_bool($value)) {\n\t\t\tif($value instanceof DataTypes\\TypeBool) {\n\t\t\t\treturn $value;\n\t\t\t} else {\n\t\t\t\treturn new DataTypes\\TypeBool($value);\n\t\t\t}\n\t\t}\n\t\treturn $value;\n\t}",
"private static function valueFromType($value, $type)\n {\n if ($value === null)\n {\n return null;\n }\n \n switch ($type)\n {\n case 'bool':\n case 'boolean':\n return (bool) $value;\n \n case 'int':\n case 'integer':\n return (int) $value;\n \n case 'lob':\n return stream_get_contents($value);\n \n case 'base64':\n return base64_decode($value);\n \n case 'date':\n case 'time':\n case 'timestamp':\n return strtotime($value);\n \n case 'string':\n case 'istring':\n default:\n return (string) $value;\n }\n }",
"private static function doConvertType($value, $type) {\n switch ($type) {\n case 'def' :\n $newValue = self::convertTextContent($value);\n break;\n case 'int' :\n $newValue = (int) $value;\n break;\n case 'array':\n return $value;\n break;\n case 'double' :\n $value = str_replace('.', '', $value);\n $value = str_replace(',', '.', $value);\n $newValue = doubleval($value);\n break;\n case 'currency_format' :\n $newValue = self::currency_format($value);\n break;\n default :\n if (get_magic_quotes_gpc() == 0) {\n $value = addslashes($value);\n }\n $newValue = htmlspecialchars($value);\n break;\n }\n return $newValue;\n }",
"public function castValue($value, $type = null, $length = false)\n {\n return $this->source->castValue($value, $type, $length);\n }",
"abstract public function getValueType();",
"protected function castValue($value)\n {\n switch ($value) {\n case 'false':\n return false;\n\n case 'true':\n return true;\n }\n\n if (is_numeric($value)) {\n $value = intval($value);\n }\n\n return $value;\n }",
"public function getCast()\n {\n $result = $this->getType();\n if ($result == \"date\")\n $result = \"string\";\n if ($result == \"datetime\")\n $result = \"string\";\n if ($result == \"enum\")\n $result = \"string\";\n if ($result == \"time\")\n $result = \"string\";\n // BIT, TIMESTAMP, VARBINARY, BLOB\n return \"(\" . $result . \")\";\n }",
"protected function castify($value)\n {\n if (preg_match('/^\\-?([0-9]+)$/', $value)) {\n return intval($value);\n }\n\n if (preg_match('/^\\-?\\d+(\\.\\d+)?$/', $value)) {\n // @todo fix json returning float values.\n // return floatval($value);\n\n return $value;\n }\n\n return $value;\n }",
"public function typeCast(string $type, $value)\n {\n switch ($type) {\n case self::TYPE_INT:\n $value = intval($value);\n break;\n case self::TYPE_FLOAT:\n $value = floatval($value);\n break;\n case self::TYPE_STRING:\n $value = (string)$value;\n break;\n default:\n throw new \\Madj2k\\SoapApi\\Exception(\n sprintf('Invalid data type \"%s\"', $type),\n 1690524571\n );\n }\n\n return $value;\n }",
"protected function _cast($type, $value, $column, $schema = [])\n\t{\n\t\t$column += ['formatter' => null, 'format' => null];\n\t\t$schema += ['default' => null, 'null' => false];\n\n\t\tif (is_object($value)) {\n\t\t\treturn $value;\n\t\t}\n\t\tif ($formatter = $column['formatter']) {\n\t\t\t$format = $column['format'];\n\t\t\treturn $format ? $formatter($format, $value) : $formatter($value);\n\t\t}\n\t\treturn $this->connection->quote($value);\n\t}",
"public static function castFieldValue($value, $type)\n {\n if ($value === null || is_string($value)) {\n return $value;\n }\n\n if ($type === 'dateTime' && $value instanceof DateTime) {\n return (string)$value->getTimestamp();\n }\n\n if ($type === 'integer' && is_int($value)) {\n return sprintf('%011d', $value);\n }\n\n if ($type === 'double' && is_float($value)) {\n // 123.15 => 00000000123.15000, padding to 11 numbers before and padding to 5 behind decimal point\n return sprintf('%017.5f', $value);\n }\n\n if ($type === 'boolean' && is_bool($value)) {\n return $value ? '1' : '0';\n }\n\n if ($type === 'array' && is_array($value)) {\n return array_values($value);\n }\n\n return null;\n }",
"protected function castValue($cast, $value)\n {\n switch ($cast) {\n case 'integer';\n $value = (integer) $value;\n break;\n case 'boolean';\n $value = in_array($value, array('true', 't', 'yes', 'y'));\n break;\n case 'string':\n default:\n $value = (string) $value;\n }\n\n return $value;\n }",
"private function castExplicit($key, $value, $collection) {\r\n switch($collection->model->getDbType($key)) {\r\n case 'integer':\r\n return (integer) $value;\r\n case 'float':\r\n return (float) $value;\r\n /*\r\n * PostgreSQL returns ST_AsGeoJSON(geometry) \r\n */\r\n case 'geometry':\r\n return json_decode($value, true);\r\n case 'array':\r\n return explode(',', substr($value, 1, -1));\r\n default:\r\n return $value;\r\n }\r\n }",
"public function convertToPHPValue($value);",
"function convertTo ($type, $value) {\n assert(count(func_get_args()) == 2);\n if ($type == 'bool')\n return toBool($value);\n if ($type == 'float')\n return toFloat($value);\n if ($type == 'int')\n return toInt($value);\n if ($type == 'string')\n return toString($value);\n if (is_a($value, $type))\n return $value;\n throw new RuntimeException('Unable to convert to *' . $type . '*.');\n}",
"private function _convertType(&$value='', $type='string')\n {\n switch($type){\n case 'string':\n default:\n $this->toString($value);\n break;\n case 'datetime':\n $this->toDateTime($value);\n break;\n case 'int':\n case 'integer':\n $this->toInteger($value);\n break;\n }\n }",
"protected function castAttribute($key, $value)\n {\n if (is_null($value)) {\n return $value;\n }\n switch ($this->getCastType($key)) {\n case 'int':\n case 'integer':\n return (int) $value;\n case 'real':\n case 'float':\n case 'double':\n return (float) $value;\n case 'string':\n return (string) $value;\n case 'bool':\n case 'boolean':\n return (bool) $value;\n case 'object':\n return json_decode($value);\n case 'array':\n case 'json':\n return json_decode($value, true);\n default:\n return $value;\n }\n }",
"final public static function convertValueForSql($type, $value)\n\t{\n\t\tswitch($type)\n\t\t{\n\t\t\tcase Core::TYPE_INTEGER:\n\t\t\t\treturn intval($value);\n\n\t\t\tcase Core::TYPE_FLOAT:\n\t\t\t\treturn floatval($value);\n\t\t\t\tbreak;\n\n\t\t\tcase Core::TYPE_BOOLEAN:\n\t\t\t\treturn $value ? 1 : 0;\n\n\t\t\tcase Core::TYPE_STRING:\n\t\t\t\t$temp\t\t\t=\thtmlspecialchars_decode($value, ENT_QUOTES);\n\t\t\t\t$temp\t\t\t=\thtmlspecialchars($temp, ENT_QUOTES, Core::$current_db_is_utf8 ? 'UTF-8' : 'ISO-8859-1');\n\t\t\t\treturn '\"'.$temp.'\"';\n\n\t\t\tcase Core::TYPE_DATE:\n\t\t\tcase Core::TYPE_TIME:\n\t\t\tcase Core::TYPE_DATETIME:\n\t\t\tcase Core::TYPE_TIMESTAMP:\n\t\t\tcase Core::TYPE_YEAR:\n\t\t\t\t$format\t\t\t=\tnull;\n\n\t\t\t\tif(empty($value)) {\n\t\t\t\t\treturn 'NULL';\n\t\t\t\t}\n\n\t\t\t\tswitch($type)\n\t\t\t\t{\n\t\t\t\t\tcase Core::TYPE_TIME:\t\t$format\t=\t'H:i:s'; break;\n\t\t\t\t\tcase Core::TYPE_DATETIME:\t$format\t=\t'Y-m-d H:i:s'; break;\n\t\t\t\t\tcase Core::TYPE_TIMESTAMP:\t$format\t=\t'YmdHis'; break;\n\t\t\t\t\tcase Core::TYPE_YEAR:\t\t$format\t=\t'Y'; break;\n\t\t\t\t\tcase Core::TYPE_DATE:\t\t$format\t=\t'Y-m-d'; break;\n\t\t\t\t}\n\n\t\t\t\treturn\t'\"'.(is_numeric($value)\n\t\t\t\t\t\t? @date($format, $value)\n\t\t\t\t\t\t: (\n\t\t\t\t\t\t$value instanceof \\DateTime\n\t\t\t\t\t\t\t? $value->format($format)\n\t\t\t\t\t\t\t: $value\n\t\t\t\t\t\t)).'\"';\n\n\t\t\tdefault:\n\t\t\t\treturn $value;\n\t\t}\n\t}",
"protected function _convertValue ($value) {\n switch ($value) {\n case 'null':\n # Null value\n $value = null;\n break;\n\n case 'true':\n # Boolean\n $value = true;\n break;\n\n case 'false':\n # Boolean\n $value = false;\n break;\n\n default:\n if (is_numeric ($value)) {\n\n # Number\n if (preg_match ('/^-?[1-9][0-9]*$/', $value)) {\n\n # Regular 10-base integer\n $value = intval ($value, 10);\n\n } else if (preg_match ('/^-?0[0-7]*$/', $value)) {\n\n # 8-base integer\n $value = intval ($value, 8);\n\n } else if (preg_match ('/^-?0x[0-9a-z]*$/i', $value)) {\n\n # 16-base integer\n $value = intval ($value, 16);\n\n } else {\n\n # Floating point number\n $value = $value + 0;\n\n }\n\n } else {\n\n # String\n /*NOP*/;\n\n }\n }\n return $value;\n }",
"protected function getValCast()\n {\n if (is_null($this->value)) {\n return null;\n }\n if (mb_strpos($this->value, '.') !== false) {\n $temp = rtrim($this->value, '0');\n return ((mb_substr($temp, -1) == '.') ? (int) $this->value : (float) $this->value);\n }\n return (int) $this->value;\n }",
"protected function castAttribute($key, $value)\n {\n if (is_null($value))\n return $value;\n\n switch ($this->getCastType($key))\n {\n case 'int':\n case 'integer':\n return (int)$value;\n case 'real':\n case 'float':\n case 'double':\n return (float)$value;\n case 'string':\n return (string)$value;\n case 'bool':\n case 'boolean':\n return (bool)$value;\n case 'object':\n return $this->fromJson($value, true);\n case 'array':\n case 'json':\n return $this->fromJson($value);\n case 'collection':\n return new BaseCollection($this->fromJson($value));\n default:\n return $value;\n }\n }",
"protected function _castValue ( $value ) {\n\t\t\tswitch ( $this->_settingType ) {\n\t\t\t\tcase self::TYPE_BOOLEAN: return $value == \"true\" ? true : false;\n\t\t\t\tcase self::TYPE_SWITCH: return $value ? \"on\" : \"off\";\n\t\t\t\tcase self::TYPE_INTEGER: return intval ( $value );\n\t\t\t\tcase self::TYPE_STRING: return \"$value\";\n\t\t\t\tdefault: return \"\";\n\t\t\t}\n\t\t}",
"protected function key_to_scalar($key)\n {\n }",
"static protected function evaluateScalar($scalar) {\n\t\t$scalar = trim ( $scalar );\n\t\t\n\t\tswitch (true) {\n\t\t\tcase 'null' == strtolower ( $scalar ) :\n\t\t\tcase '' == $scalar :\n\t\t\tcase '~' == $scalar :\n\t\t\t\treturn null;\n\t\t\tcase 0 === strpos ( $scalar, '!str' ) :\n\t\t\t\treturn ( string ) substr ( $scalar, 5 );\n\t\t\tcase 0 === strpos ( $scalar, '! ' ) :\n\t\t\t\treturn intval ( self::parseScalar ( substr ( $scalar, 2 ) ) );\n\t\t\tcase 0 === strpos ( $scalar, '!!php/object:' ) :\n\t\t\t\treturn unserialize ( substr ( $scalar, 13 ) );\n\t\t\tcase ctype_digit ( $scalar ) :\n\t\t\t\t$raw = $scalar;\n\t\t\t\t$cast = intval ( $scalar );\n\t\t\t\treturn '0' == $scalar [0] ? octdec ( $scalar ) : ((( string ) $raw == ( string ) $cast) ? $cast : $raw);\n\t\t\tcase in_array ( strtolower ( $scalar ), array ('true', 'on', '+', 'yes', 'y' ) ) :\n\t\t\t\treturn true;\n\t\t\tcase in_array ( strtolower ( $scalar ), array ('false', 'off', '-', 'no', 'n' ) ) :\n\t\t\t\treturn false;\n\t\t\tcase is_numeric ( $scalar ) :\n\t\t\t\treturn '0x' == $scalar [0] . $scalar [1] ? hexdec ( $scalar ) : floatval ( $scalar );\n\t\t\tcase 0 == strcasecmp ( $scalar, '.inf' ) :\n\t\t\tcase 0 == strcasecmp ( $scalar, '.NaN' ) :\n\t\t\t\treturn - log ( 0 );\n\t\t\tcase 0 == strcasecmp ( $scalar, '-.inf' ) :\n\t\t\t\treturn log ( 0 );\n\t\t\tcase preg_match ( '/^(-|\\+)?[0-9,]+(\\.[0-9]+)?$/', $scalar ) :\n\t\t\t\treturn floatval ( str_replace ( ',', '', $scalar ) );\n\t\t\tcase preg_match ( self::getTimestampRegex (), $scalar ) :\n\t\t\t\treturn strtotime ( $scalar );\n\t\t\tdefault :\n\t\t\t\treturn ( string ) $scalar;\n\t\t}\n\t}",
"protected function raw_value( $value, $type ) {\n\t\tif ( 'bytes' == $type ) {\n\t\t\t$value = $this->let_to_num( $value );\n\t\t}\n\n\t\treturn $value;\n\t}",
"function convertValue( $value, $type = 'string', $options = array() )\n\t{\n\t\tswitch( $type )\n\t\t{\n\t\t\t//\tstring\n\t\t\tcase 'string':\n\t\t\t\tsettype( $value, 'string' );\n\t\t\t\tbreak;\n\n\t\t\t//\tboolean\n\t\t\tcase 'boolean':\n\t\t\tcase 'bool':\n\t\t\t\tif( $value == 'true' || $value == 'yes' || $value == 'on' )\n\t\t\t\t\t$value\t=\ttrue;\n\t\t\t\telse\n\t\t\t\t\t$value\t=\tfalse;\n\t\t\t\tbreak;\n\n\t\t\t//\tinteger\n\t\t\tcase 'integer':\n\t\t\tcase 'int':\n\t\t\t\tsettype( $value, 'integer' );\n\t\t\t\tbreak;\n\n\t\t\t//\tdouble\n\t\t\tcase 'float':\n\t\t\tcase 'double':\n\t\t\t\tsettype( $value, 'double' );\n\t\t\t\tbreak;\n\n\t\t\t//\tarray\n\t\t\tcase 'array':\n\t\t\t\tif( !is_array( $value ) )\n\t\t\t\t{\n\t\t\t\t\tif( trim( $value ) )\n\t\t\t\t\t\t$value\t=\tarray( $value );\n\t\t\t\t\telse\n\t\t\t\t\t\t$value\t=\tarray();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\t//\tobject\n\t\t\tcase 'object':\n\t\t\t\tif( class_exists( $options['instanceof'] ) )\n\t\t\t\t\t$class = $options['instanceof'];\n\t\t\t\telse\n\t\t\t\t\t$class = 'stdClass';\n\t\t\t\t\t\n\t\t\t\t$value = &new $class( $value );\n\t\t\t\tbreak;\n\n\t\t}\n\t\treturn\t$value;\n\t}",
"public static function castType($data, $type) {\n\t\tswitch (\\mb_strtolower(\\mb_substr( (string) $type, 0, 1))) {\n\t\t\t// string\n\t\t\tcase 's':\n\t\t\t\treturn ((string) $data);\n\t\t\t// integer\n\t\t\tcase 'i':\n\t\t\t\treturn ((integer) $data);\n//TODO: php 7 may have support for this?\n\t\t\t// long\n\t\t\tcase 'l':\n\t\t\t\treturn ((integer) $data);\n\t\t\t// float\n\t\t\tcase 'f':\n\t\t\t\treturn ((float) $data);\n\t\t\t// double\n\t\t\tcase 'd':\n\t\t\t\treturn ((double) $data);\n\t\t\t// boolean\n\t\t\tcase 'b':\n\t\t\t\treturn self::toBoolean($data);\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t\treturn $data;\n\t}",
"private function filter_type( $value ) {\n\t\tif ( empty( $this->type ) ) {\n\t\t\treturn $value;\n\t\t}\n\n\t\tswitch ( $this->type->case() ) {\n\t\t\tcase Schema_Type::NUMBER:\n\t\t\t\treturn (int) $value;\n\n\t\t\tcase Schema_Type::BOOL:\n\t\t\t\treturn (bool) $value;\n\n\t\t\tcase Schema_Type::STRING:\n\t\t\t\treturn (string) $value;\n\n\t\t\tcase Schema_Type::ARRAY:\n\t\t\t\treturn (array) $value;\n\t\t}\n\n\t\treturn $value;\n\t}",
"protected function dataCast($value = null, string $type = null)\n {\n if (null === $value) {\n \n return $value;\n }\n new \\DateTime();\n switch ($type) {\n case self::CONSTRAINT_TYPE_NUMBER:\n return (float) $value;\n case self::CONSTRAINT_TYPE_STRING:\n return (string) $value;\n case self::CONSTRAINT_TYPE_BOOLEAN:\n return (bool) $value;\n case self::CONSTRAINT_TYPE_ARRAY:\n return is_array($value) ? $value : [$value];\n case self::CONSTRAINT_TYPE_DATE:\n if (is_numeric($value)) {\n $unixDate = ($value - 25569) * 86400;\n $value = gmdate(\"Y-m-d H:i:s\", $unixDate);\n $date = new \\DateTime($value);\n \n return (false !== $date) ? $date : null;\n }\n \n $formats = ['Y-m-d H:i:s.v', 'Y-m-d H:i:s', 'Y-m-d'];\n $loop = true; $date = false;\n foreach ($formats as $format) {\n if (!$loop) {\n break;\n }\n $date = DateTime::createFromFormat($format, $value);\n if (false !== $date) {\n $loop = false;\n }\n }\n \n if (false === $date) {\n $date = new \\DateTime($value);\n }\n \n \n return $date;\n default:\n break;\n }\n \n return $value;\n }",
"function set_value_type(&$table, $value)\n{\n\t$tmp_value = trim($value);\n\tif(isset($table))\n\t\t$table = compare_data_type($table, recognize_data_type($value)); //if there already is set data type compare old and now to get the highest one\n\telse\n\t\t$table = (empty($tmp_value) ? NULL : recognize_data_type($value)); //if value (trimmed) is empty set it to NULL, else data type not set and there is a need to recognize it\n}",
"function &typed($value, string $namespace = 'default')\n{\n if (is_bool($value)) {\n return bool($value, $namespace);\n } elseif (is_string($value)) {\n return string($value, $namespace);\n } elseif (is_float($value)) {\n return float($value, $namespace);\n } elseif (is_int($value)) {\n return int($value, $namespace);\n } elseif (is_iterable($value)) {\n return iterable($value, $namespace);\n } elseif (is_callable($value, false)) {\n return func($value, $namespace);\n } elseif (is_object($value)) {\n return object($value, $namespace);\n } else {\n throw new InvalidArgumentException(\n sprintf('Couldn\\'t create a typed variable for \"%s\" type.', gettype($value))\n );\n }\n}",
"public static function correctType($value)\n {\n try {\n if (Str::isBoolean($value)) {\n $value = Str::toBoolean($value);\n } elseif (is_float($value)) {\n $value = floatval($value);\n } elseif (is_int($value)) {\n $value = intval($value);\n }\n } catch (\\Exception $ex) {\n }\n return $value;\n }",
"public function _typecastSaveField(Field $f, $value)\n {\n // work only on copied value not real one !!!\n $v = is_object($value) ? clone $value : $value;\n\n switch ($f->type) {\n case 'boolean':\n // if enum is not set, then simply cast value to integer\n if (!isset($f->enum) || !$f->enum) {\n $v = (int) $v;\n break;\n }\n\n // if enum is set, first lets see if it matches one of those precisely\n if ($v === $f->enum[1]) {\n $v = true;\n } elseif ($v === $f->enum[0]) {\n $v = false;\n }\n\n // finally, convert into appropriate value\n $v = $v ? $f->enum[1] : $f->enum[0];\n break;\n case 'date':\n case 'datetime':\n case 'time':\n $dt_class = isset($f->dateTimeClass) ? $f->dateTimeClass : 'DateTime';\n $tz_class = isset($f->dateTimeZoneClass) ? $f->dateTimeZoneClass : 'DateTimeZone';\n\n if ($v instanceof $dt_class) {\n $format = ['date' => 'Y-m-d', 'datetime' => 'Y-m-d H:i:s', 'time' => 'H:i:s'];\n $format = $f->persist_format ?: $format[$f->type];\n\n // datetime only - set to persisting timezone\n if ($f->type == 'datetime' && isset($f->persist_timezone)) {\n $v->setTimezone(new $tz_class($f->persist_timezone));\n }\n $v = $v->format($format);\n }\n break;\n case 'array':\n case 'object':\n // don't encode if we already use some kind of serialization\n $v = $f->serialize ? $v : $this->jsonEncode($f, $v);\n break;\n }\n\n return $v;\n }",
"public function _typecastLoadField(Field $f, $value)\n {\n // LOB fields return resource stream\n if (is_resource($value)) {\n $value = stream_get_contents($value);\n }\n\n // work only on copied value not real one !!!\n $v = is_object($value) ? clone $value : $value;\n\n switch ($f->type) {\n case 'string':\n case 'text':\n // do nothing - it's ok as it is\n break;\n case 'integer':\n $v = (int) $v;\n break;\n case 'float':\n $v = (float) $v;\n break;\n case 'money':\n $v = round($v, 4);\n break;\n case 'boolean':\n if (isset($f->enum) && is_array($f->enum)) {\n if (isset($f->enum[0]) && $v == $f->enum[0]) {\n $v = false;\n } elseif (isset($f->enum[1]) && $v == $f->enum[1]) {\n $v = true;\n } else {\n $v = null;\n }\n } elseif ($v === '') {\n $v = null;\n } else {\n $v = (bool) $v;\n }\n break;\n case 'date':\n case 'datetime':\n case 'time':\n $dt_class = isset($f->dateTimeClass) ? $f->dateTimeClass : 'DateTime';\n $tz_class = isset($f->dateTimeZoneClass) ? $f->dateTimeZoneClass : 'DateTimeZone';\n\n if (is_numeric($v)) {\n $v = new $dt_class('@'.$v);\n } elseif (is_string($v)) {\n // ! symbol in date format is essential here to remove time part of DateTime - don't remove, this is not a bug\n $format = ['date' => '+!Y-m-d', 'datetime' => '+!Y-m-d H:i:s', 'time' => '+!H:i:s'];\n $format = $f->persist_format ?: $format[$f->type];\n\n // datetime only - set from persisting timezone\n if ($f->type == 'datetime' && isset($f->persist_timezone)) {\n $v = $dt_class::createFromFormat($format, $v, new $tz_class($f->persist_timezone));\n if ($v === false) {\n throw new Exception(['Incorrectly formatted datetime', 'format' => $format, 'value' => $value, 'field' => $f]);\n }\n $v->setTimeZone(new $tz_class(date_default_timezone_get()));\n } else {\n $v = $dt_class::createFromFormat($format, $v);\n if ($v === false) {\n throw new Exception(['Incorrectly formatted date/time', 'format' => $format, 'value' => $value, 'field' => $f]);\n }\n }\n\n // need to cast here because DateTime::createFromFormat returns DateTime object not $dt_class\n // this is what Carbon::instance(DateTime $dt) method does for example\n if ($dt_class != 'DateTime') {\n $v = new $dt_class($v->format('Y-m-d H:i:s.u'), $v->getTimeZone());\n }\n }\n break;\n case 'array':\n // don't decode if we already use some kind of serialization\n $v = $f->serialize ? $v : $this->jsonDecode($f, $v, true);\n break;\n case 'object':\n // don't decode if we already use some kind of serialization\n $v = $f->serialize ? $v : $this->jsonDecode($f, $v, false);\n break;\n }\n\n return $v;\n }",
"protected function castAttribute($key, $value)\n {\n $castType = $this->getCastType($key);\n\n if (is_null($value) && in_array($castType, static::$primitiveCastTypes)) {\n return $value;\n }\n\n switch ($castType) {\n case 'int':\n case 'integer':\n return (int) $value;\n case 'real':\n case 'float':\n case 'double':\n return $this->fromFloat($value);\n case 'decimal':\n return $this->asDecimal($value, explode(':', $this->getCasts()[$key], 2)[1]);\n case 'string':\n return (string) $value;\n case 'bool':\n case 'boolean':\n return (bool) $value;\n case 'object':\n return $this->fromJson($value, true);\n case 'array':\n case 'json':\n return $this->fromJson($value);\n case 'date':\n return $this->asDate($value);\n case 'datetime':\n case 'custom_datetime':\n return $this->asDateTime($value);\n }\n\n return $value;\n }",
"function o_castFloat($value) {\n\t\t\treturn Obj::singleton()->castFloat($value);\n\t\t}",
"public function visitScalarExpression(\n /*IScalarExpression*/ $node) /*: mixed*/ {\n\n $val = $node->getValue();\n if (is_string($val)) { return $this->escapeString($val); }\n $result = /*(string)*/$val;\n if (is_float($val) && !strpos($result, '.')) {\n $result .= '.0';\n }\n return $result;\n }",
"protected function getCastableValue(mixed $value): mixed\n {\n $value = $this->enumClass::parseDatabase($value);\n\n if ($value === null) {\n return null;\n }\n\n // If the value exists in the enum (using strict type checking) return it\n if ($this->enumClass::hasValue($value)) {\n return $value;\n }\n\n // Find the value in the enum that the incoming value can be coerced to\n foreach ($this->enumClass::getValues() as $enumValue) {\n if ($value == $enumValue) {\n return $enumValue;\n }\n }\n\n // Fall back to trying to construct it directly (will result in an error since it doesn't exist)\n return $value;\n }",
"public static function cast($value)\n {\n if(strlen($value)) {\n return (int) $value;\n }\n return null;\n }",
"#[Pure]\n public static function convertParameterType(string $type, mixed $value): string|int|bool|null\n {\n return match ($type) {\n 'string' => (string)$value,\n 'int' => (int)$value,\n 'bool' => $value === true || $value === '1' || $value === 'true',\n default => null\n };\n }",
"public function cast($value)\n {\n return json_decode($value, true);\n }",
"public static function toScalar($var)\n\t{\n\t\tif (is_null($var)) {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (is_scalar($var)) {\n\t\t\treturn $var;\n\t\t}\n\n\t\tif (is_object($var)) {\n\n\t\t\tif (method_exists($var, '__toString')) {\n\t\t\t\treturn (string)$var;\n\t\t\t}\n\n\t\t\tif (isset($var->scalar) && is_scalar($var->scalar)) {\n\t\t\t\t// scalar value was cast to object using `(object)$value`\n\t\t\t\treturn $var->scalar;\n\t\t\t}\n\t\t}\n\n\t\tthrow new \\InvalidArgumentException(sprintf(\n\t\t\t\"Cannot cast variable of type '%s' to scalar.\", self::type($var))\n\t\t);\n\t}",
"function o_castString($value) {\n\t\t\treturn Obj::singleton()->castString($value);\n\t\t}",
"public abstract function makeValue($value);",
"public function createValue($value, $type)\n\t{\n\t\tswitch ($type) {\n\t\t\tcase 'literal':\n\t\t\t\treturn $value;\n\t\t\t\tbreak;\n\t\t\tcase 'null':\n\t\t\t\treturn $this->sqlConstant('NULL');\n\t\t\t\tbreak;\n\t\t\tcase 'list':\n\t\t\t\treturn $this->valueList($value);\n\t\t\t\tbreak;\n\t\t\tcase 'number':\n\t\t\t\treturn $this->number($value);\n\t\t\t\tbreak;\n\t\t\tcase 'string':\n\t\t\t\treturn $this->string($value);\n\t\t\t\tbreak;\n\t\t\tcase 'constant':\n\t\t\t\treturn $this->sqlConstant($value);\n\t\t\t\tbreak;\n\t\t\tcase 'boolean':\n\t\t\t\tif ($value === true) {\n\t\t\t\t\treturn $this->sqlConstant('TRUE');\n\t\t\t\t} else {\n\t\t\t\t\treturn $this->sqlConstant('FALSE');\n\t\t\t\t}\n\t\t\tcase 'function':\n\t\t\t\tlist($function, $args) = explode('::SEPARATOR::', preg_replace('/^(.+)\\((.+)\\)$/', '$1::SEPARATOR::$2', $value));\n\t\t\t\t$args = explode(',', $args);\n\t\t\t\tforeach ($args as $i => $arg) {\n\t\t\t\t\t$args[$i] = $this->guess(trim($arg));\n\t\t\t\t}\n\t\t\t\treturn $this->sqlFunction(trim($function), $args);\n\t\t\t\tbreak;\n\t\t\tcase 'table':\n\t\t\t\treturn $this->table(trim($value, '`'));\n\t\t\t\tbreak;\n\t\t\tcase 'tableField':\n\t\t\tcase 'field':\n\t\t\t\tlist($table, $field) = explode('.', $value);\n\t\t\t\treturn $this->tableField(trim($table, '`'), trim($field, '`'));\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new \\Exception('Invalid value type given to MySql::createValueInstance');\n\t\t\t\tbreak;\n\t\t}\n\t}",
"function lim_get_type(&$value, $key) {\n\t$value = objet_type(table_objet($key));\n}",
"public function toNative()\n {\n $value = parent::toNative();\n\n return \\intval($value);\n }",
"private function _encodeScalar($value)\n\t{\n\t\tif (is_float($value)) {\n\t\t\t// Always use \".\" for floats.\n\t\t\t$encodedValue = floatval(str_replace(\",\", \".\", strval($value)));\n\t\t}\n\t\telseif (is_string($value)) {\n\t\t\t$encodedValue = $this->_encodeString($value);\n\t\t}\n\t\telse {\n\t\t\t// otherwise this must be an int\n\t\t\t$encodedValue = $value;\n\t\t}\n\n\t\t$this->_writeValue($encodedValue);\n\t}",
"public function getValueType()\n {\n return $this->valueType;\n }",
"public function value($value, array $schema = [])\n\t{\n\t\tif (is_array($value)) {\n\t\t\tforeach ($value as $key => $val) {\n\t\t\t\t$value[$key] = $this->value($val, isset($schema[$key]) ? $schema[$key] : $schema);\n\t\t\t}\n\t\t\treturn $value;\n\t\t}\n\n\t\tif (is_object($value) && isset($value->scalar)) {\n\t\t\treturn $value->scalar;\n\t\t}\n\n\t\tif ($value === null) {\n\t\t\treturn 'NULL';\n\t\t}\n\n\t\t$type = isset($schema['type']) ? $schema['type'] : $this->_introspectType($value);\n\t\t$column = isset($this->_columns[$type]) ? $this->_columns[$type] : null;\n\n\t\treturn $this->_cast($type, $value, $column, $schema);\n\t}",
"public function wrapValue(mixed $value, mixed $type = null): mixed;",
"public static function convert($value)\n {\n switch (gettype($value)) {\n case 'NULL':\n // Support for the <nil> extension\n // (http://ontosys.com/xml-rpc/extensions.php)\n return new \\fpoirotte\\XRL\\Types\\Nil(null);\n\n case 'boolean':\n return new \\fpoirotte\\XRL\\Types\\Boolean($value);\n\n case 'integer':\n try {\n return new \\fpoirotte\\XRL\\Types\\I4($value);\n } catch (\\InvalidArgumentException $e) {\n }\n return new \\fpoirotte\\XRL\\Types\\I8($value);\n\n case 'double':\n return new \\fpoirotte\\XRL\\Types\\Double($value);\n\n case 'string':\n // We try to encode it as a regular string if possible.\n if (static::isBinaryString($value)) {\n return new \\fpoirotte\\XRL\\Types\\Base64($value);\n }\n return new \\fpoirotte\\XRL\\Types\\StringType($value);\n\n case 'array':\n $newValue = array_map(\"static::convert\", $value);\n try {\n return new \\fpoirotte\\XRL\\Types\\ArrayType($newValue);\n } catch (\\InvalidArgumentException $e) {\n }\n return new \\fpoirotte\\XRL\\Types\\Struct($newValue);\n\n case 'resource':\n throw new \\InvalidArgument('Cannot encode PHP resource as XML-RPC type');\n\n case 'object':\n // A special treatment is applied afterwards.\n break;\n }\n\n // Only objects & resources remain after this point.\n if ($value instanceof \\fpoirotte\\XRL\\Types\\AbstractType) {\n return $value;\n }\n\n if ($value instanceof \\GMP) {\n $candidates = array(\n '\\\\fpoirotte\\\\XRL\\\\Types\\\\I4',\n '\\\\fpoirotte\\\\XRL\\\\Types\\\\I8',\n '\\\\fpoirotte\\\\XRL\\\\Types\\\\BigInteger',\n );\n foreach ($candidates as $candidate) {\n try {\n return new $candidate($value);\n } catch (\\InvalidArgumentException $e) {\n }\n }\n }\n\n if ($value instanceof \\DateTime) {\n return new \\fpoirotte\\XRL\\Types\\DateTimeIso8601($value);\n }\n\n if (($value instanceof \\DOMNode) ||\n ($value instanceof \\XMLWriter) ||\n ($value instanceof \\SimpleXMLElement)) {\n return new \\fpoirotte\\XRL\\Types\\Dom($value);\n }\n\n if ($value instanceof \\Exception) {\n return new \\fpoirotte\\XRL\\Types\\Struct(\n array(\n 'faultCode' => new \\fpoirotte\\XRL\\Types\\IntType($value->getCode()),\n 'faultString' => new \\fpoirotte\\XRL\\Types\\StringType(\n get_class($value).': '.$value->getMessage()\n ),\n )\n );\n }\n\n if (is_object($value) && (\n ($value instanceof \\Serializable) ||\n method_exists($value, '__sleep'))) {\n $value = serialize($value);\n\n // We try to encode it as a regular string if possible.\n if (static::isBinaryString($value)) {\n return new \\fpoirotte\\XRL\\Types\\Base64($value);\n }\n return new \\fpoirotte\\XRL\\Types\\StringType($value);\n }\n\n throw new \\InvalidArgumentException('Cannot convert the given object to an XML-RPC type');\n }",
"public function quoteValue(mixed $value): mixed;",
"function _toType($value) {\n\tif (preg_match('/^(\"(.*)\"|\\'(.*)\\')/',$value,$matches)) {\n\t$value = (string)preg_replace('/(\\'\\'|\\\\\\\\\\')/',\"'\",end($matches));\n\t$value = preg_replace('/\\\\\\\\\"/','\"',$value);\n\t} elseif (preg_match('/^\\\\[(.+)\\\\]$/',$value,$matches)) {\n\t\t// Inline Sequence\n\n\t\t// Take out strings sequences and mappings\n\t\t$explode = $this->_inlineEscape($matches[1]);\n\n\t\t// Propogate value array\n\t\t$value = array();\n\t\tforeach ($explode as $v) {\n\t\t$value[] = $this->_toType($v);\n\t\t}\n\t} elseif (strpos($value,': ')!==false && !preg_match('/^{(.+)/',$value)) {\n\t\t// It's a map\n\t\t$array = explode(': ',$value);\n\t\t$key = trim($array[0]);\n\t\tarray_shift($array);\n\t\t$value = trim(implode(': ',$array));\n\t\t$value = $this->_toType($value);\n\t\t$value = array($key => $value);\n\t} elseif (preg_match(\"/{(.+)}$/\",$value,$matches)) {\n\t\t// Inline Mapping\n\n\t\t// Take out strings sequences and mappings\n\t\t$explode = $this->_inlineEscape($matches[1]);\n\n\t\t// Propogate value array\n\t\t$array = array();\n\t\tforeach ($explode as $v) {\n\t\t$array = $array + $this->_toType($v);\n\t\t}\n\t\t$value = $array;\n\t} elseif (strtolower($value) == 'null' or $value == '' or $value == '~') {\n\t\t$value = NULL;\n\t} elseif (preg_match ('/^[0-9]+$/', $value)) {\n\t// Cheeky change for compartibility with PHP < 4.2.0\n\t\t$value = (int)$value;\n\t} elseif (in_array(strtolower($value),\n\t\t\t\tarray('true', 'on', '+', 'yes', 'y'))) {\n\t\t$value = true;\n\t} elseif (in_array(strtolower($value),\n\t\t\t\tarray('false', 'off', '-', 'no', 'n'))) {\n\t\t$value = false;\n\t} elseif (is_numeric($value)) {\n\t\t$value = (float)$value;\n\t} else {\n\t\t// Just a normal string, right?\n\t\t$value = trim(preg_replace('/#(.+)$/','',$value));\n\t}\n\n\treturn $value;\n\t}",
"public function cast($value)\n {\n if (!isset($this->typecast)) {\n throw new LogicException(\"Type cast for multiple handler not set\");\n }\n\n $type = $this->typeGuess->guess($value, $this->types);\n\n return isset($type) ? $this->typecast->to($type)->cast($value) : $this->dontCast($value);\n }",
"function string_to_value($mixed)\n{\n\tif(is_array($mixed)) {\n\t\tforeach($mixed as $key => $val) {\n\t\t\t$mixed[$key] = string_to_value($val);\n\t\t}\n\t}\n\telseif(is_string($mixed))\n\t{\n\t\t$str = rtrim($mixed);\n\t\tif(preg_match('`^null$`i', $str))\t\t\treturn null;\n\t\tif(preg_match('`^true$`i', $str))\t\t\treturn true;\n\t\tif(preg_match('`^false$`i', $str))\t\t\treturn false;\n\t\tif(preg_match('`^\\d+$`', $str))\t\t\t\treturn intval($str);\n\t\tif(preg_match('`^\\d+\\.\\d+$`', $str))\t\treturn floatval($str);\n\t\telse return $str;\n\t}\n\treturn $mixed;\n}",
"function getTypeConverter() ;",
"function fiftyone_degrees_get_typed_value($property, $profile_value) {\n $value_string = $profile_value['value'];\n switch ($property['value_type_id']) {\n // String and Javascript.\n case 0:\n case 4:\n default:\n return $value_string;\n // Int.\n case 1:\n return (int) $value_string;\n // Double.\n case 2:\n return (double) $value_string;\n // Bool.\n case 3:\n return $value_string === 'True';\n }\n}",
"public static function convertFromType($value, $type)\n {\n return self::valueFromType($value, $type);\n }",
"private static function ConvertNodeValueToObject($value)\n\t{\n\t\tif (is_numeric($value)) {\n\t\t\tif (strcmp(strval(intval($value)), $value) === 0) {\n\t\t\t\treturn intval($value);\n\t\t\t} elseif (strcmp(sprintf('%.0f', floatval($value)), $value) === 0) {\n\t\t\t\treturn floatval($value);\n\t\t\t} else {\n\t\t\t\treturn $value;\n\t\t\t}\n\t\t} elseif (strtolower($value) == 'true' || strtolower($value) == 'false') {\n\t\t\treturn filter_var($value, FILTER_VALIDATE_BOOLEAN);\n\t\t} else {\n\t\t\treturn $value;\n\t\t}\n\t}",
"static public function typedCast ($hxClass, $value) {\n\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:295: characters 3-33\n\t\tif ($value === null) {\n\t\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:295: characters 22-33\n\t\t\treturn null;\n\t\t}\n\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:296: characters 11-31\n\t\t$__hx__switch = ($hxClass->phpClassName);\n\t\tif ($__hx__switch === \"Bool\") {\n\t\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:306: lines 306-308\n\t\t\tif (is_bool($value)) {\n\t\t\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:307: characters 6-18\n\t\t\t\treturn $value;\n\t\t\t}\n\t\t} else if ($__hx__switch === \"Float\") {\n\t\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:302: lines 302-304\n\t\t\tif (is_int($value) || is_float($value)) {\n\t\t\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:303: characters 6-29\n\t\t\t\treturn floatval($value);\n\t\t\t}\n\t\t} else if ($__hx__switch === \"Int\") {\n\t\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:298: lines 298-300\n\t\t\tif (is_int($value) || is_float($value)) {\n\t\t\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:299: characters 6-33\n\t\t\t\treturn intval($value);\n\t\t\t}\n\t\t} else if ($__hx__switch === \"String\") {\n\t\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:310: lines 310-312\n\t\t\tif (is_string($value)) {\n\t\t\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:311: characters 6-18\n\t\t\t\treturn $value;\n\t\t\t}\n\t\t} else if ($__hx__switch === \"php\\\\NativeArray\") {\n\t\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:314: lines 314-316\n\t\t\tif (is_array($value)) {\n\t\t\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:315: characters 6-18\n\t\t\t\treturn $value;\n\t\t\t}\n\t\t} else {\n\t\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:318: lines 318-320\n\t\t\tif (is_object($value) && Boot::is($value, $hxClass)) {\n\t\t\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:319: characters 6-18\n\t\t\t\treturn $value;\n\t\t\t}\n\t\t}\n\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:322: characters 3-8\n\t\tthrow new HxException(\"Cannot cast \" . (\\Std::string($value)??'null') . \" to \" . (Boot::getClassName($hxClass->phpClassName)??'null'));\n\t}",
"protected function transformValueFromDatabase($value,$type) {\n\n if($type==SettingInterface::TYPE_STRING) {\n return (string)$value;\n }\n\n if($type==SettingInterface::TYPE_INTEGER) {\n return (integer)$value;\n }\n\n if($type==SettingInterface::TYPE_BOOLEAN) {\n if(in_array($value,[true,1,'y','yes','true'])) {\n return true;\n }\n if(in_array($value,[false,0,'n','no','false'])) {\n return false;\n }\n }\n\n if($type==SettingInterface::TYPE_DATE_TIME) {\n return \\DateTime::createFromFormat('Y-m-d H:i:s',$value);\n }\n\n if($type==SettingInterface::TYPE_ARRAY) {\n return json_decode($value,true);\n }\n\n return $value;\n }",
"protected function makeValue($plainValue): AbstractValue\n {\n if (is_array($plainValue)) {\n // use first array element\n $plainValue = (string)array_shift($plainValue);\n }\n\n return new ScalarValue($plainValue);\n }",
"function toDB($value, $type) {\n\t\t// everything is nullable\n\t\tif($value === null) return null;\n\t\t\n\t\tswitch($type) {\n\t\t\tcase 'datetime': // ISO-8601\n\t\t\tcase 'date':\n\t\t\t\tif($value instanceof DateTime) return $value->format('c');\n\t\t}\n\t\treturn $value;\n\t}",
"function scalar_to_string($val) {\n\tif($val === null)\treturn 'null';\n\tif(is_bool($val))\treturn ($val ? 'true' : 'false');\n\tif(is_string($val))\t{\n\t\t// escape slashs & quotes\n\t\t$val = str_replace(array('\\\\', '\\''), array('\\\\\\\\', '\\\\\\''), $val);\n\t\treturn '\\''.$val.'\\'';\n\t}\n\treturn ''.$val;\n}",
"private function convertVariableType(&$v)\n {\n if (is_int($v)) {\n $v = intval($v);\n } elseif (is_float($v)) {\n $v = floatval($v);\n } elseif ($v == 'true' || $v == 'false') {\n $v = $v == 'true' ? true : false;\n } elseif ($v == '' || $v == 'null') {\n $v = null;\n }\n }",
"protected function __valueOf($value) {\n\t\t\tif (is_array($value) || is_object($value)) {\n\t\t\t\t$array = (array)$value;\n\t\t\t\tif (isset($array[0])) {\n\t\t\t\t\treturn $array[0];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $value;\n\t\t}",
"private function defaultCast(string $type, $value)\n {\n return class_exists($type) ? new $type($value) : $value;\n }",
"function rockRealValue($mongodb, $dataType, $format, $value) \n { //{{{\n $realValue = null;\n switch ($dataType) {\n case \"integer\":\n case \"float\":\n case \"double\":\n $realValue = doubleval($value);\n break;\n case \"string\":\n $realValue = $value;\n break;\n case \"boolean\":\n $realValue = ($value == \"true\");\n break;\n case \"null\":\n $realValue = NULL;\n break;\n case \"mixed\":\n $eval = new VarEval($value, $format, $mongodb);\n $realValue = $eval->execute();\n if ($realValue === false) {\n throw new RookieException(\"Unable to parse mixed value, just check syntax!\");\n }\n break;\n }\n return $realValue;\n }",
"private function convertValue($convert, $value) {\n switch ($convert) {\n case 'int':\n $value = intval($value);\n break;\n case 'bool':\n $value = (( $value == '1' or $value == 'true' or $value == true) ? true : false);\n break;\n case 'time':\n $value = DateTime::createFromFormat('Y-m-d H:i:s', $value);\n break;\n case 'double':\n $value = doubleval($value);\n break;\n default :\n $value = $value;\n }\n return ($value);\n }",
"function cast_query_results($rs)\n{\n $fields = mysqli_fetch_fields($rs);\n $data = array();\n $types = array();\n foreach ($fields as $field) {\n switch ($field->type) {\n case 3:\n $types[$field->name] = 'int';\n break;\n case 4:\n $types[$field->name] = 'float';\n break;\n default:\n $types[$field->name] = 'string';\n break;\n }\n }\n while ($row = mysqli_fetch_assoc($rs)) {\n array_push($data, $row);\n }\n\n for ($i = 0; $i < count($data); $i++) {\n foreach ($types as $orgname => $type) {\n settype($data[$i][$orgname], $type);\n }\n }\n return $data;\n}",
"public function setTypeValue()\n {\n if($this->getType() === null){\n $this->setType(self::TYPE_SIMPLE);\n }\n }",
"public function convertToDatabaseValue($value, $type)\n {\n return Type::getType($type)->convertToDatabaseValue($value, $this->getDatabasePlatform());\n }",
"public function getValueType($valueName);",
"public function getValue(): mixed;",
"public function getValue(): mixed;",
"public function cast(mixed $value, string $format = ''): mixed\n {\n if (is_null($value) || ! is_string($value)) {\n return $value;\n }\n\n return $this->decode($value, $this->parseFormat($format));\n }",
"function gvtypeval_to_gvval ($type, $val) {\n\tswitch (strtolower(trim($type))) {\n\t\tcase 'boolean': // a boolean\n\t\t\t$output = $val;\n\t\t\tbreak;\n\t\tcase 'number': // a number\n\t\t\t$output = $val;\n\t\t\tbreak;\n\t\tcase 'date': // a date column - requires the javascript hack\n\t\t\t$time_stamp = strtotime($val);\n\t\t\t$time_array = getdate($time_stamp);\n\t\t\t$yy = $time_array['year'];\n\t\t\t$mm = $time_array['mon']-1; //why -1? i have no idea...\n\t\t\t$dd = $time_array['mday'];\n\t\t\t$hr = $time_array['hours'];\n\t\t\t$min = $time_array['minutes'];\n\t\t\t$sec = $time_array['seconds'];\n\t\t\t$output = \"new Date($yy,$mm,$dd,$hr,$min,$sec)\";\n\t\t\tbreak;\n\t\tcase 'timeofday': // a timeofday column - requires the javascript hack\n\t\t\t$time_stamp = strtotime($val);\n\t\t\t$time_array = getdate($time_stamp);\n\t\t\t$yy = $time_array['year'];\n\t\t\t$mm = $time_array['mon']-1; //why -1? i have no idea...\n\t\t\t$dd = $time_array['mday'];\n\t\t\t$hr = $time_array['hours'];\n\t\t\t$min = $time_array['minutes'];\n\t\t\t$sec = $time_array['seconds'];\n\t\t\t$output = \"new Date($yy,$mm,$dd,$hr,$min,$sec)\";\n\t\t\tbreak;\n\t\tcase 'datetime': // a datetime column - requires the javascript hack\n\t\t\t$time_stamp = strtotime($val);\n\t\t\t$time_array = getdate($time_stamp);\n\t\t\t$yy = $time_array['year'];\n\t\t\t$mm = $time_array['mon']-1; //why -1? i have no idea...\n\t\t\t$dd = $time_array['mday'];\n\t\t\t$hr = $time_array['hours'];\n\t\t\t$min = $time_array['minutes'];\n\t\t\t$sec = $time_array['seconds'];\n\t\t\t$output = \"new Date($yy,$mm,$dd,$hr,$min,$sec)\";\n\t\t\tbreak;\n\t\tcase 'string': // a string column\n\t\t\t$output = $val;\n\t\t\tbreak;\n\t\tdefault: // an unanticipated column type\n\t\t\t$output = $val;\n\t}\n\treturn $output;\n}"
] | [
"0.7752748",
"0.7101325",
"0.69269514",
"0.6865568",
"0.6794272",
"0.653517",
"0.65336555",
"0.64711034",
"0.6441431",
"0.64136195",
"0.63834447",
"0.6379849",
"0.6321087",
"0.63007516",
"0.62716854",
"0.6218139",
"0.61945957",
"0.6181148",
"0.61681056",
"0.61657554",
"0.6150577",
"0.61453336",
"0.6139543",
"0.6132613",
"0.6115801",
"0.6111054",
"0.6096286",
"0.6092343",
"0.60522914",
"0.6029145",
"0.6022321",
"0.6016957",
"0.6008012",
"0.59972596",
"0.5996908",
"0.59812546",
"0.59752584",
"0.59484",
"0.5902119",
"0.5889935",
"0.58832145",
"0.5862582",
"0.58591807",
"0.58444995",
"0.58424765",
"0.58226097",
"0.5819398",
"0.58028734",
"0.5801627",
"0.5796983",
"0.5780297",
"0.5776007",
"0.5750258",
"0.5742023",
"0.57324725",
"0.57159215",
"0.570973",
"0.57006806",
"0.5686547",
"0.56837434",
"0.56755316",
"0.5654262",
"0.56465596",
"0.5645229",
"0.56325436",
"0.5608067",
"0.5605726",
"0.56052023",
"0.5603391",
"0.5596394",
"0.5578343",
"0.5538524",
"0.55325353",
"0.5524404",
"0.5516291",
"0.5507488",
"0.55001676",
"0.54930884",
"0.54910594",
"0.5489565",
"0.54660314",
"0.54543084",
"0.5453726",
"0.5452432",
"0.54512256",
"0.5438954",
"0.5438607",
"0.5430451",
"0.54292816",
"0.54218787",
"0.54054475",
"0.5398803",
"0.5396874",
"0.53947216",
"0.53942424",
"0.5386451",
"0.53840256",
"0.53824914",
"0.53824914",
"0.53822756",
"0.53774136"
] | 0.0 | -1 |
Creates data provider instance with search query applied | public function search($params)
{
$query = LWas1::find();
$dataProvider = new ActiveDataProvider([
'query' => $query,
]);
$this->load($params);
if (!$this->validate()) {
// uncomment the following line if you do not want to return any records when validation fails
// $query->where('0=1');
return $dataProvider;
}
// $query->andFilterWhere([
// 'tgl' => $this->tgl,
// 'flag' => $this->flag,
// 'created_by' => $this->created_by,
// 'created_time' => $this->created_time,
// 'updated_by' => $this->updated_by,
// 'updated_time' => $this->updated_time,
// ]);
// $query->andFilterWhere(['like', 'id_l_was_1', $this->id_l_was_1])
// ->andFilterWhere(['like', 'no_register', $this->no_register])
// ->andFilterWhere(['like', 'inst_satkerkd', $this->inst_satkerkd])
// ->andFilterWhere(['like', 'data_data', $this->data_data])
// ->andFilterWhere(['like', 'upload_file_data', $this->upload_file_data])
// ->andFilterWhere(['like', 'analisa', $this->analisa])
// ->andFilterWhere(['like', 'upload_file', $this->upload_file])
// ->andFilterWhere(['like', 'created_ip', $this->created_ip])
// ->andFilterWhere(['like', 'updated_ip', $this->updated_ip]);
return $dataProvider;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function searchQueryDataProvider() {}",
"public function search()\n {\n $q = $this->getQuery();\n $dataProvider = new ActiveDataProvider([\n 'query' => $q,\n ]);\n\n return $dataProvider;\n }",
"public function getQueryDataProvider() {}",
"public function search() {\n // Get CDbCriteria instance\n $dbCriteria = new CDbCriteria;\n // Search for client name\n $dbCriteria->compare('name', Yii::app()->request->getQuery('name', ''), true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $dbCriteria,\n 'pagination' => array(\n 'pageSize' => 10,\n ),\n ));\n }",
"protected function getDataProviders()\n {\n $searchModel = $this->getSearchModel();\n $queryParams = Yii::$app->request->queryParams;\n $dataProvider = $searchModel->search($queryParams);\n return [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider\n ];\n }",
"public function search()\n {\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('url', $this->url);\n $criteria->compare('type', $this->type);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => array('pageSize' => 100),\n ));\n }",
"public function backendSearch()\n {\n $criteria = new CDbCriteria();\n\n return new CActiveDataProvider(\n __CLASS__,\n array(\n 'criteria' => $criteria,\n )\n );\n }",
"public function search() {\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria' => $this->getSearchCriteria(),\n\t\t\t'sort' => array(\n\t\t\t\t'defaultOrder' => 't.id DESC',\n\t\t\t\t'attributes' => array(\n\t\t\t\t\t'client_id' => array(\n\t\t\t\t\t\t'asc' => 'client_name asc',\n\t\t\t\t\t\t'desc' => 'client_name desc',\n\t\t\t\t\t),\n\t\t\t\t\t'*',\n\t\t\t\t),\n\t\t\t),\n\t\t\t'pagination' => array(\n\t\t\t\t'pageSize' => Yii::app()->config->get('global.per_page'),)\n\t\t));\n\t}",
"public function search()\n {\n $criteria = new CDbCriteria;\n $criteria->compare('id', $this->id, true);\n $criteria->compare('level', $this->level);\n $criteria->compare('text', $this->text, true);\n $criteria->compare('ip_create', $this->ip_create, true);\n\n return new ActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function createSearchQuery()\n {\n $query = new SearchQuery($this->elastic);\n $query->listeners = $this->listeners;\n return $query;\n }",
"public function search()\n {\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('state', $this->state);\n $criteria->compare('type','0');\n return new ActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function prepareDataProvider()\n\t{\n\t $searchModel = new \\app\\models\\ClearanceSearch(); \n\t\treturn $searchModel->search(\\Yii::$app->request->queryParams);\n\n\t}",
"public function search()\n {\n $criteria = new CDbCriteria;\n $criteria->compare('authorname', $this->authorname, true);\n return new CActiveDataProvider($this, array('criteria' => $criteria, ));\n }",
"public function getDataProvider(array $query = []);",
"protected function prepareDataProvider()\n {\n if ($this->prepareDataProvider !== null) {\n return call_user_func($this->prepareDataProvider, $this);\n }\n\n\t\t/* @var $modelClass \\yii\\db\\BaseActiveRecord */\n $modelClass = $this->modelClass;\n\t\t$query = $modelClass::find();\n\t\t\n\t\t$filters = ActionHelpers::getFilter();\n\t\t\n\t\tforeach($filters as $filter) {\n\t\t\t$query->andFilterWhere($filter);\n\t\t}\n\t\t\n\t\tif($with = ActionHelpers::getWith()) {\n $query->with($with);\n }\n\n return new ActiveDataProvider([\n 'query' => $query,\n 'pagination' => [\n 'pageSize' => ActionHelpers::getLimit()\n ],\n 'sort'=> ActionHelpers::getSort()\n // 'sort'=> ['defaultOrder' => ['id'=>SORT_DESC]]\n ]);\n }",
"public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('entity_id', $this->entity_id);\n $criteria->compare('dbname', $this->dbname, true);\n $criteria->compare('isfiltered', $this->isfiltered);\n $criteria->compare('filtertype', $this->filtertype);\n $criteria->compare('alias', $this->alias, true);\n $criteria->compare('enabled', $this->enabled);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => false,\n ));\n }",
"public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that should not be searched.\n\t\t$criteria = new \\CDbCriteria;\n\n\t\tforeach (array_keys($this->defineAttributes()) as $name)\n\t\t{\n\t\t\t$criteria->compare($name, $this->$name);\n\t\t}\n\n\t\treturn new \\CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria\n\t\t));\n\t}",
"public function search()\n\t{\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('type',$this->type,true);\n\t\t$criteria->compare('memo',$this->memo,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function search()\n {\n $query = Hotel::find();\n // add conditions that should always apply here\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n ]);\n \n // grid filtering conditions\n $query->availables($this->quantity_of_guests);\n $query->andFilterWhere([\n 'hotel_id' => $this->hotel_id,\n 'price_per_guest' => $this->price_per_guest,\n ]);\n $query->andFilterWhere(['like', 'city_name', $this->city_name]);\n return $dataProvider;\n \n }",
"public function search()\n\t{\n\t $criteria=new CDbCriteria;\n\t\t\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('projection',$this->projection,true);\n\t\t$criteria->compare('username',Yii::app()->user->id);\n\t\t$criteria->compare('title',$this->title);\n\t\t$criteria->compare('url',$this->url);\n\t return new CActiveDataProvider(get_class($this), array(\n\t 'criteria'=> $criteria,\n\t 'sort'=>array(\n\t 'defaultOrder'=>'name ASC',\n\t ),\n\t 'pagination'=>array(\n\t 'pageSize'=>10\n\t ),\n\t ));\n\t}",
"private function _getDataProvider($query, $params){\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n ]);\n\n if (!($this->load($params) && $this->validate())) {\n return $dataProvider;\n }\n\n $query->andFilterWhere([\n 'user_id' => $this->user_id,\n 'profile_id' => $this->profile_id,\n 'authentication_method_id' => $this->authentication_method_id,\n 'status' => $this->status,\n 'created_at' => $this->created_at,\n 'updated_at' => $this->updated_at,\n ]);\n\n $query->andFilterWhere(['like', 'username', $this->username])\n ->andFilterWhere(['like', 'auth_key', $this->auth_key])\n ->andFilterWhere(['like', 'password_hash', $this->password_hash])\n ->andFilterWhere(['like', 'password_reset_token', $this->password_reset_token])\n ->andFilterWhere(['like', 'email', $this->email]);\n\n return $dataProvider;\n }",
"public function getMetadataQueryProviderWrapper();",
"protected function prepareDataProvider()\n {\n \t$modelClass = $this->modelClass;\n\n $orderBy='id';\n if (isset($_GET['orderBy'])) $orderBy=$_GET['orderBy'];\n\n $orderByDir='DESC';\n if (isset($_GET['orderByDir'])) $orderByDir=$_GET['orderByDir'];\n\n $limit=20;\n if (isset($_GET['limit'])) $limit=$_GET['limit'];\n\n $order = \"$orderBy $orderByDir\";\n\n \t$dataProvider = new ActiveDataProvider([\n 'query' => $modelClass::find()->limit($limit)->with('supplier')->orderBy($order),\n 'pagination' => [\n 'pageSize' => $limit,\n ],\n ]);\n\n \treturn $dataProvider;\n }",
"public function makeSearch() \n {\n $this->setSelect($this->qb);\n $this->setAssociations($this->qb);\n $this->setWhere($this->qb);\n $this->setOrderBy($this->qb);\n $this->setLimit($this->qb);\n\n return $this;\n }",
"public function search()\n\t{\n\t\t$criteria = new CDbCriteria;\n\t\t//TODO: update search criteria\n\t\t$criteria->compare('id', $this->id, true);\n\t\t$criteria->compare('event_id', $this->event_id, true);\n\t\t$criteria->compare('standard_intervention_exists', $this->standard_intervention_exists);\n\t\t$criteria->compare('details', $this->details);\n\t\t$criteria->compare('interventions_id', $this->interventions_id);\n\t\t$criteria->compare('description', $this->description);\n\t\t$criteria->compare('patient_factors', $this->patient_factors);\n\t\t$criteria->compare('patient_factor_details', $this->patient_factor_details);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}",
"public function search()\n\t{\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('title',$this->title,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('keywords',$this->keywords,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public static function new_search_record()\n\t{\n\t\treturn new user_record_search();\n\t}",
"public function search() {\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('content', $this->content, true);\n\t\t$criteria->compare('score', $this->score);\n\t\t$criteria->compare('author', $this->author, true);\n\t\t$criteria->compare('type', $this->type);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}",
"public function search()\n {\n $criteria = new CDbCriteria;\n $criteria->compare('uid', $this->uid);\n $criteria->compare('token', $this->token, true);\n $criteria->compare('created', $this->created, true);\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function search() {\n\n $this->entity = $this->name;\n $this->conditions = $this->_getSearchConditions();\n $this->joins = $this->_getSearchJoins();\n $this->orders = $this->_getSearchOrder();\n $this->limit = $this->_getSearchLimit();\n $this->maxLimit = $this->_getSearchMaxLimit();\n $this->offset = $this->_getSearchOffset();\n $this->fields = $this->_getSearchFields();\n $this->group = $this->_getSearchGroup();\n\n// $this->setVar('entity', $this->name);\n// $this->setVar('conditions', $this->_getSearchConditions());\n// $this->setVar('joins', $this->_getSearchJoins());\n// $this->setVar('orders', $this->_getSearchOrder());\n// $this->setVar('limit', $this->_getSearchLimit());\n// $this->setVar('maxLimit', $this->_getSearchMaxLimit());\n// $this->setVar('offset', $this->_getSearchOffset());\n// $this->setVar('fields', $this->_getSearchFields());\n// $this->setVar('group', $this->_getSearchGroup());\n//\n// $this->setVar('baseAdditionalElements', $this->additionalElements);\n $this->getFieldsForSearchFunction = '_extractSearchFields';\n\n return $this->baseSearch();\n }",
"public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('keyword_id', $this->keyword_id);\n $criteria->compare('visits', $this->visits);\n $criteria->compare('page_views', $this->page_views);\n $criteria->compare('parsing', $this->parsing);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => array('pageSize' => 50),\n ));\n }",
"protected function getNewSearchModel()\n {\n $searchModelName = $this->getSearchModelName();\n return new $searchModelName;\n }",
"public function search()\n\t{\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function searchdatas(){\r\n\t\t// should not be searched.\r\n\t\t$conditions=array();\r\n\t\t$params=array();\r\n\t\t$page_params=array();\r\n\t\t$criteria=new CDbCriteria;\r\n\t\t$sort=new CSort();\r\n \t$sort->attributes=array();\r\n \t$sort->defaultOrder=\"t.create_time ASC\";\r\n \t$sort->params=$page_params;\r\n\t\treturn new CActiveDataProvider(get_class($this), array(\r\n\t\t\t'criteria'=>array(\r\n\t\t\t 'condition'=>'',\r\n\t\t\t 'params'=>array(),\r\n\t\t\t 'with'=>array(\"User\",\"District\"),\r\n\t\t\t),\r\n\t\t\t'pagination'=>array(\r\n 'pageSize'=>'20',\r\n 'params'=> $page_params,\r\n ),\r\n 'sort'=>$sort,\r\n\t\t));\r\n\t}",
"public function search()\n {\n\n $query = Board::find()->where(['user_id' => $this->user_id]);\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n 'pagination' => [\n 'pageSize' => 10,\n ],\n 'sort' => [\n 'defaultOrder' => [\n 'created_at' => SORT_DESC,\n\n ]\n ],\n ]);\n\n return $dataProvider;\n }",
"public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('post_id', $this->post_id);\n $criteria->compare('language_id', $this->language_id);\n $criteria->compare('header', $this->header, true);\n $criteria->compare('text', $this->text, true);\n\t\t$criteria->compare('rating',$this->rating);\n\t\t$criteria->compare('author_id',$this->author_id);\n\t\t$criteria->compare('date_add',$this->date_add,true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function search()\n {\n $criteria = new CDbCriteria;\n\n $criteria->compare('t.id', $this->id);\n $criteria->compare('who', $this->who);\n $criteria->compare('date', $this->date, true);\n $criteria->compare('text', $this->text, true);\n $criteria->compare('rate', $this->rate);\n $criteria->compare('knowledge', $this->knowledge);\n $criteria->compare('behavior', $this->behavior);\n $criteria->compare('motivation', $this->motivation);\n $criteria->compare('rate', $this->who_ip);\n $criteria->compare('is_checked', $this->is_checked);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => array(\n 'pageSize' => '50',\n ),\n 'sort' => array(\n 'defaultOrder' => array(\n 'date' => CSort::SORT_DESC,\n ),\n ),\n ));\n }",
"public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('name', $this->name, true);\n $criteria->compare('latitude', $this->latitude);\n $criteria->compare('longitude', $this->longitude);\n $criteria->compare('type', $this->type, true);\n $criteria->compare('vicinity', $this->vicinity, true);\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function parametersAndQueriesDataProvider() {}",
"public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('region_id', $this->region_id);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function search()\n\t{\n\t\t $this->StateProcess(get_class($this).'_'.Y::app()->params['cfgName']);\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('title',$this->title,true);\n $criteria->compare('title_adm',$this->title,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n 'sort'=>array('defaultOrder'=>'id DESC'),\n 'pagination'=>array('pageSize'=>Config::$data['base']->pageSize)\n\t\t));\n\t}",
"public function search($params,$query=null)\n {\n if(!$query) $query = RestClient::find();\n\n $query = $query->joinWith(['hospital']) \n ->joinWith(['hospital.sales']);\n //$query = $query->joinWith('mingrui_comments');\n // add conditions that should always apply here\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n ]);\n\n $this->load($params);\n \n if (!$this->validate()) {\n // uncomment the following line if you do not want to return any records when validation fails\n // $query->where('0=1');\n //var_dump($params);exit;\n return $dataProvider;\n }\n \n // grid filtering conditions\n $query->andFilterWhere([\n 'rest_client.id' => $this->id, \n 'age' => $this->age, \n 'hospital_id' => $this->hospital_id, \n ]);\n\n $query->andFilterWhere(['like', 'rest_client.name', $this->name])\n ->andFilterWhere(['like', 'sex', $this->sex])\n ->andFilterWhere(['like', 'birthplace', $this->birthplace])\n ->andFilterWhere(['like', 'email', $this->email])\n ->andFilterWhere(['like', 'tel', $this->tel])\n ->andFilterWhere(['like', 'school', $this->school])\n ->andFilterWhere(['like', 'education', $this->education])\n ->andFilterWhere(['like', 'experience', $this->experience])\n ->andFilterWhere(['like', 'employed', $this->employed])\n ->andFilterWhere(['like', 'department', $this->department])\n ->andFilterWhere(['like', 'worktime', $this->worktime])\n ->andFilterWhere(['like', 'position', $this->position])\n ->andFilterWhere(['like', 'speciality', $this->speciality])\n ->andFilterWhere(['like', 'hobby', $this->hobby])\n ->andFilterWhere(['like', 'notes', $this->notes])\n ->andFilterWhere(['like', 'zhuren', $this->zhuren])\n ->andFilterWhere(['like', 'pianhao', $this->pianhao]) \n ->andFilterWhere(['like', 'rest_danwei.name', $this->hospitalname])\n ->andFilterWhere(['like', 'rest_sales.name', $this->salesname])\n ;\n\n // echo $query->createCommand()->getRawSql(); exit; \n return $dataProvider;\n }",
"public function search()\n\t{\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('agreement',$this->agreement);\n\t\t$criteria->compare('date',$this->date,true);\n\t\t$criteria->compare('user',$this->user);\n\t\t$criteria->compare('new_status',$this->new_status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id, true);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('description', $this->description, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function search() {\n\n\t\t$criteria = $this->getDbCriteria();\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('subject', $this->subject, true);\n\t\t$criteria->compare('status', $this->status);\n\t\t$criteria->compare('template.name', $this->template_id, true);\n\n\t\t$sort = new CSort;\n\t\t$sort->defaultOrder = 'id DESC';\n\n\t\treturn new NActiveDataProvider($this, array(\n\t\t\t\t\t'criteria' => $criteria,\n\t\t\t\t\t'sort' => $sort,\n\t\t\t\t\t'pagination' => array(\n\t\t\t\t\t\t'pageSize' => 20,\n\t\t\t\t\t),\n\t\t\t\t));\n\t}",
"public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=new CDbCriteria;\n\n $criteria->compare('id',$this->id,true);\n $criteria->compare('query_id',$this->query_id,true);\n $criteria->compare('se_id',$this->se_id,true);\n $criteria->compare('se_page',$this->se_page,true);\n $criteria->compare('se_url',$this->se_url,true);\n $criteria->compare('visits',$this->visits);\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n 'pagination' => array('pageSize' => 25),\n ));\n }",
"public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('acquisition_date_id', $this->acquisition_date_id);\n $criteria->compare('acquisition_type_id', $this->acquisition_type_id);\n $criteria->compare('location_id', $this->location_id);\n $criteria->compare('number', $this->number, true);\n $criteria->compare('annotation', $this->annotation, true);\n $criteria->compare('location_coordinates_id', $this->location_coordinates_id);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"protected function _initSearch()\n {\n $this->where['is_del'] = array('eq', 1);\n $this->order = 'create_time desc';\n }",
"public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('id_client', $this->id_client);\n $criteria->compare('first_name', $this->first_name, true);\n $criteria->compare('last_name', $this->last_name, true);\n $criteria->compare('date_birth', $this->date_birth, true);\n $criteria->compare('gender', $this->gender);\n\n return new CActiveDataProvider(get_class($this), array(\n 'criteria' => $criteria,\n ));\n }",
"public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('domain', $this->domain, true);\n $criteria->compare('ru_domain', $this->ru_domain, true);\n $criteria->compare('page', $this->ru_domain);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function applyDefaultSearchQuery(\\yii\\data\\ActiveDataProvider &$dataProvider);",
"protected function _initSearch()\n {\n $this->where['is_del'] = array('eq', 0);\n $this->order = 'create_time desc';\n }",
"public static function new_search_record()\n\t{\n\t\treturn new league_record_search();\n\t}",
"public function search()\n {\n $query = Story::find()\n ->owner()\n ->globalChannel()\n ->orderBy(['_id' => SORT_ASC])\n ->active();\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n 'pagination' => false\n ]);\n\n return $dataProvider;\n }",
"public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('project_id', $this->project_id);\n $criteria->compare('num', $this->num);\n $criteria->compare('team_strength', $this->team_strength);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"private function instantiate_search_page() {\n // Build the search_types_fields and search_types_label arrays out of post_types_defs\n $search_types_fields = array();\n $search_types_label = array();\n foreach ( $this->post_type_defs as $post_type ) {\n $search_types_fields[ $post_type[ 'slug' ] ] = $post_type[ 'fields' ];\n $search_types_label[ $post_type[ 'slug' ] ] = $post_type[ 'plural_name' ];\n }\n $this->search_page = new HRHS_Search( array(\n // Using the default slug and title for now\n 'search_types_fields' => $search_types_fields,\n 'search_types_label' => $search_types_label\n ) );\n }",
"public function search()\n\t{\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('title',$this->title,true);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function search($query);",
"public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('sex', $this->sex);\n $criteria->compare('mobile', $this->mobile, true);\n $criteria->compare('idcard', $this->idcard, true);\n $criteria->compare('password', $this->password, true);\n $criteria->compare('place_ids', $this->place_ids, true);\n $criteria->compare('depart_id', $this->depart_id);\n $criteria->compare('bank', $this->bank, true);\n $criteria->compare('bank_card', $this->bank_card, true);\n $criteria->compare('address', $this->address, true);\n $criteria->compare('education', $this->education, true);\n $criteria->compare('created', $this->created);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id, true);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('summ', $this->summ, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id, true);\n $criteria->compare('company_id', Yii::app()->user->company_id);\n $criteria->compare('zone_id', $this->zone_id, true);\n $criteria->compare('low_qty_threshold', $this->low_qty_threshold);\n $criteria->compare('high_qty_threshold', $this->high_qty_threshold);\n $criteria->compare('created_date', $this->created_date, true);\n $criteria->compare('created_by', $this->created_by, true);\n $criteria->compare('updated_date', $this->updated_date, true);\n $criteria->compare('updated_by', $this->updated_by, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('nrs', $this->nrs, true);\n $criteria->compare('supplier_name', $this->supplier_name, true);\n $criteria->compare('npwp', $this->npwp, true);\n $criteria->compare('bank_name', $this->bank_name, true);\n $criteria->compare('bank_account_number', $this->bank_account_number, true);\n $criteria->compare('created_at', $this->created_at, true);\n $criteria->compare('created_by', $this->created_by);\n $criteria->compare('updated_at', $this->updated_at, true);\n $criteria->compare('updated_by', $this->updated_by);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'sort' => array(\n 'defaultOrder' => 'id DESC',\n ),\n ));\n }",
"public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('code',$this->code,true);\n\t\t$criteria->compare('title',$this->title,true);\n\t\t$criteria->compare('did',$this->did);\n\t\t$criteria->compare('date_prod',$this->date_prod,true);\n\t\t$criteria->compare('kind',$this->kind,true);\n\t\t$criteria->compare('len',$this->len,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('code', $this->code, true);\n\t\t$criteria->compare('name', $this->name, true);\n\t\t$criteria->compare('printable_name', $this->printable_name, true);\n\t\t$criteria->compare('iso3', $this->iso3, true);\n\t\t$criteria->compare('numcode', $this->numcode);\n\t\t$criteria->compare('is_default', $this->is_default);\n\t\t$criteria->compare('is_highlight', $this->is_highlight);\n\t\t$criteria->compare('is_active', $this->is_active);\n\t\t$criteria->compare('date_added', $this->date_added);\n\t\t$criteria->compare('date_modified', $this->date_modified);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}",
"public function search($params)\n {\n $this->__search($params);\n\n // grid filtering conditions\n $this->query\n\t ->andFilterWhere([\n\t 'id' => $this->id,\n\t 'ord' => $this->ord,\n\t 'type' => $this->type,\n\t ])\n\t ->andFilterWhere(['like', 'code', $this->code])\n ->andFilterWhere(['like', 'name', $this->name]);\n\n return $this->dataProvider;\n }",
"public function createQuery() {}",
"public function createQuery() {}",
"public function createQuery() {}",
"public function createQuery() {}",
"public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n $criteria = new CDbCriteria();\n \n $criteria->compare('question_id', $this->question_id);\n $criteria->compare('student_id', $this->student_id);\n $criteria->compare('answer_id', $this->answer_id);\n $criteria->compare('answer_text', $this->answer_text, true);\n $criteria->compare('answer_number', $this->answer_number, true);\n $criteria->compare('exec_time', $this->exec_time);\n $criteria->compare('result', $this->result);\n $criteria->compare('test_result', $this->test_result);\n \n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria\n ));\n }",
"public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('createDate', $this->createDate);\n $criteria->compare('lastUpdated', $this->lastUpdated);\n $criteria->compare('trackingKey', $this->trackingKey);\n $criteria->compare('email', $this->email);\n $criteria->compare('leadscore', $this->leadscore);\n\n if (!Yii::app()->user->isGuest) {\n $pageSize = Profile::getResultsPerPage();\n } else {\n $pageSize = 20;\n }\n\n return new SmartActiveDataProvider(get_class($this), array(\n 'pagination' => array(\n 'pageSize' => $pageSize,\n ),\n 'criteria' => $criteria,\n ));\n }",
"public function search() {\n// @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('description', $this->description, true);\n $criteria->compare('type', $this->type, true);\n $criteria->compare('options', $this->options, true);\n $criteria->compare('autoreplys', $this->autoreplys, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function googleSearch()\n {\n $search = new \\Hoor\\Search\\Google(get_search_query(), $this->getIndex());\n $this->data['search'] = $search;\n $this->data['results'] = $search->results;\n }",
"protected function addSearchConfigs()\n {\n\n $this['textQueryBuilder'] = function () {\n return new TextQueryBuilder();\n };\n\n $this['searchManager'] = function ($c) {\n return new SearchManager($c['databaseAdapter'], $c['queue'], $c['request'], array(\n $c['textQueryBuilder']\n ));\n };\n\n }",
"public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('tbl_customer_supplier', $this->tbl_customer_supplier, true);\n $criteria->compare('id_customer', $this->id_customer, true);\n $criteria->compare('id_supplier', $this->id_supplier, true);\n $criteria->compare('title', $this->title, true);\n $criteria->compare('date_add', $this->date_add, true);\n $criteria->compare('date_upd', $this->date_upd, true);\n $criteria->compare('active', $this->active);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public static function search()\n {\n return self::filterSearch([\n 'plot_ref' => 'string',\n 'plot_name' => 'string',\n 'plot_start_date' => 'string',\n 'user.name' => self::filterOption([\n 'select' => 'id',\n 'label' => trans_title('users', 'plural'),\n 'fields' => ['id', 'name'],\n //ComboBox user list base on the current client\n //See in App\\Models\\Users\\UsersScopes\n 'model' => app(User::class)->bySearch(),\n ]),\n 'client.client_name' => self::filterOption([\n 'conditional' => Credentials::hasRoles(['admin', 'admin-gv']),\n 'select' => 'client_id',\n 'label' => trans_title('clients', 'plural'),\n 'model' => Client::class,\n 'fields' => ['id', 'client_name']\n ])\n ]);\n }",
"public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('name', $this->name, true);\n\t\t$criteria->compare('district_id', $this->district_id);\n\t\t$criteria->compare('active', $this->active);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t\t\t'criteria' => $criteria,\n\t\t\t\t));\n\t}",
"public function search()\n\t{\n\t\t// should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('issue_date', $this->issue_date, true);\n\n\t\treturn new CActiveDataProvider($this, array('criteria' => $criteria,));\n\t}",
"public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('hol_id', $this->hol_id);\n $criteria->compare('loc_id', $this->loc_id);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function search($params)\n {\n $this->__search($params);\n\n // grid filtering conditions\n $this->query\n\t ->andFilterWhere(['id' => $this->id])\n\t ->andFilterWhere(['like', 'description', $this->description])\n ->andFilterWhere(['like', 'type', $this->type]);\n\n return $this->dataProvider;\n }",
"public function search()\r\n\t{\r\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\r\n\r\n\t\t$criteria = new CDbCriteria;\r\n\r\n\t\t$criteria->compare('doc_num', $this->doc_num, true);\r\n\t\t$criteria->compare('doc_num2', $this->doc_num2);\r\n\t\t$criteria->compare('doc_date', $this->doc_date, true);\r\n\r\n\t\treturn new CActiveDataProvider($this, array(\r\n\t\t\t'criteria' => $criteria,\r\n\t\t));\r\n\t}",
"public function search()\n {\n $criteria = new CDbCriteria();\n\n $criteria->compare('productCategoryId', $this->productCategoryId, true);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('level', $this->level);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function search() {\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('name', $this->name, true);\n\t\t$criteria->compare('wikilink', $this->wikilink, true);\n\t\t$criteria->compare('picture', $this->picture, true);\n\t\t$criteria->compare('score', $this->score);\n\t\t$criteria->compare('modification_date', $this->modification_date, true);\n\t\t$criteria->compare('featured', $this->featured);\n\t\t$criteria->compare('users_found', $this->users_found);\n\t\t$criteria->compare('gpsdata', $this->gpsdata);\n\t\t$criteria->compare('category', $this->category);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}",
"public function scopeSearch($query){\n if (request()->has('search_query') && !empty(request()->search_query) && request()->has('search_columns') && !empty(request()->search_columns) ) {\n \t$query = $this->getQuery($query , request()->search_columns , request()->search_query );\n }else{\n \tif (request()->has('search_query') && !empty(request()->search_query)) {\n \t\t$query = $this->getQuery($query , $this->fillable , request()->search_query );\n \t}\n }\n\n \n \n \n \n \n return $query;\n }",
"public function search()\n {\n $criteria=new CDbCriteria;\n\n $criteria->compare('id',$this->id);\n $criteria->compare('title',$this->title,true);\n $criteria->compare('text',$this->text,true);\n $criteria->compare('author_id',$this->author_id);\n $criteria->compare('editor_id',$this->editor_id);\n $criteria->compare('crated_at',$this->crated_at,true);\n $criteria->compare('edited_at',$this->edited_at,true);\n $criteria->compare('publish_at',$this->publich_at,true);\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }",
"public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('date_start',$this->date_start,true);\n\t\t$criteria->compare('date_end',$this->date_end,true);\n\t\t$criteria->compare('count_attempt',$this->count_attempt);\n\t\t$criteria->compare('count_questions',$this->count_questions);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('date_create',$this->date_create,true);\n\t\t$criteria->compare('author',$this->author,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('latitud',$this->latitud,true);\n\t\t$criteria->compare('longitud',$this->longitud,true);\n\t\t$criteria->compare('telefono',$this->telefono,true);\n\t\t$criteria->compare('direccion',$this->direccion,true);\n\t\t$criteria->compare('web',$this->web,true);\n\t\t$criteria->compare('activo',$this->activo);\n\t\t$criteria->compare('userId',$this->userId);\n\t\t$criteria->compare('ratingGeneral',$this->ratingGeneral);\n\t\t$criteria->compare('youtubeUrl',$this->youtubeUrl,true);\n\t\t$criteria->compare('esDestacado',$this->esDestacado);\n\t\t$criteria->compare('aprobado',$this->aprobado);\n $criteria->compare('regionId',$this->regionId);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function search()\n\t{\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('id_user',$this->id_user);\n\t\t$criteria->compare('id_answer',$this->id_answer);\n\t\t$criteria->compare('mark',$this->mark);\n\t\t$criteria->compare('comment',$this->comment,true);\n\t\t$criteria->compare('time',$this->time,true);\n\t\t$criteria->compare('read_mark',$this->read_mark,true);\n\t\t$criteria->compare('marked_by',$this->marked_by,true);\n\t\t\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n// $criteria->compare('name', $this->name, true);\n $criteria->compare('description', $this->description, true);\n// $criteria->compare('alias', $this->alias, true);\n// $criteria->compare('module', $this->module, true);\n $criteria->compare('crud', $this->crud, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('ID',$this->ID);\n\t\t$criteria->compare('UserID',$this->UserID);\n\t\t$criteria->compare('ProviderID',$this->ProviderID);\n\t\t$criteria->compare('Date',$this->Date,true);\n\t\t$criteria->compare('RawID',$this->RawID);\n\t\t$criteria->compare('Document',$this->Document,true);\n\t\t$criteria->compare('State',$this->State,true);\n\t\t$criteria->compare('Temperature',$this->Temperature,true);\n\t\t$criteria->compare('Conditions',$this->Conditions,true);\n\t\t$criteria->compare('Expiration',$this->Expiration,true);\n\t\t$criteria->compare('Comments',$this->Comments,true);\n\t\t$criteria->compare('Quantity',$this->Quantity,true);\n\t\t$criteria->compare('Type',$this->Type,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t'pagination'=>array(\n \t'pageSize'=>Yii::app()->params['defaultPageSize'], \n ),\n\t\t));\n\t}",
"public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('sn',$this->sn,true);\n\t\t$criteria->compare('fn',$this->fn,true);\n\t\t$criteria->compare('region',$this->region);\n\t\t$criteria->compare('postal',$this->postal,true);\n\t\t$criteria->compare('inn',$this->inn,true);\n\t\t$criteria->compare('ogrn',$this->ogrn,true);\n\t\t$criteria->compare('okpo',$this->okpo,true);\n\t\t$criteria->compare('adress',$this->adress,true);\n\t\t$criteria->compare('tel',$this->tel,true);\n\t\t$criteria->compare('fax',$this->fax,true);\n\t\t$criteria->compare('okved',$this->okved,true);\n\t\t$criteria->compare('oid',$this->oid,true);\n\t\t$criteria->compare('hits',$this->hits);\n\t\t$criteria->compare('st',$this->st);\n\t\t$criteria->compare('alias',$this->alias,true);\n\t\t$criteria->compare('alias2',$this->alias2,true);\n\t\t$criteria->compare('alias3',$this->alias3,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('cardid', $this->cardid, true);\n $criteria->compare('subclassid', $this->subclassid, true);\n $criteria->compare('cardname', $this->cardname, true);\n\n return new ActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id, true);\n $criteria->compare('pid', $this->pid, true);\n $criteria->compare('userName', $this->userName, true);\n $criteria->compare('userEmail', $this->userEmail, true);\n $criteria->compare('text', $this->text, true);\n $criteria->compare('userId', $this->userId, true);\n $criteria->compare('visibility', $this->visibility);\n $criteria->compare('date', $this->date, true);\n $criteria->compare('type', $this->type, true);\n $criteria->compare('recordId', $this->recordId, true);\n $criteria->compare('info', $this->info, true);\n $criteria->compare('new', $this->new, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('user', $this->user, true);\n $criteria->compare('amount', $this->amount);\n $criteria->compare('currency', $this->currency, true);\n $criteria->compare('valid_from', $this->valid_from, true);\n $criteria->compare('valid_to', $this->valid_to, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function search () {\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('title', $this->title, true);\n\t\t$criteria->compare('description', $this->description, true);\n\t\t$criteria->compare('type', $this->type);\n\t\t$criteria->compare('required', $this->required);\n\t\t$criteria->compare('cId', $this->cId);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t 'criteria' => $criteria,\n\t\t ));\n\t}",
"private function new_search()\n {\n $this->template = FALSE;\n \n $articulo = new articulo();\n $codfamilia = '';\n if( isset($_REQUEST['codfamilia']) )\n {\n $codfamilia = $_REQUEST['codfamilia'];\n }\n \n $con_stock = isset($_REQUEST['con_stock']);\n $this->results = $articulo->search($this->query, 0, $codfamilia, $con_stock);\n \n /// añadimos la busqueda\n foreach($this->results as $i => $value)\n {\n $this->results[$i]->query = $this->query;\n $this->results[$i]->dtopor = 0;\n }\n \n header('Content-Type: application/json');\n echo json_encode($this->results);\n }",
"public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('frequency_band',$this->frequency_band,true);\n\n\t\t$criteria->compare('date_of_issue',$this->date_of_issue,true);\n\n\t\t$criteria->compare('date_of_renewal',$this->date_of_renewal,true);\n\n\t\t$criteria->compare('emission',$this->emission,true);\n\n\t\t$criteria->compare('tolerance',$this->tolerance,true);\n\n\t\t$criteria->compare('application_vsat_id',$this->application_vsat_id,true);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\t\t/*\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('percent_discount',$this->percent_discount,true);\n\t\t$criteria->compare('taxable',$this->taxable);\n\t\t$criteria->compare('id_user_created',$this->id_user_created);\n\t\t$criteria->compare('id_user_modified',$this->id_user_modified);\n\t\t$criteria->compare('date_created',$this->date_created,true);\n\t\t$criteria->compare('date_modified',$this->date_modified,true);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t\t*/\n\t}",
"public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('first_name', $this->first_name, true);\n $criteria->compare('last_name', $this->last_name, true);\n $criteria->compare('address', $this->address, true);\n $criteria->compare('contact_number', $this->contact_number, true);\n $criteria->compare('city', $this->city, true);\n $criteria->compare('gender', $this->gender, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\t\t$criteria->select = 'createDate, employeeId';\n\t\t$criteria->distinct = true;\n\t\t$criteria->addCondition('employeeId=\"' . $this->employeeId . '\" AND createDate between \"' . $this->startDate . '\" AND \"' . $this->endDate . '\"');\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}"
] | [
"0.7773856",
"0.674291",
"0.65721744",
"0.6503215",
"0.6472826",
"0.6389071",
"0.63745373",
"0.6287255",
"0.62671757",
"0.62457365",
"0.62425256",
"0.62123144",
"0.61969537",
"0.6172912",
"0.61250603",
"0.6123412",
"0.6116283",
"0.61031115",
"0.6101092",
"0.608637",
"0.6081774",
"0.6081262",
"0.6073599",
"0.60723656",
"0.60405684",
"0.6040201",
"0.6035497",
"0.60331875",
"0.60318124",
"0.60199106",
"0.6013893",
"0.5998194",
"0.59764904",
"0.59671843",
"0.59620416",
"0.59579474",
"0.59551156",
"0.5941564",
"0.5935285",
"0.590389",
"0.5899341",
"0.5895071",
"0.5894937",
"0.5888715",
"0.58834034",
"0.5882613",
"0.58762497",
"0.58638185",
"0.5860362",
"0.5846486",
"0.58438134",
"0.5839541",
"0.5829547",
"0.5825096",
"0.5821819",
"0.5821492",
"0.5816446",
"0.5815201",
"0.58059967",
"0.58025193",
"0.57952476",
"0.5785819",
"0.57808983",
"0.57782406",
"0.57766914",
"0.5775805",
"0.57744527",
"0.57744527",
"0.57744527",
"0.57722074",
"0.5771512",
"0.5770783",
"0.5769345",
"0.57683945",
"0.57675093",
"0.576178",
"0.57557786",
"0.5747564",
"0.5746954",
"0.5745489",
"0.5741678",
"0.57375383",
"0.57335705",
"0.57302207",
"0.57280165",
"0.5726227",
"0.57238483",
"0.57218784",
"0.5715393",
"0.57136387",
"0.5713353",
"0.5711261",
"0.5710481",
"0.571002",
"0.57075536",
"0.57075375",
"0.57060134",
"0.5704971",
"0.5703576",
"0.57000446",
"0.5696112"
] | 0.0 | -1 |
bei Fehler sofort raus | public function exec($content) {
if ($this->isError()) return $content;
// sofort wieder raus, wenn imageTweak ausgeschaltet ist
if (! $this->settings[self::cfgTweakExec]) return $content;
// pruefen ob die PAGE_ID ignoriere werden soll
if (in_array(PAGE_ID, $this->settings[self::cfgIgnorePageIDs])) return $content;
// pruefen ob die TOPIC_ID ignoriert werden soll
if (defined('TOPIC_ID') && (in_array(TOPIC_ID, $this->settings[self::cfgIgnoreTopicIDs]))) return $content;
// Inhalt uebernehmen
$this->setContent($content);
// Inhalt pruefen und zurueckgeben
return $this->checkContent();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function AggiornaPrezzi(){\n\t}",
"public function masodik()\n {\n }",
"public function elso()\n {\n }",
"public function serch()\n {\n }",
"public function liberar() {}",
"public function boleta()\n\t{\n\t\t//\n\t}",
"public function trasnaction(){\n\n\t}",
"final function velcom(){\n }",
"public function obtener()\n {\n }",
"public function nadar()\n {\n }",
"function cl_traperm() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"traperm\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_sau_triagemavulsa() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"sau_triagemavulsa\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_rhempenhofolharubrica() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhempenhofolharubrica\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_sau_receitamedica() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"sau_receitamedica\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function ToonFormulierAfspraak()\n{\n\n}",
"function cl_tfd_situacaopedidotfd() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"tfd_situacaopedidotfd\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function factures_autoriser(){}",
"function cl_rechumano() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rechumano\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_rhfolhapagamento() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhfolhapagamento\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function acessarRelatorios(){\n\n }",
"function cl_rhestagio() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhestagio\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function leer(){\n }",
"public function leer(){\n }",
"function cl_rechumanorelacao() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rechumanorelacao\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function leer(){\n }",
"public function relatorioAction() { \r\n \r\n }",
"function cl_rhbasesreg() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhbasesreg\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"abstract public function getPasiekimai();",
"function ambas()\n {\n print \"Ejecución de la función ambas<br>\";\n # mediante $this-> requerimos la ejecución de metodo prueba\n # de la clase actual\n $this->prueba();\n # al señalar parent:: requerimos la ejecución de metodo prueba\n # de la clase padre\n parent::prueba();\n }",
"function cl_rhsolicita() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhsolicita\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function helper()\n\t{\n\t\n\t}",
"public function contrato()\r\n\t{\r\n\t}",
"function cl_rhemitecontracheque() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhemitecontracheque\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_aguacoletorexporta() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"aguacoletorexporta\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function mostra(){\n }",
"function rang_autoriser(){}",
"public function __init(){}",
"function guardarReclamo()\n\t\t{\n\t\t}",
"function cl_contacorrenteregravinculo() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"contacorrenteregravinculo\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_tfd_bpamagnetico() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"tfd_bpamagnetico\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function traerCualquiera()\n {\n }",
"function cl_tipovistoriasrec() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"tipovistoriasrec\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_issarqsimplesreg() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"issarqsimplesreg\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_moblevantamentoedi() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"moblevantamentoedi\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_reconhecimentocontabil() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"reconhecimentocontabil\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function hapus_toko(){\n\t}",
"public function valorpasaje();",
"function cl_ossoario() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"ossoario\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_rhconsignadomovimentoservidorrubrica() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhconsignadomovimentoservidorrubrica\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_aguacorte() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"aguacorte\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_ouvidoriaatendimento() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"ouvidoriaatendimento\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_rhlocaltrab() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhlocaltrab\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function tratarDados(){\r\n\t\r\n\t\r\n }",
"public function RicercaAvanzata(){\n $view = new VRicerca();\n $view->mostraFiltri();\n }",
"function cl_rhdirfgeracao() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhdirfgeracao\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_avaliacaoestruturanota() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"avaliacaoestruturanota\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_sau_agendaexames() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"sau_agendaexames\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_sau_agendaexames() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"sau_agendaexames\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_habitcandidatointeresseprograma() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"habitcandidatointeresseprograma\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function archobjet_autoriser() {\n}",
"function cl_pcorcamfornelic() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"pcorcamfornelic\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_tarefa_lanc() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"tarefa_lanc\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function accueil()\n {\n }",
"function cl_aguacalc() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"aguacalc\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function pasaje_abonado();",
"function cl_moblevantamento() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"moblevantamento\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_escrito() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"escrito\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_itinerarioescolaproc() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"itinerarioescolaproc\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_cemiteriorural() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"cemiteriorural\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_empreendimento() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"empreendimento\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public abstract function Ataca();",
"abstract protected function initRotues();",
"function __construct (){\n\t\t}",
"function cl_rhgeracaofolhaarquivo() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhgeracaofolhaarquivo\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_issplan() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"issplan\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function ruta_absoluta()\n {\n throw new Exception( 'Definir.' );\n }",
"function cl_ensino() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"ensino\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"abstract protected function faireDuSport();",
"public function Zapis_vsechny_kolize_v_zaveru_formulare ($pole, $idcka_skolizi, $iducast, $formular){\r\n //zapise kolize formulare \r\n self::Zapis_kolize_formulare($pole,$idcka_skolizi, $iducast, $formular);\r\n //-----------------------------------------------------------------------------\r\n \r\n \r\n //a zjisti a zapise kolize ucastnika pro vsechny formulare \r\n $vsechny_kolize_ucastnika_pole = self::Najdi_kolize_vsechny($iducast);\r\n //echo \"<br>**Vsechny kolize_pole v Zapis_vsechny_kolize..... **\";\r\n //var_dump($vsechny_kolize_ucastnika_pole);\r\n \r\n //znevalidneni vsech kolizi pro ucastnika \r\n self::Znevalidni_kolize_ucastnika_vsechny($iducast);\r\n foreach($vsechny_kolize_ucastnika_pole as $jedna_kolize){\r\n if ($jedna_kolize->kolize_nastala) {\r\n $jedna_kolize->Zapis_jednu_kolizi();\r\n } \r\n }\r\n \r\n}",
"public function ogs()\r\n {\r\n }",
"function cl_pesdiver() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"pesdiver\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function __construct()\n\t\t{\t\t\t\n\t\t}",
"public function uputstvo()\n {\n $this->prikaz(\"uputstvo\", []);\n }",
"public function attaquerAdversaire() {\n\n }",
"abstract function ActualizarDatos();",
"public function emitirSom()\n {\n }",
"public function buscar($objeto){\r\n\t}",
"function cl_far_listacontroladomed() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"far_listacontroladomed\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_empage() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"empage\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function USR() {\n }",
"public function custom()\n\t{\n\t}",
"function cl_escolabase() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"escolabase\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"].\"?ed77_i_escola=\".@$GLOBALS[\"HTTP_POST_VARS\"][\"ed77_i_escola\"].\"&ed18_c_nome=\".@$GLOBALS[\"HTTP_POST_VARS\"][\"ed18_c_nome\"].\"&ed31_c_descr=\".@$GLOBALS[\"HTTP_POST_VARS\"][\"ed31_c_descr\"].\"&ed77_i_base=\".@$GLOBALS[\"HTTP_POST_VARS\"][\"ed77_i_base\"]);\n }",
"function cl_empagemovslips() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"empagemovslips\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"private function __() {\n }",
"function cl_conplanoorcamento() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"conplanoorcamento\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_conplanoconplanoorcamento() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"conplanoconplanoorcamento\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function __construct(){\n\t\t//asi poder tener dispoble la vista que le pertenece a esta clase\n\t\tparent::__construct();\n\t}",
"function cl_diario() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"diario\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_editalrua() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"editalrua\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"final private function __construct(){\r\r\n\t}",
"public function run()\n {\n // Invocamos la factoría para poder crear la data de 5 registros de ubicacion de familiares\n\n \tfactory(FamiliarUbicacion::class,5)->create(); \n }"
] | [
"0.6349336",
"0.6300442",
"0.6273353",
"0.62374556",
"0.6209612",
"0.618881",
"0.6095674",
"0.6082413",
"0.5989126",
"0.59749615",
"0.59450483",
"0.5924914",
"0.5916475",
"0.5914938",
"0.5913727",
"0.5887731",
"0.5883347",
"0.58612525",
"0.5846461",
"0.5829511",
"0.5818275",
"0.57948154",
"0.57948154",
"0.57881725",
"0.57864845",
"0.5773063",
"0.5760928",
"0.5757581",
"0.57468975",
"0.57286173",
"0.5709146",
"0.5692187",
"0.5686702",
"0.5672376",
"0.56698537",
"0.56697434",
"0.56688064",
"0.56663233",
"0.56555307",
"0.5641033",
"0.5630813",
"0.5628679",
"0.562304",
"0.5614556",
"0.5611741",
"0.55932844",
"0.55779016",
"0.55771637",
"0.55755776",
"0.5574509",
"0.5561114",
"0.5559801",
"0.5558633",
"0.55477184",
"0.5547695",
"0.5539481",
"0.5536235",
"0.5515946",
"0.5515653",
"0.5515075",
"0.55142194",
"0.55110294",
"0.5504399",
"0.5494891",
"0.5490899",
"0.5488854",
"0.54875916",
"0.5479624",
"0.5479411",
"0.5478655",
"0.5473308",
"0.5453572",
"0.5451313",
"0.54487073",
"0.5444445",
"0.5436391",
"0.5435425",
"0.54209155",
"0.5417129",
"0.54013026",
"0.53991246",
"0.53975856",
"0.53942096",
"0.538864",
"0.5379033",
"0.53783",
"0.5377754",
"0.5376802",
"0.5373146",
"0.5371711",
"0.53589374",
"0.5358568",
"0.5355545",
"0.53536105",
"0.5333135",
"0.5332973",
"0.5320339",
"0.5319123",
"0.5317225",
"0.53159016",
"0.53067905"
] | 0.0 | -1 |
Get the validation rules that apply to the request. | public function rules()
{
if (request()->isMethod('POST')) {
return [
'rajaongkir_paket_estimasi' => 'required|numeric',
'rajaongkir_paket_name' => 'required',
'rajaongkir_paket_code' => 'required|size:3',
];
}
return [];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function rules()\n {\n $commons = [\n\n ];\n return get_request_rules($this, $commons);\n }",
"public function getRules()\n {\n return $this->validator->getRules();\n }",
"public function getValidationRules()\n {\n $rules = [];\n\n // Get the schema\n $schema = $this->getSchema();\n\n return $schema->getRules($this);\n }",
"public function rules()\n {\n return $this->validationRules;\n }",
"public function rules()\n {\n $rules = [];\n switch ($this->getMethod()):\n case \"POST\":\n $rules = [\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"PUT\":\n $rules = [\n 'id' => 'required|numeric',\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"DELETE\":\n $rules = [\n 'id' => 'required|numeric'\n ];\n break;\n endswitch;\n return $rules;\n }",
"public static function getRules()\n {\n return (new static)->getValidationRules();\n }",
"public function getRules()\n {\n return $this->validation_rules;\n }",
"public function getValidationRules()\n {\n return [];\n }",
"public function getValidationRules() {\n return [\n 'email' => 'required|email',\n 'name' => 'required|min:3',\n 'password' => 'required',\n ];\n }",
"public function rules()\n {\n if($this->isMethod('post')){\n return $this->post_rules();\n }\n if($this->isMethod('put')){\n return $this->put_rules();\n }\n }",
"public function rules()\n {\n $rules = [];\n\n // Validation request for stripe keys for stripe if stripe status in active\n if($this->has('stripe_status')){\n $rules[\"api_key\"] = \"required\";\n $rules[\"api_secret\"] = \"required\";\n $rules[\"webhook_key\"] = \"required\";\n }\n\n if($this->has('razorpay_status')){\n $rules[\"razorpay_key\"] = \"required\";\n $rules[\"razorpay_secret\"] = \"required\";\n $rules[\"razorpay_webhook_secret\"] = \"required\";\n }\n\n // Validation request for paypal keys for paypal if paypal status in active\n if($this->has('paypal_status')){\n $rules[\"paypal_client_id\"] = \"required\";\n $rules[\"paypal_secret\"] = \"required\";\n $rules[\"paypal_mode\"] = \"required_if:paypal_status,on|in:sandbox,live\";\n }\n\n\n return $rules;\n }",
"protected function getValidationRules()\n {\n $rules = [\n 'title' => 'required|min:3|max:255',\n ];\n\n return $rules;\n }",
"public function getRules()\n\t{\n\t\t$rules['user_id'] = ['required', 'exists:' . app()->make(User::class)->getTable() . ',id'];\n\t\t$rules['org_id'] = ['required', 'exists:' . app()->make(Org::class)->getTable() . ',id'];\n\t\t$rules['role'] = ['required', 'string', 'in:' . implode(',', Static::ROLES)];\n\t\t$rules['scopes'] = ['nullable', 'array'];\n\t\t$rules['ended_at'] = ['nullable', 'date'];\n\t\t$rules['photo_url'] = ['nullable', 'string'];\n\n\t\treturn $rules;\n\t}",
"public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n case 'PUT':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n }\n }",
"public function rules()\n {\n\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'min:6|same:password',\n 'role_id' => 'required'\n ];\n break;\n case 'PUT':\n case 'PATCH':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n\n default:\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n }\n return $rules;\n }",
"public function rules()\n {\n return $this->rules;\n }",
"public function rules()\n {\n return $this->rules;\n }",
"public function rules()\n {\n return $this->rules;\n }",
"public function rules()\n {\n return $this->rules;\n }",
"public function rules()\n {\n return $this->rules;\n }",
"public function rules()\n {\n return $this->rules;\n }",
"public function rules()\n {\n switch($this->method()) {\n case 'GET':\n return [];\n case 'POST':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'DELETE':\n return [];\n default:break;\n }\n \n }",
"public function rules($request) {\n $function = explode(\"@\", $request->route()[1]['uses'])[1];\n return $this->getRouteValidateRule($this->rules, $function);\n // // 获取请求验证的函数名\n // // ltrim(strstr($a,'@'),'@')\n // if (count(explode(\"@\", Request::route()->getActionName())) >= 2) {\n // $actionFunctionName = explode(\"@\", Request::route()->getActionName()) [1];\n // }\n\n // // 取配置并返回\n // if (isset($this->rules[$actionFunctionName])) {\n // if (is_array($this->rules[$actionFunctionName])) {\n // return $this->rules[$actionFunctionName];\n // }\n // else {\n // return $this->rules[$this->rules[$actionFunctionName]];\n // }\n // }\n // else {\n // return [];\n // }\n }",
"function getValidationRules() {\n\t\treturn array(\n\t\t\t'_MovieID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CountryID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_BroadCastDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t\t'_CreatedDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}",
"public function rules()\n {\n if ($this->method() === 'POST') {\n return $this->rulesForCreating();\n }\n\n return $this->rulesForUpdating();\n }",
"public function rules()\n {\n $validation = [];\n if ($this->method() == \"POST\") {\n $validation = [\n 'name' => 'required|unique:users',\n 'email' => 'required|unique:users|email',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'required|min:6',\n 'roles' => 'required',\n ];\n } elseif ($this->method() == \"PUT\") {\n $validation = [\n 'name' => 'required|unique:users,name,' . $this->route()->parameter('id') . ',id',\n 'email' => 'required|unique:users,email,' . $this->route()->parameter('id') . ',id|email',\n 'roles' => 'required',\n ];\n\n if ($this->request->get('change_password') == true) {\n $validation['password'] = 'required|min:6|confirmed';\n $validation['password_confirmation'] = 'required|min:6';\n }\n }\n\n return $validation;\n }",
"public function rules()\n {\n $data = $this->request->all();\n $rules['username'] = 'required|email';\n $rules['password'] = 'required'; \n\n return $rules;\n }",
"protected function getValidationRules()\n {\n $class = $this->model;\n\n return $class::$rules;\n }",
"public function rules()\n {\n $rules = $this->rules;\n\n $rules['fee'] = 'required|integer';\n $rules['phone'] = 'required|min:8|max:20';\n $rules['facebook'] = 'required|url';\n $rules['youtube'] = 'required|url';\n $rules['web'] = 'url';\n\n $rules['requestgender'] = 'required';\n $rules['serviceaddress'] = 'required|max:150';\n $rules['servicetime'] = 'required|max:150';\n $rules['language'] = 'required|max:150';\n $rules['bust'] = 'required|max:100|integer';\n $rules['waistline'] = 'required|max:100|integer';\n $rules['hips'] = 'required|max:100|integer';\n $rules['motto'] = 'max:50';\n\n return $rules;\n }",
"protected function getValidRules()\n {\n return $this->validRules;\n }",
"public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n {\n return [];\n }\n case 'POST':\n case 'PUT':\n {\n return [\n 'name' => 'required',\n ];\n }\n default:break;\n }\n }",
"public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n {\n return [\n 'mobile' => ['required','max:11','min:11'],\n 'code' => ['required','max:6','min:6'],\n 'avatar' => ['required'],\n 'wx_oauth' => ['required'],\n 'password' => ['nullable','min:6','max:20']\n ];\n }\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default: {\n return [];\n }\n }\n }",
"public function rules()\n {\n switch ($this->getRequestMethod()) {\n case 'index':\n return [\n 'full_name' => 'nullable|string',\n 'phone' => 'nullable|string',\n ];\n break;\n case 'store':\n return [\n 'crm_resource_id' => 'required|exists:crm_resources,id',\n 'channel' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$channel),\n 'call_status' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$call_statuses),\n ];\n break;\n default:\n return [];\n break;\n }\n }",
"public function rules()\n {\n //With password\n if(request('password') || request('password_confirmation')) {\n return array_merge($this->passwordRules(), $this->defaultRules());\n }\n //Without password\n return $this->defaultRules();\n }",
"public function rules()\n {\n $rules = [\n '_token' => 'required'\n ];\n\n foreach($this->request->get('emails') as $key => $val) {\n $rules['emails.'.$key] = 'required|email';\n }\n\n return $rules;\n }",
"function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CoverImageID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_TrackID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Status' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Rank' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CreateDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}",
"public function rules()\n { \n return $this->rules;\n }",
"public function getValidationRules()\n {\n if (method_exists($this, 'rules')) {\n return $this->rules();\n }\n\n $table = $this->getTable();\n $cacheKey = 'validate.' . $table;\n\n if (config('validate.cache') && Cache::has($cacheKey)) {\n return Cache::get($cacheKey);\n }\n\n // Get table info for model and generate rules\n $manager = DB::connection()->getDoctrineSchemaManager();\n $details = $manager->listTableDetails($table);\n $foreignKeys = $manager->listTableForeignKeys($table);\n\n $this->generateRules($details, $foreignKeys);\n\n if (config('validate.cache')) {\n Cache::forever($cacheKey, $this->rules);\n }\n\n return $this->rules;\n }",
"public function getValidationRules()\n {\n $rules = $this->getBasicValidationRules();\n\n if (in_array($this->type, ['char', 'string', 'text', 'enum'])) {\n $rules[] = 'string';\n if (in_array($this->type, ['char', 'string']) && isset($this->arguments[0])) {\n $rules[] = 'max:' . $this->arguments[0];\n }\n } elseif (in_array($this->type, ['timestamp', 'date', 'dateTime', 'dateTimeTz'])) {\n $rules[] = 'date';\n } elseif (str_contains(strtolower($this->type), 'integer')) {\n $rules[] = 'integer';\n } elseif (str_contains(strtolower($this->type), 'decimal')) {\n $rules[] = 'numeric';\n } elseif (in_array($this->type, ['boolean'])) {\n $rules[] = 'boolean';\n } elseif ($this->type == 'enum' && count($this->arguments)) {\n $rules[] = 'in:' . join(',', $this->arguments);\n }\n\n return [$this->name => join('|', $rules)];\n }",
"public function rules()\n {\n $rules = [];\n if ($this->isMethod('post')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n } elseif ($this->isMethod('put')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n }\n return $rules;\n }",
"public function validationRules()\n {\n return [];\n }",
"public function rules()\n {\n $rules = $this->rules;\n if(Request::isMethod('PATCH')){\n $rules['mg_name'] = 'required|min:2,max:16';\n }\n return $rules;\n }",
"function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_EventID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_SourceID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_HasEvent' => array(\n\t\t\t\t'inArray' => array('values' => array(self::HASEVENT_0, self::HASEVENT_1),),\n\t\t\t),\n\t\t);\n\t}",
"public function rules()\n {\n $rules = [];\n switch ($this->method()){\n case 'GET':\n $rules['mobile'] = ['required', 'regex:/^1[3456789]\\d{9}$/'];\n break;\n case 'POST':\n if($this->route()->getActionMethod() == 'sms') {\n $rules['area_code'] = ['digits_between:1,6'];\n if(in_array($this->get('type'), ['signup', 'reset_pay_pwd'])) {\n $rules['mobile'] = ['required', 'digits_between:5,20'];\n if($this->get('type') == 'signup' && !$this->get('area_code')) {\n $this->error('请选择区号');\n }\n }\n $rules['type'] = ['required', Rule::in(\\App\\Models\\Captcha::getSmsType())];\n }\n break;\n }\n return $rules;\n }",
"public function rules()\n {\n if ($this->isMethod('post')) {\n return $this->createRules();\n } elseif ($this->isMethod('put')) {\n return $this->updateRules();\n }\n }",
"public function rules()\n {\n $rules = [\n 'first_name' => ['required'],\n 'birthdate' => ['required', 'date', 'before:today'],\n ];\n\n if (is_international_session()) {\n $rules['email'] = ['required', 'email'];\n }\n\n if (should_collect_international_phone()) {\n $rules['phone'] = ['phone'];\n }\n\n if (is_domestic_session()) {\n $rules['phone'] = ['required', 'phone'];\n }\n\n return $rules;\n }",
"public function rules()\n {\n dd($this->request->get('answer'));\n foreach ($this->request->get('answer') as $key => $val)\n {\n $rules['answer.'.$key] = 'required';\n }\n\n return $rules;\n }",
"public function rules()\n {\n return static::$rules;\n }",
"function getRules() {\n\t\t$fields = $this->getFields();\n\t\t$allRules = array();\n\n\t\tforeach ($fields as $field) {\n\t\t\t$fieldRules = $field->getValidationRules();\n\t\t\t$allRules[$field->getName()] = $fieldRules;\n\t\t}\n\n\t\treturn $allRules;\n\t}",
"public static function getValidationRules(): array\n {\n return [\n 'name' => 'required|string|min:1|max:255',\n 'version' => 'required|float',\n 'type' => 'required|string',\n ];\n }",
"public function rules()\n {\n $rules = [\n 'name' => 'required',\n 'phone' => 'required|numeric',\n 'subject' => 'required',\n 'message' => 'required',\n 'email' => 'required|email',\n ];\n\n return $rules;\n }",
"public function getValidationRules(): array\n {\n return [\n 'email_address' => 'required|email',\n 'email_type' => 'nullable|in:html,text',\n 'status' => 'required|in:subscribed,unsubscribed,cleaned,pending',\n 'merge_fields' => 'nullable|array',\n 'interests' => 'nullable|array',\n 'language' => 'nullable|string',\n 'vip' => 'nullable|boolean',\n 'location' => 'nullable|array',\n 'location.latitude' => ['regex:/^[-]?(([0-8]?[0-9])\\.(\\d+))|(90(\\.0+)?)$/'], \n 'location.longitude' => ['regex:/^[-]?((((1[0-7][0-9])|([0-9]?[0-9]))\\.(\\d+))|180(\\.0+)?)$/'],\n 'marketing_permissions' => 'nullable|array',\n 'tags' => 'nullable|array'\n ];\n }",
"protected function getValidationRules()\n {\n return [\n 'first_name' => 'required|max:255',\n 'last_name' => 'required|max:255',\n 'email' => 'required|email|max:255',\n 'new_password' => 'required_with:current_password|confirmed|regex:' . config('security.password_policy'),\n ];\n }",
"public function rules()\n {\n // get 直接放行\n if( request()->isMethod('get') ){\n return []; // 规则为空\n }\n\n // 只在post的时候做验证\n return [\n 'username' => 'required|min:2|max:10', \n 'password' => 'required|min:2|max:10', \n 'email' => 'required|min:2|max:10|email', \n 'phoneNumber' => 'required|min:2|max:10', \n\n ];\n }",
"public function rules()\n {\n\n $rules = [\n 'id_tecnico_mantenimiento' => 'required',\n 'id_equipo_mantenimiento' => 'required'\n ];\n\n if ($this->request->has('status')) {\n $rules['status'] = 'required';\n }\n\n if ($this->request->has('log_mantenimiento')) {\n $rules['log_mantenimiento'] = 'required';\n }\n\n return $rules;\n }",
"public function rules()\n {\n $this->buildRules();\n return $this->rules;\n }",
"public function rules()\n {\n $rules = [];\n\n if ($this->isUpdate() || $this->isStore()) {\n $rules = array_merge($rules, [\n 'name' => 'required|string',\n 'email' => 'email',\n 'password' => 'confirmed|min:6',\n\n ]);\n }\n\n if ($this->isStore()) {\n $rules = array_merge($rules, [\n\n ]);\n }\n\n if ($this->isUpdate()) {\n $rules = array_merge($rules, [\n ]);\n }\n\n return $rules;\n }",
"public function rules()\n {\n switch (true) {\n case $this->wantsToList():\n $rules = $this->listRules;\n break;\n case $this->wantsToStore():\n $rules = $this->storeRules;\n break;\n case $this->wantsToUpdate():\n $this->storeRules['email'] = 'required|email|between:5,100|unique:users,email,' . $this->route('administrators');\n\n $rules = $this->storeRules;\n break;\n default:\n $rules = [];\n }\n\n return $rules;\n }",
"public function rules()\n {\n if($this->isMethod('post')) {\n return $this->storeRules();\n }\n else if($this->isMethod('put') || $this->isMethod('patch')){\n return $this->updateRules();\n }\n }",
"abstract protected function getValidationRules();",
"public function rules()\n\t{\n\t\treturn ModelHelper::getRules($this);\n\t}",
"public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return $this->getPostRules();\n case 'PUT':\n return $this->getPutRules();\n }\n }",
"public function rules()\n {\n $rules = [\n 'name' => 'required|string|min:2',\n 'email' => \"required|email|unique:users,email, {$this->request->get('user_id')}\",\n 'role_id' => 'required|numeric',\n 'group_id' => 'required|numeric',\n ];\n\n if ($this->request->has('password')){\n $rules['password'] = 'required|min:6';\n }\n\n return $rules;\n }",
"public function rules()\n {\n if($this->method() == 'POST')\n {\n return [\n 'reason'=>'required',\n 'date_from'=>'required',\n 'date_to'=>'required',\n 'attachment'=>'required',\n ];\n }\n }",
"public function rules()\n {\n $method = $this->method();\n if ($this->get('_method', null) !== null) {\n $method = $this->get('_method');\n }\n // $this->offsetUnset('_method');\n switch ($method) {\n case 'DELETE':\n case 'GET':\n break; \n case 'POST':\n $mailRules = \\Config::get('database.default').'.users';\n break;\n case 'PUT':\n $user = $this->authService->authJWTUserForm();\n $mailRules = \\Config::get('database.default').'.users,email,'.$user->getKey();\n break;\n case 'PATCH':\n break;\n default:\n break;\n }\n \n return [\n 'name' => 'required|string|max:256',\n 'email' => 'required|string|email|max:255|unique:'.$mailRules,\n 'password' => 'required|string|min:3',\n ];\n }",
"public function rules() {\n $rule = [\n 'value' => 'bail|required',\n ];\n if ($this->getMethod() == 'POST') {\n $rule += ['type' => 'bail|required'];\n }\n return $rule;\n }",
"public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n case 'PUT':\n case 'PATCH': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n default:\n break;\n }\n\n return [\n //\n ];\n }",
"public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST':\n case 'PUT':\n case 'PATCH': {\n return [\n 'name' => 'required|string|max:255',\n 'iso_code_2' => 'required|string|size:2',\n 'iso_code_3' => 'required|string|size:3',\n ];\n }\n default:\n return [];\n }\n }",
"public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n return [];\n case 'POST':\n return [\n 'name' => 'required|string',\n 'lastName' => 'string',\n 'gender' => 'boolean',\n 'avatar' => 'sometimes|mimes:jpg,png,jpeg|max:3048'\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'oldPassword' => 'required|string',\n 'newPassword' => 'required|string',\n ];\n default:\n break;\n }\n }",
"public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n {\n return [\n 'validation' => [\n 'accepted'\n ]\n ];\n }\n case 'POST':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'published_at_time' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n 'unpublished_time' => [\n 'nullable',\n ],\n ];\n }\n case 'PUT':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n ];\n }\n case 'PATCH':\n {\n return [];\n }\n default:\n break;\n }\n }",
"public function rules()\n {\n if (in_array($this->method(), ['PUT', 'PATCH'])) {\n $user = User::findOrFail(\\Request::input('id'))->first();\n\n array_forget($this->rules, 'email');\n $this->rules = array_add($this->rules, 'email', 'required|email|max:255|unique:users,email,' . $user->id);\n }\n\n return $this->rules;\n }",
"public function rules()\n {\n $method = explode('@', $this->route()->getActionName())[1];\n return $this->get_rules_arr($method);\n }",
"public function rules()\n {\n $rules = parent::rules();\n $extra_rules = [];\n $rules = array_merge($rules, $extra_rules);\n return $rules;\n }",
"public function rules()\n {\n\t\tswitch($this->method()) {\n\t\t\tcase 'POST':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tcase 'PUT':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tdefault:break;\n\t\t}\n }",
"public function rules()\n {\n $this->sanitize();\n return [\n 'event_id' => 'required',\n 'member_id' => 'required',\n 'guild_pts' => 'required',\n 'position' => 'required',\n 'solo_pts' => 'required',\n 'league_id' => 'required',\n 'solo_rank' => 'required',\n 'global_rank' => 'required',\n ];\n }",
"public function rules()\n {\n $this->rules['email'] = ['required', 'min:6', 'max:60', 'email'];\n $this->rules['password'] = ['required', 'min:6', 'max:60'];\n\n return $this->rules;\n }",
"public function getValidatorRules()\n {\n if ($validator = $this->getValidator()) {\n return $validator->getRulesForField($this->owner);\n }\n \n return [];\n }",
"public function getValidationRules() : array;",
"public function rules()\n {\n switch ($this->route()->getActionMethod()) {\n case 'login': {\n if ($this->request->has('access_token')) {\n return [\n 'access_token' => 'required',\n 'driver' => 'required|in:facebook,github,google',\n ];\n }\n return [\n 'email' => 'required|email',\n 'password' => 'required|min:6',\n ];\n }\n case 'register': {\n return [\n 'email' => 'required|email|unique:users,email',\n 'password' => 'required|min:6',\n 'name' => 'required',\n ];\n }\n default: return [];\n }\n }",
"public function rules()\n {\n Validator::extend('mail_address_available', function($attribute, $value, $parameters, $validator){\n return MailAddressSpec::isAvailable($value);\n });\n Validator::extend('password_available', function($attribute, $value, $parameters, $validator){\n return PassWordSpec::isAvailable($value);\n });\n\n return [\n 'mail_address' => [\n 'required',\n 'mail_address_available'\n ],\n 'password' => [\n 'required',\n 'password_available',\n ],\n ];\n }",
"public function rules()\n {\n switch (strtolower($this->method())) {\n case 'get':\n return $this->getMethodRules();\n case 'post':\n return $this->postMethodRules();\n case 'put':\n return $this->putMethodRules();\n case 'patch':\n return $this->patchMethodRules();\n case 'delete':\n return $this->deleteMethodRules();\n }\n }",
"public function rules()\n {\n /**\n * This is the original way, expecting post params for each user value\n */\n return [\n 'firstName' => 'required|min:2|max:255',\n 'lastName' => 'required|min:2|max:255',\n 'phone' => 'min:9|max:25',\n 'gender' => 'in:M,V',\n 'dateOfBirth' => 'before:today|after:1890-01-01',\n 'email' => 'email|min:12|max:255',\n ];\n }",
"public function getValidationRules(): array {\n\t\t$result = [];\n\t\t\n\t\tforeach ($this->getSections() as $section) {\n\t\t\t$result = array_merge($result, $section->getValidationRules());\n\t\t}\n\t\t\n\t\treturn $result;\n\t}",
"public function rules()\n\t{\n\t\t$rule = [];\n\t\tif(Request::path() == 'api/utility/upload-image'){\n\t\t\t$rule = [\n\t\t\t\t'imagePath' => 'required',\n\t\t\t];\n\t\t}else if(Request::path() == 'api/utility/check-transaction'){\n\t\t\t$rule = [\n\t\t\t\t'countNumber' => 'required',\n\t\t\t];\n\t\t}\n\t\treturn $rule;\n\t}",
"public function rules()\n {\n $rules = array();\n return $rules;\n }",
"public function rules()\n {\n $this->setValidator($this->operation_type);\n return $this->validator;\n }",
"public function rules()\n {\n switch($this->method()){\n case 'POST':\n return [\n 'name' => 'required',\n 'app_id' => 'required',\n 'account_id' => 'required',\n 'start_at' => 'required',\n 'end_at' => 'required',\n 'content' => 'required',\n ];\n break;\n default:\n return [];\n break;\n }\n\n }",
"public function rules()\n {\n $rules = [\n 'users' => 'required|array',\n ];\n\n foreach($this->request->get('users') as $key => $user) {\n $rules['users.'. $key . '.name'] = 'required|string|min:3|max:255';\n $rules['users.'. $key . '.phone'] = 'required|regex:/^[0-9\\+\\s]+$/|min:10|max:17';\n $rules['users.'. $key . '.country'] = 'required|string|min:2:max:3';\n }\n\n return $rules;\n }",
"protected function get_validation_rules()\n {\n }",
"public function rules()\n {\n $rules = [\n 'mail_driver' => 'required',\n 'mail_name' => 'required',\n 'mail_email' => 'required',\n ];\n\n $newRules = [];\n\n if($this->mail_driver == 'smtp') {\n $newRules = [\n 'mail_host' => 'required',\n 'mail_port' => 'required|numeric',\n 'mail_username' => 'required',\n 'mail_password' => 'required',\n 'mail_encryption' => 'required',\n ];\n }\n\n return array_merge($rules, $newRules);\n }",
"public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n $rules['location'] = 'required';\n $rules['end_recruit_date'] = 'required';\n $rules['time_taken'] = 'required';\n $rules['payment'] = 'required';\n $rules['objective'] = 'required';\n $rules['method_desc'] = 'required';\n $rules['health_condition'] = 'required';\n $rules['required_applicant'] = 'required|integer';\n $rules['applicant'] = 'nullable';\n $rules['datetime'] = 'required';\n\n return $rules;\n }",
"public function rules()\n {\n switch($this->method()) {\n\n case 'PUT':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n case 'POST':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n default:\n return [];\n }\n\n }",
"public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n\n return $rules;\n }",
"public function rules()\n {\n switch(Route::currentRouteName()){\n case 'adminBinding' :\n return [\n 'order_id' => 'required|integer',\n 'money' => 'required|numeric',\n ];\n case 'adminUnbinding' :\n return [\n 'order_id' => 'required|integer',\n 'pivot_id' => 'required|integer',\n ];\n case 'adminReceiptSave' :\n case 'adminReceiptUpdate' :\n return [\n 'customer_id' => 'required',\n 'receiptcorp' => 'required',\n 'account' => 'required',\n 'account_id' => 'required',\n 'bank' => 'required',\n 'currency_id' => 'required',\n 'advance_amount' => 'required|numeric',\n 'picture' => 'required',\n 'business_type' => 'required|in:1,2,3,4,5',\n 'exchange_type' => 'required_unless:currency_id,354|in:1,2',\n 'expected_received_at' => 'required|date_format:Y-m-d',\n ];\n case 'adminReceiptExchange' :\n return [\n 'rate' => 'required|numeric',\n ];\n default :\n return [];\n }\n }",
"public function rules()\n {\n $rules = [];\n $method = $this->getMethod();\n switch ($method) {\n case 'GET':\n if (Route::currentRouteName() === 'schoolActivity.getSchoolActivity') {\n $rules = [\n ];\n }\n break;\n }\n return $rules;\n }",
"public function rules()\n {\n $rules = new Collection();\n\n if (!$this->user() or !$this->user()->addresses()->count()) {\n $rules = $rules->merge($this->addressRules('billing'));\n if ($this->has('different_shipping_address')) {\n $rules = $rules->merge($this->addressRules('shipping'));\n }\n\n return $rules->toArray();\n }\n\n return $rules->merge([\n 'billing_address_id' => 'required|numeric',\n 'shipping_address_id' => 'required|numeric',\n ])->toArray();\n }",
"public function rules(): array\n {\n switch ($this->method()) {\n case 'POST':\n return $this->__rules() + $this->__post();\n case 'PUT':\n return $this->__rules() + $this->__put();\n default:\n return [];\n }\n }",
"public function rules(Request $request)\n {\n return Qc::$rules;\n }",
"public function defineValidationRules()\n {\n return [];\n }",
"public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'user_name' => 'nullable|string',\n 'excel' => 'nullable|file|mimes:xlsx',\n 'category' => 'required|int|in:' . implode(',', array_keys(UserMessage::$categories)),\n 'content' => 'required|string|max:500',\n 'member_status' => 'required|int|in:' . implode(',', array_keys(User::$statuses)),\n ];\n break;\n }\n }",
"public function rules()\n {\n return [\n 'lead_id' => [\n 'required', 'string',\n ],\n 'api_version' => [\n 'required', 'string',\n ],\n 'form_id' => [\n 'required', 'int',\n ],\n 'campaign_id' => [\n 'required', 'int',\n ],\n 'google_key' => [\n 'required', 'string', new GoogleKeyRule,\n ],\n ];\n }"
] | [
"0.8342797",
"0.8013068",
"0.79357624",
"0.79257727",
"0.7922943",
"0.7903906",
"0.7859204",
"0.7789624",
"0.7783409",
"0.77624106",
"0.773673",
"0.7732383",
"0.77094924",
"0.7691624",
"0.7684878",
"0.7682184",
"0.7682184",
"0.7682184",
"0.7682184",
"0.7682184",
"0.7682184",
"0.76753145",
"0.76747704",
"0.76653886",
"0.7656984",
"0.7641385",
"0.7629662",
"0.7629557",
"0.7617277",
"0.76092637",
"0.7607173",
"0.7602176",
"0.7598716",
"0.7597812",
"0.7591812",
"0.75902253",
"0.7587347",
"0.7579866",
"0.75553906",
"0.7555079",
"0.75503534",
"0.75459445",
"0.7540463",
"0.7536189",
"0.75356364",
"0.75300074",
"0.75181943",
"0.7514811",
"0.75078565",
"0.7506201",
"0.75052506",
"0.7498871",
"0.7495198",
"0.7494957",
"0.7493081",
"0.74902064",
"0.7489407",
"0.74890095",
"0.7485984",
"0.74858546",
"0.7478957",
"0.74781555",
"0.74693084",
"0.74632835",
"0.7461654",
"0.746117",
"0.745908",
"0.74546385",
"0.7453331",
"0.7452256",
"0.7449815",
"0.74481654",
"0.7441297",
"0.74408644",
"0.7435215",
"0.743476",
"0.7432712",
"0.74296844",
"0.74289936",
"0.7423239",
"0.7418971",
"0.74155754",
"0.7413715",
"0.7413531",
"0.7412177",
"0.7409704",
"0.740534",
"0.74039155",
"0.7403364",
"0.740084",
"0.73900056",
"0.73831314",
"0.73729247",
"0.7370593",
"0.73688376",
"0.73608065",
"0.7355452",
"0.7346383",
"0.73441696",
"0.73426807",
"0.73349255"
] | 0.0 | -1 |
Get checkout session namespace | public function getCheckout()
{
return Mage::getSingleton('checkout/session');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function &getNamespace() {\r\n\t\t$ns = self::SESSION_NAMESPACE;\r\n\t\tif(!isset($_SESSION[$ns])) {\r\n\t\t\t$_SESSION[$ns] = array();\r\n\t\t}\r\n\t\treturn $_SESSION[$ns];\r\n\t}",
"protected static function getSessionNamespace()\n {\n return rex::getProperty('instname') . '_backend';\n }",
"static function reporticoNamespace()\n {\n return ReporticoApp::get(\"session_namespace_key\");\n }",
"public function getNamespace()\n {\n $this->_init();\n return unserialize($this->_list_cache->getNamespace());\n }",
"public function getSessionNamespace()\n {\n if (null === $this->_session) {\n $this->_session =\n new Zend_Session_Namespace($this->_namespace);\n }\n \n return $this->_session;\n }",
"protected function getNamespace()\n {\n return $this->wrapped->getNamespace();\n }",
"public function getCheckout()\n\t{\n\t\treturn Mage::getSingleton('checkout/session');\n\t}",
"public function get_namespace() : string\n {\n return $this->namespace;\n }",
"public function getNamespace()\n {\n return isset($this->namespace) ? $this->namespace : '';\n }",
"public function getSessionNamespace() {\n if (null === $this->_session) {\n $this->_session =\n new Zend_Session_Namespace($this->_namespace);\n }\n\n return $this->_session;\n }",
"protected function _getCheckout()\n {\n return $this->session;\n }",
"public function getCheckout()\n\t{\n\t\tMage::log(\" --- Snap* Hosted Payments API : getCheckout --- \");\n\t\treturn Mage::getSingleton('checkout/session');\n\t}",
"public function getNamespace() {\n\t\treturn $this->config->get('namespace');\n\t}",
"public function getNamespace()\r\n {\r\n return $this->namespace;\r\n }",
"public function getCheckout()\r\n {\r\n return Mage::getSingleton('checkout/session');\r\n }",
"public function getNamespace()\r\n {\r\n return $this->namespace;\r\n }",
"public function getNamespace()\n {\n return $this->_namespace;\n }",
"public function getCheckout() {\n return Mage::getSingleton('checkout/session');\n }",
"public function getCheckout() {\n return Mage::getSingleton('checkout/session');\n }",
"public function getNamespace()\n\t{\n\t\treturn $this->_namespace;\n\t}",
"public function getContainerNamespace();",
"public function getNamespace()\n {\n return $this->namespace;\n }",
"public function getNamespace()\n {\n return $this->namespace;\n }",
"public function getNamespace()\n {\n return $this->namespace;\n }",
"public function getNamespace()\n {\n return $this->namespace;\n }",
"public function getNamespace()\n {\n return $this->namespace;\n }",
"public function getNamespace()\n {\n return $this->namespace;\n }",
"public function getNamespace()\n {\n return $this->namespace;\n }",
"public function getNamespace()\n {\n return $this->namespace;\n }",
"public function getNamespace()\n {\n return $this->namespace;\n }",
"public function getNamespace()\n {\n return $this->namespace;\n }",
"public function getCheckout() {\r\r\n return Mage::getSingleton('checkout/session');\r\r\n }",
"protected function _getCheckoutSession()\n {\n return Mage::getSingleton('checkout/session');\n }",
"protected function _getCheckout()\n {\n return Mage::getSingleton('checkout/session');\n }",
"protected function _getCheckout()\n {\n return Mage::getSingleton('checkout/session');\n }",
"public function getNamespace()\n\t{\n\t\treturn $this->nameSpace;\n\t}",
"public function getNamespace() {\n return $this->namespace;\n }",
"public function getNamespace(): string\n {\n return $this->namespace;\n }",
"public function getNamespace(): string\n {\n return $this->namespace;\n }",
"public function getNamespace() {\n\t\treturn $this->rootNS;\n\t}",
"public function getCheckout()\n {\n return $this->_checkoutSession;\n }",
"public function getCheckout()\n {\n return $this->_checkoutSession;\n }",
"function getNameSpace() { return $this->_namespace; }",
"protected function getCheckoutSession()\n {\n return $this->_checkoutSession;\n }",
"protected function getNamespace()\n {\n $namespace = Container::getInstance()->getNamespace();\n return rtrim($namespace, '\\\\');\n }",
"protected function getCheckout()\n {\n return $this->_checkoutSession;\n }",
"public function getNamespaceId()\n {\n return $this->namespace_id;\n }",
"protected function _getCheckout()\n {\n return $this->_checkoutSession;\n }",
"protected function _getCheckout()\n {\n return $this->_checkoutSession;\n }",
"protected function _getCheckout()\n {\n return $this->_checkoutSession;\n }",
"protected function _getCheckoutSession()\n {\n return $this->_checkoutSession;\n }",
"protected function _getCheckoutSession()\n {\n return $this->_checkoutSession;\n }",
"protected function _getCheckoutSession()\n {\n return $this->_checkoutSession;\n }",
"public function getNamespace(){\n \n return $this->namespace;\n \n }",
"public function getNamespace()\r\n {\r\n return $this->Namespace;\r\n }",
"public function getNamespace()\n {\n return $this->getAttribute('metadata.namespace', 'default');\n }",
"public function getNamespace()\n {\n return $this->getNamespaceName();\n }",
"public function getNamespaceName() {\n\n\t\treturn $this->_namespace;\n\t}",
"public function getSession()\n {\n return Mage::getSingleton('paystation/session');\n }",
"function getNamespace();",
"function getNamespace();",
"public function getNamespace();",
"public function getNamespace();",
"public function getNamespace();",
"static public function get($namespace){\n return SessionNamespace::exists($namespace) ? Session::get_data($namespace) : null;\n }",
"public function getTopLevelNamespace($namespace)\n {\n return $this->getNamespaceSection($namespace, 1);\n }",
"public function getSessionNm() {\n $this->_session_nm = $this->pub_session_nm;\n return $this->pub_session_nm;\n }",
"function getNamespace ();",
"private function _getNamespace() {\n $ns = explode('_', get_class($this));\n return $ns[0];\n }",
"protected function _getCheckoutSession() {\n\t\tif ($this->_checkoutSession === null) {\n\t\t\t$this->_checkoutSession = Mage::getSingleton ( \"checkout/session\" );\n\t\t}\n\t\treturn $this->_checkoutSession;\n\t}",
"public function getNCNamespace()\n {\n return str_replace('\\\\', '\\\\\\\\', $this->namespace);\n }",
"public function getNamespace(): string;",
"public function getNamespacePrefix() {\n\t\treturn $this->nsPrefix;\n\t}",
"public function getNamespace(): string\n {\n return (string)$this->currentNode->namespaceURI;\n }",
"static function reporticoSessionName()\n {\n //if ( ReporticoApp::get(\"session_namespace\") )\n if (self::getReporticoSessionParam(\"framework_parent\")) {\n return \"NS_\" . ReporticoApp::get(\"session_namespace\");\n } else {\n return session_id() . \"_\" . ReporticoApp::get(\"session_namespace\");\n }\n\n }",
"public function getNamespace()\n {\n // TODO: Implement getNamespace() method.\n }",
"public function getRootNamespace()\n {\n return $this->rootNameSpace;\n }",
"protected function _getCheckoutSession()\n {\n /** @var Mage_Checkout_Model_Session $session */\n $session = Mage::getSingleton('checkout/session');\n return $session;\n }",
"public function getNamespaceName();",
"public function getNs()\n {\n return $this->ns;\n }",
"public static function view_namespace()\n\t{\n\t\treturn __NAMESPACE__;\t\n\t}",
"public abstract function getApplicationNamespace();",
"public function getNamespace()\n {\n if (null === $this->reflected) {\n $this->reflected = new \\ReflectionObject($this);\n }\n\n return $this->reflected->getNamespaceName();\n }",
"public function getDefaultNamespace()\n\t{\n\t\treturn $this->default_namespace;\n\t}",
"protected function _getSession()\n\t{\n\t\treturn Mage::getSingleton('checkout/session');\n\t}",
"public function testGetNamespace() {\n\t\t$session = $this->getSession();\n\t\t$this->assertSame('test', $session->getNamespace(), 'Namespace does not match');\n\t}",
"private function getNamespaceName() {\n if ($this->getTypeName() != 'n_NAMESPACE') {\n return null;\n }\n\n $namespace_name = $this->getChildByIndex(0);\n if ($namespace_name->getTypeName() == 'n_EMPTY') {\n return null;\n }\n\n return '\\\\'.$namespace_name->getConcreteString();\n }",
"public function getCNamespace()\n {\n return str_replace('\\\\', '_', $this->namespace);\n }",
"public function getNamespace()\n {\n return null;\n }",
"public function getBaseNamespace()\n {\n return $this->baseNamespace;\n }",
"function getSession() {\n\t\treturn Cgn_Session::getSessionObj();\n\t}",
"public function getSession() {\n return Mage::getSingleton('payupl/session');\n }",
"protected function _getCheckoutSession()\n {\n if (!($this->_checkoutSession instanceof Mage_Checkout_Model_Session)) {\n $this->_checkoutSession = Mage::getSingleton('checkout/session');\n }\n return $this->_checkoutSession;\n }",
"public function getNamespace()\n {\n return is_null($this->config) ? null : get_class($this->config);\n }",
"public function getStreamNamespace();",
"protected function getNamespace()\n {\n $reflectionClass = new \\ReflectionClass(get_class($this));\n return dirname($reflectionClass->getNamespaceName());\n }",
"protected function _getSession()\n {\n return Mage::getSingleton('mbiz_cc/session');\n }",
"public function getSessionName()\n {\n return session_name();\n }",
"public function getNamespace(string $namespace)\n {\n return $this->_namespace->getNamespace($namespace);\n }"
] | [
"0.7511329",
"0.74131846",
"0.7385103",
"0.6758278",
"0.67463213",
"0.6745759",
"0.66868323",
"0.66461277",
"0.66362065",
"0.66352165",
"0.6600797",
"0.65842766",
"0.6569904",
"0.65566593",
"0.6548233",
"0.65337324",
"0.6529717",
"0.6529634",
"0.6529634",
"0.6526772",
"0.6515258",
"0.6507175",
"0.6507175",
"0.6507175",
"0.6507175",
"0.6507175",
"0.6507175",
"0.6507175",
"0.6507175",
"0.6507175",
"0.6507175",
"0.65052193",
"0.6497317",
"0.6491319",
"0.6491319",
"0.64910823",
"0.6483828",
"0.64820254",
"0.64820254",
"0.64594555",
"0.64313346",
"0.64313346",
"0.6430173",
"0.64300466",
"0.642343",
"0.64021474",
"0.63963056",
"0.63800806",
"0.63800806",
"0.63800806",
"0.6379227",
"0.6379227",
"0.6379227",
"0.6374691",
"0.63496244",
"0.6346492",
"0.6307213",
"0.6286631",
"0.6250358",
"0.6223347",
"0.6223347",
"0.6216725",
"0.6216725",
"0.6216725",
"0.6211539",
"0.61905843",
"0.6182423",
"0.61688817",
"0.6166633",
"0.6157453",
"0.6144712",
"0.6141588",
"0.61415666",
"0.6119374",
"0.61129653",
"0.6112002",
"0.6105091",
"0.6103248",
"0.6071504",
"0.6032592",
"0.6021054",
"0.59861547",
"0.59795177",
"0.5969122",
"0.5963792",
"0.5935972",
"0.5923189",
"0.59190726",
"0.5913226",
"0.59035474",
"0.5892492",
"0.58844894",
"0.58567303",
"0.5848771",
"0.58485645",
"0.58424723",
"0.58353645",
"0.5834897",
"0.5834588"
] | 0.65216637 | 21 |
postfinance payment API instance | protected function _getApi()
{
$order = Mage::getModel('sales/order')->loadByIncrementId($this->getCheckout()->getLastRealOrderId());
return $order->getPayment()->getMethodInstance();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function postCreatePayPeriod(){\n \n $pay_period = new TimeTrackingPayPeriod();\n $this->postPayPeriod($pay_period);\n \n }",
"public function process_payment() {\n\n\n global $admin_settings;\n\n check_ajax_referer( 'kp-korapay-pay-nonce', 'kp_sec_code' );\n\n $tx_ref = $_POST['reference'];\n $status = $_POST['status'];\n $secret_key = $admin_settings->get_option_value( 'secret_key' );\n $amount=$_POST['amount'];\n $args = array(\n 'post_type' => 'payment_list',\n 'post_status' => 'publish',\n 'post_title' => $tx_ref,\n );\n\n $payment_record_id = wp_insert_post( $args, true );\n\n if ( ! is_wp_error( $payment_record_id )) {\n\n $post_meta = array(\n '_kp_korapay_payment_amount' => 'NGN'.' '.$_POST['amount'],\n '_kp_korapay_payment_fullname' => $_POST['first_name'].' '.$_POST['last_name'],\n '_kp_korapay_payment_customer' => $_POST['email'],\n '_kp_korapay_payment_status' => $status,\n '_kp_korapay_payment_tx_ref' => $tx_ref,\n );\n\n $this->_add_post_meta( $payment_record_id, $post_meta );\n\n }\n $redirect_url_key = $status === 'success' ? 'success_redirect_url' : 'failed_redirect_url';\n\n echo json_encode( array( 'status' => $status, 'redirect_url' => $admin_settings->get_option_value( $redirect_url_key ) ) );\n\n die();\n\n }",
"public function testCreateFinancialStatementUsingPost()\n {\n }",
"public function payment(){\n\t\t$_POST['reference'] = date('NWHis');\n\t\techo json_encode($this->pagseguro->doPayment($_POST));\n\t}",
"public function create(){\n $payer = new Payer();\n $payer->setPaymentMethod(\"paypal\");\n\n // Set redirect URLs\n $redirectUrls = new RedirectUrls();\n\n if (App::environment() == 'production') {\n $app_url = \"https://doomus.com.br/public\";\n } else {\n $app_url = \"http://localhost:8000\";\n }\n\n $redirectUrls->setReturnUrl(\"$app_url/execute-payment\")\n ->setCancelUrl(\"$app_url/cancel-payment\");\n\n // Set payment amount\n if(session('cupom') !== null && session('valorFrete') !== null){\n $amount = new Amount();\n $amount->setCurrency(\"BRL\")\n ->setTotal(round(Cart::total(), 2) + str_replace(',','.', session('valorFrete')));\n }elseif(session('valorFrete') !== null){\n $amount = new Amount();\n $amount->setCurrency(\"BRL\")\n ->setTotal(Cart::total() + str_replace(',','.', session('valorFrete')));\n }else{\n $amount = new Amount();\n $amount->setCurrency(\"BRL\")\n ->setTotal(Cart::total());\n }\n\n // Set transaction object\n $transaction = new Transaction();\n $transaction->setAmount($amount)\n ->setDescription(\"Payment description\");\n\n // Create the full payment object\n $payment = new Payment();\n $payment->setIntent('sale')\n ->setPayer($payer)\n ->setRedirectUrls($redirectUrls)\n ->setTransactions(array($transaction));\n\n // Create payment with valid API context\n try {\n $payment->create($this->_apiContext);\n \n // Get PayPal redirect URL and redirect the customer\n return redirect($payment->getApprovalLink());\n \n // Redirect the customer to $approvalUrl\n } catch (PayPalConnectionException $ex) {\n echo $ex->getCode();\n echo $ex->getData();\n die($ex);\n } catch (Exception $ex) {\n die($ex);\n }\n }",
"public function createPayment()\n\t{\n\n\t}",
"public function postPayment(Request $request){\n\t\t\t$id=$request->id;\n\t\t\tSession::put('id_publication',$id);\n $Khipu = new Khipu();\n $Khipu->authenticate(127810,'3b516afae90937b2eeed43c8d31eeda8f22b7eff');\n $khipu_service = $Khipu->loadService('CreatePaymentPage');\n\n $data = array(\n 'subject' => 'Publicación Premium',\n 'body' => 'Aumenta la posibilidad de exito de tus ventas',\n 'amount' => 2000,\n // Página de exito\n 'return_url' => 'http://localhost:8000/exito',\n // Página de fracaso\n 'cancel_url' => 'http://localhost:8000/fracaso',\n 'transaction_id' => 1,\n // Dejar por defecto un correo para recibir el comprobante\n 'payer_email' => \\Auth::User()->email,\n // url de la imagen del producto o servicio\n 'picture_url' => 'https://static-pss-eu.gcdn.co/shop/media/items/c7/c7/c7c7ea349fe04222b617413c80c95ee4.png',\n // Opcional\n 'custom' => 'Custom Variable',\n // definimos una url en donde se notificará del pago\n 'notify_url' => '',\n );\n // Recorremos los datos y se lo asignamos al servicio.\n foreach ($data as $name => $value) {\n $khipu_service->setParameter($name, $value);\n }\n // Luego imprimimos el formulario html\n // echo $khipu_service->renderForm();\n\n $data = $khipu_service->renderForm();\n\n return response($data);\n }",
"function submit() {\n\n require_once(dirname(__FILE__) . \"/paycoingateway-php/paycoingateway.php\");\n\n $api_key = get_option(\"paycoingateway_wpe_api_key\");\n $api_secret = get_option(\"paycoingateway_wpe_api_secret\");\n $paycoingateway = PaycoinGateway::withApiKey($api_key, $api_secret);\n\n $callback_secret = get_option(\"paycoingateway_wpe_callbacksecret\");\n if($callback_secret == false) {\n $callback_secret = sha1(openssl_random_pseudo_bytes(20));\n update_option(\"paycoingateway_wpe_callbacksecret\", $callback_secret);\n }\n $callback_url = $this->cart_data['notification_url'];\n $callback_url = add_query_arg('gateway', 'wpsc_merchant_paycoingateway', $callback_url);\n $callback_url = add_query_arg('callback_secret', $callback_secret, $callback_url);\n\n $return_url = add_query_arg( 'sessionid', $this->cart_data['session_id'], $this->cart_data['transaction_results_url'] );\n $return_url = add_query_arg( 'wpsc_paycoingateway_return', true, $return_url );\n $cancel_url = add_query_arg( 'cancelled', true, $return_url );\n\n $params = array (\n 'name' => 'Your Order',\n 'price_string' => $this->cart_data['total_price'],\n 'price_currency_iso' => $this->cart_data['store_currency'],\n 'callback_url' => $callback_url,\n 'custom' => $this->cart_data['session_id'],\n 'success_url' => $return_url,\n 'cancel_url' => $cancel_url\n );\n\n try {\n $code = $paycoingateway->createButtonWithOptions($params)->button->code;\n } catch (Exception $e) {\n $msg = $e->getMessage();\n error_log (\"There was an error creating a PaycoinGateway checkout page: $msg. Make sure you've connected a merchant account in paycoingateway settings.\");\n exit();\n }\n\n wp_redirect(\"https://www.paycoingateway.com/checkouts/$code\");\n exit();\n\n }",
"function create_payment( $access_token, $c_transactions ) {\n\n global $host;\n\n $postdata = get_json_payment( $c_transactions );\n\n $url = $host.'/v1/payments/payment';\n $curl = curl_init($url);\n curl_setopt($curl, CURLOPT_POST, true); // TRUE to do a regular HTTP POST.\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); // FALSE to stop cURL from verifying the peer's certificate.\n curl_setopt($curl, CURLOPT_HEADER, false); // TRUE to include the header in the output.\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); // TRUE to return the transfer as a string of the return value of curl_exec() instead of outputting it out directly.\n curl_setopt($curl, CURLOPT_HTTPHEADER, array(\n 'Authorization: Bearer '.$access_token,\n 'Accept: application/json',\n 'Content-Type: application/json'\n )); // An array of HTTP header fields to set, in the format array('Content-type: text/plain', 'Content-length: 100')\n curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata);\n #curl_setopt($curl, CURLOPT_VERBOSE, TRUE);\n\n $response = curl_exec( $curl );\n\n if (empty($response)) {\n // Some kind of an error happened\n die(curl_error($curl));\n curl_close($curl);\n } else {\n\n $info = curl_getinfo($curl);\n curl_close($curl); // close cURL handler\n \n if($info['http_code'] != 200 && $info['http_code'] != 201 ) {\n echo \"Received error: \" . $info['http_code']. \"\\n\";\n echo \"Raw response:\".$response.\"\\n\";\n die();\n }\n\n }\n\n // Convert the result from JSON format to a PHP array\n $jsonResponse = json_decode($response, TRUE);\n return $jsonResponse;\n\n}",
"public function postPago()\n {\n $client_id = Mage::getStoreConfig(MercadoPago_Core_Helper_Data::XML_PATH_CLIENT_ID);\n $client_secret = Mage::getStoreConfig(MercadoPago_Core_Helper_Data::XML_PATH_CLIENT_SECRET);\n $mp = Mage::helper('mercadopago')->getApiInstance($client_id, $client_secret);\n\n //create preference\n $pref = $this->makePreference();\n Mage::helper('mercadopago')->log(\"make array\", self::LOG_FILE, $pref);\n\n //make payment request\n $response = $mp->create_preference($pref);\n Mage::helper('mercadopago')->log(\"create preference result\", self::LOG_FILE, $response);\n\n if ($response['status'] == 200 || $response['status'] == 201) {\n $payment = $response['response'];\n if (Mage::getStoreConfigFlag('payment/mercadopago_standard/sandbox_mode')) {\n $init_point = $payment['sandbox_init_point'];\n } else {\n $init_point = $payment['init_point'];\n }\n\n $arrayAssign = [\n \"init_point\" => $init_point,\n \"type_checkout\" => $this->getConfigData('type_checkout'),\n \"iframe_width\" => $this->getConfigData('iframe_width'),\n \"iframe_height\" => $this->getConfigData('iframe_height'),\n \"banner_checkout\" => $this->getConfigData('banner_checkout'),\n \"status\" => 201\n ];\n\n Mage::helper('mercadopago')->log(\"Array preference ok\", self::LOG_FILE);\n } else {\n $arrayAssign = [\n \"message\" => Mage::helper('mercadopago')->__('An error has occurred. Please refresh the page.'),\n \"json\" => json_encode($response),\n \"status\" => 400\n ];\n\n Mage::helper('mercadopago')->log(\"Array preference error\", self::LOG_FILE);\n }\n\n return $arrayAssign;\n }",
"public function processPayment();",
"public function payment(){\n\n\t}",
"public function makePayment($amountTobePaid)\n {\n\n $this->transactionId = uniqid();\n $encodedAuth = base64_encode($this->apiUser . \":\" . $this->apiPassword);\n $postRequest = array(\n \"total_amount\" => $amountTobePaid,\n \"return_url\" => $this->returnUrl,\n \"notify_url\" => $this->notifyUrl,\n \"transaction_id\" => $this->transactionId,\n \"description\"=> \"PayUnit web payments\"\n );\n $cURLConnection = curl_init();\n if($this->mode === \"test\"){\n curl_setopt($cURLConnection, CURLOPT_URL, \"https://app-payunit.sevengps.net/sandbox/gateway/initialize\");\n }else{\n curl_setopt($cURLConnection, CURLOPT_URL, \"https://app-payunit.sevengps.net/api/gateway/initialize\");\n }\n curl_setopt($cURLConnection, CURLOPT_POSTFIELDS, json_encode($postRequest)); \n $secArr = array(\n \"x-api-key: {$this->apiKey}\",\n \"authorization: Basic: {$encodedAuth}\",\n 'Accept: application/json',\n 'Content-Type: application/json',\n \"mode: {$this->mode}\"\n );\n $all = array_merge($postRequest,$secArr);\n curl_setopt($cURLConnection, CURLOPT_HTTPHEADER,$all);\n curl_setopt($cURLConnection, CURLOPT_RETURNTRANSFER, true);\n $apiResponse = curl_exec($cURLConnection);\n curl_close($cURLConnection);\n $jsonArrayResponse = json_decode($apiResponse);\n echo(isset($jsonArrayResponse));\n if(isset($jsonArrayResponse->body->transaction_url)){\n echo(\"dfdgdg\");\n //die();\n header(\"Location: {$jsonArrayResponse->body->transaction_url}\");\n exit(); \n }\n else{\n echo($apiResponse);\n }\n }",
"function post_to_bank_api()\n\t{\n\t\tlog_message('debug', 'Account/post_to_bank_api');\n\t\t$data = filter_forwarded_data($this);\n\t\tlog_message('debug', 'Account/post_to_bank_api:: [1] !empty($data[\\'a\\'])='.!empty($data['a']));\n\t\t# Processing bank form POST\n\t\t# ------------------------------------------------------\n\t\t# a) API required extra information after login\n\t\tif(!empty($data['a']) && ($data['a'] == 'display_question' || $data['a'] == 'display_code'))\n\t\t{\n\t\t\t$credentials['mfa'] = $_POST['questionanswer'];\n\t\t\t$postData = array('bank_id'=>$this->native_session->get('login_institution_id'), 'email_address'=>$this->native_session->get('__email_address'));\n\t\t}\n\t\t# b) API requested to choose a delivery option for a code after login\n\t\telse if(!empty($data['a']) && $data['a'] == 'display_options')\n\t\t{\n\t\t\t$credentials['mfa'] = $_POST['questionanswer'];\n\t\t\t$credentials['send_method'] = $_POST['questionanswer'];\n\t\t\t$postData = array('bank_id'=>$this->native_session->get('login_institution_id'), 'email_address'=>$this->native_session->get('__email_address'));\n\n\t\t}\n\t\t# c) API returned an error after login or first time logging in\n\t\telse\n\t\t{\n\t\t\t$credentials['user_name'] = $_POST['username'];\n\t\t\t$credentials['password'] = $_POST['bankpassword'];\n\t\t\tif(!empty($_POST['bankpin'])) $credentials['bank_pin'] = $_POST['bankpin'];\n\t\t\t$postData = array('bank_id'=>$this->native_session->get('login_institution_id'), 'email_address'=>$this->native_session->get('__email_address'));\n\t\t}\n\n\t\t# Connect to bank with details\n\t\t$data['response'] = $this->_api->post('money/connect_to_bank', array('credentials'=>$credentials, 'postData'=>$postData ));\n\n\t\t# Was there a successful connection? Then get the user's current banks\n\t\tif(!empty($data['response']['accounts']))\n\t\t{\n\t\t\t$data['currentBanks'] = $this->_api->get('money/current_user_banks');\n\t\t}\n\n\t\t# Determine which area to show based on response\n\t\tif(!empty($data['a'])) unset($data['a']);\n\t\t$this->native_session->set('__data', $data);\n\t\techo base_url().'account/load_bank_form/a/'.$this->which_bank_view($data['response']);\n\t}",
"function PPHttpPost($methodName_, $nvpStr_) {\n\tglobal $environment;\n\n\t$API_UserName = urlencode('tuhins_1351114574_biz_api1.gmail.com');\n\t$API_Password = urlencode('1351114606');\n\t$API_Signature = urlencode('AdfcyT4sNBLU3ISgRRnYiJXaGd4hAjDiSEgVQesi8ykS-6Sp5pC4c5bM');\n\t$API_Endpoint = \"https://api-3t.paypal.com/nvp\";\n\tif(\"sandbox\" === $environment || \"beta-sandbox\" === $environment) {\n\t\t$API_Endpoint = \"https://api-3t.$environment.paypal.com/nvp\";\n\t}\n\t$version = urlencode('58.0');\n\n\t// setting the curl parameters.\n\t$ch = curl_init();\n\tcurl_setopt($ch, CURLOPT_URL, $API_Endpoint);\n\tcurl_setopt($ch, CURLOPT_VERBOSE, 1);\n\n\t// turning off the server and peer verification(TrustManager Concept).\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);\n\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\tcurl_setopt($ch, CURLOPT_POST, 1);\n\n\t// NVPRequest for submitting to server\n\t$nvpreq = \"METHOD=$methodName_&VERSION=$version&PWD=$API_Password&USER=$API_UserName&SIGNATURE=$API_Signature$nvpStr_\";\n\t\n\n\t// setting the nvpreq as POST FIELD to curl\n\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $nvpreq);\n\n\t// getting response from server\n\t$httpResponse = curl_exec($ch);\n\n\tif(!$httpResponse) {\n\t\texit(\"$methodName_ failed: \".curl_error($ch).'('.curl_errno($ch).')');\n\t}\n\n\t// Extract the RefundTransaction response details\n\t$httpResponseAr = explode(\"&\", $httpResponse);\n\n\t$httpParsedResponseAr = array();\n\tforeach ($httpResponseAr as $i => $value) {\n\t\t$tmpAr = explode(\"=\", $value);\n\t\tif(sizeof($tmpAr) > 1) {\n\t\t\t$httpParsedResponseAr[$tmpAr[0]] = $tmpAr[1];\n\t\t}\n\t}\n\n\tif((0 == sizeof($httpParsedResponseAr)) || !array_key_exists('ACK', $httpParsedResponseAr)) {\n\t\texit(\"Invalid HTTP Response for POST request($nvpreq) to $API_Endpoint.\");\n\t}\n\n\treturn $httpParsedResponseAr;\n}",
"function PPHttpPost($methodName_, $nvpStr_) \n\t{\n\t\tglobal $environment;\n\t\t$API_UserName = urlencode('fhefoto_api1.yahoo.no');\n\t\t$API_Password = urlencode('N6SEDXLJKPN6PPWY');\n\t\t$API_Signature = urlencode('AlVtORxlymlrQpGY-fnzOdIuxvT1A2nTmy.LlXvPkOP5oU0VdZitgeEV');\n\t\n\t\t$API_Endpoint = \"https://api-3t.paypal.com/nvp\";\n\t\tif(\"sandbox\" === $environment || \"beta-sandbox\" === $environment) {\n\t\t\t$API_Endpoint = \"https://api-3t.$environment.paypal.com/nvp\";\n\t\t}\n\t\t$version = urlencode('51.0');\n\n\t\t$nvpreq = \"METHOD=$methodName_&VERSION=$version&PWD=$API_Password&USER=$API_UserName&SIGNATURE=$API_Signature$nvpStr_\";\n\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, $API_Endpoint);\n\t\tcurl_setopt($ch, CURLOPT_VERBOSE, 1);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($ch, CURLOPT_POST, 1);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $nvpreq);\n\t\t$httpResponse = curl_exec($ch);\n\n\t\tif(!$httpResponse) {\n\t\t\texit(\"$methodName_ failed: \".curl_error($ch).'('.curl_errno($ch).')');\n\t\t}\n\n\t\t$httpResponseAr = explode(\"&\", $httpResponse);\n\n\t\t$httpParsedResponseAr = array();\n\t\tforeach ($httpResponseAr as $i => $value) {\n\t\t\t$tmpAr = explode(\"=\", $value);\n\t\t\tif(sizeof($tmpAr) > 1) {\n\t\t\t\t$httpParsedResponseAr[$tmpAr[0]] = $tmpAr[1];\n\t\t\t}\n\t\t}\n\n\t\tif((0 == sizeof($httpParsedResponseAr)) || !array_key_exists('ACK', $httpParsedResponseAr)) {\n\t\t\texit(\"Invalid HTTP Response for POST request($nvpreq) to $API_Endpoint.\");\n\t\t}\n\n\t\treturn $httpParsedResponseAr;\n\t}",
"public function callbackhostedpaymentAction()\n {\n $boError = false;\n $formVariables = array();\n $model = Mage::getModel('paymentsensegateway/direct');\n $szOrderID = $this->getRequest()->getPost('OrderID');\n $checkout = Mage::getSingleton('checkout/type_onepage');\n $session = Mage::getSingleton('checkout/session');\n $szPaymentProcessorResponse = '';\n $order = Mage::getModel('sales/order');\n $order->load(Mage::getSingleton('checkout/session')->getLastOrderId());\n $nVersion = Mage::getModel('paymentsensegateway/direct')->getVersion();\n $boCartIsEmpty = false;\n \n try\n {\n $hmHashMethod = $model->getConfigData('hashmethod');\n $szPassword = $model->getConfigData('password');\n $szPreSharedKey = $model->getConfigData('presharedkey');\n \n $formVariables['HashDigest'] = $this->getRequest()->getPost('HashDigest');\n $formVariables['MerchantID'] = $this->getRequest()->getPost('MerchantID');\n $formVariables['StatusCode'] = $this->getRequest()->getPost('StatusCode');\n $formVariables['Message'] = $this->getRequest()->getPost('Message');\n $formVariables['PreviousStatusCode'] = $this->getRequest()->getPost('PreviousStatusCode');\n $formVariables['PreviousMessage'] = $this->getRequest()->getPost('PreviousMessage');\n $formVariables['CrossReference'] = $this->getRequest()->getPost('CrossReference');\n $formVariables['Amount'] = $this->getRequest()->getPost('Amount');\n $formVariables['CurrencyCode'] = $this->getRequest()->getPost('CurrencyCode');\n $formVariables['OrderID'] = $this->getRequest()->getPost('OrderID');\n $formVariables['TransactionType'] = $this->getRequest()->getPost('TransactionType');\n $formVariables['TransactionDateTime'] = $this->getRequest()->getPost('TransactionDateTime');\n $formVariables['OrderDescription'] = $this->getRequest()->getPost('OrderDescription');\n $formVariables['CustomerName'] = $this->getRequest()->getPost('CustomerName');\n $formVariables['Address1'] = $this->getRequest()->getPost('Address1');\n $formVariables['Address2'] = $this->getRequest()->getPost('Address2');\n $formVariables['Address3'] = $this->getRequest()->getPost('Address3');\n $formVariables['Address4'] = $this->getRequest()->getPost('Address4');\n $formVariables['City'] = $this->getRequest()->getPost('City');\n $formVariables['State'] = $this->getRequest()->getPost('State');\n $formVariables['PostCode'] = $this->getRequest()->getPost('PostCode');\n $formVariables['CountryCode'] = $this->getRequest()->getPost('CountryCode');\n \n if(!PYS_PaymentFormHelper::compareHostedPaymentFormHashDigest($formVariables, $szPassword, $hmHashMethod, $szPreSharedKey))\n {\n $boError = true;\n $szNotificationMessage = \"The payment was rejected for a SECURITY reason: the incoming payment data was tampered with.\";\n Mage::log(\"The Hosted Payment Form transaction couldn't be completed for the following reason: [\".$szNotificationMessage. \"]. Form variables: \".print_r($formVariables, 1));\n }\n else\n {\n $paymentsenseOrderId = Mage::getSingleton('checkout/session')->getPaymentsensegatewayOrderId();\n $szOrderStatus = $order->getStatus();\n $szStatusCode = $this->getRequest()->getPost('StatusCode');\n $szMessage = $this->getRequest()->getPost('Message');\n $szPreviousStatusCode = $this->getRequest()->getPost('PreviousStatusCode');\n $szPreviousMessage = $this->getRequest()->getPost('PreviousMessage');\n $szOrderID = $this->getRequest()->getPost('OrderID');\n \n if($szOrderStatus != 'pys_paid' &&\n $szOrderStatus != 'pys_preauth')\n {\n $checkout->saveOrderAfterRedirectedPaymentAction(true,\n $this->getRequest()->getPost('StatusCode'),\n $this->getRequest()->getPost('Message'),\n $this->getRequest()->getPost('PreviousStatusCode'),\n $this->getRequest()->getPost('PreviousMessage'),\n $this->getRequest()->getPost('OrderID'),\n $this->getRequest()->getPost('CrossReference'));\n }\n else \n {\n // cart is empty\n $boCartIsEmpty = true;\n $szPaymentProcessorResponse = null;\n \n // chek the StatusCode as the customer might have just clicked the BACK button and re-submitted the card details\n // which can cause a charge back to the merchant\n $this->_fixBackButtonBug($szOrderID, $szStatusCode, $szMessage, $szPreviousStatusCode, $szPreviousMessage);\n }\n }\n }\n catch (Exception $exc)\n {\n $boError = true;\n $szNotificationMessage = Paymentsense_Paymentsensegateway_Model_Common_GlobalErrors::ERROR_183;\n Mage::logException($exc);\n }\n \n $szPaymentProcessorResponse = $session->getPaymentprocessorresponse();\n if($boError)\n {\n if($szPaymentProcessorResponse != null &&\n $szPaymentProcessorResponse != '')\n {\n $szNotificationMessage = $szNotificationMessage.'<br/>'.$szPaymentProcessorResponse;\n }\n \n $model->setPaymentAdditionalInformation($order->getPayment(), $this->getRequest()->getPost('CrossReference'));\n //$order->getPayment()->setTransactionId($this->getRequest()->getPost('CrossReference'));\n \n if($nVersion >= 1410)\n {\n if($order)\n {\n $orderState = 'pending_payment';\n $orderStatus = 'pys_failed_hosted_payment';\n $order->setCustomerNote(Mage::helper('paymentsensegateway')->__('Hosted Payment Failed'));\n $order->setState($orderState, $orderStatus, $szPaymentProcessorResponse, false);\n $order->save();\n }\n }\n if($nVersion == 1324 || $nVersion == 1330)\n {\n Mage::getSingleton('checkout/session')->addError($szNotificationMessage);\n }\n else \n {\n Mage::getSingleton('core/session')->addError($szNotificationMessage);\n }\n $order->save();\n \n $this->_clearSessionVariables();\n $this->_redirect('checkout/onepage/failure');\n }\n else\n {\n // set the quote as inactive after back from paypal\n Mage::getSingleton('checkout/session')->getQuote()->setIsActive(false)->save();\n\n if($boCartIsEmpty == false)\n {\n // send confirmation email to customer\n if($order->getId())\n {\n $order->sendNewOrderEmail();\n }\n \n if($nVersion >= 1410)\n {\n // TODO : no need to remove stock item as the system will do it in 1.6 version\n if($nVersion < 1600)\n {\n $model->subtractOrderedItemsFromStock($order);\n }\n $this->_updateInvoices($order, $szPaymentProcessorResponse);\n }\n \n if($nVersion != 1324 && $nVersion != 1330)\n {\n if($szPaymentProcessorResponse != '')\n {\n Mage::getSingleton('core/session')->addSuccess($szPaymentProcessorResponse);\n }\n }\n }\n \n $this->_redirect('checkout/onepage/success', array('_secure' => true));\n }\n }",
"public function submitPayment()\n {\n return array('error'=>0, 'transactionReference'=>'');\n \n }",
"abstract protected function handlePayment();",
"function PPHttpPost($methodName_, $nvpStr_) {\n\tglobal $environment;\n\n\tglobal $API_UserName, $API_Password, $API_Signature;\n\n\t// Set up your API credentials, PayPal end point, and API version.\n\n\t$API_Endpoint = \"https://api-3t.paypal.com/nvp\";\n\tif(\"sandbox\" === $environment || \"beta-sandbox\" === $environment) {\n\t\t//$API_Endpoint = \"https://api-3t.$environment.paypal.com/nvp\";\n\t\t$API_Endpoint = \"https://api-3t.sandbox.paypal.com/nvp\";\n\t}\n\t$version = urlencode('57.0');\n\n\t// Set the curl parameters.\n\t$ch = curl_init();\n\tcurl_setopt($ch, CURLOPT_URL, $API_Endpoint);\n\tcurl_setopt($ch, CURLOPT_VERBOSE, 1);\n\n\t// Turn off the server and peer verification (TrustManager Concept).\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);\n\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\tcurl_setopt($ch, CURLOPT_POST, 1);\n\n\t// Set the API operation, version, and API signature in the request.\n\t$nvpreq = \"METHOD=$methodName_&VERSION=$version&PWD=$API_Password&USER=$API_UserName&SIGNATURE=$API_Signature$nvpStr_\";\n\n\t// Set the request as a POST FIELD for curl.\n\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $nvpreq);\n\n\t// Get response from the server.\n\t$httpResponse = curl_exec($ch);\n\n\tif(!$httpResponse) {\n\t\texit(\"$methodName_ failed: \".curl_error($ch).'('.curl_errno($ch).')');\n\t}\n\n\t// Extract the response details.\n\t$httpResponseAr = explode(\"&\", $httpResponse);\n\n\t$httpParsedResponseAr = array();\n\tforeach ($httpResponseAr as $i => $value) {\n\t\t$tmpAr = explode(\"=\", $value);\n\t\tif(sizeof($tmpAr) > 1) {\n\t\t\t$httpParsedResponseAr[$tmpAr[0]] = $tmpAr[1];\n\t\t}\n\t}\n\n\tif((0 == sizeof($httpParsedResponseAr)) || !array_key_exists('ACK', $httpParsedResponseAr)) {\n\t\texit(\"Invalid HTTP Response for POST request($nvpreq) to $API_Endpoint.\");\n\t}\n\n\treturn $httpParsedResponseAr;\n}",
"public function createPayment() {\n $api = new ApiPayment($this->_clientId, $this->_clientSecret, $this->_isTest);\n return $api;\n }",
"public function create()\n {\n try{\n $mollie = new MollieApiClient();\n $mollie->setApiKey(\"test_WD2sWvUWWRqBKfUTy5VS5t8f623ad3\");\n $payment = $mollie->payments->create([\n \"amount\" => [\n \"currency\" => \"EUR\",\n \"value\" => \"10.00\"\n ],\n \"description\" => \"My first API payment\",\n \"redirectUrl\" => \"http://google.com\",\n ]);\n return $payment->getCheckoutUrl();\n// header(\"Location: \" . $payment->getCheckoutUrl(), true, 303);\n } catch (\\Exception $e) {\n return response()->json($e->getMessage(), 400);\n }\n\n }",
"public function createPaypalPayment(){\n try {\n $client = new Client();\n $paymentResponse = $client->request('POST', $this->paypalPaymentUrl, [\n 'headers' => [\n 'Content-Type' => 'application/json',\n 'Authorization' => 'Bearer ' . $this->accessKey,\n ],\n 'body' => $this->salesData->salesData()\n ]);\n $this->parsePaymentBody($paymentResponse);\n \n } catch (\\Exception $ex) {\n $error = $ex->getMessage();\n return $error;\n }\n return $this->paymentBody->id;\n\n }",
"public function handlePayment ()\n {\n /**\n * Die $baseUrl können wir weit nach oben ziehen, weil wir sie weiter unten an mehreren Stellen verwenden und\n * sie nicht unten jedes Mal definieren möchten, sondern einmal und dann wiederverwenden.\n */\n $baseUrl = Config::get('app.baseUrl');\n\n /**\n * Wir verzichten der Übersichtlichkeit halber auf eine Validierung. Eigentlich müsste hier eine Daten-\n * validierung durchgeführt werden und etwaige Fehler an den User zurückgespielt werden. Im Login machen wir das\n * beispielsweise und auch bei der Bearbeitung eines Produkts. Der nachfolgende Code dürfte gar nicht mehr\n * ausgeführt werden, wenn Validierungsfehler aufgetreten sind.\n */\n\n /**\n * Eingeloggten User abfragen\n */\n $user = User::getLoggedInUser();\n\n /**\n * Wurde das linke Formular abgeschickt und ein Wert ausgewählt?\n */\n if (isset($_POST['payment']) && $_POST['payment'] !== '_default') {\n /**\n * Ausgefüllte PaymentId in die Session speichern, damit wir sie in einem weiteren Checkout-Schritt wieder\n * verwenden können.\n */\n Session::set(self::PAYMENT_KEY, (int)$_POST['payment']);\n }\n\n /**\n * Wurde das rechte Formular abgeschickt und ein Wert in das Name-Feld eingegeben?\n */\n if (isset($_POST['name']) && !empty($_POST['name'])) {\n /**\n * Neue Payment Methode erstellen und in die Datenbank speichern.\n */\n $payment = new Payment();\n $payment->name = $_POST['name'];\n $payment->number = $_POST['number'];\n $payment->expires = $_POST['expires'];\n $payment->ccv = $_POST['ccv'];\n $payment->user_id = $user->id;\n $payment->save();\n\n /**\n * ID der neu erstellten Zahlungsmethode in die Session speichern, damit wir sie in einem weiteren Checkout-\n * Schritt wieder verwenden können.\n */\n Session::set(self::PAYMENT_KEY, (int)$payment->id);\n }\n\n /**\n * Oben sind folgende Fälle abgedeckt:\n * + Ein existierendes Payment wurde aus dem Dropdown gewählt\n * + Ein neues Payment wurde in das Formular eingegeben\n * Was noch nicht abgedeckt ist, wenn weder ein Payment ausgewählt wurde noch ein neues Payment angelegt wurde.\n *\n * Hier prüfen wir also, ob KEIN payment geschickt wurde oder der Standard Wert aus dem Formular übergeben wurde\n * UND ob das Namens feld NICHT oder LEER übergeben wurde. Das ist eine relativ komplexe Bedingung, daher habe\n * ich sie zur besseren Übersicht in mehrere Zeilen aufgeteilt.\n */\n if (\n (\n !isset($_POST['payment']) ||\n $_POST['payment'] === '_default'\n )\n &&\n (\n !isset($_POST['name']) ||\n empty($_POST['name'])\n )\n ) {\n /**\n * Wurde weder ein Payment ausgewählt noch ein neues eingegeben, so schreiben wir einen Error und leiten zu\n * dem Formular zurück, von dem wir gekommen sind.\n */\n Session::set('errors', [\n 'Payment auswählen ODER ein neues anlegen.'\n ]);\n\n header(\"Location: {$baseUrl}checkout\");\n exit;\n }\n\n /**\n * Weiterleiten auf den nächsten Schritt im Checkout Prozess.\n */\n header(\"Location: {$baseUrl}checkout/address\");\n exit;\n }",
"function submitOrder() {\n\techo \"Submitting Order </br>\";\n\t$data = createOrder();\n\t$response = postRequest('/api/order', $data);\n\tprintInfo($response);\n}",
"function MyFatoorah($api, $userData)\n{\n // dd($userData);\n $token = $api;\n $basURL = \"https://apitest.myfatoorah.com\";\n $curl = curl_init();\n curl_setopt_array($curl, array(\n CURLOPT_URL => \"$basURL/v2/ExecutePayment\",\n CURLOPT_CUSTOMREQUEST => \"POST\",\n CURLOPT_POSTFIELDS => $userData,\n CURLOPT_HTTPHEADER => array(\"Authorization: Bearer $token\", \"Content-Type: application/json\"),\n ));\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n $err = curl_error($curl);\n curl_close($curl);\n if ($err) {\n return $err;\n } else {\n return $response;\n }\n}",
"public function postCashPayment(Request $request) {\n if($request->has('api_request')&&$request->input('api_request')==true){\n $api_request = true;\n } else {\n $api_request = false;\n }\n $validator = \\Validator::make($request->all(), \\Solunes\\Payments\\App\\CashPayment::$rules_send);\n $sale_payment_id = $request->input('sale_payment_id');\n $sale_payment = \\Solunes\\Sales\\App\\SalePayment::find($sale_payment_id);\n if(!$validator->passes()){\n return redirect($this->prev)->with('message_error', 'Debe llenar todos los campos obligatorios.')->withErrors($validator)->withInput();\n } else if(round($sale_payment->amount)>round(intval($request->input('amount')))) {\n return redirect($this->prev)->with('message_error', 'El monto introducido debe ser mayor a la compra.')->withErrors($validator)->withInput();\n } else {\n $sale = \\Solunes\\Sales\\App\\Sale::findId($sale_payment->parent_id)->checkOwner()->first();\n if($sale&&$sale_payment->status=='holding'){\n $cancel_url = url('');\n $transaction = \\CashPayment::generateSalePayment($sale_payment->payment, $cancel_url);\n if($sale_payment->cash_payment){\n $cash_payment = $sale_payment->cash_payment;\n } else {\n $cash_payment = new \\Solunes\\Payments\\App\\CashPayment;\n $cash_payment->sale_payment_id = $sale_payment->id;\n }\n $cash_payment->transaction_id = $transaction->id;\n $cash_payment->amount = $request->input('amount');\n $cash_payment->save();\n $sale_payment->status = 'to-pay';\n $sale_payment->save();\n $sale->status = 'pending-delivery';\n $sale->save();\n $payment = $sale_payment->payment;\n $payment->status = 'to-pay';\n $payment->save();\n \\Sales::customerSuccessfulPayment($sale, $sale->customer);\n if(config('customer.custom_successful_payment')){\n \\CustomFunc::customer_successful_payment($payment);\n }\n if($api_request){\n return ['success'=>true,'message'=>'Su pedido fue procesado correctamente y será enviado en la fecha y hora solicitada.'];\n }\n return redirect($this->prev)->with('message_success', 'Muchas gracias, marcamos la orden como procesada y procederemos a realizar el cobro en el momento del envío.');\n } else {\n if($api_request){\n return ['success'=>false,'message'=>'Hubo un error al encontrar su pago.'];\n }\n return redirect($this->prev)->with('message_error', 'Hubo un error al encontrar su pago.');\n }\n }\n }",
"public function pay(): JsonResponse;",
"public function processApiInvoice($invoice)\n {\n if($this->_logging){\n Mage::log('In processApiInvoice (Postpayment)', null, $this->_logfile);\n }\n $order = $invoice->getOrder();\n // Request model, data model, product line model, total line model\n $v2RqstMdl = new Tritacv2_Model_InvoiceRequestV2Model();\n $v2DataMdl = new Tritacv2_Model_InvoicePdfDataModel();\n $v2ProdMdlArray = $this->getProductLines($order);\n $v2TtlMdlArray = $this->getOrderTotals($order);\n $shopName = Mage::app()->getStore()->getFrontendName();\n $v2DataMdl->setShopName($shopName);\n $v2DataMdl->setDescription('');\n $v2DataMdl->setProductLines($v2ProdMdlArray);\n $v2DataMdl->setTotalLines($v2TtlMdlArray);\n // finally fill request model:\n $v2RqstMdl->setTransactionNumber($invoice->getTransactionId());\n $v2RqstMdl->setInvoiceNumber($invoice->getIncrementId());\n $objDateTime = new DateTime('NOW');\n $v2RqstMdl->setInvoiceDate($objDateTime);\n $v2RqstMdl->setInvoiceAmount(Mage::helper('capayable')->convertToCents($invoice->getGrandTotal()));\n $v2RqstMdl->setInvoiceDescription(Mage::helper('capayable')->__('Order').' '.$order->getIncrementId());\n $v2RqstMdl->setInvoicePdfSubmitType('INCLUDED_DATA');\n $v2RqstMdl->setCultureCode('nl-NL');\n $v2RqstMdl->setInvoicePdfData($v2DataMdl);\n try {\n $publicKey = Mage::getStoreConfig('payment/capayable/public_key');\n $apiConfig = new Tritacv2_Configuration();\n $apiConfig->setApiKey('apikey', $publicKey); // test key 'f2d2a2aee085bfcde02d3b50e30a7394efcd49e5'\n //$apiConfig->setHost('https://capayable-api-acc.tritac.com');\n if($this->_logging) {\n Mage::log('In processApiInvoice (Postpayment) dit is url ' . $this->_url, null, $this->_logfile);\n }\n $apiConfig->setHost($this->_url);\n $apiClient = new Tritacv2_ApiClient($apiConfig);\n $invoiceApi = new Tritacv2_Api_InvoiceApi($apiClient);\n $result = $invoiceApi->invoiceV2Post($v2RqstMdl);\n if($this->_logging) {\n Mage::log('In checkCredit (Postpayment) result : ', null, $this->_logfile);\n Mage::log($result, null, $this->_logfile);\n }\n if($result->getIsAccepted() == true || $result->getIsAccepted() == 1) {\n return true;\n } else {\n return false;\n }\n } catch (Exception $e) {\n Mage::log('Exception when calling creditCheckApi->creditCheckV2Post: '. $e->getMessage(), null, $this->_logfile);\n }\n\n //return $response['IsAccepted'];\n }",
"public function stripePost()\n {\n require_once('application/libraries/stripe-php/init.php');\n \n \\Stripe\\Stripe::setApiKey($this->config->item('stripe_secret'));\n \n \\Stripe\\Charge::create ([\n \"amount\" => 100 * 100,\n \"currency\" => \"usd\",\n \"source\" => $this->input->post('stripeToken'),\n \"description\" => \"Test payment from itsolutionstuff.com.\" \n ]);\n \n $this->session->set_flashdata('success', 'Payment made successfully.');\n \n redirect('/my-stripe', 'refresh');\n }",
"public function execute(){\n $paymentId = $_GET['paymentId'];\n $payment = Payment::get($paymentId, $this->_apiContext);\n $payerId = $_GET['PayerID'];\n\n // Execute payment with payer ID\n $execution = new PaymentExecution();\n $execution->setPayerId($payerId);\n \n $transaction = new Transaction();\n $amount = new Amount();\n\n $details = new Details();\n $details->setShipping(0)\n ->setTax(0)\n ->setSubtotal(Cart::subtotal());\n\n $amount->setCurrency('BRL');\n $amount->setTotal(Cart::total());\n $amount->setDetails($details);\n\n $transaction->setAmount($amount);\n\n $execution->addTransaction($transaction);\n\n try{\n // Execute payment\n $result = $payment->execute($execution, $this->_apiContext);\n \n try{\n\n $payment = Payment::get($paymentId, $this->_apiContext);\n }catch(Exception $ex){\n\n die($ex);\n }\n }catch(PayPalConnectionException $ex){\n\n echo $ex->getCode();\n echo $ex->getData();\n die($ex);\n }catch(Exception $ex){\n\n die($ex);\n }\n\n Session::flash('status', 'Pagamento realizado');\n Session::put('token-paypal', $_GET['token']);\n return redirect('/paypal/transaction/complete');\n }",
"function PPHttpPost($methodName_, $nvpStr_) {\n\t\t\tglobal $gateway_environment;\n\t\t\t$environment = $gateway_environment;\n\n\t\t\t$API_UserName = pmpro_getOption(\"apiusername\");\n\t\t\t$API_Password = pmpro_getOption(\"apipassword\");\n\t\t\t$API_Signature = pmpro_getOption(\"apisignature\");\n\t\t\t$API_Endpoint = \"https://api-3t.paypal.com/nvp\";\n\t\t\tif(\"sandbox\" === $environment || \"beta-sandbox\" === $environment) {\n\t\t\t\t$API_Endpoint = \"https://api-3t.$environment.paypal.com/nvp\";\n\t\t\t}\n\n\t\t\t$version = urlencode('72.0');\n\n\t\t\t//NVPRequest for submitting to server\n\t\t\t$nvpreq = \"METHOD=\" . urlencode($methodName_) . \"&VERSION=\" . urlencode($version) . \"&PWD=\" . urlencode($API_Password) . \"&USER=\" . urlencode($API_UserName) . \"&SIGNATURE=\" . urlencode($API_Signature) . \"&BUTTONSOURCE=\" . urlencode(PAYPAL_BN_CODE) . $nvpStr_;\n\n\t\t\t//post to PayPal\n\t\t\t$response = wp_remote_post( $API_Endpoint, array(\n\t\t\t\t\t'timeout' => 60,\n\t\t\t\t\t'sslverify' => FALSE,\n\t\t\t\t\t'httpversion' => '1.1',\n\t\t\t\t\t'body' => $nvpreq\n\t\t\t )\n\t\t\t);\n\n\t\t\tif ( is_wp_error( $response ) ) {\n\t\t\t $error_message = $response->get_error_message();\n\t\t\t die( \"methodName_ failed: $error_message\" );\n\t\t\t} else {\n\t\t\t\t//extract the response details\n\t\t\t\t$httpParsedResponseAr = array();\n\t\t\t\tparse_str(wp_remote_retrieve_body($response), $httpParsedResponseAr);\n\n\t\t\t\t//check for valid response\n\t\t\t\tif((0 == sizeof($httpParsedResponseAr)) || !array_key_exists('ACK', $httpParsedResponseAr)) {\n\t\t\t\t\texit(\"Invalid HTTP Response for POST request($nvpreq) to $API_Endpoint.\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $httpParsedResponseAr;\n\t\t}",
"public function create_coin_post() {\n header(\"Content-Type: application/json; charset=UTF-8\");\n echo CryptoDB::newCoinPOST(); \n }",
"public function paymentAction() {\n\n $br = new bookingRecord();\n\n // check the session is still around\n if ($br->expired()) {\n $this->redirect($this->url('booking/expired'));\n }\n\n // resave session just to bump its time\n $br->save();\n\n // Get the purchase record\n $purchase = $this->bm->getPurchase($br);\n\n // work out final fare\n $fares = \\ORM::forTable('fares')->findOne(1);\n\n // Line up Sagepay class\n $sagepay = new sagepayserverlib();\n $sagepay->setController($this);\n $sagepay->setPurchase($purchase);\n $sagepay->setFare($this->bm->calculateFares($br));\n\n // anything submitted?\n if ($data = $this->getRequest()) {\n\n // Anything other than 'next' jumps back\n if (empty($data['next'])) {\n $this->redirect($this->Url('booking/contact'));\n }\n\n // If we get here we can process SagePay stuff\n // Register payment with Sagepay\n $sr = $sagepay->register();\n\n // If false is returned then it went wrong\n if ($sr === false) {\n $this->View('booking_fail', array(\n 'status' => 'N/A',\n 'diagnostic' => $sagepay->getError(),\n ));\n }\n\n // check status of registration from SagePay\n $status = $sr['Status'];\n if (($status != 'OK') && ($status != 'OK REPEATED')) {\n $this->View('booking_fail', array(\n 'status' => $status,\n 'diagnostic' => $sr['StatusDetail'],\n ));\n }\n\n // update purchase\n $purchase->securitykey = $sr['SecurityKey'];\n $purchase->regstatus = $status;\n $purchase->VPSTxId = $sr['VPSTxId'];\n $purchase->save();\n\n // redirect to Sage\n $url = $sr['NextURL'];\n header(\"Location: $url\");\n die;\n }\n }",
"public function createPaymentUsingSavedCard($ccppid, $cout) {\n // This sample code demonstrates how you can process a \n // Payment using a previously stored credit card token.\n // API used: /v1/payments/payment\n /** @var CreditCard $card */\n //$card = require __DIR__ . '/../vault/CreateCreditCard.php';\n\n // ### Credit card token\n // Saved credit card id from a previous call to\n // CreateCreditCard.php\n $creditCardToken = new CreditCardToken();\n //$creditCardToken->setCreditCardId($card->getId());\n $creditCardToken->setCreditCardId($ccppid);\n\n // ### FundingInstrument\n // A resource representing a Payer's funding instrument.\n // For stored credit card payments, set the CreditCardToken\n // field on this object.\n $fi = new FundingInstrument();\n $fi->setCreditCardToken($creditCardToken);\n // ### Payer\n // A resource representing a Payer that funds a payment\n // For stored credit card payments, set payment method\n // to 'credit_card'.\n $payer = new Payer();\n $payer->setPaymentMethod(\"credit_card\")\n ->setFundingInstruments(array($fi));\n // ### Amount\n // Lets you specify a payment amount.\n // You can also specify additional details\n // such as shipping, tax.\n $amount = new Amount();\n $amount->setCurrency(\"EUR\");\n $amount->setTotal($cout);\n // ### Transaction\n // A transaction defines the contract of a\n // payment - what is the payment for and who\n // is fulfilling it. \n $transaction = new Transaction();\n $transaction->setAmount($amount);\n $transaction->setDescription(\"This is the payment description.\");\n // ### Payment\n // A Payment Resource; create one using\n // the above types and intent set to 'sale'\n $payment = new Payment();\n $payment->setIntent(\"sale\")\n ->setPayer($payer)\n ->setTransactions(array($transaction));\n \n // ###Create Payment\n // Create a payment by calling the 'create' method\n // passing it a valid apiContext.\n // (See bootstrap.php for more on `ApiContext`)\n // The return object contains the state.\n try {\n $resultat = $payment->create($this->apiContext);\n } catch (\\Paypal\\Exception\\PPConnectionException $pce) {\n print_r( json_decode($pce->getData()) );\n }\n $statut = $resultat->getState();\n\n return $statut;\n }",
"public function _postPayment( $data )\n {\n // Process the payment\n $vars = new JObject();\n\n $app =JFactory::getApplication();\n $paction = JRequest::getVar( 'paction' );\n\n switch ($paction)\n {\n case \"display_message\":\n $session = JFactory::getSession();\n $session->set('j2store_cart', array());\n $vars->message = JText::_($this->params->get('onafterpayment', ''));\n $html = $this->_getLayout('message', $vars);\n $html .= $this->_displayArticle();\n\n break;\n case \"success_payment\":\n \n // Check User loged in\n $user = JFactory::getUser();\n if($user->id > 0){\n $jinput = JFactory::getApplication()->input;\n include(\"lib/nusoap.php\");\n $url = $this->_getPaysbuyUrl(true);\n $client = new nusoap_client($url, true);\n\n // Get this post from Paysbuy\n $inv = $jinput->post->get('apCode', 0);\n $params = array(\n \"psbID\"=>$this->params->get('psbid',''),\n \"biz\"=>$this->params->get('username',''),\n \"secureCode\"=>$this->params->get('secureCode',''),\n \"invoice\"=>$inv,\n \"flag\"=>\"\"\n );\n\n $result = $client->call(\n 'getTransactionByInvoiceCheckPost',\n array('parameters' => $params),\n 'http://tempuri.org/',\n 'http://tempuri.org/getTransactionByInvoiceCheckPost',\n false,\n true\n );\n\n $result = $result[\"getTransactionByInvoiceCheckPostResult\"];\n $info = $result[\"getTransactionByInvoiceReturn\"];\n\n JTable::addIncludePath(JPATH_ADMINISTRATOR.'/components/com_j2store/tables');\n $tOrder = JTable::getInstance('Orders', 'Table');\n $tOrder->load($inv);\n $order_id = intval($tOrder->id);\n\n // Check $inv from Paysbuy and owner orderinfo\n if($info['result']===\"00\" && !is_null($tOrder->id) && $tOrder->user_id==$user->id){\n \n // Update Status from Paysbuy\n $tOrder->order_state = \"Confirmed\";\n $tOrder->order_state_id = 1;\n $tOrder->store();\n }\n\n }\n\n break;\n \n default:\n $vars->message = JText::_( 'J2STORE_SAGEPAY_MESSAGE_INVALID_ACTION' );\n $html = $this->_getLayout('message', $vars);\n break;\n }\n\n return $html;\n }",
"function bunq_CreateRequest($amount, $description, $redirect, $user = 0, $account = 0) {\n\n\t$apiContext = ApiContext::restore(ApiContext::FILENAME_CONFIG_DEFAULT);\n\t$users = User::listing($apiContext)->getValue();\n\t//$user = $users[$user]->getUserPerson();\n\t$user = $users[$user]->getUserCompany();\n\t$userId = $user->getId();\n\t$monetaryAccounts = MonetaryAccount::listing($apiContext, $userId)->getValue();\n\t$monetaryAccount = $monetaryAccounts[$account]->getMonetaryAccountBank();\n\t$monetaryAccountId = $monetaryAccount->getId();\n\t$requestMap = [\n\t\tBunqMeTab::FIELD_BUNQME_TAB_ENTRY => [\n\t\t\tBunqMeTabEntry::FIELD_AMOUNT_INQUIRED => new Amount($amount, 'EUR'),\n\t\t\tBunqMeTabEntry::FIELD_REDIRECT_URL => $redirect,\n\t\t\tBunqMeTabEntry::FIELD_DESCRIPTION => $description\n\t\t]\n\t];\n\t$createBunqMeTab = BunqMeTab::create($apiContext, $requestMap, $userId, $monetaryAccountId)->getValue();\n\t$bunqMeRequest = BunqMeTab::get($apiContext, $userId, $monetaryAccountId, $createBunqMeTab)->getValue();\n\t$r[\"id\"] = $bunqMeRequest->getId();\n\t$r[\"uuid\"] = $bunqMeRequest->getBunqmeTabEntry()->getUuid();\n\t$r[\"amount\"] = $bunqMeRequest->getBunqmeTabEntry()->getAmountInquired()->getValue();\n\t$r[\"paymentlink\"] = $bunqMeRequest->getBunqmeTabShareUrl();\n\t$r[\"status\"] = $bunqMeRequest->getBunqmeTabEntry()->getStatus();\n\t$r[\"description\"] = $bunqMeRequest->getBunqmeTabEntry()->getDescription();\n\t$r[\"redirecturl\"] = $bunqMeRequest->getBunqmeTabEntry()->getRedirectUrl();\n\t$r[\"raw\"] = $bunqMeRequest;\n\treturn $r;\n\n}",
"public function index_post(){\n\n $uri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);\n $uri = explode( '/', $uri );\n $post_req = json_decode(file_get_contents(\"php://input\"),true); \n //echo \"<pre>\";print_r($post_req);exit;\n $resp = array();\n try {\n $resp = $this->common_api->GetBranchDetails($post_req);\n $method = $post_req['Method'];\n if(@$resp['modules']){\n $this->modules = $resp['modules'];\n \n if(!empty($this->modules['modules'])){\n if($method == 'CreateSalesInvoice'){\n $data = $this->common_api->get_default_country_state();\n $sales_module_id = $this->config->item('sales_module');\n $module_id = $sales_module_id;\n $privilege = \"add_privilege\";\n $section_modules = $this->common_api->get_section_modules($sales_module_id , $this->modules , $privilege);\n $data = array_merge($data , $section_modules);\n $access_settings = $section_modules['access_settings'];\n \n /*$currency = $this->input->post('currency_id');*/\n\n /* Create Invoice number */\n\n $data['sales_module_id'] = $sales_module_id;\n $data['module_id'] = $sales_module_id;\n $data['notes_module_id'] = $this->config->item('notes_module');\n $data['product_module_id'] = $this->config->item('product_module');\n $data['service_module_id'] = $this->config->item('service_module');\n $data['customer_module_id'] = $this->config->item('customer_module');\n $data['category_module_id'] = $this->config->item('category_module');\n $data['subcategory_module_id'] = $this->config->item('subcategory_module');\n $data['tax_module_id'] = $this->config->item('tax_module');\n $data['discount_module_id'] = $this->config->item('discount_module');\n $data['accounts_module_id'] = $this->config->item('accounts_module');\n /* Sub Modules Present */\n $data['notes_sub_module_id'] = $this->config->item('notes_sub_module');\n $data['transporter_sub_module_id'] = $this->config->item('transporter_sub_module');\n $data['shipping_sub_module_id'] = $this->config->item('shipping_sub_module');\n $data['charges_sub_module_id'] = $this->config->item('charges_sub_module');\n $data['accounts_sub_module_id'] = $this->config->item('accounts_sub_module');\n $sales_data = $post_req['sales'];\n\n if ($access_settings[0]->invoice_creation == \"automatic\"){\n $primary_id = \"sales_id\";\n $table_name = $this->config->item('sales_table');\n $date_field_name = \"sales_date\";\n $current_date = date('Y-m-d');\n $invoice_number = $this->common_api->generate_invoice_number_api($this,$access_settings , $primary_id , $table_name , $date_field_name , $current_date);\n } else {\n $invoice_number = $sales_data['invoice_number'];\n }\n\n /* Get currency ID */\n /*$currency_code = $sales_data['Currency_code'];*/\n $customer = 0;\n /*echo $this->session->userdata('SESS_BRANCH_ID');\n echo $this->session->userdata('SESS_USER_ID');\n exit();*/\n \n if(@$sales_data['Customer']){\n $cust_detail = $this->getCustomer($sales_data['Customer']);\n \n if($cust_detail['flag']){\n \n $customer = $cust_detail['customer'];\n $customer_id = $customer['customer_id'];\n $billing_address = $customer['billing_address'];\n $shipping_address = $customer['shipping_address'];\n \n $items = $sales_data['Items'];\n $item_data = array();\n $total_sub_total = $total_grand_total = $total_discount_amount = $total_tax_amount = $total_cess_amount = $total_taxable_amount = $total_tds_amount = $total_tcs_amount = $total_igst_amount = $total_cgst_amount = $total_sgst_amount = 0;\n\n $Extra_charges = (@$sales_data['Extra_charges'] ? $sales_data['Extra_charges'] : array());\n $is_gst = 0;\n if ($access_settings[0]->tax_type == \"gst\"){\n if ($data['branch'][0]->branch_country_id == $billing_address['country_id']){\n $is_gst = 1;\n }else{\n if ($sales_data['Type_of_supply'] == \"export_with_payment\")\n $is_gst = 1;\n }\n }\n $Extra_charges = $this->getExtraChargesDetail($Extra_charges,$is_gst);\n $total_other_amount = $Extra_charges['total_other_amount'];\n $total_other_taxable_amount = $Extra_charges['total_other_taxable_amount'];\n \n \n $item_id = array();\n foreach ($items as $key => $value) {\n if(!@$value['aodry_product_id']){\n $item_id = $this->getItemId($value);\n }else{ \n $item_id['flag'] = 1;\n $item_id['product_id'] = $value['aodry_product_id'];\n }\n \n $value['item_type'] = strtolower($value['item_type']);\n \n if($item_id['flag']){\n $tax_detail = $this->getTaxDetail($value);\n $item_sub_total = $value['item_price'] * $value['item_quantity'];\n $item_discount_amount = 0;\n /* Item discount amount */\n if($tax_detail['discount_id'] > 0){\n $item_discount_amount = ($item_sub_total * (float)$value['item_discount_percentage']) / 100;\n }\n\n //$item_taxable_value = $item_sub_total - $item_discount_amount;\n // selling price with discount\n $item_value = $item_sub_total - $item_discount_amount;\n \n \n $item_tax_amount = 0;\n /*if($tax_detail['tax_id'] > 0){\n $item_tax_amount = ($item_taxable_value * (float)$value['item_tax_percentage']) / 100;\n }\n $item_tax_amount += $total_other_taxable_amount;*/\n $cal_tax = 0;\n $item_taxable_value = 0;\n $item_tax_amount = 0;\n if($tax_detail['tax_id'] > 0){\n // find the taxable value from selling price\n $cal_tax = 1 + ( (float)$value['item_tax_percentage'] / 100);\n $item_taxable_value = $item_value / $cal_tax;\n $item_taxable_value = round($item_taxable_value,2);\n\n $item_price = ($item_taxable_value / $value['item_quantity']); \n $item_sub_total_item = $item_taxable_value;\n $item_tax_amount = ($item_taxable_value * (float)$value['item_tax_percentage']) / 100;\n $item_tax_amount = round($item_tax_amount,2);\n }\n \n $item_tds_amount = $item_tcs_amount = 0;\n if($tax_detail['tds_id'] > 0){\n if($value['item_type'] == 'product'){\n $item_tcs_amount = ($item_taxable_value * (float)$value['item_tds_percentage']) / 100;\n }else{\n $item_tds_amount = ($item_taxable_value * (float)$value['item_tds_percentage']) / 100;\n }\n }\n // $item_tax_amount += $item_tax_amount;\n \n $item_cess_amount = 0;\n /*if($tax_detail['cess_id'] > 0){\n $item_cess_amount = ($item_taxable_value * (float)$value['item_cess_percentage']) / 100;\n }*/\n $item_tax_percentage = (float)$value['item_tax_percentage'];\n\n $item_igst_amount = $item_cgst_amount = $item_sgst_amount = $item_cgst_percentage = $item_sgst_percentage = $item_igst_percentage = 0;\n \n if ($is_gst){\n $tax_split_percentage = $section_modules['access_common_settings'][0]->tax_split_percentage;\n\n $cgst_amount_percentage = $tax_split_percentage;\n $sgst_amount_percentage = 100 - $cgst_amount_percentage;\n\n if ($data['branch'][0]->branch_country_id == $billing_address['country_id']){\n if ($data['branch'][0]->branch_state_id == $billing_address['state_id']) {\n \n /*$item_cgst_amount = ($item_tax_amount * $cgst_amount_percentage) / 100;\n $item_sgst_amount = ($item_tax_amount * $sgst_amount_percentage) / 100;\n \n $item_cgst_percentage = ($item_tax_percentage * $cgst_amount_percentage) / 100;\n $item_sgst_percentage = ($item_tax_percentage * $sgst_amount_percentage) / 100;*/\n\n $item_cgst_amount = ($value['item_tax_amount'] / 2 );\n $item_sgst_amount = ($value['item_tax_amount'] / 2 );\n \n $item_cgst_percentage = ($value['item_tax_percentage'] / 2);\n $item_sgst_percentage = ($value['item_tax_percentage'] / 2);\n\n } else {\n $item_igst_amount = $value['item_tax_amount'];\n $item_igst_percentage = $value['item_tax_percentage'];\n }\n $is_gst = 1;\n } else {\n if ($sales_data['Type_of_supply'] == \"export_with_payment\"){\n $item_igst_amount = $item_tax_amount;\n $item_igst_percentage = $item_tax_percentage;\n $is_gst = 1;\n }else{\n $item_cess_amount = 0;\n $item_tax_amount = 0;\n }\n }\n }\n \n /*$item_grand_total = ($item_taxable_value) + ($item_tax_amount) + $item_tcs_amount + ($item_cess_amount);\n $total_sub_total += $item_sub_total_item;\n $total_grand_total += $item_grand_total;\n $total_discount_amount += $item_discount_amount;\n $total_tax_amount += $item_tax_amount;\n $total_cess_amount += $item_cess_amount;\n $total_taxable_amount += $item_taxable_value;\n $total_tds_amount += $item_tds_amount;\n $total_tcs_amount += $item_tcs_amount;\n $total_igst_amount += $item_igst_amount;\n $total_cgst_amount += $item_cgst_amount;\n $total_sgst_amount += $item_sgst_amount;*/\n\n //ecom calculation\n $sales_item_sub_total = ($value['item_taxable_amount'] * $value['item_quantity']);\n\n $sales_item_taxable_value = ($value['item_taxable_amount'] * $value['item_quantity']) - $value['item_discount_amount'];\n\n\n\n $item_grand_total = ($item_taxable_value) + ($item_tax_amount) + $item_tcs_amount + ($item_cess_amount);\n $total_sub_total += $sales_item_sub_total;\n $total_grand_total += $item_grand_total;\n $total_discount_amount += $value['item_discount_amount'];\n $total_tax_amount += $value['item_tax_amount'];\n $total_cess_amount += $item_cess_amount;\n $total_taxable_amount += $sales_item_taxable_value;\n $total_tds_amount += $item_tds_amount;\n $total_tcs_amount += $item_tcs_amount;\n $total_igst_amount += $item_igst_amount;\n $total_cgst_amount += $item_cgst_amount;\n $total_sgst_amount += $item_sgst_amount;\n\n\n\n\n \n \n\n\n\n $item_data[] = array(\n \"item_id\" => $item_id['product_id'] ,\n \"item_type\" => $value['item_type'] ,\n \"sales_item_quantity\" => $value['item_quantity'] ? (float)$value['item_quantity'] : 0 ,\n \"sales_item_unit_price\" => $value['item_taxable_amount'] ? (float)$value['item_taxable_amount'] : 0 ,\n \"sales_item_sub_total\" => $sales_item_sub_total ? (float) $sales_item_sub_total : 0 ,\n \"sales_item_taxable_value\" => $sales_item_taxable_value ? (float) $sales_item_taxable_value : 0 ,\n \"sales_item_discount_amount\" => $value['item_discount_amount'] ? (float) $value['item_discount_amount'] : 0 ,\n \"sales_item_discount_id\" => $tax_detail['discount_id'] ? (float)$tax_detail['discount_id'] : 0,\n \"sales_item_tds_id\" => $tax_detail['tds_id'] ? (float)$tax_detail['tds_id'] : 0 ,\n \"sales_item_tds_percentage\" => $value['item_tds_percentage'] ?(float)$value['item_tds_percentage'] : 0 ,\n \"sales_item_tds_amount\" => ($item_tds_amount + $item_tcs_amount),\n \"sales_item_grand_total\" => $value['item_grand_total'] ? (float)$value['item_grand_total'] : 0 ,\n \"sales_item_tax_id\" => $tax_detail['tax_id'] ? (float)$tax_detail['tax_id'] : 0 ,\n \"sales_item_tax_cess_id\" => 0,\n \"sales_item_igst_percentage\" => $item_igst_percentage ,\n \"sales_item_igst_amount\" => $item_igst_amount ,\n \"sales_item_cgst_percentage\" => $item_cgst_percentage ,\n \"sales_item_cgst_amount\" => $item_cgst_amount ,\n \"sales_item_sgst_percentage\" => $item_sgst_percentage ,\n \"sales_item_sgst_amount\" => $item_sgst_amount ,\n \"sales_item_tax_percentage\" => $item_tax_percentage ? (float) $item_tax_percentage : 0 ,\n \"sales_item_tax_cess_percentage\" =>$value['item_cess_percentage'] ?(float)$value['item_cess_percentage'] : 0 ,\n \"sales_item_tax_amount\" => $value['item_tax_amount'] ? (float) $value['item_tax_amount'] : 0 ,\n 'sales_item_tax_cess_amount' => 0 ,\n \"sales_item_description\" => $value['item_description'] ? $value['item_description'] : \"\" ,\n \"debit_note_quantity\" => 0\n );\n }\n\n }\n\n \n\n if(!empty($item_data)){\n $Transport_details = (@$sales_data['Transport_details'] ? $sales_data['Transport_details'] : array());\n $Shipping_details = (@$sales_data['Shipping_details'] ? $sales_data['Shipping_details'] : array());\n $total_grand_total = $total_grand_total + $total_other_amount + $total_other_taxable_amount; \n $customer_payable_amount = $total_grand_total;\n if($total_tds_amount > 0){\n $customer_payable_amount = bcsub($total_grand_total, $total_tds_amount);\n }\n\n $sales_main = array(\n 'sales_date' => (@$sales_data['Invoice_date'] ? date('Y-m-d' ,strtotime($sales_data['Invoice_date'])) : date('Y-m-d')),\n \"sales_invoice_number\" => $invoice_number ,\n \"sales_sub_total\" => (float)$total_sub_total,\n \"sales_grand_total\" => $sales_data['Sales_grand_total'],\n \"customer_payable_amount\" => $sales_data['Sales_grand_total'],\n \"sales_discount_amount\" => $total_discount_amount,\n \"sales_tax_amount\" => $total_tax_amount,\n \"sales_tax_cess_amount\" => 0,\n \"sales_taxable_value\" => (float)$total_taxable_amount ,\n \"sales_tds_amount\" => $total_tds_amount,\n \"sales_tcs_amount\" => $total_tcs_amount,\n \"sales_igst_amount\" => $total_igst_amount,\n \"sales_cgst_amount\" => $total_cgst_amount,\n \"sales_sgst_amount\" => $total_sgst_amount,\n \"from_account\" => 'customer' ,\n \"to_account\" => 'sales' ,\n \"sales_paid_amount\" => 0,\n \"credit_note_amount\" => 0,\n \"debit_note_amount\" => 0,\n \"ship_to_customer_id\" => $customer['customer_id'],\n \"financial_year_id\" => $this->session->userdata('SESS_FINANCIAL_YEAR_ID'),\n \"sales_party_id\" => $customer['customer_id'],\n \"sales_party_type\" => \"customer\" ,\n \"sales_nature_of_supply\" => (@$sales_data['Nature_of_supply'] ? $sales_data['Nature_of_supply'] : 'both'),\n \"sales_order_number\" => (@$sales_data['Order_number'] ? $sales_data['Order_number'] : ''),\n \"sales_type_of_supply\" => (@$sales_data['Type_of_supply'] ? $sales_data['Type_of_supply'] : 'regular'),\n \"sales_gst_payable\" => (@$sales_data['Gst_payable'] ? $sales_data['Gst_payable'] : 'no'),\n \"sales_billing_country_id\" => $customer['billing_address']['country_id'] ,\n \"sales_billing_state_id\" => $customer['billing_address']['state_id'],\n \"added_date\" => date('Y-m-d') ,\n \"added_user_id\" => $this->session->userdata('SESS_USER_ID'),\n \"branch_id\" => $this->session->userdata('SESS_BRANCH_ID'),\n \"currency_id\" => $this->session->userdata('SESS_DEFAULT_CURRENCY'),\n \"updated_date\" => \"\" ,\n \"updated_user_id\" => \"\" ,\n \"warehouse_id\" => \"\" ,\n \"transporter_name\"=> (@$Transport_details['name'] ? $Transport_details['name'] : ''),\n \"transporter_gst_number\" => (@$Transport_details['GST_number'] ? $Transport_details['GST_number'] : ''),\n \"lr_no\" => (@$Transport_details['LR_number'] ? $Transport_details['LR_number'] : '') ,\n \"vehicle_no\" => (@$Transport_details['vehicle_number'] ? $Transport_details['vehicle_number'] : ''),\n \"mode_of_shipment\" => (@$Shipping_details['mode_of_shipment'] ? $Shipping_details['mode_of_shipment'] : ''),\n \"ship_by\" => (@$Shipping_details['ship_by'] ? $Shipping_details['ship_by'] : ''),\n \"net_weight\" => (@$Shipping_details['net_weight'] ? $Shipping_details['net_weight'] : '') ,\n \"gross_weight\" => (@$Shipping_details['gross_weight'] ? $Shipping_details['gross_weight'] : '') ,\n \"origin\" => (@$Shipping_details['origin'] ? $Shipping_details['origin'] : '') ,\n \"destination\" => (@$Shipping_details['destination'] ? $Shipping_details['destination'] : '') ,\n \"shipping_type\" => (@$Shipping_details['shipping_type'] ? $Shipping_details['shipping_type'] : '') ,\n \"shipping_type_place\" => (@$Shipping_details['shipping_type_place'] ? $Shipping_details['shipping_type_place'] : '') ,\n \"lead_time\" => (@$Shipping_details['lead_time'] ? $Shipping_details['lead_time'] : '') ,\n \"shipping_address_id\" => (@$customer['shipping_address']['shipping_id'] ? $customer['shipping_address']['shipping_id'] : 0),\n \"warranty\" => (@$Shipping_details['warranty'] ? $Shipping_details['warranty'] : ''),\n \"payment_mode\" => (@$Shipping_details['payment_mode'] ? $Shipping_details['payment_mode'] : '') ,\n \"billing_address_id\" => $customer['billing_address']['billing_id'] ,\n \"freight_charge_amount\"=> (@$Extra_charges['freight_charge_amount'] ? $Extra_charges['freight_charge_amount'] : 0) ,\n \"freight_charge_tax_percentage\" => (@$Extra_charges['freight_charge_percentage'] ? $Extra_charges['freight_charge_percentage'] : 0) ,\n \"freight_charge_tax_amount\" => (@$Extra_charges['freight_charge_tax_amount'] ? $Extra_charges['freight_charge_tax_amount'] : 0) ,\n \"freight_charge_tax_id\" => (@$Extra_charges['freight_charge_tax_id'] ? $Extra_charges['freight_charge_tax_id'] : 0) ,\n \"total_freight_charge\" =>(@$Extra_charges['freight_charge_amount'] ? $Extra_charges['freight_charge_amount'] : 0) ,\n \"insurance_charge_amount\" => (@$Extra_charges['insurance_charge_amount'] ? $Extra_charges['insurance_charge_amount'] : 0) ,\n \"insurance_charge_tax_percentage\" => (@$Extra_charges['insurance_charge_percentage'] ? $Extra_charges['insurance_charge_percentage'] : 0) ,\n \"insurance_charge_tax_amount\" => (@$Extra_charges['insurance_charge_tax_amount'] ? $Extra_charges['insurance_charge_tax_amount'] : 0) ,\n \"insurance_charge_tax_id\" => (@$Extra_charges['insurance_charge_tax_id'] ? $Extra_charges['insurance_charge_tax_id'] : 0) ,\n \"total_insurance_charge\" => (@$Extra_charges['insurance_charge_amount'] ? $Extra_charges['insurance_charge_amount'] : 0) ,\n \"packing_charge_amount\" => (@$Extra_charges['packing_charge_amount'] ? $Extra_charges['packing_charge_amount'] : 0) ,\n \"packing_charge_tax_percentage\" => (@$Extra_charges['packing_charge_percentage'] ? $Extra_charges['packing_charge_percentage'] : 0) ,\n \"packing_charge_tax_amount\" => (@$Extra_charges['packing_charge_tax_amount'] ? $Extra_charges['packing_charge_tax_amount'] : 0) ,\n \"packing_charge_tax_id\" => (@$Extra_charges['packing_charge_tax_id'] ? $Extra_charges['packing_charge_tax_id'] : 0) ,\n \"total_packing_charge\" => (@$Extra_charges['packing_charge_amount'] ? $Extra_charges['packing_charge_amount'] : 0) ,\n \"incidental_charge_amount\" => (@$Extra_charges['incidental_charge_amount'] ? $Extra_charges['incidental_charge_amount'] : 0) ,\n \"incidental_charge_tax_percentage\" => (@$Extra_charges['incidental_charge_percentage'] ? $Extra_charges['incidental_charge_percentage'] : 0) ,\n \"incidental_charge_tax_amount\" => (@$Extra_charges['incidental_charge_tax_amount'] ? $Extra_charges['incidental_charge_tax_amount'] : 0) ,\n \"incidental_charge_tax_id\" => (@$Extra_charges['incidental_charge_tax_id'] ? $Extra_charges['incidental_charge_tax_id'] : 0) ,\n \"total_incidental_charge\" => (@$Extra_charges['incidental_charge_amount'] ? $Extra_charges['incidental_charge_amount'] : 0) ,\n \"inclusion_other_charge_amount\" => (@$Extra_charges['inclusion_other_charge_amount'] ? $Extra_charges['inclusion_other_charge_amount'] : 0) ,\n \"inclusion_other_charge_tax_percentage\" => (@$Extra_charges['inclusion_other_charge_percentage'] ? $Extra_charges['inclusion_other_charge_percentage'] : 0) ,\n \"inclusion_other_charge_tax_amount\" => (@$Extra_charges['inclusion_other_charge_tax_amount'] ? $Extra_charges['inclusion_other_charge_tax_amount'] : 0) ,\n \"inclusion_other_charge_tax_id\" => (@$Extra_charges['inclusion_other_charge_tax_id'] ? $Extra_charges['inclusion_other_charge_tax_id'] : 0) ,\n \"total_inclusion_other_charge\" => (@$Extra_charges['inclusion_other_charge_amount'] ? $Extra_charges['inclusion_other_charge_amount'] : 0) ,\n \"exclusion_other_charge_amount\" => (@$Extra_charges['exclusion_other_charge_amount'] ? $Extra_charges['exclusion_other_charge_amount'] : 0) ,\n \"exclusion_other_charge_tax_percentage\" => (@$Extra_charges['exclusion_other_charge_percentage'] ? $Extra_charges['exclusion_other_charge_percentage'] : 0) ,\n \"exclusion_other_charge_tax_amount\" =>(@$Extra_charges['exclusion_other_charge_tax_amount'] ? $Extra_charges['exclusion_other_charge_tax_amount'] : 0) ,\n \"exclusion_other_charge_tax_id\" => (@$Extra_charges['exclusion_other_charge_tax_id'] ? $Extra_charges['exclusion_other_charge_tax_id'] : 0) ,\n \"total_exclusion_other_charge\" => (@$Extra_charges['exclusion_other_charge_amount'] ? $Extra_charges['exclusion_other_charge_amount'] : 0) ,\n \"total_other_amount\" => (@$Extra_charges['total_other_amount'] ? $Extra_charges['total_other_amount'] : 0) ,\n \"total_other_taxable_amount\" => (@$Extra_charges['total_other_taxable_amount'] ? $Extra_charges['total_other_taxable_amount'] : 0) ,\n \"round_off_amount\" => 0,\n \"added_by_api\" => '1',\n \"note1\" => (@$sales_data['Note1'] ? trim($sales_data['Note1']) : ''),\n \"note2\" => (@$sales_data['Note2'] ? trim($sales_data['Note2']) : '')\n );\n\n\n\n $data_main = array_map('trim' , $sales_main);\n \n $sales_table = $this->config->item('sales_table');\n $sales_id = $this->general_model->insertData($sales_table , $data_main);\n \n if ($sales_id) {\n $log_data = array(\n 'user_id' => $this->session->userdata('SESS_USER_ID'),\n 'table_id' => $sales_id ,\n 'table_name' => $sales_table ,\n 'financial_year_id' => $this->SESS_FINANCIAL_YEAR_ID,\n 'branch_id' => $this->session->userdata('SESS_BRANCH_ID') ,\n 'message' => 'Sales Inserted');\n $data_main['sales_id'] = $sales_id;\n $log_table = $this->config->item('log_table');\n $this->general_model->insertData($log_table , $log_data);\n \n $js_data = $item_data;\n $item_table = $this->config->item('sales_item_table');\n\n $js_data1 = array();\n foreach ($js_data as $key => $value) {\n $value['sales_id'] = $sales_id;\n $data_item = array_map('trim' , $value);\n $js_data1[] = $data_item;\n \n if ($data_item['item_type'] == \"product\"){\n $product_data = $this->common_api->product_field($this->session->userdata('SESS_BRANCH_ID') ,$data_item['item_id']);\n $product_result = $this->general_model->getJoinRecords($product_data['string'] , $product_data['table'] , $product_data['where'],$product_data['join']);\n \n $product_quantity = ($product_result[0]->product_quantity - $value['sales_item_quantity']);\n $stockData = array('product_quantity' => $product_quantity );\n $where = array('product_id' => $value['item_id'] );\n $product_table = $this->config->item('product_table');\n $this->general_model->updateData($product_table , $stockData , $where);\n // quantity history\n $history = array(\n \"item_id\" => $value['item_id'] ,\n \"item_type\" => 'product' ,\n \"reference_id\" => $sales_id ,\n \"reference_number\" => $invoice_number ,\n \"reference_type\" => 'sales' ,\n \"quantity\" => $value['sales_item_quantity'] ,\n \"stock_type\" => 'indirect' ,\n \"branch_id\" => $this->session->userdata('SESS_BRANCH_ID') ,\n \"added_date\" => date('Y-m-d') ,\n \"entry_date\" => date('Y-m-d') ,\n \"added_user_id\" => $this->session->userdata('SESS_USER_ID'));\n $this->general_model->insertData(\"quantity_history\" , $history);\n }\n }\n //$this->general_model->insertData($item_table , $js_data1);\n $this->db->insert_batch($item_table, $js_data1);\n //sales lookup\n $look_up = array(\n 'sales_id' => $sales_id,\n 'sales_invoice_number' => $invoice_number,\n 'aodry_customer_id' => $customer['customer_id'],\n 'added_date' => date('Y-m-d'),\n 'added_user_id' => $this->session->userdata('SESS_USER_ID'),\n 'branch_id' => $this->session->userdata('SESS_BRANCH_ID')\n );\n $this->db->insert('ecom_sales_sync', $look_up);\n if (in_array($data['accounts_module_id'] , $section_modules['active_add'])){\n if (in_array($data['accounts_sub_module_id'] , $section_modules['access_sub_modules'])){\n $action = \"add\";\n $branch_data = $data['branch'][0];\n $this->sales_voucher_entry($data_main , $js_data1 , $action , $data['branch'],$branch_data);\n }\n }\n\n $resp['status'] = 200;\n $resp['message'] = 'Sales Invoice addded successfully!';\n $resp['data'] = $look_up;\n }\n \n $logs = array('action_name' => 'CreateSalesInvoice','action_id'=> $sales_id,'status' => $resp['status'],'response' => $resp['message'],'user_id' => $this->session->userdata('SESS_USER_ID'),'branch_id' =>$this->session->userdata('SESS_BRANCH_ID'),'created_at' => date('Y-m-d H:i:s'));\n $this->db->insert('ecom_sync_logs',$logs);\n }else{\n $resp['status'] = 404;\n $resp['message'] = 'Invalid Items!';\n }\n /*echo \"<pre>\";\n print_r($sales_main);\n print_r($item_data);\n exit();*/\n }else{\n $resp['status'] = 404;\n $resp['message'] = $cust_detail['msg'];\n }\n \n\n }else{\n $resp['status'] = 404;\n $resp['message'] = 'Customer detail not found.';\n }\n }elseif($method == 'PrintSalesInvoice'){\n $order_details = $post_req['data'];\n $order_id = $order_details['order_id'];\n $sales_qry = $this->db->query(\"SELECT sales_id FROM `sales` WHERE branch_id='\".$this->session->userdata('SESS_BRANCH_ID').\"' AND sales_order_number = '{$order_id}' \");\n if($sales_qry->num_rows() > 0){\n $sales_pdf = $sales_qry->result();\n $sales_pdf_id = $sales_pdf[0]->sales_id;\n\n // $id = $this->encryption_url->decode($sales_pdf_id);\n $id = $sales_pdf_id;\n $data = $this->common_api->get_default_country_state();\n $sales_module_id = $this->config->item('sales_module');\n $data['module_id'] = $sales_module_id;\n $modules = $this->modules;\n $privilege = \"view_privilege\";\n $data['privilege'] = \"view_privilege\";\n $section_modules = $this->common_api->get_section_modules($sales_module_id , $modules , $privilege);\n $data = array_merge($data , $section_modules);\n $product_module_id = $this->config->item('product_module');\n $service_module_id = $this->config->item('service_module');\n $customer_module_id = $this->config->item('customer_module');\n $data['charges_sub_module_id'] = $this->config->item('charges_sub_module');\n $data['notes_sub_module_id'] = $this->config->item('notes_sub_module');\n ob_start();\n $html = ob_get_clean();\n $html = utf8_encode($html);\n \n $branch_data = $data['branch'][0];\n $data = $this->getSalesDetails($id, $branch_data, $data['branch']);\n //echo \"<pre>\";print_r($data);exit();\n \n $paper_size = 'a4';\n $orientation = 'portrait'; \n \n $print_currency = $this->input->post('print_currency');\n $converted_rate = 1;\n \n if($print_currency != $this->session->userdata('SESS_DEFAULT_CURRENCY')){\n if($data['data'][0]->currency_converted_rate > 0)\n $converted_rate = $data['data'][0]->currency_converted_rate;\n }else{\n $currency = $this->getBranchCurrencyCode();\n $data['data'][0]->currency_name = $currency[0]->currency_name;\n $data['data'][0]->currency_code = $currency[0]->currency_code;\n $data['data'][0]->currency_symbol = $currency[0]->currency_symbol;\n $data['data'][0]->currency_symbol_pdf = $currency[0]->currency_symbol_pdf;\n $data['data'][0]->unit = $currency[0]->unit;\n $data['data'][0]->decimal_unit = $currency[0]->decimal_unit;\n }\n $data['converted_rate'] = $converted_rate;\n $pdf_json = $data['access_settings'][0]->pdf_settings;\n $rep = str_replace(\"\\\\\" , '' , $pdf_json);\n $data['pdf_results'] = json_decode($rep , true);\n \n $html = $this->load->view('sales/pdf' , $data , true); \n //echo \"<pre>\";print_r($html);exit();\n $resp['status'] = 200;\n $resp['message'] = 'Sales Invoice Sent successfully!';\n $resp['data'] = htmlentities($html, ENT_QUOTES);;\n }else{\n $resp['status'] = 404;\n $resp['message'] = 'Sales Not Found!';\n } \n }\n }else{\n $resp['status'] = 404;\n $resp['message'] = 'User access denied!';\n } \n }\n }catch (Exception $e) {\n \n }\n\n // everything else results in a 404 Not Found\n if ($resp['status'] == 200) {\n $this->response($resp, REST_Controller::HTTP_OK);\n }else{\n $this->response($resp, REST_Controller::HTTP_NOT_FOUND);\n }\n exit();\n }",
"public function createOrder($accessToken){\n $url = \"https://api.sandbox.paypal.com/v2/checkout/orders\";\n \n /* Call Headers */\n $paymentHeaders = array(\"Content-Type: application/json\", \"Authorization: Bearer \".$accessToken);\n \n\t/* Generates Random Invoice Number */\n\t$randNo= (string)rand(10000,20000);\n \n /* Fill payload with transaction info */\n\n\t\t\t$postfields = '{}';\n $postfieldsArr = json_decode($postfields, true);\n $postfieldsArr['intent'] = \"CAPTURE\";\n \t$postfieldsArr['application_context']['shipping_preference'] = \"SET_PROVIDED_ADDRESS\";\n \t$postfieldsArr['application_context']['user_action'] = \"PAY_NOW\";\n \t\n \t$postfieldsArr['purchase_units'][0]['description'] = \"PayPalPizza\";\n \t$postfieldsArr['purchase_units'][0]['invoice_id'] = \"INV-PayPalPizza-\" . $randNo;\n \t$postfieldsArr['purchase_units'][0]['amount']['currency_code'] = $_POST['currency'];\n \t$postfieldsArr['purchase_units'][0]['amount']['value'] = $_POST['total_amt'];\n \t$postfieldsArr['purchase_units'][0]['amount']['breakdown']['item_total']['currency_code'] = $_POST['currency'];\n \t$postfieldsArr['purchase_units'][0]['amount']['breakdown']['item_total']['value'] = $_POST['total_amt'];\n\t\t\t$postfieldsArr['purchase_units'][0]['shipping']['address']['recipient_name']= $_POST['shipping_recipient_name'];\n\t\t\t$postfieldsArr['purchase_units'][0]['shipping']['address']['phone']= $_POST['shipping_phone'];\n $postfieldsArr['purchase_units'][0]['shipping']['address']['address_line_1']= $_POST['shipping_line1'];\n $postfieldsArr['purchase_units'][0]['shipping']['address']['address_line_2']= $_POST['shipping_line2'];\n $postfieldsArr['purchase_units'][0]['shipping']['address']['admin_area_2']= $_POST['shipping_city'];\n $postfieldsArr['purchase_units'][0]['shipping']['address']['admin_area_1']= $_POST['shipping_state'];\n $postfieldsArr['purchase_units'][0]['shipping']['address']['postal_code']= $_POST['shipping_postal_code'];\n $postfieldsArr['purchase_units'][0]['shipping']['address']['country_code']= $_POST['shipping_country_code'];\n \n for($a = 0; $a < $_POST['itemnum']; $a++){\n $postfieldsArr['purchase_units'][0]['items'][$a]['name'] = $_POST[('itemname'. $a )];\n $postfieldsArr['purchase_units'][0]['items'][$a]['description'] = $_POST[('itemname'. $a)]; \n $postfieldsArr['purchase_units'][0]['items'][$a]['sku'] = $_POST[('itemsku'. $a)]; \n $postfieldsArr['purchase_units'][0]['items'][$a]['unit_amount']['currency_code'] = $_POST['currency']; \n $postfieldsArr['purchase_units'][0]['items'][$a]['unit_amount']['value'] = $_POST[('itemprice'. $a)];\n $postfieldsArr['purchase_units'][0]['items'][$a]['quantity'] = $_POST[('itemamount'. $a)];\n $postfieldsArr['purchase_units'][0]['items'][$a]['category'] = \"PHYSICAL_GOODS\";\n }\n \n $postfields = json_encode($postfieldsArr);\n \n/* Call Orders API */\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_HTTPHEADER, $paymentHeaders);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_VERBOSE, 1);\n curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n curl_setopt($ch, CURLOPT_POST, true);\n $run = curl_exec($ch);\n curl_close($ch);\n/* Call Orders API */\n\n echo $run;\n }",
"function buyPostage()\n {\n\n $this->PartnerTransactionID = substr(uniqid(rand(), true), 0, 10);\n\n $xml = '<RecreditRequest>\n <RequesterID>'. $this->RequesterID.'</RequesterID>\n <RequestID>' . $this->PartnerTransactionID . '</RequestID>\n <CertifiedIntermediary>\n <AccountID>'.$this->AccountID.'</AccountID>\n <PassPhrase>'. $this->PassPhrase.'</PassPhrase>\n </CertifiedIntermediary>\n <RecreditAmount>500</RecreditAmount>\n </RecreditRequest>';\n\n\n $data = array(\"RecreditRequestXML\" => $xml);\n $request = $this->client->post('/LabelService/EwsLabelService.asmx/BuyPostageXML', array(), $data);\n $this->send_request($request);\n\n\n }",
"protected function createPayment() {\n /* @var \\Drupal\\commerce_payment\\Plugin\\Commerce\\PaymentGateway\\PaymentGatewayInterface $payment_gateway */\n $payment_gateway = $this->order->payment_gateway->entity;\n $payment_method = $this->order->payment_method->entity;\n\n $now = REQUEST_TIME;\n $mode = SIPSPaymentGateway::MODES[$payment_gateway->getPlugin()->configuration['mode']];\n\n // Create a payment entity which will be initially in \"pending mode\":\n // \"pending mode\": means that the payment was still not finished in SIPS,\n // so the user is in the platform filling in the credit card or he/she had\n // problems to pay that time (timeout/closed the browser/etc).\n $payment = Payment::create([\n 'order_id' => $this->order->id(),\n 'payment_method' => $payment_method->id(),\n 'payment_gateway' => $payment_gateway->id(),\n // Give it a status: pending/failed/done.\n 'state' => 'new',\n 'remote_state' => 'pending',\n // Give it a max_timestamp of 24 hours.\n 'authorization_expires' => $now + (24 * 60 * 60),\n // Give it a transaction reference.\n 'remote_id' => $this->order->id() . $now,\n 'test' => $mode != PaymentRequest::PRODUCTION,\n 'amount' => $this->order->getTotalPrice(),\n ]);\n\n $payment->save();\n\n return $payment;\n }",
"public function execute(){\n\n $body = '{\"payer_id\":\"' . $this->payer_id . '\"}';\n $client = new Client();\n try{\n $paymentInfo = $client->request('POST', $this->execute_url, ['headers' => [\n 'Content-Type' => 'application/json',\n 'Authorization' => 'Bearer ' . $this->accessKey,\n ],\n 'body' => $body\n ]);\n }\n catch (\\Exception $ex) {\n $error = json_encode($ex->getMessage());\n return($error);\n }\n $this->parsePaymentBody($paymentInfo);\n return $this->paymentBody;\n\n }",
"public function testGetCurrentPricingDataUsingPOST()\n {\n }",
"public function post();",
"public function post();",
"public function post();",
"public function pay_post($uuid='') {\n\n $counselor = $this->User->load_payable($uuid);\n if($counselor) {\n $this->load->model('Payout');\n $this->load->helper('notification');\n\n if($counselor->amount>0) {\n \\Stripe\\Stripe::setApiKey($this->config->item('stripe_private_key'));\n try {\n\n $transfer = \\Stripe\\Transfer::create(\n array( \"amount\" => $counselor->amount*100,\n \"currency\" => \"usd\",\n \"destination\" => $counselor->stripe_customer_id,\n \"description\" => \"Transfer for \".$counselor->firstname.\" \".$counselor->lastname\n )\n );\n\n $this->Payout->add($transfer, $counselor->id);\n notify_payment($counselor->id, $transfer);\n\n json_success('Your payment has been submitted successfully as <b>transaction number '.$transfer['id'].'</b>!');\n } catch (Exception $e) {\n log_message('info', '[Transfer] Stripe_Transfer::create Exception: ' . $e->getMessage());\n $error = sprintf('There was a problem processing the transfer. The error returned from the authorizing gateway was \\'%s\\'', $e->getMessage());\n json_error($error);\n }\n }\n }\n }",
"public function create()\n {\n\n $this->validate($this->request, Payment::createRules());\n\n $payment = new Payment;\n\n $payment->bill_id= $this->request->bill_id;\n \n $payment->save();\n \n return $this->response(201,\"Payment\", $payment );\n\n\n }",
"function execute_payment($access_token, $payerId, $paymentID) {\n\n global $host;\n $url = $host.'/v1/payments/payment/'.$paymentID.'/execute/';\n\n $postdata= '{\"payer_id\" : \"'.$payerId.'\"}';\n\n $curl = curl_init($url);\n curl_setopt($curl, CURLOPT_POST, true);\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($curl, CURLOPT_HEADER, false);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($curl, CURLOPT_HTTPHEADER, array(\n 'Authorization: Bearer '.$access_token,\n 'Content-Type: application/json'\n )); // An array of HTTP header fields to set, in the format array('Content-type: text/plain', 'Content-length: 100')\n curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata);\n #curl_setopt($curl, CURLOPT_VERBOSE, TRUE);\n\n $response = curl_exec( $curl );\n\n if (empty($response)) {\n // Some kind of an error happened\n die(curl_error($curl));\n curl_close($curl);\n } else {\n $info = curl_getinfo($curl);\n curl_close($curl); \n\n if($info['http_code'] != 200 && $info['http_code'] != 201 ) {\n return $response;\n }\n\n }\n\n return $response;\n\n}",
"function pay() {\n if($this->active_invoice->isLoaded()) {\n\n if($this->request->isSubmitted()) {\n try {\n $payment_data = $this->request->post('payment');\n $payment_gateway_id = $this->request->post('payment_gateway_id');\n\n $payment_data['payment_gateway_id'] = $payment_gateway_id;\n\n $payer_email = $payment_data['payer_email'];\n if($payer_email && is_valid_email($payer_email)) {\n $payer = Users::findByEmail($payer_email);\n if(!$payer instanceof User) {\n $payer = new AnonymousUser($payer_email, $payer_email);\n } //if\n } //if\n\n if(!$payer instanceof IUser) {\n throw new Error('Please enter valid Email address');\n } //if\n\n $this->response->assign(array(\n 'payment_data'\t=> $payment_data,\n ));\n\n $cc_number = trim($payment_data['credit_card_number']);\n if($cc_number) {\n $response = is_valid_cc($cc_number);\n if($response !== true) {\n throw new Error($response);\n }//if\n }//if\n\n $payment_data['amount'] = str_replace(\",\",\"\",$payment_data['amount']);\n\n if(!is_numeric($payment_data['amount'])) {\n throw new Error('Total amount must be numeric value');\n }//if\n\n //check if this payment can proceed\n $this->active_invoice->payments()->canMarkAsPaid($payment_data['amount']);\n\n DB::beginWork('Creating new payment @ ' . __CLASS__);\n\n if($payment_gateway_id && $payment_gateway_id > 0) {\n $active_payment_gateway = PaymentGateways::findById($payment_gateway_id);\n if(!$active_payment_gateway instanceof PaymentGateway) {\n $this->response->notFound();\n }//if\n } else {\n throw new Error('Please select preferred payment option');\n }//if\n\n //if this method exists, please check is all necessery extension loaded\n if(method_exists($active_payment_gateway, 'checkEnvironment')) {\n $active_payment_gateway->checkEnvironment();\n }//if\n\n $active_payment = $active_payment_gateway->makePayment($payment_data, $this->active_invoice->getCurrency(), $this->active_invoice);\n\n if(!$active_payment->getIsError() && $active_payment instanceof Payment) {\n\n $active_payment->setIsPublic(true);\n $active_payment->setCreatedBy($payer);\n $active_payment->setParent($this->active_invoice);\n $active_payment->setAttributes($payment_data);\n $active_payment->setStatus(Payment::STATUS_PAID);\n $active_payment->setCurrencyId($this->active_invoice->getCurrency()->getId());\n\n //if we do express checkout\n if($active_payment instanceof PaypalExpressCheckoutPayment) {\n $active_payment->setStatus(Payment::STATUS_PENDING);\n $active_payment->setReason(Payment::REASON_OTHER);\n $active_payment->setReasonText(lang('Waiting response from paypal express checkout'));\n } //if\n\n $active_payment->save();\n\n //TO-Do check this\n $this->active_invoice->payments()->changeStatus($payer, $active_payment, $payment_data);\n $this->active_invoice->activityLogs()->logPayment($payer);\n\n // Notify if not gagged\n if(!($active_payment instanceof PaypalExpressCheckoutPayment) && !$this->active_invoice->payments()->isGagged()) {\n AngieApplication::notifications()\n ->notifyAbout(PAYMENTS_FRAMEWORK . '/new_payment', $this->active_invoice)\n ->setPayment($active_payment)\n ->sendToFinancialManagers();\n }//if\n\n if($payer instanceof IUser && !$payer->isFinancialManager()) {\n AngieApplication::notifications()\n ->notifyAbout(PAYMENTS_FRAMEWORK . '/new_payment_to_payer', $this->active_invoice)\n ->setPayment($active_payment)\n ->sendToUsers($payer);\n }//if\n\n $this->active_invoice->payments()->paymentMade($active_payment);\n\n DB::commit('Payment created @ ' . __CLASS__);\n if($active_payment instanceof PaypalExpressCheckoutPayment) {\n $this->response->redirectToUrl($active_payment->getRedirectUrl());\n } //if\n } else {\n throw new Error($active_payment->getErrorMessage());\n } //if\n\n $this->response->assign(array(\n 'active_object'\t=> $this->active_invoice,\n ));\n } catch (Exception $e) {\n DB::rollback('Failed to make payment @ ' . __CLASS__);\n $this->response->assign('errors', $e);\n }//try\n } //if\n } else {\n $this->response->notFound();\n } // if\n }",
"public function submitPayment() {\n return array('error' => 0, 'transactionReference' => '');\n }",
"public function postPaymentWithpaypal(Request $request)\n {\n \t$plan = Package::findOrFail($request->plan_id);\n \t$currency_code = Config::first()->currency_code;\n $currency_code = strtoupper($currency_code);\n\n $payer = new Payer();\n $payer->setPaymentMethod('paypal');\n\n \t$item_1 = new Item();\n\n $item_1->setName($plan->name) /** item name **/\n ->setCurrency($currency_code)\n ->setQuantity(1)\n ->setPrice($plan->amount); /** unit price **/\n\n $item_list = new ItemList();\n $item_list->setItems(array($item_1));\n\n $amount = new Amount();\n $amount->setCurrency($currency_code)\n ->setTotal($plan->amount);\n\n $transaction = new Transaction();\n $transaction->setAmount($amount)\n ->setItemList($item_list)\n ->setDescription('Subscription');\n\n $redirect_urls = new RedirectUrls();\n $redirect_urls->setReturnUrl(route('getPaymentStatus')) /** Specify return URL **/\n ->setCancelUrl(route('getPaymentFailed'));\n\n $payment = new Payment();\n $payment->setIntent('Sale')\n ->setPayer($payer)\n ->setRedirectUrls($redirect_urls)\n ->setTransactions(array($transaction));\n /** dd($payment->create($this->_api_context));exit; **/\n try {\n $payment->create($this->_api_context);\n } catch (\\PayPal\\Exception\\PPConnectionException $ex) {\n if (\\Config::get('app.debug')) {\n return back()->with('deleted', 'Connection timeout');\n /** echo \"Exception: \" . $ex->getMessage() . PHP_EOL; **/\n /** $err_data = json_decode($ex->getData(), true); **/\n /** exit; **/\n } else {\n return back()->with('deleted', 'Some error occur, sorry for inconvenient');\n /** die('Some error occur, sorry for inconvenient'); **/\n }\n }\n\n foreach($payment->getLinks() as $link) {\n if($link->getRel() == 'approval_url') {\n $redirect_url = $link->getHref();\n break;\n }\n }\n\n /** add payment ID to session **/\n Session::put('paypal_payment_id', $payment->getId());\n Session::put('plan', $plan);\n\n if(isset($redirect_url)) {\n /** redirect to paypal **/\n return redirect($redirect_url);\n }\n\n \treturn back()->with('deleted', 'Unknown error occurred');\n }",
"function PPHttpPost($methodName_, $nvpStr_) {\n\n\t\n\t\t// Set up your API credentials, PayPal end point, and API version.\n\t\t$API_UserName = urlencode('eshop_1309605309_biz_api1.gmail.com');\n\t\t$API_Password = urlencode('1309605353');\n\t\t$API_Signature = urlencode('AiPC9BjkCyDFQXbSkoZcgqH3hpacA4TlLrMdwUVOcGq8BK4tNk9Rdji5');\n\t\t$API_Endpoint = \"https://api-3t.sandbox.paypal.com/nvp\";\n\t\t\n\t\t$version = urlencode('51.0');\n\t\n\t\t// Set the curl parameters.\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, $API_Endpoint);\n\t\tcurl_setopt($ch, CURLOPT_VERBOSE, 1);\n\t\n\t\t// Turn off the server and peer verification (TrustManager Concept).\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);\n\t\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($ch, CURLOPT_POST, 1);\n\t\n\t\t// Set the API operation, version, and API signature in the request.\n\t\t$nvpreq = \"METHOD=$methodName_&VERSION=$version&PWD=$API_Password&USER=$API_UserName&SIGNATURE=$API_Signature$nvpStr_\";\n\t\n\t\t// Set the request as a POST FIELD for curl.\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $nvpreq);\n\t\n\t\t// Get response from the server.\n\t\t$httpResponse = curl_exec($ch);\n\t\n\t\tif(!$httpResponse) {\n\t\t\texit(\"$methodName_ failed: \".curl_error($ch).'('.curl_errno($ch).')');\n\t\t}\n\t\n\t\t// Extract the response details.\n\t\t$httpResponseAr = explode(\"&\", $httpResponse);\n\t\n\t\t$httpParsedResponseAr = array();\n\t\tforeach ($httpResponseAr as $i => $value) {\n\t\t\t$tmpAr = explode(\"=\", $value);\n\t\t\tif(sizeof($tmpAr) > 1) {\n\t\t\t\t$httpParsedResponseAr[$tmpAr[0]] = $tmpAr[1];\n\t\t\t}\n\t\t}\n\t\n\t\tif((0 == sizeof($httpParsedResponseAr)) || !array_key_exists('ACK', $httpParsedResponseAr)) {\n\t\t\texit(\"Invalid HTTP Response for POST request($nvpreq) to $API_Endpoint.\");\n\t\t}\n\t\n\t\treturn $httpParsedResponseAr;\n\t}",
"public function process_payment() {\n\n // Saves a suggestions group\n (new MidrubBasePaymentsCollectionBraintreeHelpers\\Process)->prepare();\n\n }",
"public function save_payments() {\n\t\tforminator_validate_ajax( \"forminator_save_payments_settings\" );\n\n\t\t// stripe\n\t\tif ( isset( $_POST['stripe-default-currency'] ) && ! empty( $_POST['stripe-default-currency'] ) ) {\n\t\t\t$default_currency = sanitize_text_field( $_POST['stripe-default-currency'] );\n\n\t\t\ttry {\n\t\t\t\t$stripe = new Forminator_Gateway_Stripe();\n\n\t\t\t\t$test_key = $stripe->get_test_key();\n\t\t\t\t$test_secret = $stripe->get_test_secret();\n\t\t\t\t$live_key = $stripe->get_live_key();\n\t\t\t\t$live_secret = $stripe->get_live_secret();\n\n\t\t\t\tForminator_Gateway_Stripe::store_settings(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'test_key' => $test_key,\n\t\t\t\t\t\t'test_secret' => $test_secret,\n\t\t\t\t\t\t'live_key' => $live_key,\n\t\t\t\t\t\t'live_secret' => $live_secret,\n\t\t\t\t\t\t'default_currency' => $default_currency,\n\t\t\t\t\t)\n\t\t\t\t);\n\n\n\t\t\t} catch ( Forminator_Gateway_Exception $e ) {\n\t\t\t\twp_send_json_error( $e->getMessage() );\n\t\t\t}\n\t\t}\n\n\t\t// paypal\n\t\tif ( isset( $_POST['paypal-default-currency'] ) && ! empty( $_POST['paypal-default-currency'] ) ) {\n\t\t\t$default_currency = sanitize_text_field( $_POST['paypal-default-currency'] );\n\n\t\t\ttry {\n\t\t\t\t$paypal = new Forminator_PayPal_Express();\n\n\t\t\t\t$sandbox_id = $paypal->get_sandbox_id();\n\t\t\t\t$sandbox_secret = $paypal->get_sandbox_secret();\n\t\t\t\t$live_id = $paypal->get_live_id();\n\t\t\t\t$live_secret = $paypal->get_live_secret();\n\n\t\t\t\tForminator_PayPal_Express::store_settings(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'sandbox_id' => $sandbox_id,\n\t\t\t\t\t\t'sandbox_secret' => $sandbox_secret,\n\t\t\t\t\t\t'live_id' => $live_id,\n\t\t\t\t\t\t'live_secret' => $live_secret,\n\t\t\t\t\t\t'currency' => $default_currency,\n\t\t\t\t\t)\n\t\t\t\t);\n\n\n\t\t\t} catch ( Forminator_Gateway_Exception $e ) {\n\t\t\t\twp_send_json_error( $e->getMessage() );\n\t\t\t}\n\t\t}\n\n\t\twp_send_json_success();\n\n\t}",
"public function index(){\n\n $token_is = $_POST['accessToken'];\n $paymentIDis = $_POST['paymentId'];\n $token_is;\n $paymentIDis;\n $executeURL= \"https://checkout.sandbox.bka.sh/v1.2.0-beta/checkout/payment/execute/\";\n $proxy = \"1vggbqd4hqk9g96o9rrrp2jftvek578v7d2bnerim12a87dbrrka\";\n //echo $proxy;\n $url22 = curl_init($executeURL.$paymentIDis);\n\n $header=array(\n 'Content-Type:application/json',\n 'authorization:'.$token_is, \n 'x-app-key:5tunt4masn6pv2hnvte1sb5n3j' \n ); \n \n curl_setopt($url22,CURLOPT_HTTPHEADER, $header);\n curl_setopt($url22, CURLOPT_TIMEOUT, 30);\n curl_setopt($url22, CURLOPT_CONNECTTIMEOUT, 30);\n curl_setopt($url22, CURLOPT_POST, 1 );\n curl_setopt($url22,CURLOPT_CUSTOMREQUEST, \"POST\");\n curl_setopt($url22,CURLOPT_RETURNTRANSFER, true);\n curl_setopt($url22, CURLOPT_VERBOSE, true);\n curl_setopt($url22,CURLOPT_FOLLOWLOCATION, 1);\n curl_setopt($url22, CURLOPT_SSL_VERIFYPEER, true); # KEEP IT FALSE IF YOU RUN FROM LOCAL PC\n // curl_setopt($url22, CURLOPT_PROXY, $proxy);\n\n $resultdatax=curl_exec($url22);\n\n\n $code = curl_getinfo($url22, CURLINFO_HTTP_CODE);\n $info = curl_getinfo($url22);\n var_dump($info);\n\n\n curl_close($url22);\n $data2 = json_decode($resultdatax);\n // print_r($code);\n \n\n }",
"public function receivingPayment()\n {\n $response = $this->client->request($this->methods['post'], \"sandbox\", [\n 'json' => [\n 'ENVIRONMENT' => $this->environment['sandbox'],\n 'VENDOR_ID' => $this->vendor_id,\n 'PAYMENT_ID' => $this->payment_id,\n 'PAYMENT_NAME' => $this->payment_name,\n 'AGR_TRANS_ID' => $this->agr_trans_id,\n 'MERCHANT_TRANS_ID' => $this->merchant_trans_id,\n 'MERCHANT_TRANS_AMOUNT' => $this->merchant_trans_amount,\n 'MERCHANT_TRANS_DATA' => $this->merchant_trans_data,\n 'SIGN_TIME' => $this->generateSignTime(),\n 'SIGN_STRING' => md5($this->SECRET_KEY .$this->agr_trans_id . $this->vendor_id.$this->payment_id. $this->payment_name. $this->merchant_trans_id. $this->merchant_trans_amount. $this->environment['live']. $this->sign_time),\n ]\n ]);\n\n return $response;\n }",
"public function makePayment() {\n\t\tLoggerRegistry::debug('CustomerModule::makePayment()');\n\t\t// TODO Payment gateway integration\n\t}",
"function _postPayment($data)\n {\n $vars = new JObject();\n //\n $order_id = $data['order_id'];\n JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_k2store/tables');\n $orderpayment = JTable::getInstance('Orders', 'Table');\n @$orderpayment->load(array('order_id' => $order_id));\n //\n try {\n if (!$orderpayment)\n throw new Exception('order_not_found');\n\n if ($data['Status'] != 'OK')\n throw new Exception('cancel_return', 1); // 1 == payment failed exception\n\n $MerchantID = $this->params->get('merchant_id');\n $Amount = $this->zarinpalAmount($orderpayment->get('orderpayment_amount'));\n $Authority = $data['Authority'];\n\n $verifyContext = compact('MerchantID', 'Amount', 'Authority');\n $verify = $this->zarinpalRequest('verification', $verifyContext);\n\n if (!$verify)\n throw new Exception('connection_error');\n\n $status = $verify->Status;\n if ($status != 100)\n throw new Exception('status_' . $status);\n\n // status == 100\n $RefID = $verify->RefID;\n\n $orderpayment->transaction_id = $RefID;\n $orderpayment->order_state = JText::_('K2STORE_CONFIRMED'); // CONFIRMED\n $orderpayment->order_state_id = 1; // CONFIRMED\n $orderpayment->transaction_status = 'Completed';\n\n $vars->RefID = $RefID;\n $vars->orderID = $order_id;\n $vars->id = $orderpayment->id;\n if ($orderpayment->save()) {\n JLoader::register('K2StoreHelperCart', JPATH_SITE . '/components/com_k2store/helpers/cart.php');\n // remove items from cart\n K2StoreHelperCart::removeOrderItems($order_id);\n\n // let us inform the user that the payment is successful\n require_once(JPATH_SITE . '/components/com_k2store/helpers/orders.php');\n try{\n @K2StoreOrdersHelper::sendUserEmail(\n $orderpayment->user_id,\n $orderpayment->order_id,\n $orderpayment->transaction_status,\n $orderpayment->order_state,\n $orderpayment->order_state_id\n );\n } catch (Exception $e) {\n // do nothing\n // prevent phpMailer exception\n }\n }\n } catch (Exception $e) {\n $orderpayment->order_state = JText::_('K2STORE_PENDING'); // PENDING\n $orderpayment->order_state_id = 4; // PENDING\n if ($e->getCode() == 1) { // 1 => trnsaction canceled\n $orderpayment->order_state = JText::_('K2STORE_FAILED'); // FAILED\n $orderpayment->order_state_id = 3; //FAILED\n }\n $orderpayment->transaction_status = 'Denied';\n $orderpayment->save();\n $vars->error = $this->zarinpalTranslate($e->getMessage());\n }\n\n $html = $this->_getLayout('postpayment', $vars);\n return $html;\n }",
"public function payment()\n {\n $total_price = number_format($_GET['price'],2);\n //get cart from session\n $cart = $_SESSION['shopping_cart'];\n\n\n //check if user is logged with userID else user send to log in\n if(isset($_SESSION['userID'])){\n\n //get userID from session\n $userId = $_SESSION['userID'];\n //API mollie payment setup\n $mollie = new MollieApiClient();\n $mollie->setApiKey('test_ajQEAHf8StBWg3dnW9VxWvcz26j5jh');\n $description = 'Payment for Haarlem Festival order' ;\n\n $payment = $mollie->payments->create([\n \"amount\" => [\n \"currency\" => \"EUR\",\n \"value\" => \"$total_price\",\n ],\n \"description\" => \"$description\",\n \"redirectUrl\" => \"http://localhost/PHP/HaarlemFestivalG4/carts/confirmationPage\",\n \"webhookUrl\" => \"\",\n \"metadata\" => \"\",\n ]);\n\n\n\n\n //set status $payment->status only returns open and api wont continue unless paid is selected\n $statusPay = \"paid\";\n //sends information to payment model\n $this->paymentModel->createOrder($statusPay,$userId,$total_price);\n\n //get the orderID from model\n $id= $this->paymentModel->getOrderId();\n //makes ID readable\n $data = $id->orderID;\n //make a session for orderID so it can be fetched from another page\n $_SESSION['orderID']= $data;\n\n //continue with payment\n header('location: '.$payment->getCheckoutUrl(), true, 303);\n\n\n //sends every item in order to orderItems in the db\n foreach ($cart as $item){\n $quantity = $item[\"quantity\"];\n $eventID = $item[\"event_id\"];\n $price = $item[\"price\"];\n\n //because the database was not created according to the schema we had made 2 different tables had to be created thus the different methods\n //each ticket has a type and the statement underneath checks whether the type is either Dance or otherwise (History)\n if($item[\"type\"]==\"Dance\"){\n //get the ticket based on dance\n $result = $this->paymentModel->searchDanceTicket($eventID,$price);\n\n }\n else{\n //get ticket based on history\n $result = $this->paymentModel->searchHistoryTicket($eventID,$price);\n }\n //sets tickID\n $tickID = $result->ticketID;\n //sends the ticket to orderItem\n $this->paymentModel->addOrderItem($data,$tickID,$quantity);\n }\n //clears shopping cart session after payment\n $data='';\n unset($_SESSION['shopping_cart']);\n\n $this->view('payments/index',$data);\n\n\n }\n else{\n //when the user is directed to the login page when not logged in\n $data = [\n 'email'=> '',\n 'password' => '',\n 'emailError' => '',\n 'passwordError' => ''\n ];\n $this->view('/users/login',$data);\n }\n\n\n\n }",
"public function buy(){\n\n $id=89025555; //id di connessione\n $password=\"test\"; //password di connessione\n\n //è necessario foramttare il totale in NNNNNN.NN\n $importo= number_format(StadiumCart::total(),2,'.','');//importo da pagare\n\n $trackid=\"STDRX\".time(); //id transazione\n\n $urlpositivo=\"http://stadium.reexon.net/cart/receipt\";\n $urlnegativo=\"http://stadium.reexon.net/cart/error\";\n $codicemoneta=\"978\"; //euro\n //prelevo i dati inseriti durante la fase acquisto\n $user = (object)Session::get('user');\n\n $data=\"id=$id\n &password=$password\n &action=4\n &langid=ITA\n ¤cycode=$codicemoneta\n &amt=$importo\n &responseURL=$urlpositivo\n &errorURL=$urlnegativo\n &trackid=$trackid\n &udf1=\".$user->email.\"\n &udf2=\".$user->mobile.\"\n &udf3=\".$user->firstname.\"\n &udf4=\".$user->lastname.\"\n &udf5=EE\";\n $curl_handle=curl_init();\n //curl_setopt($curl_handle,CURLOPT_URL,'https://www.constriv.com:443/cg/servlet/PaymentInitHTTPServlet');\n curl_setopt($curl_handle,CURLOPT_URL,'https://test4.constriv.com/cg301/servlet/PaymentInitHTTPServlet');\n curl_setopt($curl_handle, CURLOPT_VERBOSE, true);\n curl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT,5);\n curl_setopt($curl_handle,CURLOPT_RETURNTRANSFER,1);\n curl_setopt($curl_handle, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($curl_handle, CURLOPT_POST, 1);\n curl_setopt($curl_handle, CURLOPT_POSTFIELDS, $data);\n $buffer = curl_exec($curl_handle);\n\n if (empty($buffer))\n {\n return curl_error($curl_handle);\n }\n else\n {\n //print $buffer;\n $url=explode(\":\",$buffer);\n $transaction_id=$url[0];\n curl_close($curl_handle);\n //prepara il link per il pagamento\n if(strlen($transaction_id)>0){\n $redirectURL = $url[1].\":\".$url[2].\"?PaymentID=$transaction_id\";\n echo \"<meta http-equiv=\\\"refresh\\\" content=\\\"0;URL=$redirectURL\\\">\";\n }\n }\n\n }",
"public function execute(){\n return $this->payment(); \n }",
"function PPHttpPost($methodName_, $nvpStr_, $PayPalApiUsername, $PayPalApiPassword, $PayPalApiSignature, $PayPalMode) {\n $API_UserName = urlencode($PayPalApiUsername);\n $API_Password = urlencode($PayPalApiPassword);\n $API_Signature = urlencode($PayPalApiSignature);\n\n $paypalmode = ($PayPalMode == 'sandbox') ? '.sandbox' : '';\n\n $API_Endpoint = \"https://api-3t\" . $paypalmode . \".paypal.com/nvp\";\n $version = urlencode('109.0');\n\n // Set the curl parameters.\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $API_Endpoint);\n curl_setopt($ch, CURLOPT_VERBOSE, 1);\n\n // Turn off the server and peer verification (TrustManager Concept).\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);\n\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_POST, 1);\n\n // Set the API operation, version, and API signature in the request.\n $nvpreq = \"METHOD=$methodName_&VERSION=$version&PWD=$API_Password&USER=$API_UserName&SIGNATURE=$API_Signature$nvpStr_\";\n\n // Set the request as a POST FIELD for curl.\n curl_setopt($ch, CURLOPT_POSTFIELDS, $nvpreq);\n\n // Get response from the server.\n $httpResponse = curl_exec($ch);\n\n if (!$httpResponse) {\n exit(\"$methodName_ failed: \" . curl_error($ch) . '(' . curl_errno($ch) . ')');\n }\n\n // Extract the response details.\n $httpResponseAr = explode(\"&\", $httpResponse);\n\n $httpParsedResponseAr = array();\n foreach ($httpResponseAr as $i => $value) {\n $tmpAr = explode(\"=\", $value);\n if (sizeof($tmpAr) > 1) {\n $httpParsedResponseAr[$tmpAr[0]] = $tmpAr[1];\n }\n }\n\n if ((0 == sizeof($httpParsedResponseAr)) || !array_key_exists('ACK', $httpParsedResponseAr)) {\n exit(\"Invalid HTTP Response for POST request($nvpreq) to $API_Endpoint.\");\n }\n\n return $httpParsedResponseAr;\n }",
"public function setClassPaymentByInstructor_post()\n {\n /* code goes here */\n }",
"function PPHttpPost($methodName_, $nvpStr_) {\n $submit_data = array(\n\t\t'METHOD' => $methodName_,\n\t\t'VERSION' => '52.0',\n\t\t'PWD' => MODULE_PAYMENT_PAYPAL_NVP_PW,\n\t\t'USER' => MODULE_PAYMENT_PAYPAL_NVP_USER_ID,\n\t\t'SIGNATURE' => MODULE_PAYMENT_PAYPAL_NVP_SIG,\n\t\t'IPADDRESS' => get_ip_address(),\n\t);\n\n\t$data = ''; // initiate XML string\n while(list($key, $value) = each($submit_data)) {\n \tif ($value <> '') $data .= '&' . $key . '=' . urlencode($value);\n }\n\t$data .= substr($data, 1) . $nvpStr_; // build the submit string\n\n\tif(\"sandbox\" === MODULE_PAYMENT_PAYPAL_NVP_TESTMODE || \"beta-sandbox\" === MODULE_PAYMENT_PAYPAL_NVP_TESTMODE) {\n\t\t$API_Endpoint = MODULE_PAYMENT_PAYPAL_NVP_SANDBOX_SIG_URL;\n\t} else {\n\t\t$API_Endpoint = MODULE_PAYMENT_PAYPAL_NVP_LIVE_SIG_URL;\n\t}\n\t// Set the curl parameters.\n\t$ch = curl_init();\n\tcurl_setopt($ch, CURLOPT_URL, $API_Endpoint);\n\tcurl_setopt($ch, CURLOPT_VERBOSE, 1);\n\t// Turn off the server and peer verification (TrustManager Concept).\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\tcurl_setopt($ch, CURLOPT_POST, 1);\n\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n//echo 'string = ' . $data . '<br>';\n\t$httpResponse = curl_exec($ch);\n\n\tif(!$httpResponse) {\n\t\t$messageStack->add('XML Read Error (cURL) #' . curl_errno($ch) . '. Description = ' . curl_error($ch),'error');\n\t\treturn false;\n//\t\texit(\"$methodName_ failed: \" . curl_error($ch) . '(' . curl_errno($ch) . ')');\n\t}\n\t// Extract the response details.\n\t$httpResponseAr = explode(\"&\", $httpResponse);\n\t$httpParsedResponseAr = array();\n\tforeach ($httpResponseAr as $i => $value) {\n\t\t$tmpAr = explode(\"=\", $value);\n\t\tif(sizeof($tmpAr) > 1) {\n\t\t\t$httpParsedResponseAr[$tmpAr[0]] = $tmpAr[1];\n\t\t}\n\t}\n\tif (0 == sizeof($httpParsedResponseAr) || !array_key_exists('ACK', $httpParsedResponseAr)) {\n\t\t$messageStack->add('PayPal Response Error.','error');\n\t\treturn false;\n//\t\texit(\"Invalid HTTP Response for POST request($nvpreq) to $API_Endpoint.\");\n\t}\n\treturn $httpParsedResponseAr;\n }",
"public function run()\n {\n $payinfo = $this->request->post('payinfo');\n\n try{\n $postdata = Json::decode(CryptHelper::authcode($payinfo, 'DECODE', env('WECHAT_APP_KEY')));\n } catch(\\Exception $e){\n FileLogHelper::xlog($e->getMessage(), 'payment');\n } finally{\n if(!$postdata){\n $postdata = [\n 'uid' => -1\n ];\n }\n }\n\n if($postdata['uid'] != $this->account['uid']){\n return MessageHelper::error('对不起,您提交的订单不是由您自己创建的', [gHomeUrl()]);\n }\n\n if(OrderList::findBySource($postdata['source_type'], $postdata['source_uuid'])){\n // return MessageHelper::error('订单已成功提交,请不要重复提交');\n }\n\n if($postdata['total_fee'] <= 0){//代表全是免费的,直接入库\n $trans = \\Yii::$app->db->beginTransaction();\n $order = OrderList::create($postdata);\n if($order->hasErrors()){\n FileLogHelper::xlog(['order' => $postdata, 'order-error' => $order->getErrors()], 'payment/error');\n $trans->rollBack();\n return MessageHelper::error('订单提交失败,请检查后重新提交,如多次失败,请联系管理员');\n }\n $detailErrors = OrderList::createOrderDetail($order['uuid'], Json::decode($postdata['goods_list']));\n if($detailErrors){\n $trans->rollBack();\n FileLogHelper::xlog(['order' => $postdata, 'order-detail-error' => $detailErrors], 'payment/error');\n return MessageHelper::error('订单提交失败,请检查后重新提交,如多次失败,请联系管理员');\n }\n $trans->commit();\n return MessageHelper::success('订单提交成功', [gHomeUrl()]);\n }\n //开始接入支付\n $sHtml = \"<form id='payForm' name='payForm' action='\" . env('WECHAT_PAY_URL') . \"' method='post'>\";\n $sHtml .= \"<input type='hidden' name='json_payinfo' value='{$payinfo}' /></form>\";\n $sHtml = $sHtml . \"<script>document.forms['payForm'].submit();</script>\";\n return $sHtml;\n }",
"function storePayment($agent_id,$month,$amount){\n \n\n if(request()->status == 0){\n\n $user = User::where([['userable_id', $agent_id],['role_id', env('AGENT')]] )\n ->first();\n\n $invoice = env('IRS_CODE').date('Ymd').$user->userable_id.random_int(0,9).strtotime(date('Ymdhsi',time()));\n\n $remittance = Remittance::create([\n 'agent_id'=> $user->userable_id,\n 'lga_id'=> $user->lga_id,\n 'amount'=> $amount,\n 'month'=> $month,\n 'payment_type'=> 'bank',\n 'transaction_reference'=> request()->reference,\n 'invoice'=> $invoice,\n 'mac_id'=> request()->ip()\n ]);\n\n\n return redirect( env('APP_URL').'/home#/remittance')->with('message', request()->reference.' has initialized!');\n\n\n }\n else if(request()->status == 1){\n\n \n DB::beginTransaction();\n try {\n\n $remits = Remittance::where('transaction_reference', request()->reference )->firstorFail();\n\n if($remits->status == 'success' )\n {\n return response()->json([\n 'status' => 'error',\n 'message' => 'transaction has updated before'\n ]);\n }\n \n//\n// $remit->update([\n// 'status' => 'success',\n// 'mac_id'=> request()->ip()\n// ]);\n\n $res = '';\n $curl = curl_init();\n\n $reference= request()->reference;\n $type='bank';\n $string = $reference.$type; //concatenate these values\n $mac = env('MAC_KEY');\n $hash = hash_hmac('sha512',$string,$mac, false);\n \t$token = env('MONETA_TOKEN');\n\n\n curl_setopt_array($curl, array(\n CURLOPT_URL => env('MONETA_URL').\"/transaction/verify/bank/\".$reference.\"?hash=\".$hash,\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 0,\n CURLOPT_FOLLOWLOCATION => true,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"GET\",\n CURLOPT_HTTPHEADER => array(\n \"Authorization: Bearer $token\",\n \t\t\t\t\t\t \"Accept: application/json\"\n ),\n ));\n \n\n $response = curl_exec($curl);\n\n $err = curl_error($curl);\n curl_close($curl);\n \n if ($err) {\n return response()->json([\n 'status' => 'error',\n 'message' => 'error occurred!'\n ]);\n\n }\n\n $result = json_decode($response, true);\n\n\n if($result['status'] == 'success'){\n\n $payment_date = $result['customer']['updated_at'];\n if($result['customer']['Status'] == 1){\n\n $bank = $result['transaction']['BankName'].' '.$result['transaction']['BranchName'];\n\n\n $unremitObj = UnremittedCash::where([['agent_id', $remits->agent_id],['month',$remits->month]]);\n\n $unremitObj->decrement('amount', $result['customer']['AmountDue']);\n\n $unremit = $unremitObj->first();\n\n // $remittance->update(['invoice_id'=>$unremit->invoice_id]);\n\n $remits->status = 'success';\n $remits->mac_id = request()->ip();\n $remits->timestamps = false;\n $remits->bank = $bank;\n $remits->updated_at = date(\"Y-m-d H:i:s\", strtotime($payment_date));\n $remits->invoice_id = $unremit->invoice_id;\n $res = $remits->save();\n\n // set invoice id of unremitted to empty\n $unremitObj->update(['invoice_id'=>'']);\n//\n// if($response)\n// echo 'success';\n// else\n// echo 'failed';\n\n\n\n } else {\n\n return response()->json([\n 'status' => 'error',\n 'message' => 'Unpaid transaction reference.'\n ]);\n }\n\n } else {\n return response()->json([\n 'status' => 'error',\n 'message' => $result['message']\n ]);\n\n\n }\n\n\n\n\n DB::commit();\n //return 'success';\n if($res)\n return 'success';\n else \n return 'failed';\n\n\n }\n catch(\\Exception $ex){\n\n if (isset($ex->errorInfo[2])) {\n $msg = $ex->errorInfo[2];\n } else {\n $msg = $ex->getMessage();\n }\n\n // rollback operation for failure\n DB::rollback();\n\n // return $msg;\n return response()->json([\n 'status' => 'error',\n 'data' => $msg\n ]);\n\n }\n\n\n\n\n }\n\n\n }",
"public function pay_action ()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$order_id = $_GET['osc_order_id'];\n\n\t\t\t$payment = self::get_api()->payments->create(array(\n\t\t\t\t\"amount\" => $this->get_order_total($order_id),\n\t\t\t\t\"method\" => isset($_GET['method']) ? $_GET['method'] : NULL,\n\t\t\t\t\"description\" => MODULE_PAYMENT_MOLLIE_PAYMENT_DESCRIPTION . \" \" . $order_id,\n\t\t\t\t\"redirectUrl\" => $this->get_return_url($order_id),\n\t\t\t\t\"metadata\" => array(\"order_id\" => $order_id),\n\t\t\t\t\"webhookUrl\" => $this->get_webhook_url($order_id),\n\t\t\t\t\"issuer\" => !empty($_GET['issuer']) ? $_GET['issuer'] : NULL\n\t\t\t));\n\n\t\t\t$this->log($payment->id, $payment->status, $order_id);\n\n\t\t\theader(\"Location: \" . $payment->getPaymentUrl());\n\t\t}\n\t\tcatch (Mollie_API_Exception $e)\n\t\t{\n\t\t\techo \"API call failed: \" . htmlspecialchars($e->getMessage());\n\t\t}\n\t}",
"public function callback(Request $post){\n //$data = json_encode($post->all()).PHP_EOL;\n //file_put_contents($filename, $data, FILE_APPEND | LOCK_EX);\n Payment::callback($post->all());\n }",
"public function callback(){\n $data = Rave::verifyTransaction(request()->txref);\n dd($data); // view the data response\n if ($data->status == 'success') {\n if(session()->get($this->requestVar)['']['page_type'] == 'cart'){\n $cartCollection = Cart::getContent();\n $payer = new Payer();\n $payer->setPaymentMethod('flutterwave');\n \n $item_1 = new Item();\n \n $item_1->setName(__('messages.site_name')) \n ->setCurrency('USD')\n ->setQuantity(1)\n ->setPrice($request->get('total_price_pal')); \n \n $item_list = new ItemList();\n $item_list->setItems(array($item_1));\n \n $amount = new Amount();\n $amount->setCurrency('USD')\n ->setTotal($request->get('total_price_pal'));\n \n $transaction = new Transaction();\n $transaction->setAmount($amount)\n ->setItemList($item_list)\n ->setDescription('Your transaction description');\n \n $redirect_urls = new RedirectUrls();\n $redirect_urls->setReturnUrl(URL::route('status')) \n ->setCancelUrl(URL::route('status'));\n \n $payment = new Payment();\n $payment->setIntent('Sale')\n ->setPayer($payer)\n ->setRedirectUrls($redirect_urls)\n ->setTransactions(array($transaction));\n try {\n $payment->create($this->_api_context);\n } catch (\\PayPal\\Exception\\PPConnectionException $ex) {\n if (\\Config::get('app.debug')) {\n \\Session::put('error',__('successerr.connection_timeout'));\n return Redirect::route('paywithpaypal');\n \n } else {\n \\Session::put('error',__('successerr.error1'));\n return Redirect::route('paywithpaypal');\n \n }\n }\n \n foreach($payment->getLinks() as $link) {\n if($link->getRel() == 'approval_url') {\n $redirect_url = $link->getHref();\n $data=array();\n $finalresult=array();\n $result=array();\n $input = $request->input();\n $cartCollection = Cart::getContent();\n $setting=Setting::find(1);\n $gettimezone=$this->gettimezonename($setting->timezone);\n date_default_timezone_set($gettimezone);\n $date = date('d-m-Y H:i');\n $getuser=AppUser::find(Session::get('login_user'));\n $store=new Order();\n $store->user_id=$getuser->id;\n \n $store->total_price=number_format($request->get(\"total_price_pal\"), 2, '.', '');\n $store->order_placed_date=$date;\n $store->order_status=0;\n \n $store->latlong= strip_tags(preg_replace('#<script(.*?)>(.*?)</script>#is', '',$request->get(\"lat_long_or\")));\n $store->name=$getuser->name;\n \n $store->address=strip_tags(preg_replace('#<script(.*?)>(.*?)</script>#is', '',$request->get(\"address_pal\")));\n $store->email=$getuser->email;\n \n $store->payment_type= strip_tags(preg_replace('#<script(.*?)>(.*?)</script>#is', '',$request->get(\"payment_type_pal\")));\n \n $store->notes=strip_tags(preg_replace('#<script(.*?)>(.*?)</script>#is', '',$request->get(\"note_or\")));\n \n $store->city= strip_tags(preg_replace('#<script(.*?)>(.*?)</script>#is', '',$request->get(\"city_or\")));\n \n $store->shipping_type= strip_tags(preg_replace('#<script(.*?)>(.*?)</script>#is', '',$request->get(\"shipping_type_pal\")));\n \n $store->subtotal=number_format($request->get(\"subtotal_pal\"), 2, '.', '');\n \n $store->delivery_charges=number_format($request->get(\"charage_pal\"), 2, '.', '');\n \n $store->phone_no= strip_tags(preg_replace('#<script(.*?)>(.*?)</script>#is', '',$request->get(\"phone_pal\")));\n $store->pay_pal_paymentId=$payment->getId();\n $store->delivery_mode=$store->shipping_type;\n $store->notify=1;\n $store->save();\n foreach ($cartCollection as $ke) {\n $getmenu=itemli::where(\"menu_name\",$ke->name)->first();\n $result['ItemId']=(string)isset($getmenu->id)?$getmenu->id:0;\n $result['ItemName']=(string)$ke->name;\n $result['ItemQty']=(string)$ke->quantity;\n $result['ItemAmt']=number_format($ke->price, 2, '.', '');\n $totalamount=(float)$ke->quantity*(float)$ke->price;\n $result['ItemTotalPrice']=number_format($totalamount, 2, '.', '');\n $ingredient=array();\n $inter_ids=array();\n foreach ($ke->attributes[0] as $val) {\n $ls=array();\n $inter=Ingredient::find($val);\n $ls['id']=(string)$inter->id;\n $inter_ids[]=$inter->id;\n $ls['category']=(string)$inter->category;\n $ls['item_name']=(string)$inter->item_name;\n $ls['type']=(string)$inter->type;\n $ls['price']=(string)$inter->price;\n $ls['menu_id']=(string)$inter->menu_id;\n $ingredient[]=$ls;\n }\n \n $result['Ingredients']=$ingredient;\n $finalresult[]=$result;\n $adddesc=new OrderResponse();\n $adddesc->set_order_id=$store->id;\n $adddesc->item_id=$result[\"ItemId\"];\n $adddesc->item_qty=$result[\"ItemQty\"];\n $adddesc->ItemTotalPrice=number_format($result[\"ItemTotalPrice\"], 2, '.', '');\n $adddesc->item_amt=$result[\"ItemAmt\"];\n $adddesc->ingredients_id=implode(\",\",$inter_ids);\n $adddesc->save();\n }\n $data=array(\"Order\"=>$finalresult);\n $addresponse=new FoodOrder();\n $addresponse->order_id=$store->id;\n $addresponse->desc=json_encode($data);\n $addresponse->save();\n \n break;\n }\n }\n \n } \n \n \n \n //Payment from basket checkout page\n \n if(session()->get($this->requestVar)['']['page_type'] == 'basket'){\n $cartCollection = Cart::getContent();\n $payer = new Payer();\n $payer->setPaymentMethod('flutterwave');\n \n $item_1 = new Item();\n \n $item_1->setName(__('messages.site_name')) \n ->setCurrency('USD')\n ->setQuantity(1)\n ->setPrice($request->get('total_price_pal')); \n \n $item_list = new ItemList();\n $item_list->setItems(array($item_1));\n \n $amount = new Amount();\n $amount->setCurrency('USD')\n ->setTotal($request->get('total_price_pal'));\n \n $transaction = new Transaction();\n $transaction->setAmount($amount)\n ->setItemList($item_list)\n ->setDescription('Your transaction description');\n \n $redirect_urls = new RedirectUrls();\n $redirect_urls->setReturnUrl(URL::route('status')) \n ->setCancelUrl(URL::route('status'));\n \n $payment = new Payment();\n $payment->setIntent('Sale')\n ->setPayer($payer)\n ->setRedirectUrls($redirect_urls)\n ->setTransactions(array($transaction));\n try {\n $payment->create($this->_api_context);\n } catch (\\PayPal\\Exception\\PPConnectionException $ex) {\n if (\\Config::get('app.debug')) {\n \\Session::put('error',__('successerr.connection_timeout'));\n return Redirect::route('paywithpaypal');\n \n } else {\n \\Session::put('error',__('successerr.error1'));\n return Redirect::route('paywithpaypal');\n \n }\n }\n \n foreach($payment->getLinks() as $link) {\n if($link->getRel() == 'approval_url') {\n $redirect_url = $link->getHref();\n $data=array();\n $finalresult=array();\n $result=array();\n $input = $request->input();\n $cartCollection = Cart::getContent();\n $setting=Setting::find(1);\n $gettimezone=$this->gettimezonename($setting->timezone);\n date_default_timezone_set($gettimezone);\n $date = date('d-m-Y H:i');\n $getuser=AppUser::find(Session::get('login_user'));\n $store=new Order();\n $store->user_id=$getuser->id;\n \n $store->total_price=number_format($request->get(\"total_price_pal\"), 2, '.', '');\n $store->order_placed_date=$date;\n $store->order_status=0;\n \n $store->latlong= strip_tags(preg_replace('#<script(.*?)>(.*?)</script>#is', '',$request->get(\"lat_long_or\")));\n $store->name=$getuser->name;\n \n $store->address=strip_tags(preg_replace('#<script(.*?)>(.*?)</script>#is', '',$request->get(\"address_pal\")));\n $store->email=$getuser->email;\n \n $store->payment_type= strip_tags(preg_replace('#<script(.*?)>(.*?)</script>#is', '',$request->get(\"payment_type_pal\")));\n \n $store->notes=strip_tags(preg_replace('#<script(.*?)>(.*?)</script>#is', '',$request->get(\"note_or\")));\n \n $store->city= strip_tags(preg_replace('#<script(.*?)>(.*?)</script>#is', '',$request->get(\"city_or\")));\n \n $store->shipping_type= strip_tags(preg_replace('#<script(.*?)>(.*?)</script>#is', '',$request->get(\"shipping_type_pal\")));\n \n $store->subtotal=number_format($request->get(\"subtotal_pal\"), 2, '.', '');\n \n $store->delivery_charges=number_format($request->get(\"charage_pal\"), 2, '.', '');\n \n $store->phone_no= strip_tags(preg_replace('#<script(.*?)>(.*?)</script>#is', '',$request->get(\"phone_pal\")));\n $store->pay_pal_paymentId=$payment->getId();\n $store->delivery_mode=$store->shipping_type;\n $store->notify=1;\n $store->save();\n foreach ($cartCollection as $ke) {\n $getmenu=itemli::where(\"menu_name\",$ke->name)->first();\n $result['ItemId']=(string)isset($getmenu->id)?$getmenu->id:0;\n $result['ItemName']=(string)$ke->name;\n $result['ItemQty']=(string)$ke->quantity;\n $result['ItemAmt']=number_format($ke->price, 2, '.', '');\n $totalamount=(float)$ke->quantity*(float)$ke->price;\n $result['ItemTotalPrice']=number_format($totalamount, 2, '.', '');\n $ingredient=array();\n $inter_ids=array();\n foreach ($ke->attributes[0] as $val) {\n $ls=array();\n $inter=Ingredient::find($val);\n $ls['id']=(string)$inter->id;\n $inter_ids[]=$inter->id;\n $ls['category']=(string)$inter->category;\n $ls['item_name']=(string)$inter->item_name;\n $ls['type']=(string)$inter->type;\n $ls['price']=(string)$inter->price;\n $ls['menu_id']=(string)$inter->menu_id;\n $ingredient[]=$ls;\n }\n \n $result['Ingredients']=$ingredient;\n $finalresult[]=$result;\n $adddesc=new OrderResponse();\n $adddesc->set_order_id=$store->id;\n $adddesc->item_id=$result[\"ItemId\"];\n $adddesc->item_qty=$result[\"ItemQty\"];\n $adddesc->ItemTotalPrice=number_format($result[\"ItemTotalPrice\"], 2, '.', '');\n $adddesc->item_amt=$result[\"ItemAmt\"];\n $adddesc->ingredients_id=implode(\",\",$inter_ids);\n $adddesc->save();\n }\n $data=array(\"Order\"=>$finalresult);\n $addresponse=new FoodOrder();\n $addresponse->order_id=$store->id;\n $addresponse->desc=json_encode($data);\n $addresponse->save();\n \n break;\n }\n }\n \n \n }\n \n }\n }",
"public function pay();",
"public static function payment_wp() {\n\t\theader('Content-Type: application/json');\n\t\tglobal $acc;\n\t\t$user_signon = null;\n\n\t\t$response = array(\n\t\t\t'success' => false,\n\t\t\t'r_approved' => '',\n\t\t\t'id' => '',\n\t\t\t'r_ref' => '',\n\t\t\t'length' => '',\n\t\t\t'membertype' => '',\n\t\t\t'name' => '',\n\t\t\t'price' => '',\n\t\t\t'cardnum' => '',\n\t\t\t'cardtype' => '',\n\t\t\t'message' => '',\n\t\t);\n\n\t\t$trial = null;\n\t\tif ( ! empty( $_POST['trialid'] ) ) {\n\t\t\t$trial = \\WPSF\\TrialCode::get_code( $_POST['trialid'] );\n\t\t\tif ( empty( $trial ) || is_wp_error( $trial ) ) {\n\t\t\t\t$trial = null;\n\t\t\t} else {\n\t\t\t\t$trial = $trial[0];\n\t\t\t}\n\t\t}\n\n\t\t$acct_type = 'Membership';\n\t\tif ( ! empty( $trial['Id'] ) ) {\n\t\t\tif ( $trial['Type'] == 'Trial' ) {\n\t\t\t\t$acc_type = 'Trial Membership';\n\t\t\t} else if ( floatval( $trial['Amount'] ) <= 0 ) {\n\t\t\t\t$acc_type = 'Complementary Membership';\n\t\t\t}\n\t\t}\n\n\t\tif ( $_POST['mode'] != 'update' ) {\n\t\t\t// We are creating new.\n\t\t\t$id = self::create_wp_account();\n\t\t\tif ( is_wp_error( $id ) ) {\n\t\t\t\tprint json_encode(array(\n\t\t\t\t\t'error' => 'WP user creation failure.',\n\t\t\t\t\t'messages' => $id->get_error_messages(),\n\t\t\t\t));\n\t\t\t\tself::slack( 'AJAX Create: Error creating WordPress user account.', 'error' );\n\t\t\t\texit();\n\t\t\t}\n\n\t\t\t$aid = self::create_sf_account( $id, $trial );\n\n\t\t\tif ( is_wp_error( $aid ) ) {\n\t\t\t\twp_delete_user( $id );\n\t\t\t\tprint json_encode(array(\n\t\t\t\t\t'error'=>'Account creation failure.',\n\t\t\t\t\t'messages' => $aid->get_error_messages(),\n\t\t\t\t));\n\t\t\t\tself::slack( 'AJAX Create: Error creating Salesforce account.', 'error' );\n\t\t\t\texit();\n\t\t\t}\n\t\t\t$account = new \\WPSF\\Account( $aid );\n\t\t\t$cid = $account['Contacts__x'][0]['Id'];\n\n/*\n\t\t\t$account['recordTypeInfos'][0] = array(\n\t\t\t\t'available' => true,\n\t\t\t\t'defaultRecordTypeMapping' => true,\n\t\t\t\t'name' => 'Member',\n\t\t\t\t'recordTypeId' => '0121a0000001qM1AAI'\n\t\t\t);\n*/\n\n//\t\t\t$account['recordTypeId'] = '0121a0000001qM1AAI';\n\n\t\t\t/** I HATE WORKAROUNDS LIKE THIS. Just let me save via the name dammit. **/\n\t\t\tglobal $wpsf_acf_fields;\n\t\t\tupdate_field( $wpsf_acf_fields['wpsf_contactid'], $cid, 'user_'.$id );\n\n\t\t\t$user_signon = wp_signon(array(\n\t\t\t\t'user_login' => $_POST['username'],\n\t\t\t\t'user_password' => $_POST['password'],\n\t\t\t\t'remember' => true,\n\t\t\t));\n\t\t\twp_set_current_user( $id );\n\n\t\t} else {\n\t\t\t// We are updating an existing account.\n\t\t\t// I'm not sure we ever get here with the current logic, but it's here just in case.\n\t\t\t$account = \\WPSF\\Contact::get_account_wp();\n\n\t\t\tif ( ! empty( $_POST['cc_num'] ) && ( strpos( $_POST['cc_num'], '*' ) !== false ) ) {\n\t\t\t\t// We're updating card info too. Do that first.\n\t\t\t\t$account['Credit_Card_Number__c'] = $_POST['cc_num'];\n\t\t\t\t$account['Credit_Card_Month__c'] = $_POST['cc_mon'];\n\t\t\t\t$account['Credit_Card_Year__c'] = $_POST['cc_yr'];\n\t\t\t\t$account['Card_CVV_Number__c'] = $_POST['cc_cvv'];\n\t\t\t\t$account['Credit_Card_Type__c'] = self::$cc_types[$_POST['cc_type']];\n\t\t\t}\n\n\t\t\t$acct_type = 'Renewal';\n\n\t\t\tif ( ! empty( $_POST['l'] ) ) {\n\t\t\t\tif ( ( $_POST['l'] != $account['Membership__c'] ) && $account->is_active() ) {\n\t\t\t\t\t$acct_type = 'Upgrade';\n\t\t\t\t\t$account['Membership_Old__c'] = $account['Membership__c'];\n\t\t\t\t}\n\t\t\t\t$account['Membership__c'] = $_POST['l'];\n\t\t\t}\n\n\t\t\t$account->update();\n\t\t}\n\n\t\t$charge = \\WPSF\\Payment::charge_account( $aid, $acct_type );\n\n\t\t$account = new \\WPSF\\Account( $aid );\n\t\t$revert = false;\n\n\t\tif ( is_wp_error( $charge ) ) {\n\t\t\t$response['message'] = 'Error occurred during processing: '.$charge->get_error_message();\n\t\t\t$response['success'] = false;\n\t\t\t$revert = true;\n\n\t\t} else if ( $charge instanceof \\WPSF\\Payment ) {\n\t\t\t// Well, the charge made it through the system. Time to see what's in it.\n\t\t\tif ( is_wp_error( $charge->last_error ) ) {\n\t\t\t\t// If the last thing was an error, return that.\n\t\t\t\t$reponse['message'] = 'Error occurred during processing. '.$charge->get_error_message();\n\t\t\t\t$response['success'] = false;\n\t\t\t\t$revert = true;\n\t\t\t} else {\n\t\t\t\t$new_response = $charge->toResult();\n\t\t\t\t$response = array_merge( $response, $new_response );\n\t\t\t\tif ( empty( $response['success'] ) ) {\n\t\t\t\t\t$revert = true;\n\t\t\t\t}\n\n\t\t\t}\n\t\t} else if ( $charge === true ) {\n\t\t\t// Well, the charge made it through the system but returned an account.\n\t\t\t$response['success'] = true;\n\n\t\t\tif ( ! empty( $account['Membership__x']['Period__c'] ) ) {\n\t\t\t\t$response['length'] = $account['Membership__x']['Period__c'];\n\t\t\t}\n\n\t\t\tif ( ! empty( $account['Membership__x']['Membership_Type__c'] ) ) {\n\t\t\t\t$response['membertype'] = $account['Membership__x']['Membership_Type__c'];\n\t\t\t}\n\n\t\t\tif ( ! empty( $account['Membership__x']['Name'] ) ) {\n\t\t\t\t$response['name'] = $account['Membership__x']['Name'];\n\t\t\t}\n\n\t\t} else {\n\t\t\t$response['success'] = false;\n\t\t\t$response['message'] = print_r( $charge, true );\n\t\t\t$revert = true;\n\n\t\t}\n\n\t\tif ( $revert && ! empty( $account['Membership_Old__c'] ) ) {\n\t\t\t$account['Membership__c'] = $account['Membership_Old__c'];\n\t\t} else {\n\t\t\t$account['Membership_Status__c'] = $account->picklistValue( 'Membership_Status__c', 'Active' );\n\t\t}\n\t\t$account['Membership_Old__c'] = '';\n\t\tif ( ! empty( $trial[\"Name\"] ) && ! empty( $trial[\"Gift_Credit__c\"] ) ) {\n\t\t\t$account[\"Gift_Balance__c\"] = $trial[\"Gift_Credit__c\"];\n\t\t\t$account[\"Gifted_From__c\"] = $trial[\"Name\"];\n\t\t}\n\t\t$account->update();\n\n\t\t// Do this so we reduce the log output on initial creation\n\t\tglobal $WPSF_NewUserProcessing;\n\t\t$WPSF_NewUserProcessing = true;\n\t\twpsf_apply_roles( $user_signon, $account, true );\n\n\t\tif ( ! $response['success'] ) {\n\t\t\tself::slack( 'AJAX Create: '.$response['message'], 'error' );\n\t\t\treturn wp_send_json_error( $response );\n\t\t}\n\n\t\treturn wp_send_json_success( $response );\n\t}",
"public function postBankDeposit(Request $request) {\n $validator = \\Validator::make($request->all(), \\Solunes\\Payments\\App\\OnlineBankDeposit::$rules_send);\n $sale_payment_id = $request->input('sale_payment_id');\n if(!$validator->passes()){\n return redirect($this->prev)->with('message_error', 'Debe llenar todos los campos obligatorios.')->withErrors($validator)->withInput();\n } else {\n $sale_payment = \\Solunes\\Sales\\App\\SalePayment::find($sale_payment_id);\n $sale = $sale_payment->sale;\n if($sale_payment->status=='holding'&&$sale = \\Solunes\\Sales\\App\\Sale::findId($sale_payment->parent_id)->checkOwner()->first()){\n $cancel_url = url('');\n $transaction = \\BankDeposit::generateSalePayment($sale_payment->payment, $cancel_url);\n if($sale_payment->online_bank_deposit){\n $online_bank_deposit = $sale_payment->online_bank_deposit;\n } else {\n $online_bank_deposit = new \\Solunes\\Payments\\App\\OnlineBankDeposit;\n $online_bank_deposit->sale_payment_id = $sale_payment->id;\n $online_bank_deposit->status = 'holding';\n }\n $online_bank_deposit->parent_id = $request->input('online_bank_id');\n $online_bank_deposit->transaction_id = $transaction->id;\n $online_bank_deposit->file = \\Asset::upload_file($request->file('file'), 'online-bank-deposit-file');\n $online_bank_deposit->save();\n if(config('payments.cash_params.redirect')&&config('payments.cash_params.redirect_url')){\n if(config('payments.notify_agency_on_payment')&&$sale->agency){\n \\FuncNode::make_email('verify-payment', [$sale->agency->email], []);\n }\n return redirect(config('payments.cash_params.redirect_url'))->with('message_success', 'Su pago fue recibido, deberá ser confirmado en las próximas horas y le enviaremos un email confirmando la recepción del pago. ¡Muchas gracias!');\n } else {\n return redirect($this->prev)->with('message_success', 'Su pago fue recibido, deberá ser confirmado en las próximas horas y le enviaremos un email confirmando la recepción del pago. ¡Muchas gracias!');\n }\n } else {\n return redirect($this->prev)->with('message_error', 'Hubo un error al encontrar su pago.');\n }\n }\n }",
"public function transferPayment()\n {\n $stripe = new \\Stripe\\StripeClient(env('STRIPE_SECRET_KEY'));\n /*$stripe->accounts->create([\n 'type' => 'custom',\n 'country' => 'US',\n 'email' => '[email protected]',\n 'capabilities' => [\n 'card_payments' => ['requested' => true],\n 'transfers' => ['requested' => true],\n ],\n ]);*/\n /*$transfer = \\Stripe\\AccountLink::create([\n 'account' => 'acct_1IOcXgPGJtPprJfm',\n 'refresh_url' => 'https://example.com/reauth',\n 'return_url' => 'https://example.com/return',\n 'type' => 'account_onboarding',\n ]);*/\n $stripe->accounts->retrieve(\n 'acct_1IOcXgPGJtPprJfm',\n []\n );\n $stripe->accounts->retrieveCapability(\n 'acct_1GsXIYATE8vSaZpR',\n 'card_payments',\n []\n );\n\n dd($stripe->coreServiceFactory->services);\n }",
"public function processPayment() {\n\n\t\t//create the GTPayConnector instance\n\t\t$gtpayConnector = new GTPayConnector();\n\n\t\t//create the VpcConfig instance\n\t\t$vpcConfig = new VpcConfig();\n\n\t\t//get the vpc xml object\n\t\t$vpcXMLConf = \"\";\n\t\t$vpcXMLConf = $vpcConfig->loadVpcConfig();\n\n\t\t// confirm that the configurations of vpc were loaded;\n\t\tif($vpcXMLConf == null) {\n\n\t\t\t//go to the error interface\n\t\t\t$data['error_msg'] = \"Could not Load the Virtual Payment client Details\";\n\t\t\t$data['page_titile'] = \"xxOnline shoe | error\";\n\t\t\t$data['responseData'] = \"\";\n\n\t\t\t$this->load->view(\"error-page\", $data);\n\t\t\t$this->load->view(\"partials/footer\");\n\t\t\treturn;\n\t\t}\n\n\t\t//get the vpc details\n\t\t$vpcUrl = $vpcConfig->getVpcURL($vpcXMLConf);\n\t\t$vpcSalt = $vpcConfig->getVpvSalt($vpcXMLConf);\n\t\t$vpcSaltType = $vpcConfig->getVpcSaltType($vpcXMLConf);\n\t\t$marchantcode = $vpcConfig->getCustomerCode($vpcXMLConf);\n\n\t\t//the transaction log\n\t\t$transactionLog = array();\n\n\t\t// set the salt\n\t\t$gtpayConnector->setSalt($vpcSalt);\n\n\t\t//remove the data that you dont need to send to the payment client\n\t\tunset($_POST['shoeimage']);\n\t\tunset($_POST['submit']);\n\t\t// add the customer code to the post data\n\t\t$_POST['gtp_CustomerCode'] = $marchantcode;\n\n\t\t//sort the post data before encrypting\n\t\tksort($_POST);\n\n\t\t//add the Virtual Payment Client post data to the transaction data\n\t\tforeach ($_POST as $key => $value) {\n\t\t\t\n\t\t\tif(strlen($value) > 0) {\n\t\t\t\t$gtpayConnector->addTransactionFields($key, $value);\n\n\t\t\t\t// add the post data to the transactionLog\n\t\t\t\t$transactionLog[$key] = $value;\n\t\t\t}\n\t\t}\n\t\t//get the date and time when the payment request is made\n\t\t$date = new DateTime();\n\t\t$date->setTimeZone(new DateTimeZone('UTC'));\n\t\t$transactionDate = $date->format('Y-m-d\\TH-i-s\\Z');\n\n\t\t//add the date of the transaction\n\t\t$transactionLog[\"transactDate\"] = $transactionDate;\n\n\t\t//log the trasaction on your database\n\t\t$this->transactions->logTransaction($transactionLog);\n\n\t\t// set the salt type\n\t\t$gtpayConnector->setSaltType($vpcSaltType);\n\n\t\t// make oneway hash of the Transaction and add it to the digital order\n\t\t$transactionHash = $gtpayConnector->hashAllTransactionData();\n\n\t\t$gtpayConnector->addTransactionFields(\"gtp_TransDate\", $transactionDate);\n\t\t$gtpayConnector->addTransactionFields(\"gtp_SecureHash\", $transactionHash);\n\t\t$gtpayConnector->addTransactionFields(\"gtp_SecureHashType\", $vpcSaltType);\n\n\t\t//obtain the redirection url\n\t\t$vpcUrl = $gtpayConnector->getDigitalOrderURL($vpcUrl);\n\n\t\t// send the payment request\n\t\theader(\"Location: \".$vpcUrl);\n\t}",
"function make_post_call($mid_url, $post_values) {\n global $base_url, $end_url;\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $base_url . $mid_url . $end_url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"POST\");\n curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($post_values));\n \n $output = curl_exec($curl);\n curl_close($curl);\n \n return $output;\n }",
"public function process_payment( $order_id ) {\n \n global $woocommerce;\n \n\t\t$customer_order = new WC_Order( $order_id );\n\t\t\n\t\t// checking for transiction\n\t\t$environment = ( $this->environment == \"yes\" ) ? 'TRUE' : 'FALSE';\n\n\t\t// Decide which URL to post to\n\t\t$environment_url = $this->environtment_url;//'https://sandbox.finpay.co.id/servicescode/api/apiFinpay.php';\n\n\t\t\n\t\t$add_info1 = $customer_order->billing_first_name.' '.$customer_order->billing_last_name;\n\t\t$amount = $customer_order->order_total;\n\t\t$invoice = $order_id;\n\t\t$merchant_id = $this->merchant_id;\n\t\t$return_url = add_query_arg(array('utm_nooverride'=>'1', 'jenis' => 'kdbayar'),$this->get_return_url($customer_order));\n\t\t$sof_id = 'finpay021';\n\t\t$sof_type = 'pay';\n\t\t$timeout = '2880';\n\t\t$trans_date = date('Ymdhis');\n\t\t$password = $this->password;\n\t\t\n\t\t$mer_signature = hash('sha256', strtoupper($add_info1).'%'.strtoupper($amount).'%'.strtoupper($invoice).'%'.strtoupper($merchant_id).'%'.strtoupper($return_url).'%'.strtoupper($sof_id).'%'.strtoupper($sof_type).'%'.strtoupper($timeout).'%'.strtoupper($trans_date).'%'.strtoupper($password));\n\t\t$ref = strtoupper($add_info1).'%'.strtoupper($amount).'%'.strtoupper($invoice).'%'.strtoupper($merchant_id).'%'.strtoupper($return_url).'%'.strtoupper($sof_id).'%'.strtoupper($sof_type).'%'.strtoupper($timeout).'%'.strtoupper($trans_date).'%'.strtoupper($password);\n\t\t// This is where the fun stuff begins\n\t\t$payload = array(\n\t\t\t'add_info1' => $add_info1,\n\t\t\t'amount' => $amount,\n\t\t\t'invoice' => $invoice,\n\t\t\t'mer_signature' => $mer_signature,\n\t\t\t'merchant_id' => $merchant_id,\n\t\t\t'return_url' => $return_url,\n\t\t\t'sof_id' => $sof_id,\n\t\t\t'sof_type' => $sof_type,\n\t\t\t'timeout' => $timeout,\n\t\t\t'trans_date' => $trans_date\n\t\t\t\n\t\t);\n\t\t\n\t\t// Send this payload to Authorize.net for processing\n\t\t$response = wp_remote_post( $environment_url, array(\n\t\t\t'method' => 'POST',\n\t\t\t'body' => http_build_query( $payload ),\n\t\t\t'timeout' => 90,\n\t\t\t'sslverify' => true,\n ) );\n \n\n\t\tif ( is_wp_error( $response ) ){\n\t\t\tthrow new Exception( __( 'There is issue for connectin payment gateway. Sorry for the inconvenience.', 'finnet-tcash' ) );\n\t\t}else{\n\t\t\tupdate_post_meta( $order_id, '_finpay_ref_kdbayar', $ref);\n\t\t}\n\t\tif ( empty( $response['body'] ) )\n\t\t\tthrow new Exception( __( 'Finnet Response was not get any data.', 'finnet-kode-bayar' ) );\n\t\t\t\n\t\t// get body response while get not error\n\t\t$response_body = wp_remote_retrieve_body( $response );\n\t\t\n\t\t$response = json_decode($response_body, true);\n\t\t\n\t\tif($response['status_code'] == 00){\n\t\t\t// Payment successful\n\t\t\t$customer_order->add_order_note( __( 'Finnet pending payment.', 'finnet-kode-bayar' ) );\n\t\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t// paid order marked\n\t\t\t$customer_order->update_status('pending-payment');\n\n\t\t\t$to_email = $customer_order->billing_email;\n\t\t\t$headers .= \"MIME-Version: 1.0\";\n\t\t\t$headers .= \"Content-Type: text/html; charset=UTF-8\";\n\t\t\t$message = '<div style=\" display: block;position: relative;max-width: 50%;min-width: 300px;height: auto;margin: 25px auto;background: #ffffff;box-shadow: 0px 0px 10px #888888;font-family: Lato, sans-serif;font-size: 14px;\">\n\t\t\t\t\t<div style=\" text-align:center;\">\n\t\t\t\t\t<img src=\"https://www.sarinahonline.co.id/wp-content/uploads/2017/12/sarinah-thewindowofinonesia-02-1.png\" style=\"width:40%; margin: 15px 15px \" >\n\t\t\t\t\t</div> \n\t\t\t\t\t<h2 style=\"padding: 15px;background: #ff0000;color: #ffffff;text-align: center;border-bottom: 5px solid #cc9933;\">\n\t\t\t\t\t\tPetunjuk Pembayaran\n\t\t\t\t\t</h2>\n\t\t\t\t\t\t<p style=\"padding: 15px 5%;color: #333333;\">\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<b>Silakan ikuti langkah-langkah berikut untuk menyelesaikan pembayaran :</b><br>\n\t\t\t\t\t\t\t<ul style=\"list-style:decimal; padding-left: 10%;\">\n\t\t\t\t\t\t\t\t<li style=\"margin-bottom: 10px;color: #333333;\"> Pilih Menu Bayar / Beli</li>\n\t\t\t\t\t\t\t\t<li style=\"margin-bottom: 10px;color: #333333;\"> Pilih Menu Telepon / HP</li>\n\t\t\t\t\t\t\t\t<li style=\"margin-bottom: 10px;color: #333333;\"> Pilih CDMA / Telkom</li>\n\t\t\t\t\t\t\t\t<li style=\"margin-bottom: 10px;color: #333333;\"> Pilih Telkom / Speedy Vision</li>\n\t\t\t\t\t\t\t\t<li style=\"margin-bottom: 10px;color: #333333;\"> Masukkan Kode 12 Digit \"'.$response['payment_code'].'\" kode pembayaran yang anda dapatkan</li>\n\t\t\t\t\t\t\t\t<li style=\"margin-bottom: 10px;color: #333333;\"> Pilih YA untuk melanjutkan pembayaran</li>\n\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<div style=\"display: block;width: auto;background: #f2f2f2;border-top: 1px solid #eeeeee;padding: 25px 5%;text-align: center;color: #888888;\">\n\t\t\t\t\t\t\t\t©2017<a href=\"https://www.sarinahonline.co.id/\" style=\"color: #888888;\"> Sarinah Online.</a> All rights Reserved\n\t\t\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t</div>';\n\t\t\t\n\t\t\twp_mail($to_email, 'Your order is Pending', $message, $headers );\n\n\t\t\t// this is important part for empty cart\n\t\t\t$woocommerce->cart->empty_cart();\n\n\t\t\t$kode_bayar = add_query_arg('payment_code', $response['payment_code'], $this->get_return_url($customer_order));\n\t\t\t// Redirect to thank you page\n\t\t\treturn array(\n\t\t\t\t'result' => 'success',\n\t\t\t\t'redirect' => $kode_bayar,\n\t\t\t);\n\t\t} else {\n\t\t\t//transiction fail\n\t\t\twc_add_notice( $r['response_reason_text'], 'error' );\n\t\t\t$customer_order->add_order_note( 'Error: '. $r['response_reason_text'] );\n\t\t}\n\t\t\n\t}",
"public function make(Request $request)\n {\n $now= new Carbon();\n $time= Carbon::now();\n $data = $request->all();\n $sponsor = Sponsor::find($data['sponsor']);\n $apartment = Apartment::find($data['apa']);\n\n $payload = $request->input('payload', false);\n $nonce = $payload['nonce'];\n $gateway = $this->brainConfig();\n $status = $gateway->transaction()->sale([\n 'amount' => $sponsor->cost,\n 'paymentMethodNonce' => $nonce,\n 'options' => [\n 'submitForSettlement' => True\n ]\n ]);\n\n if ($status->success) {\n\n $payment = new Payment();\n $payment->apartment_id = $apartment->id;\n $payment->sponsor_id = $sponsor->id;\n if($sponsor->id == 1){\n $payment->expire_date = $time->add(1, 'day');\n };\n if($sponsor->id == 2){\n $payment->expire_date = $time->add(3, 'day');\n };\n if($sponsor->id == 3){\n $payment->expire_date = $time->add(6, 'day');\n };\n $payment->total = $sponsor->cost;\n $payment->status = true;\n $payment->save();\n\n $apartment->sponsorActive=true;\n $apartment->save();\n\n return response()->json($status);\n \n } else {\n\n $payment = new Payment();\n $payment->apartment_id = $apartment->id;\n $payment->sponsor_id = $sponsor->id;\n $payment->expire_date = $time;\n $payment->total = $sponsor->cost;\n $payment->status = false;\n $payment->save();\n\n return response()->json($status);\n }\n }",
"private function processPayment($data){\n $p_cust_id_cliente = env('EPAYCO_P_CUST_ID_CLIENTE');\n $p_key = env('EPAYCO_P_KEY');\n $x_ref_payco = $data->x_ref_payco;\n $x_transaction_id = $data->x_transaction_id;\n $x_amount = $data->x_amount;\n $x_currency_code = $data->x_currency_code;\n $x_signature = $data->x_signature;\n $signature = hash('sha256', $p_cust_id_cliente . '^' . $p_key . '^' . $x_ref_payco . '^' . $x_transaction_id . '^' . $x_amount . '^' . $x_currency_code);\n $x_response = $data->x_response;\n $x_response_reason_text = $data->x_response_reason_text;\n $x_id_invoice = $data->x_id_invoice;\n $x_autorizacion = $data->x_approval_code;\n\n //Validamos la firma\n if ($x_signature != $signature) {\n die(\"Firma no valida\");\n }\n\n $this->saveTransaction($data);\n NotificationController::notify('delivery', $data->x_extra3, $x_amount,$data->x_extra5,\"0\");\n\n return response()->json([\n 'success' => true,\n 'message' => 'transacción procesada'\n ],200);\n\n }",
"function makePayment($arr) {\n\t$accessToken = \"eYgzn2wfvScb1aIf3QLs\";\n\t$merchantNumber = \"T511564901\";\n\t$secretToken = \"1qcvgmCNmSvP1ikAG38uSoAPr7ePByuMcWuMWKsa\";\n\n\t$apiKey = base64_encode(\n\t\t$accessToken . \"@\" . $merchantNumber . \":\" . $secretToken\n\t);\n\n\t$checkoutUrl = \"https://api.v1.checkout.bambora.com/sessions\";\n\n\t$request = array();\n\t$request[\"order\"] = array();\n\t$request[\"order\"][\"id\"] = $arr['orderID'];\n\t$request[\"order\"][\"amount\"] = $arr['amount'];\n\t$request[\"order\"][\"currency\"] = \"NOK\";\n\n\t$request[\"url\"] = array();\n\t$request[\"url\"][\"accept\"] = $arr['acceptURL'];\n\t$request[\"url\"][\"cancel\"] = $arr['cancelURL'];\n\t$request[\"url\"][\"callbacks\"] = array();\n\t$request[\"url\"][\"callbacks\"][] = array(\"url\" => $arr['callbackURL']);\n\n\t$requestJson = json_encode($request);\n\n\t$contentLength = isset($requestJson) ? strlen($requestJson) : 0;\n\n\t$headers = array(\n\t\t'Content-Type: application/json',\n\t\t'Content-Length: ' . $contentLength,\n\t\t'Accept: application/json',\n\t\t'Authorization: Basic ' . $apiKey\n\t);\n\n\t$curl = curl_init();\n\n\tcurl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"POST\");\n\tcurl_setopt($curl, CURLOPT_POSTFIELDS, $requestJson);\n\tcurl_setopt($curl, CURLOPT_URL, $checkoutUrl);\n\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\tcurl_setopt($curl, CURLOPT_HTTPHEADER, $headers);\n\tcurl_setopt($curl, CURLOPT_FAILONERROR, false);\n\tcurl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n\n\t$rawResponse = curl_exec($curl);\n\t$response = json_decode($rawResponse);\n\t\n\treturn $response;\n}",
"function create_payment_with_paypal()\n\t{\n\t\t$this->_api_context->setConfig($this->config->item('settings'));\n\n\n\t\t// ### Payer\n\t\t// A resource representing a Payer that funds a payment\n\t\t// For direct credit card payments, set payment method\n\t\t// to 'credit_card' and add an array of funding instruments.\n\n\t\t$payer = new \\PayPal\\Api\\Payer();\n\t\t$payer->setPaymentMethod('paypal');\n\n\t\t// ### Itemized information\n\t\t// (Optional) Lets you specify item wise\n\t\t// information\n\n\n\t\t$ListItemes = array();\n\n\t\tif (is_null(get_cookie(\"cart\")))\n\t\t\tredirect(\"cart\");\n\n\n\t\t$arr = json_decode(get_cookie(\"cart\"), TRUE);\n\n\t\t$ids = array();\n\n\t\tforeach ($arr as $a) {\n\t\t\t$ids[] = $a['id'];\n\t\t}\n\n\t\tif (count($ids) > 0)\n\t\t\t$info = $this->m_p->s_cart(\"products\", $ids, FALSE);\n\t\telse\n\t\t\tredirect(\"cart\");\n\n\n\t\t$products = array();\n\n\t\t$tprice = 0;\n\t\t$ship = get_info(\"shipping\", $this->input->post(\"shipping\"), \"price\") ?? 0;\n\n\t\t$i = 0;\n\n\t\tforeach ($info as $key) {\n\t\t\t$infoa[$key->id] = $key;\n\t\t}\n\n\t\tforeach ($arr as $idk => $k) {\n\t\t\t$key = $infoa[$k['id']];\n\n\t\t\t$options = isset($k['op']) ? json_decode($k['op']) : array();\n\n\t\t\t$products[] = array(\"q\" => $k[\"q\"], \"id\" => $k['id'], \"op\" => $options);\n\n\t\t\t$pr = number_format($key->price - ($key->price * $key->discount / 100), 2);\n\t\t\t$tpr = isset($k['q']) ? number_format($pr * $k['q'], 2) : $pr;\n\n\t\t\t$tprice = $tprice + $tpr;\n\n\t\t\t$ListItemes[$i] = array(\n\t\t\t\t\"name\" \t\t\t=> get_info(\"products\", $key->id, \"title\"),\n\t\t\t\t\"sku\" \t\t\t=> $key->id,\n\t\t\t\t\"currency\" => \"USD\",\n\t\t\t\t\"quantity\" \t\t=> isset($k['q']) ? $k['q'] : 1,\n\t\t\t\t\"price\" \t\t=> $pr\n\t\t\t);\n\n\t\t\t$i++;\n\t\t}\n\n\t\t$date = \"Y-m-d\";\n\n\t\t// if(!empty($coupon))\n\t\t// {\n\t\t// \t$c = $this->m_p->s_a(\"discounts\", array(\"coupon\" => $coupon, \"date >=\" => $date));\n\n\t\t// \tif(count($c) != 0)\n\t\t// \t{\n\t\t// \t\tforeach($c as $k)\n\t\t// \t\t\t$num = $k->num;\n\n\t\t// \t\t$tprice = $tprice - $num * $tprice / 100;\n\t\t// \t}\n\t\t// }\n\n\t\t$ip = $this->input->ip_address();\n\n\t\t$date = date(\"Y-m-d\");\n\n\t\t$results = $this->db->query(\"SELECT * FROM account where dateat like '$date%' \")->row();\n\t\tif ($results) {\n\t\t\t$target = $results->target;\n\t\t} else {\n\t\t\t$target = '00';\n\t\t}\n\t\t$bill_no = '#OR' . strtoupper(substr(md5(uniqid(mt_rand(), true)), 0, 4));\n\t\t$currency_type = $this->input->post(\"currency_type\");\n\t\t$arrInsert = array(\n\t\t\t\"name\" => $this->input->post(\"fullname\"),\n\t\t\t\"tele\" => $this->input->post(\"phone\"),\n\t\t\t\"email\" => $this->input->post(\"email\"),\n\t\t\t\"address\" => $this->input->post(\"address\"),\n\t\t\t\"address2\" => $this->input->post(\"address2\"),\n\t\t\t\"city\" => $this->input->post(\"city\"),\n\t\t\t\"state\" => $this->input->post(\"state\"),\n\t\t\t\"zipcode\" => $this->input->post(\"zipcode\"),\n\t\t\t\"country\" => $this->input->post(\"country\"),\n\t\t\t\"note\" => $this->input->post(\"note\"),\n\t\t\t\"ip\" => $ip,\n\t\t\t\"pay\" => \"paypal\",\n\t\t\t\"totalPrice\" => $tprice + $ship,\n\t\t\t\"products\" => json_encode($products),\n\t\t\t\"date\" => time(),\n\t\t\t\"target\" => $target,\n\t\t\t\"order_id\" => $bill_no,\n\t\t\t\"datetime\" => date('Y-m-d\\TH:i:s'),\n\t\t\t'currency_type' => $currency_type\n\t\t);\n\n\t\t$orderId = $this->m_p->ins(\"orders\", $arrInsert);\n\t\t\n\t\t$itemList = new ItemList();\n\t\t$itemList->setItems($ListItemes);\n\n\t\t// ### Additional payment details\n\t\t// Use this optional field to set additional\n\t\t// payment information such as tax, shipping\n\t\t// charges etc.\n\t\t$details['tax'] = number_format($ship, 2);\n\t\t$details['subtotal'] = number_format($tprice, 2);\n\t\t// ### Amount\n\t\t// Lets you specify a payment amount.\n\t\t// You can also specify additional details\n\t\t// such as shipping, tax.\n\t\t$amount['currency'] = \"USD\";\n\t\t$amount['total'] = number_format($details['tax'] + $details['subtotal'], 2);\n\t\t$amount['details'] = $details;\n\t\t// ### Transaction\n\t\t// A transaction defines the contract of a\n\t\t// payment - what is the payment for and who\n\t\t// is fulfilling it.\n\n\t\t//exit();\n\n\t\t$transaction['description'] = 'Payment';\n\t\t$transaction['amount'] = $amount;\n\t\t$transaction['invoice_number'] = uniqid();\n\t\t$transaction['item_list'] = $itemList;\n\t\t$transaction['custom'] = $orderId;\n\n\t\t// ### Redirect urls\n\t\t// Set the urls that the buyer must be redirected to after\n\t\t// payment approval/ cancellation.\n\t\t$baseUrl = base_url();\n\t\t$redirectUrls = new RedirectUrls();\n\t\t$redirectUrls->setReturnUrl($baseUrl . \"paypal/getPaymentStatus\")\n\t\t\t->setCancelUrl($baseUrl . \"paypal/getPaymentStatus\");\n\n\t\t// ### Payment\n\t\t// A Payment Resource; create one using\n\t\t// the above types and intent set to sale 'sale'\n\t\t$payment = new Payment();\n\t\t$payment->setIntent(\"sale\")\n\t\t\t->setPayer($payer)\n\t\t\t->setRedirectUrls($redirectUrls)\n\t\t\t->setTransactions(array($transaction));\n\n\t\ttry {\n\t\t\t$payment->create($this->_api_context);\n\t\t} catch (Exception $ex) {\n\t\t\t// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY\n\t\t\tprint_r($ex);\n\t\t\texit(1);\n\t\t}\n\t\tforeach ($payment->getLinks() as $link) {\n\t\t\tif ($link->getRel() == 'approval_url') {\n\t\t\t\t$redirect_url = $link->getHref();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (isset($redirect_url)) {\n\t\t\t/** redirect to paypal **/\n\t\t\tredirect($redirect_url);\n\t\t}\n\n\t\t$this->session->set_flashdata('success_msg', 'Unknown error occurred');\n\t\tredirect('home/checkout');\n\t}",
"function action()\n {\n\n/*Saving Plan API*/\n if($data_action == \"money_in_save\")\n {\n /*$api_url = \"http://finance.xavishop.com/index.php/Financial_goal/save_saving_plan\";*/\n $api_url =\"https://xavishop.com/financial_app/index.php/Budget/money_in_save\"\n $form_data = array(\n\n \t\t\t\t\t'user_id' \t\t\t=>$this->input->post('id'),\n\t\t\t\t\t\t'paycheck' \t\t\t=>$this->input->post('paycheck'),\n\t\t\t\t\t\t'additional_income' =>$this->input->post('additional_amount'),\n );\n\n $client = curl_init($api_url);\n\n curl_setopt($client, CURLOPT_POST, true);\n\n curl_setopt($client, CURLOPT_POSTFIELDS, $form_data);\n\n curl_setopt($client, CURLOPT_RETURNTRANSFER, true);\n\n $response = curl_exec($client);\n\n curl_close($client);\n\n echo $response;\n }\n\n\n\n if($data_action == \"money_out_save\")\n {\n /*$api_url = \"http://finance.xavishop.com/index.php/Financial_goal/save_car_purchasing\";*/\n $api_url =\"https://xavishop.com/financial_app/index.php/Budget/money_out_save\"\n $form_data = array(\n\n \t\t\t\t'user_id' \t\t\t=>$this->input->post('id'),\n\t\t\t\t\t\t'groceries' \t\t\t=>$this->input->post('groceries'),\n\t\t\t\t\t\t'transpotation' =>$this->input->post('transpotation'),\n\t\t\t\t\t\t'utilities' =>$this->input->post('utilities'),\n\t\t\t\t\t\t'dining_traveling' =>$this->input->post('dining_traveling'),\n\t\t\t\t\t\t'education' =>$this->input->post('education'),\n );\n\n $client = curl_init($api_url);\n\n curl_setopt($client, CURLOPT_POST, true);\n\n curl_setopt($client, CURLOPT_POSTFIELDS, $form_data);\n\n curl_setopt($client, CURLOPT_RETURNTRANSFER, true);\n\n $response = curl_exec($client);\n\n curl_close($client);\n\n echo $response;\n }\n\n\n if($data_action == \"save_investment_plan\")\n {\n /*$api_url = \"http://finance.xavishop.com/index.php/Financial_goal/save_saving_plan\";*/\n $api_url =\"https://xavishop.com/financial_app/index.php/Financial_goal/save_investment_plan\"\n $form_data = array(\n\n 'user_id'=>$this->input->post('user_id'),\n 'loan_amount'=>$this->input->post('loan'),\n 'anual_intrest'=>$this->input->post('anual'),\n 'loan_terms'=> $this->input->post('term'),\n 'payment_frequency'=>$this->input->post('frequency'),\n 'resedual_value'=>$this->input->post('value'),\n );\n\n $client = curl_init($api_url);\n\n curl_setopt($client, CURLOPT_POST, true);\n\n curl_setopt($client, CURLOPT_POSTFIELDS, $form_data);\n\n curl_setopt($client, CURLOPT_RETURNTRANSFER, true);\n\n $response = curl_exec($client);\n\n curl_close($client);\n\n echo $response;\n }\n /*house goal*/\n if($data_action == \"save_house_plan\")\n {\n /*$api_url = \"http://finance.xavishop.com/index.php/Financial_goal/save_saving_plan\";*/\n $api_url =\"https://xavishop.com/financial_app/index.php/Financial_goal/save_house_plan\"\n $form_data = array(\n\n \t\t\t\t'user_id'\t\t\t =>$this->input->post('id'),\n\t\t\t\t\t'loan_amount'\t\t =>$this->input->post('loan_amount'),\n\t\t\t\t\t'deposit'\t\t\t =>$this->input->post('deposit'),\n\t\t\t\t\t'annual_intrest_rate'=>$this->input->post('annual_intrest'),\n\t\t\t\t\t'loan_term'\t\t\t =>$this->input->post('loan_term'),\n\t\t\t\t\t'payment_frequency' =>$this->input->post('payment_frequency'),\n\t\t\t\t\t'created_at'\t\t =>date('Y-m-d'),\n\t\t\t\t\t'created_by'\t\t =>$this->input->post('id'),\n\n $client = curl_init($api_url);\n\n curl_setopt($client, CURLOPT_POST, true);\n\n curl_setopt($client, CURLOPT_POSTFIELDS, $form_data);\n\n curl_setopt($client, CURLOPT_RETURNTRANSFER, true);\n\n $response = curl_exec($client);\n\n curl_close($client);\n\n echo $response;\n }\n\n }",
"public function postAction()\n {\n // A) determines if enough time has elapsed to warrant re-contacting the TinyBttn API\n // B) uses the results returned from TinyBttn to build discounts\n\n // We need to allow the user to click the button multiple times (in case they add a new product that qualifies for\n // a discount after the initial click), *BUT* if we don't keep track of the rules we've already built, then\n // we'll start creating duplicates.\n // SO => instantiate an array to track ... this will also be used to later remove them (upon checkout)\n if(!$this->_getSession()->getTinybttnCreated()) $this->_getSession()->setTinybttnCreated(array());\n // Instantiate as an array if not previously set ... have to check isset so that we don't overwrite existing\n\n // Store user's OneID-shared info into session variable ... this enables the logic\n // that determines whether or not to show the OneID prompt when the user initially clicks the TinyBttn\n $this->_getSession()->setTinybttnEmail($this->getRequest()->getParam('1'));\n $this->_getSession()->setTinybttnId($this->getRequest()->getParam('2'));\n\n // Encode posted data into JSON\n $to_send = Mage::helper('core')->jsonEncode($this->getRequest()->getParams());\n\n // Check if TinyBttn has been contacted in the past five minutes (limits comms with the API)\n if($this->_getSession()->getTinybttnLastPost()){\n\n // If it's been greater than 5 minutes\n //if($this->_getSession()->getTinybttnLastPost()->diff(new Datetime('now'))->format(\"%i\") > 5){\n // POST data to TinyBttn, save discount information in the session, and log the current time\n $this->_getSession()->setTinybttnDiscounts(Mage::helper(\"TinyBttn\")->post_to_tinybttn('discount', '1', $to_send));\n $this->_getSession()->setTinybttnLastPost(new Datetime('now'));\n //}\n }\n\n // User hasn't yet contacted the API yet ==> POST data to TinyBttn, save discount info in the session, log current time\n else{\n // POST data to TinyBttn and save discount information in the session\n $this->_getSession()->setTinybttnDiscounts(Mage::helper(\"TinyBttn\")->post_to_tinybttn('discount', '1', $to_send));\n $this->_getSession()->setTinybttnLastPost(new Datetime('now'));\n }\n\n\n // ************************* Interpret results!\n\n if(is_array($this->_getSession()->getTinybttnDiscounts())) {\n\n // Get the two result arrays\n $tinybttn_discounts = $this->_getSession()->getTinybttnDiscounts();\n $product_discounts = $tinybttn_discounts['product'];\n $general_discounts = $tinybttn_discounts['general'];\n\n if(!empty($product_discounts)){\n\n // Unfortunately, each Shopping Cart Rule has to have a unique ID, so we can't use that as a means to track in here\n if(!$this->_getSession()->getTinybttnUsedSkus()) $this->_getSession()->setTinybttnUsedSkus(array());\n // Instantiate as an array if not previously set\n\n // Load the shopper's current cart\n $items = Mage::getSingleton('checkout/session')->getQuote()->getAllItems();\n\n // Build an array of just the SKUs (for comparison)\n $users_skus = array();\n foreach($items as $item) {\n $user_skus[] = $item->getSku();\n }\n\n // See if there's a discount that matches an item in the cart (based on SKU)\n foreach($users_skus as $sku){\n\n // If the item has a matching discount, build it\n if(array_key_exists($sku, $product_discounts)){\t// The $product_discounts array's keys are product SKUs\n\n // Create the unique ID that will be sent back to TinyBttn if/when the user completes checkout\n $ps_id = 'TBPS-' . $product_discounts[$sku]['ps_id'] . '-' . $sku . '-';\n\n // If we haven't already built a rule using this SKU ...\n if(!in_array($sku, $this->_getSession()->getTinybttnUsedSkus())){\n // ... call the creation function\n Mage::helper(\"TinyBttn\")->createProductDiscount($sku, $product_discounts[$sku]['amt'], $product_discounts[$sku]['qty_max'], $product_discounts[$sku]['qty_step'], $product_discounts[$sku]['free_ship'], $ps_id);\n\n // Add the SKU into our array of used SKUs in order to close the logic loop\n $stack = $this->_getSession()->getTinybttnUsedSkus();\n $stack[] = $sku;\n $this->_getSession()->setTinybttnUsedSkus($stack);\n }\n }\n }\n }\n\n\n // If general (applied to the ENTIRE shopping cart) discounts array was returned, then we need to select the highest value one\n if(!empty($general_discounts)){\n\n // For products, we addressed the concern about duplicating rules using an array of previously-built rules\n // For the general discount, since we basically do the same thing\n if(!$this->_getSession()->getTinybttnUsedGen()) $this->_getSession()->setTinybttnUsedGen(array());\n // Instantiate as an array if not previously set\n\n // Set initial values\n $general_discount = 0;\n $limit = 0;\n $free_ship = 0;\n\n foreach ($general_discounts as $gd){\n\n if($gd['discount_amt'] >= $general_discount) { // If current discount amt is greater than previous ...\n\n $general_discount = $gd['discount_amt']; // ... set values equal to the current discount's attributes\n\n if(isset($gd['member']))\n $title = $gd['organization'] . ' ' . $gd['member'];\n else\n $title = $gd['crm_desc'];\n\n $gen_id = 'TBME-' . $gd['me_id'] . '-';\n\n if($gd['free_ship'] = 't') // Check for/set free_shipping\n $free_ship = 1;\n else\n $free_ship = 0;\n\n\n // Limit explanation: if a shopper is limited to $50 of savings and the discount_amt is 10%,\n // then they'll only reach the limit if their subtotal is > $500.\n // To determine this $500 value, we simply take the dollar limit and divide by the % discount (e.g. $50/0.1 = $500 )\n if(!empty($gd['discount_limit']) && $general_discount != 0)\n $limit = $gd['discount_limit'] / $general_discount;\n }\n }\n }\n\n if($general_discount > 0){\n if($this->_getSession()->getTinybttnGeneralSet() != $gen_id){\n\n if(($key = array_search(\"great\", $james)) !== false)\n unset($james[$key]);\n\n Mage::helper(\"TinyBttn\")->createGeneralDiscount($general_discount, $limit, $free_ship, $gen_id, $title);\n $this->_getSession()->setTinybttnGeneralSet($gen_id);\n }\n }\n }\n }",
"public function calculatePayment()\n {\n }",
"public function submit() {\r\n\t\t$name_value_pairs = array();\r\n\t\tforeach ( $this->request_data as $key => $value ) {\r\n\t\t\t$name_value_pairs[] = $key . '=' . rawurlencode( $value );\r\n\t\t}\r\n\r\n\t\t$url = 'https://mms.paymentsensegateway.com/Pages/PublicPages/PaymentForm.aspx';\r\n\t\t$params = implode( '&', $name_value_pairs );\r\n\t\theader( 'Location: ' . $url . '?' . $params, false );\r\n\t\texit();\r\n\t}",
"public function payoutShouldCreatePaymentAndCallPayoutWithPayment(): void\n {\n $paymentType = (new SepaDirectDebit('1234'))->setId('typeId');\n $customer = (new Customer())->setId('customerId');\n $metadata = (new Metadata())->setId('metadataId');\n\n /** @var ResourceService|MockObject $resourceSrvMock */\n $resourceSrvMock = $this->getMockBuilder(ResourceService::class)->disableOriginalConstructor()->setMethods(['createResource'])->getMock();\n /** @noinspection PhpParamsInspection */\n $resourceSrvMock->expects(self::once())->method('createResource')\n ->with(self::callback(static function ($payout) use ($customer, $metadata) {\n return $payout instanceof Payout &&\n $payout->getAmount() === 1.23 &&\n $payout->getCurrency() === 'testCurrency' &&\n $payout->getPayment() instanceof Payment &&\n $payout->getReturnUrl() === 'http://return.url' &&\n $customer === $payout->getPayment()->getCustomer() &&\n $metadata === $payout->getPayment()->getMetadata();\n }));\n $heidelpay = (new Heidelpay('s-priv-123'))->setResourceService($resourceSrvMock);\n $heidelpay->getPaymentService()->payout(1.23, 'testCurrency', $paymentType, 'http://return.url', $customer, 'OrderId', $metadata);\n }",
"public function makeSubscription()\n {\n\n $url = Credentials::getCredentials('/pre-approvals');\n\n $response = Http::withHeaders([\n 'Content-Type' => 'application/json',\n 'Accept' => 'application/vnd.pagseguro.com.br.v3+json;charset=ISO-8859-1'\n ])\n ->post($url, [\n 'plan' => $this->data['plan_reference'],\n 'sender' => [\n 'name' => 'Teste Usuário Sender',\n 'email' => '[email protected]',\n 'hash' => $this->data['senderHash'],\n 'phone' => [\n 'areaCode' => '98',\n 'number' => '984283432'\n ],\n 'address' => [\n 'street' => 'Rua Teste',\n 'number' => '29',\n 'complement' => '',\n 'district' => 'São Bernado',\n 'city' => 'São Luis',\n 'state' => 'MA',\n 'country' => 'BRA',\n 'postalCode' => '65056000'\n ],\n 'documents' => [\n [\n 'type' => 'CPF',\n 'value' => '38868146029'\n ]\n ]\n ],\n 'paymentMethod' => [\n 'type' => 'CREDITCARD',\n 'creditCard' => [\n 'token' => $this->data['token'],\n 'holder' => [\n 'name' => 'Customer Credit Name',\n 'birthDate' => '30/10/1990',\n 'documents' => [\n [\n 'type' => 'CPF',\n 'value' => '38868146029'\n ]\n ],\n 'billingAddress' => [\n 'street' => 'Rua Teste',\n 'number' => '29',\n 'complement' => '',\n 'district' => 'São Bernado',\n 'city' => 'São Luis',\n 'state' => 'MA',\n 'country' => 'BRA',\n 'postalCode' => '65056000'\n ],\n 'phone' => [\n 'areaCode' => '98',\n 'number' => '984283432'\n ]\n ]\n\n ]\n ]\n ]);\n\n return $response->json();\n }",
"public function _postPayment( $data )\n{\n\t// Process the payment\n\t$vars = new JObject;\n\t$jinput = JFactory::getApplication()->input;\n\t$app = JFactory::getApplication();\n\t$paction = $jinput->get('paction');\n\n\tswitch ($paction)\n\t{\n\t\tcase 'process_recurring':\n\t\t\t// TODO Complete this\n\t\t\t$app->close();\n\t\tbreak;\n\t\tcase 'process':\n\t\t\t$vars->message = $this->_process();\n\t\t\t$html = $this->_getLayout('message', $vars);\n\t\tbreak;\n\t\tdefault:\n\t\t\t$vars->message = JText::_('COM_TIENDA_INVALID_ACTION');\n\t\t\t$html = $this->_getLayout('message', $vars);\n\t\tbreak;\n\t}\n\n\treturn $html;\n}",
"public function createTransferPayment(Request $request);",
"function payment() {\n\t\t$url = 'https://www.instawallet.org/api/v1/w/' . $wallet_id . '/payment';\n\t\t$json = file_get_contents($url);\n\t\treturn json_decode($json);\n\t}",
"public function postPaymentWithpaypal(Request $request)\n {\n// echo $request;\n// echo $request->get('amount');\n// echo $sdfdsf=$request->get('checkoutInfo');\n// exit;\n $payer = new Payer();\n $payer->setPaymentMethod('paypal');\n $item_1 = new Item();\n $item_1->setName('Item 1') /** item name **/\n ->setCurrency('USD')\n ->setQuantity(1)\n ->setPrice($request->get('amount')); /** unit price **/\n $item_list = new ItemList();\n $item_list->setItems(array($item_1));\n $amount = new Amount();\n $amount->setCurrency('USD')\n ->setTotal($request->get('amount'));\n $transaction = new Transaction();\n $transaction->setAmount($amount)\n ->setItemList($item_list)\n ->setDescription('Your transaction description');\n $redirect_urls = new RedirectUrls();\n $redirect_urls->setReturnUrl(URL::route('payment.status')) /** Specify return URL **/\n ->setCancelUrl(URL::route('payment.status'));\n// $redirect_urls->setReturnUrl(URL::route('payment.status',['amount'=>$request->get('amount'),'checkoutInfo'=>$request->get('checkoutInfo')])) /** Specify return URL **/\n// ->setCancelUrl(URL::route('payment.status',['amount'=>$request->get('amount'),'checkoutInfo'=>$request->get('checkoutInfo')]));\n $payment = new Payment();\n $payment->setIntent('Sale')\n ->setPayer($payer)\n ->setRedirectUrls($redirect_urls)\n ->setTransactions(array($transaction));\n /** dd($payment->create($this->_api_context));exit; **/\n try {\n $payment->create($this->_api_context);\n } catch (\\PayPal\\Exception\\PPConnectionException $ex) {\n if (\\Config::get('app.debug')) {\n \\Session::put('error','Connection timeout');\n return Redirect::route('addmoney.paywithpaypal');\n /** echo \"Exception: \" . $ex->getMessage() . PHP_EOL; **/\n /** $err_data = json_decode($ex->getData(), true); **/\n /** exit; **/\n } else {\n \\Session::put('error','Some error occur, sorry for inconvenient');\n return Redirect::route('addmoney.paywithpaypal');\n /** die('Some error occur, sorry for inconvenient'); **/\n }\n }\n foreach($payment->getLinks() as $link) {\n if($link->getRel() == 'approval_url') {\n $redirect_url = $link->getHref();\n break;\n }\n }\n /** add payment ID to session **/\n Session::put('paypal_payment_id', $payment->getId());\n Session::put('checkoutInfo', $request->get('checkoutInfo'));\n \n if(isset($redirect_url)) {\n /** redirect to paypal **/\n return Redirect::away($redirect_url);\n }\n \\Session::put('error','Unknown error occurred');\n return Redirect::route('addmoney.paywithpaypal');\n }",
"function main( $isFuturePay ) {\r\n error_log(__FILE__.\":\".__FUNCTION__.\" : handling WorldPay payment response IPN\");\r\n\r\n $objects = $ids = $input = array( );\r\n\r\n $component = self::retrieve('MC_module','String','POST',true);\r\n $input[\"component\"] = $component;\r\n $contact = self::retrieve('MC_contact_id','Integer','POST',true);\r\n\r\n $this->getInput($input,$ids);\r\n\r\n if (!$isFuturePay) {\r\n // not a future payment notication but may be a future payment\r\n // agreement being made...\r\n\r\n // get ids\r\n $ids[\"contact\"] = self::retrieve('MC_contact_id','String','POST',true);\r\n $ids[\"contribution\"] = self::retrieve('MC_contribution_id','String','POST',true);\r\n $ids[\"thankyoupage\"] = self::retrieve('MC_civi_thankyou_url','String','POST',true);\r\n $ids[\"cancelpage\"] = self::retrieve('MC_civi_cancel_url','String','POST',true);\r\n if ($component=='event') {\r\n $ids[\"event\"] = self::retrieve('MC_event_id','String','POST',true);\r\n $ids[\"participant\"] = self::retrieve('MC_participant_id','String','POST',true);\r\n }\r\n else {\r\n // contribution optional id's\r\n $ids['membership'] = self::retrieve('MC_membership_id','String','POST',false);\r\n $ids['contributionRecur'] = self::retrieve( 'MC_contribution_recur_id', 'Integer', 'GET', false );\r\n $ids['contributionPage'] = self::retrieve( 'MC_contribution_page_id' , 'Integer', 'GET', false );\r\n }\r\n\r\n if (is_numeric($input[\"futurePayId\"])) {\r\n // this is a futurepay agreement being made \r\n // so store the ids and do nothing more here\r\n // since no money has actually been transferred yet\r\n // ...watch futurepay repsonse for such transfers\r\n self::storeFuturePayIds($component,$input[\"futurePayId\"],$ids);\r\n return;\r\n }\r\n }\r\n else {\r\n if (!is_numeric($input[\"futurePayId\"])) {\r\n CRM_Core_Error::debug_log_message(\"futurePayId is missing for recurring payment.\");\r\n error_log(__FILE__.\":\".__FUNCTION__.\" : futurePayId is missing for recurring payment. input=\".print_r($input,true));\r\n exit();\r\n }\r\n self::retrieveFuturePayIds($component,$input[\"futurePayId\"],$ids);\r\n if (!$ids) {\r\n CRM_Core_Error::debug_log_message(\"Some sort of error occured retrieving ids for futurePayId=$futurePayId\");\r\n error_log(__FILE__.\":\".__FUNCTION__.\" : Some sort of error occured retrieving ids for futurePayId=$futurePayId\");\r\n exit();\r\n }\r\n }\r\n\r\n $paymentProcessorID = self::retrieve('processor_id', 'Integer', 'POST', FALSE);\r\n if (empty($paymentProcessorID)) {\r\n $processorParams = array(\r\n 'user_name' => self::retrieve('installation', 'String', 'POST', FALSE),\r\n 'payment_processor_type_id' => CRM_Core_DAO::getFieldValue('CRM_Financial_DAO_PaymentProcessorType', 'WorldPay', 'id', 'name'),\r\n 'is_test' => empty($input['is_test']) ? 0 : 1,\r\n );\r\n\r\n $processorInfo = array();\r\n if (!CRM_Financial_BAO_PaymentProcessor::retrieve($processorParams, $processorInfo)) {\r\n return FALSE;\r\n }\r\n $paymentProcessorID = $processorInfo['id'];\r\n }\r\n\r\n // validateData also loads the obects\r\n if (!$this->validateData($input,$ids,$objects,TRUE,$paymentProcessorID)) {\r\n error_log(__FILE__.\":\".__LINE__.\": validate data failed, input=\".print_r($input,true).\" ids=\".print_r($ids,true));\r\n return false;\r\n }\r\n\r\n self::$_paymentProcessor =& $objects['paymentProcessor'];\r\n if ($isFuturePay) {\r\n // future pay payment notification\r\n return $this->handleFuturepayPayment($input,$ids,$objects);\r\n }\r\n else if (is_numeric($input[\"futurePayId\"])) {\r\n // future pay payment initial agreement set up\r\n // appears like a single payment but no money changes hands\r\n return $this->handleFuturepayAgreement($input,$ids,$objects);\r\n }\r\n else {\r\n // single payment\r\n error_log(__FILE__.\":\".__FUNCTION__.\" : now processing single payment\");\r\n return $this->handleSinglePayment($input,$ids,$objects);\r\n }\r\n }",
"public function setupPayment($order){\r\n $response = array(\r\n 'success'=> false,\r\n 'msg'=> __('Payment failed!', ET_DOMAIN)\r\n );\r\n // write session\r\n et_write_session('order_id', $order->ID);\r\n et_write_session('processType', 'buy');\r\n $arg = apply_filters('ae_payment_links', array(\r\n 'return' => et_get_page_link('process-payment') ,\r\n 'cancel' => et_get_page_link('process-payment')\r\n ));\r\n /**\r\n * process payment\r\n */\r\n $paymentType_raw = $order->payment_type;\r\n $paymentType = strtoupper($order->payment_type);\r\n /**\r\n * factory create payment visitor\r\n */\r\n $order_data = array(\r\n 'payer' => $order->post_author,\r\n 'total' => '',\r\n 'status' => 'draft',\r\n 'payment' => $paymentType,\r\n 'paid_date' => '',\r\n 'post_parent' => $order->post_parent,\r\n 'ID'=> $order->ID,\r\n 'amount'=> $order->amount\r\n );\r\n $order_temp = new mJobOrder($order_data);\r\n $order_temp->add_product($order);\r\n $order = $order_temp;\r\n $visitor = AE_Payment_Factory::createPaymentVisitor($paymentType, $order, $paymentType_raw);\r\n // setup visitor setting\r\n $visitor->set_settings($arg);\r\n // accept visitor process payment\r\n $nvp = $order->accept($visitor);\r\n if ($nvp['ACK']) {\r\n $response = array(\r\n 'success' => $nvp['ACK'],\r\n 'data' => $nvp,\r\n 'paymentType' => $paymentType\r\n );\r\n } else {\r\n $response = array(\r\n 'success' => false,\r\n 'paymentType' => $paymentType,\r\n 'msg' => __(\"Invalid payment gateway!\", ET_DOMAIN)\r\n );\r\n }\r\n /**\r\n * filter $response send to client after process payment\r\n *\r\n * @param Array $response\r\n * @param String $paymentType The payment gateway user select\r\n * @param Array $order The order data\r\n *\r\n * @package AE Payment\r\n * @category payment\r\n *\r\n * @since 1.0\r\n * @author Dakachi\r\n */\r\n $response = apply_filters('mjob_setup_payment', $response, $paymentType, $order);\r\n return $response;\r\n }",
"public function make3DPayPayment()\n {\n $status = 'declined';\n $response = 'Declined';\n $proc_return_code = $this->request->get('procreturncode');\n\n $transaction_security = 'MPI fallback';\n if (in_array($this->request->get('mdstatus'), [1, 2, 3, 4])) {\n if ($this->request->get('mdstatus') == '1') {\n $transaction_security = 'Full 3D Secure';\n } elseif (in_array($this->request->get('mdstatus'), [2, 3, 4])) {\n $transaction_security = 'Half 3D Secure';\n }\n\n $status = 'approved';\n $response = 'Approved';\n }\n\n $this->response = (object) [\n 'id' => (string) $this->request->get('authcode'),\n 'order_id' => (string) $this->request->get('oid'),\n 'trans_id' => (string) $this->request->get('transid'),\n 'auth_code' => (string) $this->request->get('authcode'),\n 'host_ref_num' => (string) $this->request->get('hostrefnum'),\n 'response' => $response,\n 'transaction_type' => $this->type,\n 'transaction' => $this->order->transaction,\n 'transaction_security' => $transaction_security,\n 'proc_return_code' => $proc_return_code,\n 'code' => $proc_return_code,\n 'md_status' => $this->request->get('mdStatus'),\n 'status' => $status,\n 'status_detail' => isset($this->codes[$this->request->get('ProcReturnCode')]) ? (string) $this->request->get('ProcReturnCode') : null,\n 'hash' => (string) $this->request->get('secure3dhash'),\n 'rand' => (string) $this->request->get('rnd'),\n 'hash_params' => (string) $this->request->get('hashparams'),\n 'hash_params_val' => (string) $this->request->get('hashparamsval'),\n 'masked_number' => (string) $this->request->get('MaskedPan'),\n 'amount' => (string) $this->request->get('amount'),\n 'currency' => (string) $this->request->get('currency'),\n 'tx_status' => (string) $this->request->get('txstatus'),\n 'eci' => (string) $this->request->get('eci'),\n 'cavv' => (string) $this->request->get('cavv'),\n 'xid' => (string) $this->request->get('xid'),\n 'error_code' => (string) $this->request->get('errcode'),\n 'error_message' => (string) $this->request->get('errmsg'),\n 'md_error_message' => (string) $this->request->get('mderrormessage'),\n 'campaign_url' => null,\n 'name' => (string) $this->request->get('firmaadi'),\n 'email' => (string) $this->request->get('Email'),\n 'extra' => $this->request->get('Extra'),\n 'all' => $this->request->all(),\n ];\n\n return $this;\n }",
"function _postPayment($data) {\r\n\t\t// Process the payment\r\n\t\t$app = JFactory::getApplication ();\r\n\t\t$vars = new JObject ();\r\n\t\t$html = '';\r\n\t\t$order_id = $_POST[\"order_id\"];\r\n\t\t\r\n\t\t/* APC Code */\r\nif ($_POST[\"order_id\"] != \"\"){\r\n// Payment confirmation from http post \r\nini_set(\"SMTP\",\"mail.nochex.com\" ); \r\n$header = \"From: [email protected]\";\r\n\r\n$your_email = $_POST[\"from_email\"]; // your merchant account email address\r\n \r\n// uncomment below to force a DECLINED response \r\n//$_POST['order_id'] = \"1\"; \r\n\r\n$url = \"https://secure.nochex.com/apc/apc.aspx\";\r\n$postvars = http_build_query($_POST);\r\n\r\n$ch = curl_init ();\r\ncurl_setopt ($ch, CURLOPT_URL, $url);\r\ncurl_setopt ($ch, CURLOPT_POST, true); \r\ncurl_setopt ($ch, CURLOPT_POSTFIELDS, $postvars);\r\ncurl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);\r\ncurl_setopt ($ch, CURLOPT_TIMEOUT, 60);\r\n//curl_setopt ($ch, CURLOPT_SSLVERSION, 0);\r\ncurl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, false);\r\ncurl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);\r\n$response = curl_exec ($ch);\r\ncurl_close ($ch);\r\n\r\n// stores the response from the Nochex server \r\n$debug = \"IP -> \" . $_SERVER['REMOTE_ADDR'] .\"\\r\\n\\r\\nPOST DATA:\\r\\n\"; \r\nforeach($_POST as $Index => $Value) \r\n$debug .= \"$Index -> $Value\\r\\n\"; \r\n$debug .= \"\\r\\nRESPONSE:\\r\\n$response\";\r\n// Retrieves the order_id and save it as a variable which can be used in the update query to find a particular record in a database or datatable.\t\r\n\t $order_ID = $_POST['order_id']; \r\n// An email to check the order_ID\r\n\t$order = F0FTable::getInstance ( 'Order', 'J2StoreTable' )->getClone ();\r\n\t\tif ($order->load ( array (\r\n\t\t\t\t'order_id' => $order_id\r\n\t\t) )) {\r\n\t\t\r\n\t$order->transaction_id = $_POST[\"transaction_id\"];\r\n\t$order->transaction_status = $response;\r\n\t\t\t\t\t\r\nif (!strstr($response, \"AUTHORISED\")) { // searches response to see if AUTHORISED is present if it isnt a failure message is displayed\r\n $msg = \"APC was not AUTHORISED.\\r\\n\\r\\n$debug\"; // displays debug message\t\r\n\t\r\n\t$order->transaction_details = $msg . \", and this was a \" . $_POST[\"status\"] . \" transaction\";\r\n\t$order_state_id = $this->params->get ( 'payment_status', 4 );\r\n\t$order->update_status ( $order_state_id, true );\t\t\r\n\t\r\n} else { \r\n\t$msg = \"APC was AUTHORISED\";\r\n\r\n\t$order->transaction_details = $msg . \", and this was a \" . $_POST[\"status\"] . \" transaction\";\r\n\t\r\n\t$order_state_id = $this->params->get ( 'payment_status', 4 );\r\n\t$order->update_status ( $order_state_id, true );\t\t\r\n\t\r\n\t$order->reduce_order_stock();\r\n\t$order->payment_complete();\r\n\t$order->empty_cart();\r\n\t}\r\n}\r\n}else{\r\n\r\n$html = \"<div style=\\\"padding:20px;box-shadow:1px 1px 1px #666;border:1px solid #666;margin:20px;\\\"><i class=\\\"icon-star\\\" style=\\\"color:gold;float:right\\\"></i><h3>Congratulation's</h3><p>Your order: \" . $data['order_id'] . \" has been successful</p></div>\";\r\n\r\nreturn $html;\r\n\t \r\n\t}\r\n}",
"function commerce_oz_migs_2p_submit_form_submit($payment_method, $pane_form, $pane_values, $order, $charge) {\n \n\tdsm($payment_method);\n \t/* dsm($pane_form);\n \t \t// dsm($pane_values);\n \t \t \t// dsm($order);\n \t \t \t// dsm($charge);\n */\n \t \t \t\n // Get the order\n $order_wrapper = entity_metadata_wrapper('commerce_order', $order);\n $order_id = $order->order_id;\n \n $pane_values['credit_card'] = $pane_values['commweb_3p_head']['credit_card'];\n // // dsm($pane_values);\n \n // Get the settings and set some vars for same\n // $settings = $payment_method['settings'];\n $debugmode = 'debug'; //$settings['commerce_commweb_vpc_settings']['commerce_commweb_vpc_debug'];\n $livemode = 'test'; //$settings['commerce_commweb_vpc_settings']['commerce_commweb_vpc_mode'];\n \n\t// Transaction record\n\t// Prepare a transaction object to log the API response.\n $transaction = commerce_payment_transaction_new($payment_method['base'], $order->order_id);\n \n // Save the transaction information for a fresh transaction id.\n commerce_payment_transaction_save($transaction);\n \n\t// BUILD THE POST DATA\n\t// Use Test Amount if necessary\n\tif(($pane_values['credit_card']['test_amount']) && ($livemode == 'test'))\n\t{\t$amount = $pane_values['credit_card']['test_amount'];\n\t\t\n\t} else {\t$amount = $charge['amount'];\n\t\t\n\t}\n\t\n\t$gateway_key = $payment_method['gateway_provider'];\n\t\n\t\n $request_string = _commerce_oz_build_migs_request_payload($order, $transaction, $pane_values, $amount, $gateway_key); \n//\t// dsm($request_string, '$request_string');\n\t\n\t$request_map = _commerce_oz_process_vpc_request($request_string);\n//\t// dsm($request_map, '$request_map');\n\n\t// VPC curl function\n\t$response_string = _commerce_oz_post_migs_request($request_string);\n\t\n\t// Map curl response to array and update transaction object\n\t$response_map = _commerce_oz_process_vpc_response($transaction, $payment_method, $response_string, $request_map);\n\t\n\t\t// Debug information\n if($debugmode == 'debug')\n {\n \n \tdpm($request_map);\n \twatchdog('commerce_oz', 'Request Data was: @requestdata', array('@requestdata' => $request_string), WATCHDOG_DEBUG);\n\n \n\t\tdpm($response_map);\n \twatchdog('commerce_oz', 'Response Map: @returndata', array('@returndata' => print_r($response_map, true)), WATCHDOG_DEBUG);\n \t\n }\n\n // Save the transaction information.\n commerce_payment_transaction_save($transaction);\n\t\n\t// Fire completion Rule\n\trules_invoke_event('commerce_oz_transaction_complete', $transaction);\n\n // If the payment failed, display an error and rebuild the form.\n if ($transaction->status === COMMERCE_PAYMENT_STATUS_FAILURE) \n {\n \n drupal_set_message(t('There was an error processing your card. <br />Check your information or try a different card.'), 'error');\n \n drupal_set_message('Response: ' . $response_map['vpc_TxnResponseCode'] . ' - Message: \"' . $response_map['vpc_Message'] . '\"', 'error');\n \n watchdog('commerce_oz', \n \t\t\t\t\t'Failed - Request: @requestdata2', \n \t\t\t\t\tarray('@requestdata2' => $request_map), WATCHDOG_WARNING);\n \n watchdog('commerce_oz', \n \t\t\t\t\t'Failed - Response: @requestdata3', \n \t\t\t\t\tarray('@requestdata3' => $response_map), WATCHDOG_WARNING);\n \n \t// Fire failure Rule\n rules_invoke_event('commerce_oz_transaction_fail', $transaction);\n \n return FALSE;\n \n } else { \n \n \t// Fire success Rule\n \trules_invoke_event('commerce_oz_transaction_success', $transaction);\n \t\n \treturn TRUE;\n \n }\n\n}",
"private function createPaymentRequest()\n {\n $helper = Mage::helper('pagseguro');\n\n // Get references that stored in the database\n $reference = $helper->getStoreReference();\n\n $paymentRequest = new PagSeguroPaymentRequest();\n $paymentRequest->setCurrency(PagSeguroCurrencies::getIsoCodeByName(self::REAL));\n $paymentRequest->setReference($reference . $this->order->getId()); //Order ID\n $paymentRequest->setShipping($this->getShippingInformation()); //Shipping\n $paymentRequest->setSender($this->getSenderInformation()); //Sender\n $paymentRequest->setItems($this->getItensInformation()); //Itens\n $paymentRequest->setShippingType(SHIPPING_TYPE);\n $paymentRequest->setShippingCost(number_format($this->order->getShippingAmount(), 2, '.', ''));\n $paymentRequest->setNotificationURL($this->getNotificationURL());\n $helper->getDiscount($paymentRequest);\n\n //Define Redirect Url\n $redirectUrl = $this->getRedirectUrl();\n\n if (!empty($redirectUrl) and $redirectUrl != null) {\n $paymentRequest->setRedirectURL($redirectUrl);\n } else {\n $paymentRequest->setRedirectURL(Mage::getUrl() . 'checkout/onepage/success/');\n }\n\n //Define Extra Amount Information\n $paymentRequest->setExtraAmount($this->extraAmount());\n\n try {\n $paymentUrl = $paymentRequest->register($this->getCredentialsInformation());\n } catch (PagSeguroServiceException $ex) {\n Mage::log($ex->getMessage());\n $this->redirectUrl(Mage::getUrl() . 'checkout/onepage');\n }\n\n return $paymentUrl;\n }",
"public function action_payments() {\n $package = Model::factory('package');\n $postvalue = $errors = array();\n $postvalue = $this->request->post();\n $payment_gateway_id= isset($postvalue['payment_gateway_type'])?$postvalue['payment_gateway_type']:0;\n \n $payment_settings = $package->get_payment_details($payment_gateway_id);\n $paypal_payment_settings=$package->get_paypal_payment_details();\n //echo \"<pre>\"; print_r($payment_settings); exit;\n $this->template->meta_description = CLOUD_SITENAME . \" | Payments \";\n $this->template->meta_keywords = CLOUD_SITENAME . \" | Payments \";\n $this->template->title = CLOUD_SITENAME . \" | \" . __('Payments');\n $this->template->page_title = __('Payments');\n \n if (class_exists('Paymentgateway')) { \n $payment_gateway_list = Paymentgateway::payment_auth_credentials_view();\n \n } else {\n trigger_error(\"Unable to load class: Paymentgateway\", E_USER_WARNING);\n }\n \n $form_top_fields= isset($payment_gateway_list[1])?$payment_gateway_list[1]:[];\n $form_fields= isset($payment_gateway_list[2])?$payment_gateway_list[2]:[];\n $form_live_fields= isset($payment_gateway_list[3])?$payment_gateway_list[3]:[];\n $form_bottom_fields= isset($payment_gateway_list[4])?$payment_gateway_list[4]:[];\n\n $this->template->content = View::factory(\"admin/package_plan/payments\")\n ->bind('payment_settings', $payment_settings)\n ->bind('paypal_payment_settings',$paypal_payment_settings)\n ->bind('form_top_fields', $form_top_fields)\n ->bind('form_fields', $form_fields)\n ->bind('form_live_fields', $form_live_fields)\n ->bind('form_bottom_fields', $form_bottom_fields)\n ->bind('payment_gateway_list',$payment_gateway_list[0])\n ->bind('postvalue', $postvalue)\n ->bind('errors', $errors);\n }",
"public function process_payment(){\n if($this->input->server('REQUEST_METHOD') == 'POST') {\n \n // Get all field values.\n $form_fields = $this->input->post(NULL);\n \n //Set Requiered parameter to be pass to merchant payment process\n $parameter = array(\n 'schedule_id' => $form_fields['schedule_id'],\n 'exception_id' => $form_fields['exception_id'],\n 'school_id' => $form_fields['school_id'],\n 'percentage' => $form_fields['percentage'],\n 'schedule_type' => $form_fields['schedule_type'],\n 'session_name' => $form_fields['session_name'],\n 'session_id' => $form_fields['session_id'],\n 'penalty' => $form_fields['penalty'],\n 'user_id' => $form_fields['user_id'],\n 'amount' => $form_fields['amount'],\n 'revenue_head' => $form_fields['revhead']\n );\n \n //initiate pay process : Send the parameter to pay merchant\n $this->pay->process($parameter);\n \n \n }else{\n \n //Set error message for any request other than POST\n $error_msg = $this->lang->line('invalid_req_method'); \n $this->main->set_notification_message(MSG_TYPE_ERROR, $error_msg);\n \n // Redirect to payment set, showing notifiction messages if there are.\n redirect(site_url('payment/myschedule'));\n } \n \n }",
"public function run()\n {\n PaymentMethod::create([\n \t\t'name' => 'Cash On Delivery'\n \t]);\n\n \tPaymentMethod::create([\n \t\t'name' => 'PayPal'\n \t]);\n }",
"public function card(Request $request)\r\n {\r\n $amount=$request->amount;\r\n ini_set('max_execution_time', 900);\r\n $Auth_API_url = \"https://accept.paymobsolutions.com/api/auth/tokens\";\r\n $register_order_API_url = \"https://accept.paymobsolutions.com/api/ecommerce/orders\";\r\n $payment_keys_API_url = \"https://accept.paymobsolutions.com/api/acceptance/payment_keys\";\r\n $card_pay_API_url = \"https://accept.paymobsolutions.com/api/acceptance/iframes\";\r\n DB::beginTransaction();\r\n try{\r\n $auhtrequestdata = ['api_key' => 'ZXlKaGJHY2lPaUpJVXpVeE1pSXNJblI1Y0NJNklrcFhWQ0o5LmV5SmpiR0Z6Y3lJNklrMWxjbU5vWVc1MElpd2libUZ0WlNJNkltbHVhWFJwWVd3aUxDSndjbTltYVd4bFgzQnJJam8wT1RBME5uMC5xcS1RZDhEbXFjaTZidWo5VGdfWnI5eGZhd1g0QmhNNWo5dnRRblNwS3JWeTROWE90dFdkQTFOTDcyRXRlSXktTzBmNjYxWDhrUzBUcjZBVjQxeTJ6UQ=='];\r\n $authresponse = Http::post($Auth_API_url, $auhtrequestdata);\r\n if($authresponse->getStatusCode()==201 || $authresponse->getStatusCode()==200){\r\n $authtoken=$authresponse[\"token\"]; //get auth token from authentication request\r\n ////////////////////////////////////////////////////// register order\r\n ///{\r\n // \"auth_token\":{{from previus step}}\",\r\n // \"delivery_needed\": \"false\",\r\n // \"merchant_id\": \"49046\",\r\n // \"amount_cents\": \"100\",\r\n // \"currency\": \"EGP\",\r\n // \"items\": []\r\n //}\r\n ///\r\n ///\r\n $registerOrderData = ['auth_token' => $authtoken,'delivery_needed' => \"false\",'merchant_id' =>'49046','amount_cents' =>$amount*100,'currency' =>\"EGP\",'items' =>[]\r\n ];\r\n $registerOrderresponse = Http::post($register_order_API_url, $registerOrderData);\r\n\r\n if($registerOrderresponse->getStatusCode()==201 || $registerOrderresponse->getStatusCode()==200){\r\n $getorderId=$registerOrderresponse[\"id\"]; //get order id from order request\r\n ////////////////////////////////////////////////////// payment_keys\r\n ///{{\r\n // \"auth_token\":{{from step one}}\",\r\n // \"amount_cents\": \"100\",\r\n // \"expiration\": 3600,\r\n // \"order_id\": {{from previus step}},\r\n // \"currency\": \"EGP\",\r\n // \"integration_id\": {{ from dashboard }},\r\n // \"lock_order_when_paid\": \"false\"\r\n //}\r\n ///\r\n $payment_keysData = ['auth_token' => $authtoken,'expiration' => \"3600\",'integration_id' =>'126404',\r\n 'amount_cents' =>$amount*100,'currency' =>\"EGP\",'order_id' => $getorderId ,\"lock_order_when_paid\" => \"false\",\r\n \"billing_data\"=> [\r\n \"apartment\" => \"803\",\r\n \"email\"=> \"[email protected]\",\r\n \"floor\"=> \"42\",\r\n \"first_name\"=> \"Clifford\",\r\n \"street\"=> \"Ethan Land\",\r\n \"building\"=> \"8028\",\r\n \"phone_number\"=> \"+86(8)9135210487\",\r\n \"shipping_method\"=> \"PKG\",\r\n \"postal_code\"=> \"01898\",\r\n \"city\"=> \"Jaskolskiburgh\",\r\n \"country\"=> \"CR\",\r\n \"last_name\"=> \"Nicolas\",\r\n \"state\"=> \"Utah\"\r\n ]\r\n ];\r\n\r\n $payment_keysresponse = Http::post($payment_keys_API_url, $payment_keysData);\r\n\r\n if($payment_keysresponse->getStatusCode()==201 || $payment_keysresponse->getStatusCode()==200){\r\n $pay_token=$payment_keysresponse[\"token\"]; //get pay token from pay request\r\n//\r\n $final_url=$card_pay_API_url.'/'.'128169'.'?payment_token='.$pay_token;\r\n return redirect()->away($final_url);\r\n }\r\n else{\r\n return redirect()->back()->with('danger',\"error while get payment token\");\r\n }\r\n\r\n // ///\r\n // ///\r\n // ///\r\n // /// ///////////////////////////////////////////////////////\r\n }else{\r\n return redirect()->back()->with('danger', \"Register Order Error\");\r\n }\r\n ///\r\n ///\r\n ///\r\n ///\r\n /// ///////////////////////////////////////////////////////\r\n }else{\r\n return redirect()->back()->with('danger', \"Cannot Authenticate Error\");\r\n }\r\n\r\n\r\n DB::commit();\r\n }catch (\\Exception $e) {\r\n DB::rollback();\r\n return redirect()->back()->with('danger', \"Unexpected Error\");\r\n } catch (\\Throwable $th) {\r\n DB::rollBack();\r\n return redirect()->back()->with('danger', \"some Thing Error\");\r\n }\r\n return view('welcome');\r\n }"
] | [
"0.65580446",
"0.6280192",
"0.62741697",
"0.6272556",
"0.6261315",
"0.6218028",
"0.6154305",
"0.6152693",
"0.6142958",
"0.6137303",
"0.6122297",
"0.6094523",
"0.60635555",
"0.60129654",
"0.60076714",
"0.5984312",
"0.5969209",
"0.5896405",
"0.58901674",
"0.5879535",
"0.5872319",
"0.58704543",
"0.5858368",
"0.5852893",
"0.5851675",
"0.5836873",
"0.58232474",
"0.58210576",
"0.5808074",
"0.5795699",
"0.57685274",
"0.5726638",
"0.571292",
"0.5712044",
"0.5694575",
"0.56896025",
"0.56884867",
"0.568555",
"0.5677307",
"0.5676899",
"0.5670797",
"0.56452245",
"0.56438684",
"0.5633233",
"0.5633233",
"0.5633233",
"0.56260586",
"0.56260085",
"0.5622682",
"0.5615865",
"0.56110823",
"0.5601169",
"0.5598822",
"0.55973554",
"0.5583148",
"0.5582059",
"0.55814415",
"0.5577906",
"0.557732",
"0.557683",
"0.5576358",
"0.5569648",
"0.55620414",
"0.5560138",
"0.55533946",
"0.55531293",
"0.5547587",
"0.55195636",
"0.55184746",
"0.55166596",
"0.55060536",
"0.5494972",
"0.5482993",
"0.5480653",
"0.54792786",
"0.54786927",
"0.5474336",
"0.5473833",
"0.54729134",
"0.54665416",
"0.5465118",
"0.54641443",
"0.5458488",
"0.54553586",
"0.54485357",
"0.5438637",
"0.5434256",
"0.5428345",
"0.5426946",
"0.54232264",
"0.5421987",
"0.5419064",
"0.5417868",
"0.5416544",
"0.5416135",
"0.540888",
"0.5401491",
"0.53987354",
"0.5397615",
"0.53975415",
"0.5391766"
] | 0.0 | -1 |
Return order instance with loaded information by increment id | protected function _getOrder()
{
if ($this->getOrder()) {
$order = $this->getOrder();
} else if ($this->getCheckout()->getLastRealOrderId()) {
$order = Mage::getModel('sales/order')->loadByIncrementId($this->getCheckout()->getLastRealOrderId());
} else {
return null;
}
return $order;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getOrderByIncrementId($id)\n {\n return Mage::getModel('sales/order')->loadByIncrementId($id);\n }",
"public function getOrderByIncrementId($id)\n {\n return Mage::getModel('sales/order')->loadByIncrementId($id);\n }",
"public function getOrder()\n {\n return $this->orderFactory->create()->load($this->getReservedOrderId(), 'increment_id');\n }",
"public function getOrderId();",
"protected function _initOrder()\n {\n $id = $this->getRequest()->getParam('id');\n $order = Mage::getModel('sales/order')->load($id);\n\n Mage::register('sales_order', $order);\n Mage::register('current_order', $order);\n return $order;\n }",
"public function getOrder();",
"public function getOrder();",
"public function getOrder();",
"public function getOrder();",
"public function getOrder();",
"public function getOrder();",
"private function loadOrder()\n {\n $brqOrderId = $this->getOrderIncrementId();\n\n //Check if the order can receive further status updates\n $this->order->loadByIncrementId((string) $brqOrderId);\n\n if (!$this->order->getId()) {\n $this->logging->addDebug('Order could not be loaded by brq_invoicenumber or brq_ordernumber');\n // try to get order by transaction id on payment.\n $this->order = $this->getOrderByTransactionKey();\n }\n }",
"public function generateOrder();",
"public static function getOrderIncrementId()\n {\n return self::$orderIncrementId;\n }",
"protected function _getOrder()\n {\n if (empty($this->_order)) {\n // get proper order\n $id = $this->_request['track_id'];\n $this->_order = Mage::getModel('sales/order')->loadByIncrementId($id);\n if (!$this->_order->getId()) {\n $this->_debugData['exception'] = sprintf('Wrong order ID: \"%s\".', $id);\n $this->_debug();\n Mage::app()->getResponse()\n ->setHeader('HTTP/1.1','503 Service Unavailable')\n ->sendResponse();\n exit;\n }\n }\n return $this->_order;\n }",
"public function getOrder($id) {\n return Order::fetch($id);\n }",
"public function getOrderNumber();",
"public function getOrderNumber();",
"public function getOrderIncrementId(){\n return $this->_getData(self::ORDER_INCREMENT_ID);\n }",
"public static function getOrder(): int;",
"function getOrder();",
"public function getOrderId()\r\n {\r\n return $this->object;\r\n }",
"public function getInvoiceOrder();",
"protected function GetOrderID() {\n\treturn $this->Value('ID_Order');\n }",
"public function getOrderId()\n {\n return $this->source['order_id'];\n }",
"public static function createOrder($data)\r\n\t{\r\n\t\treturn new Order($id);\r\n\t}",
"private function getOrder(string $incrementId): OrderInterface\n {\n /** @var Order $order */\n $order = $this->objectManager->create(Order::class);\n $order->loadByIncrementId($incrementId);\n\n return $order;\n }",
"function getOrder()\n {\n return 10;\n }",
"public function orderId(): int\n {\n return $this->order->id();\n }",
"protected function _initOrder()\r\n {\r\n $id = $this->getRequest()->getParam('id');\r\n $order = Mage::getModel('sales/order')->load($id);\r\n\r\n if (!$order->getId()) {\r\n $this->_getSession()->addError($this->__('This order no longer exists.'));\r\n return false;\r\n }\r\n Mage::register('sales_order', $order);\r\n Mage::register('current_order', $order);\r\n return $order;\r\n }",
"public function getOrder()\n {\n return 1;// TODO: Implement getOrder() method.\n }",
"public function getOrder()\n {\n\n }",
"private function getOrderNumber()\n {\n $number = Shopware()->Db()->fetchOne(\"/*NO LIMIT*/ SELECT number FROM s_order_number WHERE name='invoice' FOR UPDATE\");\n Shopware()->Db()->executeUpdate(\"UPDATE s_order_number SET number = number + 1 WHERE name='invoice'\");\n $number += 1;\n\n return $number;\n }",
"protected function OrderID() {\n\treturn $this->Value('ID_Order');\n }",
"function getOrder()\n{\n\n}",
"public function createCustomOrder()\n {\n AutoEvent::select('custom_order')->increment('custom_order', 1);\n $this->custom_order = 0;\n }",
"public function find(int $id): Order\n {\n return Order::find($id);\n }",
"function getOrder(){\n\t\treturn $this->order;\n\t}",
"public function getOrder()\n {\n // echo 'start at order_id = ' . $first ;\n // echo '<br><br>';\n $raws = DB::table('raw_order_transaction')->where('migrate_status', 'no')->take(100)->get();\n\n foreach ($raws as $key => $val)\n {\n try\n {\n $order = new Order;\n\n // Auto\n // $order->id = ;\n // $order->pkey = ;\n\n // OK\n $order->app_id = 1;\n $order->order_ref = $val->order_ref;\n $order->ref1 = $val->ref_1;\n $order->ref2 = $val->ref_2;\n $order->ref3 = $val->ref_3;\n\n // Set payment_order_id = null (Temporarily)\n $order->payment_order_id = NULL;\n $order->barcode = $val->barcode;\n\n // Right ?\n $order->customer_ref_id = $val->member_ref_id;\n\n // OK\n $order->customer_name = $val->customer_name;\n $order->customer_address = $val->customer_address;\n $order->customer_district = $val->customer_district;\n $order->customer_district_id = (int) DB::table('districts')->where('name', '=', $val->customer_district)->pluck('id');\n $order->customer_city = $val->customer_city;\n $order->customer_city_id = (int) DB::table('cities')->where('name', '=', $val->customer_city)->pluck('id');\n $provinceId = (int) DB::table('cities')->where('name', '=', $val->customer_city)->pluck('province_id');\n if ($provinceId > 0)\n {\n $order->customer_province = DB::table('provinces')->where('id', $provinceId)->pluck('name');\n $order->customer_province_id = $provinceId;\n }\n $order->customer_postcode = $val->customer_postcode;\n $order->customer_tel = $val->customer_tel;\n $order->customer_email = $val->customer_email;\n\n // Where ?\n $order->customer_info_modified_at = NULL;\n\n $order->payment_channel = $val->payment_channel;\n\n if ( !empty($val->payment_method_code) )\n {\n if ( $val->payment_method_code == 'CCinstM#3' or $val->payment_method_code == 'CCinstM#6' )\n {\n $val->payment_method_code = 'CCinstM';\n }\n\n $order->payment_method = DB::table('payment_methods')->where('code', '=', $val->payment_method_code)->pluck('id');\n }\n\n $order->installment = $val->installment;\n $order->transaction_time = $val->transaction_time;\n $order->total_price = $val->total_price;\n\n // Calculate Later ?\n $order->discount = 0;\n\n // OK ?\n $order->discount_text = NULL;\n $order->total_shipping_fee = 0;\n\n // right ?\n $order->sub_total = $order->total_price - $order->discount;\n\n $orderStatus = array(\n // 'delivering' => Order::SHIPPING_SENDING,\n 'order-complete' => Order::STATUS_NEW,\n 'waiting-payment' => Order::STATUS_WAITING,\n // 'success' => Order::STATUS_COMPLETE\n );\n\n if ( !empty($val->order_status) )\n {\n if ( Str::slug($val->order_status) == 'delivering' or Str::slug($val->order_status) == 'success' )\n {\n continue;\n }\n\n $order->order_status = $orderStatus[Str::slug($val->order_status)];\n }\n\n $paymentStatus = array(\n 'success' => Order::PAYMENT_RECONCILE,\n 'processing' => Order::PAYMENT_WAITING,\n 'waiting-approve' => Order::PAYMENT_SUCCESS,\n 'failed' => Order::PAYMENT_FAILED\n );\n\n if ( !empty($val->payment_status) )\n {\n $order->payment_status = $paymentStatus[Str::slug($val->payment_status)];\n }\n\n // ???\n $order->gift_status = NULL;\n $order->sla_time_at = NULL;\n $order->customer_status = NULL;\n $order->customer_sla_time_at = NULL;\n\n // ???\n $order->expired_at = $val->expired_at;\n $order->invoice = $val->invoice;\n // Default\n $order->analytics_status = ( empty($val->analytic_status) ) ? 'N' : $val->analytic_status ;\n $order->created_at = ( empty($val->created_at) ) ? date('Y-m-d H:i:s') : $val->created_at ;\n $order->updated_at = ( empty($val->updated_at) ) ? date('Y-m-d H:i:s') : $val->updated_at ;\n $order->deleted_at = $val->deleted_at;\n\n $order->save();\n\n // Mapping\n DB::table('order_maps')->insert(\n array(\n 'itruemart_id' => $val->order_id,\n 'pcms_id' => $order->id,\n 'pkey' => $order->pkey,\n )\n );\n\n // In this migration data, 1 order has only one shipments,\n // create shipment for this order\n $orderShipment = new OrderShipment;\n $orderShipment->order_id = $order->id;\n\n // null ?\n $orderShipment->shipment_ref = '';\n\n // Fix !\n $orderShipment->shipping_method = ShippingMethod::where('name', '=', 'iTruemart Free Shipping')->pluck('id');\n $orderShipment->shipping_fee = 0;\n\n // Fix ?\n $orderShipment->shipment_status = 'delivered';\n\n // We'll calculate this later.\n $orderShipment->total_price = 0;\n\n $orderShipment->stock_type = NULL;\n $orderShipment->vendor_id = NULL;\n $orderShipment->shop_id = NULL;\n $orderShipment->tracking_number = NULL;\n $orderShipment->sla_time_at = NULL;\n $orderShipment->created_at = $val->created_at;\n $orderShipment->updated_at = $val->updated_at;\n $orderShipment->deleted_at = $val->deleted_at;\n\n $orderShipment->save();\n\n\n\n $rawItems = DB::table('raw_order_item')->where('order_id', $val->order_id)->get();\n\n foreach ($rawItems as $k => $item)\n {\n try\n {\n if ( empty($item->order_id) or empty($item->inventory_id) or empty($item->name) or empty($item->quantity) or empty($item->price) )\n {\n continue;\n }\n\n // $osi is mean '$orderShipmentItem'\n $osi = new OrderShipmentItem;\n $osi->shipment_id = $orderShipment->id;\n $osi->order_id = $order->id;\n $osi->material_code = $item->material_code;\n $osi->inventory_id = $item->inventory_id;\n $osi->name = $item->name;\n // $osi->category = ;\n // $osi->brand = ;\n $osi->quantity = $item->quantity;\n // $osi->price = $item->price;\n // $osi->margin = $item->margin;\n // $osi->discount = $item->discount;\n // $osi->total_price = $item->total_price;\n\n // itruemart logic ??? WTF !?\n $osi->price = $item->total_price;\n $osi->total_price = $osi->price * $osi->quantity;\n $osi->margin = $item->margin;\n $osi->total_margin = $item->total_margin;\n $osi->discount = $item->discount;\n\n $osi->vendor_id = (int) $item->vendor_id;\n $osi->shop_id = (int) $item->shop_id;\n $osi->options = $item->options;\n // default\n // $osi->item_status = ;\n // $osi->is_gift_item = ;\n $osi->tracking_number = $item->tracking_number;\n $osi->created_at = $item->created_at;\n $osi->updated_at = $item->updated_at;\n $osi->deleted_at = $item->deleted_at;\n\n $osi->save();\n\n DB::table('raw_order_item')->where('id', $item->id)->update( array('migrate_status' => 'yes') );\n }\n catch (Exception $e)\n {\n d($e);\n DB::table('raw_order_item')->where('id', $item->id)->update( array('migrate_status' => 'error') );\n die();\n }\n }\n\n DB::table('raw_order_transaction')->where('id', $val->id)->update( array('migrate_status' => 'yes') );\n }\n catch (Exception $e)\n {\n d($e);\n DB::table('raw_order_transaction')->where('id', $val->id)->update( array('migrate_status' => 'error') );\n die();\n }\n }\n\n $count = count($raws);\n echo \"migrate complete. ( {$count} rows )\";\n\n echo '<script>';\n echo 'var delay = 5000;';\n echo 'setTimeout(function(){';\n echo 'window.location.reload();';\n echo '}, delay);';\n echo '</script>';\n }",
"function getOrder()\n {\n return 1;\n }",
"function getOrder()\n {\n return 1;\n }",
"function getOrder()\n {\n return 1;\n }",
"function getOrder()\n {\n return 1;\n }",
"private function _getOrderId(): int\n {\n $orderId = 123456;\n\n return $orderId;\n }",
"public static function order($orderId) {\n //Return an object with the information about $orderId\n\t\t\treturn self::get(self::order_index() . '/' . $orderId);\n\t\t}",
"public function getOrderId(){\n return $this->_getData(self::ORDER_ID);\n }",
"public function getOrderID()\n {\n return $this->orderID;\n }",
"public function getOrderID()\n {\n return $this->orderID;\n }",
"public function getOrderID()\n {\n return $this->orderID;\n }",
"public function getOrderID()\n {\n return $this->orderID;\n }",
"public function getOrder()\n {\n return $this->hasOne(Order::className(), ['id' => 'order_id']);\n }",
"public function getOrder()\n {\n return $this->hasOne(Order::className(), ['id' => 'order_id']);\n }",
"public function regenerateOrderNumber()\n {\n \n }",
"public function getOrderId()\n {\n return $this->order_id;\n }",
"public function getOrderId()\n {\n return $this->order_id;\n }",
"public function getOrderId()\n {\n return $this->order_id;\n }",
"public function getOrderId()\n {\n return $this->order_id;\n }",
"public function getOrder() {\n return 1;\n }",
"public function getOrder()\n {\n return 101;\n }",
"public function loadOrderById($orderId) {\n $this->_orderId = $orderId;\n \n return $this;\n }",
"public function getOrder()\n {\n // TODO: Implement getOrder() method.\n }",
"public function getOrder()\n {\n // TODO: Implement getOrder() method.\n }",
"public function getOrder()\n {\n // TODO: Implement getOrder() method.\n }",
"public function getOrder()\n {\n $order = Mage::registry('current_order');\n if ($order == null) {\n $lastOrderId = Mage::getSingleton('checkout/session')->getLastRealOrderId();\n $order = Mage::getModel('sales/order')->loadByIncrementId($lastOrderId);\n }\n return $order;\n }",
"public function getOrderId()\n {\n return $this->orderId;\n }",
"public function getOrderId()\n {\n return $this->orderId;\n }",
"public function getOrderId()\n {\n return $this->orderId;\n }",
"public function getOrderId()\n {\n return $this->orderId;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"function getOrder()\n {\n return 20;\n }",
"function getOrder()\n {\n return 20;\n }",
"public function getOrder() {\n\n return 1;\n }",
"public function getOrder()\n {\n return 10;\n }",
"public function getOrder()\n {\n return 10;\n }",
"public function getOrder()\n {\n return 10;\n }",
"public function getOrder()\n {\n return 10;\n }"
] | [
"0.67291546",
"0.67291546",
"0.6492036",
"0.6465683",
"0.64578485",
"0.639255",
"0.639255",
"0.639255",
"0.639255",
"0.639255",
"0.639255",
"0.63476264",
"0.6306043",
"0.62254804",
"0.62099755",
"0.620126",
"0.6195853",
"0.6195853",
"0.6171732",
"0.61363333",
"0.60621536",
"0.6059655",
"0.5959038",
"0.59583163",
"0.59494334",
"0.5916839",
"0.59168",
"0.5915287",
"0.5904909",
"0.5883596",
"0.5879428",
"0.58714926",
"0.5866042",
"0.5858283",
"0.5840909",
"0.5834032",
"0.58295095",
"0.5824877",
"0.5808419",
"0.5802636",
"0.5802636",
"0.5802636",
"0.5802636",
"0.5786243",
"0.5785475",
"0.5775528",
"0.5761734",
"0.5761734",
"0.5761734",
"0.5761734",
"0.57540756",
"0.57540756",
"0.5746423",
"0.5744284",
"0.5744284",
"0.5744284",
"0.5744284",
"0.57127845",
"0.57000154",
"0.56990904",
"0.5692434",
"0.5692434",
"0.5692434",
"0.5688548",
"0.5660671",
"0.5660671",
"0.5660671",
"0.5660671",
"0.5660251",
"0.5660251",
"0.5660251",
"0.5660251",
"0.5660251",
"0.5660251",
"0.5660251",
"0.5660251",
"0.5660251",
"0.5660251",
"0.5660251",
"0.5660251",
"0.5660251",
"0.5660251",
"0.5660251",
"0.5660251",
"0.5660251",
"0.5660251",
"0.5660251",
"0.5660251",
"0.5660251",
"0.5660251",
"0.5660251",
"0.5660251",
"0.5660251",
"0.5660251",
"0.5648205",
"0.5648205",
"0.5646843",
"0.5646454",
"0.5646454",
"0.5646454",
"0.5646454"
] | 0.0 | -1 |
Get Form data by using postfinance payment api | public function getFormData()
{
return $this->_getApi()->getFormFields($this->_getOrder(), $this->getRequest()->getParams());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function transactionGetForm ();",
"public function getFormFields()\n {\n $order_id = $this->getOrder()->getRealOrderId();\n $billing = $this->getOrder()->getBillingAddress();\n if ($this->getOrder()->getBillingAddress()->getEmail()) {\n $email = $this->getOrder()->getBillingAddress()->getEmail();\n } else {\n $email = $this->getOrder()->getCustomerEmail();\n }\n\n $params = array(\n 'merchant_fields' => 'partner',\n 'partner' => 'magento',\n 'pay_to_email' => Mage::getStoreConfig(Paynova_Paynovapayment_Helper_Data::XML_PATH_EMAIL),\n 'transaction_id' => $order_id,\n 'return_url' => Mage::getUrl('paynovapayment/processing/success', array('transaction_id' => $order_id)),\n 'cancel_url' => Mage::getUrl('paynovapayment/processing/cancel', array('transaction_id' => $order_id)),\n 'status_url' => Mage::getUrl('paynovapayment/processing/status'),\n 'language' => $this->getLocale(),\n 'amount' => round($this->getOrder()->getGrandTotal(), 2),\n 'currency' => $this->getOrder()->getOrderCurrencyCode(),\n 'recipient_description' => $this->getOrder()->getStore()->getWebsite()->getName(),\n 'firstname' => $billing->getFirstname(),\n 'lastname' => $billing->getLastname(),\n 'address' => $billing->getStreet(-1),\n 'postal_code' => $billing->getPostcode(),\n 'city' => $billing->getCity(),\n 'country' => $billing->getCountryModel()->getIso3Code(),\n 'pay_from_email' => $email,\n 'phone_number' => $billing->getTelephone(),\n 'detail1_description' => Mage::helper('paynovapayment')->__('Order ID'),\n 'detail1_text' => $order_id,\n 'payment_methods' => $this->_paymentMethod,\n 'hide_login' => $this->_hidelogin,\n 'new_window_redirect' => '1'\n );\n\n // add optional day of birth\n if ($billing->getDob()) {\n $params['date_of_birth'] = Mage::app()->getLocale()->date($billing->getDob(), null, null, false)->toString('dmY');\n }\n\n return $params;\n }",
"public function fields() {\n $ID = $this->order['id'];\n $BUYCODE = $this->order['code'];\n $url = (mswSSL() == 'yes' ? str_replace('http://', 'https://', BASE_HREF) : BASE_HREF);\n $order = $this->getsale($ID, $BUYCODE);\n $params = $this->params();\n $timestamp = time();\n $name = $this->firstLastName($order->name);\n $country = $this->country($_POST['country']);\n $amount = $this->saletotal($order);\n $arr = array(\n 'x_login' => $params['login-id'],\n 'x_amount' => $amount,\n 'x_description' => $this->stripchars($this->lang[2]),\n 'x_invoice_num' => $ID,\n 'x_fp_sequence' => $ID,\n 'x_fp_timestamp' => $timestamp,\n 'x_fp_hash' => mmGateway::submissionhash($timestamp, $params, $ID, $amount),\n 'x_test_request' => ($this->settings->paymode == 'live' ? 'false' : 'true'),\n 'x_show_form' => 'PAYMENT_FORM',\n 'x_type' => 'AUTH_CAPTURE',\n 'x_first_name' => $this->stripchars($name['first-name']),\n 'x_last_name' => $this->stripchars($name['last-name']),\n 'x_address' => $this->stripchars($_POST['address1'] . ($_POST['address2'] ? ', ' . $_POST['address2'] : '')),\n 'x_email' => $this->stripchars($order->email),\n 'x_city' => $this->stripchars($_POST['city']),\n 'x_state' => $this->stripchars($_POST['county']),\n 'x_zip' => $this->stripchars($_POST['postcode']),\n 'x_country' => $this->stripchars($country->name),\n 'x_ship_to_first_name' => $this->stripchars($name['first-name']),\n 'x_ship_to_last_name' => $this->stripchars($name['last-name']),\n 'x_ship_to_address' => $this->stripchars($_POST['address1'] . ($_POST['address2'] ? ', ' . $_POST['address2'] : '')),\n 'x_ship_to_city' => $this->stripchars($_POST['city']),\n 'x_ship_to_state' => $this->stripchars($_POST['county']),\n 'x_ship_to_zip' => $this->stripchars($_POST['postcode']),\n 'x_ship_to_country' => $this->stripchars($country->name),\n 'x_relay_response' => 'false',\n 'x_cancel_url' => $url . $this->seo->url('cancel', array(), 'yes'),\n 'x_receipt_method' => 'POST',\n 'x_receipt_link_text' => $this->stripchars(str_replace('{store}', $this->settings->website, $this->lang[5])),\n 'x_receipt_link_url' => $url . 'index.php?gw=' . $ID . '-' . $BUYCODE\n );\n // Only include currency code for live server..\n // Seems to throw errors for test server..\n // If this throws (99) errors on live, uncomment..\n if ($this->settings->paymode == 'live') {\n $arr['x_currency_code'] = (in_array($this->settings->currency, array(\n 'USD',\n 'GBP',\n 'CAD',\n 'EUR'\n )) ? $this->settings->currency : 'USD');\n }\n return $arr;\n }",
"public function getFormFields()\n\t{\n\t\tMage::log(\" --- Snap* Hosted Payments API : getFormFields --- \");\n\n\t\t$aOBFields = array();\n\t\t$billing = $this->getOrder()->getBillingAddress();\n\t\t$shipping = $this->getOrder()->getShippingAddress();\n\t\t$items = $this->getOrder()->getAllItems();\n\n\t\t// customer info\n\t\t$aOBFields['customer[merchant_customer_id]'] = $this->getOrder()->getCustomerId();\n\t\t$aOBFields['customer[email]'] = $this->getOrder()->getCustomerEmail();\n\t\t$aOBFields['customer[first_name]'] = $billing->getFirstname();\n\t\t$aOBFields['customer[last_name]'] = $billing->getLastname();\n\t\t$aOBFields['customer[phone]'] = $billing->getTelephone();\n\n\t\t// order header\n\t\t$aOBFields['order[merchant_order_id]'] = $this->getOrder()->getRealOrderId();\n\t\t$aOBFields['order[total_subtotal]'] = self::_currencyAmount($this->getOrder()->getSubtotal());\n\t\t$aOBFields['order[total_discount]'] = self::_currencyAmount(abs($this->getOrder()->getDiscountAmount()));\n\t\t$aOBFields['order[total_shipping]'] = self::_currencyAmount($this->getOrder()->getShippingAmount());\n\t\t$aOBFields['order[total_tax]'] = self::_currencyAmount($this->getOrder()->getTaxAmount());\n\t\t$aOBFields['order[total]'] = self::_currencyAmount($this->getOrder()->getBaseGrandTotal());\n\t\t//$aOBFields['order[ship_method]'] = '';\n\n\t\t// billing fields\n\t\t$aOBFields['order[billto_company]'] = $billing->getCompany();\n\t\t$aOBFields['order[billto_first_name]'] = $billing->getFirstname();\n\t\t$aOBFields['order[billto_last_name]'] = $billing->getLastname();\n\t\t$aOBFields['order[billto_address1]'] = $billing->getStreet1();\n\t\t$aOBFields['order[billto_address2]'] = $billing->getStreet2();\n\t\t$aOBFields['order[billto_city]'] = $billing->getCity();\n\t\t$aOBFields['order[billto_state]'] = $billing->getRegionCode();\n\t\t$aOBFields['order[billto_country]'] = $billing->getCountry();\n\t\t$aOBFields['order[billto_zipcode]'] = $billing->getPostcode();\n\n\t\t// shipping fields\n\t\tif(!empty($shipping))\n\t\t{\n\t\t\t$aOBFields['order[shipto_company]'] = $shipping->getCompany();\n\t\t\t$aOBFields['order[shipto_first_name]'] = $shipping->getFirstname();\n\t\t\t$aOBFields['order[shipto_last_name]'] = $shipping->getLastname();\n\t\t\t$aOBFields['order[shipto_address1]'] = $shipping->getStreet1();\n\t\t\t$aOBFields['order[shipto_address2]'] = $shipping->getStreet2();\n\t\t\t$aOBFields['order[shipto_city]'] = $shipping->getCity();\n\t\t\t$aOBFields['order[shipto_state]'] = $shipping->getRegionCode();\n\t\t\t$aOBFields['order[shipto_country]'] = $shipping->getCountry();\n\t\t\t$aOBFields['order[shipto_zipcode]'] = $shipping->getPostcode();\n\t\t}\n\n\t\t// items\n\t\tif (!empty($items))\n\t\t{\n\t\t\tfor($nCount=0; $nCount<count($items); $nCount++)\n\t\t\t{\n\t\t\t\t$aOBFields['order_item['.$nCount.'][sku]'] = $items[$nCount]->getSku();\n\t\t\t\t$aOBFields['order_item['.$nCount.'][name]'] = $items[$nCount]->getName();\n\t\t\t\t$aOBFields['order_item['.$nCount.'][price]'] = self::_currencyAmount($items[$nCount]->getPrice());\n\t\t\t\t$aOBFields['order_item['.$nCount.'][qty]'] = $items[$nCount]->getQtyOrdered();\n\t\t\t\t$aOBFields['order_item['.$nCount.'][description]'] = $items[$nCount]->getDescription();\n\t\t\t\t$aOBFields['order_item['.$nCount.'][tax]'] = self::_currencyAmount($items[$nCount]->getTaxAmount());\n\t\t\t}\n\t\t}\n\n\t\t// return URLs\n\t\t$aOBFields['return_url'] = Mage::getUrl('hostedpayments/standard/success', array('_secure' => true));\n\t\t$aOBFields['cancel_url'] = Mage::getUrl('hostedpayments/standard/cancel', array('_secure' => true));\n\n\t\t// check to see if the aheadWorks SARP module is being used and is enabled. if it is then we need to\n\t\t// add additional fields to the post fields array\n\t\tif($this->_isUsingSARP() === true)\n\t\t{\n\t\t\tMage::log(\"is using SARP \");\n\n\t\t\t$aSubscriptionIDs = array();\n\t\t\t$aSubscriptionIDs = $this->_getSubscriptionByOrderID($this->getOrder()->getId());\n\n\t\t\t/*\n\t\t\tforeach($aSubscriptionIDs as $nID)\n\t\t\t{\n\t\t\t\t$oSubscription = Mage::getSingleton('sarp/subscription')->load($nID);\n\t\t\t}\n\t\t\t*/\n\n\t\t\tif(!empty($aSubscriptionIDs))\n\t\t\t{\n\t\t\t\t$oSubscription = Mage::getSingleton('sarp/subscription')->load($aSubscriptionIDs[0]);\n\t\t\t\t$dStartDate = new Zend_Date($oSubscription->getNextSubscriptionEventDate($oSubscription->getDateStart()), Zend_Date::DATE_LONG);\n\t\t\t\t$nTotalOccurrences = 0;\n\n\t\t\t\tif($oSubscription->isInfinite())\n\t\t\t\t\t$nTotalOccurrences = 9999;\n\t\t\t\telse\n\t\t\t\t\t$nTotalOccurrences = Mage::getModel('sarp/sequence')->getCollection()->addSubscriptionFilter($oSubscription)->count();\n\n\t\t\t\t//Mage::log(\"Subscription ID: \" . $aSubscriptionIDs[0]);\n\t\t\t\t//Mage::log(\"Subscription Inerval: \" . $oSubscription->getPeriod()->getPeriodType().\"s\");\n\t\t\t\t//Mage::log(\"Subscription Occurences: \" . $nTotalOccurrences);\n\n\t\t\t\t$aOBFields['sub[auto_process]'] = 0;\n\t\t\t\t$aOBFields['sub[start_date]'] = $dStartDate;\n\t\t\t\t$aOBFields['sub[interval_length]'] = $oSubscription->getPeriod()->getPeriodValue();\n\t\t\t\t$aOBFields['sub[interval_unit]'] = $oSubscription->getPeriod()->getPeriodType().\"s\";\n\t\t\t\t$aOBFields['sub[total_occurrences]'] = $nTotalOccurrences;\n\n\t\t\t\t$aOBFields['sub[trial_occurrences]'] = '';\n\t\t\t\t$aOBFields['sub[trial_amount]'] = 0.00;\n\n\t\t\t\t// order header\n\t\t\t\t$aOBFields['sub[merchant_subscription_id]'] = $this->getOrder()->getRealOrderId();\n\t\t\t\t//$aOBFields['sub[total_subtotal]'] = self::_currencyAmount($this->getOrder()->getSubtotal());\n\n\t\t\t\t// grand total should be the normal price not the first period price\n\n\t\t\t\t$aOBFields['sub[total_discount]'] = self::_currencyAmount(abs($this->getOrder()->getDiscountAmount()));\n\t\t\t\t$aOBFields['sub[total_tax]'] = self::_currencyAmount($this->getOrder()->getTaxAmount());\n\t\t\t\t$aOBFields['sub[ship_method]'] = '';\n\t\t\t\t$aOBFields['sub[total]'] = self::_currencyAmount($this->getOrder()->getBaseGrandTotal());\n\n\t\t\t\t// billing fields\n\t\t\t\t$aOBFields['sub[billto_company]'] = $billing->getCompany();\n\t\t\t\t$aOBFields['sub[billto_first_name]'] = $billing->getFirstname();\n\t\t\t\t$aOBFields['sub[billto_last_name]'] = $billing->getLastname();\n\t\t\t\t$aOBFields['sub[billto_address1]'] = $billing->getStreet1();\n\t\t\t\t$aOBFields['sub[billto_address2]'] = $billing->getStreet2();\n\t\t\t\t$aOBFields['sub[billto_city]'] = $billing->getCity();\n\t\t\t\t$aOBFields['sub[billto_state]'] = $billing->getRegionCode();\n\t\t\t\t$aOBFields['sub[billto_country]'] = $billing->getCountry();\n\t\t\t\t$aOBFields['sub[billto_zipcode]'] = $billing->getPostcode();\n\n\t\t\t\t// shipping fields\n\t\t\t\tif(!empty($shipping))\n\t\t\t\t{\n\t\t\t\t\t$aOBFields['sub[shipto_company]'] = $shipping->getCompany();\n\t\t\t\t\t$aOBFields['sub[shipto_first_name]'] = $shipping->getFirstname();\n\t\t\t\t\t$aOBFields['sub[shipto_last_name]'] = $shipping->getLastname();\n\t\t\t\t\t$aOBFields['sub[shipto_address1]'] = $shipping->getStreet1();\n\t\t\t\t\t$aOBFields['sub[shipto_address2]'] = $shipping->getStreet2();\n\t\t\t\t\t$aOBFields['sub[shipto_city]'] = $shipping->getCity();\n\t\t\t\t\t$aOBFields['sub[shipto_state]'] = $shipping->getRegionCode();\n\t\t\t\t\t$aOBFields['sub[shipto_country]'] = $shipping->getCountry();\n\t\t\t\t\t$aOBFields['sub[shipto_zipcode]'] = $shipping->getPostcode();\n\t\t\t\t}\n\n\t\t\t\t$items = $this->getOrder()->getAllItems();\n\t\t\t\t$nCount = 0;\n\t\t\t\t$nSubCount = 0;\n\t\t\t\t$aOBFields['sub[total_subtotal]'] = 0;\n\t\t\t\t$aOBFields['sub[total]'] = 0;\n\n\t\t\t\t// items\n\t\t\t\tif (!empty($items))\n\t\t\t\t{\n\t\t\t\t\tfor($nCount=0; $nCount<count($items); $nCount++)\n\t\t\t\t\t{\n\t\t\t\t\t\t$oItem = $items[$nCount];\n\n\t\t\t\t\t\tif(Mage::helper('sarp')->isSubscriptionType($items[$nCount]) == 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$productId = $oItem->getProductId();\n\t\t\t\t\t\t\t$oProduct = Mage::getModel('catalog/product')->load($productId);\n\t\t\t\t\t\t\t$nFirstPeriodPrice = self::_currencyAmount($oProduct->getAwSarpFirstPeriodPrice());\n\t\t\t\t\t\t\t$nNormalPrice = self::_currencyAmount((!empty($nFirstPeriodPrice) ? $oProduct->getAwSarpSubscriptionPrice() : $items[$nCount]->getPrice()));\n\n\t\t\t\t\t\t\tMage::log(\"Normal Price:\" . $nNormalPrice);\n\t\t\t\t\t\t\tMage::log(\"First Period Price:\" . $nFirstPeriodPrice);\n\n\t\t\t\t\t\t\tif ($oItem->canInvoice()) $qtys[$oItem->getId()] = $oItem->getQtyToInvoice();\n\n\t\t\t\t\t\t\t$aOBFields['sub_item[' . $nSubCount . '][sku]'] = $items[$nCount]->getSku();\n\t\t\t\t\t\t\t$aOBFields['sub_item[' . $nSubCount . '][name]'] = $items[$nCount]->getName();\n\t\t\t\t\t\t\t$aOBFields['sub_item[' . $nSubCount . '][price]'] = $nNormalPrice;\n\t\t\t\t\t\t\t$aOBFields['sub_item[' . $nSubCount . '][qty]'] = $items[$nCount]->getQtyOrdered();\n\t\t\t\t\t\t\t$aOBFields['sub_item[' . $nSubCount . '][description]'] = $items[$nCount]->getDescription();\n\t\t\t\t\t\t\t//$aOBFields['sub_item[' . $nSubCount . '][details]'] = '';\n\n\t\t\t\t\t\t\tif ($oItem->getIsVirtual())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$aOBFields['sub[total_shipping]'] = 0.00;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$aOBFields['sub[total_shipping]'] = self::_currencyAmount($this->getOrder()->getShippingAmount());\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t$aOBFields['sub[trial_amount]'] = $nFirstPeriodPrice;\n\t\t\t\t\t\t\t*/\n\n\t\t\t\t\t\t\t$aOBFields['sub[total_subtotal]'] += $aOBFields['sub_item[' . $nSubCount . '][price]'];\n\t\t\t\t\t\t\t$aOBFields['sub[total]'] += $aOBFields['sub_item[' . $nSubCount . '][price]'];\n\n\t\t\t\t\t\t\t$nSubCount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tMage::log(\"Not a subscription item: \" . $items[$nCount]->getName());\n\t\t\t\t\t}\n\t\t\t\t\tMage::log(\"Sub. Sub Total: \" . $aOBFields['sub[total_subtotal]']);\n\t\t\t\t\tMage::log(\"Sub. Total: \" . $aOBFields['sub[total]']);\n\t\t\t\t}\n\n\t\t\t\t$aOBFields['sub[total]'] = $aOBFields['sub[total]'] + $aOBFields['sub[total_shipping]'];\n\t\t\t}\n\t\t}\n\n\t\t// generate the MAC and add it as the final param\n\t\t$aOBFields['mac'] = $this->getFormFieldsMAC($aOBFields);\n\n\t\tMage::log(print_r($aOBFields, true));\n\n\t\treturn $aOBFields;\n\t}",
"public function testWebformData() {\n $controller = $this->method->controller;\n $this->assertTrue(webform_paymethod_select_implements_data_interface($controller));\n\n $info = $controller->webformDataInfo();\n $this->assertEmpty(array_diff(['transaction_id' => 'Transaction ID'], $info));\n\n $payment = $payment = entity_create('payment', ['method' => $this->method]);\n $payment->stripe['stripe_id'] = 'pi_test';\n $data = $controller->webformData($payment);\n $this->assertEmpty(array_diff(['transaction_id' => 'pi_test'], $data));\n }",
"public static function getFormData() { \n $result = lC_Products_expected_Admin::formData($_GET['peid']);\n $result['rpcStatus'] = RPC_STATUS_SUCCESS;\n\n echo json_encode($result);\n }",
"public function submitPayment()\n {\n return array('error'=>0, 'transactionReference'=>'');\n \n }",
"public function testGetCurrentPricingDataUsingPOST()\n {\n }",
"public function submitPayment() {\n return array('error' => 0, 'transactionReference' => '');\n }",
"private function getForm() {\n if ($this->get_request_method() != \"POST\") {\n $error = array('status_code' => \"0\", 'message' => \"wrong method\", 'response_code' => \"406\");\n $this->response($this->json($error), 406);\n }\n if (!isset($_SESSION)) {\n session_start();\n }\n $FormID = $_POST['FormID'];\n $sql = mysql_query(\"SELECT * FROM SCP_FormBuilder WHERE FormID='$FormID'\", $this->db);\n $row = mysql_fetch_array($sql, MYSQL_ASSOC);\n if($row) {\n $status = \"success\";\n } else {\n $status = \"fail\";\n }\n $error = array('status_code' => \"1\", 'status' => $status, 'message' => \"Form Get Successfully\", 'response_code' => \"200\", 'response_data' => $row[\"FormDataJson\"]);\n $this->response($this->json($error), 200);\n }",
"public static function getCreditCardForm($order, $amount, $fp_sequence, $relay_response_url, $api_login_id, $transaction_key, $data = null, $test_mode = false, $prefill = true)\n {\n $time = time();\n $fp = self::getFingerprint($api_login_id, $transaction_key, $amount, $fp_sequence, $time);\n $sim = new AuthorizeNetSIM_Form(\n array(\n 'x_amount' => $amount,\n 'x_fp_sequence' => $fp_sequence,\n 'x_fp_hash' => $fp,\n 'x_fp_timestamp' => $time,\n 'x_relay_response'=> \"TRUE\",\n 'x_relay_url' => $relay_response_url,\n 'x_login' => $api_login_id,\n 'x_order' => $order,\n //'x_test_request' => true,\n )\n );\n $hidden_fields = $sim->getHiddenFieldString();\n $post_url = ($test_mode ? self::SANDBOX_URL : self::LIVE_URL);\n $billing_address = (!empty($data['user'])) ? '<div class=\"row\"><label style=\"margin-left:30px; color:#ff8500\">BILLING ADDRESS</label><input type=\"checkbox\" style=\"margin-right:5px;\" id=\"billing\">Use my contact Address here</div>' : \"\"; //BILLING ADDRESS\n $exp_m = '';\n for($i = 1; $i<=12; $i++){\n $j = ($i < 10) ? \"0\".$i : $i;\n $exp_m .= \"<option value='{$j}'>{$j}</option>\";\n } \n\n $Y = date(\"Y\");\n $exp_y = '';\n for($i = $Y; $i < $Y+11; $i++){\n $val = substr($i, -2);\n $exp_y .= \"<option value='{$val}'>{$i}</option>\";\n }\n /*\n<div class=\"row\">\n <label style=\"float:left; margin-left: 30.4%;margin-bottom: 6px;\">Exp.</label>\n <div class=\"date form_datetime b_date\" data-date=\"'.date(\"Y-m-d\").'\" data-date-format=\"mm/dd\" data-link-field=\"dtp_input1\">\n <input size=\"16\" type=\"text\" name=\"x_exp_date\" class=\"form-control1 form-control-bus date_input input-sm\" style=\"width:22%\" value=\"04/17\" readonly>\n <span class=\"add-on\" style=\"float:left;\"><i class=\"icon-th\"></i></span>\n <input type=\"hidden\" id=\"dtp_input1\" value=\"\" />\n </div>\n </div>\n */\n\n \n $form = '\n <div class=\"row payment\" style=\"width:100%;margin:0 auto;text-align:center\"><form method=\"post\" action=\"'.$post_url.'\">\n '.$hidden_fields.'\n <div class=\"row\" style=\"margin-left: -60px;\">\n <label>Card type</label>\n <select name=\"card_type\">\n <option value=\"Visa\">Visa</option>\n <option value=\"American Express\">American Express</option>\n <option value=\"Diners Club\">Diners Club</option>\n <option value=\"Discover\">Discover</option>\n <option value=\"MasterCard\">MasterCard</option>\n <option value=\"UATP Card\">UATP Card</option>\n </select>\n </div>\n <div class=\"row\">\n <label>Card Number</label>\n <input type=\"text\" class=\"text required form-control2 input-sm\" autocomplete=\"off\" size=\"25\" title=\"Card num\" data-toggle=\"popover\" data-content=\"Please enter your card number\" data-type=\"number\" name=\"x_card_num\" value=\"\"></input>\n </div>\n <div class=\"row\">\n <label style=\"float:left; margin-left: 30.4%;margin-bottom: 6px;\">Exp.</label>\n <select name=\"exp_m\" style=\"float:left\">'.$exp_m.'</select>\n <select name=\"exp_y\" style=\"float:left\">'.$exp_y.'</select>\n <input type=\"hidden\" name=\"x_exp_date\" value=\"\">\n </div>\n <div class=\"row\">\n <label style=\"margin-left: 20px;\">CCV</label>\n <input type=\"text\" class=\"text required form-control2 input-sm\" size=\"25\" data-type=\"number\" autocomplete=\"off\" name=\"x_card_code\" value=\"\"></input> <a class=\"glyphicon glyphicon-question-sign\" data-toggle=\"modal\" data-target=\"#myModal\">\n</a>\n </div>\n <div class=\"row\">\n <label>First Name</label>\n <input type=\"text\" class=\"text required form-control2 input-sm\" size=\"25\" title=\"first name\" name=\"x_first_name\" data-content=\"John\" value=\"\"></input>\n </div>\n <div class=\"row\">\n <label>Last Name</label>\n <input type=\"text\" class=\"text required form-control2 input-sm\" size=\"25\" title=\"last name\" name=\"x_last_name\" data-content=\"Doe\" value=\"\"></input>\n </div>'.$billing_address.'\n <div class=\"row\">\n <label>Steet Address</label>\n <input type=\"text\" class=\"text required form-control2 input-sm\" size=\"25\" title=\"address\" name=\"x_address\" data-content=\"123 Main Street\" value=\"\"></input>\n </div>\n <div class=\"row\">\n <label></label>\n <input type=\"text\" class=\"text required form-control2 input-sm\" size=\"25\" title=\"address2\" name=\"x_address2\" data-content=\"123 Main Street\" value=\"\"></input>\n </div>\n <div class=\"row\">\n <label>City</label>\n <input type=\"text\" class=\"text required form-control2 input-sm\" size=\"25\" title=\"city\" name=\"x_city\" data-content=\"Boston\" value=\"\"></input>\n </div>\n <div class=\"row\">\n <label>State</label>\n <select class=\"text required form-control2 input-sm bfh-states\" id=\"state\" name=\"x_state\" data-country=\"country\"></select>\n </div>\n <div class=\"row\">\n <label>Zip Code</label>\n <input type=\"text\" class=\"text required form-control2 input-sm\" size=\"25\" title=\"zip\" data-type=\"number\" name=\"x_zip\" data-content=\"02142\" value=\"\"></input>\n </div>\n <div class=\"row\">\n <label>Country</label>\n <select id=\"country\" name=\"x_country\" class=\"text required form-control2 input-sm bfh-countries\" data-country=\"US\"></select>\n </div>\n <div class=\"row\">\n <div class=\"col-md-12\">\n <label style=\"text-align:center; color:red; margin:0 auto\">amount: $'.$amount.'</label>\n </div>\n </div>\n <div class=\"row\" style=\"text-align:center\">\n<button type=\"button\" id=\"btn-pay\" class=\"noprint btn btn-primary \">Payment</button>\n </div>\n </form></div>';\n return $form;\n }",
"public function submit() {\r\n\t\t$name_value_pairs = array();\r\n\t\tforeach ( $this->request_data as $key => $value ) {\r\n\t\t\t$name_value_pairs[] = $key . '=' . rawurlencode( $value );\r\n\t\t}\r\n\r\n\t\t$url = 'https://mms.paymentsensegateway.com/Pages/PublicPages/PaymentForm.aspx';\r\n\t\t$params = implode( '&', $name_value_pairs );\r\n\t\theader( 'Location: ' . $url . '?' . $params, false );\r\n\t\texit();\r\n\t}",
"public function getForm();",
"private function get_add_cashflow(){\n\t\t$a_e = new FinMathAnnuityEscalating();\n\t\t$a_i = new FinMathAnnuityIncreasing();\n\t\t$c_e = new FinMathCashflow( 0, 0, $a_e );\n\t\t$c_i = new FinMathCashflow( 0, 0, $a_i );\n\t\t$parameters = array();\n\t\t$parameters['single_payment'] = array(\n\t\t\t'name'=> 'single_payment',\n\t\t\t'label' => self::myMessage( 'fm-single_payment'),\n\t\t\t);\n\t\t$parameters_c = array_merge( $c_e->get_parameters(), $c_i->get_parameters() );\n\t\t$parameters = array_merge( $parameters, $parameters_c );\n\t\t$valid_options = array_merge( $c_e->get_valid_options(), $c_i->get_valid_options() );\n\t\t$valid_options['single_payment'] = array( 'type' => 'boolean' );\n\t\t$valid_options['consider_increasing'] = array( 'type' => 'boolean' );\n\t\t$parameters['consider_increasing'] = array(\n\t\t\t'name'=> 'consider_increasing',\n\t\t\t'label' => self::myMessage( 'fm-consider_increasing'),\n\t\t\t);\n\t\tforeach ( array('value','delta', 'escalation_delta', \"source_m\",\"source_advance\",\"source_rate\") as $p ){\n\t\t\tunset( $parameters[ $p ] );\n\t\t\tunset( $valid_options[ $p ] );\n\t\t}\n\t\t$values = array_merge( $c_e->get_values(), $c_i->get_values() );\n\t\t$form = array();\n\t\t$form['method'] = 'GET';\n\t\t$form['parameters'] = $parameters;\n\t\t$form['valid_options'] = $valid_options;\n\t\t$form['request'] = 'add_cashflow';\n\t\t$form['render'] = 'HTML';\n\t\t$form['introduction'] = self::myMessage( 'fm-add-a-cashflow') ;\n\t\t$form['submit'] = self::myMessage( 'fm-add') ;\n\t\t$form['exclude'] = array( \"i_effective\" );\n\t\t$form['values'] = $values;\n\t\t$form['hidden'] = $this->get_hidden_cashflow_fields();\n\t\treturn $form;\n\t}",
"public function callbackhostedpaymentAction()\n {\n $boError = false;\n $formVariables = array();\n $model = Mage::getModel('paymentsensegateway/direct');\n $szOrderID = $this->getRequest()->getPost('OrderID');\n $checkout = Mage::getSingleton('checkout/type_onepage');\n $session = Mage::getSingleton('checkout/session');\n $szPaymentProcessorResponse = '';\n $order = Mage::getModel('sales/order');\n $order->load(Mage::getSingleton('checkout/session')->getLastOrderId());\n $nVersion = Mage::getModel('paymentsensegateway/direct')->getVersion();\n $boCartIsEmpty = false;\n \n try\n {\n $hmHashMethod = $model->getConfigData('hashmethod');\n $szPassword = $model->getConfigData('password');\n $szPreSharedKey = $model->getConfigData('presharedkey');\n \n $formVariables['HashDigest'] = $this->getRequest()->getPost('HashDigest');\n $formVariables['MerchantID'] = $this->getRequest()->getPost('MerchantID');\n $formVariables['StatusCode'] = $this->getRequest()->getPost('StatusCode');\n $formVariables['Message'] = $this->getRequest()->getPost('Message');\n $formVariables['PreviousStatusCode'] = $this->getRequest()->getPost('PreviousStatusCode');\n $formVariables['PreviousMessage'] = $this->getRequest()->getPost('PreviousMessage');\n $formVariables['CrossReference'] = $this->getRequest()->getPost('CrossReference');\n $formVariables['Amount'] = $this->getRequest()->getPost('Amount');\n $formVariables['CurrencyCode'] = $this->getRequest()->getPost('CurrencyCode');\n $formVariables['OrderID'] = $this->getRequest()->getPost('OrderID');\n $formVariables['TransactionType'] = $this->getRequest()->getPost('TransactionType');\n $formVariables['TransactionDateTime'] = $this->getRequest()->getPost('TransactionDateTime');\n $formVariables['OrderDescription'] = $this->getRequest()->getPost('OrderDescription');\n $formVariables['CustomerName'] = $this->getRequest()->getPost('CustomerName');\n $formVariables['Address1'] = $this->getRequest()->getPost('Address1');\n $formVariables['Address2'] = $this->getRequest()->getPost('Address2');\n $formVariables['Address3'] = $this->getRequest()->getPost('Address3');\n $formVariables['Address4'] = $this->getRequest()->getPost('Address4');\n $formVariables['City'] = $this->getRequest()->getPost('City');\n $formVariables['State'] = $this->getRequest()->getPost('State');\n $formVariables['PostCode'] = $this->getRequest()->getPost('PostCode');\n $formVariables['CountryCode'] = $this->getRequest()->getPost('CountryCode');\n \n if(!PYS_PaymentFormHelper::compareHostedPaymentFormHashDigest($formVariables, $szPassword, $hmHashMethod, $szPreSharedKey))\n {\n $boError = true;\n $szNotificationMessage = \"The payment was rejected for a SECURITY reason: the incoming payment data was tampered with.\";\n Mage::log(\"The Hosted Payment Form transaction couldn't be completed for the following reason: [\".$szNotificationMessage. \"]. Form variables: \".print_r($formVariables, 1));\n }\n else\n {\n $paymentsenseOrderId = Mage::getSingleton('checkout/session')->getPaymentsensegatewayOrderId();\n $szOrderStatus = $order->getStatus();\n $szStatusCode = $this->getRequest()->getPost('StatusCode');\n $szMessage = $this->getRequest()->getPost('Message');\n $szPreviousStatusCode = $this->getRequest()->getPost('PreviousStatusCode');\n $szPreviousMessage = $this->getRequest()->getPost('PreviousMessage');\n $szOrderID = $this->getRequest()->getPost('OrderID');\n \n if($szOrderStatus != 'pys_paid' &&\n $szOrderStatus != 'pys_preauth')\n {\n $checkout->saveOrderAfterRedirectedPaymentAction(true,\n $this->getRequest()->getPost('StatusCode'),\n $this->getRequest()->getPost('Message'),\n $this->getRequest()->getPost('PreviousStatusCode'),\n $this->getRequest()->getPost('PreviousMessage'),\n $this->getRequest()->getPost('OrderID'),\n $this->getRequest()->getPost('CrossReference'));\n }\n else \n {\n // cart is empty\n $boCartIsEmpty = true;\n $szPaymentProcessorResponse = null;\n \n // chek the StatusCode as the customer might have just clicked the BACK button and re-submitted the card details\n // which can cause a charge back to the merchant\n $this->_fixBackButtonBug($szOrderID, $szStatusCode, $szMessage, $szPreviousStatusCode, $szPreviousMessage);\n }\n }\n }\n catch (Exception $exc)\n {\n $boError = true;\n $szNotificationMessage = Paymentsense_Paymentsensegateway_Model_Common_GlobalErrors::ERROR_183;\n Mage::logException($exc);\n }\n \n $szPaymentProcessorResponse = $session->getPaymentprocessorresponse();\n if($boError)\n {\n if($szPaymentProcessorResponse != null &&\n $szPaymentProcessorResponse != '')\n {\n $szNotificationMessage = $szNotificationMessage.'<br/>'.$szPaymentProcessorResponse;\n }\n \n $model->setPaymentAdditionalInformation($order->getPayment(), $this->getRequest()->getPost('CrossReference'));\n //$order->getPayment()->setTransactionId($this->getRequest()->getPost('CrossReference'));\n \n if($nVersion >= 1410)\n {\n if($order)\n {\n $orderState = 'pending_payment';\n $orderStatus = 'pys_failed_hosted_payment';\n $order->setCustomerNote(Mage::helper('paymentsensegateway')->__('Hosted Payment Failed'));\n $order->setState($orderState, $orderStatus, $szPaymentProcessorResponse, false);\n $order->save();\n }\n }\n if($nVersion == 1324 || $nVersion == 1330)\n {\n Mage::getSingleton('checkout/session')->addError($szNotificationMessage);\n }\n else \n {\n Mage::getSingleton('core/session')->addError($szNotificationMessage);\n }\n $order->save();\n \n $this->_clearSessionVariables();\n $this->_redirect('checkout/onepage/failure');\n }\n else\n {\n // set the quote as inactive after back from paypal\n Mage::getSingleton('checkout/session')->getQuote()->setIsActive(false)->save();\n\n if($boCartIsEmpty == false)\n {\n // send confirmation email to customer\n if($order->getId())\n {\n $order->sendNewOrderEmail();\n }\n \n if($nVersion >= 1410)\n {\n // TODO : no need to remove stock item as the system will do it in 1.6 version\n if($nVersion < 1600)\n {\n $model->subtractOrderedItemsFromStock($order);\n }\n $this->_updateInvoices($order, $szPaymentProcessorResponse);\n }\n \n if($nVersion != 1324 && $nVersion != 1330)\n {\n if($szPaymentProcessorResponse != '')\n {\n Mage::getSingleton('core/session')->addSuccess($szPaymentProcessorResponse);\n }\n }\n }\n \n $this->_redirect('checkout/onepage/success', array('_secure' => true));\n }\n }",
"public function getPaymentForm()\n\t{\n\t\treturn $this->paymentForm;\n\t}",
"public function stripeformAction() {\n\n $this->conf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['armpayments']);\n $apiSecretKey = $this->conf['stripeApiKey'];\n $publishKey = $this->conf['stripePubKey'];\n $stripeObj = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('ARM\\\\Armpayments\\\\Libraries\\\\Stripe\\\\T3Stripe', $apiSecretKey, $publishKey);\n $stripeObj->init();\n\n $orderid = $this->request->getArgument('orderid');\n $amount = $this->request->getArgument('amount');\n $amountCent = intval($this->request->getArgument('amountcent'));\n $vat = $this->request->getArgument('vat');\n $tablename = $this->request->getArgument('tablename');\n $currency = $this->request->getArgument('currency');\n $description = $this->request->getArgument('description');\n $method = $this->request->getArgument('method');\n $mail = $this->request->getArgument('email');\n\n $this->view->assign('stripePubKey', $publishKey);\n $this->view->assign('orderid', $orderid);\n $this->view->assign('amount', $amount);\n $this->view->assign('amountCent', $amountCent);\n $this->view->assign('vat', $vat);\n $this->view->assign('currency', $currency);\n $this->view->assign('description', urldecode($description));\n $this->view->assign('tablename', $tablename); \n $this->view->assign('method', $method);\n $this->view->assign('email', $mail);\n\n }",
"public function payment(){\n\t\t$_POST['reference'] = date('NWHis');\n\t\techo json_encode($this->pagseguro->doPayment($_POST));\n\t}",
"function commerce_oz_migs_2p_submit_form($payment_method, $pane_values, $checkout_pane, $order) {\n \n//\t// dsm($payment_method, '$payment_method');\n//\t// dsm($checkout_pane);\n//\t// dsm($pane_values);\n//\t// dsm($order);\n \t \t \t\n // Include the Drupal Commerce credit card file for forms\n module_load_include('inc', 'commerce_payment', 'includes/commerce_payment.credit_card');\n \n\t$settings = _commweb_get_var('commerce_oz_gateway_' . $payment_method['gateway_provider']);\n \n// \tdsm($settings, '$settings');\n\n $form_params = array();\n $form_defaults = array();\n \n // Use CVV Field?\n if($settings['commerce_oz_use_cvv'] == 'cvv')\n {\n \t$form_params['code'] = '';\n }\n \n // Use Card Holder Name Field ?\n if($settings['commerce_oz_use_card_name'] == 'name')\n {\n \t$form_params['owner'] = 'Card Holder';\n }\n \n \n // set the defaults for testing\n if($settings['commerce_oz_transaction_mode'] == 'test')\n {\n\n\t\t \t$form_defaults['number'] = $settings['commerce_oz_test_card_number'];\n\t\t \t$form_defaults['code'] = $settings['commerce_oz_test_card_cvv'];\n\t\t \t$form_defaults['exp_month'] = $settings['commerce_oz_test_card_exp_month'];\n\t\t \t$form_defaults['exp_year'] = $settings['commerce_oz_test_card_exp_year'];\n\t\t}\n\t\t\n\n $gateway = commerce_oz_load_gateway_provider($payment_method['gateway_provider']);\n \n \t$form = commerce_payment_credit_card_form($form_params, $form_defaults);\n\n\t$logopath = '/' . drupal_get_path('module', 'commerce_oz') . '/image/' . $payment_method['gateway_provider'] . '_68.png';\n\t\n\t$descText = '<a href=\"' . $gateway['owner_website'] . '\"><img src=\"' . $logopath . '\" /></a><br />Enter your payment details below and Click Continue.<br />On completing your transaction, you will be taken to your Receipt information.<br />';\n\n $form['commweb_3p_head'] = array(\n '#type' => 'fieldset',\n '#title' => t($payment_method['title']),\n '#collapsible' => FALSE, \n \t'#collapsed' => FALSE,\n '#description' => t($descText),\n );\n \n\n if($settings['commerce_oz_transaction_mode'] == 'test')\n {\n // // dsm($form);\n \n \n $form['credit_card']['number']['#description'] = t('<strong>Test Mode</strong> - You can only use the credit cards listed here to test in Test Mode. Valid card numbers are:\n \t\t<br /><br />Master: 5123456789012346\n <br />Visa: 4987654321098769\n <br />Amex: 345678901234564\n <br />Diners: 30123456789019\n <br /><br />All CommWeb Test Cards must use 05-2013 as the Expiry Date.');\n\n $form['credit_card']['exp_year']['#description'] = t('<strong>est Mode</strong> - All CommWeb Test Cards must use 05-2013 as the Expiry Date');\n\n $form['credit_card']['owner']['#description'] = t('<strong>Test Mode</strong> - Transactions do NOT require or use the Card Owner field. If you choose to request this information from your users it will however be stored with the transaction record.');\n\n \n \n // Provide a textfield to pass different Amounts to MIGS \n $form['credit_card']['test_amount'] = array(\n '#input' => TRUE,\n\n '#type' => 'textfield',\n '#size' => 6,\n '#maxlength' => 10,\n \t\t\n '#title' => t('Test Mode - Custom Amount'), \n '#default_value' => $order->commerce_order_total['und'][0]['amount'],\n '#disabled' => FALSE,\n '#description' => t('<strong>Test Mode</strong> - Update the Amount (in cents) sent for processing to change your desired transaction response.<br /> Valid amounts are <br />xxx00 = Approved\n <br />xxx05 = Declined. Contact Bank.\n <br />xxx10 = Transaction could not be processed.\n <br />xxx33 = Expired Card.\n <br />xxx50 = Unspecified Failure.\n <br />xxx51 = Insufficient Funds.\n <br />xxx68 = Communications failure with bank'),\n '#required' => FALSE, \n ); \n \n }\n \n \n \t$form['commweb_3p_head']['credit_card'] = $form['credit_card'];\n\tunset($form['credit_card']);\n\t\n//\t// dsm($form);\n\t\n return $form;\n \n}",
"public function action_ajax_get_paypal_form()\n\t{\n\t\t$this->auto_render = FALSE;\n\t\tparse_str(Kohana::sanitize($this->request->post('form_data')), $form_data);\n\t\t$form_data = (Object) $form_data;\n\n\t\t// Log the cart. The card ID will be needed in the PayPal callback to get the form data\n\t\tif (Settings::Instance()->get('cart_logging') == \"TRUE\" AND class_exists('Model_Checkout'))\n\t\t{\n\t\t\t$user = Auth::instance()->get_user();\n\t\t\t$checkout = new Model_Checkout;\n\t\t\t$cart_report = new Model_Cart();\n\t\t\t$details = array(\n\t\t\t\t'id' => (int) (microtime('get as float')*1000000), // unix timestamp in microseconds\n\t\t\t\t'user_agent' => $_SERVER['HTTP_USER_AGENT'],\n\t\t\t\t'ip_address' => $_SERVER['REMOTE_ADDR'],\n\t\t\t\t'user_id' => isset($user['id']) ? $user['id'] : NULL,\n\t\t\t\t'cart_data' => '{}',\n\t\t\t\t'form_data' => json_encode($form_data),\n\t\t\t\t'paid' => 0,\n\t\t\t\t'date_created' => date('Y-m-d H:i:s'),\n\t\t\t\t'date_modified' => date('Y-m-d H:i:s')\n\t\t\t);\n\t\t\t$cart_report->set($details)->save();\n\t\t\t$form_data->custom = $cart_report->get_id();\n\t\t}\n\n\t\t// PayPal data\n\t\t$paypal_data = new stdClass();\n\t\t$paypal_data->cmd = '_cart';\n\t\t$paypal_data->upload = 1;\n\t\t$paypal_data->business = Settings::instance()->get('paypal_email');\n\t\t$paypal_data->currency_code = 'EUR';\n\t\t$paypal_data->no_shipping = 2;\n\t\t$paypal_data->return = isset($form_data->return_url) ? $form_data->return_url : $_SERVER['HTTP_HOST'];\n\t\t$paypal_data->cancel_return = isset($form_data->cancel_return_url) ? $form_data->cancel_return_url : $_SERVER['HTTP_HOST'];\n\t\t$paypal_data->notify_url = URL::base().'/frontend/payments/paypal_callback/invoice';\n\t\t$paypal_data->custom = isset($form_data->custom) ? $form_data->custom : '';\n\t\t$paypal_data->{'item_name_1'} = isset($form_data->item_name) ? $form_data->item_name : 'Invoice Payment';\n\t\t$paypal_data->{'amount_1' } = $form_data->payment_total;\n\t\t$paypal_data->{'quantity_1' } = 1;\n\n\t\t// Return data\n\t\t$return = new stdClass;\n\t\t$return->status = TRUE;\n\t\t$return->data = $paypal_data;\n\t\t$return->data->test_mode = (Settings::instance()->get('paypal_test_mode') == 1);\n\n\t\t$this->response->body(json_encode($return));\n\t}",
"private static function data_form(){\n\t\t\t\n\t\t\t\n\t\t\t$data_form = array();\n\t\t\t\n\t\t\tif(isset($_POST['v_super_pay'])){\n\t\t\t\t\n\t\t\t\t$data_form['vehicle_type'] = $_POST['v_type'];\n\t\t\t\t$data_form['service_package'] = $_POST['s_package'];\n\t\t\t\t$data_form['service_type'] = $_POST['service_type'];\n\t\t\t\t$data_form['car_re'] = $_POST['car_reg'];\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(isset( $_POST['extras'])){\n\t\t\t\t\t\n\t\t\t\t\t$data_form['extra'] = $_POST['extras'];\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t$v_price = 0;\n\t\t\t\t\t$s_price = 0;\n\t\t\t\t\t$s_pack_price = 0;\n\t\t\t\t\t$ex_s_price = 0;\n\t\t\t\t\n\t\t\t\t\n\t\t\tif($data_form['vehicle_type'] == 'sedan'){\n\t\t\t\t\n\t\t\t\t$v_price = 150;\n\t\t\t\t$data_form['v_price'] = $v_price;\n\t\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t}else if($data_form['vehicle_type'] == 'hatchback'){\n\t\t\t\t\n\t\t\t\t$v_price = 175;\n\t\t\t\t$data_form['v_price'] = $v_price;\n\t\t\t\t\n\t\t\t}else if($data_form['vehicle_type'] == 'suv'){\n\t\t\t\t\n\t\t\t\t$v_price = 190;\n\t\t\t\t$data_form['v_price'] = $v_price;\n\t\t\t\t\n\t\t\t}else if($data_form['vehicle_type'] == 'minibus'){\n\t\t\t\t\n\t\t\t\t$v_price = 250;\n\t\t\t\t$data_form['v_price'] = $v_price;\n\t\t\t}else if($data_form['vehicle_type'] == 'truck'){\n\t\t\t\t\n\t\t\t\t$v_price = 260;\n\t\t\t\t$data_form['v_price'] = $v_price;\n\t\t\t}else if($data_form['vehicle_type'] == 'motorbike'){\n\t\t\t\t\n\t\t\t\t$v_price = 130;\n\t\t\t\t$data_form['v_price'] = $v_price;\n\t\t\t\t\n\t\t\t\t\n\t\t\t}// End of first if group\n\t\t\t\t\n\t\t\t\tif($data_form['service_package'] == 'standard'){\n\t\t\t\t\t\n\t\t\t\t\t$s_pack_price = 280;\n\t\t\t\t\t$data_form['s_pack'] = $s_pack_price;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\t\n\t\t\t\t\t$s_pack_price = 320;\n\t\t\t\t\t$data_form['s_pack'] = $s_pack_price;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}// End of second if group\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif($data_form['service_type'] == 'ineterio'){\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$s_price = 30;\n\t\t\t\t\t$data_form['s_type'] = $s_price;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}else if($data_form['service_type'] == 'exterior'){\n\t\t\t\t\t\n\t\t\t\t\t$s_price = 40;\n\t\t\t\t\t$data_form['s_type'] = $s_price;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$s_price = 65;\n\t\t\t\t\t$data_form['s_type'] = $s_price;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}// End of third if group\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(isset($data_form['extra'])){\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$ex_s_price = 200;\n\t\t\t\t\t$data_form['extra_price'] = $ex_s_price;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t$total = $v_price + $s_price + $s_pack_price+$ex_s_price;\n\t\t\t\t\t\n\t\t\t\t\t$data_form['total'] = $total;\n\t\t\t\t\techo json_encode(($data_form));exit;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\n\t\t\t}else if(isset($_POST['info_request'])){\n\t\t\t\t\n\t\t\t\t$data_form['user_name'] = $_POST['client_cname'];\n\t\t\t\t$data_form['user_email'] = $_POST['client_cmail'];\n\t\t\t\t$data_form['user_tel'] = $_POST['client_cmobile'];\n\t\t\t\t$data_form['user_subject'] = $_POST['client_csubject'];\n\t\t\t\t$data_form['user_message'] = $_POST['client_cmessage'];\n\t\t\t\t$data_form['information_data'] = true;\n\t\t\t\t\n\t\t\t\treturn $data_form;\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t}else if(isset($_POST['quote_request'])){\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$data_form['client_qname'] = $_POST['quote_client_name'];\n\t\t\t\t$data_form['client_qsname'] = $_POST['quote_client_sname'];\n\t\t\t\t$data_form['user_email'] = $_POST['quote_client_mail'];\n\t\t\t\t$data_form['client_qtel'] = $_POST['quote_client_mobile'];\n\t\t\t\t$data_form['sub_date'] = date('Y-m-d');\n\t\t\t\t$data_form['sub_type'] = $_POST['subscription_type'];\n\t\t\t\t$data_form['sub_fee'] = $_POST['quote_client_fee'];\n\t\t\t\t$data_form['account_hold'] = $_POST['quote_client_c_name'];\n\t\t\t\t$data_form['account_num'] = $_POST['quote_client_c_number'];\n\t\t\t\t$data_form['account_cvv'] = $_POST['quote_client_c_vv'];\n\t\t\t\t$data_form['database_save'] = true;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\treturn $data_form;\n\t\t\t\t\n\t\t}else {\n\t\t\t\n\t\t\t\n\t\t\t\tunset($data_form);\n\t\t\t\treturn $data_form ='No form has been submitted';\n\t\t\t\n\t\t\t\n\t}// End of outer if else statement\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}",
"function post_to_bank_api()\n\t{\n\t\tlog_message('debug', 'Account/post_to_bank_api');\n\t\t$data = filter_forwarded_data($this);\n\t\tlog_message('debug', 'Account/post_to_bank_api:: [1] !empty($data[\\'a\\'])='.!empty($data['a']));\n\t\t# Processing bank form POST\n\t\t# ------------------------------------------------------\n\t\t# a) API required extra information after login\n\t\tif(!empty($data['a']) && ($data['a'] == 'display_question' || $data['a'] == 'display_code'))\n\t\t{\n\t\t\t$credentials['mfa'] = $_POST['questionanswer'];\n\t\t\t$postData = array('bank_id'=>$this->native_session->get('login_institution_id'), 'email_address'=>$this->native_session->get('__email_address'));\n\t\t}\n\t\t# b) API requested to choose a delivery option for a code after login\n\t\telse if(!empty($data['a']) && $data['a'] == 'display_options')\n\t\t{\n\t\t\t$credentials['mfa'] = $_POST['questionanswer'];\n\t\t\t$credentials['send_method'] = $_POST['questionanswer'];\n\t\t\t$postData = array('bank_id'=>$this->native_session->get('login_institution_id'), 'email_address'=>$this->native_session->get('__email_address'));\n\n\t\t}\n\t\t# c) API returned an error after login or first time logging in\n\t\telse\n\t\t{\n\t\t\t$credentials['user_name'] = $_POST['username'];\n\t\t\t$credentials['password'] = $_POST['bankpassword'];\n\t\t\tif(!empty($_POST['bankpin'])) $credentials['bank_pin'] = $_POST['bankpin'];\n\t\t\t$postData = array('bank_id'=>$this->native_session->get('login_institution_id'), 'email_address'=>$this->native_session->get('__email_address'));\n\t\t}\n\n\t\t# Connect to bank with details\n\t\t$data['response'] = $this->_api->post('money/connect_to_bank', array('credentials'=>$credentials, 'postData'=>$postData ));\n\n\t\t# Was there a successful connection? Then get the user's current banks\n\t\tif(!empty($data['response']['accounts']))\n\t\t{\n\t\t\t$data['currentBanks'] = $this->_api->get('money/current_user_banks');\n\t\t}\n\n\t\t# Determine which area to show based on response\n\t\tif(!empty($data['a'])) unset($data['a']);\n\t\t$this->native_session->set('__data', $data);\n\t\techo base_url().'account/load_bank_form/a/'.$this->which_bank_view($data['response']);\n\t}",
"public function getForm($total=0, $user_id=0, $type=1 ){\n\t\t$resp = \"\"; \n\t\t$secureToken = uniqid('', true); \n\t\t$postData = \"USER=\". PAYPAL_PF_USER. \n\t\t\t\t\t \"&VENDOR=\".PAYPAL_PF_VENDOR. \n\t\t\t\t\t \"&PARTNER=\". PAYPAL_PF_PARTHER. \n\t\t\t\t\t \"&PWD=\".PAYPAL_PF_PASSWROD. \n\t\t\t\t\t \"&CREATESECURETOKEN=Y\". \n\t\t\t\t\t \"&SECURETOKENID=\" .$secureToken .\n\t\t\t\t\t \"&TRXTYPE=S\". \n\t\t\t\t\t \"&AMT=\" .$total ; \n\t\t\n\t\t $ch= curl_init(); \n\t\t curl_setopt($ch, CURLOPT_URL , PAYPAL_PF_HOST) ; \n\t\t curl_setopt($ch, CURLOPT_RETURNTRANSFER , true) ;\n\t\t curl_setopt($ch, CURLOPT_POST , true) ; \n\t\t curl_setopt($ch, CURLOPT_POSTFIELDS , $postData) ; \n\t\t $resp = curl_exec($ch ) ; \n\t\t if (!$resp)\n\t\t \t$resp = \"Empty Reponse\";\n \t\t parse_str($resp, $arr) ; \n\t \n\t\t if ($arr[\"RESULT\"] != 0 ) \n\t\t \t$resp = \"RETURNED Bad result \" . $arr[\"RESPMSG\"]; \n\t\t else{\n\t\t \t $resp = \" \n\t\t \t <iframe src='https://payflowlink.paypal.com?MODE=\".PAYPAL_PF_MODE.\"&SECURETOKEN={$arr[\"SECURETOKEN\"]}&SECURETOKENID={$secureToken}' width='490px' height='564px' border='0' frameborder='0' allowtransparency='true' > \n\t\t \t </iframe> \"; \n\t\t }\n\t\t return $resp ; \n\t\t\n\t}",
"public function payment_fields() {\n\n\t\t$this->log( 'Show Payment fields on the checkout page' );\n\n\t\t$referer = isset( $_SERVER['HTTP_REFERER'] ) ? $_SERVER['HTTP_REFERER'] : \"\";\n\n\t\t$this->log( 'Received GET data from [' . $referer. ']:' );\n\t\t$this->log( print_r($_GET, true ) );\n\n\t\t$this->log( 'Received POST data from [' . $referer. ']:' );\n\t\t$this->log( print_r($_POST, true ) );\n\n\t\tif ( $this->description ) {\n\t\t\techo wpautop( wp_kses_post( $this->description ) );\n\t\t}\n\t}",
"public function getBankForm()\n {\n\n $config = array(\n 'kwota' => 999.99,\n 'opis' => 'Transaction description',\n 'crc' => '100020003000',\n 'wyn_url' => 'http://example.pl/examples/notificationBasic.php?transaction_confirmation',\n 'wyn_email' => '[email protected]',\n 'pow_url' => 'http://example.pl/examples/success.html',\n 'email' => '[email protected]',\n 'imie' => 'Jan',\n 'nazwisko' => 'Kowalski',\n );\n\n $form = $this->getBankSelectionForm($config, false, true);\n\n echo $form;\n }",
"function commerce_oz_migs_2p_submit_form_submit($payment_method, $pane_form, $pane_values, $order, $charge) {\n \n\tdsm($payment_method);\n \t/* dsm($pane_form);\n \t \t// dsm($pane_values);\n \t \t \t// dsm($order);\n \t \t \t// dsm($charge);\n */\n \t \t \t\n // Get the order\n $order_wrapper = entity_metadata_wrapper('commerce_order', $order);\n $order_id = $order->order_id;\n \n $pane_values['credit_card'] = $pane_values['commweb_3p_head']['credit_card'];\n // // dsm($pane_values);\n \n // Get the settings and set some vars for same\n // $settings = $payment_method['settings'];\n $debugmode = 'debug'; //$settings['commerce_commweb_vpc_settings']['commerce_commweb_vpc_debug'];\n $livemode = 'test'; //$settings['commerce_commweb_vpc_settings']['commerce_commweb_vpc_mode'];\n \n\t// Transaction record\n\t// Prepare a transaction object to log the API response.\n $transaction = commerce_payment_transaction_new($payment_method['base'], $order->order_id);\n \n // Save the transaction information for a fresh transaction id.\n commerce_payment_transaction_save($transaction);\n \n\t// BUILD THE POST DATA\n\t// Use Test Amount if necessary\n\tif(($pane_values['credit_card']['test_amount']) && ($livemode == 'test'))\n\t{\t$amount = $pane_values['credit_card']['test_amount'];\n\t\t\n\t} else {\t$amount = $charge['amount'];\n\t\t\n\t}\n\t\n\t$gateway_key = $payment_method['gateway_provider'];\n\t\n\t\n $request_string = _commerce_oz_build_migs_request_payload($order, $transaction, $pane_values, $amount, $gateway_key); \n//\t// dsm($request_string, '$request_string');\n\t\n\t$request_map = _commerce_oz_process_vpc_request($request_string);\n//\t// dsm($request_map, '$request_map');\n\n\t// VPC curl function\n\t$response_string = _commerce_oz_post_migs_request($request_string);\n\t\n\t// Map curl response to array and update transaction object\n\t$response_map = _commerce_oz_process_vpc_response($transaction, $payment_method, $response_string, $request_map);\n\t\n\t\t// Debug information\n if($debugmode == 'debug')\n {\n \n \tdpm($request_map);\n \twatchdog('commerce_oz', 'Request Data was: @requestdata', array('@requestdata' => $request_string), WATCHDOG_DEBUG);\n\n \n\t\tdpm($response_map);\n \twatchdog('commerce_oz', 'Response Map: @returndata', array('@returndata' => print_r($response_map, true)), WATCHDOG_DEBUG);\n \t\n }\n\n // Save the transaction information.\n commerce_payment_transaction_save($transaction);\n\t\n\t// Fire completion Rule\n\trules_invoke_event('commerce_oz_transaction_complete', $transaction);\n\n // If the payment failed, display an error and rebuild the form.\n if ($transaction->status === COMMERCE_PAYMENT_STATUS_FAILURE) \n {\n \n drupal_set_message(t('There was an error processing your card. <br />Check your information or try a different card.'), 'error');\n \n drupal_set_message('Response: ' . $response_map['vpc_TxnResponseCode'] . ' - Message: \"' . $response_map['vpc_Message'] . '\"', 'error');\n \n watchdog('commerce_oz', \n \t\t\t\t\t'Failed - Request: @requestdata2', \n \t\t\t\t\tarray('@requestdata2' => $request_map), WATCHDOG_WARNING);\n \n watchdog('commerce_oz', \n \t\t\t\t\t'Failed - Response: @requestdata3', \n \t\t\t\t\tarray('@requestdata3' => $response_map), WATCHDOG_WARNING);\n \n \t// Fire failure Rule\n rules_invoke_event('commerce_oz_transaction_fail', $transaction);\n \n return FALSE;\n \n } else { \n \n \t// Fire success Rule\n \trules_invoke_event('commerce_oz_transaction_success', $transaction);\n \t\n \treturn TRUE;\n \n }\n\n}",
"public function paymentForm() {\n return new PaymentRequestForm();\n }",
"public static function getFormData() {\n $result = lC_Product_variants_Admin::getFormData($_GET['pvid']);\n if (!isset($result['rpcStatus'])) {\n $result['rpcStatus'] = RPC_STATUS_SUCCESS;\n }\n\n echo json_encode($result);\n }",
"public static function getFormData() {\r\n $result = lC_Configuration_Admin::getFormData($_GET['cid']);\r\n if (!isset($result['rpcStatus'])) {\r\n $result['rpcStatus'] = RPC_STATUS_SUCCESS;\r\n }\r\n\r\n echo json_encode($result);\r\n }",
"public function payment_fields() {\n \n\t\t\n \n\t\t}",
"public function getFormFields() {\r\r\n\r\r\n $billing = $this->getOrder()->getBillingAddress();\r\r\n $shipping = $this->getOrder()->getShippingAddress();\r\r\n $addr_entity_id = $shipping->getCustomerAddressId();\r\r\n $shippingaddress = Mage::getModel('sales/order_address');\r\r\n $shippingaddress->load($addr_entity_id);\r\r\n $shipaddgetdat = $shippingaddress->getData();\r\r\n\r\r\n\r\r\n\r\r\n $biladdr_entity_id = $billing->getCustomerAddressId();\r\r\n ;\r\r\n $billingaddress = Mage::getModel('sales/order_address');\r\r\n $billingaddress->load($biladdr_entity_id);\r\r\n $billaddgetdat = $billingaddress->getData();\r\r\n\r\r\n $coFields = array();\r\r\n $items = $this->getQuote()->getAllItems();\r\r\n\r\r\n if ($items) {\r\r\n $i = 1;\r\r\n foreach ($items as $item) {\r\r\n if ($item->getParentItem()) {\r\r\n continue;\r\r\n }\r\r\n $coFields['c_prod_' . $i] = $this->cleanString($item->getSku());\r\r\n $coFields['c_name_' . $i] = $this->cleanString($item->getName());\r\r\n $coFields['c_description_' . $i] = $this->cleanString($item->getDescription());\r\r\n $coFields['c_price_' . $i] = number_format($item->getPrice(), 2, '.', '');\r\r\n $i++;\r\r\n }\r\r\n }\r\r\n\r\r\n $request = '';\r\r\n foreach ($coFields as $k => $v) {\r\r\n $request .= '<' . $k . '>' . $v . '</' . $k . '>';\r\r\n }\r\r\n\r\r\n\r\r\n $key = Mage::getStoreConfig('payment/payucheckout_shared/key');\r\r\n $salt = Mage::getStoreConfig('payment/payucheckout_shared/salt');\r\r\n $debug_mode = Mage::getStoreConfig('payment/payucheckout_shared/debug_mode');\r\r\n\r\r\n $orderid = $this->getOrder()->getRealOrderId();\r\r\n $orderInfo = $this->getOrder();\r\r\n $order = Mage::getModel('sales/order')->loadByIncrementId($orderid);\r\r\n// get order total value\r\r\n $orderValue = number_format($order->getGrandTotal(), 2, '.', $thousands_sep = '');\r\r\n// get order item collection\r\r\n $orderItems = $order->getItemsCollection();\r\r\n $productInfo = array();\r\r\n $productInfo2 = array();\r\r\n \r\r\n \r\r\n foreach ($orderItems as $item) {\r\r\n \r\r\n $item->getName();\r\r\n $product_id = $item->product_id;\r\r\n $product_sku = $item->sku;\r\r\n $product_name = $item->getName();\r\r\n $_product = Mage::getModel('catalog/product')->load($product_id);\r\r\n $cats = $_product->getCategoryIds();\r\r\n $category_id = $cats[0]; // just grab the first id\r\r\n $category = Mage::getModel('catalog/category')->load($category_id);\r\r\n $category_name = $category->getName();\r\r\n\r\r\n $productInfo['name'] = $this->cleanString($item->getName());\r\r\n $productInfo['description'] = $this->cleanString(substr($_product->getDescription(),0,100));\r\r\n $productInfo['value'] = $orderValue;\r\r\n $productInfo['isRequired'] = true;\r\r\n $productInfo['settlementEvent'] = \"EmailConfirmation\";\r\r\n $productInfo2[] = $productInfo;\r\r\n }\r\r\n $productIndoFilterData['paymentParts'] = $productInfo2;\r\r\n $jsonProductInfo = json_encode($productIndoFilterData);\r\r\n\r\r\n $txnid = $orderid;\r\r\n\r\r\n $coFields['key'] = $key;\r\r\n $coFields['txnid'] = $txnid;\r\r\n $coFields['udf2'] = $txnid;\r\r\n $coFields['amount'] = number_format($this->getOrder()->getBaseGrandTotal(), 0, '', '');\r\r\n $coFields['productinfo'] = $jsonProductInfo;\r\r\n $coFields['address'] = $billaddgetdat['street'];\r\r\n $coFields['firstname'] = $billing->getFirstname();\r\r\n $coFields['Lastname'] = $billing->getLastname();\r\r\n $coFields['City'] = $billing->getCity();\r\r\n $coFields['State'] = $billing->getRegion();\r\r\n $coFields['Country'] = $billing->getCountry();\r\r\n $coFields['Zipcode'] = $billing->getPostcode();\r\r\n $coFields['email'] = $this->getOrder()->getCustomerEmail();\r\r\n $coFields['phone'] = $billing->getTelephone();\r\r\n\r\r\n $coFields['ship_name'] = $shipping->getFirstname() . \" \" . $shipping->getLastname();\r\r\n $coFields['ship_address'] = $shipaddgetdat['street'];\r\r\n $coFields['ship_zipcode'] = $shipping->getPostcode();\r\r\n $coFields['ship_city'] = $shipping->getCity();\r\r\n $coFields['ship_state'] = $shipping->getRegion();\r\r\n $coFields['ship_country'] = $shipping->getCountry();\r\r\n $coFields['ship_phone'] = $shipping->getTelephone();\r\r\n $coFields['website'] = Mage::getBaseUrl();\r\r\n $coFields['surl'] = Mage::getBaseUrl() . 'payucheckout/shared/success/';\r\r\n $coFields['furl'] = Mage::getBaseUrl() . 'payucheckout/shared/failure/';\r\r\n $coFields['curl'] = Mage::getBaseUrl() . 'payucheckout/shared/canceled/id/' . $this->getOrder()->getRealOrderId();\r\r\n $coFields['Pg'] = $billing->getpg();\r\r\n $coFields['bankcode'] = $billing->getbankcode();\r\r\n $coFields['ccnum'] = $billing->getccnum();\r\r\n $coFields['ccvv'] = $billing->getccvv();\r\r\n $coFields['ccexpmon'] = $billing->getccexpmon();\r\r\n $coFields['ccexpyr'] = $billing->getccexpyr();\r\r\n $coFields['ccname'] = $billing->getccname();\r\r\n $coFields['service_provider'] = 'payu_paisa';\r\r\n\r\r\n $debugId = '';\r\r\n \r\r\n\r\r\n if ($debug_mode == 1) {\r\r\n\r\r\n $requestInfo = $key . '|' . $coFields['txnid'] . '|' . $coFields['amount'] . '|' .\r\r\n $jsonProductInfo . '|' . $coFields['firstname'] . '|' . $coFields['email'] . '|' . $debugId . '||||||||||' . $salt;\r\r\n $debug = Mage::getModel('payucheckout/api_debug')\r\r\n ->setRequestBody($requestInfo)\r\r\n ->save();\r\r\n\r\r\n $debugId = $debug->getId();\r\r\n\r\r\n $coFields['udf1'] = $debugId;\r\r\n $coFields['Hash'] = hash('sha512', $key . '|' . $coFields['txnid'] . '|' . $coFields['amount'] . '|' .\r\r\n $jsonProductInfo . '|' . $coFields['firstname'] . '|' . $coFields['email'] . '|' . $debugId . '|' . $coFields['udf2'] . '|||||||||' . $salt);\r\r\n } else {\r\r\n $coFields['Hash'] = strtolower(hash('sha512', $key . '|' . $coFields['txnid'] . '|' . $coFields['amount'] . '|' .\r\r\n $jsonProductInfo . '|' . $coFields['firstname'] . '|' . $coFields['email'] . '||' . $coFields['udf2'] . '|||||||||' . $salt));\r\r\n }\r\r\n return $coFields;\r\r\n }",
"public function transactionFormGetFormParms ();",
"public function formSubmit()\n {\n if (isset($_POST['submit'])) {\n // Initialize the Payment request encryption/decryption library using the Secret Key and IV Key from the configuration\n $paymentHandler = new PaymentHandler($this->paymentApiUrl, $_POST['merchantCode'], $this->secretKey, $this->ivKey, $this->accessCode);\n\n // Getting the payment data into request object\n $requestData = $this->modelBindingHelper->getCheckoutRequestData($_POST);\n\n // POST the requested object to the checkout API and receive back the response\n $response = $paymentHandler->checkoutRequest($requestData);\n\n //Get encrypted and decrypted checkout data response\n [$encryptedResponse , $hesabeCheckoutResponseModel] = $this->getCheckoutResponse($response);\n\n // check the response and validate it\n if ($hesabeCheckoutResponseModel->status == false && $hesabeCheckoutResponseModel->code != Constants::SUCCESS_CODE) {\n echo \"<p style='word-break: break-all;'> <b>Encrypted Data</b>:- \".$encryptedResponse.\"</p>\";\n echo \"<p><b>Decrypted Data</b>:- </p>\";\n echo \"<pre>\";\n print_r($hesabeCheckoutResponseModel);\n exit;\n }\n\n // Redirect the user to the payment page using the token from the checkout API response\n return $this->redirectToPayment($hesabeCheckoutResponseModel->response['data']);\n }\n\n /*\n * To use this method, make sure your SuccessUrl or FailureUrl\n * points to this method in which you'll receive a \"data\" param\n * as a GET request. Then you can process it accordingly.\n */\n if (isset($_GET['id']) && isset($_GET['data'])) {\n $responseData = $_GET['data'];\n\n //Decrypt the response received\n $decryptedResponse = $this->getPaymentResponse($responseData);\n\n echo \"<p style='word-break: break-all;'> Encrypted Data:- \".$responseData.\"</p>\";\n echo \"<p><b>Decrypted Data</b>:- </p>\";\n echo \"<pre>\";\n print_r($decryptedResponse);\n exit;\n }\n }",
"public static function getFormData() {\n $edit = (isset($_GET['edit']) && $_GET['edit'] == 'true') ? true : false;\n $result = lC_Weight_classes_Admin::getFormData($_GET['wcid'], $edit);\n if (!isset($result['rpcStatus'])) {\n $result['rpcStatus'] = RPC_STATUS_SUCCESS;\n }\n\n echo json_encode($result);\n }",
"public function action_list_form_payment(){\n $param = \\Input::param();\n $cids = [];\n if(isset($param['p'])){\n parse_str(base64_decode($param['p']), $params);\n $petition_id = isset($params['petition_id'])?$params['petition_id']:null;\n $cids = explode(',', $petition_id);\n }\n\n $objPHPExcel = new \\PHPExcel();\n $objPHPExcel->getProperties()->setCreator('Vision')\n ->setLastModifiedBy('Vision')\n ->setTitle('Office 2007 Document')\n ->setSubject('Office 2007 Document')\n ->setDescription('Document has been generated by PHP')\n ->setKeywords('Office 2007 openxml php')\n ->setCategory('Form Payment File');\n $header = ['No','申請日','申請番号','内容','件名','金額','領収書','申請者','状況','確認日','修正後金額','最新処理者','振込日'];\n\n $query = \\DB::select('id','name')\n ->from('m_petition_status');\n $m_petition_status = $query->execute()->as_array('id','name');\n\n foreach($header as $i=>$v){\n $column = \\PHPExcel_Cell::stringFromColumnIndex($i);\n $objPHPExcel->setActiveSheetIndex(0)->setCellValue($column.'1',$v);\n $objPHPExcel->getActiveSheet()->getStyle($column.'1')->applyFromArray($this->formatTitleHeader);\n switch($i+1){\n case 1:\n $width = 8;\n break;\n case 3:\n case 4:\n case 8:\n case 12:\n $width = 25;\n break;\n case 5:\n $width = 80;\n break;\n case 6:\n $width = 15;\n break;\n case 7:\n $width = 12;\n break;\n default:\n $width = 20;\n break;\n }\n $objPHPExcel->getActiveSheet()->getColumnDimension($column)->setWidth($width);\n }\n\n $i = $row = 0;\n foreach ($cids as $cid) {\n //======================== Begin Get Form From Other API ===============================\n $api_res = json_decode($this->rest->request('trequest/detail/' . $cid, 'get'));\n if($api_res->status == 'success'){\n $payment = $api_res->data;\n if(empty($payment)) continue;\n $mark = $payment->currency_symbol;\n $row = $i+2;\n\n $last_approval_user = null;\n foreach($payment->routes as $route){\n if($route->m_user_id == $payment->last_approve_user_id){\n $last_approval_user = $route->fullname;\n break;\n }\n }\n\n $objPHPExcel->setActiveSheetIndex()->setCellValue('A'.$row,$i+1)\n ->setCellValue('B'.$row,\\Vision_Common::system_format_date(strtotime($payment->date)))\n ->setCellValueExplicit('C'.$row,$payment->code,\\PHPExcel_Cell_DataType::TYPE_STRING)\n ->setCellValue('D'.$row,$payment->request_menu_name)\n ->setCellValue('E'.$row,$payment->name)\n ->setCellValue('F'.$row,$mark.number_format($payment->amount))\n ->setCellValue('G'.$row,$payment->receipt_flg?'要':'不要')\n ->setCellValue('H'.$row,$payment->user_create_form->fullname)\n ->setCellValue('I'.$row,$m_petition_status[$payment->m_petition_status_id])\n ->setCellValue('J'.$row,$payment->account_conf_date?\\Vision_Common::system_format_date(strtotime($payment->account_conf_date)):null)\n ->setCellValue('K'.$row,$mark.number_format($payment->cor_settlement_amount))\n ->setCellValue('L'.$row,$last_approval_user)\n ->setCellValue('M'.$row,$payment->transfer_date?\\Vision_Common::system_format_date(strtotime($payment->transfer_date)):null);\n $i++;\n }\n }\n\n $format = ['alignment'=>array('horizontal'=> \\PHPExcel_Style_Alignment::HORIZONTAL_CENTER,'wrap'=>true)];\n $objPHPExcel->getActiveSheet()->getStyle('A2:A'.$row)->applyFromArray($format);\n $objPHPExcel->getActiveSheet()->getStyle('B2:B'.$row)->applyFromArray($format);\n $objPHPExcel->getActiveSheet()->getStyle('G2:G'.$row)->applyFromArray($format);\n //set color title\n $objPHPExcel->getActiveSheet()->getStyle('A1:M1')->getFill()->setFillType(\\PHPExcel_Style_Fill::FILL_SOLID);\n $objPHPExcel->getActiveSheet()->getStyle('A1:M1')->getFill()->getStartColor()->setRGB('25a9cb');\n\n header(\"Last-Modified: \". gmdate(\"D, d M Y H:i:s\") .\" GMT\");\n header(\"Cache-Control: max-age=0\");\n header('Content-Type: application/vnd.ms-excel');\n header('Content-Disposition: attachment;filename=\"list-payment-'.date('Y-m-d').'.xls\"');\n $objWriter = \\PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');\n $objWriter->save('php://output');\n exit;\n }",
"public function postPayment(Request $request){\n\t\t\t$id=$request->id;\n\t\t\tSession::put('id_publication',$id);\n $Khipu = new Khipu();\n $Khipu->authenticate(127810,'3b516afae90937b2eeed43c8d31eeda8f22b7eff');\n $khipu_service = $Khipu->loadService('CreatePaymentPage');\n\n $data = array(\n 'subject' => 'Publicación Premium',\n 'body' => 'Aumenta la posibilidad de exito de tus ventas',\n 'amount' => 2000,\n // Página de exito\n 'return_url' => 'http://localhost:8000/exito',\n // Página de fracaso\n 'cancel_url' => 'http://localhost:8000/fracaso',\n 'transaction_id' => 1,\n // Dejar por defecto un correo para recibir el comprobante\n 'payer_email' => \\Auth::User()->email,\n // url de la imagen del producto o servicio\n 'picture_url' => 'https://static-pss-eu.gcdn.co/shop/media/items/c7/c7/c7c7ea349fe04222b617413c80c95ee4.png',\n // Opcional\n 'custom' => 'Custom Variable',\n // definimos una url en donde se notificará del pago\n 'notify_url' => '',\n );\n // Recorremos los datos y se lo asignamos al servicio.\n foreach ($data as $name => $value) {\n $khipu_service->setParameter($name, $value);\n }\n // Luego imprimimos el formulario html\n // echo $khipu_service->renderForm();\n\n $data = $khipu_service->renderForm();\n\n return response($data);\n }",
"public function getCheckoutForm() {\n global $wpdb, $wpsc_cart, $current_user, $cart_data;\n\n get_currentuserinfo();\n $wpsc_checkout = new wpsc_checkout();\n\n $params = $this->getParams();\n \n $addressPrefix = ( isset( $_POST['shippingSameBilling'] ) && 'true' == $_POST['shippingSameBilling'] ) ? 'billing' : 'shipping';\n\n $values = array();\n\n // Get the values from the WPEC forms\n foreach($wpsc_checkout->checkout_items as $formData) {\n $klarnaValue = '';\n switch($formData->unique_name) {\n case $addressPrefix . 'firstname':\n $klarnaValue = 'firstName';\n break;\n case $addressPrefix . 'lastname':\n $klarnaValue = 'lastName';\n break;\n case $addressPrefix . 'address':\n $klarnaValue = 'street';\n break;\n case $addressPrefix . 'city':\n $klarnaValue = 'city';\n break;\n case $addressPrefix . 'postcode':\n $klarnaValue = 'zipcode';\n break;\n case 'billingphone':\n $klarnaValue = array('phoneNumber', 'mobilePhone');\n break;\n default:\n break;\n }\n $maybe_checkout_values = wpsc_get_customer_meta( 'checkout_details' );\n if ( $klarnaValue && ! empty( $maybe_checkout_values ) ) {\n if ( is_array( $klarnaValue ) ) {\n foreach ( $klarnaValue as $value ) {\n $values[$value] = $maybe_checkout_values[$formData->id];\n }\n } else {\n $values[$klarnaValue] = $maybe_checkout_values [$formData->id];\n }\n }\n }\n \n if ($this->getCountryCode() == 'de' || $this->getCountryCode() == 'nl') {\n $addressMatches = array();\n $values['street'] = isset( $values['street'] ) ? $values['street'] : '';\n preg_match('/(?P<street>.*?) (?P<houseno>[0-9]+.*?)( (?P<houseext>[^ ]+))?$/', $values['street'], $addressMatches);\n if(isset($addressMatches['street'])) {\n $values['street'] = $addressMatches['street'];\n if(isset($addressMatches['houseno']))\n $values['homenumber'] = $addressMatches['houseno'];\n if(isset($addressMatches['houseext'])) {\n if($this->getCountryCode() == 'nl')\n $values['house_extension'] = $addressMatches['houseext'];\n else\n $values['homenumber'] .= ' ' . $addressMatches['houseext'];\n }\n }\n }\n\n \n // Get values from previously submitted Klarna form\n $fields = array('gender', 'socialNumber', 'firstName', 'lastName', 'street', 'homenumber', 'zipcode',\n 'city', 'phoneNumber', 'mobilePhone', 'emailAddress', 'year_salary', 'invoiceType', 'companyName',\n 'house_extension', 'shipmentAddressInput_invoice', 'reference', 'paymentplan', 'birth_day',\n 'birth_month', 'birth_year', 'consent', 'paymentPlan');\n foreach($fields AS $field) {\n $fullFieldName = 'klarna_' . $this->moduleType . '_' . $field;\n if(isset($_POST[$fullFieldName]))\n $values[$field] = (trim((string)$_POST[$fullFieldName]));\n }\n \n $maybe_customer_info = wpsc_get_customer_meta( 'klarna_customer_info' );\n if ( ! empty( $maybe_customer_info ) )\n $values = array_merge( $values, $maybe_customer_info );\n\n if ( self::ENABLE_KLARNA_ILT == 1 && is_array($this->iltQuestions) && count($this->iltQuestions) >= 1)\n $this->API->setIltQuestions($this->iltQuestions);\n \n // Some things should only be output once (i.e. in the first activated module)\n if($this->moduleID == 1) {\n $balloons = $this->getBalloons();\n $this->API->addSetupValue('threatmetrix', $this->checkoutHTML());\n } else {\n $balloons = '';\n } \n\n $params['nlBanner'] = ($this->getCountryCode() == 'nl' ? '<div class=\"nlBanner\"><img src=\"' . KLARNA_URL . '/klarna_library/images/klarna/account/notice_nl.jpg\" /></div>' : '');\n\n\n return $balloons . $this->API->retrieveHTML($params, $values, null, array('name' => 'default'));\n }",
"public function processPayment();",
"public function getFormData()\n {\n $data = $this->getData('form_data');\n if ($data === null) {\n $formData = $this->_customerSession->getCustomerFormData(true);\n $data = new \\Magento\\Framework\\DataObject();\n if ($formData) {\n $data->addData($formData);\n $linkedinProfile = ['linkedin_profile' => $this->_customerSession->getLinkedinProfile()];\n $data->addData($linkedinProfile);\n $data->setCustomerData(1);\n }\n if (isset($data['region_id'])) {\n $data['region_id'] = (int)$data['region_id'];\n }\n $this->setData('form_data', $data);\n }\n return $data;\n }",
"public function getFormOfPayment()\n {\n return isset($this->FormOfPayment) ? $this->FormOfPayment : null;\n }",
"function checkout_form($post = false) {\n\t\t$settings = $this->CI->Settings_model->get_settings ( 'bnp_parisbas' );\n\t\t$enabled = $settings ['enabled'];\n\t\t\n\t\t$form = array ();\n\t\tif ($enabled) {\n\t\t\t$form ['name'] = $this->method_name;\n\t\t\t\n\t\t\t$form ['form'] = $this->CI->load->view ( 'bnp_checkout', array (), true );\n\t\t\t\n\t\t\treturn $form;\n\t\t\n\t\t} else\n\t\t\treturn array ();\n\t\n\t}",
"protected function getFormData() {\n\t\treturn $this->stripNonPrintables(json_decode($this->request->postVar('Details'), true));\n\t}",
"protected function getPostValues() {}",
"protected function getForm() {\n /*$action = '/v2/oauth/authorize/process';*/\n \t$action = $this->view->url(array('module' => 'oauth',\n\t\t\t\t\t'controller' => 'authorize',\n\t\t\t\t\t'action' => 'process'), 'Oauth_module_route');\n\t\t\t\t\t\n //create a new OAuth Approve Form\n $form = new Oauth_Form_ApproveForm(array(\n 'action' => $action /*'/v2/oauth/authorize/process'*/,\n 'method' => 'post',\n ));\n\n //retrieve our bloody scopes\n $scope = explode(\" \", $this->getRequest()->getParam(SCOPE));\n $scopes = array();\n foreach ($scope as $s) {\n $scopes[] = $this->_helper->ModelLoader->LoadScope($s);\n }\n\n //retrieve the client\n $client_id = $this->getRequest()->getParam(CLIENT_ID);\n $client = $this->_helper->ModelLoader->LoadClient($client_id);\n\n return $form->buildDisclaimer($scopes, $client)\n ->injectRequestValues($this->getRequest()->getParams());\n }",
"public function retrieveFormFields()\n {\n return $this->start()->uri(\"/api/form/field\")\n ->get()\n ->go();\n }",
"private function _redirectToHostedPaymentForm()\n\t{\n\t\t$model = Mage::getModel('tpg/direct');\n\t\t$szActionURL = $model->getConfigData('hostedpaymentactionurl');\n\t\t$cookies = Mage::getSingleton('core/cookie')->get();\n\t\t$checkoutSession = Mage::getSingleton('checkout/session');\n\t\t$szServerResultURLCookieVariables = '';\n\t\t$szServerResultURLFormVariables = '';\n\t\t$szServerResultURLQueryStringVariables = '';\n\n\t\t// create a Magento form\n\t\t$form = new Varien_Data_Form();\n\t\t$form->setAction($szActionURL)\n\t\t\t->setId('HostedPaymentForm')\n\t\t\t->setName('HostedPaymentForm')\n\t\t\t->setMethod('POST')\n\t\t\t->setUseContainer(true);\n\n\t\t$form->addField(\"HashDigest\", 'hidden', array('name' => \"HashDigest\", 'value' => $checkoutSession->getHashdigest()));\n\t\t$form->addField(\"MerchantID\", 'hidden', array('name' => \"MerchantID\", 'value' => $checkoutSession->getMerchantid()));\n\t\t$form->addField(\"Amount\", 'hidden', array('name' => \"Amount\", 'value' => $checkoutSession->getAmount()));\n\t\t$form->addField(\"CurrencyCode\", 'hidden', array('name' => \"CurrencyCode\", 'value' => $checkoutSession->getCurrencycode()));\n\t\t$form->addField(\"EchoCardType\", 'hidden', array('name' => \"EchoCardType\", 'value' => $checkoutSession->getEchoCardType()));\n\t\t$form->addField(\"OrderID\", 'hidden', array('name' => \"OrderID\", 'value' => $checkoutSession->getOrderid()));\n\t\t$form->addField(\"TransactionType\", 'hidden', array('name' => \"TransactionType\", 'value' => $checkoutSession->getTransactiontype()));\n\t\t$form->addField(\"TransactionDateTime\", 'hidden', array('name' => \"TransactionDateTime\", 'value' => $checkoutSession->getTransactiondatetime()));\n\t\t$form->addField(\"CallbackURL\", 'hidden', array('name' => \"CallbackURL\", 'value' => $checkoutSession->getCallbackurl()));\n\t\t$form->addField(\"OrderDescription\", 'hidden', array('name' => \"OrderDescription\", 'value' => $checkoutSession->getOrderdescription()));\n\t\t$form->addField(\"CustomerName\", 'hidden', array('name' => \"CustomerName\", 'value' => $checkoutSession->getCustomername()));\n\t\t$form->addField(\"Address1\", 'hidden', array('name' => \"Address1\", 'value' => $checkoutSession->getAddress1()));\n\t\t$form->addField(\"Address2\", 'hidden', array('name' => \"Address2\", 'value' => $checkoutSession->getAddress2()));\n\t\t$form->addField(\"Address3\", 'hidden', array('name' => \"Address3\", 'value' => $checkoutSession->getAddress3()));\n\t\t$form->addField(\"Address4\", 'hidden', array('name' => \"Address4\", 'value' => $checkoutSession->getAddress4()));\n\t\t$form->addField(\"City\", 'hidden', array('name' => \"City\", 'value' => $checkoutSession->getCity()));\n\t\t$form->addField(\"State\", 'hidden', array('name' => \"State\", 'value' => $checkoutSession->getState()));\n\t\t$form->addField(\"PostCode\", 'hidden', array('name' => \"PostCode\", 'value' => $checkoutSession->getPostcode()));\n\t\t$form->addField(\"CountryCode\", 'hidden', array('name' => \"CountryCode\", 'value' => $checkoutSession->getCountrycode()));\n\t\t$form->addField(\"CV2Mandatory\", 'hidden', array('name' => \"CV2Mandatory\", 'value' => $checkoutSession->getCv2mandatory()));\n\t\t$form->addField(\"Address1Mandatory\", 'hidden', array('name' => \"Address1Mandatory\", 'value' => $checkoutSession->getAddress1mandatory()));\n\t\t$form->addField(\"CityMandatory\", 'hidden', array('name' => \"CityMandatory\", 'value' => $checkoutSession->getCitymandatory()));\n\t\t$form->addField(\"PostCodeMandatory\", 'hidden', array('name' => \"PostCodeMandatory\", 'value' => $checkoutSession->getPostcodemandatory()));\n\t\t$form->addField(\"StateMandatory\", 'hidden', array('name' => \"StateMandatory\", 'value' => $checkoutSession->getStatemandatory()));\n\t\t$form->addField(\"CountryMandatory\", 'hidden', array('name' => \"CountryMandatory\", 'value' => $checkoutSession->getCountrymandatory()));\n\t\t$form->addField(\"ResultDeliveryMethod\", 'hidden', array('name' => \"ResultDeliveryMethod\", 'value' => $checkoutSession->getResultdeliverymethod()));\n\t\t$form->addField(\"ServerResultURL\", 'hidden', array('name' => \"ServerResultURL\", 'value' => $checkoutSession->getServerresulturl()));\n\t\t$form->addField(\"PaymentFormDisplaysResult\", 'hidden', array('name' => \"PaymentFormDisplaysResult\", 'value' => $checkoutSession->getPaymentformdisplaysresult()));\n\t\t$form->addField(\"ServerResultURLCookieVariables\", 'hidden', array('name' => \"ServerResultURLCookieVariables\", 'value' => $checkoutSession->getServerresulturlcookievariables()));\n\t\t$form->addField(\"ServerResultURLFormVariables\", 'hidden', array('name' => \"ServerResultURLFormVariables\", 'value' => $checkoutSession->getServerresulturlformvariables()));\n\t\t$form->addField(\"ServerResultURLQueryStringVariables\", 'hidden', array('name' => \"ServerResultURLQueryStringVariables\", 'value' => $checkoutSession->getServerresulturlquerystringvariables()));\n\n\t\t// reset the session items\n\t\t$checkoutSession\n\t\t\t->setHashdigest(null)\n\t\t\t->setMerchantid(null)\n\t\t\t->setAmount(null)\n\t\t\t->setCurrencycode(null)\n\t\t\t->setEchoCardType(null)\n\t\t\t->setOrderid(null)\n\t\t\t->setTransactiontype(null)\n\t\t\t->setTransactiondatetime(null)\n\t\t\t->setCallbackurl(null)\n\t\t\t->setOrderdescription(null)\n\t\t\t->setCustomername(null)\n\t\t\t->setAddress1(null)\n\t\t\t->setAddress2(null)\n\t\t\t->setAddress3(null)\n\t\t\t->setAddress4(null)\n\t\t\t->setCity(null)\n\t\t\t->setState(null)\n\t\t\t->setPostcode(null)\n\t\t\t->setCountrycode(null)\n\t\t\t->setCv2mandatory(null)\n\t\t\t->setAddress1mandatory(null)\n\t\t\t->setCitymandatory(null)\n\t\t\t->setPostcodemandatory(null)\n\t\t\t->setStatemandatory(null)\n\t\t\t->setCountrymandatory(null)\n\t\t\t->setResultdeliverymethod(null)\n\t\t\t->setServerresulturl(null)\n\t\t\t->setPaymentformdisplaysresult(null)\n\t\t\t->setServerresulturlcookievariables(null)\n\t\t\t->setServerresulturlformvariables(null)\n\t\t\t->setServerresulturlquerystringvariables(null);\n\n\t\t$html = '<html><body>';\n\t\t$html .= $this->__('You will be redirected to a secure payment page in a few seconds.');\n\t\t$html .= $form->toHtml();\n\t\t$html .= '<script type=\"text/javascript\">document.getElementById(\"HostedPaymentForm\").submit();</script>';\n\t\t$html .= '</body></html>';\n\n\t\treturn $html;\n\t}",
"public function get_post_data() {\n\t\tforeach($this->form_fields as $form_field_key => $form_field_value) {\n\t\t\tif ($form_field_value['type'] == \"select_card_types\") {\n\t\t\t\t$form_field_key_select_card_types = $this->plugin_id . $this->id . \"_\" . $form_field_key;\n\t\t\t\t$select_card_types_values = array();\n\t\t\t\t$_POST[$form_field_key_select_card_types] = $select_card_types_values;\n\t\t\t}\n\t\t}\n\n\t\tif ( ! empty( $this->data ) && is_array( $this->data ) ) {\n\t\t\treturn $this->data;\n\t\t}\n\t\treturn $_POST;\n\t}",
"function getFormData(){\n\n}",
"function print_direct_payment_form($amount = 0, $description = '', $currency = '', $customencrypted = '', $returnurl = '')\n {\n global $ilance, $ilconfig, $headinclude;\n\t\t$ts = time();\n\t\t$sess_id = md5(rand());\n\t\t$_SESSION['ilancedata']['user']['ts'] = $ts;\n\t\t$order_id = $customencrypted;\n\t\t$amount = str_replace(array(',', '.'), '', sprintf(\"%01.2f\", $ilance->currency->string_to_number($amount)));\n\t\t$sig = md5($ilconfig['platnosci_pos_id'] . $sess_id . $ilconfig['platnosci_pos_auth_key'] . $amount . $description . $order_id . $_SESSION['ilancedata']['user']['firstname'] . $_SESSION['ilancedata']['user']['lastname'] . $_SESSION['ilancedata']['user']['address'] . $_SESSION['ilancedata']['user']['city'] . $_SESSION['ilancedata']['user']['postalzip'] . $_SESSION['ilancedata']['user']['email'] . IPADDRESS . $ts . $ilconfig['platnosci_pos_key1']);\n\t\t$html = '<form action=\"https://www.platnosci.pl/paygw/ISO/NewPayment/xml\" method=\"POST\" name=\"payform\">\n<input type=\"hidden\" name=\"first_name\" value=\"' . $_SESSION['ilancedata']['user']['firstname'] . '\">\n<input type=\"hidden\" name=\"last_name\" value=\"' . $_SESSION['ilancedata']['user']['lastname'] . '\">\n<input type=\"hidden\" name=\"email\" value=\"' . $_SESSION['ilancedata']['user']['email'] . '\">\n<input type=\"hidden\" name=\"street\" value=\"' . $_SESSION['ilancedata']['user']['address'] . '\">\n<input type=\"hidden\" name=\"city\" value=\"' . $_SESSION['ilancedata']['user']['city'] . '\">\n<input type=\"hidden\" name=\"post_code\" value=\"' . $_SESSION['ilancedata']['user']['postalzip'] . '\">\n<input type=\"hidden\" name=\"order_id\" value=\"' . $customencrypted . '\">\n<input type=\"hidden\" name=\"pos_id\" value=\"' . $ilconfig['platnosci_pos_id'] . '\">\n<input type=\"hidden\" name=\"pos_auth_key\" value=\"' . $ilconfig['platnosci_pos_auth_key'] . '\">\n<input type=\"hidden\" name=\"session_id\" value=\"' . $sess_id . '\">\n<input type=\"hidden\" name=\"amount\" value=\"' . $amount . '\">\n<input type=\"hidden\" name=\"desc\" value=\"' . $description . '\">\n<input type=\"hidden\" name=\"client_ip\" value=\"' . IPADDRESS . '\">\n<input type=\"hidden\" name=\"js\" value=\"1\">';\n\t\t\t\t/*\n\t\t\t\t * <input type=\"hidden\" name=\"ts\" value=\"'.$ts.'\">\n\t\t\t\t<input type=\"hidden\" name=\"sig\" value=\"'.$sig.'\">\n\t\t\t\t */\n\t\t\t\t$headinclude .= '<script type=\"text/javascript\">\n<!--\ndocument.forms[\\'payform\\'].js.value=1;\n-->\n</script>';\n return $html; \n }",
"public function index_post(){\n\n $uri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);\n $uri = explode( '/', $uri );\n $post_req = json_decode(file_get_contents(\"php://input\"),true); \n //echo \"<pre>\";print_r($post_req);exit;\n $resp = array();\n try {\n $resp = $this->common_api->GetBranchDetails($post_req);\n $method = $post_req['Method'];\n if(@$resp['modules']){\n $this->modules = $resp['modules'];\n \n if(!empty($this->modules['modules'])){\n if($method == 'CreateSalesInvoice'){\n $data = $this->common_api->get_default_country_state();\n $sales_module_id = $this->config->item('sales_module');\n $module_id = $sales_module_id;\n $privilege = \"add_privilege\";\n $section_modules = $this->common_api->get_section_modules($sales_module_id , $this->modules , $privilege);\n $data = array_merge($data , $section_modules);\n $access_settings = $section_modules['access_settings'];\n \n /*$currency = $this->input->post('currency_id');*/\n\n /* Create Invoice number */\n\n $data['sales_module_id'] = $sales_module_id;\n $data['module_id'] = $sales_module_id;\n $data['notes_module_id'] = $this->config->item('notes_module');\n $data['product_module_id'] = $this->config->item('product_module');\n $data['service_module_id'] = $this->config->item('service_module');\n $data['customer_module_id'] = $this->config->item('customer_module');\n $data['category_module_id'] = $this->config->item('category_module');\n $data['subcategory_module_id'] = $this->config->item('subcategory_module');\n $data['tax_module_id'] = $this->config->item('tax_module');\n $data['discount_module_id'] = $this->config->item('discount_module');\n $data['accounts_module_id'] = $this->config->item('accounts_module');\n /* Sub Modules Present */\n $data['notes_sub_module_id'] = $this->config->item('notes_sub_module');\n $data['transporter_sub_module_id'] = $this->config->item('transporter_sub_module');\n $data['shipping_sub_module_id'] = $this->config->item('shipping_sub_module');\n $data['charges_sub_module_id'] = $this->config->item('charges_sub_module');\n $data['accounts_sub_module_id'] = $this->config->item('accounts_sub_module');\n $sales_data = $post_req['sales'];\n\n if ($access_settings[0]->invoice_creation == \"automatic\"){\n $primary_id = \"sales_id\";\n $table_name = $this->config->item('sales_table');\n $date_field_name = \"sales_date\";\n $current_date = date('Y-m-d');\n $invoice_number = $this->common_api->generate_invoice_number_api($this,$access_settings , $primary_id , $table_name , $date_field_name , $current_date);\n } else {\n $invoice_number = $sales_data['invoice_number'];\n }\n\n /* Get currency ID */\n /*$currency_code = $sales_data['Currency_code'];*/\n $customer = 0;\n /*echo $this->session->userdata('SESS_BRANCH_ID');\n echo $this->session->userdata('SESS_USER_ID');\n exit();*/\n \n if(@$sales_data['Customer']){\n $cust_detail = $this->getCustomer($sales_data['Customer']);\n \n if($cust_detail['flag']){\n \n $customer = $cust_detail['customer'];\n $customer_id = $customer['customer_id'];\n $billing_address = $customer['billing_address'];\n $shipping_address = $customer['shipping_address'];\n \n $items = $sales_data['Items'];\n $item_data = array();\n $total_sub_total = $total_grand_total = $total_discount_amount = $total_tax_amount = $total_cess_amount = $total_taxable_amount = $total_tds_amount = $total_tcs_amount = $total_igst_amount = $total_cgst_amount = $total_sgst_amount = 0;\n\n $Extra_charges = (@$sales_data['Extra_charges'] ? $sales_data['Extra_charges'] : array());\n $is_gst = 0;\n if ($access_settings[0]->tax_type == \"gst\"){\n if ($data['branch'][0]->branch_country_id == $billing_address['country_id']){\n $is_gst = 1;\n }else{\n if ($sales_data['Type_of_supply'] == \"export_with_payment\")\n $is_gst = 1;\n }\n }\n $Extra_charges = $this->getExtraChargesDetail($Extra_charges,$is_gst);\n $total_other_amount = $Extra_charges['total_other_amount'];\n $total_other_taxable_amount = $Extra_charges['total_other_taxable_amount'];\n \n \n $item_id = array();\n foreach ($items as $key => $value) {\n if(!@$value['aodry_product_id']){\n $item_id = $this->getItemId($value);\n }else{ \n $item_id['flag'] = 1;\n $item_id['product_id'] = $value['aodry_product_id'];\n }\n \n $value['item_type'] = strtolower($value['item_type']);\n \n if($item_id['flag']){\n $tax_detail = $this->getTaxDetail($value);\n $item_sub_total = $value['item_price'] * $value['item_quantity'];\n $item_discount_amount = 0;\n /* Item discount amount */\n if($tax_detail['discount_id'] > 0){\n $item_discount_amount = ($item_sub_total * (float)$value['item_discount_percentage']) / 100;\n }\n\n //$item_taxable_value = $item_sub_total - $item_discount_amount;\n // selling price with discount\n $item_value = $item_sub_total - $item_discount_amount;\n \n \n $item_tax_amount = 0;\n /*if($tax_detail['tax_id'] > 0){\n $item_tax_amount = ($item_taxable_value * (float)$value['item_tax_percentage']) / 100;\n }\n $item_tax_amount += $total_other_taxable_amount;*/\n $cal_tax = 0;\n $item_taxable_value = 0;\n $item_tax_amount = 0;\n if($tax_detail['tax_id'] > 0){\n // find the taxable value from selling price\n $cal_tax = 1 + ( (float)$value['item_tax_percentage'] / 100);\n $item_taxable_value = $item_value / $cal_tax;\n $item_taxable_value = round($item_taxable_value,2);\n\n $item_price = ($item_taxable_value / $value['item_quantity']); \n $item_sub_total_item = $item_taxable_value;\n $item_tax_amount = ($item_taxable_value * (float)$value['item_tax_percentage']) / 100;\n $item_tax_amount = round($item_tax_amount,2);\n }\n \n $item_tds_amount = $item_tcs_amount = 0;\n if($tax_detail['tds_id'] > 0){\n if($value['item_type'] == 'product'){\n $item_tcs_amount = ($item_taxable_value * (float)$value['item_tds_percentage']) / 100;\n }else{\n $item_tds_amount = ($item_taxable_value * (float)$value['item_tds_percentage']) / 100;\n }\n }\n // $item_tax_amount += $item_tax_amount;\n \n $item_cess_amount = 0;\n /*if($tax_detail['cess_id'] > 0){\n $item_cess_amount = ($item_taxable_value * (float)$value['item_cess_percentage']) / 100;\n }*/\n $item_tax_percentage = (float)$value['item_tax_percentage'];\n\n $item_igst_amount = $item_cgst_amount = $item_sgst_amount = $item_cgst_percentage = $item_sgst_percentage = $item_igst_percentage = 0;\n \n if ($is_gst){\n $tax_split_percentage = $section_modules['access_common_settings'][0]->tax_split_percentage;\n\n $cgst_amount_percentage = $tax_split_percentage;\n $sgst_amount_percentage = 100 - $cgst_amount_percentage;\n\n if ($data['branch'][0]->branch_country_id == $billing_address['country_id']){\n if ($data['branch'][0]->branch_state_id == $billing_address['state_id']) {\n \n /*$item_cgst_amount = ($item_tax_amount * $cgst_amount_percentage) / 100;\n $item_sgst_amount = ($item_tax_amount * $sgst_amount_percentage) / 100;\n \n $item_cgst_percentage = ($item_tax_percentage * $cgst_amount_percentage) / 100;\n $item_sgst_percentage = ($item_tax_percentage * $sgst_amount_percentage) / 100;*/\n\n $item_cgst_amount = ($value['item_tax_amount'] / 2 );\n $item_sgst_amount = ($value['item_tax_amount'] / 2 );\n \n $item_cgst_percentage = ($value['item_tax_percentage'] / 2);\n $item_sgst_percentage = ($value['item_tax_percentage'] / 2);\n\n } else {\n $item_igst_amount = $value['item_tax_amount'];\n $item_igst_percentage = $value['item_tax_percentage'];\n }\n $is_gst = 1;\n } else {\n if ($sales_data['Type_of_supply'] == \"export_with_payment\"){\n $item_igst_amount = $item_tax_amount;\n $item_igst_percentage = $item_tax_percentage;\n $is_gst = 1;\n }else{\n $item_cess_amount = 0;\n $item_tax_amount = 0;\n }\n }\n }\n \n /*$item_grand_total = ($item_taxable_value) + ($item_tax_amount) + $item_tcs_amount + ($item_cess_amount);\n $total_sub_total += $item_sub_total_item;\n $total_grand_total += $item_grand_total;\n $total_discount_amount += $item_discount_amount;\n $total_tax_amount += $item_tax_amount;\n $total_cess_amount += $item_cess_amount;\n $total_taxable_amount += $item_taxable_value;\n $total_tds_amount += $item_tds_amount;\n $total_tcs_amount += $item_tcs_amount;\n $total_igst_amount += $item_igst_amount;\n $total_cgst_amount += $item_cgst_amount;\n $total_sgst_amount += $item_sgst_amount;*/\n\n //ecom calculation\n $sales_item_sub_total = ($value['item_taxable_amount'] * $value['item_quantity']);\n\n $sales_item_taxable_value = ($value['item_taxable_amount'] * $value['item_quantity']) - $value['item_discount_amount'];\n\n\n\n $item_grand_total = ($item_taxable_value) + ($item_tax_amount) + $item_tcs_amount + ($item_cess_amount);\n $total_sub_total += $sales_item_sub_total;\n $total_grand_total += $item_grand_total;\n $total_discount_amount += $value['item_discount_amount'];\n $total_tax_amount += $value['item_tax_amount'];\n $total_cess_amount += $item_cess_amount;\n $total_taxable_amount += $sales_item_taxable_value;\n $total_tds_amount += $item_tds_amount;\n $total_tcs_amount += $item_tcs_amount;\n $total_igst_amount += $item_igst_amount;\n $total_cgst_amount += $item_cgst_amount;\n $total_sgst_amount += $item_sgst_amount;\n\n\n\n\n \n \n\n\n\n $item_data[] = array(\n \"item_id\" => $item_id['product_id'] ,\n \"item_type\" => $value['item_type'] ,\n \"sales_item_quantity\" => $value['item_quantity'] ? (float)$value['item_quantity'] : 0 ,\n \"sales_item_unit_price\" => $value['item_taxable_amount'] ? (float)$value['item_taxable_amount'] : 0 ,\n \"sales_item_sub_total\" => $sales_item_sub_total ? (float) $sales_item_sub_total : 0 ,\n \"sales_item_taxable_value\" => $sales_item_taxable_value ? (float) $sales_item_taxable_value : 0 ,\n \"sales_item_discount_amount\" => $value['item_discount_amount'] ? (float) $value['item_discount_amount'] : 0 ,\n \"sales_item_discount_id\" => $tax_detail['discount_id'] ? (float)$tax_detail['discount_id'] : 0,\n \"sales_item_tds_id\" => $tax_detail['tds_id'] ? (float)$tax_detail['tds_id'] : 0 ,\n \"sales_item_tds_percentage\" => $value['item_tds_percentage'] ?(float)$value['item_tds_percentage'] : 0 ,\n \"sales_item_tds_amount\" => ($item_tds_amount + $item_tcs_amount),\n \"sales_item_grand_total\" => $value['item_grand_total'] ? (float)$value['item_grand_total'] : 0 ,\n \"sales_item_tax_id\" => $tax_detail['tax_id'] ? (float)$tax_detail['tax_id'] : 0 ,\n \"sales_item_tax_cess_id\" => 0,\n \"sales_item_igst_percentage\" => $item_igst_percentage ,\n \"sales_item_igst_amount\" => $item_igst_amount ,\n \"sales_item_cgst_percentage\" => $item_cgst_percentage ,\n \"sales_item_cgst_amount\" => $item_cgst_amount ,\n \"sales_item_sgst_percentage\" => $item_sgst_percentage ,\n \"sales_item_sgst_amount\" => $item_sgst_amount ,\n \"sales_item_tax_percentage\" => $item_tax_percentage ? (float) $item_tax_percentage : 0 ,\n \"sales_item_tax_cess_percentage\" =>$value['item_cess_percentage'] ?(float)$value['item_cess_percentage'] : 0 ,\n \"sales_item_tax_amount\" => $value['item_tax_amount'] ? (float) $value['item_tax_amount'] : 0 ,\n 'sales_item_tax_cess_amount' => 0 ,\n \"sales_item_description\" => $value['item_description'] ? $value['item_description'] : \"\" ,\n \"debit_note_quantity\" => 0\n );\n }\n\n }\n\n \n\n if(!empty($item_data)){\n $Transport_details = (@$sales_data['Transport_details'] ? $sales_data['Transport_details'] : array());\n $Shipping_details = (@$sales_data['Shipping_details'] ? $sales_data['Shipping_details'] : array());\n $total_grand_total = $total_grand_total + $total_other_amount + $total_other_taxable_amount; \n $customer_payable_amount = $total_grand_total;\n if($total_tds_amount > 0){\n $customer_payable_amount = bcsub($total_grand_total, $total_tds_amount);\n }\n\n $sales_main = array(\n 'sales_date' => (@$sales_data['Invoice_date'] ? date('Y-m-d' ,strtotime($sales_data['Invoice_date'])) : date('Y-m-d')),\n \"sales_invoice_number\" => $invoice_number ,\n \"sales_sub_total\" => (float)$total_sub_total,\n \"sales_grand_total\" => $sales_data['Sales_grand_total'],\n \"customer_payable_amount\" => $sales_data['Sales_grand_total'],\n \"sales_discount_amount\" => $total_discount_amount,\n \"sales_tax_amount\" => $total_tax_amount,\n \"sales_tax_cess_amount\" => 0,\n \"sales_taxable_value\" => (float)$total_taxable_amount ,\n \"sales_tds_amount\" => $total_tds_amount,\n \"sales_tcs_amount\" => $total_tcs_amount,\n \"sales_igst_amount\" => $total_igst_amount,\n \"sales_cgst_amount\" => $total_cgst_amount,\n \"sales_sgst_amount\" => $total_sgst_amount,\n \"from_account\" => 'customer' ,\n \"to_account\" => 'sales' ,\n \"sales_paid_amount\" => 0,\n \"credit_note_amount\" => 0,\n \"debit_note_amount\" => 0,\n \"ship_to_customer_id\" => $customer['customer_id'],\n \"financial_year_id\" => $this->session->userdata('SESS_FINANCIAL_YEAR_ID'),\n \"sales_party_id\" => $customer['customer_id'],\n \"sales_party_type\" => \"customer\" ,\n \"sales_nature_of_supply\" => (@$sales_data['Nature_of_supply'] ? $sales_data['Nature_of_supply'] : 'both'),\n \"sales_order_number\" => (@$sales_data['Order_number'] ? $sales_data['Order_number'] : ''),\n \"sales_type_of_supply\" => (@$sales_data['Type_of_supply'] ? $sales_data['Type_of_supply'] : 'regular'),\n \"sales_gst_payable\" => (@$sales_data['Gst_payable'] ? $sales_data['Gst_payable'] : 'no'),\n \"sales_billing_country_id\" => $customer['billing_address']['country_id'] ,\n \"sales_billing_state_id\" => $customer['billing_address']['state_id'],\n \"added_date\" => date('Y-m-d') ,\n \"added_user_id\" => $this->session->userdata('SESS_USER_ID'),\n \"branch_id\" => $this->session->userdata('SESS_BRANCH_ID'),\n \"currency_id\" => $this->session->userdata('SESS_DEFAULT_CURRENCY'),\n \"updated_date\" => \"\" ,\n \"updated_user_id\" => \"\" ,\n \"warehouse_id\" => \"\" ,\n \"transporter_name\"=> (@$Transport_details['name'] ? $Transport_details['name'] : ''),\n \"transporter_gst_number\" => (@$Transport_details['GST_number'] ? $Transport_details['GST_number'] : ''),\n \"lr_no\" => (@$Transport_details['LR_number'] ? $Transport_details['LR_number'] : '') ,\n \"vehicle_no\" => (@$Transport_details['vehicle_number'] ? $Transport_details['vehicle_number'] : ''),\n \"mode_of_shipment\" => (@$Shipping_details['mode_of_shipment'] ? $Shipping_details['mode_of_shipment'] : ''),\n \"ship_by\" => (@$Shipping_details['ship_by'] ? $Shipping_details['ship_by'] : ''),\n \"net_weight\" => (@$Shipping_details['net_weight'] ? $Shipping_details['net_weight'] : '') ,\n \"gross_weight\" => (@$Shipping_details['gross_weight'] ? $Shipping_details['gross_weight'] : '') ,\n \"origin\" => (@$Shipping_details['origin'] ? $Shipping_details['origin'] : '') ,\n \"destination\" => (@$Shipping_details['destination'] ? $Shipping_details['destination'] : '') ,\n \"shipping_type\" => (@$Shipping_details['shipping_type'] ? $Shipping_details['shipping_type'] : '') ,\n \"shipping_type_place\" => (@$Shipping_details['shipping_type_place'] ? $Shipping_details['shipping_type_place'] : '') ,\n \"lead_time\" => (@$Shipping_details['lead_time'] ? $Shipping_details['lead_time'] : '') ,\n \"shipping_address_id\" => (@$customer['shipping_address']['shipping_id'] ? $customer['shipping_address']['shipping_id'] : 0),\n \"warranty\" => (@$Shipping_details['warranty'] ? $Shipping_details['warranty'] : ''),\n \"payment_mode\" => (@$Shipping_details['payment_mode'] ? $Shipping_details['payment_mode'] : '') ,\n \"billing_address_id\" => $customer['billing_address']['billing_id'] ,\n \"freight_charge_amount\"=> (@$Extra_charges['freight_charge_amount'] ? $Extra_charges['freight_charge_amount'] : 0) ,\n \"freight_charge_tax_percentage\" => (@$Extra_charges['freight_charge_percentage'] ? $Extra_charges['freight_charge_percentage'] : 0) ,\n \"freight_charge_tax_amount\" => (@$Extra_charges['freight_charge_tax_amount'] ? $Extra_charges['freight_charge_tax_amount'] : 0) ,\n \"freight_charge_tax_id\" => (@$Extra_charges['freight_charge_tax_id'] ? $Extra_charges['freight_charge_tax_id'] : 0) ,\n \"total_freight_charge\" =>(@$Extra_charges['freight_charge_amount'] ? $Extra_charges['freight_charge_amount'] : 0) ,\n \"insurance_charge_amount\" => (@$Extra_charges['insurance_charge_amount'] ? $Extra_charges['insurance_charge_amount'] : 0) ,\n \"insurance_charge_tax_percentage\" => (@$Extra_charges['insurance_charge_percentage'] ? $Extra_charges['insurance_charge_percentage'] : 0) ,\n \"insurance_charge_tax_amount\" => (@$Extra_charges['insurance_charge_tax_amount'] ? $Extra_charges['insurance_charge_tax_amount'] : 0) ,\n \"insurance_charge_tax_id\" => (@$Extra_charges['insurance_charge_tax_id'] ? $Extra_charges['insurance_charge_tax_id'] : 0) ,\n \"total_insurance_charge\" => (@$Extra_charges['insurance_charge_amount'] ? $Extra_charges['insurance_charge_amount'] : 0) ,\n \"packing_charge_amount\" => (@$Extra_charges['packing_charge_amount'] ? $Extra_charges['packing_charge_amount'] : 0) ,\n \"packing_charge_tax_percentage\" => (@$Extra_charges['packing_charge_percentage'] ? $Extra_charges['packing_charge_percentage'] : 0) ,\n \"packing_charge_tax_amount\" => (@$Extra_charges['packing_charge_tax_amount'] ? $Extra_charges['packing_charge_tax_amount'] : 0) ,\n \"packing_charge_tax_id\" => (@$Extra_charges['packing_charge_tax_id'] ? $Extra_charges['packing_charge_tax_id'] : 0) ,\n \"total_packing_charge\" => (@$Extra_charges['packing_charge_amount'] ? $Extra_charges['packing_charge_amount'] : 0) ,\n \"incidental_charge_amount\" => (@$Extra_charges['incidental_charge_amount'] ? $Extra_charges['incidental_charge_amount'] : 0) ,\n \"incidental_charge_tax_percentage\" => (@$Extra_charges['incidental_charge_percentage'] ? $Extra_charges['incidental_charge_percentage'] : 0) ,\n \"incidental_charge_tax_amount\" => (@$Extra_charges['incidental_charge_tax_amount'] ? $Extra_charges['incidental_charge_tax_amount'] : 0) ,\n \"incidental_charge_tax_id\" => (@$Extra_charges['incidental_charge_tax_id'] ? $Extra_charges['incidental_charge_tax_id'] : 0) ,\n \"total_incidental_charge\" => (@$Extra_charges['incidental_charge_amount'] ? $Extra_charges['incidental_charge_amount'] : 0) ,\n \"inclusion_other_charge_amount\" => (@$Extra_charges['inclusion_other_charge_amount'] ? $Extra_charges['inclusion_other_charge_amount'] : 0) ,\n \"inclusion_other_charge_tax_percentage\" => (@$Extra_charges['inclusion_other_charge_percentage'] ? $Extra_charges['inclusion_other_charge_percentage'] : 0) ,\n \"inclusion_other_charge_tax_amount\" => (@$Extra_charges['inclusion_other_charge_tax_amount'] ? $Extra_charges['inclusion_other_charge_tax_amount'] : 0) ,\n \"inclusion_other_charge_tax_id\" => (@$Extra_charges['inclusion_other_charge_tax_id'] ? $Extra_charges['inclusion_other_charge_tax_id'] : 0) ,\n \"total_inclusion_other_charge\" => (@$Extra_charges['inclusion_other_charge_amount'] ? $Extra_charges['inclusion_other_charge_amount'] : 0) ,\n \"exclusion_other_charge_amount\" => (@$Extra_charges['exclusion_other_charge_amount'] ? $Extra_charges['exclusion_other_charge_amount'] : 0) ,\n \"exclusion_other_charge_tax_percentage\" => (@$Extra_charges['exclusion_other_charge_percentage'] ? $Extra_charges['exclusion_other_charge_percentage'] : 0) ,\n \"exclusion_other_charge_tax_amount\" =>(@$Extra_charges['exclusion_other_charge_tax_amount'] ? $Extra_charges['exclusion_other_charge_tax_amount'] : 0) ,\n \"exclusion_other_charge_tax_id\" => (@$Extra_charges['exclusion_other_charge_tax_id'] ? $Extra_charges['exclusion_other_charge_tax_id'] : 0) ,\n \"total_exclusion_other_charge\" => (@$Extra_charges['exclusion_other_charge_amount'] ? $Extra_charges['exclusion_other_charge_amount'] : 0) ,\n \"total_other_amount\" => (@$Extra_charges['total_other_amount'] ? $Extra_charges['total_other_amount'] : 0) ,\n \"total_other_taxable_amount\" => (@$Extra_charges['total_other_taxable_amount'] ? $Extra_charges['total_other_taxable_amount'] : 0) ,\n \"round_off_amount\" => 0,\n \"added_by_api\" => '1',\n \"note1\" => (@$sales_data['Note1'] ? trim($sales_data['Note1']) : ''),\n \"note2\" => (@$sales_data['Note2'] ? trim($sales_data['Note2']) : '')\n );\n\n\n\n $data_main = array_map('trim' , $sales_main);\n \n $sales_table = $this->config->item('sales_table');\n $sales_id = $this->general_model->insertData($sales_table , $data_main);\n \n if ($sales_id) {\n $log_data = array(\n 'user_id' => $this->session->userdata('SESS_USER_ID'),\n 'table_id' => $sales_id ,\n 'table_name' => $sales_table ,\n 'financial_year_id' => $this->SESS_FINANCIAL_YEAR_ID,\n 'branch_id' => $this->session->userdata('SESS_BRANCH_ID') ,\n 'message' => 'Sales Inserted');\n $data_main['sales_id'] = $sales_id;\n $log_table = $this->config->item('log_table');\n $this->general_model->insertData($log_table , $log_data);\n \n $js_data = $item_data;\n $item_table = $this->config->item('sales_item_table');\n\n $js_data1 = array();\n foreach ($js_data as $key => $value) {\n $value['sales_id'] = $sales_id;\n $data_item = array_map('trim' , $value);\n $js_data1[] = $data_item;\n \n if ($data_item['item_type'] == \"product\"){\n $product_data = $this->common_api->product_field($this->session->userdata('SESS_BRANCH_ID') ,$data_item['item_id']);\n $product_result = $this->general_model->getJoinRecords($product_data['string'] , $product_data['table'] , $product_data['where'],$product_data['join']);\n \n $product_quantity = ($product_result[0]->product_quantity - $value['sales_item_quantity']);\n $stockData = array('product_quantity' => $product_quantity );\n $where = array('product_id' => $value['item_id'] );\n $product_table = $this->config->item('product_table');\n $this->general_model->updateData($product_table , $stockData , $where);\n // quantity history\n $history = array(\n \"item_id\" => $value['item_id'] ,\n \"item_type\" => 'product' ,\n \"reference_id\" => $sales_id ,\n \"reference_number\" => $invoice_number ,\n \"reference_type\" => 'sales' ,\n \"quantity\" => $value['sales_item_quantity'] ,\n \"stock_type\" => 'indirect' ,\n \"branch_id\" => $this->session->userdata('SESS_BRANCH_ID') ,\n \"added_date\" => date('Y-m-d') ,\n \"entry_date\" => date('Y-m-d') ,\n \"added_user_id\" => $this->session->userdata('SESS_USER_ID'));\n $this->general_model->insertData(\"quantity_history\" , $history);\n }\n }\n //$this->general_model->insertData($item_table , $js_data1);\n $this->db->insert_batch($item_table, $js_data1);\n //sales lookup\n $look_up = array(\n 'sales_id' => $sales_id,\n 'sales_invoice_number' => $invoice_number,\n 'aodry_customer_id' => $customer['customer_id'],\n 'added_date' => date('Y-m-d'),\n 'added_user_id' => $this->session->userdata('SESS_USER_ID'),\n 'branch_id' => $this->session->userdata('SESS_BRANCH_ID')\n );\n $this->db->insert('ecom_sales_sync', $look_up);\n if (in_array($data['accounts_module_id'] , $section_modules['active_add'])){\n if (in_array($data['accounts_sub_module_id'] , $section_modules['access_sub_modules'])){\n $action = \"add\";\n $branch_data = $data['branch'][0];\n $this->sales_voucher_entry($data_main , $js_data1 , $action , $data['branch'],$branch_data);\n }\n }\n\n $resp['status'] = 200;\n $resp['message'] = 'Sales Invoice addded successfully!';\n $resp['data'] = $look_up;\n }\n \n $logs = array('action_name' => 'CreateSalesInvoice','action_id'=> $sales_id,'status' => $resp['status'],'response' => $resp['message'],'user_id' => $this->session->userdata('SESS_USER_ID'),'branch_id' =>$this->session->userdata('SESS_BRANCH_ID'),'created_at' => date('Y-m-d H:i:s'));\n $this->db->insert('ecom_sync_logs',$logs);\n }else{\n $resp['status'] = 404;\n $resp['message'] = 'Invalid Items!';\n }\n /*echo \"<pre>\";\n print_r($sales_main);\n print_r($item_data);\n exit();*/\n }else{\n $resp['status'] = 404;\n $resp['message'] = $cust_detail['msg'];\n }\n \n\n }else{\n $resp['status'] = 404;\n $resp['message'] = 'Customer detail not found.';\n }\n }elseif($method == 'PrintSalesInvoice'){\n $order_details = $post_req['data'];\n $order_id = $order_details['order_id'];\n $sales_qry = $this->db->query(\"SELECT sales_id FROM `sales` WHERE branch_id='\".$this->session->userdata('SESS_BRANCH_ID').\"' AND sales_order_number = '{$order_id}' \");\n if($sales_qry->num_rows() > 0){\n $sales_pdf = $sales_qry->result();\n $sales_pdf_id = $sales_pdf[0]->sales_id;\n\n // $id = $this->encryption_url->decode($sales_pdf_id);\n $id = $sales_pdf_id;\n $data = $this->common_api->get_default_country_state();\n $sales_module_id = $this->config->item('sales_module');\n $data['module_id'] = $sales_module_id;\n $modules = $this->modules;\n $privilege = \"view_privilege\";\n $data['privilege'] = \"view_privilege\";\n $section_modules = $this->common_api->get_section_modules($sales_module_id , $modules , $privilege);\n $data = array_merge($data , $section_modules);\n $product_module_id = $this->config->item('product_module');\n $service_module_id = $this->config->item('service_module');\n $customer_module_id = $this->config->item('customer_module');\n $data['charges_sub_module_id'] = $this->config->item('charges_sub_module');\n $data['notes_sub_module_id'] = $this->config->item('notes_sub_module');\n ob_start();\n $html = ob_get_clean();\n $html = utf8_encode($html);\n \n $branch_data = $data['branch'][0];\n $data = $this->getSalesDetails($id, $branch_data, $data['branch']);\n //echo \"<pre>\";print_r($data);exit();\n \n $paper_size = 'a4';\n $orientation = 'portrait'; \n \n $print_currency = $this->input->post('print_currency');\n $converted_rate = 1;\n \n if($print_currency != $this->session->userdata('SESS_DEFAULT_CURRENCY')){\n if($data['data'][0]->currency_converted_rate > 0)\n $converted_rate = $data['data'][0]->currency_converted_rate;\n }else{\n $currency = $this->getBranchCurrencyCode();\n $data['data'][0]->currency_name = $currency[0]->currency_name;\n $data['data'][0]->currency_code = $currency[0]->currency_code;\n $data['data'][0]->currency_symbol = $currency[0]->currency_symbol;\n $data['data'][0]->currency_symbol_pdf = $currency[0]->currency_symbol_pdf;\n $data['data'][0]->unit = $currency[0]->unit;\n $data['data'][0]->decimal_unit = $currency[0]->decimal_unit;\n }\n $data['converted_rate'] = $converted_rate;\n $pdf_json = $data['access_settings'][0]->pdf_settings;\n $rep = str_replace(\"\\\\\" , '' , $pdf_json);\n $data['pdf_results'] = json_decode($rep , true);\n \n $html = $this->load->view('sales/pdf' , $data , true); \n //echo \"<pre>\";print_r($html);exit();\n $resp['status'] = 200;\n $resp['message'] = 'Sales Invoice Sent successfully!';\n $resp['data'] = htmlentities($html, ENT_QUOTES);;\n }else{\n $resp['status'] = 404;\n $resp['message'] = 'Sales Not Found!';\n } \n }\n }else{\n $resp['status'] = 404;\n $resp['message'] = 'User access denied!';\n } \n }\n }catch (Exception $e) {\n \n }\n\n // everything else results in a 404 Not Found\n if ($resp['status'] == 200) {\n $this->response($resp, REST_Controller::HTTP_OK);\n }else{\n $this->response($resp, REST_Controller::HTTP_NOT_FOUND);\n }\n exit();\n }",
"function get_data_form(){\n\n\n\t$IdGrupo = '';\n\t$IdFuncionalidad = '';\n\t$IdAccion = '';\n\t$NombreGrupo = '';\n\t$NombreFuncionalidad = '';\n\t$NombreAccion = '';\n\t$action = '';\n\n\tif(isset($_REQUEST['IdGrupo'])){\n\t$IdGrupo = $_REQUEST['IdGrupo'];\n\t}\n\tif(isset($_REQUEST['IdFuncionalidad'])){\n\t$IdFuncionalidad = $_REQUEST['IdFuncionalidad'];\n\t}\n\tif(isset($_REQUEST['IdAccion'])){\n\t$IdAccion = $_REQUEST['IdAccion'];\n\t}\n\tif(isset($_REQUEST['action'])){\n\t$action = $_REQUEST['action'];\n\t}\n\tif(isset($_REQUEST['NombreGrupo'])){\n\t$NombreGrupo = $_REQUEST['NombreGrupo'];\n\t}\n\tif(isset($_REQUEST['NombreFuncionalidad'])){\n\t$NombreFuncionalidad = $_REQUEST['NombreFuncionalidad'];\n\t}\n\tif(isset($_REQUEST['NombreAccion'])){\n\t$NombreAccion = $_REQUEST['NombreAccion'];\n\t}\n\n\t$PERMISOS = new PERMISO_Model(\n\t\t$IdGrupo, \n\t\t$IdFuncionalidad, \n\t\t$IdAccion,\n\t\t$NombreGrupo,\n\t\t$NombreFuncionalidad,\n\t\t$NombreAccion);\n\n\treturn $PERMISOS;\n}",
"abstract function getForm();",
"public function enquiry_form_post()\n\t\t{\n\t\t\t$serviceName = 'enquiry_form';\n\t\t\t\n\t\t\t$ip['user_id'] = trim($this->input->post('user_id'));\n\t\t\t$logged_in_user = $this->session->userdata('logged_in_user');\t\n\t\t\t\n\t\t\t$ip['user_id'] = ($logged_in_user['user_id']!='' ? $logged_in_user['user_id']:$ip['user_id']);\n\t $ip['odr_by_fname'] = trim($this->input->post('odr_by_fname'));\n\t $ip['odr_by_lname'] = trim($this->input->post('odr_by_lname'));\n\t $ip['odr_by_mob'] = trim($this->input->post('odr_by_mob'));\n\t\t\t$ip['from_state'] = trim($this->input->post('from_state'));\n\t\t\t$ip['from_city'] = $this->input->post('from_city');\n\t\t\t$ip['from_location'] = $this->input->post('from_location');\n\t\t\t$ip['to_state'] = trim($this->input->post('to_state'));\n\t\t\t$ip['to_city'] = $this->input->post('to_city');\n\t\t\t$ip['to_location'] = $this->input->post('to_location');\n\n\t\t\t$ip['material_type'] = trim($this->input->post('material_type'));\n\t\t\t$ip['other_material_type'] = trim($this->input->post('other_material_type'));\n\n\t\t\t$ip['no_of_quantity'] = trim($this->input->post('no_of_quantity'));\n\t\t\t$ip['weight'] = trim($this->input->post('weight'));\n\t\t\t\n\t\t\t$ip['feet'] = trim($this->input->post('feet'));\n\t\t\t\n\t\t\t$ip['vehicle_type'] = trim($this->input->post('vehicle_type'));\n $ip['other_vehicle_type'] = trim($this->input->post('other_vehicle_type'));\n\n $ip['no_of_vehicle'] = trim($this->input->post('no_of_vehicle'));\n $ip['pickup_points'] = trim($this->input->post('pickup_points'));\n $ip['destination_points'] = trim($this->input->post('destination_points'));\n $ip['sechdule_date'] = trim($this->input->post('sechdule_date'));\n \n $ip['created_ip'] = $_SERVER['REMOTE_ADDR'];\n\t\t\t$ip['modified_ip'] = $_SERVER['REMOTE_ADDR'];\n\n\t\t\t$ipJson = json_encode($ip);\n $validation_array = 1;\n\t\t\t$ip_array[] = array(\"msg\", $ip['user_id'], \"not_null\", \"user_id\", \"user_id is empty.\");\n\t\t\t$ip_array[] = array(\"msg\",$ip['odr_by_fname'],\"not_null\",\"odr_by_fname\",\"First Name empty\");\n\t\t\t$ip_array[] = array(\"msg\",$ip['odr_by_lname'],\"not_null\",\"odr_by_lname\",\"Last Name empty\");\n\t\t\t$ip_array[] = array(\"msg\",$ip['odr_by_mob'],\"not_null\",\"odr_by_mob\",\"Mobile Number empty\");\n\t\t\t$ip_array[] = array(\"msg\", $ip['from_city'], \"not_null\", \"from_city\",\"From City is empty.\");\n\t\t\t$ip_array[] = array(\"msg\", $ip['to_city'], \"not_null\", \"to_city\", \"To city is empty.\");\n\t\t\t\n\t\t\tif($ip['vehicle_type'] == 1){\n\t\t\t\t$ip_array[] = array(\"msg\", $ip['other_vehicle_type'], \"not_null\", \"other_vehicle_type\", \"Other Vehicle type is empty.\");\n\t\t\t}else{\n\t\t\t\t$ip_array[] = array(\"msg\", $ip['vehicle_type'], \"not_null\", \"vehicle_type\", \"Vehicle type empty.\");\n\t\t\t}\n\n\t\t\t$ip_array[] = array(\"msg\", $ip['no_of_vehicle'], \"not_null\", \"no_of_vehicle\", \"No. of Vehicle is empty.\");\n\t\t\t// $ip_array[] = array(\"msg\", $ip['pickup_points'], \"not_null\", \"pickup_points\", \"Pickup Points is empty.\");\n\t\t\t// $ip_array[] = array(\"msg\", $ip['destination_points'], \"not_null\", \"destination_points\", \"Destination Points is empty.\");\n\t\t\tif($ip['material_type'] == 1){\n\t\t\t\t$ip_array[] = array(\"msg\", $ip['other_material_type'], \"not_null\", \"other_material_type\", \"Other Material type is empty.\");\n\t\t\t}else{\n\t\t\t\t$ip_array[] = array(\"msg\", $ip['material_type'], \"not_null\", \"material_type\", \"Material type is empty.\");\n\t\t\t}\n\t\t\t\n\t\t\t$ip_array[] = array(\"msg\", $ip['sechdule_date'], \"not_null\", \"sechdule_date\", \"Sechdule date is empty.\");\n\t\t\t$validation_array = $this->validator->validate($ip_array);\n\t\t\t\n\t\t\tif(empty($ip['no_of_quantity']) && empty($ip['weight'])){\n\t\t\t\t$data['message'] = \"Any one field must not be empty from Nag & Weight.\";\n\t\t\t\t$retVals1 = $this->seekahoo_lib->return_status('error', $serviceName, $data, $ipJson);\n\t\t\t}\n\t\t\telse if ($validation_array !=1) \n\t\t\t{\n $data['message'] = $validation_array['msg'];\n\t\t\t\t$retVals1 = $this->seekahoo_lib->return_status('error', $serviceName, $data, $ipJson);\n\t\t\t} \n\t\t\telse \n\t\t\t{\n\t\t\t\t$retVals1 =$this->Enquiry_form_model->enquiry_form($ip, $serviceName);\n\t\t\t\t$data['Enquiry_form'] = $retVals1;\t\n }\n header(\"content-type: application/json\");\n\t echo $retVals1;\n\t exit;\n\t }",
"public function gatewayPostFields() {\n $order = $this->getOrderInfo('none', (isset($_POST['ORDER_ID']) ? (int) $_POST['ORDER_ID'] : '0'));\n $gateway = array(\n 'trans-id' => (isset($_POST['AUTHCODE']) ? $_POST['AUTHCODE'] : ''),\n 'amount' => (isset($order->id) ? $order->grandTotal : '0-0'),\n 'refund-amount' => '',\n 'currency' => $this->settings->baseCurrency,\n 'code-id' => (isset($order->id) ? $order->buyCode . '-' . $order->id : '0-0'),\n 'pay-status' => (isset($order->id) ? 'OK' : ''),\n 'pending-reason' => '',\n 'inv-status' => '',\n 'fraud-status' => ''\n );\n return $gateway;\n }",
"private function getData() {\n\t\t$this->load->model( 'checkout/order' );\n\t\t$this->load->model( 'payment/directebanking' );\n\n\t\t$this->data['testMode']\t= $this->_param['testMode'];\n\t\t$this->data['continue']\t= $this->buildUrl( 'checkout/success' );\n\n\t\t// only for OC 1.4.x\n\t\tif( $this->request->get['route'] != 'checkout/guest_step_3' ) {\n\t\t\t$this->data['back'] = $this->buildUrl( 'checkout/payment' );\n\t\t}else{\n\t\t\t$this->data['back'] = $this->buildUrl( 'checkout/guest_step_2' );\n\t\t}\n\n\t\t// get order info\n\t\t$order_info\t\t= $this->model_checkout_order->getOrder( $this->session->data['order_id'] );\n\t\t// get product info\n\t\t$product_info\t= $this->model_payment_directebanking->getOrderProduct( $this->session->data['order_id'] );\n\t\t// get country iso2 code\n\t\t$iso2\t\t\t= $this->model_payment_directebanking->getCountryIso2( $this->config->get( 'config_country_id' ) );\n\t\t// remove any currency symbol(s)\n\t\t$amount\t\t\t= preg_replace( '/[^0-9.,]/', '', $order_info['total'] );\n\n\t\t// get form data\n\t\t$this->getFormData( $order_info, $product_info, $iso2, $amount );\n\t\t// get success / cancel URLs\n\t\t$this->getUrls();\n\n\t\tif(\n $this->_debug == 2\n && $this->_ocversion == '1.4'\n )\n {\n\t\t\techo '<hr />formData BEFORE hash:<br />';\n\t\t\tprint_r( $this->formData );\n\t\t\techo '<hr />';\n\t\t}\n\n\t\t// get the hash value\n\t\t$this->getProjectHash();\n\n\t\tif(\n $this->_debug == 2\n && $this->_ocversion == '1.4'\n )\n {\n\t\t\techo '<hr />formData AFTER hash:<br />';\n\t\t\tprint_r( $this->formData );\n\t\t\techo '<hr />';\n\t\t}\n\n\t\t// build the array for the form output new (we need only those values)\n\t\t$this->data['form'] = array(\n\t\t\t'user_id'\t\t\t\t=> $this->formData['user_id'],\n\t\t\t'project_id'\t\t\t=> $this->formData['project_id'],\n\t\t\t'amount'\t\t\t\t=> $this->formData['amount'],\n\n\t\t\t'reason_1'\t\t\t\t=> $this->formData['reason_1'],\n\t\t\t'reason_2'\t\t\t\t=> $this->formData['reason_2'],\n\t\t\t'user_variable_0'\t\t=> $this->formData['user_variable_0'],\n\t\t\t'user_variable_1'\t\t=> $this->formData['user_variable_1'],\n\t\t\t'user_variable_2'\t\t=> $this->formData['user_variable_2'],\n\t\t\t'user_variable_3'\t\t=> $this->formData['user_variable_3'],\n\t\t\t'user_variable_4'\t\t=> htmlspecialchars( $this->formData['user_variable_4'], ENT_QUOTES, 'UTF-8' ),\n\t\t\t'user_variable_5'\t\t=> $this->formData['user_variable_5'],\n\n\t\t\t'sender_holder'\t\t\t=> htmlspecialchars( $this->formData['sender_holder'], ENT_QUOTES, 'UTF-8' ),\n\t\t\t'sender_account_number'\t=> $this->formData['sender_account_number'],\n\t\t\t'sender_bank_code'\t\t=> $this->formData['sender_bank_code'],\n\t\t\t'sender_country_id'\t\t=> $this->formData['sender_country_id'],\n\n\t\t\t'language_id'\t\t\t=> $this->formData['language_id'],\n\t\t\t'currency_id'\t\t\t=> $this->formData['currency_id'],\n\t\t\t'hash'\t\t\t\t\t=> $this->formData['hash']\n\t\t);\n\n\t\t// get possible text to display\n\t\tif( $this->config->get( 'directebanking_title_as_text') ) {\n\t\t\tswitch( $this->config->get( 'directebanking_title_as_text') ) {\n\t\t\t\tcase '2':\n\t\t\t\t\t$this->data['instruction'] = $this->language->get( 'text_title_w_image' );\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\tcase '1':\n\t\t\t\t\t$this->data['instruction'] = $this->language->get( 'text_title' );\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}else{\n\t\t\t$this->data['instruction'] = html_entity_decode(\n\t\t\t\t$this->config->get( 'directebanking_instruction_' . $this->config->get( 'config_language_id' ) ),\n\t\t\t\tENT_QUOTES,\n\t\t\t\t'utf-8'\n\t\t\t);\n\t\t}\n\n\t\t$this->data['instruction'] .= ( $this->_param['testMode']\n\t\t\t\t? '<br />' . $this->language->get( 'text_testOrder' )\n\t\t\t\t: ''\n\t\t\t);\n\n\t\t// write log\n\t\t$comment\t= $this->_param['testMode']\n\t\t\t\t\t\t? $this->language->get( 'text_log_testorder' )\n\t\t\t\t\t\t: $this->language->get( 'text_log_order' );\n\t\t$msg\t\t= sprintf(\n\t\t\t\t\t\t$this->language->get( 'text_log_new_order' ),\n\t\t\t\t\t\t$this->formData['project_id'],\n\t\t\t\t\t\t$order_info['order_id'],\n\t\t\t\t\t\t$comment,\n\t\t\t\t\t\t$product_info['name'],\n\t\t\t\t\t\t$order_info['lastname'],\n\t\t\t\t\t\t$amount\n\t\t\t\t\t\t);\n\n\t\t$this->writeLog( $msg, 1 );\n\t}",
"function get_data_form(){\n\n $IdTrabajo= $_REQUEST['IdTrabajo']; //Variable para el id del trabajo\n $NombreTrabajo = $_REQUEST['NombreTrabajo']; //Variable para el nombre del trabajo\n $FechaIniTrabajo = $_REQUEST['FechaIniTrabajo']; //Variable para la fecha de inicio del trabajo\n $FechaFinTrabajo = $_REQUEST['FechaFinTrabajo']; //Variable para la fecha de finalizacion del trabajo\n $PorcentajeNota = $_REQUEST['PorcentajeNota']; //Variable para el porcentaje de la nota\n $action = $_REQUEST['action']; //Variable action para la accion a realizar\n\n //crea un trabajo\n $TRABAJO = new TRABAJO_Model(\n $IdTrabajo,\n $NombreTrabajo,\n $FechaIniTrabajo,\n $FechaFinTrabajo,\n $PorcentajeNota);\n\n return $TRABAJO;\n }",
"function get_payment_form($method, $user, $summary)\n{\n global $config, $db_prefix, $current_user_id, $module_config;\n\n // name\n $myname = explode(' ', $user['fullname'], 2);\n $ship_fn = $myname[0];\n $ship_ln = empty($myname[1]) ? '' : $myname[1];\n\n $myname = explode(' ', $user['fullname'], 2);\n $bill_fn = $myname[0];\n $bill_ln = empty($myname[1]) ? '' : $myname[1];\n\n // summary\n $summary['order_total'] = number_format($summary['order_total'], 2, '.', '');\n\n // load related module\n $payment_cmd = 'form';\n if (!file_exists('./module/'.$method.'/window.php')) {\n msg_die(sprintf($lang['msg']['internal_error'], 'Payment module '.$method.' not found.'));\n }\n require('./module/'.$method.'/window.php');\n return $form;\n}",
"public function actionSendForm()\n {\n $this->requirePostRequest();\n\n // If there's no form input field to determine the correct Formstack form\n if (!isset($_POST['form'])) {\n throw new Exception(403, 'An unknown error occurred.');\n }\n\n // If there is a form input field but it isn't all numbers\n if (!ctype_digit($_POST['form'])) {\n throw new Exception(403, 'An unknown error occurred.');\n }\n\n // Grab the token\n $token = Craft::parseEnv(Formstack::$plugin->getSettings()->oauthToken);\n\n // Set the data array.\n $postItems = [];\n\n // Loop through each field from the POST.\n foreach ($_POST as $key => $value) {\n /*\n * Check if it's a multipart field,\n * i.e. First Name and Last name as\n * separate fields but combines to Name on post.\n */\n if (strpos($key, '-') != 0) {\n // Grab the location of hyphen in the field name.\n $fieldName = substr($key, 0, strpos($key, '-'));\n\n /*\n * Transform the field name to have an underscore\n * between `field` and the field ID since\n * Formstack JSON submission requires that format.\n */\n $fieldName = 'field_'.substr($fieldName, 5);\n\n // Grab the name after the hypen.\n $fieldSubName = substr($key, strpos($key, '-') + 1);\n\n // Add data to the array transforming the hypen name.\n $postItems[$fieldName . '[' . $fieldSubName . ']'] = $value;\n } else {\n // Same as above but for regular fields.\n $fieldName = 'field_'.substr($key, 5);\n $postItems[$fieldName] = $value;\n }\n }\n\n // File Uploads\n foreach ($_FILES as $key => $value) {\n // Make sure there's a file.\n if (!empty($_FILES[$key]['tmp_name'])) {\n // Get the Field ID set by Formstack.\n $field = key((array)$_FILES);\n // See above for explanation.\n $field = 'field_'.substr($field, 5);\n // Get the path.\n $path = $_FILES[$key]['tmp_name'];\n // Get the name.\n $name = $_FILES[$key]['name'];\n // Get the file.\n $data = file_get_contents($path);\n // Base64 encode the data to send to Formstack.\n $data = $name . ';' . base64_encode($data);\n // Add the file to the main data array.\n $postItems[$field] = $data;\n }\n }\n\n // Get Form ID.\n $formId = $_POST['form'];\n\n // Build POST url.\n $postUrl = 'https://www.formstack.com/api/v2/form/' . $formId . '/submission.json';\n\n $curlConn = curl_init();\n $hedr = [];\n $hedr[] = 'Accept: multipart/form-data';\n $hedr[] = 'Content-Type: multipart/form-data';\n $hedr[] = 'Authorization: Bearer ' . $token;\n\n curl_setopt($curlConn, CURLOPT_HTTPHEADER, $hedr);\n curl_setopt($curlConn, CURLOPT_URL, $postUrl);\n curl_setopt($curlConn, CURLOPT_POST, count($_POST));\n curl_setopt($curlConn, CURLOPT_POSTFIELDS, Formstack::$plugin->formstackService->buildPostFields($postItems));\n\n $results = curl_exec($curlConn);\n curl_close($curlConn);\n\n return $this->asJson($results);\n }",
"function padma_post_form($data){\n if(!isset($data['padma_ignore_this_form'])){\n\n $data = apply_filters('padma_merge_options', $data);\n\n\n $response = wp_remote_post( \"https://crm.padm.am/api/v1/form_integration\", array(\n 'method' => 'POST',\n 'httpversion' => '1.0',\n 'blocking' => true,\n 'headers' => array(),\n 'body' => $data,\n 'cookies' => array(),\n 'sslverify' => false\n )\n );\n\n if ( is_wp_error( $response ) ) {\n return $response->get_error_message();\n } else {\n return true;\n }\n }\n}",
"public function process_payment_form($data, $host_obj, $order, $back_end = false)\n {\n /*\n * Validate input data\n */\n $validation = new Phpr_Validation();\n \n $validation->add('CardName', 'Card Holder Name')->fn('trim')->\n required('Please enter the name as it appears on the card');\n \n $validation->add('CardNumber', 'Credit Card Number')->fn('trim')->\n required('Please enter a credit card number')->regexp('/^[0-9]*$/','Credit card number can only contain digits');\n \n $validation->add('CV2', 'CV2')->fn('trim')->required('Please enter the card\\'s security code')->\n regexp('/^[0-9]*$/', 'Card security code must contain only digits');\n \n $validation->add('StartMonth', 'Start month')->fn('trim')->\n regexp('/^[0-9]*$/', 'Credit card start month can contain only digits.');\n \n $validation->add('StartYear', 'Start year')->fn('trim')->\n regexp('/^[0-9]*$/', 'Credit card start year can contain only digits.');\n \n $validation->add('ExpMonth', 'Expiration month')->fn('trim')->\n required('Please specify a card expiration month.')->\n regexp('/^[0-9]*$/', 'Credit card expiration month can contain only digits.');\n \n $validation->add('ExpYear', 'Expiration year')->fn('trim')->\n required('Please specify a card expiration year.')->\n regexp('/^[0-9]*$/', 'Credit card expiration year can contain only digits.');\n \n $validation->add('IssueNumber', 'Issue Number')->fn('trim')->\n regexp('/^[0-9]*$/', 'Issue number must contain only digits');\n \n \n try\n {\n /*\n * Prepare and send request to the payment gateway, and parse the server response\n */\n if (!$validation->validate($data)) {\n $validation->throwException();\n } else {\n require_once(PATH_APP.'/modules/tdcardsave/classes/ThePaymentGateway/PaymentSystem.php');\n /**\n * Get list of entry points\n */\n $gateway_entry_points = new RequestGatewayEntryPointList;\n $gateway_entry_points->add('https://gw1.cardsaveonlinepayments.com:4430', 100, 2);\n $gateway_entry_points->add('https://gw2.cardsaveonlinepayments.com:4430', 200, 2);\n $gateway_entry_points->add('https://gw3.cardsaveonlinepayments.com:4430', 300, 2);\n /**\n * Save login details\n */\n $merchant_credentials = new MerchantDetails($host_obj->merchant_id,$host_obj->password);\n \n /**\n * Define transaction type\n */\n $transaction_type = (string)$host_obj->transaction_type;\n $transaction_type = new NullableTRANSACTION_TYPE(TRANSACTION_TYPE::SALE);\n $message_details = new MessageDetails($transaction_type);\n \n /**\n * Options for response\n */\n $echo_card_type = new NullableBool(true);\n $echo_amount_received = new NullableBool(true);\n $echo_avs_check_result = new NullableBool(true);\n $echo_cv2_check_result = new NullableBool(true);\n \n /**\n * 3D Secure To be implemented\n */\n $three_d_secure_override_policy = new NullableBool(false);\n \n /**\n * Time Options\n */\n $duplicate_delay = new NullableInt(20);\n \n /**\n * Transaction Control\n */\n $transaction_control = new TransactionControl($echo_card_type, \n $echo_avs_check_result, $echo_cv2_check_result, $echo_amount_received,\n $duplicate_delay, '', '', $three_d_secure_override_policy, '', null, null\n );\n \n /**\n * Create transaction details\n */\n $amount = new NullableInt($order->total * 100);\n \n $currency = Shop_CurrencySettings::get();\n $currency_code = new NullableInt($currency->iso_4217_code);\n \n $device_category = new NullableInt(0); // 3D secure device category is computer\n $three_d_secure_browser_details = new ThreeDSecureBrowserDetails(\n $device_category, '*/*', $_SERVER['HTTP_USER_AGENT']\n );\n \n $transaction_details = new TransactionDetails($message_details,\n $amount, $currency_code, $order->id, 'Web Order', $transaction_control,\n $three_d_secure_browser_details\n );\n \n /**\n * Card Details\n */\n $card_expiry_month = new NullableInt($validation->fieldValues['ExpMonth']);\n $card_expiry_year = new NullableInt($validation->fieldValues['ExpYear']);\n $card_expiry_date = new CreditCardDate($card_expiry_month, $card_expiry_year);\n \n $card_start_month = new NullableInt($validation->fieldValues['StartMonth']);\n $card_start_year = new NullableInt($validation->fieldValues['StartYear']);\n $card_start_date = new CreditCardDate($card_start_month,$card_start_year);\n \n $card_details = new CardDetails(\n $validation->fieldValues['CardName'], $validation->fieldValues['CardNumber'],\n $card_expiry_date, $card_start_date, $validation->fieldValues['IssueNumber'],\n $validation->fieldValues['CV2']\n ); \n \n /**\n * Billing Address Information\n */\n $country_code = new NullableInt($order->billing_country->code_iso_numeric);\n\n // Added a check in here to see if the state is set as LemonStand doesn't have states for all countries\n if ( isset($order->billing_state->code) ) {\n $billing_state_code = $order->billing_state->code;\n } else {\n $billing_state_code = '';\n }\n\n $billing_address = new AddressDetails($order->billing_street_addr,\n '', $order->billing_company, '', $order->billing_city,\n $billing_state_code, $order->billing_zip, $country_code\n );\n \n /**\n * Customer Details\n */\n $customer_details = new CustomerDetails($billing_address, $order->billing_email,\n $order->billing_phone, Phpr::$request->getUserIp()\n );\n \n /**\n * The transaction\n */\n $card_details_transaction = new CardDetailsTransaction(\n $gateway_entry_points, 1, null, $merchant_credentials,\n $transaction_details, $card_details, $customer_details, ''\n );\n \n /**\n * Process the transaction \n */\n $transaction_processed = $card_details_transaction->processTransaction(\n $gateway_output, $transaction_output_message\n ); \n \n if ($transaction_processed == false) {\n throw new Exception('Unable to communicate with payment gateway');\n } else {\n $response_message = $gateway_output->getMessage();\n $response_code = $gateway_output->getStatusCode();\n \n switch ($response_code)\n {\n case 0: // Success\n /* Log successfuly payment */\n \n $response_data = array(\n 'Auth Code' => $transaction_output_message->getAuthCode(),\n 'Address Numeric Check Result' => $transaction_output_message->getAddressNumericCheckResult()->getValue(),\n 'Postcode Check Result' => $transaction_output_message->getPostCodeCheckResult()->getValue(),\n 'CV2 Result' => $transaction_output_message->getCV2CheckResult()->getValue(),\n 'Card Issuer' => $transaction_output_message->getCardTypeData()->getIssuer()->getValue(),\n 'Card Type' => $transaction_output_message->getCardTypeData()->getCardType(),\n );\n \n $this->log_payment_attempt(\n $order,\n 'Successful payment',\n 1, \n $this->prepare_fields_log($data),\n $response_data,\n $response_message,\n $response_data['CV2 Result'],\n '',\n $response_data['Address Numeric Check Result']\n ); \n \n /* Update order status */\n Shop_OrderStatusLog::create_record($host_obj->order_status,\n $order\n ); \n \n /* Mark as processed */\n $order->set_payment_processed(); \n break;\n case 3: // 3D Secure required and not implemented\n throw new Exception('Credit Card requires 3D secure but it has not been implemented');\n break;\n case 4: // Referred \n throw new Exception('Transaction referred');\n break;\n case 5: // Declined\n throw new Exception(\"Credit card payment declined: $response_message\");\n break;\n case 20: // Duplicate transaction (prevents double payments)\n throw new Exception(\"Duplicate transaction: $response_message\");\n break;\n case 30: // Error occured\n $message = $response_message;\n if ($gateway_output->getErrorMessages()->getCount() > 0) {\n for ($i=0; $i<$gateway_output->getErrorMessages()->getCount(); $i++) {\n $message .= \"$message \".$gateway_output->getErrorMessages()->getAt($i).\"n\";\n }\n }\n throw new Exception(\"Error: $message\");\n break;\n default: // Unknown error code so we just create a generic message\n throw new Exception(\"Unknown Error Response Code: $response_code\"); \n break; \n }\n } \n }\n }\n catch (Exception $ex)\n {\n /*\n * Log invalid payment attempt\n */\n if ( !isset($data) )\n $data = array();\n \n $this->log_payment_attempt($order, $ex->getMessage(), 0, $this->prepare_fields_log($data), array(), null);\n \n if (!$back_end)\n throw new Phpr_ApplicationException('Payment Declined');\n else\n throw new Phpr_ApplicationException('Error: '.$ex->getMessage().' on line: '.$ex->getLine());\n }\n }",
"public function get_data()\n {\n return $this->form_data;\n }",
"abstract public function get_gateway_form_fields();",
"public function buildAcsFormData()\n {\n $fields = null;\n $checkoutSession = $this->getHelper()->getCheckoutSession();\n if (!empty($checkoutSession)) {\n $order = $checkoutSession->getLastRealOrder();\n if (!empty($order)) {\n $orderId = $order->getRealOrderId();\n if ($orderId === $checkoutSession->getPaymentsenseOrderId()) {\n $termUrl = $this->getHelper()->getAcsCallbackUrl();\n $fields = array(\n 'url' => $checkoutSession->getPaymentsenseAcsUrl(),\n 'elements' => array(\n 'PaReq' => $checkoutSession->getPaymentsensePaReq(),\n 'MD' => $checkoutSession->getPaymentsenseMD(),\n 'TermUrl' => $termUrl\n )\n );\n $this->getLogger()->info('Preparing ACS redirect for order #' . $orderId);\n }\n }\n }\n\n return $fields;\n }",
"public static function getForm();",
"public function getPostFields() \n {\n if (empty($this->payment_values)) {\n throw new Exception('You need to set payment values before ');\n }\n \n return false;\n }",
"function commerce_oz_eway_3p_redirect_form_submit($order, $payment_method) {\n \n// // dsm($payment_method, 'method');\n// \t// dsm($pane_form, 'pane');\n// \t// dsm($pane_values, 'values');\n// // dsm($order, 'order');\n// // dsm($charge, 'charge');\n \n // dsm($_POST, 'post'); \n // dsm($order, '$order'); \n // dsm($payment_method, '$payment_method'); \n \n if($_POST){\n// return;\n \n }\n \t \t \t\n // Get the order\n $order_wrapper = entity_metadata_wrapper('commerce_order', $order);\n $order_id = $order->order_id;\n \n /*\n \n $credit_card = $pane_values['commerce_oz_3p_head']['credit_card'];\n // // dsm($pane_values);\n \n // Get the settings and set some vars for same\n // $settings = $payment_method['settings'];\n $debugmode = 'debug'; //$settings['commerce_commweb_vpc_settings']['commerce_commweb_vpc_debug'];\n $livemode = 'test'; //$settings['commerce_commweb_vpc_settings']['commerce_commweb_vpc_mode'];\n \n\t// Transaction record\n\t// Prepare a transaction object to log the API response.\n $transaction = _commerce_oz_open_transaction($payment_method['base'], $order->order_id);\n \n module_load_include('php', 'commerce_oz', 'includes/api/EwayPayment');\n\n\t$eway = new EwayPayment( '87654321', 'https://www.eway.com.au/gateway_cvn/xmltest/testpage.asp' );\n\t\n\t// Card Details\n\t\n\t$eway->setCardNumber( $credit_card['number'] );\n\t$eway->setCardExpiryMonth( $credit_card['exp_month'] );\n\t$eway->setCardExpiryYear( substr($credit_card['exp_year'], -2) );\n//\t$eway->setTotalAmount( $charge['amount'] );\n\t$eway->setTotalAmount\t(1000);\n\n\t$eway->setCVN( $credit_card['code'] );\n\t\n\t// Invoice & Transaction Details\n\t\n\t$eway->setCustomerInvoiceDescription( 'Testing' );\n\t$eway->setCustomerInvoiceRef( $order_id );\n\t$eway->setTrxnNumber( $transaction->transaction_id );\n\n \n $request_map = array_filter((array)$eway);\n \n $error = $eway->doPayment();\n \n $response_map = array_filter((array)$eway);\n */\n \n// // dsm($request_map);\n// // dsm($response_map);\n \n // _commerce_oz_eway_3p_close_transaction($transaction, $request_map, $response_map);\n\t\n//\t_commerce_oz_debug_transaction($transaction, $request_map, $response_map, TRUE);\n\t\n\t// Fire completion Rule\n\t//rules_invoke_event('commerce_oz_transaction_complete', $transaction);\n\t\n\t// return _commerce_oz_handle_payment_response($transaction, $request_map, $response_map);\n \n}",
"public function getForm()\n {\n RETURN $this->strategy->getForm();\n }",
"public function enquiryStep2($formData) {\n\n $logMsg = \"Telling server the period we're looking for, requesting more cookies...<br>\";\n echo $logMsg;\n\n $url = \"https://ebiz.campbelltown.nsw.gov.au/ePathway/Production/Web/GeneralEnquiry/EnquirySearch.aspx\";\n\n $formData['ctl00$MainBodyContent$mGeneralEnquirySearchControl$mEnquiryListsDropDownList'] = 23;\n $formData['ctl00$MainBodyContent$mGeneralEnquirySearchControl$mSearchButton'] = \"Search\";\n $formData['ctl00$MainBodyContent$mGeneralEnquirySearchControl$mTabControl$ctl04$mStreetNameTextBox'] = null;\n $formData['ctl00$MainBodyContent$mGeneralEnquirySearchControl$mTabControl$ctl04$mStreetNumberTextBox'] = null;\n $formData['ctl00$MainBodyContent$mGeneralEnquirySearchControl$mTabControl$ctl04$mStreetTypeDropDown'] = null;\n $formData['ctl00$MainBodyContent$mGeneralEnquirySearchControl$mTabControl$ctl04$mSuburbTextBox'] = null;\n $formData['hiddenInputToUpdateATBuffer_CommonToolkitScripts'] = 1;\n $formData['ctl00$mHeight'] = 653;\n $formData['ctl00$mWidth'] = 786;\n\n $formData = http_build_query($formData);\n\n $requestHeaders = [\n \"Host: ebiz.campbelltown.nsw.gov.au\",\n \"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\",\n \"Accept-Language: en-GB,en;q=0.5\",\n \"Accept-Encoding: none\",\n \"Referer: https://ebiz.campbelltown.nsw.gov.au/ePathway/Production/Web/GeneralEnquiry/EnquiryLists.aspx?ModuleCode=LAP\",\n \"Content-Type: application/x-www-form-urlencoded\"\n ];\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);\n curl_setopt($ch, CURLOPT_HTTPHEADER, $requestHeaders);\n curl_setopt($ch, CURLOPT_POST, true);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $formData);\n curl_setopt($ch, CURLOPT_HEADER, false);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($ch, CURLOPT_TIMEOUT, 30);\n curl_setopt($ch, CURLOPT_COOKIEFILE, __DIR__ . '/../cookies/cookies.txt');\n curl_setopt($ch, CURLOPT_COOKIEJAR, __DIR__ . '/../cookies/cookies.txt');\n curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0');\n\n $output = curl_exec($ch);\n $errno = curl_errno($ch);\n $errmsg = curl_error($ch);\n curl_close($ch);\n\n if ($errno !== 0) {\n\n $logMsg = \"cURL error in enquiryStep2 function: \" . $errmsg . \" (\" . $errno . \")\";\n $this->logger->info($logMsg);\n return false;\n }\n\n return $output;\n\n }",
"public function process_payment() {\n\n\n global $admin_settings;\n\n check_ajax_referer( 'kp-korapay-pay-nonce', 'kp_sec_code' );\n\n $tx_ref = $_POST['reference'];\n $status = $_POST['status'];\n $secret_key = $admin_settings->get_option_value( 'secret_key' );\n $amount=$_POST['amount'];\n $args = array(\n 'post_type' => 'payment_list',\n 'post_status' => 'publish',\n 'post_title' => $tx_ref,\n );\n\n $payment_record_id = wp_insert_post( $args, true );\n\n if ( ! is_wp_error( $payment_record_id )) {\n\n $post_meta = array(\n '_kp_korapay_payment_amount' => 'NGN'.' '.$_POST['amount'],\n '_kp_korapay_payment_fullname' => $_POST['first_name'].' '.$_POST['last_name'],\n '_kp_korapay_payment_customer' => $_POST['email'],\n '_kp_korapay_payment_status' => $status,\n '_kp_korapay_payment_tx_ref' => $tx_ref,\n );\n\n $this->_add_post_meta( $payment_record_id, $post_meta );\n\n }\n $redirect_url_key = $status === 'success' ? 'success_redirect_url' : 'failed_redirect_url';\n\n echo json_encode( array( 'status' => $status, 'redirect_url' => $admin_settings->get_option_value( $redirect_url_key ) ) );\n\n die();\n\n }",
"function getForm($reservation){\n global $DOPBSP;\n \n $info = array();\n \n $form = json_decode($reservation->form);\n \n for ($i=0; $i<count($form); $i++){\n if (!is_array($form[$i])){\n $form_item = get_object_vars($form[$i]);\n }\n else{\n $form_item = $form[$i];\n }\n \n if (is_array($form_item['value'])){\n $values = array();\n\n foreach ($form_item['value'] as $value){\n array_push($values, $value->translation);\n }\n array_push($info, $this->getSyncInfo($form_item['translation'],\n implode('', $values)));\n }\n else{\n if ($form_item['value'] == 'true'){\n $value = $DOPBSP->text('FORMS_FORM_FIELD_TYPE_CHECKBOX_CHECKED_LABEL');\n }\n elseif ($form_item['value'] == 'false'){\n $value = $DOPBSP->text('FORMS_FORM_FIELD_TYPE_CHECKBOX_UNCHECKED_LABEL');\n }\n else{\n $value = $form_item['value'];\n }\n array_push($info, $this->getSyncInfo('',\n $value != '' ? $value:$DOPBSP->text('RESERVATIONS_RESERVATION_NO_FORM_FIELD'),\n $value != '' ? '':'no-data'));\n }\n }\n \n return implode(', ', $info);\n }",
"protected function get_request(){\n\t\treturn \"value_cashflows\";\n\t}",
"private function getFormisimoData()\n\t{\n\t\t//Get the data submitted by the tracking widget script\n\t\t$submitted = $this->getSubmittedData();\n\n\t\t/*\n\t\t * We flip the required array so we can compare\n\t\t * keys with the submitted data keys.\n\t\t */\n\t\t$required = array_flip($this->required);\n\n\t\t/*\n\t\t * Check whether the submitted data contains all of the required data.\n\t\t * The $diff will let us know data is missing.\n\t\t */\n\t\t$diff = array_diff_key($required, $submitted);\n\n\t\t/*\n\t\t * If difference is not empty then we are missing some of the\n\t\t * required data so stop execution and log the submitted data so we can debug.\n\t\t */\n\t\tif ( ! empty($diff))\n\t\t{\n\t\t\tthrow new Exception('Required Data Missing. Data: ' . json_encode($submitted));\n\t\t}\n\n\t\t/*\n\t\t * Just to be safe we will remove any extra data included\n\t\t * in the submitted data that is not required. This is an extra\n\t\t * security measure to ensure we are not accidently passing any rogue\n\t\t * data through to Formisimo\n\t\t */\n\t\t$data = array_intersect_key($submitted, $required);\n\n\t\t/*\n\t\t * Add the conversion key to the data\n\t\t * as Formisimo do in their conversion script\n\t\t */\n\t\t$data['conversion'] = true;\n\t\treturn $data;\n\t}",
"public function getPredraft_post()\n {\n $this->form_validation->set_rules('Privacy', 'Privacy', 'trim|in_list[Yes,No,All]');\n $this->form_validation->set_rules('Status', 'Status', 'trim|callback_validateStatus');\n $this->form_validation->set_rules('Filter', 'Filter', 'trim|in_list[Normal]');\n $this->form_validation->set_rules('Sequence', 'Sequence', 'trim|in_list[ASC,DESC]');\n $this->form_validation->validation($this); /* Run validation */\n\n /* Get Pre Draft Contest Data */\n $PreDraftData = $this->PredraftContest_model->getPredraftContest(@$this->Post['Params'], array_merge($this->Post, array('ContestID' => @$this->ContestID, 'MatchID' => @$this->MatchID, 'ContestType' => @$this->Post['ContestType'], 'SeriesID' => @$this->SeriesID, 'UserID' => @$this->UserID, 'SessionUserID' => $this->SessionUserID, 'StatusID' => @$this->StatusID)), TRUE, @$this->Post['PageNo'], @$this->Post['PageSize']);\n if (!empty($PreDraftData)) {\n $this->Return['Data'] = $PreDraftData['Data'];\n }\n }",
"function acf_get_form_data($name = '')\n{\n}",
"function payment() {\n\t\t$url = 'https://www.instawallet.org/api/v1/w/' . $wallet_id . '/payment';\n\t\t$json = file_get_contents($url);\n\t\treturn json_decode($json);\n\t}",
"public function paymentForm() {\n return new GooglePayForm();\n }",
"public function payment_fields()\r\n {\r\n \r\n // ok, let's display some description before the payment form\r\n if ($this->description) {\r\n // display the description with <p> tags etc.\r\n echo wpautop(wp_kses_post($this->description));\r\n }\r\n \r\n // I will echo() the form, but you can close PHP tags and print it directly in HTML\r\n echo '<fieldset id=\"wc-' . esc_attr($this->id) . '-cc-form\" class=\"wc-credit-card-form wc-payment-form\" style=\"background:transparent;\">';\r\n \r\n // Add this action hook if you want your custom gateway to support it\r\n do_action('woocommerce_momo_form_start', $this->id);\r\n \r\n // I recommend to use inique IDs, because other gateways could already use #ccNo, #expdate, #cvc\r\n echo '<div class=\"form-row form-row-wide\"><label>Mobile Wallet Provider <span class=\"required\">*</span></label>\r\n\t\t\t\t<select id=\"epaygh_mobile_wallet_network\" name=\"epaygh_mobile_wallet_network\">\r\n\t\t\t\t\t<option name=\"epaygh_mobile_wallet_network\" value=\"mtn\" selected>MTN</option>\r\n\t\t\t\t\t<option name=\"epaygh_mobile_wallet_network\" value=\"airtel\">Airtel</option>\r\n\t\t\t\t\t<option name=\"epaygh_mobile_wallet_network\" value=\"tigo\">Tigo</option>\r\n\t\t\t\t\t<option name=\"epaygh_mobile_wallet_network\" value=\"vodafone\">Vodafone</option>\r\n\t\t\t\t</select>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"form-row form-row-wide\"><label>Mobile Wallet Number <span class=\"required\">*</span></label>\r\n\t\t\t\t<input id=\"epaygh_mobile_wallet_number\" name=\"epaygh_mobile_wallet_number\" type=\"tel\">\r\n\t\t\t\t</div>\r\n\r\n\t\t\t\t<div class=\"form-row form-row-wide\"><label>Voucher </label>\r\n\t\t\t\t\t<input id=\"epaygh_payment_voucher\" name=\"epaygh_payment_voucher\" type=\"text\" autocomplete=\"off\"><br>\r\n\t\t\t\t\t<span class=\"required\">Leave empty if mobile network is not Vodafone</span>\r\n\t\t\t\t</div>\r\n\r\n\t\t\t\t<div class=\"clear\"></div>';\r\n \r\n do_action('woocommerce_momo_form_end', $this->id);\r\n \r\n echo '<div class=\"clear\"></div></fieldset>';\r\n }",
"function redirect_form()\n{\n global $pxpay;\n \n $request = new PxPayRequest();\n \n $http_host = getenv(\"HTTP_HOST\");\n $request_uri = getenv(\"SCRIPT_NAME\");\n $server_url = \"http://$http_host\";\n #$script_url = \"$server_url/$request_uri\"; //using this code before PHP version 4.3.4\n #$script_url = \"$server_url$request_uri\"; //Using this code after PHP version 4.3.4\n $script_url = (version_compare(PHP_VERSION, \"4.3.4\", \">=\")) ?\"$server_url$request_uri\" : \"$server_url/$request_uri\";\n $EnableAddBillCard = 1;\n \n # the following variables are read from the form\n $Quantity = $_REQUEST[\"Quantity\"];\n $MerchantReference = sprintf('%04x%04x-%04x-%04x',mt_rand(0, 0xffff),mt_rand(0, 0xffff),mt_rand(0, 0xffff),mt_rand(0, 0x0fff) | 0x4000);\n $Address1 = $_REQUEST[\"Address1\"];\n $Address2 = $_REQUEST[\"Address2\"];\n $Address3 = $_REQUEST[\"Address3\"];\n \n #Calculate AmountInput\n $AmountInput = 21.50;\n \n #Generate a unique identifier for the transaction\n $TxnId = uniqid(\"ID\");\n \n #Set PxPay properties\n $request->setMerchantReference($MerchantReference);\n $request->setAmountInput($AmountInput);\n $request->setTxnData1($Address1);\n $request->setTxnData2($Address2);\n $request->setTxnData3($Address3);\n $request->setTxnType(\"Purchase\");\n $request->setCurrencyInput(\"NZD\");\n $request->setEmailAddress(\"[email protected]\");\n $request->setUrlFail($script_url);\t\t\t# can be a dedicated failure page\n $request->setUrlSuccess($script_url);\t\t\t# can be a dedicated success page\n $request->setTxnId($TxnId);\n $request->setRecurringMode(\"recurringinitial\");\n #The following properties are not used in this case\n $request->setEnableAddBillCard($EnableAddBillCard);\n # $request->setBillingId($BillingId);\n # $request->setOpt($Opt);\n\n \n #Call makeRequest function to obtain input XML\n $request_string = $pxpay->makeRequest($request);\n #Obtain output XML\n $response = new MifMessage($request_string);\n \n #Parse output XML\n $url = $response->get_element_text(\"URI\");\n $valid = $response->get_attribute(\"valid\");\n \n #Redirect to payment page\n header(\"Location: \".$url);\n}",
"function submit_paypal_post() {\n // a form with hidden elements which is submitted to paypal via the \n // BODY element's onLoad attribute. We do this so that you can validate\n // any POST vars from you custom form before submitting to paypal. So \n // basically, you'll have your own form which is submitted to your script\n // to validate the data, which in turn calls this function to create\n // another hidden form and submit to paypal.\n \n // The user will briefly see a message on the screen that reads:\n // \"Please wait, your order is being processed...\" and then immediately\n // is redirected to paypal.\n\n echo \"<html>\\n\";\n echo \"<head><title>Inoltro Pagamento...</title></head>\\n\";\n echo \"<body onLoad=\\\"document.forms['paypal_form'].submit();\\\">\\n\";\n echo \"<center><h2>Attendere, l'ordine è in fase di inoltro a paypal\";\n echo \" e sarete reindirizzati a breve.</h2></center>\\n\";\n echo \"<form method=\\\"post\\\" name=\\\"paypal_form\\\" \";\n echo \"action=\\\"\".$this->paypal_url.\"\\\">\\n\";\n\n foreach ($this->fields as $name => $value) {\n echo \"<input type=\\\"hidden\\\" name=\\\"$name\\\" value=\\\"$value\\\"/>\\n\";\n }\n echo \"<center><br/><br/>Se non venite reindirizzati al sito \";\n echo \"paypal entro 5 secondi...<br/><br/>\\n\";\n echo \"<input type=\\\"submit\\\" value=\\\"Cliccare qui\\\"></center>\\n\";\n \n echo \"</form>\\n\";\n echo \"</body></html>\\n\";\n\t exit;\n\n }",
"public function getPaymentMethod()\n {\n \n //Fill POST fields array\n $ipPostFields = [\n 'InvoiceAmount' => session()->get('total_price'),\n 'CurrencyIso' => 'KWD'\n ];\n \n //Call endpoint\n $paymentMethods = $this->initiatePayment($this->apiURL, $this->apiKey, $ipPostFields);\n \n \n return view('site.payment.checkout', compact('paymentMethods')); // redirect to the pay method in the service classe with the paymentmedthod id\n \n \n }",
"public function process_payment(){\n if($this->input->server('REQUEST_METHOD') == 'POST') {\n \n // Get all field values.\n $form_fields = $this->input->post(NULL);\n \n //Set Requiered parameter to be pass to merchant payment process\n $parameter = array(\n 'schedule_id' => $form_fields['schedule_id'],\n 'exception_id' => $form_fields['exception_id'],\n 'school_id' => $form_fields['school_id'],\n 'percentage' => $form_fields['percentage'],\n 'schedule_type' => $form_fields['schedule_type'],\n 'session_name' => $form_fields['session_name'],\n 'session_id' => $form_fields['session_id'],\n 'penalty' => $form_fields['penalty'],\n 'user_id' => $form_fields['user_id'],\n 'amount' => $form_fields['amount'],\n 'revenue_head' => $form_fields['revhead']\n );\n \n //initiate pay process : Send the parameter to pay merchant\n $this->pay->process($parameter);\n \n \n }else{\n \n //Set error message for any request other than POST\n $error_msg = $this->lang->line('invalid_req_method'); \n $this->main->set_notification_message(MSG_TYPE_ERROR, $error_msg);\n \n // Redirect to payment set, showing notifiction messages if there are.\n redirect(site_url('payment/myschedule'));\n } \n \n }",
"protected function form() {\n\t\t$form = new Form(new Payment);\n\n\t\t$form->text('user.nickname', __('用户'))->disable();\n\t\t// $form->number('app_id', __('App id'));\n\t\t$form->decimal('price', __('金额'));\n\t\t$form->text('transaction_id', __('三方订单号'));\n\t\t$form->text('out_trade_no', __('平台订单号'))->disable();\n\t\t$form->radio('type', __('订单类型'))->options(['20' => '商城订单']);\n\t\t$form->radio('status', __('状态'))->options(['0' => '未支付', '1' => '已支付'])->default('0');\n\t\t// $form->text('other', __('Other'));\n\t\t$form->datetime('payment_at', __('支付时间'))->default(date('Y-m-d H:i:s'));\n\t\treturn $form;\n\t}",
"public function retrieveForms()\n {\n return $this->start()->uri(\"/api/form\")\n ->get()\n ->go();\n }",
"public function getCheckoutForm(){\r\n\r\n $form='\r\n <form id=\"paypal_checkout\" action=\"https://www.sandbox.paypal.com/cgi-bin/webscr\" method=\"post\">';\r\n\r\n //==> Variables defining a cart, there shouldn't be a need to change those <==//\r\n $form.='\r\n <input type=\"hidden\" name=\"cmd\" value=\"_cart\" />\r\n <input type=\"hidden\" name=\"upload\" value=\"1\" />\t\t\t\r\n <input type=\"hidden\" name=\"no_note\" value=\"0\" />\t\t\t\t\t\t\r\n <input type=\"hidden\" name=\"bn\" value=\"PP-BuyNowBF\" />\t\t\t\t\t\r\n <input type=\"hidden\" name=\"tax\" value=\"0\" />\t\t\t\r\n <input type=\"hidden\" name=\"rm\" value=\"2\" />';\r\n \r\n //==> Personnalised variables, they get their values from the specified settings nd the class attributes <==//\r\n $form.='\r\n <input type=\"hidden\" name=\"business\" value=\"'.$this->business.'\" />\r\n <input type=\"hidden\" name=\"handling_cart\" value=\"'.$this->shipping.'\" />\r\n <input type=\"hidden\" name=\"currency_code\" value=\"'.$this->currency.'\" />\r\n <input type=\"hidden\" name=\"lc\" value=\"'.$this->location.'\" />\r\n <input type=\"hidden\" name=\"return\" value=\"'.$this->returnurl.'\" />\t\t\t\r\n <input type=\"hidden\" name=\"cbt\" value=\"'.$this->returntxt.'\" />\r\n <input type=\"hidden\" name=\"cancel_return\" value=\"'.$this->cancelurl.'\" />\t\t\t\r\n <input type=\"hidden\" name=\"custom\" value=\"'.$this->custom.'\" />';\r\n\r\n //==> The items of the cart <==//\r\n $cpt=1;\r\n if(!empty($this->items)){foreach($this->items as $item){\r\n $form.='\r\n <div id=\"item_'.$cpt.'\" class=\"itemwrap\">\r\n <input type=\"hidden\" name=\"item_name_'.$cpt.'\" value=\"'.$item['name'].'\" />\r\n <input type=\"hidden\" name=\"quantity_'.$cpt.'\" value=\"'.$item['quantity'].'\" />\r\n <input type=\"hidden\" name=\"amount_'.$cpt.'\" value=\"'.$item['price'].'\" />\r\n <input type=\"hidden\" name=\"shipping_'.$cpt.'\" value=\"'.$item['shipping'].'\" />\r\n </div>';\r\n $cpt++;\r\n }}\r\n\r\n //==> The submit button, (you can specify here your own button) <==//\r\n $form.='\r\n <input id=\"ppcheckoutbtn\" type=\"submit\" value=\"Checkout\" class=\"button\" />\r\n </form>';\r\n\r\n return $form;\r\n }",
"abstract protected function getForm();",
"public function get_page_post()\n\t\t{\n\t\t\t$returnArr['status'] = $this->lang->line('SUCCESS');\n\t\t\t$returnArr['message'] = $this->lang->line('VALID_TOKEN_MESSAGE');\n\t\t\t$returnArr['page_url'] = base_url().'content/'.$this->config->item('contactUsSlug').'/1';\n\t\t\t$this->response($returnArr , 200);\n\t\t}",
"function get_params( $order) {\n\t\tglobal $woocommerce, $wc_authorize_sim;\n\t\t\n\t\t$this->add_log( 'Generating payment form for order #' . $order->id);\n\t\t\n\t\t$params = array();\n\t\t\n\t\t$params = array (\n\t\t\t'x_login'\t\t\t=> $this->login_id,\n\t\t\t'x_show_form'\t\t=> 'PAYMENT_FORM',\t\t\t\n\t\t\t'x_type' \t\t\t=> $this->type,\n\t\t\t'x_test_request' \t=> ($this->testmode == 'yes') ? 'TRUE' : 'FALSE',\t\t\t\n\t\t\t'x_relay_response'\t=> 'TRUE',\n 'x_relay_url' \t=> add_query_arg('_hdl_anet_sim', 'relay', $this->notify_url),\n \n\t\t\t//billing\n\t\t\t'x_first_name' \t\t=> $order->billing_first_name,\n\t\t\t'x_last_name' \t\t=> $order->billing_last_name,\n\t\t\t'x_address' \t\t=> $order->billing_address_1,\n\t\t\t'x_city' \t\t\t=> $order->billing_city,\n\t\t\t'x_state' \t\t\t=> $order->billing_state,\n\t\t\t'x_zip' \t\t\t=> $order->billing_postcode,\n\t\t\t'x_country' \t\t=> $order->billing_country,\n\t\t\t'x_phone' \t\t\t=> $order->billing_phone,\n\t\t\t'x_email'\t\t\t=> $order->billing_email,\n\t\t\t\n\t\t\t//shipping\n\t\t\t'x_ship_to_first_name' \t\t=> $order->shipping_first_name,\n\t\t\t'x_ship_to_last_name' \t\t=> $order->shipping_last_name,\n\t\t\t'x_ship_to_address' \t\t=> $order->shipping_address_1,\n\t\t\t'x_ship_to_city' \t\t\t=> $order->shipping_city,\n\t\t\t'x_ship_to_state' \t\t\t=> $order->shipping_state,\n\t\t\t'x_ship_to_zip' \t\t\t=> $order->shipping_postcode,\n\t\t\t'x_ship_to_country' \t\t=> $order->shipping_country,\n\t\t\t'x_ship_to_company' \t\t=> $order->shipping_company,\n\t\t\t\t\n\t\t\t'x_cust_id' \t\t=> $order->user_id,\n\t\t\t'x_customer_ip' \t=> $this->get_user_ip(),\n\t\t\t'x_invoice_num' \t=> $order->id,\n\t\t\t'x_fp_sequence'\t\t=> $order->order_key,\n\t\t\t'x_amount' \t\t\t=> $order->get_total(),\n\t\t\t\n\t\t\t'x_cancel_url'\t\t=> $order->get_cancel_order_url(),\n\t\t\t'x_cancel_url_text'\t=> __( 'Cancel', WC_Authorize_SIM::TEXT_DOMAIN ),\n\t\t);\n\t\t\n\t\t// Address 2\n\t\tif( ! empty( $order->billing_address_2 ) ) {\n\t\t\t$params['x_address'] .= ' - ' . $order->billing_address_2;\n\t\t}\n\t\tif( ! empty( $order->shipping_address_2 ) ) {\n\t\t\t$params['x_ship_to_address'] .= ' - ' . $order->shipping_address_2;\n\t\t}\n\t\t\n\t\t// Add item line\n\t\t$this->add_item_fields( $order );\n\t\t\n\t\t// Tax\n\t\tif( $order->get_total_tax() > 0 ) {\n\t\t\t// Id\n\t\t\t$item_id = 'TAX01' ;\n\t\t\t\n\t\t\t// name\n\t\t\t$item_name \t= __( 'Cart Tax', WC_Authorize_SIM::TEXT_DOMAIN );\n\t\t\t\n\t\t\t// description\n\t\t\t$item_desc \t= '';\n\t\t\t\n\t\t\t// Quantity\n\t\t\t$item_qty \t= 1;\n\t\t\t\n\t\t\t// Amount\n\t\t\t$item_amount = $order->get_total_tax();\n\t\t\t\n\t\t\t// Log point\n\t\t\t$this->add_log( $item_id . \", $item_name, $item_desc, $item_qty, $item_amount\" );\n\t\t\t\n\t\t\t// Add line item\n\t\t\t$this->add_item_field( $item_id, $item_name, $item_desc, $item_qty, $item_amount, 'N');\n\t\t}\n\n\t\t// Fees\n\t\tif ( sizeof( $order->get_fees() ) > 0 ) {\n\t\t\t$idx = 0;\n\t\t\tforeach ( $order->get_fees() as $item ) {\n\t\t\t\t$idx ++;\n\t\t\t\t\n\t\t\t\t// Id\n\t\t\t\t$item_id = sprintf( 'FEE%02d', $idx );\n\t\t\t\n\t\t\t\t// name\n\t\t\t\t$item_name \t= $this->get_item_name( $item['name'] );\n\t\t\t\t\n\t\t\t\t// description\n\t\t\t\t$item_desc \t= $item_name;\n\t\t\t\t\n\t\t\t\t// Quantity\n\t\t\t\t$item_qty \t= 1;\n\t\t\t\t\n\t\t\t\t// Amount\n\t\t\t\t$item_amount = $item['line_total'];\n\t\t\t\t\n\t\t\t\t// Log point\n\t\t\t\t$this->add_log( $item_id . \", $item_name, $item_desc, $item_qty, $item_amount\" );\n\t\t\t\t\n\t\t\t\t$this->add_item_field( $item_id, $item_name, $item_desc, $item_qty, $item_amount, 'N');\n\t\t\t}\n\t\t}\n\n\t\t// Shipping Cost item\n\t\tif ( $order->get_total_shipping() > 0 ) {\n\t\t\t// Id\n\t\t\t$item_id = 'SHP01';\n\t\t\t\t\n\t\t\t// name\n\t\t\t$item_name \t= $this->get_item_name( $order->get_shipping_method() );\n\t\t\t\n\t\t\t// description\n\t\t\t$item_desc \t= sprintf( __( 'Shipping via %s', WC_Authorize_SIM::TEXT_DOMAIN ), $order->get_shipping_method() );\n\t\t\t\n\t\t\t// Quantity\n\t\t\t$item_qty \t= 1;\n\t\t\t\n\t\t\t// Amount\n\t\t\t$item_amount = round( $order->get_total_shipping(), 2 );\n\t\t\t\n\t\t\t// Log point\n\t\t\t$this->add_log( $item_id . \", $item_name, $item_desc, $item_qty, $item_amount\" );\n\t\t\t\n\t\t\t$this->add_item_field( $item_id, $item_name, $item_desc, $item_qty, $item_amount, 'N');\n\t\t}\n\t\t\n\t\t// Discount\n\t\tif ( $order->get_cart_discount() > 0 ) {\n\t\t\t// Id\n\t\t\t$item_id = 'DIS01' ;\n\t\t\t\n\t\t\t// name\n\t\t\t$item_name \t= __( 'Cart Discount', WC_Authorize_SIM::TEXT_DOMAIN );\n\t\t\t\n\t\t\t// description\n\t\t\t$item_desc \t= '';\n\t\t\t\n\t\t\t// Quantity\n\t\t\t$item_qty \t= 1;\n\t\t\t\n\t\t\t// Amount\n\t\t\t$item_amount = round( $order->get_cart_discount(), 2 );\n\t\t\t\n\t\t\t// Log point\n\t\t\t$this->add_log( $item_id . \", $item_name, $item_desc, $item_qty, $item_amount\" );\n\t\t\t\n\t\t\t$this->add_item_field( $item_id, $item_name, $item_desc, $item_qty, $item_amount, 'N');\n\t\t}\n\t\t\n\t\treturn apply_filters( 'woocommerce_authorize_sim_args', $params, $order->id );\n\t}",
"public function store(Request $request)\n {\n $rules = [\n 'Fullnames' => 'required|max:20',\n\n ]; // creating an array of rules\n $validator = Validator::make($request->all(), $rules); // checking the request agaainst the rules\n\n if($validator->fails()){\n return response()->json($validator->errors(),400);\n }\n\n\n\n // $response = STK::validate('ws_CO_16022018125');\n\n // 'Fullnames',\n // 'nickname_company',\n // 'Amount_owed',\n // 'Mobile_no',\n // 'type_of_debt',\n // 'debt_age',\n // 'users_id',\n // 'listing_option',\n // 'code',\n\n // create debtor list\n // input information\n $Debtors_listings = new Debtors_listings;\n\n $Debtors_listings-> Fullnames = $request -> input('Fullnames');\n $Debtors_listings-> nickname_company = $request -> input('nickname_company');\n $Debtors_listings-> Amount_owed = $request -> input('Amount_owed');\n $Debtors_listings-> Mobile_no = $request -> input('Mobile_no');\n $Debtors_listings-> type_of_debt = $request -> input('type_of_debt');\n $Debtors_listings-> debt_age = $request -> input('debt_age');\n $Debtors_listings-> users_id = rand(10,100);\n $Debtors_listings-> listing_option = $request -> input('listing_option');\n $Debtors_listings-> code = rand(1,10000); // rand(min,max)\n\n\n $response = STK::push( $Debtors_listings-> listing_option, $Debtors_listings-> Mobile_no , 'Daiwa', 'Test Payment');\n // return response()->json($response);\n\n // $result = json_encode($response, true);\n\n\n // $response->get('BillRefNumber');\n\n $processing_payment = new ProcessingPayment;\n $processing_payment-> MerchantRequestID = $response->MerchantRequestID;\n $processing_payment-> CheckoutRequestID = $response->CheckoutRequestID;\n $processing_payment-> ResultCode = $response->ResponseCode;\n $processing_payment-> ResultDesc = $response->ResponseDescription;\n $processing_payment-> Mobile_No = $Debtors_listings-> Mobile_no;\n $processing_payment-> Amount_Paid = $Debtors_listings-> listing_option;\n\n if($processing_payment-> ResultCode==0){\n\n\n $msisdn = $Debtors_listings-> Mobile_no;\n $message = 'Hello '.$Debtors_listings-> Fullnames.' alias '.$Debtors_listings-> nickname_company.' you have been listed on daiwa sasa by $User for unpaid debt of Ksh.'.$Debtors_listings-> Amount_owed.'.This makes your debt status public. Pay $User, $Number to be delisted. You can also list those who owe you ';\n $sms_id = rand(0000,9999);\n $resp = $this->send_sms($msisdn,$message,$sms_id);\n\n\n\n\n $processing_payment->save();\n $Debtors_listings-> save();\n\n // return $resp;\n // send sms after saving.\n }\n else {\n return 'You have not paid, please try again';\n }\n // return response()->json($response);\n\n // if($processing_payment-> ResultCode==0){\n // $processing_payment->save();\n // $Debtors_listings-> save();\n // }\n // else {\n // return 'Your payment was not successful please retry';\n // }\n\n\n\n\n\n\n // return response()->json($response);\n // User::find($id)->post->content; // getting information from the db check tutorial C:\\Users\\admin\\Downloads\\[FreeTutorials.Eu] Udemy - PHP with Laravel for beginners - Become a Master in Laravel\\11. Laravel Fundamentals - Database - Eloquent Relationships tut2\n // 'MerchantRequestID',\n // 'CheckoutRequestID',\n // 'ResultCode',\n // 'ResultDesc',\n\n\n// havent specified the response received\n // $payment->MerchantRequestID = $response\n // $payment->CheckoutRequestID = $response\n // $payment->ResultCode = $response\n // $payment->ResultDesc = $response\n\n\n\n // $payment-> save();\n\n\n // $Debtors_listings-> save(); // save to database\n\n\n }",
"function _submit_biz_data()\n {\n\t$data = $this->_get_data_from_post('business');\n\t//$this->debug($_FILES);\n\tif ($_FILES['photo']['name'] != NULL) {\n\t $data['logo'] = Modules::run('upload_manager/upload', 'photo', 'biz');\n\t}\n\n\t$id = $this->uri->segment(3) == 'edit' ? $this->session->user_id : '';\n\tif (is_numeric($id)) {\n\t $this->_update($id, $data, 'mdl_marketers_info');\n\t //Modules::run('auth/create_session', $this->session->user_id);\n\t redirect($this->uri->segment(3) == 'edit' ? 'users/profile' : 'users');\n\t} else {\n\t $this->_insert($data, 'mdl_marketers_info');\n\t //redirect('login');\n\t}\n }",
"public function postProvidentFund(Request $request) {\n $self = 'provident-fund';\n if (\\Auth::user()->user_name !== 'admin') {\n $get_perm = permission::permitted($self);\n\n if ($get_perm == 'access denied') {\n return redirect('permission-error')->with([\n 'message' => '您没有权限访问这个页面',\n 'message_important' => true\n ]);\n }\n }\n\n $v = \\Validator::make($request->all(), [\n 'emp_name' => 'required', 'fund_type' => 'required'\n ]);\n $niceNames = array(\n 'emp_name' => '员工姓名',\n 'fund_type' => '福利类型'\n );\n $v->setAttributeNames($niceNames);\n if ($v->fails()) {\n return redirect('provident-fund/all')->withErrors($v->errors());\n }\n\n $exist = ProvidentFund::where('emp_id', $request->emp_name)->where('status', 'Unpaid')->first();\n\n if ($exist) {\n return redirect('provident-fund/all')->with([\n 'message' => '福利基金已经存在',\n 'message_important' => true\n ]);\n }\n\n $fund_type = Input::get('fund_type');\n\n if ($fund_type == 'Fixed Amount') {\n $employee_share = Input::get('emp_share_fixed');\n $organization_share = Input::get('org_share_fixed');\n } else {\n $employee_share = Input::get('emp_share_per');\n $organization_share = Input::get('org_share_per');\n }\n\n $description = Input::get('description');\n\n $pfund = new ProvidentFund();\n $pfund->emp_id = $request->emp_name;\n $pfund->provident_fund_type = $fund_type;\n $pfund->employee_share = $employee_share;\n $pfund->organization_share = $organization_share;\n $pfund->description = $description;\n $pfund->status = 'Unpaid';\n\n $pfund->save();\n\n return redirect('provident-fund/all')->with([\n 'message' => '增加福利基金成功'\n ]);\n\n }",
"public function get_wallet_list_post()\n{\n\n $pdata = file_get_contents(\"php://input\");\n $postdata = json_decode($pdata,true);\n\n if (isset($postdata['company_id']))\n {\n \n $id = $postdata['company_id'];\n $data = $this->model->getAllwhere('wallet_details',array('company_id'=> $id));\n }else{\n $data = $this->model->getAllwhere('wallet_details');\n }\n\n \n\n $resp = array('rccode' => 200,'message' =>\"success\",'wallet_details'=>$data);\n $this->response($resp);\n}",
"private function getForm($action) {\n\t\t$form = new Admin_Form_InvoicesForm ( array ('action' => $action, 'method' => 'post' ) );\n\t\treturn $form;\n\t}",
"protected function getAccountRequest()\n {\n\n $resourcePath = '/shipping/v1/account';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n\n $sign = new SignatureSellingPartner();\n $headersX = $sign->calculateSignature($this->config->getApiKey(\"accessKey\"),\n $this->config->getApiKey(\"secretKey\"), $this->config->getApiKey(\"region\"),\n $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace(\"https://\", \"\", $this->config->getHost()),\n 'GET', $resourcePath, $query);\n\n $headers = array_merge(\n $headerParams,\n $headers,\n $headersX\n );\n\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"function media_bynder_form($form, &$form_state) {\n $form['media_bynder_settings'] = array(\n '#type' => 'fieldset',\n '#title' => t('Bynder API'),\n '#description' => t('You will first need to apply for an API Developer Key'),\n '#collapsible' => TRUE\n );\n\n $form['media_bynder_settings']['media_bynder_url'] = array(\n '#type' => 'textfield',\n '#title' => t('Bynder url'),\n '#default_value' => variable_get('media_bynder_url', ''),\n '#size' => 50,\n '#description' => t('The Bynder url.'),\n '#required' => TRUE\n );\n $form['media_bynder_settings']['media_bynder_oauth_consumer'] = array(\n '#type' => 'textfield',\n '#title' => t('OAuth Consumer Token'),\n '#default_value' => variable_get('media_bynder_oauth_consumer', ''),\n '#size' => 50,\n '#description' => t('The consumer token to be used by the module to communicate with Bynder.'),\n '#required' => TRUE\n );\n $form['media_bynder_settings']['media_bynder_oauth_consumer_secret'] = array(\n '#type' => 'textfield',\n '#title' => t('OAuth Consumer Secret'),\n '#default_value' => variable_get('media_bynder_oauth_consumer_secret', ''),\n '#size' => 50,\n '#description' => t('The consumer secret to be used by the module to communicate with Bynder.'),\n '#required' => TRUE\n );\n\n $form['media_bynder_settings']['media_bynder_oauth_token'] = array(\n '#type' => 'textfield',\n '#title' => t('OAuth Token'),\n '#default_value' => variable_get('media_bynder_oauth_token', ''),\n '#size' => 50,\n '#description' => t('The token to be used by the module to communicate with Bynder.'),\n '#required' => TRUE\n );\n\n $form['media_bynder_settings']['media_bynder_oauth_token_secret'] = array(\n '#type' => 'textfield',\n '#title' => t('OAuth Token Secret'),\n '#default_value' => variable_get('media_bynder_oauth_token_secret', ''),\n '#size' => 50,\n '#description' => t('The token secret to be used by the module to communicate with Bynder.'),\n '#required' => TRUE\n );\n\n $form['media_bynder_settings']['media_bynder_cdn_url'] = array(\n '#type' => 'textfield',\n '#title' => t('Cloudfront CDN url'),\n '#default_value' => variable_get('media_bynder_cdn_url', ''),\n '#size' => 50,\n '#description' => t('Optional cloudfront CDN url.'),\n '#required' => FALSE\n );\n\n return system_settings_form($form);\n}",
"public function buildForm()\n {\n $formBuilder = $this\n ->formFactory\n ->createNamedBuilder(null);\n\n $orderId = $this\n ->paymentBridge\n ->getOrderId();\n\n $orderCurrency = $this\n ->paymentBridge\n ->getCurrency();\n\n $this->checkCurrency($orderCurrency);\n\n /**\n * Creates the success return route, when coming back\n * from PayPal web checkout.\n */\n $successReturnUrl = $this\n ->urlFactory\n ->getSuccessReturnUrlForOrderId($orderId);\n\n /**\n * Creates the cancel payment route, when cancelling\n * the payment process from PayPal web checkout.\n */\n $cancelReturnUrl = $this\n ->urlFactory\n ->getCancelReturnUrlForOrderId($orderId);\n\n /**\n * Creates the IPN payment notification route,\n * which is triggered after PayPal processes the\n * payment and returns the validity of the transaction.\n *\n * For forther information\n *\n * https://developer.paypal.com/docs/classic/ipn/integration-guide/IPNandPDTVariables/\n * https://developer.paypal.com/webapps/developer/docs/classic/ipn/integration-guide/IPNIntro/\n */\n $processUrl = $this\n ->urlFactory\n ->getProcessUrlForOrderId($orderId);\n\n $formBuilder\n ->setAction($this->urlFactory->getApiEndpoint())\n ->setMethod('POST')\n ->add('business', HiddenType::class, [\n 'data' => $this->settingsProvider->getBusiness(),\n ])\n ->add('return', HiddenType::class, [\n 'data' => $successReturnUrl,\n ])\n ->add('cancel_return', HiddenType::class, [\n 'data' => $cancelReturnUrl,\n ])\n ->add('notify_url', HiddenType::class, [\n 'data' => $processUrl,\n ])\n ->add('currency_code', HiddenType::class, [\n 'data' => $orderCurrency,\n ])\n ->add('env', HiddenType::class, [\n 'data' => '',\n ]);\n\n /**\n * Create a PayPal cart line for each order line.\n *\n * Project specific PaymentBridgeInterface::getExtraData\n * should return an array of this form\n *\n * ['items' => [\n * 0 => [ 'item_name' => 'Item 1', 'amount' => 1234, 'quantity' => 2 ],\n * 1 => [ 'item_name' => 'Item 2', 'amount' => 2345, 'quantity' => 1 ],\n * ]]\n *\n * The 'items' key consists of an array with the basic information\n * of each line of the order. Amount is the price of the product,\n * not the total of the order line\n */\n $cartData = $this->paymentBridge->getExtraData();\n $itemsData = $cartData['items'];\n $iteration = 1;\n\n foreach ($itemsData as $orderLine) {\n $formBuilder\n ->add('item_name_'.$iteration, HiddenType::class, [\n 'data' => $orderLine['item_name'],\n ])\n ->add('amount_'.$iteration, HiddenType::class, [\n 'data' => $orderLine['amount'],\n ])\n ->add('quantity_'.$iteration, HiddenType::class, [\n 'data' => $orderLine['quantity'],\n ]);\n ++$iteration;\n }\n\n if (isset($cartData['discount_amount_cart'])) {\n $formBuilder->add('discount_amount_cart', HiddenType::class, [\n 'data' => $cartData['discount_amount_cart'],\n ]);\n }\n\n return $formBuilder\n ->getForm()\n ->createView();\n }",
"public function getPaymentAction()\n\t{\n\t\t$this->_ajaxValidation();\n\t\t$response['content']=$this->_getPaymentHtml();\n\t\t$this->getResponse()->setBody(json_encode($response));\n\t}",
"function PPHttpPost($methodName_, $nvpStr_) {\n\tglobal $environment;\n\n\t$API_UserName = urlencode('tuhins_1351114574_biz_api1.gmail.com');\n\t$API_Password = urlencode('1351114606');\n\t$API_Signature = urlencode('AdfcyT4sNBLU3ISgRRnYiJXaGd4hAjDiSEgVQesi8ykS-6Sp5pC4c5bM');\n\t$API_Endpoint = \"https://api-3t.paypal.com/nvp\";\n\tif(\"sandbox\" === $environment || \"beta-sandbox\" === $environment) {\n\t\t$API_Endpoint = \"https://api-3t.$environment.paypal.com/nvp\";\n\t}\n\t$version = urlencode('58.0');\n\n\t// setting the curl parameters.\n\t$ch = curl_init();\n\tcurl_setopt($ch, CURLOPT_URL, $API_Endpoint);\n\tcurl_setopt($ch, CURLOPT_VERBOSE, 1);\n\n\t// turning off the server and peer verification(TrustManager Concept).\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);\n\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\tcurl_setopt($ch, CURLOPT_POST, 1);\n\n\t// NVPRequest for submitting to server\n\t$nvpreq = \"METHOD=$methodName_&VERSION=$version&PWD=$API_Password&USER=$API_UserName&SIGNATURE=$API_Signature$nvpStr_\";\n\t\n\n\t// setting the nvpreq as POST FIELD to curl\n\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $nvpreq);\n\n\t// getting response from server\n\t$httpResponse = curl_exec($ch);\n\n\tif(!$httpResponse) {\n\t\texit(\"$methodName_ failed: \".curl_error($ch).'('.curl_errno($ch).')');\n\t}\n\n\t// Extract the RefundTransaction response details\n\t$httpResponseAr = explode(\"&\", $httpResponse);\n\n\t$httpParsedResponseAr = array();\n\tforeach ($httpResponseAr as $i => $value) {\n\t\t$tmpAr = explode(\"=\", $value);\n\t\tif(sizeof($tmpAr) > 1) {\n\t\t\t$httpParsedResponseAr[$tmpAr[0]] = $tmpAr[1];\n\t\t}\n\t}\n\n\tif((0 == sizeof($httpParsedResponseAr)) || !array_key_exists('ACK', $httpParsedResponseAr)) {\n\t\texit(\"Invalid HTTP Response for POST request($nvpreq) to $API_Endpoint.\");\n\t}\n\n\treturn $httpParsedResponseAr;\n}",
"public function getLoginFormData() {}",
"public function getLoginFormData() {}",
"function copyFormData()\n {\n $SessionPost = modApiFunc(\"Session\", \"get\", \"SessionPost\");\n $this->ViewState = $SessionPost[\"ViewState\"];\n\n //Remove some data, that should not be sent to action one more time, from ViewState.\n if(isset($this->ViewState[\"ErrorsArray\"]) &&\n count($this->ViewState[\"ErrorsArray\"]) > 0)\n {\n $this->ErrorsArray = $this->ViewState[\"ErrorsArray\"];\n unset($this->ViewState[\"ErrorsArray\"]);\n }\n $this->POST =\n array(\n \"Id\" => isset($SessionPost[\"Id\"])? $SessionPost[\"Id\"]:\"\"\n ,\"CountryId\" => isset($SessionPost[\"CountryId\"])? $SessionPost[\"CountryId\"]:\"0\"\n ,\"StateId\" => isset($SessionPost[\"StateId\"])? $SessionPost[\"StateId\"]:\"-1\"\n ,\"ProductTaxClassId\" => isset($SessionPost[\"ProductTaxClassId\"])? $SessionPost[\"ProductTaxClassId\"]:\"1\"\n ,\"ProductTaxClassName\" => isset($SessionPost[\"ProductTaxClassName\"])? $SessionPost[\"ProductTaxClassName\"]:\"\"\n ,\"TaxNameId\" => isset($SessionPost[\"TaxNameId\"])? $SessionPost[\"TaxNameId\"]:\"1\"\n ,\"Rate\" => isset($SessionPost[\"Rate\"])? $SessionPost[\"Rate\"]:\"\"\n ,\"FormulaView\" => isset($SessionPost[\"FormulaView\"])? $SessionPost[\"FormulaView\"]:\" \"\n ,\"Formula\" => isset($SessionPost[\"Formula\"])? $SessionPost[\"Formula\"]:\"\"\n ,\"Applicable\" => isset($SessionPost[\"NotApplicable\"])? \"false\":\"true\"\n ,\"TaxRateByZipSet\" => isset($SessionPost[\"TaxRateByZipSet\"]) ? $SessionPost[\"TaxRateByZipSet\"] : 0\n );\n }"
] | [
"0.6849158",
"0.6393531",
"0.6265234",
"0.616034",
"0.61496943",
"0.6104796",
"0.6080929",
"0.6056059",
"0.60351145",
"0.6025376",
"0.5940608",
"0.59316194",
"0.5927157",
"0.59217757",
"0.5917801",
"0.5913593",
"0.5895308",
"0.58910966",
"0.58843684",
"0.58772475",
"0.58517015",
"0.5848242",
"0.58402187",
"0.5833564",
"0.5832032",
"0.5810158",
"0.57634044",
"0.57528734",
"0.5735224",
"0.5730854",
"0.57271713",
"0.57239395",
"0.57178485",
"0.56977975",
"0.56950104",
"0.5691922",
"0.5681475",
"0.5680427",
"0.5670111",
"0.56693774",
"0.56545854",
"0.5642933",
"0.5628089",
"0.5626249",
"0.5608488",
"0.5607526",
"0.560243",
"0.5599861",
"0.55892664",
"0.55837095",
"0.5581222",
"0.55690306",
"0.555516",
"0.55540854",
"0.55512476",
"0.5545925",
"0.55446386",
"0.55363834",
"0.5535957",
"0.5528616",
"0.552815",
"0.54912734",
"0.54812586",
"0.5461695",
"0.54507476",
"0.5447846",
"0.5446646",
"0.5439907",
"0.5437566",
"0.5436034",
"0.5433533",
"0.5433361",
"0.5430754",
"0.54299676",
"0.54295725",
"0.54223204",
"0.54135746",
"0.54022044",
"0.5401524",
"0.5380567",
"0.5365372",
"0.5348507",
"0.5345197",
"0.53450423",
"0.534374",
"0.5343381",
"0.5338823",
"0.5330906",
"0.5328621",
"0.53256094",
"0.5324077",
"0.5318809",
"0.5318346",
"0.5317131",
"0.53141415",
"0.5309715",
"0.5309474",
"0.530827",
"0.530827",
"0.5302489"
] | 0.60893506 | 6 |
====================================================================// Blocks Generation Functions ====================================================================// Block Building Text Intro | private function buildIntroBlock(): void
{
//====================================================================//
// Into Text Block
$this->blocksFactory()
->addTextBlock("This is a Demo Text Block!!"."You can repeat me as much as you want!");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getBlockTypeDescription()\n {\n return t(\"Adds an intro title and a title\");\n }",
"public function blockStart() {\n\n $this->outputEditmode('<div class=\"pimcore_block_entry ' . $this->getName() . '\" key=\"' . $this->indices[$this->current] . '\">');\n $this->outputEditmode('<div class=\"pimcore_block_buttons_' . $this->getName() . ' pimcore_block_buttons\">');\n $this->outputEditmode('<div class=\"pimcore_block_amount_' . $this->getName() . ' pimcore_block_amount\"></div>');\n $this->outputEditmode('<div class=\"pimcore_block_plus_' . $this->getName() . ' pimcore_block_plus\"></div>');\n $this->outputEditmode('<div class=\"pimcore_block_minus_' . $this->getName() . ' pimcore_block_minus\"></div>');\n $this->outputEditmode('<div class=\"pimcore_block_up_' . $this->getName() . ' pimcore_block_up\"></div>');\n $this->outputEditmode('<div class=\"pimcore_block_down_' . $this->getName() . ' pimcore_block_down\"></div>');\n $this->outputEditmode('<div class=\"pimcore_block_clear\"></div>');\n $this->outputEditmode('</div>');\n\n $this->current++;\n }",
"public function finishFlowingBlock() {\r\n\t\t$maxWidth \t=& $this->flowingBlockAttr[ 'width' ];\r\n\t\t\r\n\t\t$lineHeight =& $this->flowingBlockAttr[ 'height' ];\r\n\t\t\r\n\t\t$border \t=& $this->flowingBlockAttr[ 'border' ];\r\n\t\t$align \t\t=& $this->flowingBlockAttr[ 'align' ];\r\n\t\t$fill \t\t=& $this->flowingBlockAttr[ 'fill' ];\r\n\t\t\r\n\t\t$content \t=& $this->flowingBlockAttr[ 'content' ];\r\n\t\t$font \t\t=& $this->flowingBlockAttr[ 'font' ];\r\n\t\t\r\n\t\t// Seteamos el espacio Normal\r\n\t\t$this->_out( sprintf( '%.3F Tw', 0 ) );\r\n\t\t\r\n\t\t// La cantidad de espacio ocupado hasta ahora en las unidades de usuario\r\n\t\t$usedWidth = 0;\r\n\t\t\r\n\t\tforeach ( $content as $k => $chunk ) {\r\n\t\t\t$b = '';\r\n\t\t\t\r\n\t\t\tif ( is_int( strpos( $border, 'B' ) ) ) {\r\n\t\t\t\t$b .= 'B';\r\n\t\t\t}\r\n\t\t\tif ( $k == 0 && is_int( strpos( $border, 'L' ) ) ) {\r\n\t\t\t\t$b .= 'L';\r\n\t\t\t}\r\n\t\t\tif ( $k == count( $content ) - 1 && is_int( strpos( $border, 'R' ) ) ) {\r\n\t\t\t\t$b .= 'R';\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$this->restoreFont( $font[ $k ] );\r\n\t\t\t\r\n\t\t\t// Si es la ultima parte de la Linea se mueve a la Siguiente\r\n\t\t\tif ( $k == count( $content ) - 1 ) {\r\n\t\t\t\t$this->Cell( ( $maxWidth / $this->k ) - $usedWidth + 2 * $this->cMargin, $lineHeight, $chunk, $b, 1, $align, $fill );\r\n\t\t\t} else {\r\n\t\t\t\t$this->Cell( $this->GetStringWidth( $chunk ), $lineHeight, $chunk, $b, 0, $align, $fill );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$usedWidth += $this->GetStringWidth( $chunk );\r\n\t\t}\r\n\t}",
"function do_blocks($content)\n {\n }",
"public function new_block() {\n\t\t$log_text = \"\";\n\t\t$created_block_id = $this->blockchain->new_block($log_text);\n\t\tlist($successful, $log_text) = $this->add_block($created_block_id);\n\t\t$this->update_option_votes();\n\t\t$this->check_set_game_over();\n\t\treturn $log_text;\n\t}",
"function pnCPG_blockblock_init()\n{\n // Security\n pnSecAddSchema('pnCPG:block:', 'Block title::');\n}",
"function beginMainBlock() {\n $blockNo = 0;\n $this->registerBlock('@@InternalMainBlock@@', $blockNo);\n $bte =& $this->blockTab[$blockNo];\n $bte['tPosBegin'] = 0;\n $bte['tPosContentsBegin'] = 0;\n $bte['nestingLevel'] = 0;\n $bte['parentBlockNo'] = -1;\n $bte['definitionIsOpen'] = true;\n $this->openBlocksTab[0] = $blockNo;\n $this->currentNestingLevel = 1; }",
"function render_tut06b_block( $atts, $content ) {\n\n if( function_exists( 'get_current_screen' ) ) { return; }\n\n \n $title = isset( $atts['title']) ? \"<h2>{$atts['title']}</h2>\" : '';\n $image = isset( $atts['mediaURL'] ) ? \"<img src='{$atts['mediaURL']}'>\" : '';\n $ingredients = isset( $atts['ingredients'] ) ? \"<ul>{$atts['ingredients']}</ul>\" : '';\n\n ob_start();\n\n echo \"<div class='recipe'>\n {$title}\n <h4> Ingredients </h4>\n {$ingredients}\n {$image}\n <h4> Steps </h4>\n {$content}\n </div>\";\n\n return ob_get_clean(); // prevent error when updating, I'm honestly not sure how\n}",
"function _excerpt_render_inner_blocks($parsed_block, $allowed_blocks)\n {\n }",
"function render_block_core_footnotes($attributes, $content, $block)\n {\n }",
"public function getNextBlock();",
"function render_block_core_cover($attributes, $content)\n {\n }",
"function render_block($parsed_block)\n {\n }",
"function parse_blocks($content)\n {\n }",
"public function getBlockTypeDescription()\n {\n return t(\"Title with an underline\");\n }",
"function endMainBlock() {\n $bte =& $this->blockTab[0];\n $bte['tPosContentsEnd'] = strlen($this->template);\n $bte['tPosEnd'] = strlen($this->template);\n $bte['definitionIsOpen'] = false;\n $this->currentNestingLevel -= 1; }",
"function register_block_core_heading()\n {\n }",
"function write_translation() {\r\n $this->final_image = cloneImg($this->get_cleaned_image());\r\n foreach ($this->text_blocks as $block) {\r\n $black = imagecolorallocate($this->final_image, 0, 0, 0);\r\n $red = imagecolorallocate($this->final_image, 255, 0, 0);\r\n $green = imagecolorallocate($this->final_image, 0, 255, 0);\r\n $yellow = imagecolorallocate($this->final_image, 255, 255, 0);\r\n \r\n $translation_width=$block->translation_width;\r\n $translation_height=$block->translation_height;\r\n\r\n $block_height=round(distance($block->x4,$block->y4,$block->x1,$block->y1));\r\n $block_width=round(distance($block->x1,$block->y1,$block->x2,$block->y2));\r\n\r\n $Ix=$block->x1+($block_width-$translation_width)/2;\r\n $Iy=$block->y1+$block->translation_top_offset+($block_height-$translation_height)/2 ;\r\n $tmpx=$Ix;\r\n $tmpy=$Iy;\r\n\r\n if ($block->text_angle !=0) {\r\n $insert=rotate($Ix,$Iy, $block->x1,$block->y1,0- $block->text_angle);\r\n $Ix = $insert[0];\r\n $Iy = $insert[1];\r\n }\r\n\r\n imagettftext (\r\n $this->final_image,\r\n $block->font_size,\r\n $block->text_angle,\r\n $Ix,\r\n $Iy,\r\n $black,\r\n $block->font,\r\n $block->formatted_text );\r\n }\r\n\r\n \r\n $this->final_image_path=\"uploads/\".microtime().\".jpg\";\r\n imagewrite($this->final_image,$this->final_image_path,$quality=100);\r\n }",
"public function get_description()\n {\n return 'Show the top performing members in a community. The addon adds a [tt]main_stars[/tt] block that ranks members on how many points they have been given in a certain category (also it changes the points module to allow selection of such categories when giving points). It also adds a block to show recent points transfers. Finally, it adds a line to member\\'s profile screens that says how many topics they have created, and how many they have replied to, to give a reflection of whether they help more than they ask or vice-versa.\n\nUsage:\n[code=\"Comcode\"][block max=\"10\"]side_recent_points[/block][/code]\nand\n[code=\"Comcode\"][block=\"Helpful soul\"]main_stars[/block][/code]The [tt]POINTS_GIVE[/tt] ([tt]themes/default/templates_custom[/tt]) template contains hard-coded HTML that defines each kind of points category that can be used. It is likely you will want to put out one an instance of the [tt]main_stars[/tt] block for each category (using the syntax demonstrated above).';\n }",
"public static function output_block_styles()\n {\n }",
"function shortIntro($introtext,$blacklist)\n\t{\n\n\t\t//TODO: check for last position is a period if $i > 20\n\t\t//TODO: Check for length of current word if has period if only two and is capital continue\n\n\t\t// Cutoff is a threshold with a trigger\n\n\t\t//Introtext as an array of paragraphs\n\t\t$introtext = str_replace('<h2>','<h3>',$introtext) ;\n\t\t$introtext = str_replace('</h2>','</h3>',$introtext) ;\n\t\tforeach ($blacklist as $ignore){\n\t\t\t$introtext = str_replace($ignore,'',$introtext);\t\t\t\n\t\t}\n\n\t\t$introtext = str_replace('class=\"caption\"','',$introtext);\n\t\t$introtext = str_replace('<img','<img style=\"display:none\"',$introtext);\n\n\t\t$introtext = str_replace('{loadposition bigisland}','',$introtext);\n\t\t//adds a flag after closed <p> in order to maintain <p> markers\n\t\t$introtext = str_replace('</p>','</p>{endpara}',$introtext);\n\t\t$introtext = strip_tags($introtext);\n\t\t$paras = explode('{endpara}',$introtext);\n\n\t\t//take out the first two paragraphs for analysis\n\t\t$newtext = $paras[0] . $paras[1];\n\t\t$words = explode(' ',$newtext);\n\n\t\t//iterator\n\t\t$i = 0;\n\t\t$trigger = 0;\n\t\t//new value for intro\n\t\t$newintro = '';\n\n\t\twhile ($trigger == 0) {\t\n\t\t\t\t$newintro = $newintro . $words[$i] . ' ';\n\t\t\t\t//original\n\t\t\t\tif (substr($words[$i],strlen($words[$i])-1) == '.' and $i > 20){$trigger = 1;}\n\t\t\t\t//include check for </p> and other tags\n\t\t\t\tif (substr($words[$i],strlen($words[$i])-2) == 'p>' and $i > 20){$trigger = 1;}\n\t\t\t\tif (substr($words[$i],strlen($words[$i])-3) == 'li>' and $i > 20){$trigger = 1;}\n\t\t\t\tif (substr($words[$i],strlen($words[$i])-3) == 'dt>' and $i > 20){$trigger = 1;}\n\t\t\t\tif (substr($words[$i],strlen($words[$i])-2) == '?>' and $i > 20){$trigger = 1;}\n\n\t\t\t\t//increment\n\t\t\t\t\t$i++;\n\t\t\t\t// make sure the loop isn't infinite for short entries\t\n\t\t\t\tif ($i == sizeof($words)){$trigger =1;}\n\t\t\t\t}\n\n\t\treturn $newintro;\n\n\t}",
"public function render()\n\t{\n\t\t$title = $this->renderTitle();\n\t\t$subtitle = $this->renderSubtitle();\n\t\t$new = $this->renderNew();\n\n\t\treturn <<<HTML\n<section class=\"block-new\">\n\t<div class=\"container\">\n\t\t<div class=\"container-inner\">\n\t\t\t<div class=\"block-new-layout\">\n\t\t\t\t$title\n\t\t\t\t$subtitle\n\t\t\t\t$new\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</section>\nHTML;\n\t}",
"function __construct() {\n\t\t$block_options = array(\n\t\t\t'name' => 'Text',\n\t\t\t'size' => 'span6',\n\t\t\t'block_icon' => '<i class=\"fa fa-font fa-fw\"></i>',\n\t\t\t'block_description' => 'Use to add Text, HTML or Shortcodes. Also has Icon Options.',\n\t\t\t'block_category' => 'text'\n\t\t);\n\t\t\n\t\t//create the block\n\t\tparent::__construct('aq_text_block', $block_options);\n\t}",
"function vb_highlight(&$code)\n\n{\n\n $code = str_replace('\"\"', get_placeholder(10), $code);\n\n $blocks = array(\n\n array(\n\n 'pattern' => '#\".+?\"#',\n\n 'prefix' => '<span class=\"vb_string\">', \n\n 'suffix' => '</span>'\n\n ),\n\n array(\n\n 'pattern' => \"#'.*#\",\n\n 'prefix' => '<span class=\"vb_comment\">', \n\n 'suffix' => '</span>'\n\n ),\n\n );\n\n \n\n $secondaries = array(\n\n array(\n\n 'pattern' => '!([\\n\\r]|^)\\s*?#.*!',\n\n 'prefix' => '<span class=\"vb_preprocessor\">',\n\n 'suffix' => '</span>'\n\n ),\n\n array(\n\n 'pattern' => '!(\\W|^)(\\.?[0-9][0-9.]*|&[hH][0-9a-fA-F]*)!',\n\n 'replacement' => '<span class=\"vb_number\">$2</span>',\n\n 'keepprefix' => 1\n\n ),\n\n array(\n\n 'pattern' => '~[,=\\+\\-!%\\^&\\*\\(\\)\\<\\>#$|]~',\n\n 'prefix' => '<span class=\"vb_symbol\">',\n\n 'suffix' => '</span>'\n\n )\n\n );\n\n \n\n $kw = array(\n\n array(\n\n 'prefix' => '<span '.get_placeholder(8).'=\"vb_keyword\">',\n\n 'suffix' => '</span>',\n\n 'keywords' => array('addhandler','addressof','andalso','alias','and','ansi','as','assembly','attribute','auto','begin','call','case','catch','cbool','cbyte','cchar','cdate','cdec','cdbl','char','cint','class','clng','cobj','compare','const','continue','cshort','csng','cstr','ctype','declare','default','delegate','dim','do','each','else','elseif','end','erase','error','event','exit','explicit','finally','for','friend','function','get','gettype','global','gosub','goto','handles','if','implement','implements','imports','in','inherits','interface','is','let','lib','like','load','loop','lset','me','mid','mod','module','mustinherit','mustoverride','mybase','myclass','namespace','new','next','not','nothing','notinheritable','notoverridable','on','open','option','or','orelse','overloads','overridable','overrides','paramarray','preserve','property','raiseevent','readonly','redim','rem','removehandler','rset','resume','return','select','set','shadows','shared','step','stop','structure','sub','synclock','then','throw','to','try','typeof','unload','unicode','until','wend','when','while','with','withevents','writeonly','xor')\n\n ),\n\n array(\n\n 'prefix' => '<span '.get_placeholder(8).'=\"vb_type\">',\n\n 'suffix' => '</span>',\n\n 'keywords' => array('boolean','byref','byte','byval','currency','date','decimal','double','enum','false','integer','long','object','optional','private','protected','public','short','single','static','string','true','type','variant')\n\n ),\n\n );\n\n $code = generic_highlight($code, $blocks, $secondaries, array(), $kw);\n\n // put escapes back in\n\n return str_replace(get_placeholder(10), '<span class=\"vb_string\">""</span>', $code);\n\n}",
"public function write_blocks()\n \t{\n\t\t$result=\"\";\n\t\t\n\t\tforeach($this->blocks as $key => $block)\n\t\t\t$result.=\"\\t\\t<script type='text/javascript'>\\n$block\\n</script>\\n\";\n\t\n\t\treturn $result;\n \t}",
"protected function buildBlock(string $data): string\n {\n return \"\\n\".sprintf('###> %s ###%s%s%s###< %s ###%s', self::NAME, \"\\n\", rtrim($data, \"\\r\\n\"), \"\\n\", self::NAME, \"\\n\");\n }",
"function mce_mod( $init ) {\n $init['block_formats'] = 'Intro=h1;Header=h2;Subhead=h4;Paragraph=p;Quote=blockquote';\n return $init;\n}",
"function gsb_public_custom_blocks_preprocess_gsb_public_custom_blocks_follow_us(&$variables) {\n\n}",
"public function get_content() {\n \tglobal $PAGE;\n\t \n $this->page->requires->js_call_amd(\"block_inlinetrainer/demo\", \"run\", [\"#block_inlinetrainer-body\"]);\n\n\t $this->content = new stdClass();\n $this->content->text = '<b id=\"block_inlinetrainer-title\"></b>';\n\t $this->content->text .= '<ol id=\"block_inlinetrainer-body\"><i>Loading steps...</li></ol>';\n $this->content->text .= \"<style type='text/css'>\n .block_inlinetrainer_overlay {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: #000;\n filter:alpha(opacity=50);\n -moz-opacity:0.5;\n -khtml-opacity: 0.5;\n opacity: 0.5;\n z-index: 10000;\n }\n .block_inlinetrainer_hint{\n position: relative;\n padding:5px;\n /*-webkit-box-shadow: 4px 4px 15px 1px #333; \n -moz-box-shadow: 4px 4px 15px 1px #333; \n box-shadow: 4px 4px 15px 1px #333; */\n }\n </style>\";\n\t return $this->content;\n\t}",
"function createMultiCodeBlock(string &$input, Parser &$parser) {\n $code = findCodeBlocks($input);\n\n $replaced = str_replace($code, 'test', $input);\n $dom = getDOM($replaced);\n\n $codevariants = $dom->getElementsbyTagName('codeblock');\n\n $descriptions = [];\n $codeArr = [];\n foreach ($codevariants as $codevariant) {\n array_push($codeArr, $codevariant->getElementsbyTagName('code'));\n array_push($descriptions, $codevariant->getElementsbyTagName('desc'));\n }\n\n $size = sizeof($codevariants);\n $return = \"\";\n $languages = [];\n\n $h1 = new \\Highlight\\Highlighter();\n\n $last = 0;\n for ($i = 0; $i < $size; ++$i) {\n $length = sizeof($codeArr[$i]);\n $codeBlocks = array_slice($code, $last, $length);\n\n $last += $length;\n\n $codeblock = createCodeBlock($codeBlocks, $descriptions[$i], $codevariants[$i]->getAttribute('lang'), $parser, $h1);\n $return .= createTab($codeblock[0], $i);\n array_push($languages, $codeblock[1]);\n }\n\n return createFrame($languages, $return);\n}",
"function groom_block_info()\n{\n $blocks['groom_calendar_standard'] = array(\n 'info' => t('Calendrier Groom - Standard'),\n );\n $blocks['groom_calendar_solo'] = array(\n 'info' => t('Calendrier Groom - Solo'),\n );\n $blocks['groom_calendar_vip'] = array(\n 'info' => t('Calendrier Groom - VIP'),\n );\n\n return $blocks;\n}",
"function get_comment_delimited_block_content($block_name, $block_attributes, $block_content)\n {\n }",
"function htmlblock($text) {\n $this->html($text, 'pre');\n }",
"function render_block_core_block($attributes)\n {\n }",
"function render_block_core_file($attributes, $content, $block)\n {\n }",
"public function page_content__main() {\n\n echo '<h3>' . __('Blocks', 'wpucacheblocks') . '</h3>';\n foreach ($this->blocks as $id => $block) {\n echo '<p>';\n echo '<strong>' . $id . ' - ' . $block['path'] . '</strong><br />';\n $_expiration = (is_bool($block['expires']) ? __('never', 'wpucacheblocks') : $block['expires'] . 's');\n echo sprintf(__('Expiration: %s', 'wpucacheblocks'), $_expiration);\n\n $prefixes = $this->get_block_prefixes($id);\n\n foreach ($prefixes as $prefix) {\n echo $this->display_block_cache_status($id, $prefix);\n }\n\n echo '<br />';\n if (!apply_filters('wpucacheblocks_bypass_cache', false, $id)) {\n if (isset($block['callback_prefix'])) {\n submit_button(__('Clear', 'wpucacheblocks'), 'secondary', 'clear__' . $id, false);\n } else {\n submit_button(__('Reload', 'wpucacheblocks'), 'secondary', 'reload__' . $id, false);\n }\n } else {\n echo __('A bypass exists for this block. Regeneration is only available in front mode.', 'wpucacheblocks');\n }\n echo '</p>';\n echo '<hr />';\n }\n }",
"function halter() {\n print \"<section class=\\\"w3-row w3-theme\\\">\\n\"; // Banner\n print \"<article class=\\\"w3-col m3 l2 w3-cell w3-theme w3-center\\\">\\n\"; // Logo Block\n print \"<img title=\\\"Logo\\\" alt=\\\"Or, A Chamfron and in base the letters IKEqC vert.\\\" src=\\\"I3Logo3.png\\\">\\n\";\n print \"</article>\\n\"; // End Logo block\n print \"<article class=\\\"w3-col m9 l10 w3-theme w3-center w3-cell-middle\\\">\\n\"; // Title Block\n print \"<H1>Inter-Kingdom Equestrian Competition</H1>\\n\";\n long_as();\n print \"<div class=\\\"w3-bar w3-center\\\">\\n\"; // Quick Links\n print \"<a href=\\\"https://scaikeqc.org/rules/index.php\\\" class=\\\"w3-bar-item w3-button w3-mobile\\\">Rules</a>\\n\";\n print \"<a href=\\\"https://scaikeqc.org/emta.php\\\" class=\\\"w3-bar-item w3-button w3-mobile\\\">EM/TA Portal</a>\\n\";\n print \"<a href=\\\"https://scaikeqc.org/dl/index.php\\\" class=\\\"w3-bar-item w3-button w3-mobile\\\">Forms/Downloads</a>\\n\";\n print \"<a href=\\\"https://scaikeqc.org/blog/index.php\\\" class=\\\"w3-bar-item w3-button w3-mobile\\\">Blog</a>\\n\";\n print \"</div>\"; // End Quick Links\n print \"</article>\\n\"; // End Title block\n print \"</section>\\n\"; // End Banner block\n}",
"function vsau_block_render( $attributes ) {\n\t$aboutUsImage = ( ! empty( $attributes['aboutUsImage'] ) ) ? $attributes['aboutUsImage'] : '';\n\tob_start();\n\t?>\n\t<section class=\"about-us\">\n\t\t<div class=\"mission-area\">\n\t\t\t<div class=\"container\">\n\t\t\t\t<div class=\"row\">\n\t\t\t\t\t<div class=\"col-md-12 text-center\">\n\t\t\t\t\t\t<h2 class=\"section-heading\"><?php echo wp_kses_post( ( ! empty( $attributes['sectionHeading'] ) ) ? $attributes['sectionHeading'] : __( 'About', 'vape-smoke' ) ); ?></h2>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"mission-area-content\">\n\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t<div class=\"col-md-6 pr-md-0\">\n\t\t\t\t\t\t\t<img src=\"<?php echo esc_url( $aboutUsImage ); ?>\" alt=\"abt us image\" class=\"w-100\">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"mission-area-text col-md-6\">\n\t\t\t\t\t\t\t<p><?php echo esc_html( ( ! empty( $attributes['aboutUsDescription'] ) ) ? $attributes['aboutUsDescription'] : '' ); ?></p>\n\t\t\t\t\t\t\t<a href=\"<?php echo esc_url( ( ! empty( $attributes['readMoreButtonLink'] ) ) ? $attributes['readMoreButtonLink'] : '' ); ?>\">\n\t\t\t\t\t\t\t\t<button class=\"btn\"><?php echo esc_html( ( ! empty( $attributes['readMoreButtonText'] ) ) ? $attributes['readMoreButtonText'] : __( 'Read More', 'vape-smoke' ) ); ?></button>\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</section>\n\t<?php\n\treturn ob_get_clean();\n}",
"static function block($k,$v){\n$ret=''; $u=self::$unit; $w=$u; $h=$u/2; $b=self::$base; $x=$v[0]*$u; $y=$b-$v[1]*$u;\n$ratio=255/48; \n$clr=self::mkclr($k*$ratio);\n$ret.='[#'.$clr.',gray,,,1:attr]['.$x.','.$y.','.$w.','.$h.',,id'.$k.':rect]';\n$ret.='[black,:attr]['.($x+16).','.($y+16).'§'.$k.':text]';\nreturn $ret;}",
"public function spineautop( $text ) {\n\t\t$block_count = absint( get_post_meta( get_the_ID(), '_wsuwp_block_count', true ) );\n\n\t\t$final_html = '';\n\n\t\tfor ( $i = 1; $i <= $block_count; $i++ ) {\n\t\t\t// Match the saved content for a specific section in the HTML comments. We look for the section\n\t\t\t// and then grab the specified classes and content.\n\t\t\tpreg_match('/<!-- section-' . $i . '-class:([a-z-,_]+):type:([a-z]+): -->(.*?)<!-- end-section-' . $i . ' -->/s', $text, $matches);\n\t\t\tif ( isset( $matches[1] ) ) {\n\t\t\t\t// Classes are passed in the section comment as comma separated values.\n\t\t\t\t$classes = explode( ',', esc_attr( $matches[1] ) );\n\t\t\t\t$classes = implode( ' ', $classes );\n\n\t\t\t\t$type = $matches[2];\n\n\t\t\t\t// @todo explore reasoning and use of wp_unslash\n\t\t\t\t$section_html = '<section id=\"section-' . $i . '\" class=\"' . $classes . '\">';\n\n\t\t\t\tif ( 'single' === $type ) {\n\t\t\t\t\t$section_html .= '<div class=\"column one\">' . wp_unslash( wpautop( $matches[3] ) ) . '</div>';\n\t\t\t\t} elseif ( in_array( $type, array( 'sidebar', 'sideleft', 'halves' ) ) ) {\n\t\t\t\t\t$column_html_parts = explode( '<!-- column-split -->', $matches[3] );\n\t\t\t\t\t$section_html .= '<div class=\"column one\">' . wp_unslash( wpautop( $column_html_parts[0] ) ) . '</div>';\n\t\t\t\t\t$section_html .= '<div class=\"column two\">' . wp_unslash( wpautop( $column_html_parts[1] ) ) . '</div>';\n\t\t\t\t}\n\n\t\t\t\t$section_html .= '</section>';\n\t\t\t\t$final_html .= $section_html;\n\t\t\t}\n\t\t}\n\n\t\treturn $final_html;\n\t}",
"public function addInsertBlocks() {\n foreach ($this->_explodedBody as $key => $paragraph) {\n if (isset($this->_inserts[$key])) {\n $this->_body = str_replace($paragraph . '</p>', $paragraph . $this->_explodeTag . $this->_inserts[$key], $this->_body);\n }\n else {\n $this->_body = str_replace($paragraph . '</p>', $paragraph . $this->_explodeTag, $this->_body);\n }\n }\n\n $this->_insertedBody = $this->_body;\n\n }",
"function &renderIntro( )\r\n {\r\n $generator =& $this->generator();\r\n \r\n return $generator->renderIntro();\r\n }",
"public function register_blocks() {\n\t\t}",
"function register_block_core_footnotes()\n {\n }",
"function render_block_core_post_author_biography($attributes, $content, $block)\n {\n }",
"function get_the_block_template_html()\n {\n }",
"function init() {\n global $CFG;\n $this->blockname = get_class($this);\n $this->title = get_string('blockname', $this->blockname);\n $this->version = 2009082800;\n }",
"function Generate()\n \t{\n \t\t\n \t}",
"public function block($args, $assoc_args)\n {\n /**\n * Setup vars for directory and block names\n *\n * $blockName is the kebab-case component name\n * - used for registration, scss/partial filename\n * - used in partial for classname\n * - used in scss for classname\n *\n * $blockClassName is the PascalCase component name\n * - used for ACF_Block registration classname\n * - added to BlockServiceProvider.php\n */\n $theme_path = trailingslashit(get_template_directory());\n $blockName = strtolower($args[0]);\n $blockClassNameParts = explode('-', $args[0]);\n $blockClassName = '';\n foreach ($blockClassNameParts as $part) {\n $blockClassName .= ucfirst($part);\n }\n $blockTitle = strtolower($blockName);\n\n\n /**\n * Create block\n */\n $create_block_result = $this->createAcfBlock($theme_path, $blockClassName, $blockTitle);\n \n if ($create_block_result !== true) {\n return;\n }\n\n /**\n * Reference in block service provider\n */\n $this->addClassToBlockServiceProvider($theme_path, $blockClassName);\n\n /**\n * Create partial\n */\n $this->createBlockPartial($theme_path, $blockTitle);\n\n /**\n * Create SCSS (optional)\n */\n \\WP_CLI::confirm('Would you like SCSS?', $assoc_args_scss = array());\n $created_scss = $this->createBlockScssFile($theme_path, $blockName);\n\n /**\n * Reference SCSS in _blocks.scss\n */\n if ($created_scss) {\n $this->addScssImportStatement($theme_path, $blockName);\n }\n\n //@TODO finish me\n //$this->addBlockToAllowedBlocks($theme_path, $blockName);\n \n \\WP_CLI::success('Great Success! https://untappd.akamaized.net/photo/2017_08_05/c1e3366ff091d1b65c903dddfcd2f036_320x320.jpg');\n }",
"public function run()\n {\n $this->disableForeignKeys();\n $this->truncate('blocks');\n\n /*\n * ABOUT US PAGE BLOCKS\n */\n $blocks = [\n [\n 'page_id' => 1,\n 'title' => 'History',\n 'title_ru' => 'История',\n 'title_it' => 'Mostra di più',\n 'body' => 'The collection is inspired by the Renaissance town of Verona, symbol of the classic and highly appreciated Italian style, romantic and elegant at a time. Special care is devoted to details, the selection of tissues, and the coordination of color nuances.\n ',\n 'body_ru' => 'Коллекция вдохновлена эпохой Возрождения Вероны, символом классического и высоко оцененного итальянского стиля, романтического и элегантного за один раз. Особое внимание уделяется деталям, выбору тканей и координации цветовых нюансов.',\n 'body_it' => 'La collezione è ispirata alla città rinascimentale di Verona, simbolo del classico stile italiano molto apprezzato, romantico ed elegante alla volta. La cura particolare è dedicata ai dettagli, alla selezione dei tessuti e al coordinamento delle sfumature di colore.\n ',\n 'image' => null,\n 'title_limit' => 15,\n 'body_limit' => 300,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 1,\n 'title' => 'Expression of style',\n 'title_ru' => 'Выражение стиля',\n 'title_it' => 'Espressione dello stile',\n 'body_it' => 'Anche nell\\'area dell\\'ufficio un nuovo concetto di spazio, adattato alle vostre esigenze, riesce a ripristinare un design elegante e raffinato che si esprime in una cura amorosa per i dettagli, in una lavorazione a mano che esalta le texture, dando complementi di mobili con un unico e Fascino senza tempo.',\n 'body_ru' => 'Кроме того, в офисной зоне новая концепция пространства, адаптированная к вашим потребностям, оживляет элегантный и изысканный дизайн, который выражается в любящей заботе о деталях, в ручном производстве, которое превозносит текстуры, придавая вам мебельные дополнения с уникальным и Вневременное очарование',\n 'body' => 'Also in the office area a new concept of space, tailored to your needs, to revive an elegant and refined design that expresses itself in a loving care for details, in a hand manufacturing that exalt the textures, giving you furniture complements with a unique and timeless charm',\n 'image' => 'under-history-right.jpg',\n 'title_limit' => 25,\n 'body_limit' => 330,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 1,\n 'title' => '',\n 'title_ru' => '',\n 'title_it' => '',\n 'body' => 'The lifelong experience is being reflected in almost every project. At Cavio-Casa, we are welcoming challenges to foster our creativity. People inspire us and we want to inspire them too.<br><br>Everything we do at Cavio-Casa is guided by our vision to ensure that we all go the extra mile to help our customers reach their audiences. So far, we have achieved to play a dynamic role in shaping the jewelry industry.\n ',\n 'body_ru' => 'Жизненный опыт отражается почти во всех проектах. В Cavio-Casa мы приветствуем проблемы, способствующие нашему творчеству. Люди вдохновляют нас, и мы хотим их вдохновить. <br><br> Все, что мы делаем в Cavio-Casa, руководствуется нашим видением, чтобы все мы прошли лишнюю милю, чтобы помочь нашим клиентам достичь своей аудитории. До сих пор мы достигли динамичной роли в формировании ювелирной промышленности.',\n 'body_it' => 'L\\'esperienza permanente si riflette in quasi tutti i progetti. A Cavio-Casa, stiamo accogliendo sfide per promuovere la nostra creatività. La gente ci ispira e vogliamo ispirare anche loro<br><br> Tutto quello che facciamo a Cavio-Casa è guidato dalla nostra visione per assicurarci che tutti noi passiamo il miglio supplementare per aiutare i nostri clienti a raggiungere il loro pubblico. Finora abbiamo raggiunto un ruolo dinamico nella progettazione dell\\'industria dei gioielli.',\n 'image' => 'under-history-left.jpg',\n 'title_limit' => null,\n 'body_limit' => 500,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 1,\n 'title' => 'Philosofhy',\n 'title_ru' => 'Философия',\n 'title_it' => 'Filosofia',\n 'body' => 'The collection is inspired by the Renaissance town of Verona, symbol of the classic and highly appreciated Italian style, romantic and elegant at a time. Special care is devoted to details, the selection of tissues, and the coordination of color nuances.',\n 'body_ru' => 'Коллекция вдохновлена эпохой Возрождения Вероны, символом классического и высоко оцененного итальянского стиля, романтического и элегантного за один раз. Особое внимание уделяется деталям, выбору тканей и координации цветовых нюансов.',\n 'body_it' => 'La collezione è ispirata alla città rinascimentale di Verona, simbolo del classico stile italiano molto apprezzato, romantico ed elegante alla volta. La cura particolare è dedicata ai dettagli, alla selezione dei tessuti e al coordinamento delle sfumature di colore.',\n 'image' => null,\n 'title_limit' => 15,\n 'body_limit' => 300,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 1,\n 'title' => '',\n 'title_ru' => '',\n 'title_it' => '',\n 'body_it' => 'Tutto quello che facciamo a Cavio-Casa è guidato dalla nostra visione per assicurare che tutti noi andiamo il miglio supplementare per aiutare i nostri clienti a raggiungere il loro pubblico. Finora abbiamo raggiunto un ruolo dinamico nella progettazione dell\\'industria dei gioielli<br><br> L\\'esperienza permanente si riflette in quasi tutti i progetti. A Cavio-Casa, stiamo accogliendo sfide per promuovere la nostra creatività. Le persone ci ispirano e vogliamo ispirare anche loro.',\n 'body_ru' => 'Все, что мы делаем в Cavio-Casa, руководствуется нашим видением, чтобы все мы прошли лишнюю милю, чтобы помочь нашим клиентам достичь своей аудитории. До сих пор мы достигли динамичной роли в формировании ювелирной промышленности.<br>Жизненный опыт отражается почти во всех проектах. В Cavio-Casa мы приветствуем проблемы, способствующие нашему творчеству. Люди вдохновляют нас, и мы хотим вдохновить их тоже.',\n 'body' => 'Everything we do at Cavio-Casa is guided by our vision to ensure that we all go the extra mile to help our customers reach their audiences. So far, we have achieved to play a dynamic role in shaping the jewelry industry.<br>The lifelong experience is being reflected in almost every project. At Cavio-Casa, we are welcoming challenges to foster our creativity. People inspire us and we want to inspire them too.',\n 'image' => null,\n 'title_limit' => null,\n 'body_limit' => 500,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 1,\n 'title' => '',\n 'title_ru' => '',\n 'title_it' => '',\n 'body' => 'We have been renowned for the high quality of our hand-made products, the innovative ideas, the effective co-operation with clients around the world and the ability to tailor our services to each customer’s needs surpassing their expectations.<br><br>We are always next to you, full of new ideas, determination and love because we believe in what we do.',\n 'image' => null,\n 'body_ru' => 'Мы были известны высоким качеством наших изделий ручной работы, инновационными идеями, эффективным сотрудничеством с клиентами по всему миру и возможностью адаптировать наши услуги к потребностям каждого клиента, превосходящим их ожидания. <br><br> Мы всегда рядом с вами, полны новых идей, решительности и любви, потому что мы верим в то, что делаем.',\n 'body_it' => 'Siamo stati rinomati per l\\'alta qualità dei nostri prodotti fatti a mano, le idee innovative, l\\'efficace collaborazione con i clienti in tutto il mondo e la capacità di adattare i nostri servizi alle esigenze di ogni cliente che supera le loro aspettative.<br><br> Siamo sempre accanto a voi, pieno di nuove idee, determinazione e amore perché crediamo in ciò che facciamo.',\n 'title_limit' => null,\n 'body_limit' => 500,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 1,\n 'title' => '',\n 'title_ru' => '',\n 'title_it' => '',\n 'body_ru' => '<span class=colored>Свобода</span>для сопоставления<br>разных материалов и отделок<br>и <span class=colored>ошеломляющий</span>визуал.',\n 'image' => null,\n 'body' => 'The <span class=colored>freedom</span>to to juxtapose<br>different materials, finishes<br>and <span class=colored>stunning</span>visual.',\n 'body_it' => 'La <span class=colored>libertà</span>Per giungere a destra<br>Materiali diversi, finiture<br>e <span class=colored>stunning</span>visivo.',\n 'title_limit' => null,\n 'body_limit' => 150,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 1,\n 'title' => 'Mood',\n 'title_ru' => 'Настроение',\n 'title_it' => 'Umore',\n 'body' => 'Special care is devoted to details, the selection of tissues, and the coordination of color nuances. The collection is inspired by the Renaissance town of Verona, symbol of the classic and highly appreciated Italian style, romantic and elegant at a time.',\n 'body_ru' => 'Особое внимание уделяется деталям, выбору тканей и координации цветовых нюансов. Коллекция вдохновлена эпохой Возрождения Вероны, символом классического и высоко оцененного итальянского стиля, романтического и элегантного за один раз.',\n 'body_it' => 'La cura particolare è dedicata ai dettagli, alla selezione dei tessuti e al coordinamento delle sfumature di colore. La collezione è ispirata alla città rinascimentale di Verona, simbolo del classico stile italiano molto apprezzato, romantico ed elegante alla volta.',\n 'image' => null,\n 'title_limit' => 15,\n 'body_limit' => 300,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 1,\n 'title' => 'Expression',\n 'title_ru' => 'Выражение',\n 'title_it' => 'Espressione',\n 'body' => 'Also in the office area a new concept of space, tailored to your needs, to revive an elegant and refined design that expresses itself in a loving care for details.',\n 'body_ru' => 'Кроме того, в офисе новая концепция пространства, адаптированная к вашим потребностям, оживляет элегантный и изысканный дизайн, который выражает себя в любящей заботе о деталях.',\n 'body_it' => 'Anche nell\\'area dell\\'ufficio un nuovo concetto di spazio, adattato alle vostre esigenze, riesumina un design elegante e raffinato che si esprime in una cura amorosa per i dettagli.',\n 'image' => null,\n 'title_limit' => 12,\n 'body_limit' => 190,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 1,\n 'title' => 'Style',\n 'title_ru' => 'Стиль',\n 'title_it' => 'Stile',\n 'body' => 'In a hand manufacturing that exalt the textures, giving you furniture complements with a unique and timeless charm.\n ',\n 'body_ru' => 'В ручном производстве, которые превозносят текстуры, дают вам комплименты мебели с уникальным и неподвластным времени очарованием.',\n 'body_it' => 'In una produzione a mano che esalta le texture, dandovi complimenti per mobili con un fascino unico e senza tempo.',\n 'image' => null,\n 'title_limit' => 12,\n 'body_limit' => 190,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 1,\n 'title' => 'Quality',\n 'title_ru' => 'Качество',\n 'title_it' => 'Qualità',\n 'body' => 'Also in the office area a new concept of space, tailored to your needs, to revive an elegant and refined design that expresses itself in a loving care for details.\n ',\n 'body_ru' => 'Кроме того, в офисе новая концепция пространства, адаптированная к вашим потребностям, оживляет элегантный и изысканный дизайн, который выражает себя в любящей заботе о деталях.',\n 'body_it' => 'Anche nell\\'area dell\\'ufficio un nuovo concetto di spazio, adattato alle vostre esigenze, riesumina un design elegante e raffinato che si esprime in una cura amorosa per i dettagli.',\n 'image' => null,\n 'title_limit' => 12,\n 'body_limit' => 190,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n /*\n * Contacts PAGE BLOCKS\n */\n [\n 'page_id' => 2,\n 'title' => 'CAVIO Factory & Showroom',\n 'title_ru' => 'CAVIO Фабрики & Посредники',\n 'title_it' => 'CAVIO Factory & Showroom',\n 'body' => 'Viale Europa, 6/a, 37050<br>San Pietro di Morubio (VR)\n Italia<br><br>Telefone: <a href=\"tel:+39 045 71 44 503\" class=tel>+39 045 71 44 503</a><br>Fax:\n <a href=\"tel:+39 045 71 44 277\" class=tel>+39 045 71 44 277</a><br><br><a\n href=mailto:[email protected] class=\"colored_link anim-underline\">[email protected]</a>',\n 'body_ru' => 'Viale Europa, 6/a, 37050<br>San Pietro di Morubio (VR)\n Italia<br><br>Telefone: <a href=\"tel:+39 045 71 44 503\" class=tel>+39 045 71 44 503</a><br>Fax:\n <a href=\"tel:+39 045 71 44 277\" class=tel>+39 045 71 44 277</a><br><br><a\n href=mailto:[email protected] class=\"colored_link anim-underline\">[email protected]</a>',\n 'body_it' => 'Viale Europa, 6/a, 37050<br>San Pietro di Morubio (VR)\n Italia<br><br>Telefone: <a href=\"tel:+39 045 71 44 503\" class=tel>+39 045 71 44 503</a><br>Fax:\n <a href=\"tel:+39 045 71 44 277\" class=tel>+39 045 71 44 277</a><br><br><a\n href=mailto:[email protected] class=\"colored_link anim-underline\">[email protected]</a>',\n 'image' => 'cont-r.jpg',\n 'title_limit' => 26,\n 'body_limit' => 400,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 2,\n 'title' => '',\n 'title_ru' => '',\n 'title_it' => '',\n 'body' => '',\n 'body_ru' => '',\n 'body_it' => '',\n 'image' => 'cont-map.jpg',\n 'title_limit' => null,\n 'body_limit' => null,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 2,\n 'title' => '',\n 'title_ru' => '',\n 'title_it' => '',\n 'body' => '',\n 'body_ru' => '',\n 'body_it' => '',\n 'image' => 'cont-bottom.jpg',\n 'title_limit' => null,\n 'body_limit' => null,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 8,\n 'title' => 'Our philosofy',\n 'title_ru' => 'Наша философия',\n 'title_it' => 'La filosofia',\n 'body' => '<div class=wrap-phil-p><p>Italian furniture showroom CAVIO found its adherents in 38 countries, including Switzerland, France, Sweden, Netherlands, Germany, Australia and the United States.</div><div class=wrap-phil-p><p>In Kiev, the Italian furniture CAVIO presented in several showrooms, conveniently located on the left and right banks.</div><div class=wrap-phil-p><p>Here, professional consultants will help you to implement a holistic complete interior - from the kitchen, bedroom, living room and study to the children\\'s room <a href=# class=link-arrow>→</a></div>',\n 'body_ru' => '<div class=wrap-phil-p><p>Italian furniture showroom CAVIO found its adherents in 38 countries, including Switzerland, France, Sweden, Netherlands, Germany, Australia and the United States.</div><div class=wrap-phil-p><p>In Kiev, the Italian furniture CAVIO presented in several showrooms, conveniently located on the left and right banks.</div><div class=wrap-phil-p><p>Here, professional consultants will help you to implement a holistic complete interior - from the kitchen, bedroom, living room and study to the children\\'s room <a href=# class=link-arrow>→</a></div>',\n 'body_it' => '<div class=wrap-phil-p><p>Italian furniture showroom CAVIO found its adherents in 38 countries, including Switzerland, France, Sweden, Netherlands, Germany, Australia and the United States.</div><div class=wrap-phil-p><p>In Kiev, the Italian furniture CAVIO presented in several showrooms, conveniently located on the left and right banks.</div><div class=wrap-phil-p><p>Here, professional consultants will help you to implement a holistic complete interior - from the kitchen, bedroom, living room and study to the children\\'s room <a href=# class=link-arrow>→</a></div>',\n 'image' => 'phil-image.jpg',\n 'title_limit' => 15,\n 'body_limit' => 810,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 9,\n 'title' => 'Privacy Policy',\n 'title_ru' => 'Политика приватности',\n 'title_it' => 'Politica sulla riservatezza',\n 'body' => '',\n 'body_ru' => '',\n 'body_it' => '',\n 'image' => null,\n 'title_limit' => 30,\n 'body_limit' => null,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n\n /*\n * Showroom page\n */\n\n [\n 'page_id' => 5,\n 'title' => '',\n 'title_ru' => '',\n 'title_it' => '',\n 'body' => '',\n 'body_ru' => '',\n 'body_it' => '',\n 'title_limit' => null,\n 'body_limit' => null,\n 'image' => 'show_r-slide-2.jpg',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 5,\n 'title' => '',\n 'title_ru' => '',\n 'title_it' => '',\n 'body' => '',\n 'body_ru' => '',\n 'body_it' => '',\n 'title_limit' => null,\n 'body_limit' => null,\n 'image' => 'show_r-slide-3.jpg',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 5,\n 'title' => '',\n 'title_ru' => '',\n 'title_it' => '',\n 'body' => '',\n 'body_ru' => '',\n 'body_it' => '',\n 'title_limit' => null,\n 'body_limit' => null,\n 'image' => 'show_r-slide-1.jpg',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 5,\n 'title' => '',\n 'title_ru' => '',\n 'title_it' => '',\n 'body' => 'Don’t found showroom<br>near you? <span class=colored>Contact main</span><br>',\n 'body_ru' => 'Не нашли салон рядом<br>с вами? <span class=colored>Обратитесь в главный</span><br>',\n 'body_it' => 'Non ho trovato lo showroom<br>vicino a te? <span class=colored>Contatto principale</span><br>',\n 'image' => null,\n 'title_limit' => null,\n 'body_limit' => 100,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 5,\n 'title' => 'Main Showroom',\n 'title_ru' => 'Главный магазин',\n 'title_it' => 'Showroom principale',\n 'body' => 'Viale Europa, 6/a, 37050<br>San Pietro di Morubio (VR) Italia<br><br>Telefone: <a href=tel:+390457144503 class=tel>+39 045 71 44 503</a><br>Fax: <a href=tel:+390457144277 class=tel>+39 045 71 44 277</a><br><br><a href=mailto:[email protected] class=\"colored_link anim-underline\">[email protected]</a>',\n 'body_ru' => 'Viale Europa, 6/a, 37050<br>San Pietro di Morubio (VR) Italia<br><br>Telefone: <a href=tel:+390457144503 class=tel>+39 045 71 44 503</a><br>Fax: <a href=tel:+390457144277 class=tel>+39 045 71 44 277</a><br><br><a href=mailto:[email protected] class=\"colored_link anim-underline\">[email protected]</a>',\n 'body_it' => 'Viale Europa, 6/a, 37050<br>San Pietro di Morubio (VR) Italia<br><br>Telefone: <a href=tel:+390457144503 class=tel>+39 045 71 44 503</a><br>Fax: <a href=tel:+390457144277 class=tel>+39 045 71 44 277</a><br><br><a href=mailto:[email protected] class=\"colored_link anim-underline\">[email protected]</a>',\n 'image' => 'main-showroom.jpg',\n 'title_limit' => null,\n 'body_limit' => 320,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n\n\n ];\n\n DB::table('blocks')->insert($blocks);\n\n\n $this->enableForeignKeys();\n }",
"function render( $block_data )\n\t{\n\t\treturn \"<\".$block_data['header_type'].\">\".$block_data['h_content'].\"</\".$block_data['header_type'].\">\";\n\t}",
"function ajarRenderDinamycBlock($attributes, $content) {\n return '<h1 class=\"my-3\">'.$attributes['content'].'</h1>'.\n '<img src=\"'.$attributes['mediaURL'].'\" alt=\"'.$attributes['mediaAlt'].'\" />'.\n '<hr>';\n}",
"function __construct($comment=\"\", $associatedCode=\"\", $blockType=\"\") {\n\t\t\n\t\tif (!$comment && !$associatedCode && !$blockType) return;\n\t\t\n\t\t// Figure out indent (for later output)\n\t\tif ( preg_match('@^([\\t\\040]*).*$@', $associatedCode, $matches) ) {\n\t\t\t$this->indent = $matches[1];\n\t\t}\n\t\t\n\t\t// Save tokens\n\t\t$this->comment = trim($comment);\n\t\t$this->associatedCode = $associatedCode;\n\t\t$this->associatedHlCode = @str_ireplace(\"<?php \",\"\",@highlight_string(\"<?php \".trim($this->associatedCode),true));\n\t\t$this->type = $blockType;\n\t\t\n\t\t// What's the source?\n\t\t$source = $comment; // element 1 is the token source\n\t\t\n\t\t$source = trim($source);\n\t\t$source = str_replace(\"/**\",\"\",$source);\n\t\t$source = str_replace(\"*/\",\"\",$source);\n\t\t$lines = explode(\"\\n\", $source);\n\t\t$source = array();\n\t\tforeach($lines as $line) {\n\t\t\t$line = trim($line);\n\t\t\t$line = str_replace(\"\\r\", \"\", $line);\n\t\t\t// If the line doesn't start by *, we aren't interested\n\t\t\tif (substr($line,0,1) == \"*\" ) $source[] = trim(substr($line,1));\n\t\t}\n\t\tif (!count($source)) return false;\n\t\t \n\t\t// Short description?\n\t\tif (substr($source[0],0,1) != \"@\") {\n\t\t\t$this->shortDescription = $source[0];\n\t\t}\n\t\t \n\t\t// Long description?\n\t\tfor($i=1; $i<count($source); $i++) {\n\t\t\tif (substr($source[$i],0,1) == \"@\") break;\n\t\t\t$this->longDescription .= $source[$i].\"\\n\";\n\t\t}\n\t\t$this->longDescription = trim($this->longDescription);\n\t\t \n\t\t// Tags?\n\t\t$this->tags = array();\n\t\tfor($i=count($source)-1; $i>=0; $i--) {\n\t\t\tif (trim($source[$i]) == \"\") continue;\n\t\t\tif (substr($source[$i],0,1) != \"@\") break;\n\t\t\t$this->tags[] = $source[$i];\n\t\t}\n\t\t$this->tags = array_reverse($this->tags);\n\t\t$this->tags = implode(PHP_EOL,$this->tags);\n\t\t \n\t\t// There needs to be at least a short description, or a long description, or a tags section for the block to be valid\n\t\tif ($this->shortDescription || $this->longDescription || $this->tags) $this->valid = true;\n\t\t\n\t\t// Convert to UTF8\n\t\t$this->shortDescription = !isUtf8($this->shortDescription) ? utf8_encode($this->shortDescription) : $this->shortDescription;\n\t\t$this->longDescription = !isUtf8($this->longDescription) ? utf8_encode($this->longDescription) : $this->longDescription;\n\t\t$this->tags = !isUtf8($this->tags) ? utf8_encode($this->tags) : $this->tags;\n\t\t\n\t\treturn $this->valid;\n\t}",
"public function getSubBlocks();",
"function processBeginBlockCmd ($parms, $cmdTPosBegin, $cmdTPosEnd) {\n $p = 0;\n if (!$this->parseWord($parms,$p,$blockName)) {\n $this->triggerError (\"Missing block name in \\$BeginBlock command in template at offset $cmdTPosBegin.\");\n return false; }\n if (trim(substr($parms,$p)) != '') {\n $this->triggerError (\"Extra parameter in \\$BeginBlock command in template at offset $cmdTPosBegin.\");\n return false; }\n $this->registerBlock ($blockName, $blockNo);\n $btr =& $this->blockTab[$blockNo];\n $btr['tPosBegin'] = $cmdTPosBegin;\n $btr['tPosContentsBegin'] = $cmdTPosEnd;\n $btr['nestingLevel'] = $this->currentNestingLevel;\n $btr['parentBlockNo'] = $this->openBlocksTab[$this->currentNestingLevel-1];\n $this->openBlocksTab[$this->currentNestingLevel] = $blockNo;\n $this->currentNestingLevel += 1;\n if ($this->currentNestingLevel > $this->maxNestingLevel) {\n $trhis->triggerError (\"Block nesting overflow in template at offset $cmdTPosBegin.\");\n return false; }\n return true; }",
"function event_details_cpt_single_blocks( $blocks ) {\n // Add new blocks with custom function output\n // Below is an example with an anonymous function but you can use custom functions as well ;)\n $blocks['custom_block'] = function() {\n\n echo '';\n\n };\n\n // Remove these content blocks\n unset( $blocks['comments'] );\n\t unset( $blocks['meta'] );\n\t unset( $blocks['title'] );\n\t unset( $blocks['media'] );\n\t\n // Return blocks\n return $blocks;\n\n}",
"public function getMainHeading() : string\n {\n return <<< 'MAINHEADING'\nAdvanced Collections in C#\nMAINHEADING;\n }",
"function register_understrap_gutenberg_blocks() {\n\n // Register our block script with WordPress\n wp_enqueue_script(\n 'understrap-blocks',\n plugins_url('/blocks/dist/blocks.build.js', __FILE__),\n array('wp-blocks', 'wp-edit-post')\n );\n \n // Register our block's editor-specific CSS\n wp_enqueue_style(\n 'gutenberg-card-block-edit-style',\n plugins_url('/blocks/dist/blocks.editor.build.css', __FILE__),\n array( 'wp-edit-blocks' )\n );\n\n // Register our block's webfonts\n/* wp_enqueue_style(\n 'gutenberg-card-block-font-style',\n 'https://fonts.googleapis.com/css?family=Karla:400,700',\n array( 'wp-edit-blocks' )\n );\n*/\n\n}",
"public function getPopup() { \n if($this->blocks) {\n return $this->desc . \"<BR /> <BR />\" . \n \"<b>Blocks\" . \n ($this->charges > 0 ? \" \" . $this->charges . \" more\" : \"\") .\n ($this->blockActionTypes != \"all\" ? $this->blockActionTypes : \"\") . \" actions\" . \n ($this->blockChance < 1 ? \" with a chance of \" . floor($this->blockChance * 100) . \"%\" : \"\") . \n ($this->turns > 0 ? \" within the next \" . $this->turns . \" rounds\" : \"\") .\n \".\";\n }\n return $this->desc;\n }",
"public function intro(){\n\t\t$html = \"\";\n\t\t$html.= '\n\t\t<div class=\"row description\">\n\t\t\t<div class=\"small-12 large-12 columns\">\n\t\t\t\t\t<h1>Actualites</h1>\n\t\t\t\t<hr/>\n\t\t\t</div>\n\t\t\t<div class=\"small-8 large-8 columns\">\n\t\t\t\t<div class=\"center\">\n\t\t\t\t\t<h2>Qu\\'est ce qui ce trame en Altraya ?</h2>\n\t\t\t\t</div>\n\t\t\t\t<hr/>\n\t\t\t\t<p>- Ajout d\\'une fonctionnalité d\\'élevage : la reproduction</p>\n\t\t\t</div>\n\t\t\t<div class=\"small-4 large-4 columns\">\n\t\t\t\t<a class=\"twitter-timeline\" href=\"https://twitter.com/Karakayne\" data-widget-id=\"579726233640005632\">Tweets de @Karakayne</a>\n\t\t\t\n\t\t\t\t<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?\\'http\\':\\'https\\';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+\"://platform.twitter.com/widgets.js\";fjs.parentNode.insertBefore(js,fjs);}}(document,\"script\",\"twitter-wjs\");</script>\n\t\t\t\n\t\t\t</div>\n\t\t</div>\n\t\t';\n\n\t\techo($html);\n\t}",
"function SimpleBlock($page, $label = \"\") {\n // superclass constructor\n $this->Block($page, $label);\n\n $this->components = array();\n $this->dividers = array();\n $this->dividerIndexes = array();\n }",
"public function createBlock($type) {\n $this->completeNode();\n $this->current->appendNode($type);\n }",
"public function createTokens() {\n\n\t\t$openCodeBlock = false; // boolean flag for code block\n\t\t$skipNext = false; // skip next character\n\t\t$openCommentBlock = false; // boolean flag for comments \n\n\n\t\t// string length\n\t\t$strlen = strlen($this->html);\n\t\t// current block contents\n\t\t$block = \"\";\n\n\t\tfor( $i = 0; $i <= $strlen; $i++ ) {\n\n\t\t\t// get current char and next char\n\t\t\t$char = substr( $this->html, $i, 1);\n\t\t\t$nextchar = ($strlen >= $i) ? substr( $this->html, $i+1, 1) : \"\";\n\n\t\t\t// Code to skip next char.\n\t\t\tif ($skipNext) {\n\t\t\t\t$skipNext = false;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t//Open code block\n\t\t\tif (!$openCodeBlock \n\t\t\t\t&& !$openCommentBlock\n\t\t\t\t&& $char == \"{\" \n\t\t\t\t&& $nextchar == \"{\") {\n\t\t\t\t$skipNext = true;\n\t\t\t\t$openCodeBlock = true;\n\t\t\t\t$this->createToken(\"HTML\", $block);\n\t\t\t\t$block = \"\";\n\t\t\t} else if ($openCodeBlock \n\t\t\t\t&& !$openCommentBlock\n\t\t\t\t&& $char == \"}\" \n\t\t\t\t&& $nextchar == \"}\") {\n\t\t\t\t$skipNext = true;\n\t\t\t\t$openCodeBlock = false;\n\t\t\t\t$this->doToken($block);\n\t\t\t\t$block = \"\";\n\t\t\t} else if (!$openCodeBlock \n\t\t\t&& !$openCommentBlock \n\t\t\t&& $char == \"{\" \n\t\t\t&& $nextchar == \"#\") { //Open comment block\n\t\t\t\t$skipNext = true;\n\t\t\t\t$openCommentBlock = true;\n\t\t\t} else if ($openCommentBlock \n\t\t\t&& $char == \"#\" \n\t\t\t&& $nextchar == \"}\") { //Close comment block\n\t\t\t\t$skipNext = true;\n\t\t\t\t$openCommentBlock = false;\n\t\t\t} else if (!$openCodeBlock && !$openCommentBlock) {\n\t\t\t\t$block .= $char;\n\t\t\t} else if ($openCodeBlock && !$openCommentBlock) {\n\t\t\t\t$block .= $char;\n\t\t\t}\n\n\t\t}\n\n\t\t// Create last block\n\t\t$this->createToken(\"html\", $block);\n\t\t$block = \"\";\n\n\t}",
"public static function createCMSBlockTable()\n\t{\n\t}",
"function phpblock($text) {\n $this->php($text, 'pre');\n }",
"protected function _outputBlocks()\n {\n $blocks = func_get_args();\n $output = $this->getLayout()->createBlock('adminhtml/text_list');\n foreach ($blocks as $block) {\n $output->insert($block, '', true);\n }\n $this->getResponse()->setBody($output->toHtml());\n }",
"function finalize()\n {\n\n // get parent's output\n parent::finalize();\n $output = parent::getOutput();\n\n $bb_output = '';\n\n $color_start = $this->_tag_brackets['start'] . $this->_bb_tags['color'] . '=%s' . $this->_tag_brackets['end'];\n $color_end = $this->_tag_brackets['start'] . '/' . $this->_bb_tags['color'] . $this->_tag_brackets['end'];\n\n // loop through each class=>content pair\n foreach ($output AS $token) {\n\n if ($this->_enumerated) {\n $class = $token[0];\n $content = $token[1];\n } else {\n $key = key($token);\n $class = $key;\n $content = $token[$key];\n }\n\n $iswhitespace = ctype_space($content);\n if (!$iswhitespace && !empty($this->_colors[$class])) {\n $bb_output .= sprintf($color_start, $this->_colors[$class]);\n $bb_output .= $content;\n $bb_output .= $color_end;\n } else {\n $bb_output .= $content;\n }\n }\n\n if ($this->_numbers) {\n\n $item_tag = $this->_tag_brackets['start'] .\n $this->_bb_tags['list_item'] .\n $this->_tag_brackets['end'];\n $this->_output = $item_tag . str_replace(\"\\n\", \"\\n\". $item_tag .' ', $bb_output);\n $this->_output = $this->_tag_brackets['start'] .\n $this->_bb_tags['list'] .\n $this->_tag_brackets['end'] .\n $this->_output .\n $this->_tag_brackets['start'] .\n '/'.\n $this->_bb_tags['list'] .\n $this->_tag_brackets['end']\n ;\n } else {\n $this->_output = $this->_tag_brackets['start'] .\n $this->_bb_tags['code'] .\n $this->_tag_brackets['end'] .\n $bb_output .\n $this->_tag_brackets['start'] .\n '/' .\n $this->_bb_tags['code'] .\n $this->_tag_brackets['end'];\n }\n }",
"public static function getHelpBlock($text)\n {\n return \"<p class=\\\"help-block\\\">{$text}</p>\";\n }",
"public function _initializeBlock()\n\t{\n\t\tparent::_initializeBlock();\n\t}",
"function render_block_core_template_part($attributes)\n {\n }",
"function tammuz_block_info() {\r\n\t$blocks = array();\r\n\t\r\n\r\n\t$blocks['add_journey'] = array(\r\n\t\t// The name that will appear in the block list.\r\n\t\t'info' => t('Add a journey to the customer'),\r\n\t\t// Default setting.\r\n\t\t'cache' => DRUPAL_CACHE_PER_ROLE,\r\n\t);\r\n\treturn $blocks;\r\n}",
"function generate_block_asset_handle($block_name, $field_name, $index = 0)\n {\n }",
"public function get_description()\n {\n return 'Apply syntax highlighting to a block of coding which is pasted inside the Comcode [tt]code[/tt] tag as follows:\n\n[code=\"Comcode\"][codebox=\"language\"]the code goes here[/codebox][/code]\n\nBased off of [url=\"https://github.com/GeSHi/geshi-1.0\"]GeSHI 1.0[/url]. GeSHI 1.1 is still under active development at the time of writing, missing many highlighters present in 1.0.\n';\n }",
"public function sectionBegin() {}",
"public function sectionBegin() {}",
"function date_tools_wizard_create_blocks($type_name) {\n $current_theme = variable_get('theme_default', 'garland');\n \n // Legend block.\n $block = new stdClass();\n $block->theme = $current_theme;\n $block->status = 1;\n $block->weight = -1;\n $block->region = 'left';\n $block->title = '';\n $block->module = 'calendar';\n $block->delta = 0;\n date_tools_wizard_add_block($block);\n \n // Mini calendar block. \n $block->module = 'views';\n $block->delta = 'calendar_'. $type_name .'-calendar_block_1';\n date_tools_wizard_add_block($block); \n \n // Upcoming events block.\n $block->module = 'views';\n $block->delta = 'calendar_'. $type_name .'-block_1';\n date_tools_wizard_add_block($block);\n return; \n}",
"function block_textformat($params, $content, $template, &$repeat)\n{\n if (is_null($content)) {\n return;\n }\n if ($_MBSTRING) {\n $template->_checkPlugins(\n array(\n array(\n 'function' => 'modifier_mb_wordwrap',\n 'file' => PLUGINS_DIR . 'modifier.mb_wordwrap.php'\n )\n )\n );\n }\n $style = null;\n $indent = 0;\n $indent_first = 0;\n $indent_char = ' ';\n $wrap = 80;\n $wrap_char = \"\\n\";\n $wrap_cut = false;\n $assign = null;\n foreach ($params as $_key => $_val) {\n switch ($_key) {\n case 'style':\n case 'indent_char':\n case 'wrap_char':\n case 'assign':\n $$_key = (string)$_val;\n break;\n case 'indent':\n case 'indent_first':\n case 'wrap':\n $$_key = (int)$_val;\n break;\n case 'wrap_cut':\n $$_key = (bool)$_val;\n break;\n default:\n trigger_error(\"textformat: unknown attribute '{$_key}'\");\n }\n }\n if ($style === 'email') {\n $wrap = 72;\n }\n // split into paragraphs\n $_paragraphs = preg_split('![\\r\\n]{2}!', $content);\n foreach ($_paragraphs as &$_paragraph) {\n if (!$_paragraph) {\n continue;\n }\n // convert mult. spaces & special chars to single space\n $_paragraph =\n preg_replace(\n array(\n '!\\s+!' . $_UTF8_MODIFIER,\n '!(^\\s+)|(\\s+$)!' . $_UTF8_MODIFIER\n ),\n array(\n ' ',\n ''\n ),\n $_paragraph\n );\n // indent first line\n if ($indent_first > 0) {\n $_paragraph = str_repeat($indent_char, $indent_first) . $_paragraph;\n }\n // wordwrap sentences\n if ($_MBSTRING) {\n $_paragraph = modifier_mb_wordwrap($_paragraph, $wrap - $indent, $wrap_char, $wrap_cut);\n } else {\n $_paragraph = wordwrap($_paragraph, $wrap - $indent, $wrap_char, $wrap_cut);\n }\n // indent lines\n if ($indent > 0) {\n $_paragraph = preg_replace('!^!m', str_repeat($indent_char, $indent), $_paragraph);\n }\n }\n $_output = implode($wrap_char . $wrap_char, $_paragraphs);\n if ($assign) {\n $template->assign($assign, $_output);\n } else {\n return $_output;\n }\n}",
"function get_dynamic_block_names()\n {\n }",
"public function generateDocblock();",
"public function block(string $name): string\n {\n if (array_key_exists($name, $this->blocks)) {\n return join(\"\", $this->blocks[$name]);\n }\n\n return \"\";\n }",
"public function addTextBlocks($title, $description){\n\n global $mysqli;\n if (!$sql = $mysqli->real_query(\"INSERT INTO text_blocks(title, description) VALUES ('$title', '$description')\"))\n {\n echo \"CALL failed: (\" . $mysqli->errno . \") \" . $mysqli->error;\n }\n return $sql;\n\n }",
"function page_render_block($block) {\n static $xtpl_block;\n \n if (!$xtpl_block) $xtpl_block = new XTemplate('html/block.xtpl');\n \n $xtpl_block->reset('block');\n $xtpl_block->assign('id', $block['id']);\n $xtpl_block->assign('title', $block['title']);\n $xtpl_block->assign('content', $block['content']);\n \n if (isset($block['links'])) {\n $xtpl_block->assign('links', $block['links']);\n $xtpl_block->parse('block.links');\n }\n \n $xtpl_block->parse('block');\n return $xtpl_block->text('block');\n}",
"public function writeScriptBlocks() {\n $scriptblock = '';\n //Get Shared content\n \n // options voor iedere graph\n foreach ($this->graphs as $graph){\n $scriptblock .= $graph->getOptionScript();\n }\n // plots & keybinds (AJAX)\n foreach ($this->graphs as $graph){\n $scriptblock .= $graph->getDataScript();\n $scriptblock .= $graph->getPlotScript();\n $scriptblock .= $graph->getBindScripts();\n }\n \n //Add shared section. Needs a graph to funciton\n //$scriptblock .= $this->getSharedBlock();\n \n return $scriptblock;\n }",
"public function render()\n {\n $this->output->writeln('');\n\n $lineLength = $this->getTerminalWidth();\n\n $lines = explode(PHP_EOL, wordwrap($this->message, $lineLength - (strlen($this->blockStyles[$this->style]['prefix']) + 3), PHP_EOL, true));\n array_unshift($lines, ' ');\n array_push($lines, ' ');\n\n foreach ($lines as $i => $line) {\n $prefix = str_repeat(' ', strlen($this->blockStyles[$this->style]['prefix']));\n if ($i === 1) {\n $prefix = $this->blockStyles[$this->style]['prefix'];\n }\n\n $line = sprintf(' %s %s', $prefix, $line);\n $this->output->writeln(sprintf('<%s>%s%s</>', $this->blockStyles[$this->style]['style'], $line, str_repeat(' ', $lineLength - Helper::strlenWithoutDecoration($this->output->getFormatter(), $line))));\n }\n\n $this->output->writeln('');\n }",
"function block_background($code, $class)\n\n{\n\n return '<span class=\"'.$class.'\">'.$code.'</span>';\n\n \n\n // oddly - browsers seem to have issues with the following, and copy+paste...\n\n /*\n\n $pre = '<span class=\"'.$class.'\">';\n\n $s = strpos($code, \"\\n\");\n\n if($s === false) return $pre.$code.'</span>';\n\n $e = strrpos($code, \"\\n\");\n\n if($s == $e) return $pre.$code.'</span>';\n\n \n\n // okay, so we have two distinct newlines - do appropriate wrapping\n\n if($s == 0)\n\n $startbit = '';\n\n else\n\n $startbit = $pre.substr($code, 0, $s).'</span>';\n\n if($e == strlen($code)-1)\n\n $endbit = '';\n\n else\n\n $endbit = $pre.substr($code, $e).'</span>';\n\n \n\n return $startbit.'<div class=\"'.$class.'\">'.substr($code, $s+1, $e-$s-1).'</div>'.$endbit;\n\n */\n\n}",
"protected function output_intro(): void {\r\n ?>\r\n <h2><?php echo $this->page_title(); ?></h2>\r\n <div class=\"<?php echo self::cl_intro; ?>\"><p><ol>\r\n <li>For each generated page, pick an existing WordPress page to be\r\n overwritten with the generated content, and a schedule for automatic generation.</li>\r\n <li>You can also generate a page immediately. You'll see a confirmation message when it finishes.</li>\r\n <li>WordPress scheduled actions are not always exactly on time, especially during low-traffic periods.</li>\r\n <li>If the content doesn't change after generation, a new revision will not be created.</li>\r\n </ol></p></div>\r\n <?php\r\n }",
"private function generate()\n {\n $output = '';\n $length = strlen($this->str);\n\n\n for ($i = 1; $i < 5; $i++) {\n // get random char\n $char = $this->str[rand(0, $length - 1)];\n $output .= $char;\n\n // get font size\n $fontSize = ($this->level > 1) ? rand(20, 48) : 28;\n imagettftext($this->imageResource, $fontSize, rand(-35, 35), 35 * $i, 55, imagecolorallocate($this->imageResource, rand(0, 240), rand(0, 240), rand(0, 240)), $this->font, $char);\n }\n\n $this->code = ($this->caseSensitive) ? $output : strtolower($output);\n }",
"function nbabanner_block_view($delta = '')\n{\n $block = array();\n \n switch($delta) {\n case 'nbabanner_block': \n $block['subject'] = t('NBA Banners: Block');\n $block['content'] = array(\n 'container' => array(\n '#type' => 'fieldset',\n '#title' => 'NBA Banners: Block',\n '#attributes' => array(\n 'class' => array(\n 'nbabanners'\n )\n )\n )\n );\n \n foreach (_nbabanner_get_banners((variable_get('nbabanner_randomise', 0) == '1')) as $index => $banner) {\n $term = taxonomy_term_view($banner);\n $block['content']['container']['nbabanner' . $index] = array(\n '#markup' => render($term)\n );\n }\n \n \n $block['content']['#attached']['css'][] = drupal_get_path(\n 'module',\n 'nbabanner'\n ) . '/vendor/flickity.css';\n $block['content']['#attached']['css'][] = drupal_get_path(\n 'module',\n 'nbabanner'\n ) . '/css/nbabanner.css';\n \n $block['content']['#attached']['js'][] = drupal_get_path(\n 'module',\n 'nbabanner'\n ) . '/vendor/flickity.js';\n $block['content']['#attached']['js'][] = array(\n 'data' => array(\n 'nbabanner' => array(\n 'autoplay' => variable_get('nbabanner_autoplay', 0),\n 'autoplay_duration' => (float) variable_get('nbabanner_autoplay_duration', 5000)\n )\n ),\n 'type' => 'setting'\n );\n $block['content']['#attached']['js'][] = drupal_get_path(\n 'module',\n 'nbabanner'\n ) . '/js/nbabanner.js';\n \n break;\n }\n \n return $block;\n}",
"function blockToHuman($block){\n if (strlen($block) != 1 && strlen($block) != 2) {\n return \"BtH Error\";\n }\n\n $block_base = substr($block, 0, 1);\n if (strlen($block) == 1) {\n $block_half = null;\n }else {\n $block_half = substr($block, 1, 1);\n }\n\n if ($block_half) {\n if ($block_half == 1) {\n return \"Block $block_base first half\";\n }else{\n return \"Block $block_base second half\";\n }\n }else {\n return \"Block $block_base\";\n }\n}",
"function felix_block_names() {\n \n $blocks = array(\n 'disabled' => __( 'Disabled', 'felix-landing-page' ),\n 'header' => __( 'Header', 'felix-landing-page' ),\n 'jumbotron' => __( 'Hero', 'felix-landing-page' ),\n 'navbar' => __( 'Navigation Bar', 'felix-landing-page' ),\n 'products' => __( 'Featured Products', 'felix-landing-page' ),\n 'content' => __( 'Content', 'felix-landing-page' ),\n 'articles' => __( 'Featured Articles', 'felix-landing-page' ),\n 'footer' => __( 'Footer' )\n );\n \n return $blocks;\n \n}",
"public function WriteFlowingBlock( $s ) {\r\n\t\t// Ancho de todo el contenido hasta ahora en los puntos\r\n\t\t$contentWidth =& $this->flowingBlockAttr[ 'contentWidth' ];\r\n\t\t\r\n\t\t// Ancho maximo de la celda\r\n\t\t$maxWidth =& $this->flowingBlockAttr[ 'width' ];\r\n\t\t\r\n\t\t$lineCount =& $this->flowingBlockAttr[ 'lineCount' ];\r\n\t\t\r\n\t\t$lineHeight =& $this->flowingBlockAttr[ 'height' ];\r\n\t\t\r\n\t\t$border =& $this->flowingBlockAttr[ 'border' ];\r\n\t\t$align =& $this->flowingBlockAttr[ 'align' ];\r\n\t\t$fill =& $this->flowingBlockAttr[ 'fill' ];\r\n\t\t\r\n\t\t$content =& $this->flowingBlockAttr[ 'content' ];\r\n\t\t$font =& $this->flowingBlockAttr[ 'font' ];\r\n\t\t\r\n\t\t$font[] = $this->saveFont();\r\n\t\t$content[] = '';\r\n\t\t\r\n\t\t$currContent =& $content[ count( $content ) - 1 ];\r\n\t\t\r\n\t\t// Corte de la Linea si es que se justifica\r\n\t\t$cutoffWidth = $contentWidth;\r\n\t\t\r\n\t\t// Para cada carácter en la cadena\r\n\t\tfor ( $i = 0; $i < strlen( $s ); $i++ ) {\r\n\t\t\t// Extraer el carácter actual\r\n\t\t\t$c = $s[ $i ];\r\n\t\t\t\r\n\t\t\t// Obtener el ancho del carácter en los puntos\r\n\t\t\t$cw = $this->CurrentFont[ 'cw' ][ $c ] * ( $this->FontSizePt / 1000 );\r\n\t\t\t\r\n\t\t\tif ( $c == ' ' ) {\r\n\t\t\t\t$currContent .= ' ';\r\n\t\t\t\t$cutoffWidth = $contentWidth;\r\n\t\t\t\t$contentWidth += $cw;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Intentar añadir otra palabra\r\n\t\t\tif ( $contentWidth + $cw > $maxWidth ) {\r\n\t\t\t\t$lineCount++;\r\n\t\t\t\t\r\n\t\t\t\t// Contiene todo el contenido que no lo hacen en esta impresión\r\n\t\t\t\t$savedContent = '';\r\n\t\t\t\t$savedFont = array();\r\n\t\t\t\t\r\n\t\t\t\t// En primer lugar, cortamos y guardamos cualquier palabras parciales al final de la cadena\r\n\t\t\t\t$words = explode( ' ', $currContent );\r\n\t\t\t\t\r\n\t\t\t\t// Si parece que no terminó ninguna de las palabras de este trozo\r\n\t\t\t\tif ( count( $words ) == 1 ) {\r\n\t\t\t\t\t// Ahorrar y recortar los contenidos actualmente en la pila\r\n\t\t\t\t\t$savedContent = array_pop( $content );\r\n\t\t\t\t\t$savedFont = array_pop( $font );\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Recortar los espacios finales de la última parte del contenido\r\n\t\t\t\t\t$currContent =& $content[ count( $content ) - 1 ];\r\n\t\t\t\t\t$currContent = rtrim( $currContent );\r\n\t\t\t\t\t\r\n\t\t\t\t// De lo contrario, tenemos que encontrar algo que cortar\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$lastContent = '';\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor ( $w = 0; $w < count( $words ) - 1; $w++) {\r\n\t\t\t\t\t\t$lastContent .= \"{$words[ $w ]} \";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t$savedContent = $words[ count( $words ) - 1 ];\r\n\t\t\t\t\t$savedFont = $this->saveFont();\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Reemplazamos el contenido actual con la version procesada\r\n\t\t\t\t\t$currContent = rtrim( $lastContent );\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// Actualizamos $contentWidth y $cutoffWidth\r\n\t\t\t\t$contentWidth = 0;\r\n\t\t\t\t\r\n\t\t\t\tforeach ( $content as $k => $chunk ) {\r\n\t\t\t\t\t$this->restoreFont( $font[ $k ] );\r\n\t\t\t\t\t$contentWidth += $this->GetStringWidth( $chunk ) * $this->k;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$cutoffWidth = $contentWidth;\r\n\t\t\t\t\r\n\t\t\t\t// Si la Alineacion es Justificada, buscamos los espacios en el Texto\r\n\t\t\t\tif( $align == 'J' ) {\r\n\t\t\t\t\t// Contamos cuantos espacios hay en el Texto\r\n\t\t\t\t\t$numSpaces = 0;\r\n\t\t\t\t\t\r\n\t\t\t\t\tforeach ( $content as $chunk ) {\r\n\t\t\t\t\t\t$numSpaces += substr_count( $chunk, ' ' );\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Si hay mas de un Espacio, buscamos palabras espaciadas en Puntos\r\n\t\t\t\t\tif ( $numSpaces > 0 ) {\r\n\t\t\t\t\t\t$this->ws = ( $maxWidth - $cutoffWidth ) / $numSpaces;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$this->ws = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$this->_out( sprintf( '%.3F Tw', $this->ws ) );\r\n\t\t\t\t\t\r\n\t\t\t\t// Ademas, necesitamso los espacios normales\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->_out( sprintf( '%.3F Tw', 0 ) );\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// Imprimimos cada Salida\r\n\t\t\t\t$usedWidth = 0;\r\n\t\t\t\t\r\n\t\t\t\tforeach ( $content as $k => $chunk ) {\r\n\t\t\t\t\t$this->restoreFont( $font[ $k ] );\r\n\t\t\t\t\t\r\n\t\t\t\t\t$stringWidth = $this->GetStringWidth( $chunk ) + ( $this->ws * substr_count( $chunk, ' ' ) / $this->k );\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Determina cual borde debe ser usado\r\n\t\t\t\t\t$b = '';\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ( $lineCount == 1 && is_int( strpos( $border, 'T' ) ) ) {\r\n\t\t\t\t\t\t$b .= 'T';\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( $k == 0 && is_int( strpos( $border, 'L' ) ) ) {\r\n\t\t\t\t\t\t$b .= 'L';\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( $k == count( $content ) - 1 && is_int( strpos( $border, 'R' ) ) ) {\r\n\t\t\t\t\t\t$b .= 'R';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Si este ultimo texto completa la linea, entonces salta a la Siguiente\r\n\t\t\t\t\tif ( $k == count( $content ) - 1 ) {\r\n\t\t\t\t\t\t$this->Cell( ( $maxWidth / $this->k ) - $usedWidth + 2 * $this->cMargin, $lineHeight, $chunk, $b, 1, $align, $fill );\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$this->Cell( $stringWidth + 2 * $this->cMargin, $lineHeight, $chunk, $b, 0, $align, $fill );\r\n\t\t\t\t\t\t$this->x -= 2 * $this->cMargin;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$usedWidth += $stringWidth;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// Se mueve a la siguiente Linea, Reinicia las variables, Salva el contenido y Actualiza el Texto\r\n\t\t\t\t$this->restoreFont( $savedFont );\r\n\t\t\t\t\r\n\t\t\t\t$font \t\t\t= array( $savedFont );\r\n\t\t\t\t$content \t\t= array( $savedContent . $s[ $i ] );\r\n\t\t\t\t\r\n\t\t\t\t$currContent \t=& $content[ 0 ];\r\n\t\t\t\t\r\n\t\t\t\t$contentWidth \t= $this->GetStringWidth( $currContent ) * $this->k;\r\n\t\t\t\t$cutoffWidth \t= $contentWidth;\r\n\t\t\t\t\r\n\t\t\t// Este caracter se ajusta, entonces se añade\r\n\t\t\t} else {\r\n\t\t\t\t$contentWidth += $cw;\r\n\t\t\t\t$currContent .= $s[ $i ];\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public function render()\n {\n // section 10-10--91-60-7f09995f:12e75e0bc39:-8000:0000000000000874 begin\n // section 10-10--91-60-7f09995f:12e75e0bc39:-8000:0000000000000874 end\n }",
"public function getBlockTypeDescription()\n {\n return t(\"Select Pages and Do stuff with them.\");\n }",
"function code_block_shortcode_init($atts, $content = null) {\n $stripped_content = remove_empty_p_tags($content);\n $return_string = '<pre>'.$stripped_content.'</pre>';\n return $return_string;\n}",
"function render_block_core_post_title($attributes, $content, $block)\n {\n }",
"function blocks_print_adminblock($page, $missingblocks) {\n global $USER;\n\n $strblocks = get_string('blocks');\n $stradd = get_string('add');\n if (!empty($missingblocks)) {\n foreach ($missingblocks as $blockid) {\n $block = blocks_get_record($blockid);\n\n switch($page->type) {\n case MOODLE_PAGE_COURSE:\n $course = get_record('course', 'id', $page->id);\n break;\n default: die('unknown pagetype: '. $page->type);\n }\n\n $blockobject = block_instance($block->name);\n if ($blockobject === false) {\n continue;\n }\n $menu[$block->id] = $blockobject->get_title();\n }\n\n if($page->id == SITEID) {\n $target = 'index.php';\n }\n else {\n $target = 'view.php';\n }\n $content = popup_form($target .'?id='. $course->id .'&sesskey='. $USER->sesskey .'&blockaction=add&blockid=',\n $menu, 'add_block', '', $stradd .'...', '', '', true);\n $content = '<div align=\"center\">'. $content .'</div>';\n print_side_block($strblocks, $content, NULL, NULL, NULL);\n }\n}",
"private function term_block_note() {\n\n $text = '';\n $len = 0;\n $raw = '';\n\n $prefix = $this->term['note_prefix'];\n $lines = $this->_lines;\n $line = trim($lines->cur());\n $done = false;\n $note = false;\n\n // allow for spaces before the note indicator (some may prefer an indented syntax...)\n if ($line == $prefix) {\n $lines->test();\n $raw = $line;\n do {\n $line = $lines->move()->cur();\n if (trim($line) == $prefix) {\n $raw .= \"\\n\" . $prefix;\n $done = true;\n $lines->move();\n } else {\n $text .= (empty($text)) ? $line : \"\\n\" . $line;\n $raw .= \"\\n\" . $line;\n $len++;\n }\n } while ($lines->valid() && ! $done);\n\n if ($done) {\n $note = (object) array('text' => $text, 'len' => $len, 'raw' => $raw);\n } else {\n $lines->reject();\n }\n }\n return $note;\n }",
"private function endBlock()\n {\n end($this->_blocks);\n\n // grab key of that last element and fill it with rendered data\n $this->_blocks[key($this->_blocks)] = ob_get_clean();\n }",
"public function getMainHeading() : string\n {\n return <<< 'MAINHEADING'\nWorking with Data in C#\nMAINHEADING;\n }",
"protected function buildContents() : string {\n\n\t\t\t$insertions = [];\n\n\t\t\t# Process blocks\n\n\t\t\tforeach ($this->blocks as $name => $block) {\n\n\t\t\t\t$insertions['{ block:' . $name . ' / }'] = $block->getContents();\n\t\t\t}\n\n\t\t\t# Process loops\n\n\t\t\tforeach ($this->loops as $name => $loop) {\n\n\t\t\t\t$insertions['{ for:' . $name . ' / }'] = $loop->getContents();\n\t\t\t}\n\n\t\t\t# Process widgets\n\n\t\t\tforeach ($this->widgets as $name) {\n\n\t\t\t\t$widget = Template::getWidget($name);\n\n\t\t\t\t$contents = ((false !== $widget) ? $widget->getContents() : '');\n\n\t\t\t\t$insertions['{ widget:' . $name . ' / }'] = $contents;\n\t\t\t}\n\n\t\t\t# Process variables\n\n\t\t\tforeach ($this->variables as $name => $value) {\n\n\t\t\t\t$value = ((false === $value) ? Template::getGlobal($name) : $value);\n\n\t\t\t\t$insertions['$' . $name . '$'] = Str::formatOutput($value);\n\t\t\t}\n\n\t\t\t# Process phrases\n\n\t\t\tforeach ($this->phrases as $name => $value) {\n\n\t\t\t\t$value = Language::get($name);\n\n\t\t\t\t$insertions['%' . $name . '%'] = Str::formatOutput($value);\n\t\t\t}\n\n\t\t\t# Process insertions\n\n\t\t\t$contents = str_replace(array_keys($insertions), array_values($insertions), $this->contents);\n\n\t\t\t# ------------------------\n\n\t\t\treturn $contents;\n\t\t}"
] | [
"0.61965877",
"0.6093575",
"0.6045783",
"0.5945323",
"0.5933385",
"0.586049",
"0.5848969",
"0.5790183",
"0.5754983",
"0.56994605",
"0.56792575",
"0.5662628",
"0.566199",
"0.5653779",
"0.5623735",
"0.56066054",
"0.56013435",
"0.55888855",
"0.5557027",
"0.5553107",
"0.5546684",
"0.55451083",
"0.5543216",
"0.55006415",
"0.54961234",
"0.54919416",
"0.54819596",
"0.54754746",
"0.54717386",
"0.54706",
"0.5465076",
"0.5461731",
"0.5454046",
"0.5451164",
"0.5429071",
"0.54285926",
"0.5426721",
"0.5419017",
"0.54034233",
"0.5403018",
"0.5394771",
"0.53936034",
"0.5383787",
"0.5382041",
"0.5377695",
"0.5359413",
"0.53555954",
"0.53555703",
"0.5347657",
"0.5345065",
"0.53355616",
"0.5328717",
"0.53259414",
"0.5321392",
"0.5320928",
"0.5315148",
"0.530675",
"0.5302238",
"0.5301087",
"0.5296932",
"0.5287225",
"0.5286713",
"0.52850723",
"0.5281633",
"0.5280886",
"0.527227",
"0.5272081",
"0.5266791",
"0.52626985",
"0.52626187",
"0.52615213",
"0.5257825",
"0.5256124",
"0.52560425",
"0.52560425",
"0.5255685",
"0.5250182",
"0.52447",
"0.52396226",
"0.52354527",
"0.52347183",
"0.52296865",
"0.5229012",
"0.5228237",
"0.52257794",
"0.5223665",
"0.52177113",
"0.52055645",
"0.52050567",
"0.51978654",
"0.5197313",
"0.51969063",
"0.5183901",
"0.518189",
"0.5181476",
"0.51783115",
"0.5174022",
"0.51731133",
"0.5171883",
"0.51605535"
] | 0.80693436 | 0 |
Block Building Inputs Parameters | private function buildParametersBlock(array $inputs = array()): void
{
//====================================================================//
// Parameters Table Block
$tableContents = array();
$tableContents[] = array("Received ".count($inputs)." inputs parameters","Value");
foreach ($inputs as $key => $value) {
$tableContents[] = array($key, $value);
}
$this->blocksFactory()->addTableBlock($tableContents, array("Width" => self::SIZE_M));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function inputs();",
"public function getInputValues();",
"public function input()\n\t{\n\t\treturn $this->parameters;\n\t}",
"function getInputValues();",
"abstract protected function inputs(): array;",
"public function input_attrs()\n {\n }",
"public function get_input()\n {\n }",
"protected function compileInputs()\n {\n if ([] !== $this->inputs) {\n foreach ($this->inputs as $key => $input) {\n// Add collection group\n if (is_numeric($key)) {\n\n } else {\n $this->buildInput($key, $this->getColumnInfo($key), $input);\n }\n }\n }\n }",
"private function input(){\n $this->params['controller_name'] = $this->ask('Controller name');\n $this->params['crud_url'] = $this->ask('CRUD url');\n $this->params['model_name'] = $this->ask('Model name');\n $this->params['table_name'] = $this->ask('Table name');\n $this->params['author'] = env('PACKAGE_AUTHOR');\n }",
"abstract public function getInput();",
"private function getAllInputParameters () {\n// \t\t$params = $this->getInputParameters();\n\t\t$params = array();\n\t\t$catalogId = $this->session->getCourseCatalogId();\n\t\tif (!$catalogId->isEqual($this->session->getCombinedCatalogId()))\n\t\t\t$params[':catalog_id'] = $this->session->getCatalogDatabaseId($catalogId);\n\t\t\n\t\t$params[':subj_code'] = $this->session->getSubjectFromCourseId($this->courseId);\n\t\t$params[':crse_numb'] = $this->session->getNumberFromCourseId($this->courseId);\n\t\t\n\t\treturn $params;\n\t}",
"public function getRequiredParameters();",
"public function getRequiredParameters();",
"public static function input_fields()\n {\n }",
"protected function __construct(){\n\t\t$this->inputs();\n\t}",
"public function getInput() {}",
"function getParameters() {\n\t\treturn $this->inputParameters;\n\t}",
"protected function inputs()\n {\n return [];\n }",
"public function getInput();",
"public function getInput();",
"public function getInput();",
"function readInputData() {\n\t\t$this->readUserVars(array('seriesId', 'title', 'division', 'affiliation'));\n\t\t$this->readUserVars(array('gridId', 'rowId'));\n\t}",
"public function getRequiredParameters() {\n return array('loops');\n }",
"public function parameters();",
"public function parameters();",
"public function getInputs()\r\n {\r\n $this->inputs = $this->getReflection('inputs');\r\n }",
"function getRawInputValues();",
"public static function getRequiredParams();",
"function collectDataFromInput()\n\t{\n\t\t$id= FormUtil :: getPassedValue('id', null);\n\t\t$objectid= FormUtil :: getPassedValue('objectid', null);\n\n\t\tif (!empty ($objectid))\n\t\t{\n\t\t\t$id= $objectid;\n\t\t}\n\n\t\t$license= FormUtil :: getPassedValue('license', null, 'POST');\n\t\t$license_image= FormUtil :: getPassedValue('license_image', null, 'FILES');\n\n\t\t(!empty ($license['objectid'])) ? $license['id']= $license['objectid'] : '';\n\n\t\t// get all module vars\n\t\t$modvars= pnModGetVar('crpLicense');\n\n\t\t$data= compact('id', 'objectid', 'license', 'license_image', 'modvars');\n\n\t\treturn $data;\n\t}",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"abstract protected function getRequiredRequestParameters();",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }",
"public function __construct($inputs = array())\n {\n parent::__construct($inputs);\n }"
] | [
"0.63753814",
"0.61714774",
"0.60967696",
"0.6048992",
"0.599503",
"0.58778775",
"0.58669215",
"0.578735",
"0.5764729",
"0.5720259",
"0.5699805",
"0.56922495",
"0.56922495",
"0.5681795",
"0.56710285",
"0.5660773",
"0.5644975",
"0.5602723",
"0.5591792",
"0.5591792",
"0.5591792",
"0.5538422",
"0.5510598",
"0.5485022",
"0.5485022",
"0.5443111",
"0.5435328",
"0.54062366",
"0.53881997",
"0.53676057",
"0.53676057",
"0.53676057",
"0.53676057",
"0.53676057",
"0.53676057",
"0.53676057",
"0.53676057",
"0.53676057",
"0.53676057",
"0.53676057",
"0.53676057",
"0.53676057",
"0.5366923",
"0.5366385",
"0.5366385",
"0.5366385",
"0.5366385",
"0.5366385",
"0.5366385",
"0.5366385",
"0.5366385",
"0.5366385",
"0.5366385",
"0.5366385",
"0.5366385",
"0.5366385",
"0.5366385",
"0.5366385",
"0.536632",
"0.536632",
"0.536632",
"0.536632",
"0.536632",
"0.536632",
"0.536632",
"0.536632",
"0.536632",
"0.536632",
"0.536632",
"0.536632",
"0.536632",
"0.536632",
"0.536632",
"0.536632",
"0.536632",
"0.536632",
"0.536632",
"0.536632",
"0.536632",
"0.536632",
"0.536632",
"0.536632",
"0.536632",
"0.536632",
"0.536632",
"0.536632",
"0.536632",
"0.536632",
"0.536632",
"0.536632",
"0.536632",
"0.536632",
"0.536632",
"0.536632",
"0.536632",
"0.536632",
"0.536632",
"0.536632",
"0.536632",
"0.536632"
] | 0.64641994 | 0 |
Block Building Notifications Parameters | private function buildNotificationsBlock(): void
{
//====================================================================//
// Notifications Block
$notifications = array(
"error" => "This is a Sample Error Notification",
"warning" => "This is a Sample Warning Notification",
"success" => "This is a Sample Success Notification",
"info" => "This is a Sample Infomation Notification",
);
$this->blocksFactory()->addNotificationsBlock($notifications, array("Width" => self::SIZE_M));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function notification(Notification $notification, array $parameters = []);",
"public function notification();",
"public function notification();",
"function model_prepare_notification($hook, $type, $notification, $params) {\n\t$entity = $params['event']->getObject();\n\t$owner = $params['event']->getActor();\n\t$recipient = $params['recipient'];\n\t$language = $params['language'];\n\t$method = $params['method'];\n\n\t$notification->subject = elgg_echo('model:notify:subject', array($entity->title), $language);\n\t$notification->body = elgg_echo('model:notify:body', array(\n\t\t$owner->name,\n\t\t$entity->title,\n\t\t$entity->getExcerpt(),\n\t\t$entity->getURL()\n\t), $language);\n\t$notification->summary = elgg_echo('model:notify:summary', array($entity->title), $language);\n\n\treturn $notification;\n}",
"function getNotification(){\n\n\n}",
"public function __construct()\n {\n $this->fields = [\n 'notification' => [],\n 'content_available' => true\n ];\n }",
"public function notification() {\n\t\t$this->page_data['page_name'] = \"notification\";\n\t\t$this->page_data['page_title'] = 'notification';\n\t\t$this->page_data['page_view'] = 'user/notification';\n\n\t\t$this->page_data['company_add_request_list'] = $this->corporate_model->get_company_list(\n\t\t\t\"OBJECT\",\n\t\t\tarray(\n\t\t\t\t'company_user' => array('company_id', 'corporate_role', 'designation_id', 'department_id', 'request_status'),\n\t\t\t\t'company' => array('name as company_name'),\n\t\t\t\t'designation' => array('name as designation'),\n\t\t\t\t'department' => array('name as department'),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'company_user.user_id' => $this->session->userdata('user_id'),\n\t\t\t\t'company_user.request_status' => 'PENDING',\n\t\t\t)\n\t\t);\n\n\t\t$this->load->view('index', $this->page_data);\n\n\t}",
"public function notificationsAction()\n {\n $callback = function ($msg) {\n //check the db before running anything\n if (!$this->isDbConnected('db')) {\n return ;\n }\n\n if ($this->di->has('dblocal')) {\n if (!$this->isDbConnected('dblocal')) {\n return ;\n }\n }\n\n //we get the data from our event trigger and unserialize\n $notification = unserialize($msg->body);\n\n //overwrite the user who is running this process\n if ($notification['from'] instanceof Users) {\n $this->di->setShared('userData', $notification['from']);\n }\n\n if (!$notification['to'] instanceof Users) {\n echo 'Attribute TO has to be a User' . PHP_EOL;\n return;\n }\n\n if (!class_exists($notification['notification'])) {\n echo 'Attribute notification has to be a Notificatoin' . PHP_EOL;\n return;\n }\n $notificationClass = $notification['notification'];\n\n if (!$notification['entity'] instanceof Model) {\n echo 'Attribute entity has to be a Model' . PHP_EOL;\n return;\n }\n\n $user = $notification['to'];\n\n //instance notification and pass the entity\n $notification = new $notification['notification']($notification['entity']);\n //disable the queue so we process it now\n $notification->disableQueue();\n\n //run notify for the specifiy user\n $user->notify($notification);\n\n $this->log->info(\n \"Notification ({$notificationClass}) sent to {$user->email} - Process ID \" . $msg->delivery_info['consumer_tag']\n );\n };\n\n Queue::process(QUEUE::NOTIFICATIONS, $callback);\n }",
"public function __construct()\n {\n $this->notificationTypes = ['TransactionBillWasClosed', 'LoyaltyRewardEarned', 'CustomerRedeemReward', 'CustomerRedeemDeal'];\n }",
"private function notifyORS() {\r\n require_once('classes/tracking/notifications/Notifications.php');\r\n require_once('classes/tracking/notifications/ORSNotification.php');\r\n\r\n $piDetails = $this->getPIDisplayDetails();\r\n $piName = $piDetails['firstName'] . \" \" . $piDetails['lastName'];\r\n\r\n $subject = sprintf('[TID-%s] Tracking form submitted online [%s]', $this->trackingFormId, $piName);\r\n $emailBody = sprintf('A tracking form was submitted online :\r\n\r\nTracking ID : %s\r\nTitle : \"%s\"\r\nPrincipal Investigator : %s\r\nDepartment : %s\r\n\r\n', $this->trackingFormId, $this->projectTitle, $piName, $piDetails['departmentName']);\r\n\r\n $ORSNotification = new ORSNotification($subject, $emailBody);\r\n try {\r\n $ORSNotification->send();\r\n } catch(Exception $e) {\r\n printf('Error: Unable to send email notification to ORS : '. $e);\r\n }\r\n }",
"public function api_entry_sendnotification() {\n parent::validateParams(array('sender', 'receiver', 'subject'));\n\n if(!$this->Mdl_Users->get($_POST['sender'])) parent::returnWithErr(\"Sender is not valid\");\n if(!$this->Mdl_Users->get($_POST['receiver'])) parent::returnWithErr(\"Receiver is not valid\");\n\n $sender = $this->Mdl_Users->get($_POST['sender']);\n $receiver = $this->Mdl_Users->get($_POST['receiver']);\n\n unset($sender->password);\n unset($receiver->password);\n\n if ($_POST['subject'] == \"ipray_sendinvitation\") {\n $msg = $sender->username . \" has invited you.\";\n }\n else if ($_POST['subject'] == \"ipray_acceptinvitation\") {\n $msg = $sender->username . \" has accepted your invitation.\";\n\n // sender ---> receiver \n $this->Mdl_Users->makeFriends($_POST[\"sender\"], $_POST[\"receiver\"]);\n }\n else if ($_POST['subject'] == \"ipray_rejectinvitation\") {\n $msg = $sender->username . \" has rejected your invitation.\";\n }\n else if ($_POST['subject'] == 'ipray_sendprayrequest') {\n parent::validateParams(array('request'));\n }\n else if ($_POST['subject'] == 'ipray_acceptprayrequest') {\n parent::validateParams(array('request'));\n }\n else if ($_POST['subject'] == 'ipray_rejectprayrequest') {\n parent::validateParams(array('request'));\n }\n else {\n parent::returnWithErr(\"Unknown subject is requested.\");\n }\n\n if (!isset($receiver->devicetoken) || $receiver->devicetoken == \"\")\n parent::returnWithErr(\"User is not available at this moment. Please try again later.\");\n\n $payload = array(\n 'sound' => \"default\",\n 'subject' => $_POST['subject'],\n 'alert' => $msg,\n 'sender' => $sender,\n 'receiver' => $receiver\n );\n\n if (($failedCnt = $this->qbhelper->sendPN($receiver->devicetoken, json_encode($payload))) == 0) {\n $this->load->model('Mdl_Notifications');\n $this->Mdl_Notifications->create(array(\n 'subject' => $_POST['subject'],\n 'message' => $msg,\n 'sender' => $sender->id,\n 'receiver' => $receiver->id\n ));\n\n parent::returnWithoutErr(\"Contact request has been sent successfully.\");\n }\n else {\n parent::returnWithErr($failedCnt . \" requests have not been sent.\");\n }\n \n }",
"function prepare_notification($hook, $type, $notification, $params) {\n\tif (!($notification instanceof \\Elgg\\Notifications\\Notification)) {\n\t\treturn $notification;\n\t}\n\n\t$notification->body = handler_replace($notification->body);\n\t$notification->subject = handler_replace($notification->subject);\n\n\treturn $notification;\n}",
"function ef_notifications_notification_submit($form, &$form_state) {\n if (isset($form_state['values']['ef_notifications'])) {\n ($form['options']['#access'] ? $wrapper_id = 'options' : $wrapper_id = 'revision_information');\n foreach ($form_state['values']['ef_notifications'] as $rid => $role_emails) {\n foreach ($role_emails as $email) {\n $email_transition = $form[$wrapper_id]['workflow_email'][$rid]['#hidden'];\n ef_notifications_mail_send($email, $email_transition, $form_state['node']); //\n }\n }\n }\n}",
"public function get_collection_params() {\n\t\treturn array(\n\t\t\t'include' => array(\n\t\t\t\t'description' => 'Limit the notifications to specific IDs.',\n\t\t\t),\n\t\t\t'event' => array(\n\t\t\t\t'description' => 'The event to trigger. Default: form_submission.',\n\t\t\t),\n\t\t);\n\t}",
"public function get_portfolio_notification();",
"function _osg_singout_notifier_prep_message($info,$data) {\n global $base_url;\n $message = array();\n $separator = md5(time());\n // carriage return type (we use a PHP end of line constant)\n $eol = PHP_EOL;\n\n //$params['to'] = $record['email'];\n $recipient = $info['first_name'].' '.$info['last_name'].' <[email protected]'.'>';\n $sender = variable_get('site_mail', '[email protected]');\n $message['subject'] = 'These Performances are available for registration.';\n $fudge = count($data) > 2?'s':'';\n $fudge = \"Please visit <a href=\\\"$base_url\\\">\".variable_get('site_name','[Some Cool Site]').\"</a>\"\n .\" and indicate your attendance plan for the following event$fudge:\";\n $data[0] = $fudge;\n $body = implode(\"<br>\",$data);\n\n\n\n $message['body'] = $body;\n\n debug($message,'$message');\n //drupal_mail($module, $key, $to, $language, $params = array(), $from = NULL, $send = TRUE)\n drupal_mail('osg_singout_notifier'\n , 'registration_needed'\n , $recipient\n , language_default()\n , $message\n , $sender\n );\n\n}",
"function State_27($parameters) \n\t{\n\t\t$application_id = $parameters->application_id;\n\t\tRemove_Unregistered_Events_From_Schedule($application_id);\n\n\t\t// Send Return Letter 4 - Final Notice\n\t\t//ECash_Documents_AutoEmail::Queue_For_Send($application_id, 'RETURN_LETTER_4_FINAL_NOTICE', $parameters->status->fail_set[0]->transaction_register_id);\n\t\tECash_Documents_AutoEmail::Queue_For_Send($application_id, 'PAYMENT_FAILED', $parameters->status->fail_set[0]->transaction_register_id);\n\t\t\n//\t\t$qm = ECash::getFactory()->getQueueManager();\n//\t\t$queue_item = $qm->getQueue('collections_general')->getNewQueueItem($parameters->application_id);\n//\t\t$queue_item->Priority = 100;\n//\t\t$qm->moveToQueue($queue_item, 'collections_general');\n\n\t\tUpdate_Status(null, $application_id, array('queued','contact','collections','customer','*root'), NULL, NULL, FALSE);\n\n\t}",
"public function loadNotification(){\r\n //remove trace code.\r\n// eeFile::saveFile('new post request get.');\r\n \r\n //get xml\r\n $tmpXML = file_get_contents('php://input');\r\n if (empty($tmpXML)) {\r\n $this->generateReturnXML(0);\r\n }//xml content not get.\r\n \r\n //save response to file to get the structure.\r\n eeFile::saveFile($tmpXML);\r\n \r\n //xml to array\r\n $tmpXMLArr = $this->FromXml($tmpXML);\r\n if ($tmpXMLArr['return_code'] != \"SUCCESS\") {\r\n $this->generateReturnXML();\r\n }\r\n \r\n //check sign\r\n $this->safeValues = $tmpXMLArr;\r\n if ($tmpXMLArr['sign'] != $this->MakeSign()) {\r\n $this->generateReturnXML(0);\r\n };\r\n \r\n //massive attributes\r\n $this->scenario = 'notification';\r\n $this->attributes = $tmpXMLArr;\r\n $this->noti_result_code = $tmpXMLArr['result_code'];\r\n// var_dump($this->attributes);\r\n \r\n //remove trace code.\r\n// eeFile::saveFile('otn->'.$this->out_trade_no);\r\n //load OPM\r\n $tmpArr = explode('_', $this->out_trade_no);\r\n if (!isset($tmpArr[1])) {\r\n $this->generateReturnXML(0);\r\n }\r\n $opm = OrderPaymentMethod::findOne((int)$tmpArr[1]);\r\n if (empty($opm)) {\r\n $this->generateReturnXML();\r\n }\r\n \r\n if ($opm->opm_status_id == OrderPaymentMethod::OPM_PAID) {\r\n //already paid, direct return success\r\n $this->generateReturnXML(1);\r\n }\r\n \r\n \r\n $opm->scenario = 'notification';\r\n //update opm\r\n $opm->opm_paid = $this->total_fee/100;\r\n $opm->opm_cash = $this->cash_fee/100;\r\n $opm->opm_openId = $this->openid;\r\n $opm->opm_tradeType_return = $this->trade_type;\r\n $opm->opm_transaction_id = $this->transaction_id;\r\n $opm->opm_paidDate = date('Y-m-d H:i:s', strtotime($this->time_end));\r\n \r\n if ($this->noti_result_code == 'SUCCESS') {\r\n //SUCCESS\r\n //update opm status\r\n $opm->opm_status_id = OrderPaymentMethod::OPM_PAID;\r\n $opm->save();\r\n// var_dump($opm->errors);\r\n// exit;\r\n \r\n //load ORDER\r\n $order = $opm->opmOrder;\r\n if (!empty($order)) {\r\n $order->scenario = 'notification';\r\n $order->or_pricePaid = $this->total_fee/100;\r\n $order->or_status_id = OrderPaymentMethod::OPM_PAID;\r\n $order->or_paidDate = $opm->opm_paidDate;\r\n $order->save();\r\n }\r\n }else{\r\n //FAIL\r\n //update opm status\r\n $opm->opm_status_id = OrderPaymentMethod::OPM_FAIL;\r\n $opm->save();\r\n \r\n //load ORDER\r\n $order = $opm->opmOrder;\r\n if (!empty($order)) {\r\n $order->or_status_id = OrderPaymentMethod::OPM_FAIL;\r\n $order->save();\r\n }\r\n }\r\n \r\n $this->generateReturnXML(1);\r\n }",
"function wd_notification() {\n return WeDevs_Notification::init();\n}",
"private function processNotificationsToBeSent()\n {\n if (array_key_exists('status', $this->originalAttributeValues))\n {\n if ($this->status == Task::STATUS_AWAITING_ACCEPTANCE &&\n $this->requestedByUser->id != Yii::app()->user->userModel->id)\n {\n TasksNotificationUtil::submitTaskNotificationMessage($this,\n TasksNotificationUtil::TASK_STATUS_BECOMES_AWAITING_ACCEPTANCE,\n Yii::app()->user->userModel);\n }\n elseif ($this->status == Task::STATUS_REJECTED &&\n $this->owner->id != Yii::app()->user->userModel->id)\n {\n TasksNotificationUtil::submitTaskNotificationMessage($this,\n TasksNotificationUtil::TASK_STATUS_BECOMES_REJECTED,\n Yii::app()->user->userModel);\n }\n elseif ($this->status == Task::STATUS_COMPLETED)\n {\n TasksNotificationUtil::submitTaskNotificationMessage($this,\n TasksNotificationUtil::TASK_STATUS_BECOMES_COMPLETED,\n Yii::app()->user->userModel);\n }\n }\n if ($this->isNewModel)\n {\n if ($this->owner->id != $this->requestedByUser->id && $this->owner->id != Yii::app()->user->userModel->id)\n {\n TasksNotificationUtil::submitTaskNotificationMessage($this,\n TasksNotificationUtil::TASK_NEW);\n }\n }\n elseif (array_key_exists('owner', $this->originalAttributeValues))\n {\n if ($this->requestedByUser->id != Yii::app()->user->userModel->id)\n {\n TasksNotificationUtil::submitTaskNotificationMessage($this,\n TasksNotificationUtil::TASK_OWNER_CHANGE);\n }\n if ($this->owner->id != Yii::app()->user->userModel->id)\n {\n TasksNotificationUtil::submitTaskNotificationMessage($this,\n TasksNotificationUtil::TASK_NEW);\n }\n }\n }",
"function build_notice()\n\t{\n\t\tglobal $template, $lang, $garage_config, $phpEx;\n\n\t\t// Set Garage Version Messages.....DO NOT REMOVE....No Support For Any Garage Without It\n\t\t$template->assign_vars(array(\n\t\t\t'GARAGE_LINK' => 'http://www.phpbbgarage.com/',\n\t\t\t'GARAGE_VERSION' => $garage_config['version'],\n\t\t\t'U_GARAGE' => append_sid(\"garage.$phpEx?mode=main_menu\"),\n\t\t\t'L_GARAGE' => $lang['Garage'],\n\t\t\t'L_POWERED_BY_GARAGE' => 'Powered By phpBB Garage' . $lang['Translation_Link'])\n\t\t);\n\n\t\treturn;\n\t}",
"protected function prepareAndGetMailParams()\n {\n $sendParam['title'] = strip_tags($this->notification->post->title);\n $sendParam['subject'] = \"[{$this->config->site->name}] \" . strip_tags($this->notification->post->title);\n $sendParam['post_url'] = $this->notificationService->getRelatedPostUrl($this->notification);\n $sendParam['settings_url'] = container('config')->site->url . '/settings';\n $sendParam['html_content'] = $this->prepareHtmlContent($sendParam);\n $sendParam['text_content'] = $this->getTextContent($this->prepareTextlContent($sendParam));\n\n return $sendParam;\n }",
"public function register_notifications();",
"protected function notification() {\n\t\t$reason = $this->indexing_helper->get_reason();\n\n\t\t$presenter = $this->get_presenter( $reason );\n\n\t\treturn new Yoast_Notification(\n\t\t\t$presenter,\n\t\t\t[\n\t\t\t\t'type' => Yoast_Notification::WARNING,\n\t\t\t\t'id' => self::NOTIFICATION_ID,\n\t\t\t\t'capabilities' => 'wpseo_manage_options',\n\t\t\t\t'priority' => 0.8,\n\t\t\t]\n\t\t);\n\t}",
"public function setMerchantNotificationConfiguration($requestParameters = array());",
"function advanced_notifications_init() {\n\t\n\t// register plugin hooks\n\telgg_register_plugin_hook_handler('enqueue', 'notification', '\\ColdTrick\\AdvancedNotifications\\Enqueue::preventPrivateNotifications', 9000);\n\telgg_register_plugin_hook_handler('enqueue', 'notification', '\\ColdTrick\\AdvancedNotifications\\Enqueue::delayPrivateContentNotification', 9001);\n\t\n\t// register event handlers\n\telgg_register_event_handler('update:after', 'object', '\\ColdTrick\\AdvancedNotifications\\Enqueue::checkForDelayedNotification');\n}",
"public function index()\r\n {\r\n if (!auth()->user()->can('send_notification')) {\r\n abort(403, 'Unauthorized action.');\r\n }\r\n\r\n $business_id = request()->session()->get('user.business_id');\r\n\r\n $customer_notifications = NotificationTemplate::customerNotifications();\r\n\r\n $module_customer_notifications = $this->moduleUtil->getModuleData('notification_list', ['notification_for' => 'customer']);\r\n\r\n if (!empty($module_customer_notifications)) {\r\n foreach ($module_customer_notifications as $module_customer_notification) {\r\n $customer_notifications = array_merge($customer_notifications, $module_customer_notification);\r\n }\r\n }\r\n\r\n foreach ($customer_notifications as $key => $value) {\r\n $notification_template = NotificationTemplate::getTemplate($business_id, $key);\r\n $customer_notifications[$key]['subject'] = $notification_template['subject'];\r\n $customer_notifications[$key]['email_body'] = $notification_template['email_body'];\r\n $customer_notifications[$key]['sms_body'] = $notification_template['sms_body'];\r\n $customer_notifications[$key]['auto_send'] = $notification_template['auto_send'];\r\n $customer_notifications[$key]['auto_send_sms'] = $notification_template['auto_send_sms'];\r\n }\r\n\r\n $supplier_notifications = NotificationTemplate::supplierNotifications();\r\n\r\n $module_supplier_notifications = $this->moduleUtil->getModuleData('notification_list', ['notification_for' => 'supplier']);\r\n\r\n if (!empty($module_supplier_notifications)) {\r\n foreach ($module_supplier_notifications as $module_supplier_notification) {\r\n $supplier_notifications = array_merge($supplier_notifications, $module_supplier_notification);\r\n }\r\n }\r\n\r\n foreach ($supplier_notifications as $key => $value) {\r\n $notification_template = NotificationTemplate::getTemplate($business_id, $key);\r\n $supplier_notifications[$key]['subject'] = $notification_template['subject'];\r\n $supplier_notifications[$key]['email_body'] = $notification_template['email_body'];\r\n $supplier_notifications[$key]['sms_body'] = $notification_template['sms_body'];\r\n $supplier_notifications[$key]['auto_send'] = $notification_template['auto_send'];\r\n $supplier_notifications[$key]['auto_send_sms'] = $notification_template['auto_send_sms'];\r\n }\r\n\r\n\r\n $business_notifications = NotificationTemplate::businessNotifications();\r\n\r\n $module_business_notifications = $this->moduleUtil->getModuleData('notification_list', ['notification_for' => 'business']);\r\n\r\n if (!empty($module_business_notifications)) {\r\n foreach ($module_business_notifications as $module_business_notification) {\r\n $business_notifications = array_merge($business_notifications, $module_business_notification);\r\n }\r\n }\r\n\r\n foreach ($business_notifications as $key => $value) {\r\n $notification_template = NotificationTemplate::getTemplate($business_id, $key);\r\n $business_notifications[$key]['subject'] = $notification_template['subject'];\r\n $business_notifications[$key]['email_body'] = $notification_template['email_body'];\r\n $business_notifications[$key]['sms_body'] = $notification_template['sms_body'];\r\n $business_notifications[$key]['auto_send'] = $notification_template['auto_send'];\r\n $business_notifications[$key]['auto_send_sms'] = $notification_template['auto_send_sms'];\r\n }\r\n\r\n $tags = NotificationTemplate::notificationTags();\r\n\r\n return view('notification_template.index')\r\n ->with(compact('customer_notifications', 'supplier_notifications', 'business_notifications', 'tags'));\r\n }",
"public function __construct($new_postNotification)\n {\n //\n $this->postNotification = $new_postNotification;\n\n }",
"public function bind_template($params) {\n //get notification template\n// $template = Template::where('code', $template_code)->where('tenant_code', $tenant_code)->where('status', self::STATUS_LIVE)->first();\n $template = $this;\n \n// if (!$template) {\n// throw new Exception(\"Error Processing Request\", 403);\n// }\n $notification = [];\n\n //update notification templates with params\n //WEB_PUSH\n if (isset($template->web_push_template['status']) && $template->web_push_template['status']) {\n $title = isset($template->web_push_template['title']) ? Settings::notification_format($template->web_push_template['title'], $params) : '';\n $message = isset($template->web_push_template['message']) ? Settings::notification_format($template->web_push_template['message'], $params) : '';\n $url = isset($template->web_push_template['url']) ? Settings::notification_format($template->web_push_template['url'], $params) : '';\n $notification['web_push'] = ['title' => $title, 'message' => $message, 'url' => $url];\n }\n \n\n //SMS\n if (isset($template->sms_template['status']) && $template->sms_template['status']) {\n $title = isset($template->sms_template['title']) ? Settings::notification_format($template->sms_template['title'], $params) : '';\n $message = isset($template->sms_template['message']) ? Settings::notification_format($template->sms_template['message'], $params) : '';\n $notification['sms'] = ['title' => $title, 'message' => $message];\n }\n\n //MOBILE_PUSH\n if (isset($template->mobile_push_template['status']) && $template->mobile_push_template['status']) {\n $title = isset($template->mobile_push_template['title']) ? Settings::notification_format($template->mobile_push_template['title'], $params) : '';\n $message = isset($template->mobile_push_template['message']) ? Settings::notification_format($template->mobile_push_template['message'], $params) : '';\n $notification['mobile_push'] = ['title' => $title, 'message' => $message];\n }\n\n //Email\n if (isset($template->email_template['status']) && $template->email_template['status']) {\n $title = isset($template->email_template['title']) ? Settings::notification_format($template->email_template['title'], $params) : '';\n $message = isset($template->email_template['message']) ? Settings::notification_format($template->email_template['message'], $params) : '';\n $notification['email'] = ['title' => $title, 'message' => $message];\n }\n\n\n return $notification;\n }",
"public function notify(ParameterBag $params);",
"public function Notification() {\r\n\t\t//$this->template->set_theme('default_theme');\r\n\t\t$uid = $_SESSION ['olouserid'];\r\n\t\tif(!empty($uid)){\r\n\t\t\t$this->load->library ( 'zyk/UserLib' );\r\n\t\t\t$detail = $this->userlib->getNotification($uid);\r\n\t\t\t$this->template->set('detail',$detail);\r\n\t\t\t$this->template->set ( 'description', '' );\r\n\t\t\t$this->template->set_layout (false);\r\n\t\t\t$this->template->set_layout ('default')\r\n\t\t\t->title ( 'Garage2Ghar' )\r\n\t\t\t->set_partial ( 'header', 'partials/header' )\r\n\t\t\t->set_partial ( 'footer', 'partials/footer' );\r\n\t\t\t$this->template->build ('Order/notification');\r\n\t\t}else{\r\n\t\t\tredirect(base_url());\r\n\t\t}\r\n\t}",
"public function executeAdminNotify()\n {\n if ( in_array( $this->getParameter( 'option_name' ), array( 'bookly_sms_notify_low_balance', 'bookly_sms_notify_weekly_summary' ) ) ) {\n update_option( $this->getParameter( 'option_name' ), $this->getParameter( 'value' ) );\n }\n wp_send_json_success();\n }",
"function event_notify($op, $data) {\n global $xoopsModuleConfig;\n $notify = $xoopsModuleConfig['notify'];\n if (!$notify) return;\n\n $xoopsMailer =& getMailer();\n $xoopsMailer->useMail();\n\n switch ($op) {\n case \"new\":\n\t$tpl = 'notify_admin_new.tpl';\n\t// notify suppress will be confused?\n\t$title = $data['title'];\n\t$edate = eventdate($data['edate']);\n\t$xoopsMailer->setSubject(_MD_NEWSUB);\n\t$note = ($data['status'] == STAT_POST)?_MD_APPROVE_REQ:\"\";\n\t$tags = array('EVENT_TITLE'=> $title,\n\t\t 'EVENT_DATE' => $edate,\n\t\t 'EVENT_NOTE' => $note,\n\t\t 'EVENT_URL' => EGUIDE_URL.\"/event.php?eid=\".$data['eid']);\n\tbreak;\n case \"update\":\n\t$tpl = 'notify_admin_change.tpl';\n\t$tags =& $data;\n\t$xoopsMailer->setSubject(_MD_UPDATE_SUBJECT);\n\tbreak;\n }\n $member_handler =& xoops_gethandler('member');\n $users = $member_handler->getUsersByGroup($xoopsModuleConfig['notify_group'], true);\n $uids = array();\n if ($notify==1) $uids[] = $GLOBALS['xoopsUser']->getVar('uid'); // suppress self\n $uid = $data['uid'];\n if (!in_array($uid, $uids)) { // update by not poster?\n\t$user = $member_handler->getUser($uid);\n\t$xoopsMailer->setToUsers($user);\n\t$uids[] = $uid;\n }\n foreach ($users as $user) {\n\tif (!in_array($user->getVar('uid'), $uids)) {\n\t $xoopsMailer->setToUsers($user);\n\t}\n }\n $xoopsMailer->setTemplateDir(template_dir($tpl));\n $xoopsMailer->setTemplate($tpl);\n $xoopsMailer->assign($tags);\n $xoopsMailer->setFromEmail($GLOBALS['xoopsConfig']['adminmail']);\n $xoopsMailer->setFromName(eguide_from_name());\n return $xoopsMailer->send();\n}",
"public function notification(){\n\t\tif($this->session->userdata('logged_in')==\"\")\n\t\t\theader(\"Location: \".$this->config->base_url().\"Login\");\n\t\t$this->cache_update();\n\t\t$this->load->model('Crud_model');\n\t\t$this->check_privilege(18);\n $this->load->driver('cache',array('adapter' => 'file'));\n\t\t$u_type = array('var'=>$this->cache->get('Active_status'.$this->session->userdata('loginid'))['user_type_id_fk']);\n\t\t$this->load->model('profile_model');\n\t\t$noti = array('meeting'=>$this->profile_model->meeting_notification());\n\t\t$u_type['notification'] = $noti;\n\t\t$u_type['noti1']=$this->profile_model->custom_notification();\n\t\t$this->load->view('dashboard/navbar',$u_type);\n\t\t$da = $this->profile_model->get_profile_info($this->session->userdata('uid'));\n $this->load->view('dashboard/sidebar',$da);\n\t\t$this->load->view('notify',$u_type);\n\t\t$this->db->trans_off();\n\t $this->db->trans_strict(FALSE);\n\t $this->db->trans_start();\n $this->Crud_model->audit_upload($this->session->userdata('loginid'),\n current_url(),\n 'Notification Page visited',\n 'Custom Message here');\n $this->db->trans_complete();\n\t\t$this->load->view('dashboard/footer');\n\t}",
"public function getNotifyAction() {\r\n $this->view->notification = $notification = $this->_getParam('notification', 0);\r\n $suggObj = Engine_Api::_()->getItem('suggestion', $notification->object_id);\r\n if (!empty($suggObj)) {\r\n\t\t\t$this->view->suggObj = $suggObj;\r\n\r\n if( strstr($suggObj->entity, \"sitereview\") ) {\r\n $getListingTypeId = Engine_Api::_()->getItem('sitereview_listing', $suggObj->entity_id)->listingtype_id;\r\n $getModId = Engine_Api::_()->suggestion()->getReviewModInfo($getListingTypeId);\r\n $modInfoArray = Engine_Api::_()->getApi('modInfo', 'suggestion')->getPluginDetailed(\"sitereview_\" . $getModId);\r\n $this->view->modInfoArray = $modInfoArray = $modInfoArray[\"sitereview_\" . $getModId];\r\n }else {\r\n $modInfoArray = Engine_Api::_()->getApi('modInfo', 'suggestion')->getPluginDetailed($suggObj->entity);\r\n $this->view->modInfoArray = $modInfoArray = $modInfoArray[$suggObj->entity];\r\n }\r\n \r\n if ($this->isModuleEnabled($modInfoArray['pluginName'])) {\r\n if ( $suggObj->entity == 'photo' ) {\r\n $modItemId = $suggObj->sender_id;\r\n } else {\r\n $modItemId = $suggObj->entity_id;\r\n }\r\n $modObj = Engine_Api::_()->getItem($modInfoArray['itemType'], $modItemId);\r\n\r\n\t// Check Sender exist on site or not.\r\n\t$isSenderExist= Engine_Api::_()->getItem('user', $suggObj->sender_id)->getIdentity();\r\n\tif( empty($isSenderExist) ) {\r\n\t Engine_Api::_()->getDbtable('suggestions', 'suggestion')->removeSuggestion($suggObj->entity, $suggObj->entity_id, $modInfoArray['notificationType']);\r\n\t $this->_helper->redirector->gotoRoute(array('route' => 'default'));\r\n\t $this->view->modObj = null;\r\n\t}\r\n\r\n\t// If Loggden user have \"Friend Suggestion\" Which already his friend then that friend suggestion should be delete.\r\n\tif( empty($modObj) || (( $suggObj->entity != 'photo' ) && ($modInfoArray['itemType'] == 'user') && !empty($modItemId)) ) {\r\n\t\t$is_user = Engine_Api::_()->getItem('user', $suggObj->entity_id)->getIdentity();\r\n\t\t$isFriend = Engine_Api::_()->getApi('coreFun', 'suggestion')->isMember($modItemId);\r\n\t\tif( empty($is_user) || !empty($isFriend) || empty($modObj) ) {\r\n\t\t Engine_Api::_()->getDbtable('suggestions', 'suggestion')->removeSuggestion($suggObj->entity, $suggObj->entity_id, $modInfoArray['notificationType']);\r\n\t\t $this->_helper->redirector->gotoRoute(array('route' => 'default'));\r\n\t\t $this->view->modObj = null;\r\n\t\t}\r\n\t}\r\n\r\n // It would be \"NULL\", If that entry already deleteed from the table.\r\n if (empty($modObj)) {\r\n Engine_Api::_()->getDbtable('suggestions', 'suggestion')->removeSuggestion($suggObj->entity, $suggObj->entity_id, $modInfoArray['notificationType']);\r\n $this->_helper->redirector->gotoRoute(array('route' => 'default'));\r\n $this->view->modObj = null;\r\n } else {\r\n\t\t\t\t\t$this->view->modObj = $modObj;\r\n $this->view->senderObj = $senderObj = Engine_Api::_()->getItem('user', $suggObj->sender_id);\r\n $this->view->sender_name = $this->view->htmlLink($senderObj->getHref(), $senderObj->displayname);\r\n }\r\n }else {\r\n\t$this->view->modNotEnable = true;\r\n }\r\n }else {\r\n\t\t\t// If suggestion are not available in \"Suggestion\" table but available in \"Notifications table\" then we are deleting from \"Notifications Table\".\r\n\t\t\tEngine_Api::_()->getDbtable('notifications', 'activity')->delete(array('notification_id = ?' => $notification->notification_id));\r\n\t\t\t$this->_helper->redirector->gotoRoute(array('route' => 'default'));\r\n\t\t}\r\n }",
"function special_notifications_init() {\n \t\n // register extra css\n elgg_extend_view('elgg.css', 'special_notifications/special_notifications.css');\n\n // register hook for checking event which are available this plugin\n $sn = array('profile_location');\n foreach ($sn as $item) {\n elgg_register_plugin_hook_handler('special_notifications:config', 'notify', \"snotify_$item\");\n }\n \n // get available active checking event and register a hook, so they can be triggered\n $special_notifications = elgg_trigger_plugin_hook('special_notifications:config', 'notify', null, []);\n foreach ($special_notifications as $key => $sn) {\n if ($sn['active']) {\n elgg_register_plugin_hook_handler('special_notifications', 'user', \"special_notification_\".$sn['hook']);\n }\n }\n\n}",
"function notificationEnabled(){\n\t\treturn false;\n\t}",
"public static function sendNotification($fields){\n $notificationService = new NotificationService();\n $fields = count($fields)?$fields:array();\n $fields = json_encode($fields);\n try{\n $client = new Client();\n $promise = $client->requestAsync('POST','https://onesignal.com/api/v1/notifications',[\n 'headers' =>array(\n 'Content-Type'=>'application/json',\n 'Authorization'=>'Basic '.$notificationService->restKey\n ),\n 'body'=>$fields\n ]);\n $promise->then(\n function (ResponseInterface $res){\n $body = $res->getBody();\n $stringBody = (string) $body;\n \\Log::debug(\"onesignal: \".$stringBody);\n },\n function (RequestException $e) {\n \\Log::debug(\"onesignal error: \".$e->getMessage().' '.$e->getRequest()->getMethod());\n }\n );\n $promise->wait();\n }catch (RequestException $e) {\n \\Log::error(\"send fail\");\n }\n }",
"public function build_notifications($proposal_id = '', $agreement_number = '', $client_reference = '', $balance_to_finance = 0)\n {\n $this->build_notifications[] = array\n (\n 'ProposalID' => $proposal_id,\n 'AgreementNumber' => $agreement_number,\n 'ClientReference' => $client_reference,\n 'BalanceToFinance' => $balance_to_finance\n );\n }",
"public function send()\n {\n $fields = count($this->filed)?$this->filed:array();\n $fields = json_encode($fields);\n try{\n $client = new Client();\n $promise = $client->requestAsync('POST','https://onesignal.com/api/v1/notifications',[\n 'headers' =>array(\n 'Content-Type'=>'application/json',\n 'Authorization'=>'Basic '.$this->restKey[$this->platform]\n ),\n 'body'=>$fields\n ]);\n $promise->then(\n function (ResponseInterface $res){\n $body = $res->getBody();\n $stringBody = (string) $body;\n \\Yii::debug(\"onesignal: \".$stringBody);\n },\n function (RequestException $e) {\n \\Yii::error(\"onesignal error: \".$e->getMessage().' '.$e->getRequest()->getMethod());\n }\n );\n $promise->wait();\n }catch (RequestException $e) {\n \\Yii::error(\"send fail\");\n }\n }",
"function send_email_notification($action, $post_params, $get_params) {\r\n $to = TO_EMAIL;\r\n $from = FROM_EMAIL;\r\n $subject = '[Рибні місця Рівненщини] Advertisement Notification';\r\n\r\n $message = 'Оновлення рекламних оголошень: ' . date(\"d M Y H:i:s\") . \"\\r\\n\\r\\n\" .\r\n 'Дія: ' . $action . \"\\r\\n\\r\\n\" .\r\n 'GET параметри:'.\"\\r\\n\" . array_implode(\"=\", \"\\r\\n\", $get_params) . \"\\r\\n\\r\\n\" .\r\n 'POST параметри:'.\"\\r\\n\" . array_implode(\"=\", \"\\r\\n\", $post_params) . \"\\r\\n\\r\\n\";\r\n\r\n $headers = 'From: ' . $from . \"\\r\\n\" .\r\n 'Reply-To: ' . $to . \"\\r\\n\" .\r\n 'Content-type: text/plain; charset=utf-8' . \"\\r\\n\" .\r\n 'X-Mailer: PHP/' . phpversion();\r\n\r\n mail($to, $subject, $message, $headers);\r\n}",
"public function sendAssignmentNotification()\n {\n \t$ctime = date('Y-m-d'); //get current day\n \n \t//get facebook id from the user setting for facebook reminder\n \t$this->PleAssignmentReminder->virtualFields = array('tid' => 'PleUserMapTwitter.twitterId');\n \n \t//get last sent id\n \t$last_sent_id = $this->PleLastReminderSent->find('first',array('conditions' => array('PleLastReminderSent.date' => $ctime, 'PleLastReminderSent.type' => 'twitter')));\n \n \tif( count($last_sent_id) > 0 ) {\n \t\t$options['conditions'][] = array('PleAssignmentReminder.id >' => $last_sent_id['PleLastReminderSent']['last_sent_rid']);\n \t}\n \n \t//get appController class object\n \t$obj = new AppController();\n \t$assignments = $obj->getAssignmentConstraints();\n \n \t//get today assignments\n \n \t$options['conditions'][] = $assignments;\n \t$options['fields'] = array('id', 'user_id', 'assignment_uuid', 'assignment_title', 'due_date', 'course_id');\n \t$options['order'] = array('PleAssignmentReminder.id ASC');\n \n \t//execute query\n \t$assignmnet_details = $this->PleAssignmentReminder->find('all', $options);\n \t\n \n \t//send twitter reminder\n \tforeach( $assignmnet_details as $assignmnet_detail ) {\n\t $user_id = $assignmnet_detail['PleAssignmentReminder']['user_id'];\n \t\t//$to_twitter = $assignmnet_detail['PleAssignmentReminder']['tid'];\n \t\t$body = $assignmnet_detail['PleAssignmentReminder']['assignment_title'];\n\t\t$course_id = $assignmnet_detail['PleAssignmentReminder']['course_id'];\n \t\t\n\t\t//get twitter users array if user is instructor\n \t\t$twitter_users_array = $this->getChildren( $user_id, $course_id );\n\t\t\n \t\t//set display date for assignments\n \t\t$originalDate = $assignmnet_detail['PleAssignmentReminder']['due_date'];\n\t\tif($originalDate != \"\"){\n \t\t$newDate = date(\"F d, Y\", strtotime($originalDate));\n \t\t$due_date = \" due on $newDate\";\n\t\t}else{\n\t\t \t$due_date = \" is due on NA\";\n\t\t }\n \t\t\n \t\t//compose mail date\n \t\t$mail_data = \"Assignment Reminder! $course_id. Your assignment, $body, $due_date.\";\n \t\t$subject = $course_id.\" - \".$body;\n \n\t\t//send the reminder to multiple users\n \t\tforeach ($twitter_users_array as $to_twitter_data ) {\n\t\t$to_twitter = $to_twitter_data['twitter_id'];\n \t\t$to_id = $to_twitter_data['id'];\n \t\t$send_twitter = $this->sendNotification( $to_twitter, $mail_data );\n \n \t\t//check for if facebook reminder sent\n \t\tif ( $send_twitter == 1) {\n \n \t\t\t//remove the previous entry of current date\n \t\t\t$this->PleLastReminderSent->deleteAll(array('PleLastReminderSent.date'=>$ctime, 'PleLastReminderSent.type'=>'twitter'));\n \t\t\t$this->PleLastReminderSent->create();\n \n \t\t\t//update the table for sent facebook reminder\n \t\t\t$data['PleLastReminderSent']['last_sent_rid'] = $assignmnet_detail['PleAssignmentReminder']['id'];\n \t\t\t$data['PleLastReminderSent']['type'] = 'twitter';\n \t\t\t$data['PleLastReminderSent']['date'] = $ctime;\n \t\t\t$this->PleLastReminderSent->save($data);\n \n \t\t\t//create the CSV user data array\n \t\t\t$csv_data = array('id'=>$to_id, 'tid'=>$to_twitter, 'mail_data'=> $mail_data);\n \n \t\t\t//write the csv\n \t\t\t$this->writeTwitterCsv($csv_data);\n \n \t\t\t//unset the csv data array\n \t\t\tunset($csv_data);\n \t\t} else if ( $send_twitter == 2) { //twitter app not following case(can be used for future for notification on dashboard)\n \t\t\t\n \t\t} else {\n \t\t\t//handling for twitter reminder failure\n\t \t\t$tw_data = array();\n\t \t\t$tw_data['AssignmentTwitterFailure']['twitter_id'] = $to_twitter;\n\t \t\t$tw_data['AssignmentTwitterFailure']['mail_data'] = $mail_data;\n\t \t\t$this->AssignmentTwitterFailure->create();\n\t \t\t$this->AssignmentTwitterFailure->save($tw_data);\n \t\t}\n\t\t}\n \t}\n }",
"function pmpro_notifications()\n{\n\tif(current_user_can(\"manage_options\"))\n\t{\n\t\t$pmpro_notification = get_transient(\"pmpro_notification_\" . PMPRO_VERSION);\n\t\tif(empty($pmpro_notification))\n\t\t{\n\t\t\t//set to NULL in case the below times out or fails, this way we only check once a day\n\t\t\tset_transient(\"pmpro_notification_\" . PMPRO_VERSION, 'NULL', 86400);\n\n\t\t\t//figure out which server to get from\n\t\t\tif(is_ssl())\n\t\t\t{\n\t\t\t\t$remote_notification = wp_remote_get(\"https://notifications.paidmembershipspro.com/?v=\" . PMPRO_VERSION);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$remote_notification = wp_remote_get(\"http://notifications.paidmembershipspro.com/?v=\" . PMPRO_VERSION);\n\t\t\t}\n\n\t\t\t//get notification\n\t\t\t$pmpro_notification = wp_remote_retrieve_body($remote_notification);\n\n\t\t\t//update transient if we got something\n\t\t\tif(!empty($pmpro_notification))\n\t\t\t\tset_transient(\"pmpro_notification_\" . PMPRO_VERSION, $pmpro_notification, 86400);\n\t\t}\n\n\t\tif($pmpro_notification && $pmpro_notification != \"NULL\")\n\t\t{\n\t\t?>\n\t\t<div id=\"pmpro_notifications\">\n\t\t\t<?php echo $pmpro_notification; ?>\n\t\t</div>\n\t\t<?php\n\t\t}\n\t}\n\n\t//exit so we just show this content\n\texit;\n}",
"public function broadcastWith()\n {\n $this->comment->user; // This patch allowes to send user along with the event object \n $this->comment->event; // This patch allowes to send event along with the event object \n\n return ['comment' => $this->comment];\n }",
"function RequestData () {\n\n\t\t//create GRequest object + post xml (googlecart.php line: 962)\n\t\trequire_once('library/googlerequest.php');\n\t\t$GRequest = new GoogleRequest($this->merchant_id, $this->merchant_key);\n\n\t\twhile($this->has_more_notifications == \"true\") {\n\t\t\t$this->poll_request_xml = $this->GetPollRequestXML();\n\t\t\t$this->poll_result = $GRequest->SendReq($this->server_url,\n\t\t\t\t$GRequest->GetAuthenticationHeaders(), $this->poll_request_xml);\n\n\t\t\t//Check response code\n\t\t\tif($this->poll_result[0] == \"200\") {\n\t\t\t\t$this->ExtractNotifications();\n\t\t\t}\n\t\t\telse return false;\n\n\t\t\tif($this->get_all_notifications == false) {\n\t\t\t\t$this->has_more_notifications == \"false\";\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"public function fillAttributes($params)\n {\n $this->fill($params);\n\n $this->data = \"[]\";\n\n // set delay time\n switch ($this->event_type) {\n case self::TYPE_LIST_SUBSCRIPTION:\n case self::TYPE_LIST_UNSUBSCRIPTION:\n case self::TYPE_SUBSCRIBER_EVENT:\n case self::TYPE_CUSTOM_CRITERIA:\n // Delay time\n $this->updateData([\n 'delay_type' => isset($params[\"delay_type\"]) ? $params[\"delay_type\"] : 'before',\n 'delay_value' => isset($params[\"delay_value\"]) ? $params[\"delay_value\"] : '0',\n 'delay_unit' => isset($params[\"delay_unit\"]) ? $params[\"delay_unit\"] : 'day',\n 'at' => isset($params[\"at\"]) ? \\Acelle\\Library\\Tool::systemTimeFromString('2017-07-07' . $params[\"at\"], \\Auth::user()->timezone)->format('H:i') : '',\n ]);\n break;\n }\n\n // fill other options\n switch ($this->event_type) {\n case self::TYPE_SPECIFIC_DATETIME:\n // send at specific date\n if(!empty($params[\"specific_day\"]) && !empty($params[\"specific_time\"])) {\n $send_at = \\Acelle\\Library\\Tool::systemTimeFromString($params[\"specific_day\"].' '.$params[\"specific_time\"], \\Auth::user()->timezone);\n $this->updateData([\n 'datetime' => $send_at->toAtomString()\n ]);\n }\n break;\n case self::TYPE_WEEKLY_RECURRING:\n if(!empty($params[\"weekly_recurring_weekdays\"])) {\n $this->updateData([\n 'weekdays' => $params[\"weekly_recurring_weekdays\"]\n ]);\n }\n if(!empty($params[\"weekly_recurring_weeks\"])) {\n $this->updateData([\n 'weeks' => $params[\"weekly_recurring_weeks\"]\n ]);\n }\n if(!empty($params[\"weekly_recurring_months\"])) {\n $this->updateData([\n 'months' => $params[\"weekly_recurring_months\"]\n ]);\n }\n if(!empty($params[\"weekly_recurring_time\"])) {\n $send_at = \\Acelle\\Library\\Tool::systemTimeFromString('2000-01-01 '.$params[\"weekly_recurring_time\"], \\Auth::user()->timezone);\n $this->updateData([\n 'time' => $send_at->toAtomString()\n ]);\n }\n break;\n case self::TYPE_MONTHLY_RECURRING:\n if(!empty($params[\"monthly_recurring_days\"])) {\n $this->updateData([\n 'days' => $params[\"monthly_recurring_days\"]\n ]);\n }\n if(!empty($params[\"monthly_recurring_months\"])) {\n $this->updateData([\n 'months' => $params[\"monthly_recurring_months\"]\n ]);\n }\n if(!empty($params[\"monthly_recurring_time\"])) {\n $send_at = \\Acelle\\Library\\Tool::systemTimeFromString('2000-01-01 '.$params[\"monthly_recurring_time\"], \\Auth::user()->timezone);\n $this->updateData([\n 'time' => $send_at->toAtomString()\n ]);\n }\n break;\n case self::TYPE_SUBSCRIBER_EVENT:\n $this->updateData([\n 'event' => isset($params[\"subscriber_event\"]) ? $params[\"subscriber_event\"] : ''\n ]);\n break;\n case self::TYPE_CUSTOM_CRITERIA:\n if(!empty($params[\"custom_criteria\"])) {\n $this->updateData([\n 'criteria' => $params[\"custom_criteria\"]\n ]);\n }\n case self::TYPE_FOLLOW_UP:\n case self::TYPE_FOLLOW_UP_OPENED:\n case self::TYPE_FOLLOW_UP_NOT_OPENED:\n case self::TYPE_FOLLOW_UP_CLICKED:\n case self::TYPE_FOLLOW_UP_NOT_CLICKED:\n // if(!isset($params[\"delay_value\"]) && !isset($params[\"delay_unit\"])) {\n $this->updateData([\n 'delay_type' => 'after',\n 'delay_value' => $params[\"delay_value\"],\n 'delay_unit' => $params[\"delay_unit\"]\n ]);\n // }\n break;\n }\n }",
"function ef_notifications_form_node_callback($form, $form_state) {\n if ($form['options']['#access']) {\n return $form['options']['workflow_notification'];\n }\n return $form['revision_information']['workflow_notification'];\n}",
"function updateNotification(){\n $id= $_GET['id'];\n $userid = $_SESSION[ADMIN_USER_SESS_KEY]['userId'];\n $where = array('referenceId'=>$id,'notificationFor'=>$userid);\n $data = array('isRead'=>1); \n $update = $this->common_model->updateFields(NOTIFICATIONS, $data, $where);\n if($update){\n echo json_encode(array('status'=>1));die(); \n }\n }",
"function send_notification($user,$i) {\r\n # get PO1 email address\r\n # @$po_num = string, po1, po2, po3\r\n $usrmgr = instantiate_module('usrmgr');\r\n $row = $usrmgr->get_row(array('username'=>$user));\r\n assert($row);\r\n $row['email'];\r\n\r\n $h = array();\r\n $h['from'] = $GLOBALS['mail_from'];\r\n $h['to'] = $row['email'];\r\n $h['subject'] = 'PO3 Has not accept new project after 7 days from partner '.$this->ds->partner_id[$i];\r\n $h['body'] = <<<__END__\r\nHello $user, PO3 has not accepted this project entered by Partner {$this->ds->partner_id[$i]}\r\n\r\nRegistration Number: {$this->ds->project_id[$i]}\r\nProject Name: {$this->ds->name[$i]}\r\n\r\n--\r\n dswbot\r\n\r\n__END__;\r\n\r\n supermailer($h);\r\n\r\n\r\n }",
"protected function _generateParams()\r\n { \r\n $this->_transactionalParams = array('EmailAddress' =>$this->_emailPostedData['emailInfos'], 'storeId'=>$this->_emailPostedData['storeId']);\r\n $this->_mapValuesWithAttributes(); \r\n }",
"function notifications()\r\r\n\t{\r\r\n\t\t$table \t\t\t\t\t\t\t= 'notifications';\r\r\n\t\t$condition \t\t\t\t\t\t= '';\r\r\n\t\tif ($this->uri->segment(3)) {\r\r\n\t\t\t$notificationId \t\t\t= $this->uri->segment(3);\r\r\n\t\t\t$condition['nid'] \t\t\t= $notificationId;\t\t\t\r\r\n\t\t}\r\r\n\t\t$notifications \t\t\t\t\t= $this->base_model->fetch_records_from(\r\r\n\t\t$table, \r\r\n\t\t$condition, \r\r\n\t\t$select \t\t\t\t\t\t= '*', \r\r\n\t\t$order_by \t\t\t\t\t\t= ''\r\r\n\t\t);\r\r\n\t\t$this->data['notifications'] \t= $notifications;\r\r\n\t\tif ($this->uri->segment(3)) {\r\r\n\t\t\t$this->data['notificationTitle'] = $notifications[0]->title;\r\r\n\t\t}\r\r\n\t\t$this->data['content'] \t\t\t= 'general/notifications';\r\r\n\t\t$this->_render_page('temp/template', $this->data);\r\r\n\t}",
"function notification()\n{\n\n $correo = isset($_POST['correo'])?$_POST['correo']:'';\n $name = isset($_POST['fullname'])?$_POST['fullname']:'';\n $usuario = isset($_POST['usuario'])?$_POST['usuario']:'';\n $clave = isset($_POST['clave'])?$_POST['clave']:'';\n $sendmail= isset($_POST['sendmail'])?$_POST['sendmail']:'';\n if(false == empty($clave) && ($sendmail == 'Y')){\n \n $mail = new Zend_Mail('UTF-8');\n $mail->setBodyText(\"Sr(a) {$name}, esta es su información de ingreso para el sistema Enlazamundos\\r\\n\\r\\nUsuario:{$usuario}\\r\\nClave:{$clave}\");\n $mail->setFrom('[email protected] ', 'Programa Enlazamundos');\n $mail->addTo($correo);\n $mail->setSubject('Confirmación de registro Enlazamundos');\n $mail->send();\n return;\n }\n}",
"public function __construct($notification)\n {\n parent::__construct($notification);\n }",
"private function subNotifiable()\n\t{\n\t\t// Load the \"akeebasubs\" plugins\n\t\tJLoader::import('joomla.plugin.helper');\n\t\tJPluginHelper::importPlugin('akeebasubs');\n\t\t$app = JFactory::getApplication();\n\t\t\n\t\t// We don't care to trigger plugins when certain fields change\n\t\t$ignoredFields = array(\n\t\t\t'notes', 'processor', 'processor_key', 'net_amount', 'tax_amount',\n\t\t\t'gross_amount', 'tax_percent', 'params', 'akeebasubs_coupon_id',\n\t\t\t'akeebasubs_upgrade_id', 'akeebasubs_affiliate_id',\n\t\t\t'affiliate_comission', 'akeebasubs_invoice_id', 'prediscount_amount',\n\t\t\t'discount_amount', 'contact_flag', 'first_contact', 'second_contact'\n\t\t);\n\t\t\n\t\t$info = array(\n\t\t\t'status'\t=>\t'unmodified',\n\t\t\t'previous'\t=> empty($this->_selfCache) ? null : $this->_selfCache,\n\t\t\t'current'\t=> clone $this,\n\t\t\t'modified'\t=> null\n\t\t);\n\t\t\n\t\tif(is_null($this->_selfCache) || !is_object($this->_selfCache)) {\n\t\t\t$info['status'] = 'new';\n\t\t\t$info['modified'] = clone $this;\n\t\t} else {\n\t\t\t$modified = array();\n\t\t\tforeach($this->_selfCache as $key => $value) {\n\t\t\t\t// Skip private fields\n\t\t\t\tif(substr($key,0,1) == '_') continue;\n\t\t\t\t// Skip ignored fileds\n\t\t\t\tif(in_array($key, $ignoredFields)) continue;\n\t\t\t\t// Check if the value has changed\n\t\t\t\tif($this->$key != $value) {\n\t\t\t\t\t$info['status'] = 'modified';\n\t\t\t\t\t$modified[$key] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$info['modified'] = (object)$modified;\n\t\t}\n\t\t\n\t\tif($info['status'] != 'unmodified') {\n\t\t\t// Fire plugins (onAKSubscriptionChange) passing ourselves as a parameter\n\t\t\t$jResponse = $app->triggerEvent('onAKSubscriptionChange', array($this, $info));\n\t\t}\n\t\t\n\t\t$this->_selfCache = clone $this;\n\t\t\n\t\treturn true;\n\t}",
"function oqp_bp_screen_notification_settings() {\r\n\t//check if at least one form has notifications enabled\r\n\t$forms_slugs = oqp_get_forms_page_ids();\r\n\tforeach ($forms_slugs as $form_slug) {\r\n\t\t$form = oqp_get_form_options($form_slug);\r\n\t\tif (!$form[email_notifications_enabled]) continue;\r\n\t\t$forms_notifications=true;\r\n\t}\r\n\tif (!$forms_notifications) return false;\r\n\t\r\n\t\r\n\t?>\r\n\t<table class=\"notification-settings zebra\" id=\"oqp-notification-settings\">\r\n\t\t<thead>\r\n\t\t\t<tr>\r\n\t\t\t\t<th class=\"icon\"></th>\r\n\t\t\t\t<th class=\"title\"><?php _e( 'One Quick Post', 'oqp' ) ?></th>\r\n\t\t\t\t<th class=\"yes\"><?php _e( 'Yes', 'buddypress' ) ?></th>\r\n\t\t\t\t<th class=\"no\"><?php _e( 'No', 'buddypress' )?></th>\r\n\t\t\t</tr>\r\n\t\t</thead>\r\n\r\n\t\t<tbody>\r\n\t\t\t<tr>\r\n\t\t\t\t<td></td>\r\n\t\t\t\t<td><?php _e( 'One of your post is awaiting moderation', 'oqp' ) ?></td>\r\n\t\t\t\t<td class=\"yes\"><input type=\"radio\" name=\"notifications[notification_oqp_pending_post]\" value=\"yes\" <?php if ( !get_user_meta( get_current_user_id(), 'notification_oqp_pending_post', true ) || 'yes' == get_user_meta( get_current_user_id(), 'notification_oqp_pending_post', true ) ) { ?>checked=\"checked\" <?php } ?>/></td>\r\n\t\t\t\t<td class=\"no\"><input type=\"radio\" name=\"notifications[notification_oqp_pending_post]\" value=\"no\" <?php if ( 'no' == get_user_meta( get_current_user_id(), 'notification_oqp_pending_post', true ) ) { ?>checked=\"checked\" <?php } ?>/></td>\r\n\t\t\t</tr>\r\n\t\t\t<tr>\r\n\t\t\t\t<td></td>\r\n\t\t\t\t<td><?php _e( 'One of your post is published', 'oqp' ) ?></td>\r\n\t\t\t\t<td class=\"yes\"><input type=\"radio\" name=\"notifications[notification_oqp_approved_post]\" value=\"yes\" <?php if ( !get_user_meta( get_current_user_id(), 'notification_oqp_approved_post', true ) || 'yes' == get_user_meta( get_current_user_id(), 'notification_oqp_approved_post', true ) ) { ?>checked=\"checked\" <?php } ?>/></td>\r\n\t\t\t\t<td class=\"no\"><input type=\"radio\" name=\"notifications[notification_oqp_approved_post]\" value=\"no\" <?php if ( 'no' == get_user_meta( get_current_user_id(), 'notification_oqp_approved_post', true ) ) { ?>checked=\"checked\" <?php } ?>/></td>\r\n\t\t\t</tr>\r\n\t\t\t<tr>\r\n\t\t\t\t<td></td>\r\n\t\t\t\t<td><?php _e( 'One of your post has been deleted', 'oqp' ) ?></td>\r\n\t\t\t\t<td class=\"yes\"><input type=\"radio\" name=\"notifications[notification_oqp_deleted_post]\" value=\"yes\" <?php if ( !get_user_meta( get_current_user_id(), 'notification_oqp_deleted_post', true ) || 'yes' == get_user_meta( get_current_user_id(), 'notification_oqp_deleted_post', true ) ) { ?>checked=\"checked\" <?php } ?>/></td>\r\n\t\t\t\t<td class=\"no\"><input type=\"radio\" name=\"notifications[notification_oqp_deleted_post]\" value=\"no\" <?php if ( 'no' == get_user_meta( get_current_user_id(), 'notification_oqp_deleted_post', true ) ) { ?>checked=\"checked\" <?php } ?>/></td>\r\n\t\t\t</tr>\r\n\t\t\t<?php do_action( 'oqp_bp_screen_notification_settings' ) ?>\r\n\t\t</tbody>\r\n\t</table>\r\n<?php\r\n}",
"function _thumbwhere_content_collection_item_notify() {\n\n if (twCanDebug()) {\n watchdog('thumbwhere_content_collection_item', 'incoming notification.');\n }\n\n $numargs = func_num_args();\n $arg_list = func_get_args();\n\n \n\tif (twCanDebug()) debug('$numargs = ' . $numargs);\n\t\n\tif (twCanDebug()) debug('$arg_list = ' . $arg_list);\n\t\n\tif (twCanDebug()) debug('$_REQUEST');\n\tif (twCanDebug()) debug($_REQUEST);\n\t\n\tif (twCanDebug()) debug('$_GET');\n\tif (twCanDebug()) debug($_GET);\n\t\n\tif (twCanDebug()) debug('$_POST');\n\tif (twCanDebug()) debug($_POST);\n\t\n\t//if (twCanDebug()) debug('$HTTP_RAW_POST_DATA');\n\t//if (twCanDebug()) debug($HTTP_RAW_POST_DATA);\n\t\n\tif (twCanDebug()) debug('$_SERVER');\n\tif (twCanDebug()) debug($_SERVER);\n\t\n\t//if (twCanDebug()) debug('$GLOBALS');\n\t//if (twCanDebug()) debug($GLOBALS);\n\n \n\n if (variable_get('thumbwhere_api_log_debug', 0) == 1) {\n foreach ($arg_list as $arg) {\n if (twCanDebug()) debug('$arg = ' . $arg);\n }\n }\n\n\n //////////////////////////////////////////////////\n //\n //\n\n switch ($_SERVER['REQUEST_METHOD']) {\n\n case 'POST': {\n if ($numargs == 1) {\n if ($arg_list[0] == 'content_collection_item') {\n\n //\n // Get the POST data as XML\n //\n\n $post_xml = new SimpleXMLElement('php://input', null, true);\n if (twCanDebug()) debug('$post_xml');\n if (twCanDebug()) debug($post_xml);\n\n if (twCanDebug()) debug('$post_xml->getName()');\n if (twCanDebug()) debug($post_xml->getName());\n\n // We expect 'action' as the root element. TODO: I would rather this was the more generic 'request'\n if ($post_xml->getName() != 'action') {\n drupal_add_http_header('Status', '404 not found.');\n print('We were expecting \\'action\\', as the root element, not \\'' . $post_xml->getName() . '\\'.');\n exit(0);\n }\n\n /*\n * SimpleXMLElement::__set_state(array(\n * 'content_collection_item' =>\n * SimpleXMLElement::__set_state(array(\n * '@attributes' =>\n * array (\n * 'key' => '8e9ff318-3cd7-4593-99de-4c37c0fb335a',\n * 'op' => 'create',\n * ),\n * )),\n * ))\n */\n\n\n // We expect 'action' as the root element.\n if (!isset($post_xml->content_collection_item)) {\n drupal_add_http_header('Status', '404 not found.');\n print('We were expecting a \\'content_collection_item\\', element in the action payload.');\n exit(0);\n }\n\n // Handle the incoming notification for content ingest\n _thumbwhere_handle_content_collection_item_notify_xml($post_xml->content_collection_item);\n\n }\n else {\n drupal_add_http_header('Status', '404 not found.');\n print('Invalid resource');\n exit(0);\n }\n }\n else {\n drupal_add_http_header('Status', '404 not found.');\n print('Invalid notification request url format.');\n exit(0);\n }\n }\n break;\n\n case 'GET': {\n\n if ($numargs == 1) {\n\n // If we are returning the index.xml file for the webservice.\n if ($arg_list[0] == 'index.xml') {\n // return index.xml\n drupal_add_http_header('Content-Type', 'text/xml');\n readfile(dirname(__FILE__) . '/index.xml');\n exit(0);\n }\n else {\n drupal_add_http_header('Status', '404 not found.');\n print('File not found.');\n exit(0);\n }\n }\n else {\n drupal_add_http_header('Status', '404 not found.');\n print('Invalid notification request url format.');\n exit(0);\n }\n }\n break;\n\n default: {\n drupal_add_http_header('Status', '404 not found.');\n exit(0);\n }\n break;\n }\n\n //\n //\n ////////////////////////////////////////////////////////////////////////////////////\n \n}",
"public function __construct()\n {\n //Database notification\n $this->title = '';\n $this->subtitle = '';\n $this->icon = '';\n $this->type = '';\n $this->actions = [\n 'link' => '#'\n ];\n }",
"public function parameters($notifiable)\n\t{\n\t\treturn [\n\t\t\t'app_name' => config('app.name'),\n\t\t\t'token' => $this->trade ? $this->trade->id : null,\n\t\t\t'chat_id' => $this->trade ? $this->trade->chat_id : null,\n\t\t\t'user_name' => $notifiable->name,\n\t\t];\n\t}",
"private function notifyHREB() {\r\n require_once('classes/tracking/notifications/Notifications.php');\r\n require_once('classes/tracking/notifications/HREBNotification.php');\r\n\r\n $piDetails = $this->getPIDisplayDetails();\r\n $piName = $piDetails['firstName'] . \" \" . $piDetails['lastName'];\r\n $subject = sprintf('[TID-%s] Tracking form submitted online [%s]', $this->trackingFormId, $piName);\r\n $emailBody = sprintf('A tracking form was submitted online :\r\n\r\nTracking ID : %s\r\nTitle : \"%s\"\r\nPrincipal Investigator : %s\r\nDepartment : %s\r\n\r\n', $this->trackingFormId, $this->projectTitle, $piName, $piDetails['departmentName']);\r\n\r\n $HREBNotification = new HREBNotification($subject, $emailBody);\r\n try {\r\n $HREBNotification->send();\r\n } catch(Exception $e) {\r\n printf('Error: Unable to send email notification to HREB : '. $e);\r\n }\r\n }",
"public function getMerchantNotificationConfiguration($requestParameters = array());",
"function send_notification_mail($notification_array){\n\t\n\t$type = $notification_array['type'];\n\t\n\t//To send follow notification email\t\n\tif($type === 'follow'){\n\t\t\n\t\t$following_username = $notification_array['following_username'];\n\t\t$followed_username = $notification_array['followed_username'];\n\t\t$to_email = $followed_email = $notification_array['followed_email'];\n\t\n\t}\n\t//To send comment notification email\t\n\telseif($type === 'comment'){\n\t\t\n\t\t$commentAuthorUsername = $notification_array['commentAuthorUsername'];\n\t\t$postAuthorUsername = $notification_array['postAuthorUsername'];\n\t\t$to_email = $postAuthorEmail = $notification_array['postAuthorEmail'];\n\t}\n\t//To send like notification email\t\n\telseif($type === 'like'){\n\t\t\n\t\t$likerUsername = $notification_array['likerUsername'];\n\t\t$postAuthorUsername = $notification_array['postAuthorUsername'];\n\t\t$to_email = $postAuthorEmail = $notification_array['postAuthorEmail'];\n\t}\n\t\n\tob_start();\n\tinclude('email_templates/notification.php');\n\t$notification_template = ob_get_contents();\t\t\t\n\tob_end_clean();\n\t\n\t\n\t\n\t$to = '[email protected]'; \n\t/*$to = $to_email; //please uncomment this when in live*/\n\t$strSubject = \"Notification mail\";\n\t$message = $notification_template; \n\t$headers = 'MIME-Version: 1.0'.\"\\r\\n\";\n\t$headers .= 'Content-type: text/html; charset=iso-8859-1'.\"\\r\\n\";\n\t$headers .= \"From: [email protected]\"; \n\t\n\tif(mail($to, $strSubject, $message, $headers)){\n\t\treturn 'Mail send successfully';\n\t}else{\n\t\treturn 'Could not send email';\n\t} \n\t\n}",
"public function user_notification(){\n $apiData = array();\n $this->loadModel('Post');\n $this->loadModel('Event');\n $this->loadModel('Notification');\n $id = $this->Auth->user('id');\n $notification = $this->Notification->getNotification($id);\n if(!empty($notification)) {\n $data = array();\n $keyValue = Hash::combine($notification ,'{n}.Notification.object_id','{n}.Notification.object_id','{n}.Notification.object_type');\n foreach ($keyValue as $key => $value) {\n switch($key){\n case OBJECT_TYPE_EVENT: \n $data[OBJECT_TYPE_EVENT] = $this->Event->getEventNotification(array_values($value));\n break;\n case OBJECT_TYPE_POST:\n $data[OBJECT_TYPE_POST] = $this->Post->getPostNotification(array_values($value));\n break;\n case OBJECT_TYPE_LEAVE:\n $data[OBJECT_TYPE_LEAVE] = $this->Leave->getLeaveNotification(array_values($value));\n break;\n case OBJECT_TYPE_BIRTHADAY:\n $data[OBJECT_TYPE_BIRTHADAY] = $this->Birthday->getBirthdayNotification(array_values($value));\n break;\n default:\n echo \"No information available for that day.\";\n break;\n }\n } \n }\n if(!empty($data)) {\n $apiData = $this->getFormatedData($notification, $data);\n }\n return $apiData;\n }",
"public function getapidetailsAction() {\n\t\t$this->loadLayout();\n\t\t$this->getLayout()->getBlock('logicbrokernotification')->setConfigValue(array(\n\t\t\t\t\t\t'scope' => 'default',\n\t\t\t\t\t\t'scope_id' => '0',\n\t\t\t\t\t\t'path' => 'logicbroker_integration/integration/notificationstatus',\n\t\t\t\t\t\t'value' => '0',\n\t\t\t\t));\n\t\tMage::app()->getCacheInstance()->cleanType('config');\t\t\n\t\tMage::getSingleton('adminhtml/session')->setNotification(false);\n\t\t$this->_redirectReferer();\n\t}",
"function wp_send_new_user_notifications($user_id, $notify = 'both')\n {\n }",
"function ihc_send_user_notifications($u_id=FALSE, $notification_type='', $l_id=FALSE, $dynamic_data=array(), $subject='', $message=''){\n\tglobal $wpdb;\n\t$sent = FALSE;\n\tif ($u_id && $notification_type){\n\t\t$admin_case = array(\n\t\t\t\t\t\t\t'admin_user_register',\n\t\t\t\t\t\t\t'admin_before_user_expire_level',\n\t\t\t\t\t\t\t'admin_second_before_user_expire_level',\n\t\t\t\t\t\t\t'admin_third_before_user_expire_level',\n\t\t\t\t\t\t\t'admin_user_expire_level',\n\t\t\t\t\t\t\t'admin_user_payment',\n\t\t\t\t\t\t\t'admin_user_profile_update',\n\t\t\t\t\t\t\t'ihc_cancel_subscription_notification-admin',\n\t\t\t\t\t\t\t'ihc_delete_subscription_notification-admin',\n\t\t\t\t\t\t\t'ihc_order_placed_notification-admin',\n\t\t\t\t\t\t\t'ihc_new_subscription_assign_notification-admin',\n\t\t);\n\n\t\tif (empty($subject) || empty($message)){ /// SEARCH INTO DB FOR NOTIFICATION TEMPLATE\n\t\t\tif ($l_id!==FALSE && $l_id>-1){\n\t\t\t\t$q = $wpdb->prepare(\"SELECT id,notification_type,level_id,subject,message,pushover_message,pushover_status,status FROM \" . $wpdb->prefix . \"ihc_notifications\n\t\t\t\t\t\t\t\t\t\tWHERE 1=1\n\t\t\t\t\t\t\t\t\t\tAND notification_type=%s\n\t\t\t\t\t\t\t\t\t\tAND level_id=%d\n\t\t\t\t\t\t\t\t\t\tORDER BY id DESC LIMIT 1;\", $notification_type, $l_id);\n\t\t\t\t$data = $wpdb->get_row($q);\n\t\t\t\tif ($data){\n\t\t\t\t\t\t$subject = @$data->subject;\n\t\t\t\t\t\t$message = @$data->message;\n\n\t\t\t\t\t\t$domain = 'ihc';\n\t\t\t\t\t\t$languageCode = get_user_meta( $u_id, 'ihc_locale_code', true );\n\t\t\t\t\t\t$wmplName = $notification_type . '_title_' . $l_id;\n\t\t\t\t\t\t$subject = apply_filters( 'wpml_translate_single_string', $subject, $domain, $wmplName, $languageCode );\n\t\t\t\t\t\t$wmplName = $notification_type . '_message_' . $l_id;\n\t\t\t\t\t\t$message = apply_filters( 'wpml_translate_single_string', $message, $domain, $wmplName, $languageCode );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($l_id===FALSE || $l_id==-1 || empty($data)){\n\t\t\t\t$q = $wpdb->prepare(\"SELECT id,notification_type,level_id,subject,message,pushover_message,pushover_status,status FROM \" . $wpdb->prefix . \"ihc_notifications\n\t\t\t\t\t\t\t\t\t\tWHERE 1=1\n\t\t\t\t\t\t\t\t\t\tAND notification_type=%s\n\t\t\t\t\t\t\t\t\t\tAND level_id='-1'\n\t\t\t\t\t\t\t\t\t\tORDER BY id DESC LIMIT 1;\", $notification_type);\n\t\t\t\t$data = $wpdb->get_row($q);\n\t\t\t\tif ($data){\n\t\t\t\t\t\t$subject = @$data->subject;\n\t\t\t\t\t\t$message = @$data->message;\n\n\t\t\t\t\t\t$domain = 'ihc';\n\t\t\t\t\t\t$languageCode = get_user_meta( $u_id, 'ihc_locale_code', true );\n\t\t\t\t\t\t$wmplName = $notification_type . '_title_-1';\n\t\t\t\t\t\t$subject = apply_filters( 'wpml_translate_single_string', $subject, $domain, $wmplName, $languageCode );\n\t\t\t\t\t\t$wmplName = $notification_type . '_message_-1';\n\t\t\t\t\t\t$message = apply_filters( 'wpml_translate_single_string', $message, $domain, $wmplName, $languageCode );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (!empty($message)){\n\t\t\t$from_name = get_option('ihc_notification_name');\n\t\t\tif (!$from_name){\n\t\t\t\t$from_name = get_option(\"blogname\");\n\t\t\t}\n\t\t\t//user levels\n\t\t\t$level_list_data = get_user_meta($u_id, 'ihc_user_levels', true);\n\t\t\tif (isset($level_list_data)){\n\t\t\t\t$level_list_data = explode(',', $level_list_data);\n\t\t\t\tforeach ($level_list_data as $id){\n\t\t\t\t\t$temp_level_data = ihc_get_level_by_id($id);\n\t\t\t\t\t$level_list_arr[] = $temp_level_data['label'];\n\t\t\t\t}\n\t\t\t\tif ($level_list_arr){\n\t\t\t\t\t$level_list = implode(',', $level_list_arr);\n\t\t\t\t}\n\t\t\t}\n\t\t\t//user data\n\t\t\t$u_data = get_userdata($u_id);\n\t\t\t$user_email = '';\n\t\t\tif ($u_data && !empty($u_data->data) && !empty($u_data->data->user_email)){\n\t\t\t\t$user_email = $u_data->data->user_email;\n\t\t\t}\n\t\t\t//from email\n\t\t\t$from_email = get_option('ihc_notification_email_from');\n\t\t\tif (!$from_email){\n\t\t\t\t$from_email = get_option('admin_email');\n\t\t\t}\n\t\t\t$message = ihc_replace_constants($message, $u_id, $l_id, $l_id, $dynamic_data);\n\t\t\t$subject = ihc_replace_constants($subject, $u_id, $l_id, $l_id, $dynamic_data);\n\t\t\t$message = stripslashes(htmlspecialchars_decode(ihc_format_str_like_wp($message)));\n\t\t\t$message = apply_filters('ihc_send_notification_filter_message', $message, $u_id, $l_id, $notification_type);\n\t\t\t$message = \"<html><head></head><body>\" . $message . \"</body></html>\";\n\t\t\tif ($subject && $message && $user_email){\n\t\t\t\tif (in_array($notification_type, $admin_case)){\n\t\t\t\t\t/// SEND NOTIFICATION TO ADMIN, (we change the destination)\n\t\t\t\t\t$admin_email = get_option('ihc_notification_email_addresses');\n\t\t\t\t\tif (empty($admin_email)){\n\t\t\t\t\t\t$user_email = get_option('admin_email');\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$user_email = $admin_email;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!empty($from_email) && !empty($from_name)){\n\t\t\t\t\t$headers[] = \"From: $from_name <$from_email>\";\n\t\t\t\t}\n\t\t\t\t$headers[] = 'Content-Type: text/html; charset=UTF-8';\n\t\t\t\t$sent = wp_mail($user_email, $subject, $message, $headers);\n\t\t\t}\n\t\t}\n\t\t/// PUSHOVER\n\t\tif (ihc_is_magic_feat_active('pushover')){\n\t\t\t$send_to_admin = in_array($notification_type, $admin_case) ? TRUE : FALSE;\n\t\t\trequire_once IHC_PATH . 'classes/Ihc_Pushover.class.php';\n\t\t\t$pushover_object = new Ihc_Pushover();\n\t\t\t$pushover_object->send_notification($u_id, $l_id, $notification_type, $send_to_admin);\n\t\t}\n\t\t/// PUSHOVER\n\t}\n\treturn $sent;\n}",
"protected function setNotificationParam(Notifications $notification)\n {\n $this->notification = $notification;\n $this->content = $this->notificationService->getContentsForNotification($notification);\n }",
"function prefs_list($args)\n {\n if ($args['section'] != 'mailbox') {\n return $args;\n }\n\n // Load configuration\n $this->load_config();\n\n // Load localization and configuration\n $this->add_texts('localization/');\n\n if (!empty($_REQUEST['_framed'])) {\n $this->rc->output->add_label('newmail_notifier.title', 'newmail_notifier.testbody',\n 'newmail_notifier.desktopunsupported', 'newmail_notifier.desktopenabled', 'newmail_notifier.desktopdisabled');\n $this->include_script('newmail_notifier.js');\n }\n\n // Check that configuration is not disabled\n $dont_override = (array) $this->rc->config->get('dont_override', array());\n\n foreach (array('basic', 'desktop', 'sound') as $type) {\n $key = 'newmail_notifier_' . $type;\n if (!in_array($key, $dont_override)) {\n $field_id = '_' . $key;\n $input = new html_checkbox(array('name' => $field_id, 'id' => $field_id, 'value' => 1));\n $content = $input->show($this->rc->config->get($key))\n . ' ' . html::a(array('href' => '#', 'onclick' => 'newmail_notifier_test_'.$type.'()'),\n $this->gettext('test'));\n\n $args['blocks']['new_message']['options'][$key] = array(\n 'title' => html::label($field_id, rcube::Q($this->gettext($type))),\n 'content' => $content\n );\n }\n }\n\n $type = 'desktop_timeout';\n $key = 'newmail_notifier_' . $type;\n if (!in_array($key, $dont_override)) {\n $field_id = '_' . $key;\n $select = new html_select(array('name' => $field_id, 'id' => $field_id));\n\n foreach (array(5, 10, 15, 30, 45, 60) as $sec) {\n $label = $this->rc->gettext(array('name' => 'afternseconds', 'vars' => array('n' => $sec)));\n $select->add($label, $sec);\n }\n\n $args['blocks']['new_message']['options'][$key] = array(\n 'title' => html::label($field_id, rcube::Q($this->gettext('desktoptimeout'))),\n 'content' => $select->show((int) $this->rc->config->get($key))\n );\n }\n\n return $args;\n }",
"public function getUpdateNotification(){\n\t\t//render the view\n\t\treturn $this->renderView('update-notification-partial');\n\t}",
"function cmj_slack_notification( $_param1, $_param2 = null, $_param3 = null, $_param4 = null ) {\n // The Slack user name for the person the messages should come from.\n // Create a new user in Slack if you like or use an existing one.\n\t$_username = 'myname';\n // Name of the channel you want messages to appear in (without a preceding hashtag - just the channel name).\n\t$_channel = 'orders';\n // The message you want to send.\n\t$_msg = 'New order to ship #' . intval( $_param1 );\n // This script uses the simple token authentication. If you need something more have fun with OAuth https://api.slack.com/docs/oauth\n // Your Slack API token: https://api.slack.com/docs/oauth-test-tokens\n\t$_token = 'whatever-your-token-is';\n\t$_url = 'https://slack.com/api/chat.postMessage'\n\t\t. '?token=' . $_token\n\t\t. '&username=' . $_username\n\t\t. '&channel=' . $_channel\n\t\t. '&text=' . urlencode( $_msg );\n\t$_json = file_get_contents( $_url ); // you can use the Wordpress function wp_remote_get() instead if you prefer\n return $_json;\n}",
"public function toMailCustom($notifiable)\r\n {\r\n $contact = \\App\\Models\\Contact::findOrFail($notifiable->id);\r\n $notification_attributes = json_decode($contact->list->notification_attributes, true);\r\n $attributes = json_decode($contact->list->attributes);\r\n\r\n\r\n $sending_server = \\App\\Models\\SendingServer::whereId($contact->list->sending_server_id)\r\n ->whereStatus('Active')\r\n ->with('bounce')\r\n ->first();\r\n\r\n if(!empty($sending_server->id)) {\r\n $connection = Helper::configureSendingNode($sending_server->type, $sending_server->sending_attributes);\r\n\r\n if($connection['success']) {\r\n\r\n // If Unsubscribe Email is set to 'Yes' for a list\r\n if($contact->list->double_optin == 'Yes' || $contact->list->welcome_email == 'Yes' || $contact->list->unsub_email == 'Yes') {\r\n // send email to contact \r\n $send_email = false; //' It may possilbe one option is true other false\r\n // Run old emails that have no value set\r\n if(($this->subscriber_email == 'confirm-email-app' || $this->subscriber_email == 'confirm-email-webform') && $contact->list->double_optin == 'Yes') {\r\n if(!empty($attributes->confirmation_email_id)) {\r\n $page = \\App\\Models\\Page::whereId($attributes->confirmation_email_id)->whereAppId($contact->app_id)->first();\r\n } else {\r\n $page = \\App\\Models\\Page::whereSlug($this->subscriber_email)->whereAppId($contact->app_id)->first();\r\n }\r\n $send_email = true;\r\n } elseif($this->subscriber_email == 'welcome-email' && $contact->list->welcome_email == 'Yes') {\r\n if(!empty($attributes->welcome_email_id)) {\r\n $page = \\App\\Models\\Page::whereId($attributes->welcome_email_id)->whereAppId($contact->app_id)->first();\r\n } else {\r\n $page = \\App\\Models\\Page::whereSlug($this->subscriber_email)->whereAppId($contact->app_id)->first();\r\n }\r\n $send_email = true;\r\n } elseif($this->subscriber_email == 'unsub-email' && $contact->list->unsub_email == 'Yes') {\r\n if(!empty($attributes->unsub_email_id)) {\r\n $page = \\App\\Models\\Page::whereId($attributes->unsub_email_id)->whereAppId($contact->app_id)->first();\r\n } else {\r\n $page = \\App\\Models\\Page::whereSlug($this->subscriber_email)->whereAppId($contact->app_id)->first();\r\n }\r\n $send_email = true;\r\n }\r\n\r\n if($send_email) {\r\n $content = Helper::replaceSpintags(Helper::decodeString($page->content_html)); // replace spintags\r\n $content = Helper::replaceCustomFields($content, $contact->customFields); // replace custom field\r\n $content = Helper::replaceSystemVariables($contact, $content, $data_values=[]); // replace system variables\r\n\r\n $subject = Helper::replaceSpintags(Helper::decodeString($page->email_subject)); // replace spintags\r\n $subject = Helper::replaceCustomFields($subject, $contact->customFields); // replace custom field\r\n $subject = Helper::replaceSystemVariables($contact, $subject, $data_values=[]); // replace system variables\r\n\r\n $message = Helper::configureEmailBasicSettings($sending_server);\r\n if(in_array($sending_server->type, Helper::sendingServersFramworkSuported())) {\r\n $message->setTo($contact->email);\r\n $message->setSubject($subject);\r\n $message->setBody($content, \"text/html\");\r\n try {\r\n $connection['transport']->send($message);\r\n $status = 'Sent';\r\n } catch(\\Exception $e) {\r\n //echo $e->getMessage();\r\n $status = 'Failed';\r\n }\r\n } elseif($sending_server->type == 'sendgrid_api') {\r\n $message->addTo($contact->email);\r\n $message->setSubject($subject);\r\n $message->addContent(\"text/html\", $content);\r\n $sendgrid = new \\SendGrid(\\Crypt::decrypt(json_decode($sending_server->sending_attributes)->api_key));\r\n try {\r\n $response = $sendgrid->send($message);\r\n // status start with 2 consider as sent\r\n if(substr($response->statusCode(), 1) == 2) {\r\n $status = 'Sent';\r\n } else {\r\n $status = 'Failed';\r\n }\r\n } catch(\\Exception $e) {\r\n //echo $e->getMessage();\r\n $status = 'Failed';\r\n }\r\n }\r\n\r\n if($status == 'Sent') {\r\n Helper::updateSendingServerCounters($sending_server->id);\r\n }\r\n }\r\n }\r\n\r\n // send notification email\r\n if($contact->list->notification == 'Enabled' && in_array($this->notify_action, $notification_attributes['criteria'])) {\r\n $page = \\App\\Models\\Page::whereSlug($this->notify_email)->whereAppId($contact->app_id)->first();\r\n\r\n $content = Helper::replaceSpintags($page->content_html); // replace spintags\r\n $content = Helper::replaceCustomFields($content, $contact->customFields); // replace custom field\r\n $content = Helper::replaceSystemVariables($contact, $content, $data_values=[]); // replace system variables\r\n\r\n $subject = Helper::replaceSpintags($page->email_subject); // replace spintags\r\n $subject = Helper::replaceCustomFields($subject, $contact->customFields); // replace custom field\r\n $subject = Helper::replaceSystemVariables($contact, $subject, $data_values=[]); // replace system variables\r\n\r\n $message = Helper::configureEmailBasicSettings($sending_server);\r\n if(in_array($sending_server->type, Helper::sendingServersFramworkSuported())) {\r\n $message->setTo($notification_attributes['email']);\r\n $message->setSubject($subject);\r\n $message->setBody($content, \"text/html\");\r\n try {\r\n $connection['transport']->send($message);\r\n $status = 'Sent';\r\n } catch(\\Exception $e) {\r\n //echo $e->getMessage();\r\n $status = 'Failed';\r\n }\r\n } elseif($sending_server->type == 'sendgrid_api') {\r\n $message->addTo($notification_attributes['email']);\r\n $message->setSubject($subject);\r\n $message->addContent(\"text/html\", $content);\r\n $sendgrid = new \\SendGrid(json_decode($sending_server->sending_attributes)->api_key);\r\n try {\r\n $response = $sendgrid->send($message);\r\n $status = 'Sent';\r\n } catch(\\Exception $e) {\r\n //echo $e->getMessage();\r\n $status = 'Failed';\r\n }\r\n }\r\n\r\n if($status == 'Sent') {\r\n Helper::updateSendingServerCounters($sending_server->id);\r\n }\r\n }\r\n } // if($connection['success'])\r\n } // If !empty($sending_server->id)\r\n }",
"function notification($param1 = '', $param2 = '', $param3 = '')\n\t\t{\t\n\t\t\t\n\t\t\tif ($this->session->userdata('parent_login') != 1)\n redirect(base_url(), 'refresh');\n\t\t\t\n\t\t\tif ($param1 == 'create') {\n\t\t\t\t$data['notice_name'] = $this->session->userdata('name');\n\t\t\t\t$data['notice'] = $this->input->post('notice'); \n\t\t\t\t$this->db->insert('noticeboard', $data); \n\t\t\t\t\n\t\t\t\t$this->session->set_flashdata('flash_message' , get_phrase('data_added_successfully'));\n\t\t\t\tredirect(base_url() . 'index.php?parents/notification/', 'refresh');\n\t\t\t} \n\t\t\t\n\t\t\t$page_data['page_name'] = 'notification';\n\t\t\t$page_data['page_title'] = 'Manage Notification';\n\t\t\t$this->db->order_by('notice_id','desc');\n\t\t\t$page_data['notices'] =$this->db->get('noticeboard')->result_array();\n\t\t\t$this->load->view('backend/index', $page_data);\n\t\t}",
"function it_gets_and_sets_the_notify_option()\n {\n $this->doNotify()->shouldReturn(true);\n\n // Set the api key\n $this->setNotify(false);\n\n // Get the current notify status\n $this->doNotify()->shouldReturn(false);\n }",
"function notification_init() {\n\t// Register a notification handler for the default email method\n\tregister_notification_handler(\"email\", \"email_notify_handler\");\n\n\t// Add settings view to user settings & register action\n\telgg_extend_view('forms/account/settings', 'core/settings/account/notifications');\n\n\telgg_register_plugin_hook_handler('usersettings:save', 'user', 'notification_user_settings_save');\n}",
"public function notifyOwner()\n {\n global $config, $reefless, $account_info;\n\n $reefless->loadClass('Mail');\n\n $mail_tpl = $GLOBALS['rlMail']->getEmailTemplate(\n $config['listing_auto_approval']\n ? 'free_active_listing_created'\n : 'free_approval_listing_created'\n );\n\n if ($config['listing_auto_approval']) {\n $link = $reefless->getListingUrl(intval($this->listingID));\n } else {\n $myPageKey = $config['one_my_listings_page'] ? 'my_all_ads' : 'my_' . $this->listingType['Key'];\n $link = $reefless->getPageUrl($myPageKey);\n }\n\n $mail_tpl['body'] = str_replace(\n array('{username}', '{link}'),\n array(\n $account_info['Username'],\n '<a href=\"' . $link . '\">' . $link . '</a>',\n ),\n $mail_tpl['body']\n );\n $GLOBALS['rlMail']->send($mail_tpl, $account_info['Mail']);\n }",
"function show_notifications() {\n\n $is_cl_screen = CL_Common::is_settings_page();\n $transient_key = CL_Common::get_transient_key( 'announcement' );\n $ignore_key = CUSTOM_LOGIN_OPTION . '_ignore_announcement';\n $old_message = get_option( CUSTOM_LOGIN_OPTION . '_announcement_message' );\n $user_meta = get_user_meta( get_current_user_id(), $ignore_key, true );\n $capability = CL_Common::get_option( 'capability', 'general', 'manage_options' );\n\n /**\n * delete_user_meta( get_current_user_id(), $ignore_key, 1 );\n * delete_transient( $transient_key );\n * update_option( CUSTOM_LOGIN_OPTION . '_announcement_message', '' ); //*/\n\n // Current user can't manage options\n if ( ! current_user_can( $capability ) ) {\n return;\n }\n\n if ( ! $is_cl_screen ) {\n\n // Let's not show this at all if not on out menu page. @since 3.1\n return;\n\n // Global notifications\n if ( 'off' === CL_Common::get_option( 'admin_notices', 'general', 'off' ) ) {\n return;\n }\n\n // Make sure 'Frosty_Media_Notifications' isn't activated\n if ( class_exists( 'Frosty_Media_Notifications' ) ) {\n return;\n }\n }\n\n // https://raw.github.com/thefrosty/custom-login/master/extensions.json\n $message_url = esc_url( add_query_arg( array( 'edd_action' => 'cl_announcements' ), trailingslashit( CUSTOM_LOGIN_API_URL ) . 'cl-checkin-api/' ) );\n\n $announcement = CL_Common::wp_remote_get(\n $message_url,\n $transient_key,\n DAY_IN_SECONDS,\n 'CustomLogin' // We need our custom $user_agent\n );\n\n // Bail if errors\n if ( is_wp_error( $announcement ) ) {\n return;\n }\n\n // Bail if false or empty\n if ( ! $announcement || empty( $announcement ) ) {\n return;\n }\n\n if ( trim( $old_message ) !== trim( $announcement->message ) && ! empty( $old_message ) ) {\n delete_user_meta( get_current_user_id(), $ignore_key );\n delete_transient( $transient_key );\n update_option( CUSTOM_LOGIN_OPTION . '_announcement_message', $announcement->message );\n }\n\n $html = '<div class=\"updated\"><p>';\n $html .= ! $is_cl_screen ? // If we're on our settings page let not show the dismiss notice link.\n sprintf( '%2$s <span class=\"alignright\">| <a href=\"%3$s\">%1$s</a></span>',\n __( 'Dismiss', CUSTOM_LOGIN_DIRNAME ),\n $announcement->message,\n esc_url( add_query_arg( $ignore_key, wp_create_nonce( $ignore_key ), admin_url( 'options-general.php?page=custom-login' ) ) ),\n esc_url( admin_url( 'options-general.php?page=custom-login#custom_login_general' ) )\n ) :\n sprintf( '%s', $announcement->message );\n $html .= '</p></div>';\n\n if ( ( ! $user_meta && 1 !== $user_meta ) || $is_cl_screen ) {\n echo $html;\n }\n }",
"private function _updateInternalMessage()\n {\n $from = trim($this->_generalSettings->getFrom());\n $from_name = trim($this->_generalSettings->getFromName());\n $reply_to = trim($this->_generalSettings->getReplyTo());\n $categories = explode(',', $this->_generalSettings->getCategories());\n $template = trim($this->_generalSettings->getTemplateID());\n $asm_group_id = trim($this->_generalSettings->getAsmGroupId());\n\n $xsmtpapi_header['category'] = [ 'magento2_sendgrid_plugin' ];\n foreach ($categories as $category) {\n $xsmtpapi_header['category'][] = trim($category);\n }\n\n if (! empty($template)) {\n $xsmtpapi_header['filters']['templates']['settings']['enable'] = 1;\n $xsmtpapi_header['filters']['templates']['settings']['template_id'] = $template;\n }\n\n // asm group id\n if ($asm_group_id != false and $asm_group_id != 0) {\n $xsmtpapi_header['asm_group_id'] = intval($asm_group_id);\n }\n\n if (! empty($from)) {\n $this->_message->setFrom($from);\n }\n\n if (! empty($from_name) and ! empty($from)) {\n $this->_message->setFrom($from, $from_name);\n }\n\n if (! empty($from_name) and empty($from)) {\n $initial_from = $this->_message->getFrom();\n $this->_message->setFrom($initial_from, $from_name);\n }\n\n if (! empty($reply_to)) {\n $this->_message->setReplyTo($reply_to);\n }\n }",
"public function storeAction()\n\t{\n \tif ($this->request->isPost()) {\n //validate\n $user = $this->auth->getIdentity();\n \t // add push notification message\n $notification = new PushNotification;\n $notification->Admin_ID = $this->auth->getIdentity()['id'];\n $notification->Age = $this->request->getPost('age');\n // $notification->Like = $this->request->getPost('like') ?: 0;\n // $notification->Favourite = $this->request->getPost('favourite') ?: 0;\n $notification->Male = $this->request->getPost('male') ?: 0;\n $notification->Female = $this->request->getPost('female') ?: 0;\n $notification->send_to_guests = $this->request->getPost('send_to_guests') ?: 0;\n $notification->Application_ID = $user[\"Application_ID\"];\n $notification->Module_ID = $this->request->getPost('module_id');\n $notification->topic_id = $this->request->getPost('topic_id');\n $notification->Message = $this->request->getPost('message');\n $notification->Send_Time = strtotime(str_replace(\"/\", \"-\", $this->request->getPost('send_time')));\n $notification->notification_type = implode(\",\", $this->request->getPost('notification_type'));\n\n \n if($this->request->getPost('key') && $this->request->getPost('value')){\n \t$values = $this->request->getPost('value');\n \t$kv_pair = [];\n \tforeach ($this->request->getPost('key') as $k => $key) {\n \t\tif(!empty($key)){\n \t\t\t$kv_pair[$key] = $values[$k];\n \t\t}\n \t}\n\n\t $notification->kv = json_encode($kv_pair);\n }\n\n $notification->save();\n\n foreach ($this->request->getPost('filter') as $key => $filter) {\n $not_filter = new MessageFilters;\n $not_filter->message_id = $notification->ID;\n $not_filter->follow_id = $filter;\n $not_filter->save();\n // die(var_dump($not_filter));\n }\n\n // if(!$this->request->getPost('send_time')){\n // \t// mark it as queued and queue immediatly\n // \t$notification->queued = 1;\n // \t$notification->save();\n\n // \t$users = User::query();\n // \tif($notification->Male){\n // \t $users = $users->andWhere(\"Gender = 1\");\n // \t}\n // \tif($notification->Female){\n // \t $users = $users->andWhere(\"Gender = 0\");\n // \t}\n // \t// TODO: add other criteria\n // \t$users = $users->execute();\n\n // \t$users = User::findIn([102, 103]);\n\n // \t$types = explode(\",\", $notification->notification_type);\n\n\n // \t// add users to queue\n // \tforeach ($users as $user) {\n // \t\tforeach ($types as $type) {\n // \t\t $queue = new PushNotificationQueue;\n // \t\t $queue->Type = $type;\n // \t\t $queue->Token = $user->getQueueToken($type); // TODO: get other tokens\n // \t\t $queue->Msg_ID = $notification->ID;\n // \t\t $queue->User_ID = $user->ID;\n // \t\t $queue->save();\n // \t\t}\n // \t}\n\n // \tif($message->send_to_guests){\n // \t\t// select all tokens\n // \t\t$tokens = Token::query()->where(\"User_ID = 0\")->andWhere(\"Application_ID = {$message->Application_ID}\")->execute();\n // \t\tforeach ($tokens as $token) {\n // \t\t\t$queue = new PushNotificationQueue;\n // \t\t $queue->Type = $token->Type;\n // \t\t $queue->Token = $token->Token;\n // \t\t $queue->Msg_ID = $message->ID;\n // \t\t $queue->save();\n // \t\t}\n // \t}\n // }\n\n // die(var_dump($notification));\n\n \t // return response\n\t\t return $this->response->redirect(\"index\"); // or fail possibly\n\t\t}\n\t}",
"public function inform() {\n $this->deliveryType(DELIVERY_TYPE_BOOL);\n $this->deliveryMethod(DELIVERY_METHOD_JSON);\n\n // Retrieve all notifications and inform them.\n NotificationsController::informNotifications($this);\n $this->fireEvent('BeforeInformNotifications');\n\n $this->render();\n }",
"public function buildConditionAction()\n {\n /** @var Form $form */\n $form = $this->formRepository->findByIdentifier($this->powermailArguments['mail']['form']);\n $this->setTextFields($form);\n\n /** @var ConditionContainer $conditionContainer */\n $conditionContainer = $this->containerRepository->findOneByForm($form);\n if ($conditionContainer !== null) {\n $arguments = $conditionContainer->applyConditions($form, $this->powermailArguments);\n SessionUtility::setSession($arguments);\n ArrayUtility::unsetByKeys($arguments, ['backup', 'field']);\n return json_encode($arguments);\n }\n return null;\n }",
"public function notificationAction(){\n\t\t$this->loadLayout(); \n\t\t$this->renderLayout();\n\t}",
"public function getCustomerNoteNotify();",
"public function runNotifications():void;",
"function wpsp_email_notify( $inquiry_info, $is_operator = false, $is_tour_design = flase ) {\n\t\n\tif ( $is_operator ) {\n\t\t$subject = ( $is_tour_design ) ? esc_html__( 'Tour design:', 'discovertravel' ) . ' ' . $inquiry_info['fullname'] : esc_html__( 'Tour inquiry:', 'discovertravel' ) . ' ' . $inquiry_info['firstname'] . ' ' . $inquiry_info['lastname'];\n\t} else {\n\t\t$subject = get_bloginfo('name') . ' ' . esc_html__( 'Notification', 'discovertravel' );\n\t}\n\t\n\t$guest_email = strip_tags( $inquiry_info['email'] );\n\t$operator_email = ot_get_option('operator-email');\n\t$noreply_email = ot_get_option('noreply-email');\n\t$emailTo = ( $is_operator ) ? $operator_email : $guest_email;\n\t\n\tif ( $is_operator ) {\n\t\t$headers = \"From: \" . $guest_email . \"\\r\\n\";\n\t\t$headers .= \"Reply-To: \" . $guest_email . \"\\r\\n\";\n\t} else {\n\t\t$headers = \"From: \" . $noreply_email . \"\\r\\n\";\n\t}\n\t$headers .= \"MIME-Version: 1.0\\r\\n\";\n\t$headers .= \"Content-Type: text/html; charset=ISO-8859-1\\r\\n\";\n\n\tif ( $is_tour_design ) {\n\t\t$custom_destination = '';\n\t\tforeach ( $inquiry_info['destinations'] as $destination ) :\n\t\t\t$custom_destination .=\t$destination . ', ';\n\t\tendforeach;\n\n\t\t$custom_style = '';\n\t\tforeach ( $inquiry_info['tourstyles'] as $style ) :\n\t\t\t$custom_style .=\t$style . ', ';\n\t\tendforeach;\n\t}\n\t\n\t$body = '<html><body style=\"background-color:#4caf50; padding-bottom:30px;\">';\n\t\n\t$body .= '<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#333333\"><tbody>';\n \t$body .= '<tr>';\n $body .= '<td align=\"center\" valign=\"top\">';\n \n $body .= '<table width=\"640\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\"><tbody>';\n $body .= '<tr>';\n $body .= '<td width=\"170\" valign=\"middle\" style=\"padding-bottom:10px; padding-top:10px;\">';\n $body .= '<img src=\"'. ot_get_option('custom-logo') . '\">';\n $body .= '</td>';\n $body .= '<td width=\"470\" valign=\"middle\" style=\"padding-bottom:10px; padding-top:10px; text-align:right;\">';\n $body .= '<font style=\"font-size:18px;line-height:18px\" face=\"Arial, sans-serif\" color=\"#ffffff\">' . esc_html__( 'Hotline Support: ', 'discovertravel' ) . '<font color=\"#ffffff\" style=\"text-decoration:none;color:#ffffff\">' . ot_get_option('operator-hotline') . '</font></font>';\n $body .= '<br><font style=\"font-size:14px;line-height:14px\" face=\"Arial, sans-serif\" color=\"#cccccc\"><a href=\"mailto:' . ot_get_option('operator-email') . '\" style=\"text-decoration:none\"><font color=\"#cccccc\">' . ot_get_option('operator-email') . '</font></a></font>';\n $body .= '</td>';\n $body .= '</tr>';\n $body .= '</tbody></table>';\n \n $body .= '</td>';\n $body .= '</tr>';\n $body .= '</tbody></table>';\n\n\t$body .= '<div style=\"max-width:640px; margin: 30px auto 20px; background-color:#fff; padding:30px;\">';\n\t$body .= '<table cellpadding=\"5\" width=\"100%\"><tbody>';\n\t$body .= '<tr>';\n\t$body .= '<td colspan=\"2\">';\n\tif ( $is_operator ) {\n\t\t$body .= '<p>' . esc_html__( 'Dear Operators', 'discovertravel' ) . ',</p>';\n\t\tif ( $is_tour_design ) {\n\t\t\t$body .= '<p>' . esc_html__( 'Please review the tour customized from ', 'discovertravel' ) . ' <strong>' . $inquiry_info['fullname'] . esc_html__( ' listed bellow', 'discovertravel' ) . '</p>';\t\n\t\t} else {\n\t\t\t$body .= '<p>' . esc_html__( 'Please review tour inquiry from ', 'discovertravel' ) . ' <strong>' . $inquiry_info['title'] . ' ' . $inquiry_info['firstname'] . '</strong>' . esc_html__( ' listed bellow', 'discovertravel' ) . '</p>';\t\n\t\t}\n\t\t\t\n\t} else {\n\t\tif ( $is_tour_design ) {\n\t\t\t$body .= '<p>' . esc_html__( 'Dear', 'discovertravel' ) . ' ' . $inquiry_info['fullname'] . ',</p>';\n\t\t} else {\n\t\t\t$body .= '<p>' . esc_html__( 'Dear', 'discovertravel' ) . ' ' . $inquiry_info['title'] . ' ' . $inquiry_info['firstname'] . ',</p>';\t\n\t\t}\n\t\t$body .= '<p>' . esc_html__( 'Thank you very much for your kind interest in booking Tours in Cambodia with', 'discovertravel' ) . ' ' . get_bloginfo('name') . '. ' . esc_html__( 'One of our travel consultants will proceed your request and get back to you with BEST OFFERS quickly.', 'discovertravel' ) . '</p>';\n\t\t$body .= '<p>' . esc_html__( 'Please kindly check all the information of your inquiry again as below:', 'discovertravel' ) . '</p>';\n\t}\n\t$body .= '</td>';\n\t$body .= '</tr>';\n\t$body .= '<tr>';\n\t$body .= '<td colspan=\"2\"><div style=\"border-bottom:1px solid #ccc; padding-bottom:5px;\"><strong>' . ( $is_tour_design ) ? esc_html__( 'Tour design summary:', 'discovertravel' ) : esc_html__( 'Tour inquiry summary:', 'discovertravel' ) . '</strong></div></td>';\n\t$body .= '</tr>';\n\tif ( !$is_tour_design ) {\n\t\t$body .= '<tr>';\n\t\t$body .= '<td style=\"padding-left:30px;width:30%;color:#666666;\"><strong>' . esc_html__( 'Tour name: ', 'discovertravel' ) . '</strong></td>';\n\t\t$body .= '<td width=\"70%\">' . $inquiry_info['tourname'] . ' ' . $inquiry_info['tourday'] . ' ' . esc_html__( 'Days', 'discovertravel' ) . '/' . ($inquiry_info['tourday'] - 1) . ' ' . esc_html__( 'Nights', 'discovertravel' ) . '</td>';\n\t\t$body .= '</tr>';\n\t} else {\n\t\t$body .= '<tr>';\n\t\t$body .= '<td style=\"padding-left:30px;width:30%;color:#666666;\"><strong>' . esc_html__( 'Destinations: ', 'discovertravel' ) . '</strong></td>';\n\t\t$body .= '<td width=\"70%\">' . $custom_destination . '' . $inquiry_info['otherdestination'] . '</td>';\n\t\t$body .= '</tr>';\n\t\t$body .= '<tr>';\n\t\t$body .= '<td style=\"padding-left:30px;width:30%;color:#666666;\"><strong>' . esc_html__( 'Tour styles: ', 'discovertravel' ) . '</strong></td>';\n\t\t$body .= '<td width=\"70%\">' . $custom_style . '</td>';\n\t\t$body .= '</tr>';\n\t}\n\t$body .= '<tr>';\n\t$body .= '<td style=\"padding-left:30px;width:30%;color:#666666;\"><strong>' . esc_html__( 'Will travel as: ', 'discovertravel' ) . '</strong></td>';\n\t$body .= '<td width=\"70%\" style=\"text-transform: capitalize;\">' . $inquiry_info['tourtype'] . '</td>';\n\t$body .= '</tr>';\n\t$body .= '<tr>';\n\t$body .= '<td style=\"padding-left:30px;width:30%;color:#666666;\"><strong>' . esc_html__( 'Total guests: ', 'discovertravel' ) . '</strong></td>';\n\t$body .= '<td width=\"70%\">';\n\tif ( $inquiry_info['tourtype'] == 'solo' ) {\n\t\t$body .= esc_html__( 'Adults:', 'discovertravel' ) . ' 1';\n\t}\n\tif ( $inquiry_info['tourtype'] == 'couple' ) {\n\t\t$body .= esc_html__( 'Adults:', 'discovertravel' ) . ' 2';\n\t}\n\tif ( $inquiry_info['tourtype'] == 'family' || $inquiry_info['tourtype'] == 'group' ) {\n\t\t$body .= esc_html__( 'Adults:', 'discovertravel' ) . ' ' . $inquiry_info['adult'] . ', ';\n\t\t$body .= esc_html__( 'Children:', 'discovertravel' ) . ' ' . $inquiry_info['children'] . ', '; \n\t\t$body .= esc_html__( 'Babies:', 'discovertravel' ) . ' ' . $inquiry_info['kids'];\n\t} // end tour type as family or group\n\t$body .= '</td>';\n\t$body .= '</tr>';\n\t$body .= '<tr>';\n\t$body .= '<td style=\"padding-left:30px;width:30%;color:#666666;\"><strong>' . esc_html__( 'Hotel class: ', 'discovertravel' ) . '</strong></td>';\n\t$body .= '<td width=\"70%\">' . $inquiry_info['tourclass'] . '</td>';\n\t$body .= '</tr>';\n\t$body .= '<tr>';\n\tif ( $inquiry_info['flexibledate'] ) {\n\t\t$body .= '<td style=\"padding-left:30px;width:30%;color:#666666;\"><strong>' . esc_html__( 'Flexible date: ', 'discovertravel' ) . '</strong></td>';\n\t\t$body .= '<td width=\"70%\">' . $inquiry_info['manualdate'] . '</td>';\n\t} else {\n\t\t$body .= '<td style=\"padding-left:30px;width:30%;color:#666666;\"><strong>' . esc_html__( 'Arrive date: ', 'discovertravel' ) . '</strong></td>';\n\t\t$body .= '<td width=\"70%\">' . date(\"d F Y\", strtotime( $inquiry_info['departuredate'] )) . '</td>';\n\t}// end flexible date is checked\n\t$body .= '</tr>';\n\tif ( !empty( $inquiry_info['otherrequest'] ) ) {\n\t$body .= '<tr>';\n\t$body .= '<td valign=\"top\" style=\"padding-left:30px;width:30%;color:#666666;\"><strong>' . esc_html__( 'Special requests: ', 'discovertravel' ) . '</strong></td>';\n\t$body .= '<td width=\"70%\">' . $inquiry_info['otherrequest'] . '</td>';\n\t$body .= '</tr>';\n\t} // end other request\n\t$body .= '<tr>';\n\t$body .= '<td colspan=\"2\"><div style=\"padding-top: 10px; border-bottom:1px solid #ccc; padding-bottom:5px;\"><strong>' . esc_html__( 'Contact info:', 'discovertravel' ) . '</strong></div></td>';\n\t$body .= '</tr>';\n\t$body .= '<tr>';\n\t$body .= '<td style=\"padding-left:30px;width:30%;color:#666666;\"><strong>' . esc_html__( 'Full Name: ', 'discovertravel' ) . '</strong></td>';\n\tif ( $is_tour_design ) {\n\t\t$body .= '<td width=\"70%\"><strong>' . $inquiry_info['fullname'] . '</strong></td>';\n\t} else {\n\t\t$body .= '<td width=\"70%\"><strong>' . $inquiry_info['title'] . ' ' . $inquiry_info['firstname'] . ' ' . $inquiry_info['lastname'] . '</strong></td>';\n\t}\n\t$body .= '</tr>';\n\t$body .= '<tr>';\n\t$body .= '<td style=\"padding-left:30px;width:30%;color:#666666;\"><strong>' . esc_html__( 'Email: ', 'discovertravel' ) . '</strong></td>';\n\t$body .= '<td width=\"70%\">' . $inquiry_info['email'] . '</td>';\n\t$body .= '</tr>';\n\t$body .= '<tr>';\n\t$body .= '<td style=\"padding-left:30px;width:30%;color:#666666;\"><strong>' . esc_html__( 'Phone: ', 'discovertravel' ) . '</strong></td>';\n\t$body .= '<td width=\"70%\">' . $inquiry_info['phone'] . '</td>';\n\t$body .= '</tr>';\n\t$body .= '<tr>';\n\t$body .= '<td style=\"padding-left:30px;width:30%;color:#666666;\"><strong>' . esc_html__( 'Nationality: ', 'discovertravel' ) . '</strong></td>';\n\t$body .= '<td width=\"70%\">' . $inquiry_info['country'] . '</td>';\n\t$body .= '</tr>';\n\t$body .= '</tbody></table>';\n\n\tif ( !$is_operator )\n\t\t$body .= '<br><p><strong>' . esc_html__( 'Tips: ', 'discovertravel' ) . '</strong>' . esc_html__( 'If you submit incorrect information, please contact our travel consultants to change your information by ', 'discovertravel' ) . '<a href=\"mailto:' . ot_get_option('operator-email') . '\">' . ot_get_option('operator-email') . '</a></p>';\n\t\n\t$body .= '<p style=\"padding-top: 10px;\">' . esc_html__( 'Thanks & Best regards,', 'discovertravel') . '</p>';\t\n\n\tif ( !$is_operator ) {\n\t\t$body .= '<p style=\"border-top:1px solid #ccc; padding-top:30px; font-size:12px; color:#666666;\"><strong style=\"font-size:13px; color:#4caf50;\">' . get_bloginfo('name') . '</strong>';\n\t\t$body .= '<br>' . ot_get_option('operator-address');\n\t\t$body .= '<br><strong>' . esc_html__( 'T. ', 'discovertravel' ) . '</strong>' . ot_get_option('operator-phone');\n\t\t$body .= '<br><strong>' . esc_html__( 'E. ', 'discovertravel' ) . '</strong><a href=\"mailto:' . ot_get_option('operator-email') . '\">' . ot_get_option('operator-email') . '</a>';\n\t\t$body .= '<br><strong>' . esc_html__( 'F. ', 'discovertravel' ) . '</strong>' . ot_get_option('operator-fax');\n\t\t$body .= '<br><strong>' . esc_html__( 'W: ', 'discovertravel' ) . '</strong>' . get_bloginfo('wpurl', 'display') . '</p>';\n\t}\n\t$body .= '</div>'; //wrapper\n\t$body .= '</body></html>';\n\t\n\tif ( mail( $emailTo, $subject, $body, $headers ) ){\n\t\tif ( !$is_operator ) {\n\t\t\t$out = '<h3>' . esc_html__( 'Thank you for sending us your inquiry!', 'discovertravel' ) . '</h3>';\n\t\t\t$out .= '<p>' . esc_html__( 'We will contact you within 01 working day. If you have any questions, please kindly contact us at: ', 'discovertravel' );\n\t\t\t$out .= '<br>Email: <a href=\"mailto:' . $operator_email . '\">' . $operator_email . '</a>';\n\t\t\t$out .= '<br><span class=\"hotline\">Hotline: ' . ot_get_option('operator-hotline') . '</span></p>';\n\t\t\t$out .= '<p class=\"note\">Note: To ensure that you can receive a reply from us, Please kindly add the \"' . str_replace( 'http://', '', get_home_url() ) . '\" domain to your e-mail \"safe list\".<br>If you do not receive a response in your \"inbox\" within 12 hours, check your \"bulk mail\" or \"junk mail\" folders.</p>';\n\t\t\techo $out;\n\t\t}\n\t} else {\n\t\tif ( !$is_operator )\n\t\t\techo '<h5>' . esc_html__( 'Sorry, your inquiry cannot be send right now.', 'discovertravel' ) . '</h5><p>' . error_message . '</p>';\n\t}\n}",
"public function sendNotifications()\n {\n foreach ($this->recipients_messages as $recipientID => $recipientInfo) {\n $recipient = $this->recipients_addresses[$recipientID];\n if ($recipient && $recipient['email']) {\n $message = implode(chr(10) . chr(10), $recipientInfo['messages']);\n\n $subject = $this->mail_subject;\n\n $subject .= ' Statechange: ';\n\n if ($recipientInfo['num_undefined'] > 0) {\n $subject .= ' ' . $recipientInfo['num_undefined'] . ' Undefined';\n }\n if ($recipientInfo['num_ok'] > 0) {\n $subject .= ' ' . $recipientInfo['num_ok'] . ' OK';\n }\n if ($recipientInfo['num_error'] > 0) {\n $subject .= ' ' . $recipientInfo['num_error'] . ' Errors';\n }\n if ($recipientInfo['num_warning'] > 0) {\n $subject .= ' ' . $recipientInfo['num_warning'] . ' Warnings';\n }\n if ($recipientInfo['num_ack'] > 0) {\n $subject .= ' ' . $recipientInfo['num_ack'] . ' Acknowledged';\n }\n if ($recipientInfo['num_due'] > 0) {\n $subject .= ' ' . $recipientInfo['num_due'] . ' Due';\n }\n\n $this->sendMail($subject, $recipient['email'], $this->mail_from, $message);\n }\n }\n }",
"public function processChangeNewsletterVal()\n {\n }",
"function room_reservations_admin_settings_email($form, &$form_state) {\n $default_from_address\n = _room_reservations_get_variable('from_address');\n $default_confirmation_header_text\n = _room_reservations_get_variable('confirmation_header_text');\n $default_confirmation_owner_text\n = _room_reservations_get_variable('confirmation_owner_text');\n $default_confirmation_group_text\n = _room_reservations_get_variable('confirmation_group_text');\n $default_reminder_header_text\n = _room_reservations_get_variable('reminder_header_text');\n $default_reminder_owner_text\n = _room_reservations_get_variable('reminder_owner_text');\n $default_reminder_group_text\n = _room_reservations_get_variable('reminder_group_text');\n $tokens = array(\n '%reservation_name' => t('The name given to the reservation to identify it\n on the reservation calendar.'),\n '%room' => t('The room that has been reserved.'),\n '%month' => t('The full name of the month of the reservation date.'),\n '%month_number' => t('The month number of the reservation date.'),\n '%day' => t('The numeric day of the month of the reservation date.'),\n '%day_of_the_week' => t('The full name of the day of the week of the\n reservation date.'),\n '%time' => t('The time of the reservation.'),\n '%minutes' => t('The length of the reservation in minutes.'),\n );\n $token_display = '<p>' .\n t('The following tokens will be replaced with dynamic values in any of the\n fields below.') . '</p><ul>';\n foreach ($tokens as $key => $value) {\n $token_display .= '<li>' . $key . ' - ' . $value . '</li>';\n }\n $token_display .= '</ul>';\n $form['from_address'] = array(\n '#title' => t('From address'),\n '#type' => 'textfield',\n '#maxlength' => 100,\n '#size' => 100,\n '#description' => t('The from address on all email messages.'),\n '#default_value' => $default_from_address,\n '#weight' => -110,\n );\n $form['tokens'] = array(\n '#type' => 'fieldset',\n '#title' => t('Token values'),\n '#collapsible' => TRUE,\n '#collapsed' => TRUE,\n '#weight' => -100,\n );\n $form['tokens']['values'] = array(\n '#value' => $token_display,\n );\n $form['confirmation_header'] = array(\n '#title' => t('Confirmation heading'),\n '#type' => 'textfield',\n '#maxlength' => 100,\n '#size' => 100,\n '#description' => t('The heading for all confirmation messages.'),\n '#default_value' => $default_confirmation_header_text,\n '#weight' => -97,\n );\n $form['confirmation_owner'] = array(\n '#title' => t('Confirmation body'),\n '#type' => 'textarea',\n '#rows' => 8,\n '#description' => t('Confirmation message sent to the person who has made a\n reservation.'),\n '#default_value' => $default_confirmation_owner_text,\n '#weight' => -95,\n );\n $form['confirmation_group'] = array(\n '#title' => t('Confirmation to group members body'),\n '#type' => 'textarea',\n '#rows' => 8,\n '#description' => t('Confirmation message sent to all members of the group\n except for the person who made the reservation.'),\n '#default_value' => $default_confirmation_group_text,\n '#weight' => -90,\n );\n $form['reminder_header'] = array(\n '#title' => t('Reminder heading'),\n '#type' => 'textfield',\n '#maxlength' => 100,\n '#size' => 100,\n '#description' => t('The heading for all reminder messages.'),\n '#default_value' => $default_reminder_header_text,\n '#weight' => -85,\n );\n $form['reminder_owner'] = array(\n '#title' => t('Reminder body'),\n '#type' => 'textarea',\n '#rows' => 8,\n '#description' => t('Reminder message sent to the person who has made a\n reservation.'),\n '#default_value' => $default_reminder_owner_text,\n '#weight' => -80,\n );\n $form['reminder_group'] = array(\n '#title' => t('Reminder to group members body'),\n '#type' => 'textarea',\n '#rows' => 8,\n '#description' => t('Reminder message sent to all members of the group\n except for the person who made the reservation.'),\n '#default_value' => $default_reminder_group_text,\n '#weight' => -75,\n );\n $form['save'] = array(\n '#type' => 'submit',\n '#value' => t('Save configuration'),\n '#weight' => 100,\n );\n $form['reset'] = array(\n '#type' => 'submit',\n '#value' => t('Reset to defaults'),\n '#weight' => 101,\n );\n return $form;\n}",
"public function updateNotificationSettingsObject()\n\t{\n\t\t// instantiate the property form\n\t\t$this->initNotificationSettingsForm();\n\n\t\t// check input\n\t\tif($this->notificationSettingsForm->checkInput())\n\t\t{\n\t\t\tif($_POST['notification_type']== 'all_users')\n\t\t\t{\n\t\t\t\t// set values and call update\n\t\t\t\t$this->objProperties->setAdminForceNoti(1);\n\t\t\t\t$this->objProperties->setUserToggleNoti((int)$this->notificationSettingsForm->getInput('usr_toggle'));\n\t\t\t\t$this->objProperties->setNotificationType('all_users');\n\t\t\t}\n\t\t\telse if($_POST['notification_type']== 'per_user')\n\t\t\t{\n\t\t\t\t$this->objProperties->setNotificationType('per_user');\n\t\t\t\t$this->objProperties->setAdminForceNoti(1);\n\t\t\t}\n\t\t\telse // if($_POST['notification_type'] == 'default')\n\t\t\t{\n\t\t\t\t$this->objProperties->setNotificationType('default');\n\t\t\t\t$this->objProperties->setAdminForceNoti(0);\n\t\t\t\t$this->objProperties->setUserToggleNoti(0);\n\t\t\t}\n\n\t\t\t$this->objProperties->update();\n\n\t\t\t// print success message\n\t\t\tilUtil::sendSuccess($this->lng->txt('saved_successfully'));\n\t\t}\n\t\t$this->notificationSettingsForm->setValuesByPost();\n\n\t\treturn $this->showMembersObject();\n\t}",
"public function __construct() {\r\n $this->setEntity('mst_notification');\r\n }",
"function notifiable() {\n //\n // do not forget to update version\n //\n $this->author = 'Herman Tolentino MD';\n $this->version = \"0.3-\".date(\"Y-m-d\");\n $this->module = \"notifiable\";\n $this->description = \"CHITS Module - Notifiable Diseases\";\n // 0.3 consult and icd10 integration\n }",
"public function init() {\n\n /**\n * Over-riding the email notification handler so we can use ours\n */\n register_notification_handler('email', array($this, 'emailHandler'));\n\n /**\n * Add a cron hook so we can send off daily digests and cleanup used tokens\n */\n elgg_register_plugin_hook_handler('cron', 'daily', array($this, 'cron'));\n\n /**\n * Over-ride permissions check for notifications\n */\n elgg_register_plugin_hook_handler('permissions_check', 'all', array($this, 'permissionsCheck'));\n\n /**\n * Extending the user settings so we can catch and save the digest option\n */\n elgg_register_plugin_hook_handler('usersettings:save', 'user', array($this, 'userSettings'));\n\n /*\n * After elgg finishes an entire system execution, send the output to browser\n * This allows the other system shutdown processes to continue in the background while output gets returned to the user promptly\n */\n elgg_register_event_handler('shutdown', 'system', array($this, 'flushToBrowser'), 0);\n\n /**\n * Allow the user to turn on/off digest from notification form\n */\n elgg_extend_view(\"forms/account/settings\", \"jettmail/forms/account/settings/digest\");\n\n /**\n * Generate a secret email signature key if one isn't present\n */\n if (!elgg_get_plugin_setting('sig_key', 'jettmail')) {\n elgg_set_plugin_setting('sig_key', EmailAddressGenerator::generateSignatureKey(), 'jettmail');\n }\n\n /**\n * If the user has specifically requested that we regenerate the email signature key\n */\n if (elgg_get_plugin_setting(\"refreshSigKey\", 'jettmail') != null) {\n elgg_set_plugin_setting('sig_key', EmailAddressGenerator::generateSignatureKey(), 'jettmail');\n elgg_set_plugin_setting('refreshSigKey', null, 'jettmail');\n system_message(\"The jettmail signature key has been refreshed.\");\n }\n\n /**\n * Make sure there is a default value for expiring tokens\n * If there isn't set it to 15 days\n */\n if (!(int)elgg_get_plugin_setting(\"tokenDaysValid\", \"jettmail\")) {\n elgg_set_plugin_setting('tokenDaysValid', 15, \"jettmail\");\n }\n\n /**\n * Run database setup scripts\n */\n self::setupUsedKeysTable();\n\n /**\n * Register hooks for incoming emails\n * These are simple and closure based\n */\n self::handleIncomingEmails();\n\n /**\n * Register hooks for appending \"email a reply\" text to messages\n */\n self::appendEmailReplyToMessages();\n\n /**\n * Register a default hook for determining whether or not to digest a notification\n */\n elgg_register_plugin_hook_handler('jettmail:digest:allow', 'all', 'jettmail_can_digest');\n\n }",
"function _send_email_notifications () {\n// TODO\n/*\n\t\tif (module('forum')->SETTINGS['SEND_NOTIFY_EMAILS']) return false;\n\t\t// Get emails to process\n\t\t$Q5 = db()->query('SELECT * FROM '.db('forum_email_notify').' WHERE topic_id='.intval($topic_info['id']));\n\t\twhile ($A5 = db()->fetch_assoc($Q5)) if (!FORUM_USER_ID || (FORUM_USER_ID != $A5['user_id'])) $notify_user_ids[$A5['user_id']] = $A5['user_id'];\n\t\tif (is_array($notify_user_ids) && count($notify_user_ids)) {\n\t\t\t// Process users that wanted to receive notifications for this topic\n\t\t\t$topic_name\t\t= $this->BB_OBJ->_process_text($topic_info['name']);\n\t\t\t$post_text\t\t= $this->BB_OBJ->_process_text(_substr($_POST['text'], 0, 100)).'...';\n\t\t\t$view_topic_url\t= process_url('./?object=forum&action=view_topic&id='.$topic_info['id']);\n\t\t\t$dont_notify_url= process_url('./?object=forum&action=notify_me&id='.$topic_info['id']);\n\t\t\t// Get users details\n\t\t\t$Q6 = db()->query('SELECT user_email AS `0`, name AS 1 FROM '.db('forum_users').' WHERE id IN('.implode(',', $notify_user_ids).') AND status='a'');\n\t\t\twhile (list($notify_email, $user_login) = db()->fetch_assoc($Q6)) {\n\t\t\t\t$replace = array(\n\t\t\t\t\t'notify_email'\t\t=> $notify_email,\n\t\t\t\t\t'user_name'\t\t\t=> _prepare_html($user_login),\n\t\t\t\t\t'topic_name'\t\t=> $topic_name,\n\t\t\t\t\t'post_text'\t\t\t=> $post_text,\n\t\t\t\t\t'view_topic_url'\t=> $view_topic_url,\n\t\t\t\t\t'dont_notify_url'\t=> $dont_notify_url,\n\t\t\t\t\t'website'\t\t\t=> conf('website_name'),\n\t\t\t\t);\n\t\t\t\t$text = tpl()->parse('forum'.'/emails/post_notify', $replace);\n\t\t\t\tcommon()->send_mail(module('forum')->SETTINGS['ADMIN_EMAIL_FROM'], t('administrator').' '.conf('website_name'), $notify_email, $user_login, t('Post_Notification'), $text, $text);\n\t\t\t}\n\t\t}\n\t\t// Save user notification\n\t\tif (FORUM_USER_ID && $_POST['email_notify']) {\n\t\t\tdb()->query('REPLACE INTO '.db('forum_email_notify').' VALUES ('.intval(FORUM_USER_ID).', '.intval($topic_info['id']).', '.time().')');\n\t\t}\n*/\n\t}",
"function swp_affiliatewp_update_notification( $notices = array() ) {\n if (is_string( $notices ) ) {\n $notices = array();\n }\n\n $notices[] = array(\n 'key' => 'update_notice_affiliatewp_' . SWAW_VERSION, // database key unique to this version.\n 'message' => 'Looks like your copy of Social Warfare - Pro isn\\'t up to date with Core. While you can still use both of these plugins, we highly recommend you keep both Core and Pro up-to-date for the best of what we have to offer.',\n 'ctas' => array(\n array(\n 'action' => 'Remind me in a week.',\n 'timeframe' => 7 // dismiss for one week.\n ),\n array(\n 'action' => 'Thanks for letting me know.',\n 'timeframe' => 0 // permadismiss for this version.\n )\n )\n );\n\n return $notices;\n}",
"protected static function booted()\n {\n $notification = new Notification();\n\n static::created(function ($lead_escalation) use($notification) {\n if(! isset($lead_escalation->metadata['v2_data'])){\n $notification_messages = $notification->parseMessages();\n\n $lead_escalation_status = \"{$lead_escalation->escalation_level} - {$lead_escalation->escalation_status}\";\n $organisation_notifications = $lead_escalation->organisation->notifications ?? ['sms', 'email'];\n\n //update expiration date\n $countdown = Setting::where('name', $lead_escalation_status)->first();\n\n if($countdown && ! empty($countdown->value)) {\n $time_type = ucfirst($countdown->metadata['type']);\n $lead_escalation->expiration_date = Date('Y-m-d H:i:s', strtotime('+'.$countdown->value.\" $time_type\"));\n $lead_escalation->save();\n }\n\n # Get general notifications for IP - Extended N\n if(strpos($lead_escalation_status, 'In Progress - Extended') !== false) {\n $lead_escalation_status = 'In Progress - Extended';\n }\n\n $user_types = ['inquirer', 'admin', 'organization'];\n\n foreach($user_types as $user_type) {\n if((isset($notification_messages[$lead_escalation_status][$user_type]['email']['title']) &&\n !empty($notification_messages[$lead_escalation_status][$user_type]['email']['title'])) ||\n (isset($notification_messages[$lead_escalation_status][$user_type]['email']['message']) &&\n !empty($notification_messages[$lead_escalation_status][$user_type]['email']['message']))) {\n\n if($user_type == 'admin') {\n $setting = Setting::where('key', 'admin-email-notification-receivers')->first();\n if($setting && !empty($setting->value)) {\n $emails = explode(',', $setting->value);\n\n $recepient = [];\n foreach($emails as $email) {\n $email = trim($email);\n if(!empty($email)) {\n $recepient[] = [\n 'name' => 'Admin',\n 'email' => $email\n ];\n }\n }\n } else {\n # get admin user names and emails\n $users_email = User::role('administrator')->get();\n\n $recepient = [];\n foreach($users_email as $user) {\n $recepient[] = [\n 'name' => $user->name,\n 'email' => $user->email\n ];\n }\n }\n\n # Removed email sending to admin when reassigning\n if( !isset($lead_escalation->metadata['reassign'])) {\n # Send email to admin\n Mail::to($recepient)->queue(new AdminNotification($lead_escalation, $notification_messages));\n }\n\n } else if($user_type == 'inquirer' && !isset($lead_escalation->metadata['prevent_inquirer_notification'])) {\n $title = $notification_messages[$lead_escalation_status][$user_type]['email']['title'];\n $description = $notification_messages[$lead_escalation_status][$user_type]['email']['description'];\n\n $recepient = [];\n $recepient[] = [\n 'name' => \"{$lead_escalation->lead->customer->first_name} {$lead_escalation->lead->customer->last_name}\",\n 'email' => $lead_escalation->lead->customer->email\n ];\n\n $message = $description;\n\n if(!empty($lead_escalation->lead->enquirer_message)){\n $message = $lead_escalation->lead->enquirer_message;\n }\n\n # Send email to inquirer check if the customer has email address\n if(!empty($lead_escalation->lead->customer->email && isset($lead_escalation->metadata['notif_config']['enquirer_send_email']))\n && !empty($lead_escalation->metadata['notif_config']['enquirer_send_email'])) {\n Mail::to($recepient)->queue(new InquirerNotification($title, $message));\n }\n\n # Send sms to inquirer check if the customer has contact number\n if(!empty($lead_escalation->lead->customer->contact_number) && isset($lead_escalation->metadata['notif_config']['enquirer_send_sms'])\n && !empty($lead_escalation->metadata['notif_config']['enquirer_send_sms'])) {\n //add notification for enquirer, to display in LO - Enquirer Notifications\n $notif_structure = [\n 'title' => 'LEAF STOPPER CONFIRMATION',\n 'description' => $message,\n 'metadata' => [\n 'to' => 'inquirer',\n 'lead_id' => $lead_escalation->lead_id,\n 'organisation_id' => $lead_escalation->organisation_id,\n 'notification_type' => 'notification',\n 'lead_escalation_status' => $lead_escalation_status,\n 'lead_escalation_color' => $lead_escalation->leadEscalationStatus($lead_escalation_status) ?? 'purple',\n ]\n ];\n\n Notification::create($notif_structure);\n\n //save all notification types\n $notification->logActivity(\n $lead_escalation,\n $notif_structure\n );\n\n Notification::send_sms($lead_escalation->lead->customer->contact_number, $message);\n }\n\n } else {\n if($lead_escalation->organisation && (!isset($lead_escalation->metadata['send_email']) || $lead_escalation->metadata['send_email'] == true)) {\n $user_ids = $lead_escalation->organisation->organisation_users()->pluck('user_id');\n\n $users_email = User::whereIn('id',\n $user_ids\n )->get();\n\n $recepient = [];\n foreach($users_email as $user) {\n $recepient[] = [\n 'name' => $user->name,\n 'email' => $user->email\n ];\n }\n\n # Send email to org users\n # for previous value of notification. we have updated values notification to email\n if( isset($lead_escalation->metadata['notif_config'])) {\n if ( $lead_escalation->metadata['notif_config']['send_email'] == true) {\n Mail::to($recepient)->queue(new OrganizationNotification($lead_escalation, $notification_messages));\n }\n }\n\n if(in_array('notification', $organisation_notifications) && (!isset($lead_escalation->metadata['notif_config'])) ){\n Mail::to($recepient)->queue(new OrganizationNotification($lead_escalation, $notification_messages));\n } else if(in_array('email', $organisation_notifications)) {\n Mail::to($recepient)->queue(new OrganizationNotification($lead_escalation, $notification_messages));\n }\n }\n }\n }\n }\n NotificationJob::dispatch(\n $lead_escalation\n );\n }\n\n });\n }",
"public function Create()\n {\n parent::Create();\n\n //Properties\n $this->RegisterPropertyInteger('InputTriggerID', 0);\n $this->RegisterPropertyString('NotificationLevels', '[]');\n $this->RegisterPropertyBoolean('TriggerOnChangeOnly', false);\n $this->RegisterPropertyBoolean('AdvancedResponse', false);\n $this->RegisterPropertyString('AdvancedResponseActions', '[]');\n\n //Profiles\n if (!IPS_VariableProfileExists('BN.Actions')) {\n IPS_CreateVariableProfile('BN.Actions', 1);\n IPS_SetVariableProfileIcon('BN.Actions', 'Information');\n IPS_SetVariableProfileValues('BN.Actions', 0, 0, 0);\n }\n\n //Variables\n $this->RegisterVariableInteger('NotificationLevel', $this->Translate('Notification Level'), '');\n $this->RegisterVariableBoolean('Active', $this->Translate('Notifications active'), '~Switch');\n $this->RegisterVariableInteger('ResponseAction', $this->Translate('Response Action'), 'BN.Actions');\n\n //Actions\n $this->EnableAction('ResponseAction');\n\n //Timer\n $this->RegisterTimer('IncreaseTimer', 0, 'BN_IncreaseLevel($_IPS[\\'TARGET\\']);');\n\n $this->EnableAction('Active');\n }",
"function _thumbwhere_content_collection_notify() {\n\n if (twCanDebug()) {\n watchdog('thumbwhere_content_collection', 'incoming notification.');\n }\n\n $numargs = func_num_args();\n $arg_list = func_get_args();\n\n \n\tif (twCanDebug()) debug('$numargs = ' . $numargs);\n\t\n\tif (twCanDebug()) debug('$arg_list = ' . $arg_list);\n\t\n\tif (twCanDebug()) debug('$_REQUEST');\n\tif (twCanDebug()) debug($_REQUEST);\n\t\n\tif (twCanDebug()) debug('$_GET');\n\tif (twCanDebug()) debug($_GET);\n\t\n\tif (twCanDebug()) debug('$_POST');\n\tif (twCanDebug()) debug($_POST);\n\t\n\t//if (twCanDebug()) debug('$HTTP_RAW_POST_DATA');\n\t//if (twCanDebug()) debug($HTTP_RAW_POST_DATA);\n\t\n\tif (twCanDebug()) debug('$_SERVER');\n\tif (twCanDebug()) debug($_SERVER);\n\t\n\t//if (twCanDebug()) debug('$GLOBALS');\n\t//if (twCanDebug()) debug($GLOBALS);\n\n \n\n if (variable_get('thumbwhere_api_log_debug', 0) == 1) {\n foreach ($arg_list as $arg) {\n if (twCanDebug()) debug('$arg = ' . $arg);\n }\n }\n\n\n //////////////////////////////////////////////////\n //\n //\n\n switch ($_SERVER['REQUEST_METHOD']) {\n\n case 'POST': {\n if ($numargs == 1) {\n if ($arg_list[0] == 'content_collection') {\n\n //\n // Get the POST data as XML\n //\n\n $post_xml = new SimpleXMLElement('php://input', null, true);\n if (twCanDebug()) debug('$post_xml');\n if (twCanDebug()) debug($post_xml);\n\n if (twCanDebug()) debug('$post_xml->getName()');\n if (twCanDebug()) debug($post_xml->getName());\n\n // We expect 'action' as the root element. TODO: I would rather this was the more generic 'request'\n if ($post_xml->getName() != 'action') {\n drupal_add_http_header('Status', '404 not found.');\n print('We were expecting \\'action\\', as the root element, not \\'' . $post_xml->getName() . '\\'.');\n exit(0);\n }\n\n /*\n * SimpleXMLElement::__set_state(array(\n * 'content_collection' =>\n * SimpleXMLElement::__set_state(array(\n * '@attributes' =>\n * array (\n * 'key' => '8e9ff318-3cd7-4593-99de-4c37c0fb335a',\n * 'op' => 'create',\n * ),\n * )),\n * ))\n */\n\n\n // We expect 'action' as the root element.\n if (!isset($post_xml->content_collection)) {\n drupal_add_http_header('Status', '404 not found.');\n print('We were expecting a \\'content_collection\\', element in the action payload.');\n exit(0);\n }\n\n // Handle the incoming notification for content ingest\n _thumbwhere_handle_content_collection_notify_xml($post_xml->content_collection);\n\n }\n else {\n drupal_add_http_header('Status', '404 not found.');\n print('Invalid resource');\n exit(0);\n }\n }\n else {\n drupal_add_http_header('Status', '404 not found.');\n print('Invalid notification request url format.');\n exit(0);\n }\n }\n break;\n\n case 'GET': {\n\n if ($numargs == 1) {\n\n // If we are returning the index.xml file for the webservice.\n if ($arg_list[0] == 'index.xml') {\n // return index.xml\n drupal_add_http_header('Content-Type', 'text/xml');\n readfile(dirname(__FILE__) . '/index.xml');\n exit(0);\n }\n else {\n drupal_add_http_header('Status', '404 not found.');\n print('File not found.');\n exit(0);\n }\n }\n else {\n drupal_add_http_header('Status', '404 not found.');\n print('Invalid notification request url format.');\n exit(0);\n }\n }\n break;\n\n default: {\n drupal_add_http_header('Status', '404 not found.');\n exit(0);\n }\n break;\n }\n\n //\n //\n ////////////////////////////////////////////////////////////////////////////////////\n \n}",
"function set_notification($type = 'info', $title = 'title', $content = 'content') {\n $_SESSION[temporary] = array(\n 'type' => $type,\n 'title' => $title,\n 'content' => $content\n );\n}",
"private static function getRemainingRequestsParams()\n {\n return [\n Config::$itones_request_maximum,\n MyRadio_User::getInstance()->getID(),\n Config::$itones_request_period,\n ];\n }",
"public function __construct() {\n notificationController::showNotificationAccordingToCurrentUser();\n }",
"public function verification_agent_customer_notifications() {\n $table_name_array = unserialize(TABLE_NAME);\n $this->load->model('Notifications_model');\n $this->load->model('Common_model');\n $codition = \"theme_options_name = 'notifications_setting'\";\n $notifications_setting_data = $this->Common_model->getRowByCondition($codition, $table_name_array['theme_options']);\n $notifications_type_id = unserialize($notifications_setting_data['theme_options_values'])['verification_agent_customer_not_verified_notification'];\n $query = \"SELECT * FROM \" . $table_name_array['notifications_message'] . \" as nm JOIN \" . $table_name_array['notifications_type'] . \" as nt ON nm.notifications_type_id = nt.notifications_type_id where nt.notifications_type_id = $notifications_type_id\";\n $notifications_message = $this->Common_model->customQuery($query, 2);\n $customer_notifications = $this->Notifications_model->getAllVerificationAgentCustomerNotifications();\n $return_value = $this->notification($customer_notifications, 'verification_success');\n echo json_encode(array(\"return_string\" => $return_value, \"count_customers_notification\" => count($customer_notifications), \"notifications_message_title\" => $notifications_message[0]['notifications_message_title'], \"notifications_message_content\" => $notifications_message[0]['notifications_message_content']));\n die;\n }",
"public function sales_agent_customer_notifications() {\n $table_name_array = unserialize(TABLE_NAME);\n $this->load->model('Notifications_model');\n $this->load->model('Common_model');\n $codition = \"theme_options_name = 'notifications_setting'\";\n $notifications_setting_data = $this->Common_model->getRowByCondition($codition, $table_name_array['theme_options']);\n $notifications_type_id = unserialize($notifications_setting_data['theme_options_values'])['sales_agent_customer_submitted_notification'];\n $query = \"SELECT * FROM \" . $table_name_array['notifications_message'] . \" as nm JOIN \" . $table_name_array['notifications_type'] . \" as nt ON nm.notifications_type_id = nt.notifications_type_id where nt.notifications_type_id = $notifications_type_id\";\n $notifications_message = $this->Common_model->customQuery($query, 2);\n $customer_notifications = $this->Notifications_model->getAllSalesAgentCustomerNotifications();\n $return_value = $this->notification($customer_notifications, 'sales_success');\n echo json_encode(array(\"return_string\" => $return_value, \"count_customers_notification\" => count($customer_notifications), \"notifications_message_title\" => $notifications_message[0]['notifications_message_title'], \"notifications_message_content\" => $notifications_message[0]['notifications_message_content']));\n die;\n }"
] | [
"0.6295983",
"0.6141449",
"0.6141449",
"0.60284656",
"0.58678734",
"0.58187926",
"0.5710158",
"0.5677714",
"0.5666399",
"0.5648504",
"0.56111646",
"0.55947727",
"0.5541939",
"0.55405015",
"0.5530263",
"0.5515544",
"0.5512296",
"0.5504557",
"0.5495525",
"0.549418",
"0.54743123",
"0.5467627",
"0.5462777",
"0.54039353",
"0.5402141",
"0.5401108",
"0.5400747",
"0.5385856",
"0.5382235",
"0.5356686",
"0.5316756",
"0.5289218",
"0.5284481",
"0.5271311",
"0.52582985",
"0.52580965",
"0.5239462",
"0.5234506",
"0.52277344",
"0.5225852",
"0.52255046",
"0.522392",
"0.52099127",
"0.5209834",
"0.5208977",
"0.51990795",
"0.5193922",
"0.5185992",
"0.51804054",
"0.5177489",
"0.5177217",
"0.517687",
"0.5169161",
"0.516468",
"0.5162818",
"0.5162311",
"0.51546234",
"0.51460934",
"0.51450723",
"0.5136446",
"0.5131728",
"0.5130123",
"0.51268244",
"0.5124854",
"0.51102805",
"0.5108406",
"0.51055133",
"0.510383",
"0.5101992",
"0.5100909",
"0.5096892",
"0.5096822",
"0.5096457",
"0.50914365",
"0.5087956",
"0.50876904",
"0.50800186",
"0.50778",
"0.50771445",
"0.5072208",
"0.50720274",
"0.506815",
"0.5066774",
"0.50663364",
"0.50599086",
"0.5054355",
"0.5051471",
"0.50482947",
"0.50468415",
"0.5042428",
"0.5041874",
"0.5037272",
"0.50321794",
"0.5025039",
"0.50248957",
"0.50201774",
"0.50099075",
"0.5006916",
"0.5004662",
"0.49990723"
] | 0.6981497 | 0 |
Verify that mysql has been enabled | function getSampleDataFromDB()
{
if (function_exists('mysqli_connect') == false){
echo "need to enable mysqli!";
error_log("need to enable mysqli!", 0);
return;
}
//Connect with connection info from environemnt variables
$json = getenv('VCAP_SERVICES');
$service_name;
if (strpos($json,'cleardb')){
$service_name='cleardb'; //service is on PWS
}else if (strpos($json,'p-mysql')){
$service_name='p-mysql'; //service is on pivotal MySQL service
}else {
echo "Error determining service name. Check VCAP_SERVICES";
error_log("Error determining service name. Check VCAP_SERVICES");
return;
}
$arr = json_decode($json, true);
$hostname = $arr[$service_name][0]['credentials']['hostname'];
$username = $arr[$service_name][0]['credentials']['username'];
$password = $arr[$service_name][0]['credentials']['password'];
$dbname = $arr[$service_name][0]['credentials']['name'];
//Connect to database
$mysql = mysqli_connect($hostname, $username, $password, $dbname );
if (mysqli_connect_errno()){
echo "Failed to connect to mysql: ", mysqli_connect_error();
error_log("Failed to connect to MySQL: " , mysqli_connect_error());
return;
}else {
echo "Success connecting to the DB!";
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function isMysqlSupported()\n {\n $exts = get_loaded_extensions();\n $mysqli_support = in_array('mysqli', $exts) ? true : false;\n $pdo_support = in_array('pdo_mysql', $exts) ? true : false;\n\n $checking_result = $mysqli_support || $pdo_support ? true : false;\n\n if (!$checking_result) {\n App::instance()->setNotification('E', App::instance()->t('error'), App::instance()->t('text_mysql_support_notice'), true, 'validator');\n }\n\n return $checking_result;\n }",
"function enabled() {\n\t\treturn extension_loaded('mysql');\n\t}",
"protected function isConnectionMysql() {}",
"protected function checkMysqlVersion() {}",
"function probe() {\n $this->probe_errors = array();\n if (!function_exists('mysql_connect')){\n $this->probe_errors[] = sprintf(DB_ERR_EXTENSION_UNAVAILABLE,'MySQL');\n return false;\n }\n if (!($conn = @mysql_connect($this->server.(($this->port==\"\")?\"\":\":\".$this->port),\n $this->login,\n $this->password )) ) {\n $this->probe_errors[] = sprintf(DB_ERR_CONNECT_SERVER,$this->server);\n return false;\n }\n if (!@mysql_select_db($this->db,$conn)){\n $this->probe_errors[] = sprintf(DB_ERR_CONNECT_DATABASE,$this->db);\n return false;\n }\n return true;\n }",
"public static function enabled()\n {\n return in_array('mysql', PDO::getAvailableDrivers());\n }",
"function check_mysql()\n\t{\n\t\tif (mysql_errno()>0)\n\t\t\tdie(\"<br>.MySQL error\".mysql_errno().\":\".mysql_error());\n\t\t\treturn;\n\t}",
"protected function notMysql()\r\n {\r\n $this->info('Can only backup MYSQL databases');\r\n return false;\r\n }",
"public function dbIsInstalled();",
"private function is_db_available(){\n \t$host = Configuration::DB_HOST;\n\t\t$dbname = Configuration::DB_NAME;\n\t\t$dbuser = Configuration::DB_USER;\n\t\t$dbpass = Configuration::DB_PASS;\n\t\t$con = null;\n\t\ttry{\n\t\t\t$con = new PDO(\"mysql:host=$host;dbname=$dbname\", $dbuser, $dbpass, array(PDO::ATTR_PERSISTENT => true));\n\t\t}\n\t\tcatch(PDOException $e){\n\t\t\treturn false;\n\t\t}\n\t\t$con = null;\n\t\treturn true;\n }",
"public function check_db()\n {\n $test = $this->connection->query('SELECT COUNT(*) FROM ' . $this->connection->get_table_prefix() . 'users', null, null, true);\n return !is_null($test);\n }",
"function checkMySQL(){\r\n\tif(((is_object($GLOBALS[\"___mysqli_ston\"])) ? mysqli_errno($GLOBALS[\"___mysqli_ston\"]) : (($___mysqli_res = mysqli_connect_errno()) ? $___mysqli_res : false))){\r\n\t\techo \"<BR>***\";\r\n\t\tdie('Error: '.((is_object($GLOBALS[\"___mysqli_ston\"])) ? mysqli_error($GLOBALS[\"___mysqli_ston\"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false)));\r\n\t}\r\n}",
"function db_check() {\n\t\tif(!is_admin() || !$this->db_option || !$this->db_version || !$this->table_schema) return false;\n\t\tglobal $wpdb;\n\t\t$current_db_version = get_option($this->db_option);\n\t\tif($this->db_version != $current_db_version) {\n\t\t\t$this->db_install_options();\n\t\t\t$this->db_install($sql);\n\t\t}\n\t}",
"public function checkIfSetupRan()\r\n {\r\n $select = $this->table_gateway->getAdapter()\r\n ->getDriver()->getConnection()\r\n ->execute(\"SHOW TABLES LIKE 'admins'\");\r\n\r\n\r\n if ($select->count() > 0) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }",
"public function filterCheckDb()\n {\n App::$Database->addConnection($this->db, 'install');\n\n try {\n App::$Database->getConnection('install')->getDatabaseName();\n } catch (\\Exception $e) {\n return false;\n }\n\n return true;\n }",
"private function testPASLMySQL()\n\t{\n\t\t$dbDriver = \\PASL\\DB::factory($this->strMyDsn, false, false);\n\n\t\t$this->assertIsA($dbDriver, 'PASL\\DB\\Driver\\common');\n\t\t$this->assertIsA($dbDriver, 'PASL\\DB\\Driver\\mysql');\n\n\t\t// Test singleton factory for a native/custom driver\n\t\t$dbDriver = PASL_DB::singleton($this->strMyDsn, false, false);\n\t\t$this->assertIsA($dbDriver, 'PASL\\DB\\Driver\\common');\n\t\t$this->assertIsA($dbDriver, 'PASL\\DB\\Driver\\mysql');\n\n\t\t$sql = \"SELECT * FROM pasl_query_tests\";\n\n\t\t// Test the basic query response type\n\t\t$result = $dbDriver->query($sql);\n\t\t$this->assertIsA($result, 'resource');\n\n\t\t// Test basic query methods (should be compatible with MDB2 api)\n\t\t$this->testBasicQueryMethods($dbDriver);\n\t}",
"private function mysql()\n\t{\n\t\tif (isset($this->_conf['dbname']) AND $this->_conf['dbname'] != ''\n\t\t\tAND isset($this->_conf['hostname']) AND $this->_conf['hostname'] != '')\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$this->_con = new PDO('mysql:host='.$this->_conf['hostname'].';dbname='.$this->_conf['dbname'], $this->_conf['username'], $this->_conf['password']);\n\t\t\t\t\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t\tcatch(PDOException $ex)\n\t\t\t{\n\t\t\t\tif (isset($this->_conf['debug']) AND $this->_conf['debug'] == TRUE)\n\t\t\t\t{\n\t\t\t\t\terror('PDOCON->MySql', $ex->getMessage(), 500, TRUE);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\twriteLog('Error', $ex->getMessage());\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\twriteLog('Error', \"PDOCON->MySql: Invalid 'database name' or 'host name'\");\n\t\t\t\n\t\t\treturn FALSE;\n\t\t}\n\t}",
"public function isMySQL80(): bool\n {\n return version_compare($this->version(), '8.0.0', '>=') && version_compare($this->version(), '9.0.0', '<');\n }",
"final public function test() {\n return (function_exists('mysqli_connect'));\n }",
"function wp_check_mysql_version()\n {\n }",
"protected function checkMysqliReconnectSetting() {}",
"private static function check_db() {\n\t\tif (self::$db_installed) {\n\t\t\treturn true;\n\t\t}\n\n\t\tglobal $databases;\n\n\t\t$sth = Database::get()->prepare('SELECT table_name FROM information_schema.tables WHERE table_schema = :database AND table_name = :table');\n\n\t\t$sth->execute(array(\n\t\t\t':database' => $databases['default']['name'],\n\t\t\t':table' => 'brutal_variables',\n\t\t));\n\n\t\t$table = $sth->fetchObject();\n\n\t\tif ($table == false) {\n\t\t\t$query = '\n\t\t\t\tCREATE TABLE IF NOT EXISTS `brutal_variables` (\n\t\t\t\t\t`name` varchar(255) NOT NULL,\n\t\t\t\t\t`value` TEXT NOT NULL,\n\t\t\t\tPRIMARY KEY (`name`))\n\t\t\t';\n\n\t\t\tDatabase::get()->exec($query);\n\t\t}\n\n\t\tself::$db_installed = true;\n\n\t\treturn true;\n\t}",
"function dbtest() {\n\tif ($dbc = @mysql_connect(DB_HOST, DB_USER, DB_PASSWORD)) {\n\t\tif (!mysql_select_db(DB_NAME)) {\n\t\t\t$error_str = \"Error: Could not select database: \" . dberror();\n\t\t} else {\n\t\t\tdbclose($dbc);\n\t\t\treturn true;\n\t\t}\n\t} else {\n\t\t$error_str = \"Error: Could not connect to database: \" . dberror();\n\t}\n\treturn false;\n}",
"public function test_database()\n\t{\n\t\ttry {\n\t\t\treturn (bool) DB::query(Database::SELECT, 'SHOW DATABASES')\n\t\t\t\t->execute()\n\t\t\t\t->count();\n\t\t} catch (Database_Exception $e) {\n\t\t\treturn FALSE;\n\t\t}\n\t}",
"public function checkup()\n\t{\n\t\tif(empty($this->mysqli))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$errno = mysqli_errno($this->mysqli);\n\t\t\tif($errno == 2003 || $errno == 2006 || $errno == 2013)\n\t\t\t{\n\t\t\t\t//2003:Can't connect to MySQL server on 'hostname' (4,110) (此情况一般是网络超时、数据库压力过大等导致)\n\t\t\t\t//2006:MySQL server has gone away (dbproxy在重启时可能会出现此问题,sleep 状态的链接)\n\t\t\t\t//2013:Lost connection to MySQL server during query (dbproxy在重启时可能会出现此问题,正在执行query)\n\n\t\t\t\tmysqli_close($this->mysqli);\n\t\t\t\t$this->mysqli = $this->createConnection();\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t}",
"function checkMySQLVersion($needVersion)\n{\n $db = $GLOBALS['db'];\n $haveVersion = ($db->State() == 1) ? mysql_get_server_info() : mysql_get_client_info();\n\n\t\t// mysqlnd is retarded and has text at the front.\n\t\tif (strpos($haveVersion, \"mysqlnd\") === 0) {\n\n\t\t\t$version_bits = explode(\" \", $haveVersion);\n\t\t\t$haveVersion = $version_bits[1];\n\t\t}\n\n\t\t\n return (version_compare($haveVersion, $needVersion, '>'));\n}",
"public function testGetDBCon()\n {\n // TODO use a different check, if mariadb or mysql is used\n $this->assertTrue(false !== $this->fixture->getDBCon());\n }",
"private function canUseDatabase()\n {\n return $this->deploymentConfig->get('db');\n }",
"function mysqlConn(){\r\n\t($GLOBALS[\"___mysqli_ston\"] = mysqli_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASS));\r\n\t((bool)mysqli_query($GLOBALS[\"___mysqli_ston\"], \"USE \" . constant('MYSQL_DB')));\r\n\tcheckMySQL();\r\n}",
"function testMySQLConnection($host, $port, $user, $pass, $db_name, $db_prefix='', $db_create=FALSE)\n {\n if (preg_match(\"/[^a-zA-Z0-9_]+/\", $db_prefix)) return array('db_prefix' => 'e_mysql_latin'); // Error: prefix is not latin\n if (preg_match(\"/[^a-zA-Z0-9_]+/\", $db_name)) return array('db_name' => 'e_mysql_latin'); // Error: prefix is not latin\n\n if (!$link = @mysql_connect($host .':'. $port, $user, $pass)) return array('db_host' => 'e_mysql_connect'); // return 'e_mysql_'. mysql_errno($link); // Upgrade\n \n global $iConfig;\n if (version_compare(preg_replace(\"/(\\d+\\.)(\\d+[\\.]*)(\\d*)[\\s\\S]*/i\", \"\\$1\\$2\\$3\",mysql_get_server_info()), $iConfig['mysql']['mysql_version'], '<'))\n {\n return array('db_host' => 'e_mysql_version');\n }\n\n if (!mysql_select_db($db_name, $link))\n {\n if ($db_create)\n {\n $sql = sprintf(\"CREATE DATABASE `%s` CHARACTER SET 'utf8' COLLATE 'utf8_general_ci';\", $db_name); // TODO: Kill DB on Uninstall\n if (!mysql_query($sql, $link)) return array('db_name' => 'e_mysql_create_db'); // return 'e_mysql_'. mysql_errno($link); // Upgrade\n }else{\n return array('db_name' => 'e_mysql_nodb'); // specified DB not exist\n }\n }\n \n $sql = sprintf('SELECT COUNT(*) FROM %s', $db_prefix.'Product_product_group'); // Check method : If this table exist - maybe NeedSecuer already installed\n if (mysql_query($sql, $link)) return array('db_prefix' => 'e_mysql_table_exist'); // return 'e_mysql_'. mysql_errno($link); // Upgrade\n \n \n mysql_close($link);\n\n return array();\n }",
"function db_check() {\n global $wpdb;\n $table_name = $wpdb->prefix . \"bl_maintainers\";\n // if tables aren't installed then install them\n if ($wpdb->get_var(\"SHOW TABLES LIKE '$table_name'\") != $table_name) {\n $this->db_install();\n }\n }",
"function wp_check_php_mysql_versions()\n {\n }",
"protected function preflightDB()\n {\n $check = $this->db->canInstall();\n if ($check !== true) {\n $error = array_shift($check);\n array_unshift($check, $this->translate($error));\n return $this->error(call_user_func_array('sprintf', $check), true);\n }\n $tablename = \"uptest\" . uniqid();\n if (!$this->db->query(\"CREATE TABLE $tablename(a int, b int)\")) {\n $fail = \"Table creation\";\n } elseif (!$this->db->query(\"INSERT INTO $tablename(a,b) VALUES(1,2)\")) {\n $fail = \"Insertion\";\n } elseif (!$this->db->query(\"UPDATE $tablename SET a=2 WHERE a=1\")) {\n $fail = \"Update\";\n } elseif (!$this->db->query(\"DELETE FROM $tablename WHERE a=2\")) {\n $fail = \"Deletion\";\n }\n if ($this->db->tableExists($tablename)) {\n if (!$this->db->query(\"DROP TABLE $tablename\") && empty($fail)) {\n $fail = \"Table deletion\";\n }\n }\n if (!empty($fail)) {\n return $this->error(\"$fail test failed, please check DB permissions.\", true);\n }\n return true;\n }",
"function _mysql_test($mysql_host,$mysql_database, $mysql_username, $mysql_password) {\n\tglobal $output_messages;\n\t\n\t$link = mysql_connect($mysql_host, $mysql_username, $mysql_password);\n\tif (!$link) {\n\t array_push($output_messages, 'Could not connect: ' . mysql_error());\n\t}else{\n\t\tarray_push ($output_messages,\"Connected with MySQL server: <b>\".$mysql_username.\"@\".$mysql_host.\"</b> <font color=\\\"green\\\">Successfully</font>\");\n\t\t\n\t\t$db_selected = mysql_select_db($mysql_database, $link);\n\t\tif (!$db_selected)\n\t\t\tarray_push ($output_messages,'Can\\'t use <b>'.$mysql_database.'</b> : ' . mysql_error());\n\t\telse\n\t\t\tarray_push ($output_messages,\"Connected with MySQL database: <b>\".$mysql_database.\"</b> <font color=\\\"green\\\">Successfully</font>\");\n\t}\n\n}",
"public function isDatabaseRequired()\n {\n return $this->isSomethingRequired(array(\n 'full_backup', 'database'\n ));\n }",
"public function checkDatabaseStructure( );",
"public function testThatWeCanConnectToDatabase(){\n $this->assertNotEmpty($this->db->connect());\n }",
"protected function isDatabaseReady()\n {\n // Such as during setup of testsession prior to DB connection.\n if (!DB::is_active()) {\n return false;\n }\n\n // If we have a DB of the wrong type then complain\n if (!(DB::get_conn() instanceof MySQLDatabase)) {\n throw new Exception('HybridSessions\\Store\\DatabaseStore currently only works with MySQL databases');\n }\n\n // Prevent freakout during dev/build\n return ClassInfo::hasTable('HybridSessionDataObject');\n }",
"public function hasDatabase($name);",
"function configEnabled() { global $db;\n global $lang;\n\n $dbtst = $db->query(\"SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = '\".$lang[\"config_db_name\"].\"'\");\n if($dbtst->num_rows == 0) {\n $prepReturn = prepConfig();\n if ($prepReturn == \"Ready\"){\n return true;\n } else {\n return $prepReturn;\n }\n } else {\n return true;\n }\n }",
"protected function checkIfDbalExtensionIsInstalled() {}",
"public static function isInstalled(){\n\t\treturn !empty(\\GO::config()->db_user);\n\t}",
"public function checkConnection(){\r\n\t\treturn false;\r\n\t}",
"public function testMakeAuthWithMysqlBackendConfig()\n {\n $config = $this->config;\n $factory = new Factory($config);\n $basicAuth = $factory->makeAuth();\n $this->assertInstanceOf(BasicAuth::class, $basicAuth);\n\n // test with missing db config\n $config = $this->config;\n unset($config['db']);\n $factory = new Factory($config);\n $this->expectException(BasicAuthException::class);\n $factory->makeAuth();\n }",
"public function hasAdministrativeDatabases() {\n return $this->_has(9);\n }",
"private function _connectToMysql(){\n\t\t\tif ($this->_dbConn != null){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t$dsn = 'mysql:dbname=ProspectEye;host=127.0.0.1';\n\t\t\t$user = 'root';\n\t\t\t$password = 'mike5567';\n\n\t\t\t$this->_dbConn = new PDO($dsn, $user, $password);\n\t\t\t$this->_dbConn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); \n\n\t\t\treturn true;\n\t\t}",
"public function isConfigured(): bool\n {\n foreach ($this->dbal->getDatabases() as $db) {\n if (!$db->hasTable($this->config->getTable())) {\n return false;\n }\n }\n\n return true;\n }",
"private function check_db() {\n if (ee()->db->table_exists($this->table_name)) {\n return true;\n }\n return $this->make_db();\n }",
"function sql_check($query) {\n\tsql_connect();\n\tglobal $defaultdb;\n\t$return = $defaultdb->check($query);\n\treturn $return;\n}",
"protected function _check(){\n\t\tif(Configure::read('Database.installed') == 'true') {\n\t\t\t$this->Session->setFlash(__(\"Website already configured\"));\n\t\t\t$this->redirect('/');\t\n\t\t}\n\t}",
"protected function mysqlSetup($query){\n \treturn $this->mysqlBool($query);\n }",
"public function check_db_tables(){\n\t\t$query = $this->db->prepare(\"SELECT * FROM `nw_users`\");\n\n\t\ttry{\n\t\t\t$query->execute();\n\t\t\t$check = $query->fetch();\n\t\t\tif($check == \"\"){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn true;\t\n\t\t\t}\n\t\t\t\n\n\t\t}catch(PDOException $e){\n\t\t\treturn false;\n\t\t}\n\t}",
"public function ping(){\n if( !function_exists( 'mysql_ping' ) ) {\n throw new Exception( \"Tried to call mysql_ping but this is ancient PHP version. Faking it!\\n\" );\n return true;\n }\n \n $ping = mysql_ping( $this->connection );\n if ( $ping ) \n {\n return true;\n }\n\n // Need to reconnect manually in MySQL client 5.0.13+\n if (version_compare( mysql_get_client_info(), '5.0.13', '>=' )){\n mysql_close( $this->connection );\n $this->connection = false;\n $this->connect(true);\n return true;\n }\n return false;\n }",
"public function isMySQL57(): bool\n {\n return version_compare($this->version(), '5.7.0', '>=') && version_compare($this->version(), '5.8.0', '<');\n }",
"protected function checkDbAndTables()\n\t{\n\t\tif (!isset($GLOBALS['egw_info']['apps']))\n\t\t{\n\t\t\t$GLOBALS['egw']->applications->read_installed_apps();\n\t\t}\n\t\tif (version_compare($GLOBALS['egw_info']['apps']['activesync']['version'] , '16.1.001', '<'))\n\t\t{\n\t\t\tthrow new UnavailableException('ZPush tables not yet installed, run setup!');\n\t\t}\n\t\treturn true;\n\t}",
"public function PHP_has_valid_mysql_socket(&$error)\n\t{\n\t\tif (!$this->getEnv('MOUNT_MYSQL_SOCKET_TO_LOCALDISK')) {\n\t\t\t$error = 'Socket mount not enabled.';\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!file_exists($this->getEnv('MYSQL_SOCKET_PATH'))) {\n\t\t\t$error = 'Socket file not found.';\n\t\t\treturn false;\n\t\t}\n\n\t\t//if (getMySQLConfigByKey('socket') != $ENV['MYSQL_SOCKET_PATH']) {\n\t\t//\t$error = 'Mounted from mysql:'.$ENV['MYSQL_SOCKET_PATH']. ', but socket is in mysql:'.getMySQLConfigByKey('socket');\n\t\t//\treturn FALSE;\n\t\t//}\n\n\t\t$error = '';\n\t\treturn true;\n\t}",
"static function verify()\n {\n global $pommo;\n $dbo = & Pommo::$_dbo;\n if (is_object($dbo))\n {\n $query = \"SHOW TABLES LIKE '%s'\";\n $query = $dbo->prepare($query, array($dbo->_prefix.'%'));\n if ($dbo->records($query) > 10)\n return true;\n }\n return false;\n }",
"function detectdb() {\r\n\t\t\t$names = array();\r\n\t\t\t$this->db->Halt_On_Error = 'no';\r\n\t\t\t$tables = $this->db->table_names();\r\n\t\t\t\r\n\t\t\tforeach ($tables as $tab_info) {\r\n\t\t\t\t$names[] = $tab_info['table_name'];\r\n\t\t\t}\r\n\t\t\tif(is_array($names) && in_array('s3db_account', $names)) {\r\n\t\t\t\treturn True;\r\n\t\t\t} else {\r\n\t\t\t\treturn False;\r\n\t\t\t}\r\n\t\t}",
"public function checkInstalled() {\n $query = $this->db->query(sprintf('SHOW TABLES LIKE \"%s\"',\n Config::getTableName('requests')));\n $request_table_result = $query->rowCount();\n\n $query = $this->db->query(sprintf('SHOW TABLES LIKE \"%s\"',\n Config::getTableName('users')));\n $user_table_result = $query->rowCount();\n\n if ($request_table_result > 0 || $user_table_result > 0) {\n return true;\n } else {\n return false;\n }\n }",
"function mysql_auth_usermanagement()\n{\n return 1;\n}",
"function configure_db() {\n //Old data is deleted before adding the new db structure\n $db = DB::getInstance();\n //$file = new File(CORE_INSTALLER_FILES_PATH.'/db/init.sql', 'r');\n if(!$db->query(file_get_contents(CORE_INSTALLER_FILES_PATH.'/db/init.sql'))->error()) {\n return true;\n }\n return false;\n}",
"public function checkDatabaseExists(): bool\n {\n $query = QueryBuilder::new($this->poolName, null, null);\n\n return $query->fromRaw('information_schema.SCHEMATA')\n ->where('SCHEMA_NAME', $this->getDatabaseName())\n ->exists();\n }",
"public function checkConnection()\n {\n $this->last_error = '';\n if (!isset($this->database)) \n $this->connect();\n }",
"public static function open(){\n//\t\techo 'open'.\"\\n<br>\";\n\t\t$db = RuntimeInfo::instance()->connections()->MySQL(RuntimeInfo::instance()->helpers()->Session()->getSessionConfig()->getHosts());\n\t\t\n\t\t// Change this dependant on what the default db type is (ex: mysql 4.o-, 4.1+, or oracle 10g+)\n\t\tif($db instanceof MySQLAbstraction) { return true; } // to true from $db\n\t\treturn false;\n\t}",
"function check_db(){\n if( ! $this->database_exists() ){\n $this->create_table();\n }\n }",
"public function updraftplus_use_mysqli() {\n\t\treturn !empty($this->use_mysqli);\n\t}",
"public function access() {\n if ( ! isset($GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['dbname']) ) {\n return false;\n }\n return true;\n }",
"public function check_queries() {\r\n\t\tQueryManager::check_queries();\r\n\t}",
"public function needs_installing() {\n\t\t$settings = red_get_options();\n\n\t\tif ( $settings['database'] === '' && $this->get_old_version() === false ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"private function createSchema(): bool\n {\n try {\n $dsn = \"mysql:host={$this->host}:{$this->port};\";\n $this->PDO = new PDO($dsn, $this->user, $this->password);\n $schema = file_get_contents('../schema.sql');\n $this->queryExecute($schema);\n\n return $this->queryExecute('USE `mosylechallenge`;');\n } catch (Throwable $e) {\n throw new Exception(\"Database connection failed: '{$e->getMessage()}'\", 500);\n }\n }",
"function testDBLogging() {\n if (strlen(DBPASS) > 0) {\n Debug::$enable_show = false;\n Debug::$enable_log = true;\n $this->assertTrue(Debug::out('Testing, testing, 123'));\n }\n }",
"public function isSupported() {\nif (extension_loaded('mysqli')) {\n\treturn true;\n}\nelse {\n\t$this->error='The mysqli extension for PHP is not installed.';\n\treturn false;\n};\n}",
"public function getMysqlVersion()\r\n {\r\n $info = $this->runProcess(\"mysql -V\");\r\n\r\n $this->summary[\"MySQL version:\"] = \"MySQL version (mysql -V): \" . $info .\"\\n\\n\";\r\n }",
"protected function isInstalled(){\n\t\t$dsn = Configuration::get('dsn', '');\n\t\t//echo \"dsn = \" . $dsn . \"--\";\n\t\tif ($dsn == ''){\n\t\t\t$alreadyInstalled = false;\n\t\t}\n\t\telse{\n\t\t\t$alreadyInstalled = true;\n\t\t}\n\t\treturn $alreadyInstalled;\n\t}",
"public function testDBConnection(){\r\n $mysqli = $this->mysqli;\r\n\r\n /* check connection, if no errors continue */\r\n if (!$mysqli->connect_errno) {\r\n\r\n /* check if server is alive, if server is alive then continue */\r\n if ($mysqli->ping())\r\n $this->assertTrue(true);\r\n else\r\n $this->assertTrue(true);\r\n\r\n }else{\r\n $this->assertTrue(true);\r\n }\r\n }",
"public function enabled()\n {\n return extension_loaded('ibm_db2');\n }",
"public function onEnable()\n {\n\t\t$this->onMySQL();\n }",
"public function doDatabaseCheck()\n {\n $validator = new Validation\\Database();\n $validator->setPathResolver($this->config->app['path_resolver']);\n $validator->setConfig($this->config->app['config']);\n $validator->check();\n }",
"public function testIfNoMysqlCredentialsAreSuppliedGlobalDefaultSettingsAreUsedInstead()\n\t {\n\t\t$GLOBALS[\"DEFAULT_DATABASE\"][\"dbhost\"] = $GLOBALS[\"DB_HOST\"];\n\t\t$GLOBALS[\"DEFAULT_DATABASE\"][\"dbname\"] = $GLOBALS[\"DB_DBNAME\"];\n\t\t$GLOBALS[\"DEFAULT_DATABASE\"][\"dbuser\"] = $GLOBALS[\"DB_USER\"];\n\t\t$GLOBALS[\"DEFAULT_DATABASE\"][\"dbpass\"] = $GLOBALS[\"DB_PASSWD\"];\n\t\t$this->object = new MySQLdatabase(\"\", \"\", \"\", \"\");\n\t\t$this->assertEquals(true, $this->object->isConnected());\n\t }",
"public function mysql()\n\t{\n\t\t@mysql_pconnect(MySQL_Host, MySQL_User, MySQL_Pass) or $this->__mysql_error();\n\t\t#mysql_connect(MySQL_Host, MySQL_User, MySQL_Pass);\n\t\t@mysql_select_db(MySQL_DB) OR $this->__mysql_error();\n\n\t\tGLOBAL $mysql_count;\n\t\t$mysql_count++;\n\t}",
"public function isConnected()\n\t{\n\t\treturn isset( $this->pdo );\n\t}",
"function NeedDatabaseUpgrade()\n\t{\n\t\tif ($this->database_version == -1) {\n\t\t\t$this->CheckCron();\n\t\t}\n\n\t\tif ($this->database_version < SENDSTUDIO_DATABASE_VERSION) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public function checkConfig();",
"public function testSchemaChecking() {\n // Create some configuration that should be skipped.\n $this->config('config_schema_test.noschema')->set('foo', 'bar')->save();\n $this->runUpdates();\n $this->assertSame('bar', $this->config('config_schema_test.noschema')->get('foo'));\n\n }",
"public static function mysqlVersion()\n {\n if (self::isEnabled('shell_exec')) {\n $raw = explode(',', shell_exec('mysql -V'));\n $raw = explode('Distrib', $raw[0]);\n return trim($raw[1]);\n } else {\n return 'Unknown';\n }\n }",
"public static function is_installed() {\n\t\t\n if (!file_exists(APPPATH . 'config/database.php')) {\n\t\t\treturn false;\n }\n\n if (!file_exists(APPPATH . 'cache')) {\n return false;\n }\n\n $cache = Cache::instance();\n if ($cache->get('njiandan_installed')) {\n return true;\n } else {\n return false;\n }\n }",
"public function getIsDbConnectionValid(): bool\n {\n /** @var WebApplication|ConsoleApplication $this */\n $e = null;\n try {\n $this->getDb()->open();\n } catch (DbConnectException $e) {\n // throw it later\n } catch (InvalidConfigException $e) {\n // throw it later\n }\n\n if ($e !== null) {\n Craft::error('There was a problem connecting to the database: ' . $e->getMessage(), __METHOD__);\n /** @var ErrorHandler $errorHandler */\n $errorHandler = $this->getErrorHandler();\n $errorHandler->logException($e);\n return false;\n }\n\n return true;\n }",
"function beforeUse(): bool\n {\n //使用前调用,当返回true,表示该对象可用。返回false,该对象失效,需要回收\n //根据个人逻辑修改,只要做好了断线处理逻辑,就可直接返回true\n return $this->getMysqlClient()->connected;\n }",
"public static function isMdb2Available(): bool\n {\n /* load PEAR-DB */\n @include_once \"MDB2.php\";\n return class_exists(\"MDB2\", false);\n }",
"public function check_connection() {\n return $this->dbmail->is_connected();\n }",
"private function isMySQL8AfterFix()\n {\n $results = DB::select(DB::raw('select version()')->getValue(DB::connection()->getQueryGrammar()));\n $mysql_version = $results[0]->{'version()'};\n\n return version_compare($mysql_version, '8.0.4', '>=');\n }",
"function d4os_io_db_070_os_users_is_alive() {\n return array(\n 'success' => d4os_io_db_070_mysql_is_alive('os_robust', 'os robust'),\n );\n}",
"abstract public function hasDatabase(BaseConnectionInfo $connInfo);",
"public function checkIfTablesExist()\n {\n foreach (self::DB_TABLE_INFO as $tableName => $createSql) {\n try {\n $result = $this->connection->query('SELECT 1 FROM turns LIMIT 1');\n } catch (Exception $e) {\n $result = false;\n }\n\n if ($result === false) {\n $this->connection->exec($createSql);\n }\n }\n }",
"public function testRequireDatabaseConfigs() {\n\t\tif (!$this->_hasTrigger('requireDatabaseConfigs')) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$expected = $this->_manualCall('requireDatabaseConfigs', $this->ObjectEvent);\n\n\t\t$result = $this->Event->trigger($this->ModelObject, $this->plugin . '.requireDatabaseConfigs');\n\t\t$this->assertEquals($expected, $result);\n\t}",
"function getMySQLVersion() { \n $output = shell_exec('mysql -V'); \n preg_match('@[0-9]+\\.[0-9]+\\.[0-9]+@', $output, $version); \n return $version[0]; \n }",
"public function checkBackendAccessSettingsFromInitPhp() {}",
"private function check_conf() {\n ConfigChecker::check();\n }",
"private function verify ()\n {\n // test if Database exists\n try {\n $db = $this->getDefaultAdapter();\n } catch (Exception $e) {\n throw new Zend_Exception($e->getMessage());\n }\n \n // test if table exists\n try {\n $result = $db->describeTable($this->_name);\n \n if (empty($result)) {\n $this->createTable();\n $this->insertRows();\n }\n } catch (Exception $e) {\n $this->createTable();\n $this->insertRows();\n }\n }",
"function testConnection($args) {\n return array( 'success' => mysql_pconnect($args['server'], $args['username'], $args['password']) != false );\n }",
"function is_system_configured() {\n global $CFG;\n return (!empty($CFG->ombielalertsserverendpoint) && \n !empty($CFG->ombielalertsserversserverusername) && \n !empty($CFG->ombielalertsserverpassword) && \n !empty($CFG->ombielalertsorgcode) && \n !empty($CFG->ombielalertsorgpassword)\n );\n }"
] | [
"0.7289659",
"0.71716887",
"0.7086679",
"0.69773275",
"0.68619114",
"0.67962164",
"0.65870655",
"0.65672576",
"0.6469064",
"0.64636695",
"0.64409333",
"0.63190925",
"0.6313695",
"0.6245565",
"0.6176225",
"0.6142267",
"0.6130876",
"0.6109075",
"0.60920244",
"0.6053298",
"0.60069555",
"0.59770906",
"0.596686",
"0.596432",
"0.5938315",
"0.5902795",
"0.58829135",
"0.5881505",
"0.58611274",
"0.5861123",
"0.5848615",
"0.5843177",
"0.5840971",
"0.5818503",
"0.58171976",
"0.5791244",
"0.57815456",
"0.5760908",
"0.57183224",
"0.57069826",
"0.5700571",
"0.5677941",
"0.56763667",
"0.5658897",
"0.5652815",
"0.56380695",
"0.5638066",
"0.5627971",
"0.56030506",
"0.56007826",
"0.55962384",
"0.55879503",
"0.55874825",
"0.55860394",
"0.55835456",
"0.55732125",
"0.5573001",
"0.557147",
"0.5568504",
"0.55599254",
"0.5559261",
"0.5555286",
"0.5542023",
"0.55313444",
"0.55236715",
"0.5516811",
"0.5510695",
"0.5504124",
"0.54966486",
"0.54852575",
"0.54829437",
"0.5481845",
"0.5468194",
"0.54655606",
"0.5451329",
"0.5435571",
"0.5434166",
"0.54183763",
"0.5416505",
"0.5416361",
"0.5384776",
"0.53828967",
"0.537532",
"0.53729075",
"0.5372614",
"0.537094",
"0.5368874",
"0.53535503",
"0.5352758",
"0.534694",
"0.5339953",
"0.5334489",
"0.5330789",
"0.53201437",
"0.531689",
"0.5312365",
"0.53086305",
"0.5302507",
"0.5302271",
"0.5300194",
"0.52968156"
] | 0.0 | -1 |
Get the value of name | public function getName()
{
return $this->name;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getNamedValue(): string {\n return self::$namedValues[$this->value];\n }",
"public function get($name)\n {\n return $this->values[$name];\n }",
"public function getValue(string $strName);",
"public function getValue($name) {\n\t\treturn $this->getField($name)->getValue();\n\t}",
"public function getName() {\n //return the value name\n return $this->Name;\n }",
"public function get($name)\n\t{\n\t\tif (isset($this->values[$name])) {\n\t\t\treturn $this->values[$name];\n\t\t}\n\t}",
"public function get($name)\n\t{\n\t\treturn $this->data[$name];\n\t}",
"function getName () {return $this->getFieldValue ('name');}",
"public static function getValue($name){\n $inputs = self::getInput();\n $field = explode('-',$name);\n\n if(!empty($inputs) && isset($inputs['wpmg'])){\n if(array_key_exists($field[1], $inputs['wpmg'])){\n if(array_key_exists($field[2], $inputs['wpmg']['filter'])){\n return $inputs['wpmg']['filter']['title'];\n }\n }\n }\n }",
"public function __get($name) {\n\t\treturn $this->_values[$name];\n\t}",
"public function get( $name );",
"function getValue() {\n global ${$this->name}, ${$this->name.\"_name\"}, ${$this->name.\"_old\"}; // ${$this->name} = ${\"surname\"} = $surname\n $ext=substr(${$this->name.\"_name\"},-3);\n if ($ext==\"\") $ext=${$this->name.\"_old\"};\n if ($ext==\"\") $ext=$this->value;\n return $ext;\n }",
"public function __get($name)\n {\n $key = upperCaseSplit($name, '_');\n return $this->data[$key];\n }",
"protected function getValue($name)\n { // Initialize to null\n $value = null;\n $value = Yii::app()->request->getParam('rbm_'.$this->_domain->type.'_'.$name); \n if( $value === null ) $value = Yii::app()->request->getParam('rbm_'.$name);\n if( $value === null ) $value = Yii::app()->request->getParam($name);\n // Return the value\n return $value;\n }",
"public function get($name);",
"public function get($name);",
"public function get($name);",
"public function get($name);",
"public function get($name);",
"public function get($name);",
"public function get($name);",
"public function get($name);",
"public function get($name);",
"public function get($name);",
"public function get($name);",
"public function get($name);",
"function get($name){ \n \t return $this->result[$name]; \n \t}",
"public function __GET($name){\n\t\t\t//LEARNED imeto na promenlivata !\n\t\t\t//echo $name;\n\t\t\treturn $this->data[$name];\n\t\t}",
"public function get(string $name);",
"public function getFieldValue($name)\n\t\t{\n\t\t\treturn $this->row[$name];\n\t\t}",
"public function get($name) {\n\t\treturn $this->$name;\n\t}",
"public function __get($name)\n {\n if ($name == 'value') {\n return $this->value;\n }\n }",
"public function getValue( $name )\n {\n $name = us($name);\n return isset($this->values[$name]) ? $this->values[$name] : null;\n }",
"public function get(string $name): string;",
"function __get($name) {\n return $this->data[$name];\n }",
"public function get($name) {\n return $this->$name;\n }",
"public function get(string $name): Value;",
"public function getName() { return $this->data['name']; }",
"private static function getValue($name)\n\t{\n\t\treturn $_POST[$name] ?? null;\n\t}",
"public function getName(){ return $this->getField('name'); }",
"public function getField($name) { return $this->fields[$name]; }",
"public function get($name) {\n return $this->app->getVar($name);\n }",
"function _getVar($name) {\n if( is_array($this->_vars) && isset($this->_vars[\"$name\"]) )\n return $this->_vars[\"$name\"];\n else\n return \"\";\n }",
"public function name()\n\t{\n\t\treturn $this->array['name'] ?? '';\n\t}",
"public function getName()\n {\n return $this->getValue('name');\n }",
"public function __get($name)\n {\n return $this->data[$name];\n }",
"public function __get($name)\n {\n return $this->data[$name];\n }",
"public function __get($name)\n {\n return $this->data[$name];\n }",
"public function getName () {\n\treturn $this->get('name');\n }",
"public function get($name) {}",
"function get_name () {\n return $this -> name;\n }",
"public function getPostValue($name){\n\t\t$id_arr = $this->relay[$name];\n\t\t$id = $id_arr[0];\n\t\treturn $this->elements[$id]->getValue($name);\t\n\t}",
"public function get_name(){\n\t\treturn $this->name;\n\t}",
"public function getField($name) {\n return $this->getFields()[$name];\n }",
"public function __get($name)\n {\n return $this->attributes[$name];\n }",
"static public function get($name) {}",
"public static function getValue($name) {\n\t\tif (isset($_POST[$name])) {\n\t\t\treturn $_POST[$name];\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}",
"public function __get($name)\n {\n return $this->getParam($name);\n }",
"public function __get($name)\n {\n Precondition::isTrue(isset($this->data[$name]), 'field ' . $name . ' does not exist');\n\n return $this->data[$name];\n }",
"public function getParam($name)\n {\n return Tools::getValue($name);\n }",
"function getPropertyName() ;",
"public function getField($name) {\n\t\treturn $this->fields[$name];\n\t}",
"public function get_name();",
"public function get_name();",
"public function get_name();",
"public function __get($name) {\n\t\tif ($name === 'event_name')\n\t\t\t$ret = $this->getEventName ();\n\t\telse\n\t\t\t$ret = $this->$name;\n\t\treturn $ret;\n\t}",
"public function GetName () \r\n\t{\r\n\t\treturn ($Name);\r\n\t}",
"function\tgetName() {\n\t\treturn $this->name ;\n\t}",
"public function getName() {\n return @$this->attributes['name'];\n }",
"public function __get($name)\n\t{\n\t\treturn $this->var[$name];\n\t}",
"public function __get($name) {\r\n // through $name\r\n \r\n return $this->$name;\r\n }",
"public function __get($name)\n {\n $vars = $this->vars();\n return $vars[$name];\n }",
"public function getValue($name) {\n return (array_key_exists($name, $this->arDataset) ? $this->arDataset[$name] : null);\n }",
"public function __get( $name )\n\t{\n\t\treturn $this->input( $name );\n\t}",
"function get_name()\n\t{\n\t\treturn $this->name;\n\t}",
"public function name()\n\t{\n\t\treturn $this->get($this->meta()->name_key);\n\t}",
"public static function get_name() : string ;",
"public static function get_name() : string ;",
"public function __get($name)\n {\n $attribute = parent::__get($name);\n if ($name == 'values' && $attribute) {\n return $attribute[0]['value'];\n }\n return $attribute;\n }",
"public function __get($name)\n {\n $name = $this->normalize($name);\n if (isset($this->data[$name])) {\n return $this->data[$name];\n }\n }",
"public function getnameAttribute() : String\n {\n $locale = LaravelLocalization::getCurrentLocale();\n $fieldName = 'name';\n $column = $fieldName.\"_\" . $locale;\n $value = $this->{$column};\n return $value;\n }",
"function get_name() {\n\t\treturn $this->get_name_from_vtec();\t\n\t}",
"public function getname()\n {\n return $this->name;\n }",
"function __get($name)\n\t{\n\t\t$this->checkValid();\n\t\tif(isset($this->data->{$name})) {\n\t\t\treturn $this->data->{$name};\n\t\t}\n\t}",
"protected function _get($name) {}",
"private function get_name()\n\t{\n\t\treturn $this->m_name;\n\t}",
"private function get_name()\n\t{\n\t\treturn $this->m_name;\n\t}",
"function getName()\n {\n return $this->getAttribute(\"name\");\n }",
"function __get( $name ) {\n\t\treturn $this->$name;\n\t}",
"public static function fetch_name($name) {\n\t\tpreg_match('/\\!name\\=\\\"(.*?)\\\"/', $name, $output);\n\t\treturn $output[1];\n\t}",
"public static function getPostValue($name)\n {\n if (isset($_GET[$name])) return $_GET[$name];\n else if(isset($_POST[$name])) return $_POST[$name];\n else return '';\n }",
"public function __get( $name )\n {\n switch ( $name )\n {\n case \"magic\":\n case \"version\":\n case \"userName\":\n case \"groupName\":\n case \"deviceMajorNumber\":\n case \"deviceMinorNumber\":\n case \"filePrefix\":\n return $this->properties[ $name ];\n }\n\n return parent::__get( $name );\n }",
"public function getName() {\n return $this->get(\"name\");\n }",
"public function __get($name)\n\t{\n\t\tif (isset($this->searchFields[$name]))\n\t\t\treturn isset($this->searchFields[$name]['value']) \n\t\t\t\t\t? $this->searchFields[$name]['value'] \n\t\t\t\t\t: '';\n\t\telse\n\t\t\treturn parent::__get($name);\n\t}",
"public function get_name(){\n return $this->name;\n }",
"public function GetName () {\n\t\treturn $this->name;\n\t}",
"public function getByName(string $name): string;",
"public function __get($name) {\n return $this->getVariable($name);\n }",
"protected function GetName() {\n\t\treturn $this->name;\n\t}",
"public function __get($_name);",
"function get_name() {\n return $this->name;\n }"
] | [
"0.77541625",
"0.74164987",
"0.73862326",
"0.7365711",
"0.73301",
"0.7300159",
"0.72461575",
"0.723713",
"0.7210124",
"0.7202034",
"0.71618974",
"0.71227926",
"0.7083224",
"0.7002064",
"0.6989295",
"0.6989295",
"0.6989295",
"0.6989295",
"0.6989295",
"0.6989295",
"0.6989295",
"0.6989295",
"0.6989295",
"0.6989295",
"0.6989295",
"0.6989295",
"0.69885033",
"0.69792837",
"0.6979024",
"0.69520956",
"0.69471216",
"0.6935919",
"0.6931107",
"0.6925081",
"0.6906663",
"0.6902199",
"0.68967533",
"0.6888218",
"0.6885791",
"0.6884905",
"0.68841726",
"0.68758166",
"0.6867859",
"0.6862919",
"0.68601716",
"0.6846364",
"0.6846364",
"0.6846364",
"0.6842081",
"0.6803012",
"0.6797516",
"0.67837405",
"0.67836845",
"0.677617",
"0.67313194",
"0.6724863",
"0.6722866",
"0.67217594",
"0.67135656",
"0.67113507",
"0.67090803",
"0.670508",
"0.66843826",
"0.66843826",
"0.66843826",
"0.66794944",
"0.6672469",
"0.66722965",
"0.6671202",
"0.6668707",
"0.6668606",
"0.66678613",
"0.666558",
"0.66646343",
"0.6662973",
"0.6657341",
"0.6652087",
"0.6652087",
"0.6646387",
"0.66332716",
"0.6633189",
"0.6628929",
"0.66270876",
"0.6625813",
"0.66205746",
"0.6614656",
"0.6614656",
"0.66092956",
"0.66086465",
"0.6607525",
"0.6607076",
"0.6605725",
"0.66002417",
"0.6594333",
"0.65893793",
"0.6589302",
"0.65865886",
"0.6583722",
"0.65825456",
"0.6574205",
"0.65718806"
] | 0.0 | -1 |
Set the value of name | public function setName(string $name)
{
$this->name = $name;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function setName($value) {\n $this->name = $value;\n }",
"function setName($value) {\n $this->name = $value;\n }",
"public function setName(?string $name): void\n {\n $this->name['value'] = $name;\n }",
"public function setName(?string $name): void\n {\n $this->name['value'] = $name;\n }",
"public function setName(?string $name): void\n {\n $this->name['value'] = $name;\n }",
"public function setName($value)\r\n {\r\n $this->name = $value;\r\n }",
"public function setName($value)\r\n {\r\n $this->name = $value;\r\n }",
"protected function _setName($name, $value) {}",
"function setName( $value )\r\n {\r\n $this->Name = $value;\r\n }",
"function setName( $value )\r\n {\r\n $this->Name = $value;\r\n }",
"function setName( $value )\r\n {\r\n $this->Name = $value;\r\n }",
"function setName( $value )\r\n {\r\n $this->Name = $value;\r\n }",
"function setName( $value )\r\n {\r\n $this->Name = $value;\r\n }",
"protected function setName($value)\n\t{\n\t\t$this->name = $value;\n\t}",
"protected function setName($value)\n\t{\n\t\t$this->name = $value;\n\t}",
"public function set_name($name);",
"function setName( $value )\n {\n $this->Name = $value;\n }",
"public function SetName ($name);",
"function setName( &$value )\r\n {\r\n $this->Name = $value;\r\n }",
"function setName( &$value )\r\n {\r\n $this->Name = $value;\r\n }",
"private function setName($name) {\n if (is_string($name)) {\n $this->name = $name;\n }\n }",
"public function setName($name){\n\t\t$this->name = $name;\n\t}",
"public function setName($name){\n\t\t$this->name = $name;\n\t}",
"public function setName($name) {\n\t\t$this->_name = (string)$name;\n\t}",
"public function setName($val) {\n $this->name = $val;\n }",
"function set_name($name) {\n $this->name = $name;\n }",
"public function setName($val)\n {\n $this->name = $val;\n }",
"public function setName ($name){\n\t\tif($name){\n\t\t\t$this->Item['name'] = substr($name, 0,100);\n\t\t}\n\t}",
"function setName( &$value )\n {\n $this->Name = $value;\n }",
"public function setName($name){\n $this->_name = $name;\n }",
"public function setName($_name)\n {\n if (is_string($_name)) {\n \t$this->_name = $_name;\n }\n }",
"public function setName($name) {\n\t\t$this->_name = $name;\n\t}",
"public function setName(string $name)\n\t{\n\t\t$this->name=$name; \n\t\t$this->keyModified['name'] = 1; \n\n\t}",
"public function setName($name) {\r\n\t\t$this->name = $name;\r\n\t}",
"public function setName($name){\n \n $this->name = $name;\n \n }",
"public function setName($name) {\n\t\t$this->name = $name;\n\t}",
"public function setName($name) {\n\t\t$this->name = $name;\n\t}",
"public function setName($name) {\n\t\t$this->name = $name;\n\t}",
"public function setName($name) {\n\t\t$this->name = $name;\n\t}",
"public function setName($name) {\n\t\t$this->name = $name;\n\t}",
"public function setName($name) {\n\t\t$this->name = $name;\n\t}",
"public function setName($name) {\n\t\t$this->name = $name;\n\t}",
"public function setName($name) {\n\t\t$this->name = $name;\n\t}",
"public function setName($name) \n {\n $this->_name = $name; \n }",
"public function setName( $name )\n\t{\n\t\t$this->setAttribute( \"name\", $name );\n\t}",
"public function setName( $name )\n\t{\n\t\t$this->setAttribute( \"name\", $name );\n\t}",
"public function setName($name)\n {\n $this->_name = (string)$name;\n }",
"public function setName($name, $value)\t{\n\n\t\t\t$this->{$name} = $value;\n\t\t\t\t\n\t\t\t//if (ctype_alnum($name) == true)\n\t\t\t\n\t\t\t//(die('The name of the store should only contain letters');\n\t\t\t\n\t\t\t//$this->name = $name;\n\t\t}",
"public function setName($x) { $this->name = $x; }",
"public function setName( string $name ) {\n\t\t$this->name = $name;\n\t}",
"public function setName($name){\n $this->__set('name',$name);\n }",
"function setName($name){\n\t\t$this->name=$name;\n\t}",
"function setName($name) {\n $this->name = $name;\n }",
"public function setName($name)\n {\n $this->_name = $name;\n }",
"public function setName($name) {\n $this->name = $name;\n }",
"protected function _setNameValue($key, $name) {}",
"public function setName($name)\r\n {\r\n $this->name = $name;\r\n }",
"public function setName($name)\n {\n $this->setValue('name', $name);\n }",
"public function setName($name)\n {\n $this->name = $name;\n\n \n }",
"function set_name($name) { \n $this->name = $name;\n }",
"public function setName($name) \n {\n $this->name = $name;\n }",
"public function setName($name)\n {\n $this->_name = $name;\n }",
"public function setName($name)\n {\n $this->_name = $name;\n }",
"public function setName($name)\n {\n $this->_name = $name;\n }",
"public function setName($name)\n {\n $this->_name = $name;\n }",
"public function setName($value)\n {\n $this->setItemValue('name', (string)$value);\n }",
"public function setName($name) {\n $this->name = $name;\n }",
"public function setName($name) {\n $this->name = $name;\n }",
"public function setName($name) {\n $this->name = $name;\n }",
"public function setName($name) {\n $this->name = $name;\n }",
"public function setName($name) {\n $this->name = $name;\n }",
"public function setName($name) {\n $this->name = $name;\n }",
"public function setName($name)\n\t{\n\t\t$this->_name = $name;\n\t}",
"public function setName($name)\n\t{\n\t\t$this->_name = $name;\n\t}",
"public function setName(string $name)\n {\n $this->name = $name;\n }",
"public function setName( $name ) {\n\t\t$this->mName = $name;\n\t}",
"public function setName($value);",
"public function set_name( $name ) {\n\t\t$this->set_prop( 'name', $name );\n\t}",
"public function setName($name)\n\t{\n\t\t$this->name = $name;\n\t}",
"public function setName($name)\n\t{\n\t\t$this->name = $name;\n\t}",
"public function setName($name)\n\t{\n\t\t$this->name = $name;\n\t}",
"public function setName($name)\n\t{\n\t\t$this->name = $name;\n\t}",
"public function setName($name)\n\t{\n\t\t$this->name = $name;\n\t}",
"public function setName($name)\n\t{\n\t\t$this->name = $name;\n\t}",
"public function setName($name)\n\t{\n\t\t$this->name = $name;\n\t}",
"public function setName($x) {\n $this->name = $x;\n }",
"public function setName(string $name);",
"public function setName(string $name);",
"public function setName($name)\n {\n $this->name = $name;\n }",
"public function setName($name)\n {\n $this->name = $name;\n }",
"public function setName($name)\n {\n $this->name = $name;\n }",
"public function setName($name)\n {\n $this->name = $name;\n }",
"public function setName($name)\n {\n $this->name = $name;\n }",
"public function setName($name)\n {\n $this->name = $name;\n }",
"public function setName($name)\n {\n $this->name = $name;\n }",
"public function setName($name)\n {\n $this->name = $name;\n }",
"public function setName($name)\n {\n $this->name = $name;\n }",
"public function setName($name)\n {\n $this->name = $name;\n }",
"public function setName($name)\n {\n $this->name = $name;\n }",
"public function setName($name)\n {\n $this->name = $name;\n }",
"public function setName($name)\n {\n $this->name = $name;\n }"
] | [
"0.8714409",
"0.8658215",
"0.8615634",
"0.8615634",
"0.8615634",
"0.8568124",
"0.8568124",
"0.84620726",
"0.84265536",
"0.84265536",
"0.84265536",
"0.84265536",
"0.84265536",
"0.83739686",
"0.83739686",
"0.8365703",
"0.83588547",
"0.83303815",
"0.8319899",
"0.8319899",
"0.83140916",
"0.8296118",
"0.8296118",
"0.82850987",
"0.82788396",
"0.82766426",
"0.8275331",
"0.82726204",
"0.8271779",
"0.8259305",
"0.82467693",
"0.8201347",
"0.8194887",
"0.8189303",
"0.8188249",
"0.8175531",
"0.8175531",
"0.8175531",
"0.8175531",
"0.8175531",
"0.8175531",
"0.8175531",
"0.8175531",
"0.81512445",
"0.8146928",
"0.8146928",
"0.8143291",
"0.8141915",
"0.81350636",
"0.8128004",
"0.8119105",
"0.81179094",
"0.8102944",
"0.80875254",
"0.8083623",
"0.8082551",
"0.80823565",
"0.8079255",
"0.80714184",
"0.8065674",
"0.80599326",
"0.8050945",
"0.8050945",
"0.8050945",
"0.8050945",
"0.80493146",
"0.80440176",
"0.80440176",
"0.80440176",
"0.80440176",
"0.80440176",
"0.80440176",
"0.8033082",
"0.8033082",
"0.8032926",
"0.8019489",
"0.801627",
"0.8012359",
"0.79953796",
"0.79953796",
"0.79953796",
"0.79953796",
"0.79953796",
"0.79953796",
"0.79953796",
"0.7947029",
"0.794237",
"0.794237",
"0.7921477",
"0.7921477",
"0.7921477",
"0.7921477",
"0.7921477",
"0.7921477",
"0.7921477",
"0.7921477",
"0.7921477",
"0.7921477",
"0.7921477",
"0.7921477",
"0.7921477"
] | 0.0 | -1 |
Get the value of description | public function getDescription()
{
return $this->description;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getDescription() {\n\t\t$field = $this->getDescriptionField();\n\t\treturn $field ? $field->getValue() : '';\n\t}",
"public function getDescription() \n {\n return $this->_fields['Description']['FieldValue'];\n }",
"function getDescription() {\n\t\treturn $this->data_array['description'];\n\t}",
"function getDescription() {\n\t\tif( !($ret = $this->getField( 'summary' )) ) {\n\t\t\t$ret = $this->getField( 'data' );\n\t\t}\n\t\treturn $ret;\n\t}",
"public function getDescription(){\n\t\treturn $this->description;\n\t}",
"protected function getDescription() {\r\n\t\treturn $this->description;\r\n\t}",
"function getDescription() {\n\t\treturn $this->description;\n\t}",
"private function get_description()\n\t{\n\t\treturn $this->m_description;\n\t}",
"private function get_description()\n\t{\n\t\treturn $this->m_description;\n\t}",
"public function getDescription()\n {\n return $this->__get(self::FIELD_DESCRIPTION); \n }",
"public function getDescription()\n {\n return $this['description'];\n }",
"function getDescription()\r\n\t\t{\r\n\t\t\treturn $this->description;\r\n\t\t\t\r\n\t\t}",
"function getDescription() {\n\t\treturn $this->_Description;\n\t}",
"function getDescription() {\n\t\treturn $this->_Description;\n\t}",
"public function getDescription()\r\n {\r\n return $this->m_description;\r\n }",
"public function getDescription()\r\n {\r\n return $this->description;\r\n }",
"public function getDescription() {\r\n\t\treturn $this->description;\r\n\t}",
"public function getDescription() {\r\n\t\treturn $this->description;\r\n\t}",
"public function getDescription() {\r\n\t\treturn $this->description;\r\n\t}",
"public function getDescription() {\n\t\treturn $this->description;\n\t}",
"public function getDescription() {\n\t\treturn $this->description;\n\t}",
"public function getDescription() {\n\t\treturn $this->description;\n\t}",
"public function getDescription() {\n\t\treturn $this->description;\n\t}",
"public function getDescription() {\n\t\treturn $this->description;\n\t}",
"public function getDescription() {\n\t\treturn $this->description;\n\t}",
"public function getDescription()\r\n {\r\n return $this->description;\r\n }",
"public function getDescription()\r\n {\r\n return $this->description;\r\n }",
"public function getDescription()\n\t{\n\t\treturn $this->description;\n\t}",
"public function getDescription()\n\t{\n\t\treturn $this->description;\n\t}",
"public function getDescription()\n\t{\n\t\treturn $this->description;\n\t}",
"public function getDescription()\n\t{\n\t\treturn $this->description;\n\t}",
"public function getDescription()\n\t{\n\t\treturn $this->description;\n\t}",
"public function getDescription()\n\t{\n\t\treturn $this->description;\n\t}",
"public function getDescription()\n\t{\n\t\treturn $this->description;\n\t}",
"public function getDescription()\n\t{\n\t\treturn $this->description;\n\t}",
"public function getDescription()\n\t{\n\t\treturn $this->description;\n\t}",
"public function getDescription()\n\t{\n\t\treturn $this->description;\n\t}",
"public function get_description(){\n\t\treturn $this->description;\n\t}",
"public function getDescription() {\r\n return $this->description;\r\n }",
"public function getDescription() {\n return $this->desc;\n }",
"public function getDescription()\r\n {\r\n return $this->_description;\r\n }",
"public function getDescription()\r\n {\r\n return $this->_description;\r\n }",
"public function getDescription() {\n return $this->attributes['description'];\n }",
"public function getDescription() {\n\t\treturn $this->_description;\n\t}",
"public function getDescription(){\n return $this->description;\n }",
"public function getDescription(){\n return $this->description;\n }",
"function get_description() {\n return $this->get_mapped_property('description');\n }",
"public function getDescription()\r\n {\r\n $fields = $this->def->getFields();\r\n foreach ($fields as $field)\r\n {\r\n if ($field->type == 'text')\r\n {\r\n if ($field->name == \"description\"\r\n || $field->name == \"notes\"\r\n || $field->name == \"details\"\r\n || $field->name == \"comment\")\r\n {\r\n return $this->getValue($field->name);\r\n }\r\n }\r\n\r\n }\r\n\r\n return \"\";\r\n }",
"function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n\t{\n\t\treturn $this->_description;\n\t}",
"public function getDescription()\n {\n return $this->_Description;\n }",
"public function getValueDescription() {\n\t\t\n\t\t$test_service = t3lib_div::makeInstanceService('caretaker_test_service',$this->test_service_type);\n\t\t\n\t\tif ($test_service){\n\t\t\treturn $test_service->getValueDescription();\n\t\t} else {\n\t\t\treturn 'unknown service '.$this->test_service_type;\n\t\t}\n\t}",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription() {\n return $this->_get( 'description' );\n }",
"public function getDescription()\n {\n return self::QUALITY_MAP[$this->qualityID]['description'];\n }",
"public function getDescription()\n {\n return $this->_description;\n }",
"public function getDescription()\n { \n return $this->description;\n }",
"public function getDescription()\r\n {\r\n return $this->description;\r\n }",
"public function getDescription() \n {\n return $this->description;\n }",
"public function getDescription() {\n return $this->description;\n }",
"public function getDesc()\n {\n return $this->desc;\n }",
"public function getDesc()\n {\n return $this->desc;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"function getDescription() {\n return $this->description;\n }",
"public function getDescription() {\n\t\treturn self::$_description;\n\t}",
"public function get_description()\n\t{\n\t\treturn $this->description;\n\t}",
"public function get_description()\n\t{\n\t\treturn $this->description;\n\t}",
"public function get_description(){\n\t\treturn $this->_description;\n\t}",
"function getDescription() \n {\n return $this->_description;\n }",
"public function getDesc()\n {\n return $this->Desc;\n }",
"public function get_description() {\n\t\treturn $this->description;\n\t}",
"public function getDescription(): string\r\n {\r\n return $this->description;\r\n }",
"public function getDesciption();",
"public function getDescription()\n {\n return $this->Description;\n }",
"public function getDescription()\n {\n return $this->Description;\n }",
"public function getDescription()\n {\n return $this->Description;\n }",
"public function get_description() { \n\n\t\treturn $this->description; \n\t\n\t}",
"public function getDescription()\n {\n return $this->_description;\n }",
"public function getDescription()\n {\n return $this->description;\n }"
] | [
"0.8238399",
"0.81778616",
"0.81324804",
"0.77900994",
"0.7778838",
"0.7768252",
"0.7744329",
"0.7730452",
"0.7730452",
"0.7707788",
"0.77073026",
"0.7706035",
"0.7690056",
"0.7690056",
"0.7685078",
"0.7683124",
"0.76829314",
"0.76829314",
"0.76829314",
"0.7665716",
"0.7665716",
"0.7665716",
"0.7665716",
"0.7665716",
"0.7665716",
"0.76602334",
"0.76602334",
"0.76578003",
"0.76578003",
"0.76578003",
"0.76578003",
"0.76578003",
"0.76578003",
"0.76578003",
"0.76578003",
"0.76578003",
"0.76578003",
"0.76569206",
"0.7656268",
"0.7646027",
"0.76452774",
"0.76452774",
"0.7637727",
"0.76239204",
"0.76183987",
"0.76183987",
"0.7614586",
"0.760364",
"0.7602596",
"0.75943303",
"0.7590201",
"0.75898975",
"0.7588764",
"0.7588725",
"0.75882983",
"0.7580771",
"0.75784904",
"0.7577116",
"0.75758225",
"0.7575518",
"0.7572317",
"0.7572317",
"0.75678694",
"0.75669724",
"0.756403",
"0.75611013",
"0.75611013",
"0.75607383",
"0.7558274",
"0.75545543",
"0.7545371",
"0.7542269",
"0.75417024",
"0.75408727",
"0.75408727",
"0.75408727",
"0.7540653",
"0.75364465",
"0.75358224"
] | 0.0 | -1 |
Set the value of description | public function setDescription(string $description)
{
$this->description = $description;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function setDescription( $value )\r\n {\r\n $this->Description = $value;\r\n }",
"function setDescription( $value )\r\n {\r\n $this->Description = $value;\r\n }",
"function setDescription( &$value )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n $this->Description = $value;\n }",
"public function setDescription($value)\n {\n $this->setItemValue('description', (string)$value);\n }",
"public function setDescription($value) {\n\t\tif($value == \"\") { $value = \"None\"; }\n\t\tself::$_description = $value;\n\t}",
"function setDescription($description) {\n\t\t$this->description = $description;\n\t}",
"protected function setDescription($description) {\r\n $this->description = $description;\r\n }",
"public function setDescription($description){\n\t\t$this->description = $description;\n\t}",
"public function setDescription(?string $value): void {\n $this->getBackingStore()->set('description', $value);\n }",
"public function setDescription(?string $value): void {\n $this->getBackingStore()->set('description', $value);\n }",
"public function setDescription(?string $value): void {\n $this->getBackingStore()->set('description', $value);\n }",
"public function setDescription(?string $value): void {\n $this->getBackingStore()->set('description', $value);\n }",
"public function setDescription(?string $value): void {\n $this->getBackingStore()->set('description', $value);\n }",
"public function setDescription(?string $value): void {\n $this->getBackingStore()->set('description', $value);\n }",
"public function setDescription(?string $value): void {\n $this->getBackingStore()->set('description', $value);\n }",
"public function setDescription(?string $value): void {\n $this->getBackingStore()->set('description', $value);\n }",
"public function setDescription($value);",
"public function setDescription(?string $description): void\n {\n $this->description['value'] = $description;\n }",
"public function setDescription($desc) {\n\t\t$this->description = $desc;\n\t}",
"public function setDescription($description)\n {\n $this->_description = $description;\n }",
"public function setSetDescription($description) {\r\n\t\t$this -> setdescription = $description;\r\n\t}",
"public function setDescription($description)\r\n {\r\n $this->description = $description;\r\n }",
"public function setDescription($description) {\n\t\t$this->description = $description;\n\t}",
"public function setDescription( $description )\r\n\t{\r\n\t\t$this->description = $description;\r\n\t}",
"public function setDescription($description) {\n $this->_description = $description;\n }",
"public function setDescription($description)\n\t{\n\t\t$this->_description = $description;\n\t}",
"function set_description($description)\r\n {\r\n $this->set_default_property(self :: PROPERTY_DESCRIPTION, $description);\r\n }",
"public function setDescription($value)\n {\n return $this->set('Description', $value);\n }",
"public function setDescription($value)\n {\n return $this->set('Description', $value);\n }",
"public function setDescription($value)\n {\n return $this->set('Description', $value);\n }",
"public function setDescription($value)\n {\n return $this->set('Description', $value);\n }",
"public function setDescription($value)\n {\n return $this->set('Description', $value);\n }",
"public function setDescription($value)\n {\n return $this->set('Description', $value);\n }",
"public function setDescription($value)\n {\n return $this->set('Description', $value);\n }",
"public function setDescription($value)\n {\n return $this->set('Description', $value);\n }",
"public function setDescription($value)\n {\n return $this->set('Description', $value);\n }",
"public function setDescription($value)\n {\n return $this->set('Description', $value);\n }",
"public function setDescription($value)\n {\n return $this->set('Description', $value);\n }",
"public function setDescriptionAttribute($value)\n {\n $this->attributes['description'] = htmlentities($value, ENT_COMPAT, 'UTF-8');\n }",
"public function setDescription($description)\n {\n $this->_description = $description;\n }",
"public function setDescription($description) {\n $this->description = $description;\n }",
"public function setDesciption($description);",
"public function setDescription(string $description)\n {\n $this->description = $description;\n }",
"public function setDescription($description) \n\t{\n \n $this->description = empty($description) ? \"\" : $description;\t\n\t}",
"function set_description($description)\n {\n $this->set_default_property(self :: PROPERTY_DESCRIPTION, $description);\n }",
"public function setDescription($description)\n {\n $this->description = $description;\n }",
"public function setDescription($description)\n {\n $this->description = $description;\n }",
"public function setDescription($description)\n {\n $this->description = $description;\n }",
"public function setDescription($description)\n {\n $this->description = $description;\n }",
"public function setDescription($description)\n {\n $this->description = $description;\n }",
"public function setDescription($description)\n {\n $this->description = $description;\n }",
"public function setDescription($description)\n {\n $this->description = $description;\n }",
"public function setDescription($description)\n {\n $this->description = $description;\n }",
"public function setDescription($description)\n {\n $this->description = $description;\n }",
"public function setDescription($description)\n {\n $this->description = $description;\n }",
"public function setDescription($description)\n {\n $this->description = $description;\n }",
"public function setDescription($description)\n {\n $this->description = $description;\n }",
"public function setDescription($description)\n {\n $this->description = $description;\n }",
"public function setDescription($desc)\n {\n $this->description = $desc;\n }",
"public function set_description ($description) {\n $this->description = $description;\n }",
"public function set_description($desciption){\n\t\t$this->set_channel_element('description', $desciption);\n\t}",
"public function setDescription($val)\n {\n $this->_propDict[\"description\"] = $val;\n return $this;\n }",
"public function setDescription($val)\n {\n $this->_propDict[\"description\"] = $val;\n return $this;\n }",
"public function setDescription($val)\n {\n $this->_propDict[\"description\"] = $val;\n return $this;\n }",
"public function setDescription($val)\n {\n $this->_propDict[\"description\"] = $val;\n return $this;\n }",
"public function setDescription($val)\n {\n $this->_propDict[\"description\"] = $val;\n return $this;\n }",
"public function setDescription($val)\n {\n $this->_propDict[\"description\"] = $val;\n return $this;\n }",
"public function setDescription($val)\n {\n $this->_propDict[\"description\"] = $val;\n return $this;\n }",
"public function setDescription($val)\n {\n $this->_propDict[\"description\"] = $val;\n return $this;\n }",
"public function setDescription($val)\n {\n $this->_propDict[\"description\"] = $val;\n return $this;\n }",
"public function setDescription($val)\n {\n $this->_propDict[\"description\"] = $val;\n return $this;\n }",
"public function setDescription($val)\n {\n $this->_propDict[\"description\"] = $val;\n return $this;\n }",
"public function setDescription($val)\n {\n $this->_propDict[\"description\"] = $val;\n return $this;\n }",
"public function setDescription($val)\n {\n $this->_propDict[\"description\"] = $val;\n return $this;\n }",
"public function setDescription($description);",
"public function setDescription($description);",
"public function setDescription($description);",
"public function setDescription($description);",
"public function setDescription($description);",
"public function setDescription($description);",
"public function setDesc($val){ return $this->setField('desc',$val); }",
"public function setDescription($value) \n {\n $this->_fields['Description']['FieldValue'] = $value;\n return $this;\n }",
"protected function assignDescription()\n {\n $this->description = '';\n }",
"public function setDescriptionAttribute($value)\n {\n $this->attributes['description'] = is_null($value) ? 'role of ' . $this->attributes['name'] : $value;\n }",
"public function setDescriptionAttribute($value)\n {\n $this->attributes['description'] = strtolower($value);\n }",
"function setItem_description($description){\n $this->item_description = $description;\n }",
"function setDescription($description) {\n $this->checkChange();\n\n $this->description = $description;\n return $this;\n }",
"public function setDescription(string $description)\n {\n $this->description = $description;\n }",
"public function set_description($description)\n {\n $this->set_default_property(self::PROPERTY_DESCRIPTION, $description);\n }",
"public function setDescription(DescriptionDescriptor $description): void;",
"public function setDescription($value)\n {\n return $this->setParameter('description', $value);\n }",
"public function setDescription(?string $description): void\n {\n $this->description = $description;\n }",
"public function setOsDescription(?string $value): void {\n $this->getBackingStore()->set('osDescription', $value);\n }",
"protected function setDescription() {\r\n\t\t$descriptionCrop = intval($this->settings['news']['semantic']['general']['description']['crop']);\r\n\t\t$descriptionAction = $this->settings['news']['semantic']['general']['description']['action'];\r\n\t\t$descriptionText = $this->newsItem->getTeaser();\r\n\t\tif (empty($descriptionText)) {\r\n\t\t\t$descriptionText = $this->newsItem->getBodytext();\r\n\t\t}\r\n\t\tif (!empty($descriptionText) && !empty($descriptionAction)) {\r\n\t\t\tif (!empty($GLOBALS['TSFE']->page['description'])) {\r\n\t\t\t\tswitch ($descriptionAction) {\r\n\t\t\t\t\tcase 'prepend':\r\n\t\t\t\t\t\t$descriptionText .= ': ' . $GLOBALS['TSFE']->page['description'];\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'append':\r\n\t\t\t\t\t\t$descriptionText = $GLOBALS['TSFE']->page['description'] . ': ' . $descriptionText;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$this->description = $this->contentObject->crop($descriptionText, $descriptionCrop . '|...|' . TRUE);\r\n\t\t}\r\n\t}",
"public function setDescription($description)\n\t{\n\t\t$this->description = $description;\n\n\t\tif($this->pageInitialized)\n\t\t\t$this->setMetaTag('description', $this->description);\n\t}",
"public function setDescription($newDescription)\n {\n $this->description = $newDescription;\n }",
"public function setDescription($description)\n {\n $this->feedbackFields['description'] = $description;\n }",
"public function setDescription($description)\n {\n parent::setDescription($this->replaceType($description));\n }",
"public function testAssignDescription()\n {\n $this->markTestIncomplete(\n 'This test has not been implemented yet.'\n );\n }",
"protected function assignDescription()\n {\n $this->description = 'This is a test for a Template Variable migration class';\n }",
"public function setDescription ($value) {\n\t\t$this->setData(\"pageDescription\", $value);\n\t\treturn true;\n\t}"
] | [
"0.86425704",
"0.86425704",
"0.82745475",
"0.81090033",
"0.80988365",
"0.80748636",
"0.8016796",
"0.79984534",
"0.7984175",
"0.7984175",
"0.7984175",
"0.7984175",
"0.7984175",
"0.7984175",
"0.7984175",
"0.7984175",
"0.79083985",
"0.7892785",
"0.7881428",
"0.78714323",
"0.78697056",
"0.7867616",
"0.7866452",
"0.78651255",
"0.7827375",
"0.7813449",
"0.778474",
"0.7773091",
"0.7773091",
"0.7773091",
"0.7773091",
"0.7773091",
"0.77717113",
"0.77717113",
"0.77717113",
"0.77717113",
"0.77717113",
"0.77717113",
"0.7771545",
"0.7765696",
"0.7763167",
"0.77572495",
"0.7757182",
"0.77349937",
"0.7704168",
"0.7702347",
"0.7702347",
"0.7702347",
"0.7702347",
"0.7702347",
"0.7702347",
"0.7702347",
"0.7702347",
"0.7702347",
"0.7702347",
"0.7702347",
"0.7702347",
"0.7702347",
"0.76878715",
"0.76485896",
"0.7646071",
"0.7642073",
"0.7642073",
"0.7642073",
"0.7642073",
"0.7642073",
"0.7642073",
"0.7642073",
"0.7642073",
"0.7642073",
"0.7642073",
"0.7642073",
"0.7642073",
"0.7642073",
"0.7638226",
"0.7638226",
"0.7638226",
"0.7638226",
"0.7638226",
"0.7638226",
"0.7599723",
"0.7570517",
"0.7557869",
"0.7554532",
"0.75264597",
"0.75222003",
"0.7476307",
"0.7467153",
"0.7423506",
"0.74064636",
"0.7402099",
"0.7358587",
"0.734415",
"0.7333742",
"0.733318",
"0.73131895",
"0.73027384",
"0.73007774",
"0.72978574",
"0.72898096",
"0.72805226"
] | 0.0 | -1 |
Get the value of is_prepaid_blocked | public function getIsPrepaidBlocked()
{
return $this->is_prepaid_blocked;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getIsBlocked();",
"public function getIsBlocked()\n {\n return $this->isBlocked;\n }",
"public function setIsPrepaidBlocked(bool $is_prepaid_blocked)\n {\n $this->is_prepaid_blocked = $is_prepaid_blocked;\n\n return $this;\n }",
"public function isPaid(){\n return $this->status == \"SUCCESS\";\n }",
"public function unpaid(): bool\n {\n return in_array($this->status, [self::PENDING]);\n }",
"public function getBlocked()\n {\n return $this->Blocked;\n }",
"public function isPaid() {\n return $this->isPaid;\n }",
"function get_payment_status()\n {\n return $this->platnosci_post_vars['payment_status'];\n }",
"function get_payment_status()\n {\n return $this->paypal_post_vars['payment_status'];\n }",
"public function payment_status_pending()\n {\n return $this->payment_status_completed();\n }",
"function isPending() {\n return $this->getStatus() == UserpointsTransaction::STATUS_PENDING;\n }",
"public function getPaymentHoldStatus()\n {\n return $this->payment_hold_status;\n }",
"public function isUnpaid()\n {\n return $this->getStatus() === OpenNode_Bitcoin_Model_Bitcoin::OPENNODE_STATUS_UNPAID;\n }",
"function is_paying__premium_only() {\n\t\t\treturn ( $this->is__premium_only() && $this->is_paying() );\n\t\t}",
"public function getPaidValue()\n {\n return defined('static::PAID_VALUE') ? static::PAID_VALUE : 'paid';\n }",
"public function payment_status_voided()\n {\n return $this->payment_status_failed();\n }",
"public function isReadyForIssuing()\n {\n return $this->isFeePaid();\n }",
"public function getPaymentAccepted()\n {\n return $this->paymentAccepted;\n }",
"private function isPaymentLocked()\n {\n return $this -> lock_payments;\n }",
"public function isPaid()\n {\n return $this->markedAs($this->getPaidValue());\n }",
"public function isUnderpaid()\n {\n return $this->getStatus() === OpenNode_Bitcoin_Model_Bitcoin::OPENNODE_STATUS_UNDERPAID;\n }",
"public function isPaid()\n {\n return $this->getStatus() === OpenNode_Bitcoin_Model_Bitcoin::OPENNODE_STATUS_PAID;\n }",
"public function getStatusPayment()\r\n {\r\n return $this->statusPayment;\r\n }",
"function is_prepaid_franchise($fid=0)\r\n\t{\r\n\t\t$franchise_menu_det=$this->db->query(\"select a.menuid from pnh_franchise_menu_link a where fid=? and status=1\",$fid)->result_array();\r\n\t\tif($franchise_menu_det)\r\n\t\t{\r\n\t\t\t$prepaid=$this->db->query(\"select is_prepaid from pnh_m_franchise_info where franchise_id=? and is_suspended=0\",$fid)->row()->is_prepaid;\r\n\t\t\t\r\n\t\t\tif($prepaid)\r\n\t\t\t\treturn true;\r\n\t\t\telse\r\n\t\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public function getIsPending() {\n if ($parent = $this->getParentBlock()) {\n return!!$parent->getPending();\n }\n return false;\n }",
"abstract function has_paid_plan();",
"public function hasBlocked()\n {\n return $this->blocked !== null;\n }",
"public function isBanned()\n {\n return $this->is_banned;\n }",
"public function getIsApproved()\n {\n return $this->is_approved;\n }",
"public function isBlocked() : bool {\n return $this->delivery_status === WebhookEvent::EVENT_BLOCKED;\n }",
"public function isBlocked()\n {\n if ($this->status == 2) {\n return true;\n } else {\n return false;\n }\n }",
"public function getMicroPaymentPayabale()\r\n {\r\n /**\r\n * if\r\n */\r\n }",
"public function canBeDeclined()\n {\n return $this->isAwaitingFee();\n }",
"function isApproved() {\n return $this->getStatus() == UserpointsTransaction::STATUS_APPROVED;\n }",
"public function isPaid()\n {\n return $this->status === self::STATUS_APPROVED;\n }",
"public function getHasSellerSuspendedListings()\n {\n return $this->_fields['HasSellerSuspendedListings']['FieldValue'];\n }",
"public function getApproved() {\n\t\treturn $this->approved == 1;\n\t}",
"public function isPaid() {\n return $this->state === self::STATUS_PAID;\n }",
"public function isApproved(): bool;",
"function getIsDisapproved() {\n return (integer) $this->isDisapproved;\n }",
"public function isBlocked()\n {\n return $this->getStatus() == self::STATUS_BLOCKED;\n }",
"public function isBlocked() {\n return $this->user !== null && $this->user->blocked;\n }",
"public function isBanned() {\n return $this->vacBanned;\n }",
"public function isApproved()\n {\n\n return false;\n }",
"public function getIsNotApproved()\n {\n return $this->state !== self::STATE_APPROVED;\n }",
"public function iN_CurrentDayTotalPremiumEarning() {\n\t\t$query = mysqli_query($this->db, \"SELECT SUM(admin_earning) AS DayTotalEarnPremium FROM i_user_payments WHERE payment_type = 'post' AND payment_status = 'ok' AND DAY(FROM_UNIXTIME(payment_time)) = DAY(CURDATE()) \") or die(mysqli_error($this->db));\n\t\t$row = mysqli_fetch_array($query, MYSQLI_ASSOC);\n\t\treturn isset($row['DayTotalEarnPremium']) ? $row['DayTotalEarnPremium'] : '0.00';\n\t}",
"public function getBrandedDetailsAvailable()\n\t{\n\t\treturn $this->brandedDetailsAvailable;\n\t}",
"private function isPaidInFlow($status){\r\n return $status == 2;\r\n }",
"public function isApproved()\n {\n return $this->approved;\n }",
"public function getSuspended()\n {\n return $this->suspended;\n }",
"public function getSuspended()\n {\n return $this->suspended;\n }",
"public function getStealthModeBlocked()\n {\n if (array_key_exists(\"stealthModeBlocked\", $this->_propDict)) {\n return $this->_propDict[\"stealthModeBlocked\"];\n } else {\n return null;\n }\n }",
"public function isStatusNotPaid()\n {\n return $this->status == self::_ORDER_STATUS_NEW || $this->status == self::_ORDER_STATUS_REJECTED;\n }",
"public function hasPrecost(){\n return $this->_has(25);\n }",
"public function isPaid()\n {\n return Invoice\\InvoiceStatus::PAID == $this->status;\n }",
"public function getIsBilledAttribute()\n {\n return $this->billed;\n }",
"public function iN_CurrentMonthTotalPremiumEarning() {\n\t\t$query = mysqli_query($this->db, \"SELECT SUM(admin_earning) AS MonthTotalEarnPremium FROM i_user_payments WHERE payment_type = 'post' AND payment_status = 'ok' AND MONTH(FROM_UNIXTIME(payment_time)) = MONTH(CURDATE()) \") or die(mysqli_error($this->db));\n\t\t$row = mysqli_fetch_array($query, MYSQLI_ASSOC);\n\t\treturn isset($row['MonthTotalEarnPremium']) ? $row['MonthTotalEarnPremium'] : '0.00';\n\t}",
"final public static function waitingForPaymentDetails()\n {\n return self::get(821);\n }",
"function can_use_premium_code__premium_only() {\n\t\t\treturn $this->is_premium() && $this->can_use_premium_code();\n\t\t}",
"public function isRentPaidInAdvance()\n {\n return $this->isRentPaidInAdvance;\n }",
"public function isPaid() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn InputValidator::isEmpty($this->payDate) ? false: true;\r\n\t}",
"public function getPending()\n\t{\n\t\treturn $this->pending;\n\t}",
"public function getInboundNotificationsBlocked()\n {\n if (array_key_exists(\"inboundNotificationsBlocked\", $this->_propDict)) {\n return $this->_propDict[\"inboundNotificationsBlocked\"];\n } else {\n return null;\n }\n }",
"public function allowAccountSettlement() \n {\n $blReturn = (\n $this->oxorder__oxpaymenttype->value == 'fcpopayadvance' ||\n fcPayOnePayment::fcIsPayOneOnlinePaymentType($this->oxorder__oxpaymenttype->value)\n );\n\n return $blReturn;\n }",
"public function isPaid()\n\t{\n\t\t$externalDump = ExternalDump::where('lab_no', '=', $this->external_id)->get()->first();\n\n\t\t//Not from the external system\n\t\tif(is_null($externalDump)) {\n\t\t\treturn true;\n\t\t}\n\t\telseif( $this->visit->patient->getAge('Y') >= 6\n\t\t\t&& $externalDump->order_stage == \"op\" \n\t\t\t&& $externalDump->receipt_number == \"\" \n\t\t\t&& $externalDump->receipt_type == \"\" )\n\t\t\treturn false;\n\t\telse \n\t\t\treturn true;\n\t}",
"public function getPendingPay()\n {\n $value = $this->get(self::pending_pay);\n return $value === null ? (integer)$value : $value;\n }",
"public function isPending()\n\t{\n\t\treturn ($this->get('state') == self::STATE_PENDING);\n\t}",
"public function iN_WeeklyTotalPremiumEarning() {\n\t\t$query = mysqli_query($this->db, \"SELECT SUM(admin_earning) AS WeekTotalEarnPremium FROM i_user_payments WHERE payment_type = 'post' AND payment_status = 'ok' AND WEEK(FROM_UNIXTIME(payment_time)) = WEEK(NOW())\") or die(mysqli_error($this->db));\n\t\t$row = mysqli_fetch_array($query, MYSQLI_ASSOC);\n\t\treturn isset($row['WeekTotalEarnPremium']) ? $row['WeekTotalEarnPremium'] : '0.00';\n\t}",
"public function isPending()\r\n {\r\n return $this->status >= 0 && $this->status < 100;\r\n }",
"function getStatus() {\n return $this->getAdditionalProperty('payment_status_selected');\n }",
"public function getFreeBaggageAllowance()\n {\n return isset($this->FreeBaggageAllowance) ? $this->FreeBaggageAllowance : null;\n }",
"public function getTransactionStatus()\n {\n return $this->data['payment_status'];\n }",
"public function punyaBimbingan()\n {\n return ($this->bimbingan(RequestStatus::APPROVED)\n ->count() > 0);\n }",
"public function payment_status_denied()\n {\n return $this->payment_status_failed();\n }",
"public function isPending()\n {\n return static::STATUS_PENDING == $this->getStatus();\n }",
"abstract function is_only_premium();",
"public function getPendingOpenBalance()\n {\n return $this->pending_open_balance;\n }",
"public function isSuspended()\n {\n return $this->suspended;\n }",
"public function isPending(): bool;",
"public function enteredPenaltyReliefMode()\n {\n $enteredPenaltyReliefModeTimestamp = Timestamp :: build( $this ) -> getStopChargingTimestamp();\n return !! $enteredPenaltyReliefModeTimestamp; \n }",
"function status(){\n return ($this -> is_approved())?\"Approved\":\"Unapproved\";\n }",
"public function isBanned(){\n return $this->banned;\n }",
"protected function getSingleFutureUse()\n {\n // We prefer to do future payments, so anything else is future\n if (Mage::getSingleton('gene_braintree/paymentmethod_paypal')->getPaymentType() == Gene_Braintree_Model_Source_Paypal_Paymenttype::GENE_BRAINTREE_PAYPAL_FUTURE_PAYMENTS\n && !Mage::getModel('gene_braintree/paymentmethod_paypal')->isVaultEnabled()\n ) {\n return 'true';\n }\n\n return 'false';\n }",
"public function isPending(): bool\n {\n return $this->status == 'pending';\n }",
"public function isPending()\n {\n return $this->status === self::STATUS_PENDING;\n }",
"public function isBizProcEnabled(): bool\n\t{\n\t\treturn $this->isBizProcEnabled;\n\t}",
"function check_franchise_have_prepaid_menu($fid=0,$type=0)\r\n\t{\r\n\t\t$franchise_menu_det=$this->db->query(\"select a.menuid from pnh_franchise_menu_link a where fid=? and status=1\",$fid)->result_array();\r\n\t\t$have_prepaid_menu=0;\r\n\t\t$type_of_prepaid=0;\r\n\t\t\r\n\t\tif($franchise_menu_det)\r\n\t\t{\r\n\t\t\t$menu_ids=array();\r\n\t\t\tforeach($franchise_menu_det as $menu)\r\n\t\t\t{\r\n\t\t\t\t$menu_ids[]=$menu['menuid'];\r\n\t\t\t\t\r\n\t\t\t\t$prepaid_menu_res=$this->db->query(\"select * from pnh_prepaid_menu_config where menu_id =? and is_active=1\",$menu['menuid']);\r\n\t\t\t\t\r\n\t\t\t\tif($prepaid_menu_res->num_rows())\r\n\t\t\t\t\t$have_prepaid_menu=1;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//check what type of prepaid franchise 1:fully prepaid 2:post & prepaid\r\n\t\t\tif($type)\r\n\t\t\t{\r\n\t\t\t\t$prepaid_menus=$this->db->query(\"select * from pnh_prepaid_menu_config where menu_id in (\".implode(',',$menu_ids).\") and is_active=1\")->result_array();\r\n\t\t\t\t\r\n\t\t\t\tif(count($menu_ids)==count($prepaid_menus))\r\n\t\t\t\t{\r\n\t\t\t\t\t$type_of_prepaid=1;\r\n\t\t\t\t\treturn $type_of_prepaid;\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$type_of_prepaid=2;\r\n\t\t\t\t\treturn $type_of_prepaid;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn $have_prepaid_menu;\r\n\t\t}\r\n\t}",
"public function isPending()\n {\n if (!isset($this->data['error']) && $this->data['transactionResponse']['state'] === 'PENDING') {\n return true;\n }\n return false;\n }",
"abstract function is_paying();",
"public function getApproved()\n {\n return $this->approved;\n }",
"abstract function is_premium();",
"function is_paying_or_trial__premium_only() {\n\t\t\treturn $this->is_premium() && $this->is_paying_or_trial();\n\t\t}",
"public function getGasPrePay()\n {\n return $this->gasPrePay;\n }",
"public function getGasPrePay()\n {\n return $this->gasPrePay;\n }",
"public function getHoldBeforeStatus();",
"public function getPremiumType(): int\n {\n return $this->premium_type;\n }",
"function is_paying__fs__() {\n\t\t\treturn $this->is_paying__premium_only();\n\t\t}",
"public function isPending(): bool\n {\n return $this->pending;\n }",
"final public static function transactionWasRejectedByTheFraudGateway()\n {\n return self::get(2055);\n }",
"public function getHasParkBrake()\n {\n return $this->hasParkBrake;\n }"
] | [
"0.67508316",
"0.6637024",
"0.64902437",
"0.644289",
"0.6418084",
"0.63644296",
"0.6297203",
"0.6227804",
"0.6204604",
"0.613352",
"0.6111656",
"0.6111517",
"0.6068546",
"0.60638833",
"0.6048685",
"0.5962005",
"0.5961285",
"0.59565264",
"0.59541005",
"0.5941489",
"0.5934664",
"0.59312314",
"0.59296644",
"0.59169567",
"0.5891143",
"0.5882992",
"0.58825916",
"0.5863119",
"0.58545524",
"0.58514994",
"0.5850831",
"0.5845801",
"0.5845687",
"0.58420306",
"0.58369327",
"0.58085454",
"0.57961833",
"0.57891095",
"0.5786814",
"0.57693213",
"0.57446396",
"0.574239",
"0.5731903",
"0.5721355",
"0.57170993",
"0.56880796",
"0.568756",
"0.568722",
"0.5683467",
"0.56831574",
"0.56831574",
"0.5679333",
"0.5674777",
"0.5668495",
"0.5664093",
"0.5659986",
"0.56575847",
"0.5652938",
"0.5647675",
"0.56453854",
"0.5641426",
"0.563344",
"0.5630008",
"0.5622293",
"0.561047",
"0.5591871",
"0.5580177",
"0.5577102",
"0.55752194",
"0.556045",
"0.5546677",
"0.5544776",
"0.5544678",
"0.5543782",
"0.5542355",
"0.5532917",
"0.5523375",
"0.5523242",
"0.55205464",
"0.5518652",
"0.5513353",
"0.55130094",
"0.5512211",
"0.55027026",
"0.55005884",
"0.54937243",
"0.54870564",
"0.5475373",
"0.5474841",
"0.5473722",
"0.54725707",
"0.54536813",
"0.5451617",
"0.5451617",
"0.5430255",
"0.54166555",
"0.541152",
"0.5410063",
"0.5401406",
"0.5401349"
] | 0.8310946 | 0 |
Set the value of is_prepaid_blocked | public function setIsPrepaidBlocked(bool $is_prepaid_blocked)
{
$this->is_prepaid_blocked = $is_prepaid_blocked;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getIsPrepaidBlocked()\n {\n return $this->is_prepaid_blocked;\n }",
"public function markAsUnpaid() {\n $this->status = parent::STATUS_APPROVED_BY_USER;\n\n //no reason to keep this (cause we will save to history)\n $this->decline_reason = null;\n $this->comment = null;\n\n return $this->save(false);\n }",
"public function markAsPaid() {\n $this->status = parent::STATUS_PAID;\n $this->admin_id = Yii::app()->user->getId();\n\n //no reason to keep this (cause we will save to history)\n $this->decline_reason = null;\n $this->comment = null;\n\n return $this->save(false);\n }",
"public function setIsBlocked($bool);",
"public function setPaid()\n {\n $this->update([\n 'status' => self::STATUS_PAID,\n 'paid_date' => Carbon::now(),\n ]);\n }",
"public function unpaid(): bool\n {\n return in_array($this->status, [self::PENDING]);\n }",
"public function testSetNotForPaymentDisabledFields()\n {\n $this->slipData->setWithReferenceNumber(false);\n $this->slipData->setWithBankingCustomerId(false);\n\n $this->slipData->setNotForPayment(true);\n }",
"function mark_as_paid() {\n if (!$this->active_invoice->isLoaded()) {\n $this->response->notFound();\n } // if\n\n if($this->active_invoice->isNew()) {\n $this->response->notFound();\n } // if\n\n if(!$this->active_invoice->canEdit($this->logged_user)) {\n $this->response->forbidden();\n } // if\n\n try{\n if($this->request->isAsyncCall()) {\n $this->active_invoice->setStatus(INVOICE_STATUS_PAID);\n $this->active_invoice->save();\n $this->response->respondWithData($this->active_invoice, array(\n 'as' => 'invoice',\n 'detailed' => true,\n ));\n } else {\n $this->response->badRequest();\n } //if\n } catch (Exception $e) {\n $this->response->exception($e);\n } //try\n }",
"private function userUnblock()\n\t{\n\t\t// Make sure the payment is complete\n\t\tif($this->state != 'C') return;\n\t\t\n\t\t// Make sure the subscription is enabled\n\t\tif(!$this->enabled) return;\n\t\t\n\t\t// Paid and enabled subscription; enable the user if he's not already enabled\n\t\t$user = JFactory::getUser($this->user_id);\n\t\tif($user->block) {\n\t\t\t// Check the confirmfree component parameter and subscription level's price\n\t\t\t// If it's a free subscription do not activate the user.\n\t\t\tif(!class_exists('AkeebasubsHelperCparams')) {\n\t\t\t\trequire_once JPATH_ADMINISTRATOR.'/components/com_akeebasubs/helpers/cparams.php';\n\t\t\t}\n\t\t\t$confirmfree = AkeebasubsHelperCparams::getParam('confirmfree', 0);\n\t\t\tif($confirmfree) {\n\t\t\t\t$level = FOFModel::getTmpInstance('Levels', 'AkeebasubsModel')\n\t\t\t\t\t->getItem($this->akeebasubs_level_id);\n\t\t\t\tif($level->price < 0.01) {\n\t\t\t\t\t// Do not activate free subscription\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$updates = array(\n\t\t\t\t'block'\t\t\t=> 0,\n\t\t\t\t'activation'\t=> ''\n\t\t\t);\n\t\t\t$user->bind($updates);\n\t\t\t$user->save($updates);\n\t\t}\n\t}",
"public function setPaid()\n {\n return $this->setMarkedAs($this->getPaidValue());\n }",
"public function markPaid()\n {\n $this->order->update(['status' => OrderStatus::PAID]);\n\n $this->notify([\n 'title' => __('Update Status'),\n 'message' => __('This order is marked as paid.'),\n ]);\n }",
"protected function _setApprovedFlag()\n {\n $user = $this->getUser();\n\n if (!empty($user['id'])) {\n $settings = $this->getSettings();\n if ($settings['enable_listings_approval']) {\n return 0;\n }\n else if ($user['listing_approval']) {\n return 0;\n }\n }\n\n return 1;\n }",
"public function setPending()\n {\n $this->attributes['status'] = 'pending';\n self::save();\n }",
"public function markAsActivate() : bool\n {\n $this->is_active = 1;\n $this->paid = 1;\n //$this->grace_period_ends = new RawValue('NULL');\n $this->ends_at = null; //new rawValue('NULL');\n $this->next_due_payment = $this->ends_at;\n $this->is_cancelled = 0;\n return $this->update();\n }",
"function setPreceptor($bpreceptor = 'f')\n {\n $this->bpreceptor = $bpreceptor;\n }",
"function setPreceptor($bpreceptor = 'f')\n {\n $this->bpreceptor = $bpreceptor;\n }",
"public function setApproved($bool)\r\n {\r\n $this->isApproved = $bool;\r\n }",
"public function setPaymentAccepted($value)\n {\n $this->paymentAccepted = $value;\n }",
"public function setMiracastBlocked(?bool $value): void {\n $this->getBackingStore()->set('miracastBlocked', $value);\n }",
"public function isUnpaid()\n {\n return $this->getStatus() === OpenNode_Bitcoin_Model_Bitcoin::OPENNODE_STATUS_UNPAID;\n }",
"public static function block_optin() {\n\t\tupdate_option( 'xlp_is_opted', 'no', false );\n\t}",
"public function setSuspended($var)\n {\n GPBUtil::checkBool($var);\n $this->suspended = $var;\n }",
"public function setPendingPay($value)\n {\n return $this->set(self::pending_pay, $value);\n }",
"public function markAsPending() {\n $this->status = parent::STATUS_PENDING;\n\n //no reason to keep this (cause we will save to history)\n $this->decline_reason = null;\n $this->comment = null;\n\n return $this->save(false);\n }",
"public function testSetPreavisNonEffectuePaye() {\n\n $obj = new AttestationCacm();\n\n $obj->setPreavisNonEffectuePaye(true);\n $this->assertEquals(true, $obj->getPreavisNonEffectuePaye());\n }",
"public function setBluetoothBlocked(?bool $value): void {\n $this->getBackingStore()->set('bluetoothBlocked', $value);\n }",
"public function setVerified(bool $verified) {\n $this->verified = (int) $verified;\n\n }",
"function setIsMandatory($bNewValue) {\n\t\t$this->bIsMandatory = $bNewValue;\n\t}",
"function pending() {\n $this->setStatus(UserpointsTransaction::STATUS_PENDING);\n return $this;\n }",
"public function setPinRequired(?bool $pinRequired): void\n {\n $this->pinRequired = $pinRequired;\n }",
"public function setFactoryResetBlocked(?bool $value): void {\n $this->getBackingStore()->set('factoryResetBlocked', $value);\n }",
"public function setIsSyncedFromOnPremises(?bool $value): void {\n $this->getBackingStore()->set('isSyncedFromOnPremises', $value);\n }",
"function is_prepaid_franchise($fid=0)\r\n\t{\r\n\t\t$franchise_menu_det=$this->db->query(\"select a.menuid from pnh_franchise_menu_link a where fid=? and status=1\",$fid)->result_array();\r\n\t\tif($franchise_menu_det)\r\n\t\t{\r\n\t\t\t$prepaid=$this->db->query(\"select is_prepaid from pnh_m_franchise_info where franchise_id=? and is_suspended=0\",$fid)->row()->is_prepaid;\r\n\t\t\t\r\n\t\t\tif($prepaid)\r\n\t\t\t\treturn true;\r\n\t\t\telse\r\n\t\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public function SetRequestStatus($premium, $status)\n {\n try {\n $premium->update([\n 'approval' => $status\n ]);\n\n return $premium;\n\n } catch (\\Exception $e) {\n self::logErr($e->getMessage());\n return false;\n }\n }",
"function is_paying__premium_only() {\n\t\t\treturn ( $this->is__premium_only() && $this->is_paying() );\n\t\t}",
"private function setPremiumCode(){\n for($i = 0; $i < 7; $i++) {\n $this->premiumCode .= rand(1,9);\n };\n $this->discount = 10;\n }",
"function setSyncWarranty()\n {\n }",
"public function setMiracastRequirePin(?bool $value): void {\n $this->getBackingStore()->set('miracastRequirePin', $value);\n }",
"function setNewPaymentStatus($payment_status){\n\t\t$order = $this->getOrder();\n\t\t$payment_method = $order->getPaymentMethod();\n\t\t$current_order_status = $order->getOrderStatus();\n\t\t$current_status = $this->getPaymentStatus();\n\n\t\tmyAssert(is_null($current_status) || $current_status->getId()!=$payment_status->getId());\n\n\t\t$code = $payment_status->getCode(); // \"pending\", \"paid\"...\n\t\t\n\t\t$tr = [\n\t\t\t\"pending\" => \"waiting_for_online_payment\",\n\t\t\t\"paid\" => \"payment_accepted\",\n\t\t\t\"cancelled\" => \"payment_failed\",\n\t\t];\n\n\t\tif(isset($tr[$code]) && $payment_method->isOnlineMethod() && in_array($current_order_status->getCode(),['waiting_for_online_payment','payment_failed'])){\n\t\t\t// zmena stavu online platby meni i stav objednavky, ale pouze za urcitych okolnosti\n\t\t\t$order->setNewOrderStatus($tr[$code]);\n\t\t\tif(!is_null($order->g(\"updated_by_user_id\"))){\n\t\t\t\t// we don't want to store logged-in user in updated_by_user_id\n\t\t\t\t$order->s([\n\t\t\t\t\t\"updated_by_user_id\" => null,\n\t\t\t\t\t\"updated_at\" => $order->g(\"updated_at\"),\n\t\t\t\t]);\n\t\t\t}\n\t\t\tif($code === \"paid\"){\n\t\t\t\t// Protoze je metoda Order::increasePricePaid() multi-threaded safe,\n\t\t\t\t// je tady pojistka, ktera brani ve vicenasobnem navyseni zaplacene castky.\n\t\t\t\t$current_price_paid = (float)$order->getPricePaid();\n\t\t\t\tmyAssert($current_price_paid === 0.0);\n\t\t\t\t$order->increasePricePaid($this->getPriceToPay());\n\t\t\t\tmyAssert(round($order->getPricePaid(),INTERNAL_PRICE_DECIMALS)===round(($current_price_paid + $this->getPriceToPay()),INTERNAL_PRICE_DECIMALS));\n\t\t\t}\n\t\t}\n\n\t\t$this->s([\n\t\t\t\"payment_status_id\" => $payment_status,\n\t\t\t\"payment_status_updated_at\" => now(),\n\t\t\t\"payment_status_checked_at\" => now(),\n\t\t]);\n\t}",
"public function isPaid(){\n return $this->status == \"SUCCESS\";\n }",
"public function setHasBeenRejectedBefore(bool $hasBeenRejectedBefore);",
"public function isPaid()\n {\n return $this->getStatus() === OpenNode_Bitcoin_Model_Bitcoin::OPENNODE_STATUS_PAID;\n }",
"function check_suspension($user_id) {\n\t\t$user = get_user_by('ID', $user_id);\n\t\tupdate_user_meta($user_id, 'suspended', $_POST['suspend']);\n\t}",
"public function paid()\n {\n $this->paidAmount = $this->price;\n }",
"function setReceived($received) \n {\n if ($received == true) \n\t { \n \t$this->setValueByFieldName('cashtransaction_recd','1');\n \t }\n \t else \n \t {\n\t \t$this->setValueByFieldName('cashtransaction_recd','0');\n \t } \n \t\t\t\n }",
"public function isApproved()\n {\n\n return false;\n }",
"public function setIsAccepted(bool $isAccepted);",
"public function isUnderpaid()\n {\n return $this->getStatus() === OpenNode_Bitcoin_Model_Bitcoin::OPENNODE_STATUS_UNDERPAID;\n }",
"public static function Allow_optin() {\n\t\tupdate_option( 'xlp_is_opted', 'yes', false );\n\n\t\t//try to push data for once\n\t\t$data = self::collect_data();\n\n\t\t//posting data to api\n\t\tXL_API::post_tracking_data( $data );\n\t}",
"public function __mlmPaid($state = true);",
"public function isStatusNotPaid()\n {\n return $this->status == self::_ORDER_STATUS_NEW || $this->status == self::_ORDER_STATUS_REJECTED;\n }",
"public function setRequired($blnValue) {\n\t\t$this->__required = !!$blnValue;\n\t}",
"public function isReadyForIssuing()\n {\n return $this->isFeePaid();\n }",
"public function CallPreapproval( $returnUrl, $cancelUrl, $currencyCode, $startingDate, $endingDate, $maxTotalAmountOfAllPayments,\r\n $senderEmail, $maxNumberOfPayments, $paymentPeriod, $dateOfMonth, $dayOfWeek,\r\n $maxAmountPerPayment, $maxNumberOfPaymentsPerPeriod, $pinType )\r\n {\r\n /* Gather the information to make the Preapproval call.\r\n The variable nvpstr holds the name value pairs\r\n */\r\n \r\n // required fields\r\n $nvpstr = \"returnUrl=\" . urlencode($returnUrl) . \"&cancelUrl=\" . urlencode($cancelUrl);\r\n $nvpstr .= \"¤cyCode=\" . urlencode($currencyCode) . \"&startingDate=\" . urlencode($startingDate);\r\n $nvpstr .= \"&endingDate=\" . urlencode($endingDate);\r\n $nvpstr .= \"&maxTotalAmountOfAllPayments=\" . urlencode($maxTotalAmountOfAllPayments);\r\n \r\n // optional fields\r\n if (\"\" != $senderEmail)\r\n {\r\n $nvpstr .= \"&senderEmail=\" . urlencode($senderEmail);\r\n }\r\n\r\n if (\"\" != $maxNumberOfPayments)\r\n {\r\n $nvpstr .= \"&maxNumberOfPayments=\" . urlencode($maxNumberOfPayments);\r\n }\r\n \r\n if (\"\" != $paymentPeriod)\r\n {\r\n $nvpstr .= \"&paymentPeriod=\" . urlencode($paymentPeriod);\r\n }\r\n\r\n if (\"\" != $dateOfMonth)\r\n {\r\n $nvpstr .= \"&dateOfMonth=\" . urlencode($dateOfMonth);\r\n }\r\n\r\n if (\"\" != $dayOfWeek)\r\n {\r\n $nvpstr .= \"&dayOfWeek=\" . urlencode($dayOfWeek);\r\n }\r\n\r\n if (\"\" != $maxAmountPerPayment)\r\n {\r\n $nvpstr .= \"&maxAmountPerPayment=\" . urlencode($maxAmountPerPayment);\r\n }\r\n\r\n if (\"\" != $maxNumberOfPaymentsPerPeriod)\r\n {\r\n $nvpstr .= \"&maxNumberOfPaymentsPerPeriod=\" . urlencode($maxNumberOfPaymentsPerPeriod);\r\n }\r\n\r\n if (\"\" != $pinType)\r\n {\r\n $nvpstr .= \"&pinType=\" . urlencode($pinType);\r\n }\r\n\r\n /* Make the Preapproval call to PayPal */\r\n $resArray = $this->hash_call(\"Preapproval\", $nvpstr);\r\n\r\n /* Return the response array */\r\n return $resArray;\r\n }",
"public function markAsPaid( MarkAsPaidRequest $request ) {\n\t\t$transId = $request->get('trans_id'); // Get the decrypted Id from the request\n\t\t$result = [];\n\t\t$buyerInvoiceIsAvailable = DB::table(TABLE_PAY_BUYER_INVOICES)\n\t\t ->where('trans_id', '=', $transId)\n\t\t ->count('trans_id');\n\n\t\t$sellerInvoiceIsAvailable = DB::table(TABLE_PAY_SELLER_INVOICES)\n\t\t ->where('trans_id', '=', $transId)\n\t\t ->count('trans_id');\n\n\t\tif ( ! empty($buyerInvoiceIsAvailable) && ! empty($sellerInvoiceIsAvailable) ) {\n\n\t\t\ttry {\n\t\t\t\t$updateBuyerInvoice = DB::table(TABLE_PAY_BUYER_INVOICES)\n\t\t\t\t ->where('trans_id', '=', $transId)\n\t\t\t\t ->update(['is_paid_seller' => 1]);\n\t\t\t\t$updateSellerInvoice = DB::table(TABLE_PAY_SELLER_INVOICES)\n\t\t\t\t ->where('trans_id', '=', $transId)\n\t\t\t\t ->update(['is_paid_seller' => 1]);\n\n\t\t\t\tif ( isset($updateBuyerInvoice) && isset($updateSellerInvoice) ) {\n\t\t\t\t\t$result['status'] = 1;\n\n\t\t\t\t\t// make log for user and time\n\t\t\t\t\tDBLog::save(LOG_MODULE_COURSE_ORDER_SUMMARY, $transId, 'mark_as_paid', $request->getRequestUri(), Session::get('user_id'), $result);\n\t\t\t\t}\n\n\t\t\t\treturn $this->sendResponse($result, 200);\n\t\t\t} catch ( ClientException $e ) {\n\t\t\t\tLog::error($e->getResponse()->getBody(), $e->getTrace());\n\n\t\t\t\treturn $this->sendResponse(GuzzleHttp\\json_decode($e->getResponse()->getBody()), $e->getResponse()\n\t\t\t\t ->getStatusCode());\n\t\t\t}\n\t\t}\n\n\t\t// Default error response\n\t\treturn $this->sendResponse(['message' => trans('shared::message.error.something_wrong'), 'status' => 0], 400);\n\t}",
"function isPending() {\n return $this->getStatus() == UserpointsTransaction::STATUS_PENDING;\n }",
"public function setDisabledYes()\n\t{\n\t\t$this->setAttribute( \"disabled\");\n\t}",
"public function createPreapprovalPayment($preapprovalPayment)\n {\n $response = $this->client->post(\n '/preapproval',\n $preapprovalPayment,\n ['access_token' => $this->getAccessToken()]\n );\n\n return $this->handleResponse($response);\n }",
"public function lockPayments()\n {\n $this -> lock_payments = true;\n $this -> save();\n }",
"public function isPaid() {\n return $this->state === self::STATUS_PAID;\n }",
"function approve(){\n\t\t$points= $this->ref('currently_requested_to_id')->get('points_available');\n\t\tif($points < 3000)\n\t\t\t$this->api->js()->univ()->errorMessage(\"Not suficcient points available, [ $points ]\")->execute();\n\t\t// Send point to the requester and less from your self ... \n\n\t\t$purchaser= $this->add('Model_MemberAll')->addCondition(\"id\",$this['request_from_id'])->tryLoadAny();\n\t\t$purchaser['points_available'] = $purchaser['points_available'] + 3000;\n\t\t$purchaser->save();\n\n\t\t$seller=$this->add('Model_MemberAll')->addCondition(\"id\",$this['currently_requested_to_id'])->tryLoadAny();\n\t\t$seller['points_available'] = $seller['points_available'] - 3000;\n\t\t$seller->save();\n\n\t\tif($this->api->auth->model->id == 1)\n\t\t\t$this['status']='Approved By Admin';\n\t\telse\n\t\t\t$this['status']='Approved';\n\n\t\t$this->save();\n\n\n\t}",
"public function isPaid()\n {\n return $this->status === self::STATUS_APPROVED;\n }",
"public function markUnapproved()\n {\n $this->Moderated = false;\n $this->write();\n $this->extend('afterMarkUnapproved');\n }",
"public function setIsFreeStanding($isFreeStanding)\n {\n $this->isFreeStanding = $isFreeStanding;\n }",
"public function allowAccountSettlement() \n {\n $blReturn = (\n $this->oxorder__oxpaymenttype->value == 'fcpopayadvance' ||\n fcPayOnePayment::fcIsPayOneOnlinePaymentType($this->oxorder__oxpaymenttype->value)\n );\n\n return $blReturn;\n }",
"public function setCameraBlocked(?bool $value): void {\n $this->getBackingStore()->set('cameraBlocked', $value);\n }",
"public function setVerified()\n {\n $this->update([\n 'verified' => true,\n ]);\n }",
"function isApproved() {\n return $this->getStatus() == UserpointsTransaction::STATUS_APPROVED;\n }",
"public function preRequisite() {\n\t\t$this->authorize('preRequisite', LeaveRequest::class);\n\n\t\treturn $this->success($this->repo->getPreRequisite());\n\t}",
"public function enablePlaques()\n\t{\n\t\t$this->_plaques = true;\n\t}",
"public function setBaseTotalPaid($baseTotalPaid);",
"public function updateClinicPremiumPrice($branch_id, $value_fees, $value_fees_follow)\n {\n try {\n $clinic = $this->clinic->where('id', $branch_id)->update([\n 'premium_fees' => $value_fees,\n 'premium_follow_up_fees' => $value_fees_follow,\n ]);\n return $clinic;\n } catch (\\Exception $e) {\n \\DB::rollBack();\n self::logErr($e->getMessage());\n return false;\n }\n }",
"public function isPaid() {\n return $this->isPaid;\n }",
"static function preProcess( &$form )\n {\n $session = CRM_Core_Session::singleton( );\n $contactID = $session->get( 'userID' );\n \n \n \n $form->_profileId = CRM_Core_DAO::getFieldValue( 'CRM_Core_DAO_UFGroup', 'gift_subscription',\n 'id', 'name' );\n $form->assign( 'profileId', $form->_profileId );\n \n if ( $contactID ) {\n \n $form->assign( 'onBehalfRequired', $form->_onBehalfRequired );\n }\n \n }",
"public function isPaid()\n {\n return Invoice\\InvoiceStatus::PAID == $this->status;\n }",
"public function setHoldBeforeStatus($holdBeforeStatus);",
"public function asPaid()\n {\n return $this->markAs($this->getPaidValue());\n }",
"public function setStatementLimitFreePolicy(int $freePolicy): void\n {\n if ($freePolicy !== self::STATEMENT_FREE_POLICY_MIN_USED_AT &&\n $freePolicy !== self::STATEMENT_FREE_POLICY_RING) {\n throw new InvalidArgumentException('freePolicy should be a one of STATEMENT_FREE_POLICY_* constants');\n }\n\n $this->statementLimitFreePolicy = $freePolicy;\n }",
"public function executeInitAutoRecharge()\n {\n $sms = new Lib\\SMS();\n $key = $sms->getPreapprovalKey( $this->getParameter( 'amount' ) );\n if ( $key !== false ) {\n wp_send_json_success( array( 'paypal_preapproval' => 'https://www.paypal.com/cgi-bin/webscr?cmd=_ap-preapproval&preapprovalkey=' . $key ) );\n } else {\n wp_send_json_error( array( 'message' => __( 'Auto-Recharge has failed, please replenish your balance directly.', 'bookly' ) ) );\n }\n }",
"public function pre_confirmation_check() {\n return false;\n }",
"public function setOptionsBeforePayment($optionsBeforePayment) {\n \t$this->_optionsBeforePayment = $optionsBeforePayment;\n }",
"public function setIsTaxesPaid(?bool $isTaxesPaid): self\n {\n $this->initialized['isTaxesPaid'] = true;\n $this->isTaxesPaid = $isTaxesPaid;\n\n return $this;\n }",
"public function setSettingsBlockSessionResume(?bool $value): void {\n $this->getBackingStore()->set('settingsBlockSessionResume', $value);\n }",
"public function setBillable($billable)\n {\n $this->billable = $billable;\n }",
"public function block(User $user,$bool = true)\n {\n if($this->isUser($user)) {\n $this->users()->updateExistingPivot($user->id,[\n \"blocked\" => $bool\n ]);\n return $this->save();\n }\n }",
"function pre_confirmation_check() {\r\n return true;\r\n }",
"public function isPaid()\n {\n return $this->markedAs($this->getPaidValue());\n }",
"public function setUseAllowedStatus($use_allowed_status, $withdrawn_threshold = 3)\n\t{\n\t\t$this->use_allowed_status = $use_allowed_status;\n\t\t$this->allowed_withdrawn_threshold = $withdrawn_threshold;\n\t}",
"public function check_premium($user_ID = false)\r\n {\r\n $userID = $user_ID ? $user_ID : $this->ID;\r\n $info = $this->meta;\r\n \r\n \r\n /* check if paypal meta is set */\r\n \r\n //DISABLED\r\n if (isset($info['paypal']) and 1==2) {\r\n \r\n $paypal = unserialize($info['paypal'][0]);\r\n \r\n if (empty($paypal)) {\r\n // fix serialized corrupt data\r\n // http://stackoverflow.com/questions/10152904/unserialize-function-unserialize-error-at-offset\r\n $paypal = preg_replace('!s:(\\d+):\"(.*?)\";!e', \"'s:'.strlen('$2').':\\\"$2\\\";'\", $info['paypal'][0]);\r\n $paypal = unserialize($paypal);\r\n }\r\n \r\n $status = $paypal['payment_status'];\r\n\r\n $paid_on = strtotime($paypal['paid_on']);\r\n $today = date('Y-m-d h:m:s');\r\n \r\n /* check status and date is not more than 30 days over paid on date (monthly subscription) */\r\n if($status == 'Completed') :\r\n\r\n $today = date('Y-m-d h:m:s');\r\n $ts1 = strtotime($today);\r\n $ts2 = $paid_on;\r\n $seconds_diff = $ts1 - $ts2;\r\n $days_passed = floor($seconds_diff/(60*60*24));\r\n\r\n $user = new WP_User( $userID );\r\n $role = ($user->get_role('premium_member'));\r\n\r\n $allcaps = $user->get_role_caps();\r\n /* only change roles if the current user is not an admi */\r\n if($allcaps['administrator'] != 1) :\r\n\r\n if($days_passed <= 30) :\r\n /* set premium member role */\r\n $user->remove_role( 'normal_member' );\r\n $user->add_role( 'premium_member' );\r\n $data = array(\r\n 'ID' => $userID,\r\n 'role' => 'premium_member'\r\n );\r\n /* update user with new roles so they are visible in admin */\r\n wp_update_user($data);\r\n do_action('premium-membership');\r\n else :\r\n update_user_meta( $userID, 'days-since-expire', $days_passed);\r\n\r\n /* set normal member role */\r\n $user->remove_role( 'premium_member' );\r\n $user->remove_cap( 'premium' );\r\n $user->add_role( 'normal_member' );\r\n $data = array(\r\n 'ID' => $userID,\r\n 'role' => 'normal_member'\r\n );\r\n /* update user with new roles so they are visible in admin */\r\n wp_update_user($data);\r\n do_action('expired-membership');\r\n endif;\r\n endif;\r\n endif;\r\n }\r\n\r\n\r\n }",
"public function setStatusPending()\n {\n $this->status = 'PENDING';\n\n return $this;\n }",
"function pre_confirmation_check() {\r\n return false;\r\n }",
"function can_use_premium_code__premium_only() {\n\t\t\treturn $this->is_premium() && $this->can_use_premium_code();\n\t\t}",
"public function setTotalPaid($totalPaid);",
"public function preUpdate(User $user, PreUpdateEventArgs $event)\n {\n if ($event->hasChangedField('enabled')) {\n if ($event->getNewValue('enabled')) {\n $this->userMailer->notifyActivation($user->getId(),$this->mailer);\n }\n }\n }",
"public function isPaid() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn InputValidator::isEmpty($this->payDate) ? false: true;\r\n\t}",
"abstract function has_paid_plan();",
"public function approve()\n {\n // Make sure that all necessary payment plugins are loaded at this point.\n $this->getDi()->plugins_payment->loadEnabled();\n if ($this->isConfirmed())\n return true;\n $old_status = $this->is_confirmed;\n $this->is_confirmed = self::IS_CONFIRMED_CONFIRMED;\n\n $this->updateSelectedFields('is_confirmed');\n $saved = array();\n foreach ($this->data()->getAll() as $k => $v) {\n if (strpos($k, self::SAVED_TRANSACTION_KEY) !== false) {\n list(, $time, $payment_id) = explode('-', $k);\n $saved[$time] = array($payment_id, $v);\n }\n }\n ksort($saved);\n foreach ($saved as $time => $v) {\n $this->addAccessPeriod($v[1], $v[0] ? $v[0] : null);\n $this->data()->set(self::SAVED_TRANSACTION_KEY . '-' . $time . '-' . $v[0], null)->update();\n }\n if ($old_status == self::IS_CONFIRMED_NOT_CONFIRMED)\n {\n $this->sendApprovedEmail();\n $this->getDi()->hook->call(Am_Event::INVOICE_AFTER_APPROVE, array('invoice' => $this));\n }\n return true;\n }",
"private static function _SetUserAsApproved(string $username): bool {\r\n \r\n $db = DbClass::getInstance();\r\n \r\n $sql = 'UPDATE users SET is_approved=1 WHERE username=:username AND is_blocked=0';\r\n $data = ['username' => $username];\r\n \r\n $result = $db->singleQueryRetResult($sql, $data);\r\n \r\n return $result;\r\n }",
"function setDeclined($declined) {\n\t\t$this->setData('declined', $declined);\n\t}",
"public function setMaintenanceWindowBlocked(?bool $value): void {\n $this->getBackingStore()->set('maintenanceWindowBlocked', $value);\n }"
] | [
"0.7127651",
"0.6327588",
"0.6018615",
"0.5995637",
"0.5935298",
"0.5896967",
"0.5778362",
"0.57450676",
"0.5683287",
"0.5662277",
"0.56392175",
"0.5610785",
"0.55330133",
"0.55123067",
"0.5510463",
"0.5510463",
"0.5497974",
"0.54363984",
"0.537157",
"0.53710544",
"0.53608775",
"0.53199124",
"0.53028524",
"0.52795887",
"0.5246847",
"0.5246204",
"0.5238792",
"0.52356637",
"0.5225987",
"0.5220474",
"0.5208228",
"0.5199068",
"0.51986617",
"0.5188877",
"0.5185393",
"0.5154615",
"0.5150469",
"0.51436025",
"0.5129731",
"0.5129631",
"0.5121351",
"0.51198316",
"0.51164114",
"0.5107986",
"0.50996214",
"0.5094531",
"0.5075612",
"0.5067696",
"0.5034412",
"0.50321555",
"0.50233936",
"0.5021832",
"0.5021211",
"0.5017478",
"0.5012841",
"0.5010138",
"0.4992203",
"0.4991917",
"0.49870664",
"0.49789992",
"0.49703884",
"0.49677613",
"0.49529293",
"0.49510944",
"0.49495572",
"0.49486062",
"0.492908",
"0.4927005",
"0.49126208",
"0.48922268",
"0.48860773",
"0.48843965",
"0.48812437",
"0.4879068",
"0.48786077",
"0.4876591",
"0.4872372",
"0.4869661",
"0.48640543",
"0.48554844",
"0.48521227",
"0.48511067",
"0.48403597",
"0.4839577",
"0.48307598",
"0.48306242",
"0.48271954",
"0.48253888",
"0.48233628",
"0.48202753",
"0.4815981",
"0.47919795",
"0.47915834",
"0.47910744",
"0.47894523",
"0.47835445",
"0.4778075",
"0.47721598",
"0.477032",
"0.4768244"
] | 0.79809797 | 0 |
Get the value of channel_id | public function getChannelId()
{
return $this->channel_id;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function getChannelId() {\n $event = $this->getEvent();\n\n if (isset($event['channel'])) {\n return $event['channel'];\n }\n\n return $event['channel_id'];\n }",
"public function getChannel()\n {\n $value = $this->get(self::channel);\n return $value === null ? (integer)$value : $value;\n }",
"function get_channel_id($entry_id)\n\t{\t\n\t\t$this->EE->db->select('channel_id');\n\t\t$this->EE->db->where('entry_id', $entry_id);\n\t\t$query = $this->EE->db->get('channel_titles');\n\t\t$row = $query->row();\n\t\t\n\t\treturn ($row ? $row->channel_id : '');\n\t}",
"public function getChannelCode()\n {\n return $this->data['fields']['channel_code'];\n }",
"public function getSalesChannelId();",
"public function getChannelId(): Snowflake\n {\n return $this->channel_id;\n }",
"public function getSubchannelId()\n {\n return $this->subchannelId;\n }",
"public function getChannelId($channel_name)\n {\n $query=\"select channel_id\n from channel\n where channel_name= '\".$_POST['channel_name'].\"'\";\n if(($result=$this->db->CustomQuery($query))!=null)\n {\n return $result;\n }\n $this->LastMsg.\"Channel name not found <br>\";\n return false;\n }",
"public static function getChannelID\n\t(\n\t\t$channel\t\t// <str> The channel (hashtag) to get the channel ID of.\n\t)\t\t\t\t\t// RETURNS <int> the ID of the resulting channel, or 0 on failure.\n\t\n\t// $channelID = AppChat::getChannelID($channel);\n\t{\n\t\treturn (int) Database::selectValue(\"SELECT id FROM chat_channels WHERE channel=? LIMIT 1\", array($channel));\n\t}",
"public function getChannel()\n {\n return $this->getData(self::CHANNEL);\n }",
"public function getChannel(): string\n {\n return $this->channel;\n }",
"public function getChannel(): string\n {\n return $this->channel;\n }",
"public function getChannel(): string\n {\n return $this->channel;\n }",
"function channelInfo()\n\t{\n\t\treturn $this->_channel;\n\t}",
"public function getChannel()\n {\n \treturn $this->_channel;\n }",
"public function getChannel()\n {\n if (is_null($this->channel)) {\n /** @psalm-var stdClass|array<string, mixed>|null $data */\n $data = $this->raw(self::FIELD_CHANNEL);\n if (is_null($data)) {\n return null;\n }\n\n $this->channel = ChannelResourceIdentifierModel::of($data);\n }\n\n return $this->channel;\n }",
"function ts3client_getChannelVariableAsString($serverConnectionHandlerID, $channelID, $flag, &$result) {}",
"private function getChannelId($channelName)\n {\n if ( $channelName == null ) {\n $channelName = $this->defaultChannelName;\n }\n $this->debug(__METHOD__ . \" $channelName\");\n // Check if the channel ID can be parsed as JSON\n $decoded = json_decode($channelName);\n if (is_object($decoded) && isset($decoded->channel_id)) {\n $this->debug(\"return decoded\");\n return $decoded->channel_id;\n }\n\n // If the channel name starts with a '.', use the rest of the string as the channel ID\n if (substr($channelName, 0, 1) == '.') {\n return substr($channelName, 1);\n }\n\n try {\n $response = $this->client->request('GET', 'conversations.list', [\n 'headers' => [\n 'Authorization' => 'Bearer ' . $this->slackToken,\n ],\n ]);\n\n $responseBody = json_decode($response->getBody(), true);\n if ($responseBody['ok']) {\n foreach ($responseBody['channels'] as $channel) {\n if ($channel['name'] == $channelName) {\n return $channel['id'];\n }\n }\n } else {\n throw new \\Exception($responseBody['error']);\n }\n\n // If the channel was not found, return null\n return null;\n } catch (GuzzleException $e) {\n throw new \\Exception($e->getMessage());\n }\n }",
"public function getChannel(): string {\n\t\t\treturn $this->channel;\n\t\t}",
"public function getChannel()\n {\n return $this->channel;\n }",
"public function getChannel()\n {\n return $this->channel;\n }",
"public function getChannel() {\n return $this->channel;\n }",
"public function getChannel()\n\t{\n\t\treturn $this->channel;\n\t}",
"public function getChannelById($id);",
"public function getChannel()\n {\n return $this->Channel;\n }",
"public function getChannel()\n {\n return $this->Channel;\n }",
"public function getChannel()\n {\n return $this->get(self::_CHANNEL);\n }",
"public function getChannel()\n {\n return $this->get(self::_CHANNEL);\n }",
"public function getChannel()\n {\n return $this->get(self::_CHANNEL);\n }",
"public function getChannel()\n {\n return $this->get(self::_CHANNEL);\n }",
"public function channel()\n\t{\n\t\treturn $this->xml->channel;\n\t}",
"public function getChannel()\n {\n return $this->channel instanceof ChannelResourceIdentifierBuilder ? $this->channel->build() : $this->channel;\n }",
"private function _getRequestChannel() {\n $td = Request::get('token_data');\n if(isset($td['type']) && $td['type'] == 'channel') {\n return Channel::where('id', $td['channel_id'])->first();\n } else {\n if(!Request::input('channel')) {\n return Response::json([\n 'error' => 'invalid_input',\n 'error_description' => 'No channel specified'\n ], 400);\n }\n\n $uid = Request::input('channel');\n $channel = Channel::where('user_id', Auth::user()->id)->where('uid', $uid)->first();\n if(!$channel)\n return Response::json([\n 'error' => 'not_found',\n 'error_description' => 'Channel not found'\n ], 404);\n else\n return $channel;\n }\n }",
"public function getChannel();",
"public function getChannelName($channel_id)\n {\n\n $query=\"select channel_name from \".CHANNEL_T.\" where channel_id= \".$channel_id.\"\";\n \n if(($channelname=$this->db->CustomQuery($query))!=null)\n {\n return $channelname[0]['channel_name'];\n\n }\n \n $this->LastMsg.\"Channel name not found <br>\";\n return false;\n }",
"public function getHouseChannelId()\n {\n return $this->_houseChannelId;\n }",
"public static function getChannel()\n {\n $config = Yaml::parseFile(__DIR__.'/../../config.yaml');\n return (isset($config[\"log\"][\"channel\"])) ? $config[\"log\"][\"channel\"] : \"Amarki\";\n }",
"function get_channel_id_pref($id)\r\n\t{\r\n\t\t//cache?\r\n\t\tif (isset($this->cache['channel_ids'][$id]))\r\n\t\t{\r\n\t\t\treturn $this->cache['channel_ids'][$id];\r\n\t\t}\r\n\r\n\t\t$channel_data = $this->get_channel_ids();\r\n\r\n\t\tif ( isset($channel_data[$id]) )\r\n\t\t{\r\n\t\t\t$this->cache['channel_ids'][$id] = $channel_data[$id];\r\n\t\t\treturn $this->cache['channel_ids'][$id];\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn array();\r\n\t\t}\r\n\t}",
"public function getChannelDetails($channel_id)\n {\n \t$query=\"select * from \".CHANNEL_T.\"\n inner join vims_channel_type\n on vims_channel.channel_type_id = vims_channel_type.channel_type_id\n where channel_id='\".$channel_id.\"'\";\n if(($data=$this->db->CustomQuery($query))!=null)\n\t\t{\n\t\t\treturn $data;\n\t\t}\n $this->LastMsg.\"Query failed, cannot get info <br>\";\n return false;\n }",
"public function getChatId()\n {\n return $this->get(self::_CHAT_ID);\n }",
"public function getChatId()\n {\n return $this->get(self::_CHAT_ID);\n }",
"public function getChannel()\n {\n return $this->getNodeText('/p:package/p:channel');\n }",
"public function getChannel(): Channel\n {\n return $this->channel;\n }",
"function ts3client_getChannelVariableAsUInt64($serverConnectionHandlerID, $channelID, $flag, &$result) {}",
"public function getEntity() { return $this->channel; }",
"public static function getChannelServer\n\t(\n\t\t$channel\t\t// <str> The channel name.\n\t)\t\t\t\t\t// RETURNS <int> the chat's server integer.\n\t\n\t// $chatServerID = AppChat::getChannelServer($channel);\n\t{\n\t\treturn (int) (ord($channel[0]) + ord($channel[1])) % 10;\n\t}",
"public function getDistributionChannel()\n {\n if (is_null($this->distributionChannel)) {\n /** @psalm-var stdClass|array<string, mixed>|null $data */\n $data = $this->raw(self::FIELD_DISTRIBUTION_CHANNEL);\n if (is_null($data)) {\n return null;\n }\n\n $this->distributionChannel = ChannelResourceIdentifierModel::of($data);\n }\n\n return $this->distributionChannel;\n }",
"public function getById($id){\n\t\t$Channel = \\Channel::find($id); \n\t\treturn $Channel;\n\t}",
"protected function _get_channel_title() {\n\t\t// Lookup the channel title from the database\n\t\t$channel_id = $this->EE->input->get('channel_id');\n\t\t$channel = $this->EE->db->select('channel_title')->where('channel_id', $channel_id)\n\t\t\t\t\t\t\t\t->get('channels')->row();\n\t\t\n\t\t// Return it!\n\t\treturn $channel->channel_title;\n\t}",
"function ts3client_getParentChannelOfChannel($serverConnectionHandlerID, $channelID, &$result) {}",
"public function id($username)\n {\n $id = $this->_client->processChannelId($username);\n\n if ($id) {\n $this->info(__('ID: {0}', $id));\n } else {\n $this->info(__('The ID or Username is not correct.'));\n }\n\n return $id;\n }",
"public function getChildChannel($channel_id) {\n\n // $query=\"select * from vims_channel, vims_channel_type where parent_channel_id IN (select channel_id from vims_channel where channel_id = '\".$channel_id. \"') and vims_channel_type.channel_type_id = vims_channel.channel_type_id\";\n $query=\"select * from \".CHANNEL_T.\" ch, \".CHANNEL_TYPE_T.\" ct where ch.parent_channel_id IN (select channel_id from \".CHANNEL_T.\" where channel_id = '\".$channel_id. \"') and ct.channel_type_id = ch.channel_type_id and ch.channel_id!='\".$channel_id. \"'\";\n\n if(($result=$this->db->CustomQuery( $query))!=null)\n {\n return $result;\n }\n\n\n \t$this->mlog->LogMsg(__CLASS__,__METHOD__, __FILE__,__LINE__,\"User: \".$_SESSION['user_id'].\"\\r\\nFailed to add: $start\");\n \t$this->LastMsg.\"Channel not found! <br>\";\n return false;\n }",
"public function getDistributionChannel()\n {\n if (is_null($this->distributionChannel)) {\n /** @psalm-var stdClass|array<string, mixed>|null $data */\n $data = $this->raw(self::FIELD_DISTRIBUTION_CHANNEL);\n if (is_null($data)) {\n return null;\n }\n\n $this->distributionChannel = ChannelKeyReferenceModel::of($data);\n }\n\n return $this->distributionChannel;\n }",
"function ts3client_getChannelVariableAsInt($serverConnectionHandlerID, $channelID, $flag, &$result) {}",
"public function getNotificationChannel($channel)\n {\n $channel_id = NotificationChannel::where('name', $channel)->first()->id;\n\n return UserNotificationChannel::where('user_id', Auth::id())->where('channel_id', $channel_id)->first();\n }",
"public static function getChannelNameByID\n\t(\n\t\t$channelID\t\t// <int> The ID of the channel.\n\t)\t\t\t\t\t// RETURNS <str> the name of the channel, or \"\" on failure.\n\t\n\t// $channel = AppChat::getChannelNameByID($channelID);\n\t{\n\t\treturn Database::selectValue(\"SELECT channel FROM chat_channels WHERE id=? LIMIT 1\", array($channelID));\n\t}",
"public function getChannelHeader()\n {\n return $this->channel_header;\n }",
"function get_channel_entry()\n\t{\n\t\t// get variables\n\t\t$vars = $this->_get_vars('get', array('entry_id'));\n\t\t\n\t\t// start hook\n\t\t$vars = $this->_hook('get_channel_entry_start', $vars);\n\n\t\t// load channel data library\n\t\t$this->_load_library('channel_data');\n\n\t\t$data = $this->EE->channel_data_lib->get_channel_entry($vars['entry_id'])->result();\n\t\t\n\t\t// expand file fields\n\t\tif (count($data)) \n\t\t{\n\t\t\t$channel_id = $data[0]->channel_id;\n\t\t\t$data = $this->_expand_file_fields($channel_id, $data);\n\t\t}\n\n\t\t// end hook\n\t\t$data = $this->_hook('get_channel_entry_end', $data);\n\n\t\t$this->response($data);\n\t}",
"public function getSalesChannel()\n {\n return $this->_fields['SalesChannel']['FieldValue'];\n }",
"public function getChannel()\n {\n return $this->getComposerJson()->extra->magento_connect->channel;\n }",
"public function getChannelType(): string;",
"function get_channel_id_from_entry_id( $entry_id = '' )\n\t{\n\t\tif ( is_numeric( $entry_id ) === FALSE ) return FALSE;\n\n\t\t// --------------------------------------------\n\t\t// Prep Cache, Return if Set\n\t\t// --------------------------------------------\n\n\t\t$cache_name = __FUNCTION__;\n\t\t$cache_hash = $this->_imploder(func_get_args());\n\n\t\tif (isset($this->cached[$cache_name][$cache_hash]))\n\t\t{\n\t\t\treturn $this->cached[$cache_name][$cache_hash];\n\t\t}\n\n\t\t$this->cached[$cache_name][$cache_hash] = FALSE;\n\n\t\t// --------------------------------------------\n\t\t// Grab from DB\n\t\t// --------------------------------------------\n\n\t\t$query\t= ee()->db\n\t\t\t\t\t\t->select('author_id, channel_id')\n\t\t\t\t\t\t->where('entry_id', $entry_id)\n\t\t\t\t\t\t->limit(1)\n\t\t\t\t\t\t->get('channel_titles');\n\n\t\tif ( $query->num_rows() > 0 )\n\t\t{\n\t\t\t$this->cached[$cache_name][$cache_hash]\t= $query->row('channel_id');\n\t\t\t$this->cached['get_author_id_from_entry_id'][$cache_hash]\t= $query->row('author_id');\n\t\t}\n\n\t\treturn $this->cached[$cache_name][$cache_hash];\n\t}",
"public function getChannel()\n {\n return $this->_access->getChannel();\n }",
"public function getChannel()\n {\n if (! $this->channel) {\n $this->set();\n }\n\n return $this->channel;\n }",
"public function getReceiverId();",
"public function getId()\n {\n return $this->c_id;\n }",
"public function getChannel($storeId = null);",
"public function getChannels(){\n\t\t//TODO: Change query\n\t\t$query = sprintf(\"SELECT idChannel FROM Channels limit 1\");\n\n\t\t$this->dbObj->Query($query);\n\n\t\tif ($this->dbObj->numErr) {\n\t\t\t$this->parent->SetError(5);\n\t\t}\n\n\t\t$out = NULL;\n\t\twhile (!$this->dbObj->EOF) {\n\t \t\t$out[] = $this->dbObj->GetValue(\"idChannel\");\n\t\t\t$this->dbObj->Next();\n\t\t}\n\n\t \treturn $out;\n\t}",
"private function getChannelId($user)\n {\n $client = new Client();\n $crawler = $client->request('GET', 'https://www.youtube.com/'.$user);\n $url = $crawler->filter('link[rel=\"canonical\"]')->attr('href');\n return explode('/', $url)[4];\n }",
"public function getFulfillmentChannel()\n {\n return $this->_fields['FulfillmentChannel']['FieldValue'];\n }",
"public static function createChannel\n\t(\n\t\t$channel\t\t\t// <str> The channel (hashtag) to create.\n\t)\t\t\t\t\t\t// RETURNS <int> the ID of the resulting channel, or 0 on failure.\n\t\n\t// $channelID = AppChat::createChannel($channel);\n\t{\n\t\t// Check to see if the channel already exists\n\t\tif($channelID = self::getChannelID($channel))\n\t\t{\n\t\t\treturn $channelID;\n\t\t}\n\t\t\n\t\t// Get the Server ID that this channel is meant for\n\t\t$loadServerID = self::getChannelServer($channel);\n\t\t\n\t\t// Get the Chat Server ID\n\t\t$host = explode(\".\", $_SERVER['SERVER_NAME']);\n\t\t$chatServID = (int) str_replace(\"chat\", \"\", $host[0]);\n\t\t\n\t\t// If you're not on the correct server\n\t\tif($loadServerID != $chatServID)\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\t// Create the new channel\n\t\tDatabase::query(\"INSERT INTO chat_channels (channel) VALUES (?)\", array($channel));\n\t\t\n\t\treturn Database::$lastID;\n\t}",
"public function get_id_message()\n {\n return $this->id_message;\n }",
"public function getSimpleChannel($channelId)\n {\n return Channel::whereId($channelId)->get()->first();\n }",
"function ts3client_setChannelVariableAsString($serverConnectionHandlerID, $channelID, $flag, $value) {}",
"public function getChannel($identifier)\n {\n $query = Channel::with('category', 'display');\n\n if( is_numeric( $identifier ) ) {\n $query->where('id', $identifier);\n }\n else {\n $query->where('sef_name', $identifier);\n }\n\n return $query->first();\n }",
"public function getChannel(): ?Channel\n {\n return $this->channel;\n }",
"public function getChannelName($channelId, $baseTable = \"channels\")\n {\n\n\n $db = new MidoDb();\n\n $userSql = \"SELECT* FROM $baseTable WHERE id=$channelId\";\n $userRes = $db->selectRecordWithSql($userSql);\n $userResDet = $db->fetchAssoc($userRes);\n\n if (!$userRes) {\n return null;\n } else {\n return $userResDet[0]['channel'];\n }\n }",
"public function getDeliveryChannel() {\n return $this->params[\"original\"][\"delivery_channel\"];\n }",
"function __getCcid() {\n\t\t$ccid = (isset($this->params['url']['ccid'])) ? $ccid = $this->params['url']['ccid'] : null;\n\t\tif (!isset($this->CastingCall)) $this->CastingCall = loadComponent('CastingCall', $this);\n\t\tif ($ccid) {\n\t\t\tif (!$this->Session->check(\"castingCall.{$ccid}\")) {\n\t\t\t\treturn false;\t// invalid ccid, not saved in Session\n\t\t\t} \n\t\t\t$cc = $this->Session->read(\"castingCall.{$ccid}\");\n\t\t} else {\n\t\t\t$cc = $this->CastingCall->cache_MostRecent();\n\t\t}\n\t\t\n\t\tif ($cc === null) return null;\n\t\tif (isset($cc['Stale'])) {\n\t\t\t$cc = $this->CastingCall->cache_Refresh($ccid);\n\t\t} \n\t\treturn isset($cc['ID']) ? $cc['ID'] : null;\n\t}",
"public function getChannelIds()\n {\n $ids = [];\n foreach ($this as $channel) {\n $channelId = $channel->getChannelId();\n if (!empty($channelId)) {\n $ids[] = $channelId;\n }\n }\n\n return $ids;\n }",
"public function getPlayer_id() {\n return $this->getValue('player_id');\n }",
"public function GetVar($channel, $variable, $actionId);",
"public static function find($id)\n {\n return Channel::find($id);\n }",
"public static function getChannel($channel)\r\n\t{\r\n\t\tif(empty(self::$channels[strtolower($channel)]))\r\n\t\t{\r\n\t\t\t$channel_obj = trim($channel, '#');\r\n\t\t\tself::$channels[strtolower($channel)] = new $channel_obj(strtolower($channel));\r\n\t\t}\r\n\t\t\r\n\t\treturn self::$channels[strtolower($channel)];\r\n\t}",
"public function getUserGcmRegId() {\n $stmt = $this->conn->prepare(\"SELECT gcm_registration_id FROM app_users\");\n // $stmt->bind_param(\"s\", $api_key);\n $stmt->execute();\n $user_gcm = $stmt->get_result();\n $stmt->close();\n return $user_gcm;\n }",
"public function getColorChannel($channel) {\n return $this->getColorLib()->setColor($this->getSafeType(), $this->getSafeColor())->getChannel($channel);\n }",
"public function getSubscriptionId()\n {\n $value = $this->get(self::SUBSCRIPTION_ID);\n\n return $value === null ? (string) $value : $value;\n }",
"public function getConversionId(): int\n {\n return $this->id;\n }",
"public function getSupplyChannel()\n {\n if (is_null($this->supplyChannel)) {\n /** @psalm-var stdClass|array<string, mixed>|null $data */\n $data = $this->raw(self::FIELD_SUPPLY_CHANNEL);\n if (is_null($data)) {\n return null;\n }\n\n $this->supplyChannel = ChannelResourceIdentifierModel::of($data);\n }\n\n return $this->supplyChannel;\n }",
"public function id() {\n return $this->activity_array['id'];\n }",
"public function getCampaignID()\n {\n return $this->CampaignID;\n }",
"public function show($id)\n {\n return Channel::findOrFail($id);\n }",
"public function getId()\n {\n $value = $this->get(self::ID);\n return $value === null ? (string)$value : $value;\n }",
"public function getMessageId();",
"public function getMessageId();",
"public function getMessageId();",
"public function getMessageId();",
"public function selectById($id) {\n foreach ($this->selectAll() as $channel) {\n if ($channel->getId() == $id)\n return $channel;\n }\n return null;\n }",
"public function getSupplyChannel()\n {\n if (is_null($this->supplyChannel)) {\n /** @psalm-var stdClass|array<string, mixed>|null $data */\n $data = $this->raw(self::FIELD_SUPPLY_CHANNEL);\n if (is_null($data)) {\n return null;\n }\n\n $this->supplyChannel = ChannelKeyReferenceModel::of($data);\n }\n\n return $this->supplyChannel;\n }",
"public function getSubscriptionId();"
] | [
"0.8004537",
"0.7412812",
"0.7219134",
"0.7179654",
"0.7087462",
"0.7020301",
"0.69980395",
"0.69170344",
"0.6790924",
"0.6619758",
"0.65257514",
"0.65257514",
"0.65257514",
"0.6493556",
"0.6478824",
"0.6452272",
"0.64094377",
"0.64090765",
"0.6404424",
"0.63797617",
"0.63797617",
"0.63761294",
"0.6308227",
"0.62838113",
"0.62549096",
"0.62549096",
"0.61941934",
"0.6193715",
"0.6193715",
"0.6193715",
"0.617905",
"0.61749065",
"0.6157145",
"0.61548316",
"0.61545634",
"0.6151525",
"0.6061304",
"0.6060084",
"0.60274273",
"0.60202485",
"0.6020047",
"0.6007112",
"0.59794354",
"0.59652877",
"0.59560347",
"0.5952884",
"0.59484684",
"0.594409",
"0.59378785",
"0.59209424",
"0.5887565",
"0.5857461",
"0.5847446",
"0.58454454",
"0.5843513",
"0.5808412",
"0.5792299",
"0.57843304",
"0.57623225",
"0.57485014",
"0.5737866",
"0.5727818",
"0.5720612",
"0.57101333",
"0.5689781",
"0.5687634",
"0.5687583",
"0.5657261",
"0.56323725",
"0.56127137",
"0.55993897",
"0.55809563",
"0.555011",
"0.5546408",
"0.55454206",
"0.5542128",
"0.5541341",
"0.5531914",
"0.5523818",
"0.5518695",
"0.5517706",
"0.55158657",
"0.55050087",
"0.5494777",
"0.5491188",
"0.5484691",
"0.54534155",
"0.54521334",
"0.54364383",
"0.5419446",
"0.539072",
"0.5379228",
"0.5370332",
"0.53645235",
"0.53645235",
"0.53645235",
"0.53645235",
"0.535354",
"0.53530455",
"0.53414613"
] | 0.8076765 | 0 |
Set the value of channel_id | public function setChannelId(int $channel_id)
{
$this->channel_id = $channel_id;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getChannelId()\n {\n return $this->channel_id;\n }",
"public function setId($var)\n {\n GPBUtil::checkMessage($var, \\ChannelIdentifier::class);\n $this->id = $var;\n\n return $this;\n }",
"private function getChannelId() {\n $event = $this->getEvent();\n\n if (isset($event['channel'])) {\n return $event['channel'];\n }\n\n return $event['channel_id'];\n }",
"public function setChannelCode($value)\n {\n if (!array_key_exists('channel_code', $this->fieldsModified)) {\n $this->fieldsModified['channel_code'] = $this->data['fields']['channel_code'];\n } elseif ($value === $this->fieldsModified['channel_code']) {\n unset($this->fieldsModified['channel_code']);\n }\n\n $this->data['fields']['channel_code'] = $value;\n }",
"public function set_channel(){\n\t\t$repository_id = sanitize_text_field( $_POST['repository_id'] );\n\t\t$channel = sanitize_text_field( $_POST['channel'] );\n\n\t\t$response = array();\n\t\tif ( wp_verify_nonce( $_POST['nonce'], 'installer_set_channel:' . $repository_id ) ) {\n\t\t\tif( isset( WP_Installer()->settings['repositories'][$repository_id] ) ){\n\t\t\t\tWP_Installer()->settings['repositories'][$repository_id]['channel'] = $channel;\n\t\t\t\tWP_Installer()->settings['repositories'][$repository_id]['no-prompt'] = $_POST['noprompt'] === 'true';\n\t\t\t\tWP_Installer()->save_settings();\n\t\t\t}\n\n\t\t\tWP_Installer()->refresh_repositories_data();\n\n\t\t\t$response['status'] = 'OK';\n\t\t}\n\n\t\techo json_encode( $response );\n\t\texit;\n\t}",
"public function setChannelSeen($channel_id)\n {\n $this->channels()->updateExistingPivot($channel_id, ['seen' => true]);\n }",
"public function setChannel($value)\n {\n return $this->set(self::channel, $value);\n }",
"function ts3client_setChannelVariableAsInt($serverConnectionHandlerID, $channelID, $flag, $value) {}",
"public function setChannel($channelName = 'none') {\n $this->channelName = $channelName;\n }",
"public function setChannel($channel)\n {\n return $this->setData(self::CHANNEL, $channel);\n }",
"public function setChannel($value)\n {\n return $this->set(self::_CHANNEL, $value);\n }",
"public function setChannel($value)\n {\n return $this->set(self::_CHANNEL, $value);\n }",
"public function setChannel($value)\n {\n return $this->set(self::_CHANNEL, $value);\n }",
"public function setChannel($value)\n {\n return $this->set(self::_CHANNEL, $value);\n }",
"function ts3client_setChannelVariableAsString($serverConnectionHandlerID, $channelID, $flag, $value) {}",
"#[CustomOpenApi\\Operation(id: 'userSetDefaultChannel', tags: [Tags::User, Tags::V1])]\n #[OpenApi\\Parameters(factory: DefaultHeaderParameters::class)]\n #[OpenApi\\Response(factory: GenericSuccessMessageResponse::class)]\n #[CustomOpenApi\\ErrorResponse(exception: UnauthorisedTenantAccessException::class)]\n public function channel(Channel $channel)\n {\n if (!tenancy()->hasTenantId($channel->id)) {\n throw new UnauthorisedTenantAccessException();\n }\n\n auth('sanctum')->user()->update(['channel_id' => $channel->id]);\n\n return GenericSuccessMessageResponse::getResponse();\n }",
"function ts3client_setChannelVariableAsUInt64($serverConnectionHandlerID, $channelID, $flag, $value) {}",
"public function channel($channel);",
"public function set($channel = null)\n {\n if (! $channel) {\n $channel = $this->service->getDefaultRecord();\n }\n $this->setChannel($channel);\n }",
"public function setChatId($value)\n {\n return $this->set(self::_CHAT_ID, $value);\n }",
"public function setChatId($value)\n {\n return $this->set(self::_CHAT_ID, $value);\n }",
"public function setChannelNotSeen($channel_id)\n {\n $this->channels()->updateExistingPivot($channel_id, ['seen' => false]);\n }",
"public function setChannel($channel)\n {\n if (is_string($channel)) {\n try {\n $channel = $this->service->getByHandle($channel);\n } catch (ModelNotFoundException $e) {\n $channel = $this->set();\n }\n }\n $this->channel = $channel;\n\n return $this;\n }",
"public function setSalesChannelId(SalesChannelId $salesChannelId);",
"public function SetVar($channel, $variable, $value);",
"public function set_channel_element($elementName, $content){\n\t\t$this->channels[$elementName] = $content ;\n\t}",
"public function getChannelById($id);",
"public function setChannel($channel = self::CH0) {\n if ($channel <= 8 && $channel > 0) {\n $channel = constant('self::CH' . ($channel - 1));\n }\n $this->channel = $channel;\n\n return $this;\n }",
"public function getSalesChannelId();",
"public function setChannel($var)\n {\n GPBUtil::checkString($var, True);\n $this->Channel = $var;\n\n return $this;\n }",
"public function setChannel($var)\n {\n GPBUtil::checkString($var, True);\n $this->Channel = $var;\n\n return $this;\n }",
"public function setChannel(string $channel): self\n {\n $this->channel = $channel;\n return $this;\n }",
"public function setID($cid) { if($cid == faq_build_clean_input($cid,\"id\")) $this->category_id = $cid; }",
"function get_channel_id($entry_id)\n\t{\t\n\t\t$this->EE->db->select('channel_id');\n\t\t$this->EE->db->where('entry_id', $entry_id);\n\t\t$query = $this->EE->db->get('channel_titles');\n\t\t$row = $query->row();\n\t\t\n\t\treturn ($row ? $row->channel_id : '');\n\t}",
"public function setID($value) {\r\n //if (!is_numeric($value)) die(\"setID() only accepts a numerical ID value\");\r\n $this->id = $value;\r\n }",
"public function setclient_id($value);",
"public function getChannelId(): Snowflake\n {\n return $this->channel_id;\n }",
"function switchChannel($ch)\n {\n exec( $this->arfilelocation['iwpriv'] . ' '\n . escapeshellarg($this->interface) . ' set Channel='.$ch);\n }",
"public function deleteChannel($id) \n {\n $this->find($id)->delete();\n }",
"public function generateChannel(){\n\t\t$tempArray = array();\n\t\tpreg_match('/\\+(.*?)@/', $this->recipient, $tempArray);\n\t\t$this->channel = $tempArray[1];\n\t}",
"public function setVideoId()\n {\n $this->video_id = (int) substr(parse_url($this->url, PHP_URL_PATH), 1);\n }",
"public function setInfo($channel)\n {\n unset($channel['entry']);\n\n $this->info = $channel;\n }",
"public function channel(string $channel): self\n {\n $this->channelConfig = $channel;\n return $this;\n }",
"public function setChannelElement($elementName, $content)\n {\n $this->channels[$elementName] = $content;\n }",
"public function acceptUserToChannel($channel_id)\n {\n $this->channels()->updateExistingPivot($channel_id, ['accepted' => true]);\n }",
"public function addChannel($id)\n {\n $ids = preg_replace('/[^a-zA-Z0-9-.]/', '', $id);\n\n $data['marketplace'] = $this->Data_model->custome_query('select om.*,(if((SELECT of_marketplace_id FROM of_marketplace_credential WHERE of_marketplace_id=om.of_marketplace_id) IS NULL ,\"NO\",\"YES\")) is_marketplace from of_marketplace om WHERE om.status=\"A\" and replace(LOWER(om.name),\" \",\"-\")=\"' . $ids . '\"');\n\n\n $data['marketplace_field'] = $this->Data_model->custome_query('select * from of_marketplace_wise_field WHERE of_marketplace_id = ' . $data['marketplace'][0]['of_marketplace_id']);\n $data['marketplace_detail'] = $this->Data_model->custome_query('select * from of_marketplace_credential WHERE of_marketplace_id = ' . $data['marketplace'][0]['of_marketplace_id'] . ' and of_admin_id=' . $_SESSION['id']);\n// echo \"<pre>\";\n// print_r($data);\n// die;\n $this->load->view('addChannel', $data);\n }",
"public function getSubchannelId()\n {\n return $this->subchannelId;\n }",
"public function channel($id_or_name, $synced_at = null);",
"public function setSubscribed($idUser, $idChannel)\n {\n if (!$subscription = Subscription::createSubscription($idUser, $idChannel)) {\n throw new PushApiException(PushApiException::ACTION_FAILED);\n }\n\n $this->send($subscription);\n }",
"function SetId($value) { $this->id=$value; }",
"public function setMiracastChannel(?MiracastChannel $value): void {\n $this->getBackingStore()->set('miracastChannel', $value);\n }",
"public static function getChannelID\n\t(\n\t\t$channel\t\t// <str> The channel (hashtag) to get the channel ID of.\n\t)\t\t\t\t\t// RETURNS <int> the ID of the resulting channel, or 0 on failure.\n\t\n\t// $channelID = AppChat::getChannelID($channel);\n\t{\n\t\treturn (int) Database::selectValue(\"SELECT id FROM chat_channels WHERE channel=? LIMIT 1\", array($channel));\n\t}",
"private function SetID($value)\n\t\t{\n\t\t\t$this->id = $value;\n\t\t}",
"public function setDeploymentChannel(?AppleDeploymentChannel $value): void {\n $this->getBackingStore()->set('deploymentChannel', $value);\n }",
"public function setSubchannelId($var)\n {\n GPBUtil::checkInt64($var);\n $this->subchannelId = $var;\n\n return $this;\n }",
"private function setID($id) {\r\n\t\t$this->id = $id;\r\n\t}",
"public function set(string $channel, LoggerInterface $logger): void\n {\n $this->channels[$channel] = $logger;\n }",
"public function setForumId($a_obj_id)\n\t{\n\n\t\tif (!isset($a_obj_id))\n\t\t{\n\t\t\t$message = get_class($this).\"::setForumId(): No obj_id given!\";\n\t\t\t$this->ilias->raiseError($message,$this->ilias->error_obj->WARNING);\t\n\t\t}\n\t\t\n\t\t$this->id = $a_obj_id;\n\t}",
"public function setSubscriptionId(?string $value): void {\n $this->getBackingStore()->set('subscriptionId', $value);\n }",
"public function setSettingsId($value)\n {\n $this->_settingsId = $value;\n }",
"public function set_recipient( $id ) {\n\t\t$this->recipient_id = $id;\n\t\tupdate_comment_meta( $this->id, APP_REPORTS_C_RECIPIENT_KEY, $id );\n\t}",
"function setId($value) {\n $this->_id = intval($value);\n }",
"public function setChannels($channels)\n {\n if (is_array($channels)) {\n $this->_currentChannels += $channels;\n }\n else {\n $this->_currentChannels[] = $channels;\n }\n }",
"public function setChannelInfo($name,$id){\n $this->name = $name;\n $this->id = $id;\n return $this;\n }",
"public function setChannel($channel)\n {\n if (is_string($channel) === true) {\n $this->channel = $channel;\n return $this;\n }\n\n throw new InvalidArgumentException(\n 'Channel must be a string but ' . gettype($channel) . ' is given.'\n );\n }",
"public function getChannel()\n {\n if (is_null($this->channel)) {\n /** @psalm-var stdClass|array<string, mixed>|null $data */\n $data = $this->raw(self::FIELD_CHANNEL);\n if (is_null($data)) {\n return null;\n }\n\n $this->channel = ChannelResourceIdentifierModel::of($data);\n }\n\n return $this->channel;\n }",
"public function getChannel()\n {\n $value = $this->get(self::channel);\n return $value === null ? (integer)$value : $value;\n }",
"protected function _setId($value)\n\t{\n\t\tvar_dump($value);\n\t\tif (empty($value) || ($value < 0)) {\n\t\t\ttrigger_error('Invalid value used to set the member id', E_USER_ERROR);\n\t\t\treturn;\n\t\t}\n\t\telse {\n\t\t\t$this->_id = $value;\n\t\t\t$_SESSION['user_id']=$value;\n\t\t\t\n\n\t\t}\n\t}",
"public function edit($id = 0)\n\t{\t\n\t\t// Get the channel\n\t\t$channel = $this->video_channel_m->get($id);\n\t\t\n\t\t// ID specified?\n\t\t$channel or redirect('admin/video/channels/index');\n\t\t\n\t\t// Validate the results\n\t\tif ($this->form_validation->run())\n\t\t{\n\t\t\t$input = array(\n\t\t\t\t'title' => $this->input->post('title'),\n\t\t\t\t'description' => $this->input->post('description'),\n\t\t\t\t'parent_id' => $this->input->post('parent_id'),\n\t\t\t);\n\t\t\t\n\t\t\tif ( ! empty($_FILES['thumbnail']['name']))\n\t\t\t{\n\t\t\t\tif ( ! self::_upload())\n\t\t\t\t{\n\t\t\t\t\t$this->template->messages = array('error' => $this->upload->display_errors());\n\t\t\t\t\tgoto display;\n\t\t\t\t}\n\n\t\t\t\tif ( ! self::_resize())\n\t\t\t\t{\n\t\t\t\t\t$this->template->messages = array('error' => $this->image_lib->display_errors());\n\t\t\t\t\tgoto display;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$thumbnail = $this->upload->data();\n\t\t\t\t$input['thumbnail'] = $thumbnail['file_name'];\n\t\t\t}\n\t\t\t\n\t\t\t$this->video_channel_m->update($id, $input)\n\t\t\t\t? $this->session->set_flashdata('success', sprintf( lang('video_channel:edit_success'), $this->input->post('title')) )\n\t\t\t\t: $this->session->set_flashdata(array('error'=> lang('video_channel:edit_error')));\n\t\t\t\n\t\t\tredirect('admin/videos/channels');\n\t\t}\n\t\t\n\t\tdisplay:\n\t\t\n\t\t// Loop through each rule\n\t\tforeach ($this->validation_rules as $rule)\n\t\t{\n\t\t\tif ($this->input->post($rule['field']) !== FALSE)\n\t\t\t{\n\t\t\t\t$channel->{$rule['field']} = $this->input->post($rule['field']);\n\t\t\t}\n\t\t}\n\t\t\n\t\t$channels = array(lang('select.none')) + $this->video_channel_m->order_by('title')->where('parent_id', 0)->dropdown('id', 'title');\n\n\t\t$this->template->title($this->module_details['name'], sprintf(lang('video_channel:edit_title'), $channel->title))\n\t\t\t->set('channel', $channel)\n\t\t\t->set('channels', $channels)\n\t\t\t->build('admin/channels/form', $this->data);\n\t}",
"function ts3client_flushChannelUpdates($serverConnectionHandlerID, $channelID) {}",
"public function set_id($setid){\n $this->id = $setid;\n }",
"public function setID($id){\n $this->id = $id;\n }",
"public function setID($id) {\n $this->id = $id; \n }",
"public static function set($id)\n {\n self::$id = $id;\n }",
"public static function createChannel\n\t(\n\t\t$channel\t\t\t// <str> The channel (hashtag) to create.\n\t)\t\t\t\t\t\t// RETURNS <int> the ID of the resulting channel, or 0 on failure.\n\t\n\t// $channelID = AppChat::createChannel($channel);\n\t{\n\t\t// Check to see if the channel already exists\n\t\tif($channelID = self::getChannelID($channel))\n\t\t{\n\t\t\treturn $channelID;\n\t\t}\n\t\t\n\t\t// Get the Server ID that this channel is meant for\n\t\t$loadServerID = self::getChannelServer($channel);\n\t\t\n\t\t// Get the Chat Server ID\n\t\t$host = explode(\".\", $_SERVER['SERVER_NAME']);\n\t\t$chatServID = (int) str_replace(\"chat\", \"\", $host[0]);\n\t\t\n\t\t// If you're not on the correct server\n\t\tif($loadServerID != $chatServID)\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\t// Create the new channel\n\t\tDatabase::query(\"INSERT INTO chat_channels (channel) VALUES (?)\", array($channel));\n\t\t\n\t\treturn Database::$lastID;\n\t}",
"public function setId($value) {\n\t\tif(!is_numeric($value))\n\t\t\tthrow new \\Exception('Comment::setId() failed: value is not numeric');\n\n\t\t$this->id = $value;\n\t}",
"public function onChannel($channel);",
"public function set_id( $id ) {\n\t\t\t$this->id = $id;\n\t\t}",
"public function setID($_id) \n\t{\n\t\t$this->_id = $_id;\n\t}",
"public function setFulfillmentChannel($value)\n {\n $this->_fields['FulfillmentChannel']['FieldValue'] = $value;\n return $this;\n }",
"function set_commentid($new_commentid)\n {\n $this->commentid = $new_commentid;\n }",
"public function getChannel()\n {\n \treturn $this->_channel;\n }",
"public function channel()\n {\n return $this->belongsTo('App\\Models\\Channel');\n }",
"public function addUnacceptedUserToChannel($channel_id)\n {\n $this->channels()->attach($channel_id, ['accepted' => false]);\n }",
"public function getChannelCode()\n {\n return $this->data['fields']['channel_code'];\n }",
"public function testSettingChannel()\n {\n $groupsMark = new GroupsMark();\n $returnedObject = $groupsMark->setChannel($this->dummyString);\n $refGroupsMark = new \\ReflectionObject($groupsMark);\n $channelProperty = $refGroupsMark->getProperty('channel');\n $channelProperty->setAccessible(true);\n $this->assertInstanceOf(GroupsMark::class, $returnedObject);\n $this->assertEquals($this->dummyString, $channelProperty->getValue($groupsMark));\n }",
"public function set_id( $id ) {\n\t\t$this->id = absint( $id );\n\t}",
"public function set_id($id){\n $this->id = $id;\n }",
"public function setID($_id) \n \t{\n \t\t$this->_id = $_id;\n \t}",
"function set_id($id) {\n\t\t$this->id = $id;\n\t}",
"public function getChannel()\n {\n return $this->channel;\n }",
"public function getChannel()\n {\n return $this->channel;\n }",
"function setCountryId( $value )\n {\n $this->CountryID = $value;\n }",
"public function getChannel()\n\t{\n\t\treturn $this->channel;\n\t}",
"private function set_id(int $id)\n {\n $this->_id = $id;\n }",
"public function getChannelId($channel_name)\n {\n $query=\"select channel_id\n from channel\n where channel_name= '\".$_POST['channel_name'].\"'\";\n if(($result=$this->db->CustomQuery($query))!=null)\n {\n return $result;\n }\n $this->LastMsg.\"Channel name not found <br>\";\n return false;\n }",
"public function channel()\n {\n return $this->belongsTo('App\\Channel');\n }",
"public function getById($id){\n\t\t$Channel = \\Channel::find($id); \n\t\treturn $Channel;\n\t}",
"public function getChannel() {\n return $this->channel;\n }",
"function setSiteId($value)\n {\n $this->_props['SiteId'] = $value;\n }"
] | [
"0.70002323",
"0.6487529",
"0.64451253",
"0.6414466",
"0.63730305",
"0.62413037",
"0.6202765",
"0.6202275",
"0.61515886",
"0.6150208",
"0.61229044",
"0.61229044",
"0.61229044",
"0.61229044",
"0.60744363",
"0.6008046",
"0.589419",
"0.58554494",
"0.58229727",
"0.5742462",
"0.5742462",
"0.57190317",
"0.56605464",
"0.5651115",
"0.5642204",
"0.5641644",
"0.56327355",
"0.563177",
"0.56306607",
"0.5606278",
"0.5606278",
"0.55975205",
"0.55911183",
"0.55828154",
"0.5558838",
"0.5556118",
"0.5544217",
"0.553443",
"0.5533117",
"0.55327135",
"0.55019337",
"0.5496503",
"0.54904085",
"0.54820526",
"0.5462034",
"0.5458342",
"0.5435881",
"0.5401533",
"0.5385857",
"0.5377779",
"0.53732616",
"0.5372986",
"0.5367082",
"0.5355974",
"0.53542215",
"0.53541803",
"0.53295386",
"0.5309546",
"0.52932304",
"0.529068",
"0.5284133",
"0.5279302",
"0.5266563",
"0.52635556",
"0.5256635",
"0.52547795",
"0.52484703",
"0.5235284",
"0.5227803",
"0.5223177",
"0.5218572",
"0.51868707",
"0.51809585",
"0.5180638",
"0.5178357",
"0.51780933",
"0.5174359",
"0.5172458",
"0.5166717",
"0.5165863",
"0.5161319",
"0.5158816",
"0.51549256",
"0.5150646",
"0.5130864",
"0.51308405",
"0.513017",
"0.51273483",
"0.5118427",
"0.5114291",
"0.5113038",
"0.5113038",
"0.5112684",
"0.51110274",
"0.51104265",
"0.51103467",
"0.5096974",
"0.5091851",
"0.5090042",
"0.50818497"
] | 0.6506147 | 1 |
Get the value of gateway_id | public function getGatewayId()
{
return $this->gateway_id;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getGatewayIdentifier() {\n\t\treturn $this->gatewayIdentifier;\n\t}",
"protected function getGatewayIdentifier() {\n\t\treturn $this->gatewayIdentifier;\n\t}",
"public function getGatewayKey ();",
"public function getGwId() {\n return $this->item->getGwId();\n }",
"function getGatewayID() {\n\t\treturn commsGateway::GW_APP_LOOP_BACK;\n\t}",
"protected function get_gateway() {\n\n\t\treturn $this->gateway;\n\t}",
"public function getGateway() {\n return $this->gateway;\n }",
"public function getGateway()\n {\n return $this->gateway;\n }",
"public function paymentId() : string;",
"function getGatewayAccountID() {\n\t\treturn commsGatewayAccount::GW_ACC_APP_LOOP_BACK;\n\t}",
"public function getCustomerGateway() \n {\n return $this->_fields['CustomerGateway']['FieldValue'];\n }",
"public function getRegistrantWrapperId() {\n $uuid = $this->registrant->uuid->first()->getValue();\n return $uuid['value'];\n }",
"public function getGatewayData()\n {\n return $this->gateway_data;\n }",
"public function getBillingProfileId();",
"public function get_gateway_device()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $file = new File(self::FILE_NETWORK);\n\n try {\n $device = $file->lookup_value('/^GATEWAYDEV=/');\n } catch (File_No_Match_Exception $e) {\n return 'eth0'; // Default to eth0\n } \n\n $device = preg_replace('/\\\"/', '', $device);\n\n return $device;\n }",
"public function getCode()\n {\n if (isset($this->data['response']['gatewayCode'])) {\n return $this->data['response']['gatewayCode'];\n }\n\n return null;\n }",
"public function getID()\n {\n return $this->billingId;\n }",
"private function getPaymentId()\n {\n return Session::get('mall.payment.id');\n }",
"public static function getGatewayListID(){\n $row = Gateway::where(array('Status'=>1))->lists('Title', 'GatewayID');\n if(!empty($row)){\n $row = array(\"\"=> \"Select a Gateway\")+$row;\n }\n return $row;\n }",
"function getRegistrationID()\n { \n return $this->getValueByFieldName('registration_id');\n }",
"public function getGateway() {\n\t\treturn self::$gateways[mt_rand(0, (self::$COUNT-1))];\n\t}",
"public function getId(){\n if(!$this->id){\n return $this->getShippingOptionId().'_'.md5($this->getShippingServiceName());\n }\n return $this->id;\n }",
"protected function getMerchantId()\r\n {\r\n return $this->processor_data['processor_params']['merchant_id'];\r\n }",
"public function getVpnGateway()\n {\n return isset($this->vpn_gateway) ? $this->vpn_gateway : '';\n }",
"function mdp_gateway($id){\n\t\tglobal $bdd;\n\n\t\t$req = $bdd->query(\"SELECT mdp FROM gateways WHERE id_gateway LIKE '$id'\");\n\n\t\twhile($results = $req->fetch()){\n\t\t\t$result = $results[\"mdp\"];\n\t\t}\n\n\t\treturn $result;\n\t}",
"public function getBillingAddressId();",
"public function getID()\n {\n return $this->banner_campaign_id;\n }",
"public function get_id();",
"public function get_id();",
"public function getPaymentId() \n {\n if (!$this->hasPaymentId()) \n {\n $this->paymentId = '';\n }\n\n return $this->paymentId;\n }",
"public function getSourceGatewayIp()\n {\n return $this->source_gateway_ip;\n }",
"public function getGatewayConfig() {\r\n return $this->gatewayConfig;\r\n }",
"public function getGalleryProfileId(): string {\n\t\treturn ($this->galleryId);\n\t}",
"function get_id() {\n\t\treturn $this->get_data( 'id' );\n\t}",
"public function getTargetVpnGateway()\n {\n return isset($this->target_vpn_gateway) ? $this->target_vpn_gateway : '';\n }",
"public function getPaymentid()\r\n {\r\n return $this->paymentid;\r\n }",
"public function getProxyBoxId()\n {\n $value = $this->get(self::PROXYBOXID);\n return $value === null ? (string)$value : $value;\n }",
"public static function gateway($key = '')\n {\n $payment_gateways = Cache::get(CACHE_PARAM_PAYMENT_GATEWAY, null);\n if (is_null($payment_gateways)) {\n $invoice_status = self::all();\n $payment_gateways = [];\n foreach ($invoice_status as $status) {\n $payment_gateways[strtoupper($status->name)] = $status->id;\n }\n Cache::put(CACHE_PARAM_PAYMENT_GATEWAY, $payment_gateways, 43200);\n }\n\n return empty($key) ? $payment_gateways : $payment_gateways[$key];\n }",
"public function getGid()\n {\n return $this->Gid;\n }",
"public function getMerchantId(): string\n {\n return $this->merchant_id;\n }",
"public function getPaymentMethodId();",
"static function getRegistrationKey(){\n return DB::select('SELECT value FROM admin_data WHERE name = \"registration-key\";')[0]->value;\n }",
"public function getGateway($gatewayId)\n {\n return $this->_GetGateway_operation->call(['GatewayId' => $gatewayId]);\n }",
"public function getMaconomyId(): string\n {\n return (string)$this->data['instancekeyField'];\n }",
"public function getGeoId()\n {\n return $this->geo_id;\n }",
"public function getGamerId()\n {\n $value = $this->get(self::GAMER_ID);\n return $value === null ? (integer)$value : $value;\n }",
"public function getLiveId() {}",
"public function getGid()\n {\n $value = $this->get(self::GID);\n return $value === null ? (integer)$value : $value;\n }",
"public function getStoreId(){\r\n\t\t$this->store_id = getValue(\"SELECT store_id FROM tbl_car_to_store WHERE car_id = \".$this->car_id.\" AND store_id!=0\");\r\n\t\treturn $this->store_id;\t\r\n\t}",
"public function getVpnGatewayInterface()\n {\n return isset($this->vpn_gateway_interface) ? $this->vpn_gateway_interface : 0;\n }",
"function get_id()\n {\n return $this->get_default_property(self :: PROPERTY_ID);\n }",
"public function getDestinationId() : string\n {\n return $this->getProperty()->destinationId;\n }",
"public function getShipmentId()\n {\n return $this->_fields['ShipmentId']['FieldValue'];\n }",
"public function getUserGcmRegId() {\n $stmt = $this->conn->prepare(\"SELECT gcm_registration_id FROM app_users\");\n // $stmt->bind_param(\"s\", $api_key);\n $stmt->execute();\n $user_gcm = $stmt->get_result();\n $stmt->close();\n return $user_gcm;\n }",
"function get_id() {\n return $this->get_mapped_property('id');\n }",
"public function getZohoAddressId();",
"public function getRemoteGatewayIp()\n {\n return $this->remote_gateway_ip;\n }",
"public function getPayId()\n {\n return $this->pay_id;\n }",
"public function getId()\n {\n return $this->proxyBase->id;\n }",
"public function getSourceGateway()\n {\n return $this->source_gateway;\n }",
"function get_id()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_ID);\r\n }",
"public function getPayerId() {\n\t\treturn $this->_getField(self::$PAYER_ID);\n\t}",
"public function getReceiverId();",
"public function getPaymentId()\n {\n return $this->paymentId;\n }",
"public function getRegisterId()\n {\n return (isset($this->segments()[3]) ? $this->segments()[3] : null);\n }",
"function getID() \n {\n return $this->getValueByFieldName( 'statevar_id' );\n }",
"public function link_id()\n {\n return $this->Link_ID;\n }",
"public static function id(){\n return self::info('id');\n }",
"public function getMediatorID();",
"function countryId( )\n {\n return $this->CountryID;\n }",
"public function getGatewayTitle()\n {\n return GatewayInfo::niceTitle($this->Gateway);\n }",
"public function getPaymentId()\n {\n return $this->_getValue('oepaypal_paymentid');\n }",
"public function gateway()\n {\n return $this->belongsTo('App\\Gateway', 'GATEWAY_ID' ,'GATEWAY_ID');\n }",
"public function obtenerId() {}",
"public function get_id() {\r\n\t\treturn ($this->id);\r\n\t}",
"public function get_id() {\r\n\t\treturn ($this->id);\r\n\t}",
"public function getPayerId(): ?string\n {\n return $this->{self::PAYER_ID};\n }",
"public function getMerchantId()\n {\n return $this->getParameter('merchantId');\n }",
"public function getUserAddressId()\n {\n return parent::getValue('user_address_id');\n }",
"public function getConnectionId();",
"public function getID();",
"public function getID();",
"public function getID();",
"public function gatewayIpAddr()\n {\n $datas = 'N.A';\n\n if(exec('ip route | awk \\'/a/ { print $3 }\\'',$output))\n $datas = $output[0];\n\n return $datas;\n }",
"private function getMerchantID()\n\t{\n\t\t$sandbox = $this->params->get('sandbox',0);\n\t\tif($sandbox) {\n\t\t\treturn $this->params->get('sandbox_merchant','');\n\t\t} else {\n\t\t\treturn $this->params->get('merchant','');\n\t\t}\n\t}",
"public static function getHolderID();",
"public function getid()\n {\n return $this->id;\n }",
"public function getid()\n {\n return $this->id;\n }",
"public function obtenerID();",
"public function getChargeId()\n {\n return $this->get(self::_CHARGE_ID);\n }",
"public function getNativeCountryId()\n {\n return $this->getXml()->getElementsByTagName('NativeCountryID')->item(0)->nodeValue;\n }",
"public function getId()\n {\n return $this->getValue('id');\n }",
"public function getDestinationId():int\r\n {\r\n return $this->destinationId ;\r\n }",
"function getID() {\n\t\treturn $this->data_array['id'];\n\t}",
"public function getId() {\n\t\treturn $this -> data['id'];\n\t}",
"public function getRemoteGateway()\n {\n return $this->remote_gateway;\n }",
"public function getBadgeValue()\n {\n return $this->auth->loggedIn() ? $this->auth->id() : null;\n }",
"protected function getID() {\n return $this->id;\n }",
"function getBridgeGateway() {\n return $this->bridgeGateway;\n }",
"public function getCountry_id()\n {\n return $this->country_id;\n }"
] | [
"0.76668173",
"0.76668173",
"0.6857284",
"0.6633344",
"0.66180843",
"0.6616044",
"0.6479276",
"0.6403749",
"0.6334142",
"0.6264326",
"0.6256725",
"0.6189527",
"0.6172127",
"0.61718786",
"0.6169241",
"0.6159494",
"0.61590904",
"0.61030996",
"0.6080583",
"0.6059491",
"0.6041302",
"0.60250163",
"0.5999054",
"0.59678185",
"0.59422165",
"0.5844166",
"0.58182454",
"0.58167845",
"0.58167845",
"0.5794542",
"0.579213",
"0.57663184",
"0.57575476",
"0.5750155",
"0.574506",
"0.5730997",
"0.5730687",
"0.57306504",
"0.57211256",
"0.5716392",
"0.57044214",
"0.5701585",
"0.56965953",
"0.56949896",
"0.56730837",
"0.56701744",
"0.56674063",
"0.5662007",
"0.5659706",
"0.5657232",
"0.5654455",
"0.5629646",
"0.56252265",
"0.562025",
"0.56140405",
"0.5612722",
"0.5607526",
"0.56073743",
"0.56066",
"0.56054205",
"0.5600985",
"0.5600778",
"0.55907464",
"0.5587586",
"0.5581943",
"0.557897",
"0.5565327",
"0.55554736",
"0.55532706",
"0.5549173",
"0.55445844",
"0.55362654",
"0.55357033",
"0.5528279",
"0.5526419",
"0.5526419",
"0.5524342",
"0.55168194",
"0.55150276",
"0.550535",
"0.5503449",
"0.5503449",
"0.5503449",
"0.55029243",
"0.55029047",
"0.5499449",
"0.5496934",
"0.5496934",
"0.5494019",
"0.5489144",
"0.54871225",
"0.54861456",
"0.5486055",
"0.54851484",
"0.5484094",
"0.5481612",
"0.54797417",
"0.54796064",
"0.54766446",
"0.54761547"
] | 0.8065019 | 0 |
Set the value of gateway_id | public function setGatewayId(int $gateway_id)
{
$this->gateway_id = $gateway_id;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function setGateway($gateway)\n {\n $this->gateway = $gateway;\n }",
"public function getGatewayId()\n {\n return $this->gateway_id;\n }",
"function set_gateway($gateway_slug, $args) {\n\n // Set payments gateway\n md_set_gateway($gateway_slug, $args);\n \n }",
"public function set_gateway( $gateway ) {\n\t\t$this->_gateway = $gateway;\n\n\t\t// Setup API key.\n\t\tStripeCheckout::setApiKey( $this->_gateway->get_secret_key() );\n\n\t\t// If we don't set this, Stripe will use latest version, which may break our implementation.\n\t\tStripeCheckout::setApiVersion( '2019-09-09' );\n\n\t\t// Setup plugin info.\n\t\tStripeCheckout::setAppInfo(\n\t\t\t'Membership 2 - Stripe Checkout',\n\t\t\tM2STRIPE_VERSION,\n\t\t\tsite_url()\n\t\t);\n\t}",
"public function setGateway(GatewayInterface $gateway) {\n $this->gateway = $gateway;\n }",
"public function UseGateway($gateway_id) {\n\t\t$this->Param('gateway_id', $gateway_id);\n\n\t\treturn true;\n\t}",
"public function UseGateway($gateway_id) {\n\t\t$this->Param('gateway_id', $gateway_id);\n\n\t\treturn true;\n\t}",
"public function setGateway(GatewayInterface $gateway)\n {\n }",
"protected function getGatewayIdentifier() {\n\t\treturn $this->gatewayIdentifier;\n\t}",
"protected function getGatewayIdentifier() {\n\t\treturn $this->gatewayIdentifier;\n\t}",
"public function setclient_id($value);",
"public function setGatewayVersion($version)\n {\n $this->_gatewayVersion = (int)$version;\n }",
"function setCountryId( $value )\n {\n $this->CountryID = $value;\n }",
"public function setCustomerGateway($value) \n {\n $this->_fields['CustomerGateway']['FieldValue'] = $value;\n return;\n }",
"function setGateway($gateway = NULL) {\n\t\t\t//set the gateway property\n\t\t\tif(isset($gateway)) {\n\t\t\t\t$this->gateway = $gateway;\n\t\t\t}\n\n\t\t\t//which one to load?\n\t\t\t$classname = \"PMProGateway\";\t//default test gateway\n\t\t\tif(!empty($this->gateway) && $this->gateway != \"free\") {\n\t\t\t\t$classname .= \"_\" . $this->gateway;\t//adding the gateway suffix\n\t\t\t}\n\n\t\t\tif(class_exists($classname) && isset($this->gateway)) {\n\t\t\t\t$this->Gateway = new $classname($this->gateway);\n\t\t\t} else {\n\t\t\t\t$this->Gateway = null;\t//null out any current gateway\n\t\t\t\t$error = new WP_Error(\"PMPro1001\", \"Could not locate the gateway class file with class name = \" . $classname . \".\");\n\t\t\t}\n\n\t\t\tif(!empty($this->Gateway)) {\n\t\t\t\treturn $this->Gateway;\n\t\t\t} else {\n\t\t\t\t//gateway wasn't setup\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"public function set_gateway_device($device)\n {\n clearos_profile(__METHOD__, __LINE__);\n\n // Validate\n //---------\n // TODO\n\n // Update tag if it exists\n //------------------------\n\n $file = new File(self::FILE_NETWORK);\n $match = $file->replace_lines('/^GATEWAYDEV=/', \"GATEWAYDEV=\\\"$device\\\"\\n\");\n\n // If tag does not exist, add it\n //------------------------------\n\n if (! $match)\n $file->add_lines(\"GATEWAYDEV=\\\"\" . $device . \"\\\"\\n\");\n }",
"function _set_id( $idGrupo ){\n \t\t$this->idGrupo = $idGrupo;\n }",
"public function edit(Gateway $gateway)\n {\n //\n }",
"public function setGatewayIP($value)\n {\n return $this->set('GatewayIP', $value);\n }",
"function setSiteId($value)\n {\n $this->_props['SiteId'] = $value;\n }",
"function SetId($value) { $this->id=$value; }",
"public function setID($value) {\r\n //if (!is_numeric($value)) die(\"setID() only accepts a numerical ID value\");\r\n $this->id = $value;\r\n }",
"public function setSettingsId($value)\n {\n $this->_settingsId = $value;\n }",
"function getGatewayID() {\n\t\treturn commsGateway::GW_APP_LOOP_BACK;\n\t}",
"function set_id( $id ){\n\t\t$this->id = $id;\n\t\t// this is add request. so number is 0\n\t\tif( $this->id == $this->id_base ){\n\t\t\t$this->number = 0;\n\t\t\t$this->is_new = true;\n\t\t}\n\t\t// parse number\n\t\telse{\n\t\t\t$this->number = str_replace($this->id_base.'-', '', $this->id);\n\n\t\t\t// load instance data\n\t\t\t$this->instance = jcf_field_settings_get( $this->id );\n\t\t\tif( !empty($this->instance) ){\n\t\t\t\t$this->slug = $this->instance['slug'];\n\t\t\t}\n\t\t}\n\t}",
"public function setRouteID($value) {\n\t\t$this->_route_id = $value;\n\t}",
"public function setGateway($gateway)\n {\n if ($this->Status == 'Created') {\n $this->setField('Gateway', $gateway);\n }\n return $this;\n }",
"public function setClientID($value)\r\n {\r\n $this->assertValidClientID($value, false);\r\n\r\n $this->clientID = $value;\r\n }",
"private function SetID($value)\n\t\t{\n\t\t\t$this->id = $value;\n\t\t}",
"public function updateGateway(Request $request)\n {\n //for audit logs\n $ip = $request->ip();\n $username = auth()->user();\n $host = $username->USERNAME;\n $module = 'Gateway Management';\n $instruction = 'Updated Gateway Details';\n $this->auditLogs($ip,$host,$module,$instruction);\n\n //Wulian Gateway\n\n $this->validate($request,\n ['GATEWAY_NAME'=>'unique:M005_GATEWAY|required']);\n if($request->KEY == 'gateway'){\n $gateway = Gateway::findOrFail($request->GATEWAY_ID);\n $gateway->FLOOR_ID = $request->FLOOR_ID ?\n $request->FLOOR_ID : $gateway->FLOOR_ID;\n $gateway->ROOM_ID = $request->ROOM_ID ?\n $request->ROOM_ID : $gateway->ROOM_ID;\n $gateway->REG_FLAG = $request->REG_FLAG ?\n $request->REG_FLAG : $gateway->REG_FLAG;\n $gateway->ONLINE_FLAG = $request->ONLINE_FLAG ?\n $request->ONLINE_FLAG : $gateway->ONLINE_FLAG;\n $gateway->GATEWAY_NAME = $request->GATEWAY_NAME ?\n $request->GATEWAY_NAME : $gateway->GATEWAY_NAME;\n $gateway->save();\n return response($gateway, 201);\n }else{\n $gateway = Gateway::findOrFail($request->GATEWAY_ID);\n\n $gateway->FLOOR_ID = $request->FLOOR_ID ?\n $request->FLOOR_ID : $gateway->FLOOR_ID;\n $gateway->GATEWAY_SERIAL_NO = $request->GATEWAY_SERIAL_NO ?\n $request->GATEWAY_SERIAL_NO : $gateway->GATEWAY_SERIAL_NO;\n $gateway->GATEWAY_NAME = $request->GATEWAY_NAME ?\n $request->GATEWAY_NAME : $gateway->GATEWAY_NAME;\n $gateway->GATEWAY_IP = $request->GATEWAY_IP ?\n $request->GATEWAY_IP : $gateway->GATEWAY_IP;\n $gateway->save();\n return response($gateway, 201);\n }\n }",
"public function set_id_pg($id=0){\n\t\t\t$id = (int) $id;\n\t\t\tif($id!=0){\n\t\t\t\t$this->ipg_id=$id;\n\t\t\t}else{\n\t\t\t\t$this->ipg_id=0;\n\t\t\t}\n\t\t}",
"public function setRequestorId(?string $value): void {\n $this->getBackingStore()->set('requestorId', $value);\n }",
"function setId($value) {\n $this->_id = intval($value);\n }",
"protected function _setId($value)\n\t{\n\t\tvar_dump($value);\n\t\tif (empty($value) || ($value < 0)) {\n\t\t\ttrigger_error('Invalid value used to set the member id', E_USER_ERROR);\n\t\t\treturn;\n\t\t}\n\t\telse {\n\t\t\t$this->_id = $value;\n\t\t\t$_SESSION['user_id']=$value;\n\t\t\t\n\n\t\t}\n\t}",
"function set_id($id) {\n\t\t$this->id = $id;\n\t}",
"public function set_id($setid){\n $this->id = $setid;\n }",
"public function setDoorId()\n {\n if(isset($_GET['doorId']))\n {\n echo 'const doorId = '.$_GET['doorId'].';';\n }\n else\n {\n $config = new Config;\n echo 'const doorId = '.$config->defaultDoor.';';\n }\n }",
"function set_id($id)\n {\n $this->id = $id;\n }",
"private function setID($id) {\r\n\t\t$this->id = $id;\r\n\t}",
"public function setMicrosoftTunnelSiteId(?string $value): void {\n $this->getBackingStore()->set('microsoftTunnelSiteId', $value);\n }",
"function set_region_id($link, $data, $value) // Colorize: green\n { // Colorize: green\n return set_property_value($link, $data, \"region_id\", $value); // Colorize: green\n }",
"public function setID($id) {\n $this->id = $id; \n }",
"public function setID($id){\n $this->id = $id;\n }",
"public function setMerchantId($value) {\n if(strlen($value) > 9 ){\n throw new ValueException(\"Value \".$value.\" is higher than 9\");\n }\n $this->MerchantID = $value;\n }",
"public function gateway()\n {\n return $this->belongsTo('App\\Gateway', 'GATEWAY_ID' ,'GATEWAY_ID');\n }",
"public function setSettingDefinitionId(?string $value): void {\n $this->getBackingStore()->set('settingDefinitionId', $value);\n }",
"public function set_id($id){\n $this->id = $id;\n }",
"private function setMerchantD()\n {\n $this->mid = config('gladepay.mid');\n }",
"public function setId(?string $value): void {\n $this->getBackingStore()->set('id', $value);\n }",
"public function setId(?string $value): void {\n $this->getBackingStore()->set('id', $value);\n }",
"public function setId(?string $value): void {\n $this->getBackingStore()->set('id', $value);\n }",
"public function setId(?string $value): void {\n $this->getBackingStore()->set('id', $value);\n }",
"function setDevId($value)\n {\n $this->_props['DevId'] = $value;\n }",
"public function setMaconomyId(string $key): void\n {\n $this->data['instancekeyField'] = $key;\n }",
"public function setID($_id) \n \t{\n \t\t$this->_id = $_id;\n \t}",
"public function smsGatewayCru(Request $request, $id=0)\n {\n //for save on POST request\n if ($request->isMethod('post')) {\n $this->validate($request, [\n 'gateway' => 'required|integer',\n 'name' => 'required|min:4|max:255',\n 'sender_id' => 'nullable',\n 'user' => 'required|max:255',\n 'password' => 'nullable|max:255',\n 'api_url' => 'required',\n ]);\n\n\n $data = [\n 'gateway' => $request->get('gateway',''),\n 'name' => $request->get('name',''),\n 'sender_id' => $request->get('sender_id',''),\n 'user' => $request->get('user',''),\n 'password' => $request->get('password',''),\n 'api_url' => $request->get('api_url',''),\n ];\n\n\n AppMeta::updateOrCreate(\n ['id' => $id],\n [\n 'meta_key' => 'sms_gateway',\n 'meta_value' => json_encode($data)\n ]\n );\n $msg = \"SMS Gateway \";\n $msg .= $id ? 'updated.' : 'added.';\n\n if($id){\n return redirect()->route('settings.sms_gateway.index')->with('success', $msg);\n }\n return redirect()->route('settings.sms_gateway.create')->with('success', $msg);\n }\n\n //for get request\n $gateways = AppHelper::SMS_GATEWAY_LIST;\n $gateway_id = null;\n $gateway = AppMeta::find($id);\n if($gateway) {\n $gateway_id = (json_decode($gateway->meta_value))->gateway;\n }\n\n return view('backend.settings.smsgateway_add', compact('gateways', 'gateway', 'gateway_id'));\n }",
"public function setID($id){\n $this->id=$id;\n }",
"public function set_idnumber($value) {\r\n $this->idnumber = $value;\r\n data::add(\"idnumber\", $this->idnumber == \"\" ? NODATA : input::santize($this->idnumber), $this->table_fields);\r\n }",
"public function setID($_id) \n\t{\n\t\t$this->_id = $_id;\n\t}",
"public function set_id( $id ) {\n\t\t\t$this->id = $id;\n\t\t}",
"function setId($id) {\r\n $this->_id = $id;\r\n }",
"public function delete_gateway($id = NULL) \n {\n $this->settings_model->_table_name = \"tbl_channel\"; // table name\n $this->settings_model->_primary_key = \"id\"; // $id\n $this->settings_model->delete($id); \n \n $type = \"success\";\n $message = \"频道信息成功删除!\";\n set_message($type, $message);\n redirect('admin/gateway/gateway');\n \n }",
"public function setID($id){\n $this->ID = $id;\n }",
"public function actionSetcapture($id)\n {\n if(Yii::$app->user->can('admin')) {\n\n $settings = State::find()->where(['param' => 'uid_capture'])->one();\n $settings[\"value\"] = $id;\n $settings->save();\n// var_dump($settings);\n// die();\n// $settings->value =\n\n return $this->redirect('profileview?id='.$id );\n }\n else\n throw new ForbiddenHttpException;\n }",
"public function setCallId(?string $value): void {\n $this->getBackingStore()->set('callId', $value);\n }",
"public function setProviderGateway(ProviderGatewayContract $providerGateway)\n {\n $this->providerGateway = $providerGateway;\n }",
"public function setShipmentId($value)\n {\n $this->_fields['ShipmentId']['FieldValue'] = $value;\n return $this;\n }",
"public function setTableGateway(\\Zend_Db_Table $_tableGateway)\n {\n $this->_tableGateway = $_tableGateway;\n }",
"public function setID($id);",
"function set_id($id)\r\n {\r\n $this->set_default_property(self :: PROPERTY_ID, $id);\r\n }",
"public function set_id( $id ) {\n\t\t$this->id = absint( $id );\n\t}",
"public function setData($key, $value)\n {\n $this->gateway_data[$key] = $value;\n\n return $this;\n }",
"public function resetId(){\r\n\t\t$this->clientId = null;\r\n\t}",
"public function setId($id) {\n $this->vendorData[\"ID_VENDOR\"] = (int)$id;\n }",
"public function setPublicIdAttribute($value)\n {\n do{\n \t $newPublicId = chr(rand(64, 90)) . chr(rand(64, 90)) . rand(10,99);\n $publicIdCount = count( $this->whereRaw(\"public_id = '{$newPublicId}'\")->get());\n }while($publicIdCount != 0);\n $this->attributes['public_id'] = $newPublicId;\n }",
"private function _processSingleGateway()\n {\n if($gateway = $this->gateway_library->get_first())\n {\n $this->session->set_userdata( 'gateway_id', $gateway->id );\n //now place order\n $order_id = $this->place_order();\n if($order_id > 0)\n {\n $this->set_step(0); //6\n redirect( NC_ROUTE.'/payment/order/'.$order_id);\n }\n }\n redirect( NC_ROUTE.'/cart/');\n }",
"public function setProcessId(?int $value): void {\n $this->getBackingStore()->set('processId', $value);\n }",
"private function set_id(int $id)\n {\n $this->_id = $id;\n }",
"public function setSenderShiftId(?string $value): void {\n $this->getBackingStore()->set('senderShiftId', $value);\n }",
"public function setStoreId($id);",
"public function setBillingAddressId($id);",
"public function setId($id){\n $this->_id = $id;\n }",
"public function setId($_id);",
"public function add_gateway($id = NULL) {\n $data['title'] = \"Add New Channel\";\n\n $this->settings_model->_table_name = \"tbl_gateway_type\"; //table name\n $this->settings_model->_order_by = \"id\";\n $data['typeinfo'] = $this->settings_model->get();\n\n if (!empty($id)) \n {\n // retrive data from db by id \n \n $this->settings_model->_table_name = \"tbl_channel\"; //table name\n $this->settings_model->_order_by = \"id\";\n $val = $this->settings_model->get_by(array('id' => $id), TRUE);\n\n if ($val) { // get general info by id\n $data['ginfo'] = $val; // assign value from db \n }\n $data['cinfo'] = $this->settings_model->get_gateway_info($id);\n\n }\n \n $data['subview'] = $this->load->view('admin/gateway/gatewayadd', $data, TRUE);\n $this->load->view('admin/_layout_main', $data);\n }",
"function setId($id) {\n\t\t$this->_id = $id;\n\t}",
"function getGatewayAccountID() {\n\t\treturn commsGatewayAccount::GW_ACC_APP_LOOP_BACK;\n\t}",
"public function setID($id) {\n\t\t$this->id = $id;\n\t}",
"public function setGamerId($value)\n {\n return $this->set(self::GAMER_ID, $value);\n }",
"public function setID($id)\n {\n $this->id = $id;\n }",
"function set_id($id)\n {\n $this->set_default_property(self :: PROPERTY_ID, $id);\n }",
"public function getGateway() {\n return $this->gateway;\n }",
"function add_shipping_id( $available_gateways ) {\n $shipping_id = get_shipping_id();\n\n echo '<div class=\"card--inline m-b-3 position-right position-right--50\">';\n if ( isset($shipping_id) && $shipping_id ) {\n echo '<p>Shipping ID: ' . $shipping_id . '</p>';\n } else {\n echo '<p>Please contact RANDYS to add a Shipper Account ID to your account.</p>';\n }\n echo '</div>';\n}",
"public function setPayloadId(?string $value): void {\n $this->getBackingStore()->set('payloadId', $value);\n }",
"function setId($id) {\n $this->id = $id;\n }",
"function setId($id) {\n $this->id = $id;\n }",
"public function setSettingID($value)\n {\n return $this->set('SettingID', $value);\n }",
"protected function set_session_id() {\n $this->sessionid = static::$sessionidmockup;\n }",
"public static function set($id)\n {\n self::$id = $id;\n }",
"function setId($value){\n\t\t//echo \"setting ID to \".$value;\n\t\t$this->_id=$value;\n\t\t//echo \"ID set to \".$this->_id;\n\t\treturn $this;\n\t}",
"public function setStoreId($store);"
] | [
"0.6873181",
"0.67794037",
"0.67016846",
"0.6544314",
"0.64879704",
"0.6280295",
"0.6280295",
"0.62127006",
"0.6119494",
"0.6119494",
"0.6116698",
"0.6049572",
"0.6026693",
"0.6012807",
"0.5953124",
"0.5882664",
"0.5670618",
"0.5637347",
"0.5619101",
"0.55943006",
"0.557632",
"0.55519307",
"0.55259997",
"0.549004",
"0.54422885",
"0.5434319",
"0.54320556",
"0.5419551",
"0.5409063",
"0.5396451",
"0.53885907",
"0.53818905",
"0.5347213",
"0.53385365",
"0.5329894",
"0.53226197",
"0.5315517",
"0.53131485",
"0.5311173",
"0.53100735",
"0.52848995",
"0.5262094",
"0.5240443",
"0.52334833",
"0.5229294",
"0.52277815",
"0.5225539",
"0.5211045",
"0.5207493",
"0.5207493",
"0.5207493",
"0.5207493",
"0.5201507",
"0.5201393",
"0.51940674",
"0.51687884",
"0.5163168",
"0.51625705",
"0.51565367",
"0.5140934",
"0.51260865",
"0.5124716",
"0.5119848",
"0.5117531",
"0.5117331",
"0.5107509",
"0.51068085",
"0.51064664",
"0.51059353",
"0.5104429",
"0.5102454",
"0.5093848",
"0.50899446",
"0.50859094",
"0.5083451",
"0.5080889",
"0.5072671",
"0.50724757",
"0.5065928",
"0.50622475",
"0.5056696",
"0.50547206",
"0.50517845",
"0.5051413",
"0.5048727",
"0.5048641",
"0.5048341",
"0.5047827",
"0.50434697",
"0.50403345",
"0.50310856",
"0.5030574",
"0.50179857",
"0.5016809",
"0.5016809",
"0.50157666",
"0.50115377",
"0.50071406",
"0.5005021",
"0.5003767"
] | 0.65765 | 3 |
Get the value of payment_methods | public function getPaymentMethods()
{
return $this->payment_methods;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getAvailablePaymentMethods ();",
"public function iN_PaymentMethods() {\n\t\t$query = mysqli_query($this->db, \"SELECT * FROM i_payment_methods WHERE payment_method_id = '1'\") or die(mysqli_error($this->db));\n\t\t$data = mysqli_fetch_array($query, MYSQLI_ASSOC);\n\t\treturn $data;\n\t}",
"public function getPaymentMethods() {\r\n\t\t//@TODO: Insert PaymentMethods into the datebase, create table\r\n\t\t$payment_methods = array();\r\n\t\t\t$payment_methods[0] = array('id' => 0, 'name' => 'AMEX');\r\n\t\t\t$payment_methods[1] = array('id' => 1, 'name' => 'Discover');\r\n\t\t\t$payment_methods[2] = array('id' => 2, 'name' => 'Mastercard');\r\n\t\t\t$payment_methods[3] = array('id' => 3, 'name' => 'Visa');\r\n\t\t\t$payment_methods[4] = array('id' => 4, 'name' => 'Store Credit');\r\n\t\t\t$payment_methods[5] = array('id' => 5, 'name' => 'Check');\r\n\t\t\t$payment_methods[6] = array('id' => 6, 'name' => 'Wire Transfer');\r\n\t\t\t$payment_methods[7] = array('id' => 7, 'name' => 'Trade');\r\n\t\t\t$payment_methods[9] = array('id' => 9, 'name' => 'Cash');\r\n\t\treturn $payment_methods; //array\r\n\t}",
"function paymentmethods() {\r\n $db = JFactory::getDBO();\r\n $query = \"SELECT id,payment_method,status FROM #__em_paymentmethod\";\r\n $db->setQuery($query);\r\n $result = $db->loadObjectList();\r\n return $result;\r\n }",
"abstract public function getPaymentMethod();",
"public function getPaymentMethodsForCod()\n {\n return $this->_toArrayObject($this->getConfig(\n 'packages/global_settings_payments-for-cod'));\n }",
"public function getPaymentOption() {\r\n $query = $this->db->get('v_combo_payment_method');\r\n \r\n if( $query->num_rows() > 0 ) {\r\n return $query->result();\r\n } else {\r\n return array();\r\n }\r\n }",
"public static function getPaymentMethods() {\n\n // return array(\n // self::PAYMENT_METHOD_PAY_PAL => 'Pay Pal',\n // self::PAYMENT_METHOD_MONEY_BOOKERS => 'Skrill',\n // self::PAYMENT_METHOD_WIRE_TRANSFER => 'Wiretransfer',\n // );\n\n $payment_methods = array();\n\n if(Option::getByName('payment_method_paypal')) \n $payment_methods[self::PAYMENT_METHOD_PAY_PAL] = 'Pay Pal';\n\n if(Option::getByName('payment_method_skrill')) \n $payment_methods[self::PAYMENT_METHOD_MONEY_BOOKERS] = 'Skrill';\n\n if(Option::getByName('payment_method_wiretransfer') && Option::getByName('wiretransfer_doc_path')) \n $payment_methods[self::PAYMENT_METHOD_WIRE_TRANSFER] = 'Wiretransfer';\n\n if(Option::getByName('payment_method_check')) \n $payment_methods[self::PAYMENT_METHOD_CHECK] = 'Check';\n\n if(Option::getByName('payment_method_no_payment')) \n $payment_methods[self::PAYMENT_METHOD_NO_PAYMENT] = 'No Payment';\n\n return $payment_methods;\n }",
"public function getPaymentMethod() \n {\n return $this->_fields['PaymentMethod']['FieldValue'];\n }",
"public static function payment_methods() {\n return array(\n CheckfrontModule::PaymentPayNow => 'Pay now',\n CheckfrontModule::PaymentPayLater => 'Pay later'\n );\n }",
"protected function getPaymentMethod(){\n return $this->method;\n }",
"public function getPaymentMethod()\n {\n return $this->response['result']['payment_type'];\n }",
"public static function listPaymentMethods()\n {\n return [\n [\n 'id' => self::PAYMENT_BY_CASH,\n 'name' => 'Tiền mặt',\n ],\n [\n 'id' => self::PAYMENT_BY_CONTRACT,\n 'name' => 'Hợp đồng',\n ],\n ];\n }",
"public function get_payment_methods() {\n\t\treturn $this->get_supported_payment_methods();\n\t}",
"public function getMethodOfPaymentAllowableValues()\n {\n $baseVals = [\n self::METHOD_OF_PAYMENT_PAID_BY_BUYER,\n self::METHOD_OF_PAYMENT_COLLECT_ON_DELIVERY,\n self::METHOD_OF_PAYMENT_DEFINED_BY_BUYER_AND_SELLER,\n self::METHOD_OF_PAYMENT_FOB_PORT_OF_CALL,\n self::METHOD_OF_PAYMENT_PREPAID_BY_SELLER,\n self::METHOD_OF_PAYMENT_PAID_BY_SELLER,\n ];\n\n // This is necessary because Amazon does not consistently capitalize their\n // enum values, so we do case-insensitive enum value validation in ObjectSerializer\n return array_map(function ($val) { return strtoupper($val); }, $baseVals);\n }",
"public function methods()\n {\n return collect(Paymentmethods::getList());\n }",
"public function getPaymentMethod(){\n return $this->_getData(self::PAYMENT_METHOD);\n }",
"public function get_payment_methods()\n\t{\n\t\t//retrieve all invoice\n\t\t$this->db->from('payment_method');\n\t\t$this->db->select('*');\n\t\t$this->db->order_by('payment_method_name');\n\t\t$query = $this->db->get();\n\t\t\n\t\treturn $query;\n\t}",
"public function getPaymentMethod()\n {\n $value = $this->get(self::payment_method);\n return $value === null ? (integer)$value : $value;\n }",
"public function getPaymentMethod()\n {\n return $this->payment_method;\n }",
"protected function _getPaymentMethodsHtml()\n {\n return $this->_getHtmlByHandle('checkout_onepage_paymentmethod');\n }",
"public function getPaymentMethods()\n {\n return $this->getValue('payment_method_categories');\n }",
"public function getPaymentMethodAllowableValues()\n {\n return [\n self::PAYMENT_METHOD_ACC,\n self::PAYMENT_METHOD_ALP,\n self::PAYMENT_METHOD_APL,\n self::PAYMENT_METHOD_AMX,\n self::PAYMENT_METHOD_AZP,\n self::PAYMENT_METHOD_BON,\n self::PAYMENT_METHOD_CFY,\n self::PAYMENT_METHOD_CSY,\n self::PAYMENT_METHOD_CUP,\n self::PAYMENT_METHOD_DIN,\n self::PAYMENT_METHOD_DII,\n self::PAYMENT_METHOD_DIB,\n self::PAYMENT_METHOD_DIS,\n self::PAYMENT_METHOD_DNK,\n self::PAYMENT_METHOD_ECA,\n self::PAYMENT_METHOD_ELV,\n self::PAYMENT_METHOD_EPS,\n self::PAYMENT_METHOD_ESY,\n self::PAYMENT_METHOD_INT,\n self::PAYMENT_METHOD_JCB,\n self::PAYMENT_METHOD_JEL,\n self::PAYMENT_METHOD_KLN,\n self::PAYMENT_METHOD_MAU,\n self::PAYMENT_METHOD_MDP,\n self::PAYMENT_METHOD_MFX,\n self::PAYMENT_METHOD_MPX,\n self::PAYMENT_METHOD_MYO,\n self::PAYMENT_METHOD_PAP,\n self::PAYMENT_METHOD_PAY,\n self::PAYMENT_METHOD_PEF,\n self::PAYMENT_METHOD_PFC,\n self::PAYMENT_METHOD_PSC,\n self::PAYMENT_METHOD_REK,\n self::PAYMENT_METHOD_SAM,\n self::PAYMENT_METHOD_SWB,\n self::PAYMENT_METHOD_SCX,\n self::PAYMENT_METHOD_SWP,\n self::PAYMENT_METHOD_TWI,\n self::PAYMENT_METHOD_UAP,\n self::PAYMENT_METHOD_VIS,\n self::PAYMENT_METHOD_WEC,\n ];\n }",
"public static function getPaymentMethods()\n {\n return [\n static::MAIL,\n static::DIRECT_DEPOSIT,\n ];\n }",
"abstract protected function getPaymentMethodCode();",
"public function getPaymentType(){\n return $this->payment_type;\n }",
"public function getPaymentMethod()\n {\n return $this->paymentMethod;\n }",
"public function getPaymentMethod()\n {\n return $this->paymentMethod;\n }",
"public function get_payment_methods()\n\t{\n\t\t//retrieve all orders\n\t\t$this->db->from('payment_method');\n\t\t$this->db->select('*');\n\t\t$this->db->order_by('payment_method_name');\n\t\t$query = $this->db->get();\n\t\t\n\t\treturn $query;\n\t}",
"private function getPaymentMethod(){\r\n\r\n $paymentMethod = 1;\r\n switch($this->medio_pago){\r\n case 'webpay': {\r\n $paymentMethod = 1;\r\n break;\r\n }\r\n case 'servipag': {\r\n $paymentMethod = 2;\r\n break;\r\n }\r\n case 'multicaja': {\r\n $paymentMethod = 3;\r\n break;\r\n }\r\n case 'onepay': {\r\n $paymentMethod = 5;\r\n break;\r\n }\r\n case 'flow': {\r\n $paymentMethod = 9;\r\n break;\r\n }\r\n case 'webpay3c': {\r\n $paymentMethod = 13;\r\n break;\r\n }\r\n case 'mach': {\r\n $paymentMethod = 15;\r\n break;\r\n }\r\n default : {\r\n $paymentMethod = 1;\r\n break;\r\n } \r\n }\r\n\r\n return $paymentMethod;\r\n }",
"public function getPaymentMethod() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn $this->paymentMethod;\r\n\t}",
"public function toOptionArray()\n {\n $methods = [];\n\n //default empty value\n $methods[] = [\"value\" => \"\", \"label\" => __(\"Accept all payment methods\")];\n $accessToken = $this->scopeConfig->getValue(\\MercadoPago\\Core\\Helper\\ConfigData::PATH_ACCESS_TOKEN, \\Magento\\Store\\Model\\ScopeInterface::SCOPE_WEBSITE, $this->_switcher->getWebsiteId());\n\n if (empty($accessToken)) {\n return $methods;\n }\n\n $this->coreHelper->log(\"GET /v1/payment_methods\", 'mercadopago');\n\n try {\n $response = \\MercadoPago\\Core\\Lib\\RestClient::get(\"/v1/payment_methods\", null, [\"Authorization: Bearer \" . $accessToken]);\n } catch (\\Exception $e) {\n $this->coreHelper->log(\"PaymentMethodsTicket:: An error occurred at the time of obtaining the ticket payment methods: \" . $e);\n return [];\n }\n\n if (isset($response['error']) || (isset($response['status']) && ($response['status'] != '200' && $response['status'] != '201'))) {\n return $methods;\n }\n\n $response = $response['response'];\n\n foreach ($response as $pm) {\n if (isset($pm['payment_type_id']) && $pm['payment_type_id'] == \"ticket\" || $pm['payment_type_id'] == \"atm\") {\n $methods[] = [\n 'value' => $pm['id'],\n 'label' => __($pm['name'])\n ];\n }\n }\n\n $this->coreHelper->log(\"PaymentMethodsTicket:: Displayed\", 'mercadopago', $methods);\n\n return $methods;\n }",
"public function whmcs_get_payment_methods($params = array()) {\n\t\t$params['action'] = 'GetPaymentMethods';\n\t\t// return Whmcs_base::send_request($params);\n $load = new Whmcs_base();\n return $load->send_request($params);\n\t}",
"function getRegisteredPaymentMethods()\n{\n\tglobal $registeredPaymentMethods;\t\n\n\tforeach ($registeredPaymentMethods as $paymentMethod => $className)\n\t{\n\t\t$pmObj = Service_PaymentMethodsFactory::getInstance($paymentMethod);\n\t\tif($pmObj->isUIEnabled() == 'y')\n\t\t{\n\t\t\t$paymentMethodkeyLabels[$paymentMethod] = $pmObj->getPaymentMethodLabel();\n\t\t}\n\t}\n\t\n\treturn $paymentMethodkeyLabels;\t\n}",
"public function getStatusPayment()\r\n {\r\n return $this->statusPayment;\r\n }",
"public function toOptionArray()\n\t{\n $payments = Mage::getModel('payment/config')->getActiveMethods();\n $methods = [];\n\n foreach ($payments as $paymentCode=>$paymentModel) \n {\n $paymentTitle = Mage::getStoreConfig('payment/'.$paymentCode.'/title');\n $methods[$paymentCode] = array(\n\n 'label' => $paymentTitle,\n 'value' => $paymentCode,\n );\n }\n return $methods;\n\t}",
"public function getPaymentMethods()\n {\n if (!isset($this->data['paymentProfiles']) || empty($this->data['paymentProfiles'])) {\n return null;\n }\n $paymentMethods = [];\n foreach ($this->data['paymentProfiles'] as $method) {\n $paymentMethods[$method['id']] = new PaymentMethod($method['id'], $method['visibleName']);\n }\n return collect($paymentMethods);\n }",
"public function getPaymentMethod()\n {\n \n //Fill POST fields array\n $ipPostFields = [\n 'InvoiceAmount' => session()->get('total_price'),\n 'CurrencyIso' => 'KWD'\n ];\n \n //Call endpoint\n $paymentMethods = $this->initiatePayment($this->apiURL, $this->apiKey, $ipPostFields);\n \n \n return view('site.payment.checkout', compact('paymentMethods')); // redirect to the pay method in the service classe with the paymentmedthod id\n \n \n }",
"public static function metaPayment($post = null)\n {\n $v = get_post_meta($post->ID, 'payment_methods', true);\n print_r($v);\n }",
"public function getMapPaymentTypes()\n {\n return $this->map_payment_types;\n }",
"public function getPaymentAction()\n {\n $builder = Shopware()->Models()->createQueryBuilder();\n $builder->select(['payment'])\n ->from('Shopware\\Models\\Payment\\Payment', 'payment');\n\n $paymentMethods = $builder->getQuery()->getArrayResult();\n\n $languageId = $this->getBackendLanguage();\n\n foreach ($paymentMethods as &$paymentMethod) {\n $paymentMethod = $this->translatePayment($paymentMethod, $languageId);\n }\n\n $total = count($paymentMethods);\n\n $this->view->assign(\n [\n 'data' => $paymentMethods,\n 'total' => $total,\n 'success' => true\n ]\n );\n }",
"public function getCardsPaymentMethods()\n {\n $payment_methods = Mage::getModel('mercadopago/core')->getPaymentMethods();\n $payment_methods_types = array(\"credit_card\", \"debit_card\", \"prepaid_card\");\n $types = array();\n\n //percorre todos os payments methods\n foreach ($payment_methods['response'] as $pm) {\n\n //filtra por payment_methods\n if (in_array($pm['payment_type_id'], $payment_methods_types)) {\n $types[] = $pm;\n }\n }\n\n return $types;\n }",
"public function getPaymentMethod()\n {\n // get pusat\n $pusatCode = m_company::where('c_type', 'PUSAT')->select('c_id')->first();\n $pusatCode = $pusatCode->c_id;\n\n $data = m_paymentmethod::where('pm_isactive', 'Y')\n ->whereHas('getAkun', function ($q) use ($pusatCode) {\n $q->where('ak_comp', $pusatCode);\n })\n ->with('getAkun')\n ->get();\n\n return response()->json([\n 'data' => $data\n ]);\n }",
"public function getPayments()\r\n {\r\n return $this->admin->sGetPaymentMeans();\r\n }",
"public function getPayment()\n {\n return $this->payment;\n }",
"public function getPayment()\n {\n return $this->payment;\n }",
"public function getPayment()\n {\n return $this->payment;\n }",
"public function getPaymenttype()\n {\n return $this->paymenttype;\n }",
"public function get_payment_method() {\n\t\treturn $this->payment->get_payment_method();\n\t}",
"public function getInstalledPaymentMethods() {\r\n\t\t// load internal names of installed payment methods\r\n\t\t$this->load->model('setting/extension');\r\n\t\t$paymentCodeList = $this->model_setting_extension->getInstalled('payment');\r\n\r\n\t\t// Get description name of payment methods.\r\n\t\t// It must implemented inline because there is no model method for it.\r\n\t\t// Based on implementation in method getList in class ControllerExtensionExtensionPayment\r\n\t\t$paymentMethods = [];\r\n\t\tforeach ($paymentCodeList as $paymentCode) {\r\n\t\t\t// check if main file of extension exists\r\n\t\t\t$mainFilePath = DIR_APPLICATION . 'controller/extension/payment/' . $paymentCode . '.php';\r\n\t\t\tif (!file_exists($mainFilePath)) {\r\n\t\t\t\tcontinue; // extension is registered as installed, but file is missing\r\n\t\t\t}\r\n\r\n\t\t\t// load description name of payment method from language file of extension\r\n\t\t\t$this->load->language('extension/payment/' . $paymentCode, 'extension');\r\n\t\t\t$extensionName = $this->language->get('extension')->get('heading_title');\r\n\r\n\t\t\t$paymentMethods[] = [\r\n\t\t\t\t'code' => $paymentCode,\r\n\t\t\t\t'name' => $extensionName\r\n\t\t\t];\r\n\t\t}\r\n\r\n\t\treturn $paymentMethods;\r\n\t}",
"public function getPaymentMethods()\n {\n $obj = new stdClass();\n\n // Must be in specific order for checksum --\n $obj->Timestamp = $this->getTimeStamp();\n $obj->SessionID = $this->getSessionID();\n $obj->PinCode = $this->getPinCode();\n $obj->UserAgent = $this->getUserAgent();\n // -----------------------------------------\n // Generate Checksum\n $obj->Checksum = $this->generateChecksum($obj);\n\n // Ask for GetPaymentMethods and get response\n $result = $this->client->GetPaymentMethods($obj);\n $result = $result->GetPaymentMethodsResult;\n $methods = isset($result->PaymentMethods->PaymentMethod) ? $result->PaymentMethods->PaymentMethod : null;\n\n $obj->Timestamp = $result->Timestamp;\n\n if (!is_null($methods)) {\n // Assign all properties of the PaymentMethods object as property of mainObject\n $obj = $this->parseForChecksum($obj, $methods);\n }\n\n // Unset properties for new Checksum\n unset($obj->Checksum);\n\n // Verify response data by making a new Checksum\n $CheckSum = $this->generateChecksum($obj);\n\n // Compare Checksums\n if ($result->Checksum != $CheckSum)\n throw new Exception('Data could not be verified');\n\n return (array) $methods;\n }",
"function testingPayment(){\n\t\treturn $this->getTestingPayment();\n\t}",
"public function getPaymentMethodType() {\r\r\n return $this->_paymentMethod;\r\r\n }",
"public static function getPaymentMethods($exclude_cash = false) {\n\t\treturn $exclude_cash ?\n\t\t\tArrayHelper::map(Parameter::find()->where(['domain'=>'payment'])->andWhere(['not', ['name' => Payment::CASH]])->orderBy('value_int')->asArray()->all(), 'name', 'value_text')\n\t\t\t:\n\t\t\tArrayHelper::map(Parameter::find()->where(['domain'=>'payment'])->orderBy('value_int')->asArray()->all(), 'name', 'value_text')\n\t\t\t;\n\t}",
"public function getPaymentMethodAllowableValues() : array\n {\n return [\n self::PAYMENT_METHOD_COD,\n self::PAYMENT_METHOD_CVS,\n self::PAYMENT_METHOD_OTHER,\n ];\n }",
"protected function getAllAvailableMethods()\n {\n /* TODO get all available payment methods from toolbox */\n }",
"public function testIsPaymentMethodGettable()\n {\n $response = [self::PAYMENT_METHOD_RESPONSE];\n\n $this->stubRequest(\n 'GET',\n '/payment_methods?customer_id=' . self::CUSTOMER_ID,\n [],\n [],\n $response\n );\n\n $result = DirectDebit::getPaymentMethodsByCustomerID(\n self::CUSTOMER_ID\n );\n\n $this->assertEquals($response, $result);\n }",
"function get_payment_status()\n {\n return $this->platnosci_post_vars['payment_status'];\n }",
"function get_payment_method($method = '')\n{\n global $db_prefix;\n $tmp = array();\n\n if (!$method) {\n $res = sql_query(\"SELECT * FROM \".$db_prefix.\"module WHERE mod_type='payment' AND mod_enabled = '1'\");\n while ($row = sql_fetch_array($res)) {\n // get fee\n $module_config = $summary = array();\n $payment_cmd = 'init';\n $payment_extra_fee = 0;\n $mod = $row['mod_id'];\n if (!file_exists('./module/'.$mod.'/window.php')) {\n msg_die(sprintf($lang['msg']['internal_error'], 'Payment module '.$method.' not found.'));\n }\n require('./module/'.$mod.'/window.php');\n $tmp[$row['mod_id']]['method'] = $row['mod_id'];\n $tmp[$row['mod_id']]['name'] = $row['mod_name'];\n $tmp[$row['mod_id']]['fee'] = $payment_extra_fee;\n }\n\n return $tmp;\n } else {\n $payment_cmd = 'init';\n $payment_extra_fee = 0;\n $row = sql_qquery(\"SELECT * FROM \".$db_prefix.\"module WHERE mod_id='$method' AND mod_type='payment' AND mod_enabled = '1'\");\n if (!$row) {\n return false;\n }\n $mod = $row['mod_id'];\n if (!file_exists('./module/'.$mod.'/window.php')) {\n msg_die(sprintf($lang['msg']['internal_error'], 'Payment module '.$method.' not found.'));\n }\n require('./module/'.$mod.'/window.php');\n return (array('method' => $row['mod_id'], 'name' => $row['mod_name'], 'fee' => $payment_extra_fee));\n }\n}",
"public function getAllPaymentMethods($asArray = false) {\r\n $jsonMethods = array();\r\n $methods = array();\r\n $model = new Mage_Checkout_Block_Onepage_Payment_Methods();\r\n $quote = Mage::getSingleton('checkout/cart')->getQuote();\r\n try {\r\n $selectedPaymentMethod = $quote->getPayment()->getData('method');\r\n } catch (Exception $e) {\r\n $this->logException($e, 'Get payment method');\r\n $this->_JSONencodeAndRespond(array(\"title\" => \"Error\", \"content\" => $e->getMessage()));\r\n return;\r\n }\r\n foreach ($model->getMethods() as $method) {\r\n $methodTitle = $method->getTitle();\r\n $methodCode = $method->getCode();\r\n if ($methodCode == \"paypal_express\") { // PayPal. Has logo and strange label text, override\r\n $methodTitle = \"PayPal\";\r\n }\r\n\r\n //eLabelz specific fix\r\n if ($methodCode == 'msp_cashondelivery') {\r\n $methodTitle .= \" – \" . Mage::helper('core')->currency($quote->getMspCashondeliveryInclTax(), true, false);\r\n }\r\n\r\n $m = array(\r\n 'type' => 'option',\r\n 'title' => $methodTitle,\r\n 'code' => $methodCode,\r\n 'price' => $this->getPaymentMethodPrice($methodCode),\r\n // Payment fee (price) is not available for standard payment methods, for extensions this need to be individualy coded\r\n 'image' => null,\r\n 'options' => $this->_getSuboptionsForPaymentMethod($methodCode),\r\n );\r\n $methods[] = $m;\r\n }\r\n if ($asArray)\r\n return $methods;\r\n $jsonMethods['payment_methods'] = $methods;\r\n\r\n return $jsonMethods;\r\n }",
"public static function getPaymentTypes()\n\t{\n\t\t$types = array('' => 'Any');\n\t\treturn array_merge($types, PaymentMethod::getPaymentMethods());\n\t}",
"public static function getPaymentTypes(){\n return array(self::IGFC=> PaymentUtils::getLabelText('PAYMENT_TYPE_IGFS'),self::CMPT1 => PaymentUtils::getLabelText('PAYMENT_TYPE_CMPT'));\n }",
"public function getAutocreateAllowedPaymentMethods()\n {\n $path = 'intraship/autocreate/autocreate_allowed-payments';\n $methodCodes = Mage::getStoreConfig($path);\n if (null === $methodCodes) {\n $methodCodes = '';\n }\n return $methodCodes;\n }",
"public function getPayMethodAllowableValues()\n {\n return [\n self::PAY_METHOD_BANK_TRANSFER,\nself::PAY_METHOD_CHEQUE,\nself::PAY_METHOD_CREDIT_CARD,\nself::PAY_METHOD_GIRO_ACH,\nself::PAY_METHOD_OTHER, ];\n }",
"public function getCKPaymentValue(){ \n $query = \"SELECT * FROM tbl_payment WHERE id ='2'\"; // id = 2 for Check Payment\n $result = $this->db->select($query);\n return $result;\n }",
"public function getPaymentMethodType()\n {\n return $this->getInfo()->getAdditionalInformation('payment_method');\n }",
"static function getPayMethodsOptions($type = 0)\n\t{\n\t\tglobal $ilDB, $lng;\n\t\t\n\t\t$res = $ilDB->query('SELECT * FROM payment_paymethods WHERE pm_enabled = 1');\n\t\t$options = array();\n\t\t\n\t\t//this is only for additional entries in SelectInputGUIs\n\t\tswitch($type)\n\t\t{\n\t\t\tcase 'all':\t\n\t\t\t\t$options['all'] = $lng->txt('pay_all');\n\t\t\t\tbreak;\n\t\t\tcase 'not_specified': \t\n\t\t\t\t$options[0] = $lng->txt('paya_pay_method_not_specified');\n\t\t\t\tbreak;\n\t\t\t//default: break;\n\t\t}\n\t\t\n\t\twhile($row = $ilDB->fetchAssoc($res))\n\t\t{\n\t\t\t$options[$row['pm_id']] = ilPayMethods::getStringByPaymethod($row['pm_title']);\n\t\t}\t\t\n\t\n\t\treturn $options;\n\t}",
"public function getActiveMethods(){\n\n $activeCarriers = $this->shipmentConfig->getActiveCarriers();\n $methods = array();\n\n foreach($activeCarriers as $carrierCode => $carrierModel)\n {\n $carrierTitle =$this->scopeConfig->getValue('carriers/'.$carrierCode.'/title');\n\n if( $carrierMethods = $carrierModel->getAllowedMethods() )\n {\n foreach ($carrierMethods as $methodCode => $method)\n {\n $code= $carrierCode.'_'.$methodCode;\n $methods[]=array(\n 'label'=>$carrierTitle,\n 'value'=>$code\n );\n }\n }\n }\n\n return $methods; \n }",
"public function getPaymentAmountType()\n {\n return $this->_fields['PaymentAmountType']['FieldValue'];\n }",
"public function getPaymentMethodAllowableValues()\n {\n return [\n self::PAYMENT_METHOD_COD,\n self::PAYMENT_METHOD_CVS,\n self::PAYMENT_METHOD_OTHER,\n ];\n }",
"function getSignupEnabledPaymentMethods()\n{\n\tglobal $registeredPaymentMethods;\n\t\n\tforeach ($registeredPaymentMethods as $paymentMethod => $className)\n\t{\n\t\t$pmObj = Service_PaymentMethodsFactory::getInstance($paymentMethod);\n\t\tif($pmObj->isSignupEnabled()== 'y')\n\t\t{\n\t\t\t$paymentMethodkeyLabels[$paymentMethod] = $pmObj->getPaymentMethodLabel();\n\t\t}\n\t}\n\t\n\treturn $paymentMethodkeyLabels;\n}",
"private function _getPaymentMethod ()\n\t{\n\t\t$id = craft()->config->get('paymentMethodId', 'commercepaybear');\n\t\treturn craft()->commerce_paymentMethods->getPaymentMethodById($id);\n\t}",
"public function getMicroPaymentPayabale()\r\n {\r\n /**\r\n * if\r\n */\r\n }",
"public function payment_fields() {\n \n\t\t\n \n\t\t}",
"public function getPaymentplans() {\n return $this->paymentPlans;\n }",
"public static function get_enabled_payment_times(){\n\t\t$enabled_payment_times = [];\n\t\t$enabled_payment_methods = self::get_enabled_payment_methods();\n foreach($enabled_payment_methods as $method_code => $payment_method){\n $enabled_payment_times[$payment_method['time_type']][$method_code] = $payment_method;\n }\n\t return $enabled_payment_times;\n\t}",
"function get_organizer_payment_methods($organizer = NULL){\n\t\t$query = \"SELECT distinct(payment_key),payment_method_name\";\n\t\t$query .= \" FROM \" . $this->config->item('ems_organizer_payment_settings','dbtables');\n\t\t$query .= \" WHERE organizer_id = $organizer AND status = 1\";\n\n\t\t$res = $this->db->query($query);\n\t\t$resArr = $res->result_array();\n\n\t\tif(!empty($resArr)){\n\t\t\treturn $resArr;\n\t\t}else{\n\t\t\t$data = array();\n\t\t\treturn $data;\n\t\t}\n\t}",
"public function getShippingMethods();",
"public function getPaymentDescription();",
"protected function getNetsPaymentTypes() {\n return unserialize(NETS_PAYMENT_TYPES);\n }",
"private function getPayum()\n {\n return $this->get('payum');\n }",
"public function getPaymentTerms()\n {\n return $this->paymentTerms;\n }",
"public function getPaymentTerms()\n {\n return $this->paymentTerms;\n }",
"public function hookDisplayPaymentEU()\n {\n if (!Currency::exists('EUR', 0)) {\n return null;\n }\n\n try {\n $methods = $this->api->methods->all();\n } catch (Mollie_API_Exception $e) {\n if (Configuration::get(Mollie::MOLLIE_DEBUG_LOG) == Mollie::DEBUG_LOG_ERRORS) {\n Logger::addLog(__METHOD__.' said: '.$e->getMessage(), Mollie::ERROR);\n }\n\n return null;\n }\n\n $paymentOptions = array();\n foreach ($methods as $method) {\n $paymentOptions[] = array(\n 'cta_text' => $this->lang[$method->description],\n 'logo' => $method->image->normal,\n 'action' => $this->context->link->getModuleLink(\n 'mollie', 'payment',\n array('method' => $method->id), true\n ),\n );\n }\n\n return $paymentOptions;\n }",
"function getAutoEnabledPaymentMethods()\n{\n\tglobal $registeredPaymentMethods;\t\n\t\n\t$autoEnabledPaymentMethod = array();\n\t\n\tforeach ($registeredPaymentMethods as $paymentMethod => $className)\n\t{\n\t\t$pmObj = Service_PaymentMethodsFactory::getInstance($paymentMethod);\n\t\tif($pmObj->isAutoEnabledPaymentMethod() == \"y\" )\n\t\t{\n\t\t\tarray_push($autoEnabledPaymentMethod,$paymentMethod);\n\t\t}\n\t\t\n\t}\n\t\n\treturn $autoEnabledPaymentMethod;\n\t\n}",
"abstract public function getPaymentDrivers();",
"public function getSupportedPaymentTypes()\n {\n return [PaymentMethod::PAYPAL];\n }",
"function get_payment_status()\n {\n return $this->paypal_post_vars['payment_status'];\n }",
"function aegean_epay_admin_get_payment_options() {\n $return = array();\n $options = aegean_epay_load_payment_options();\n foreach ($options as $option) {\n $return[] = implode('|', $option);\n }\n\n return implode(\"\\n\", $return);\n}",
"public function getPaymentTypeAllowableValues()\n {\n return [\n self::PAYMENT_TYPE_CARD,\n self::PAYMENT_TYPE_MPO,\n self::PAYMENT_TYPE_MOBILEPAY,\n self::PAYMENT_TYPE_VIPPS,\n self::PAYMENT_TYPE_VIPPS_RECURRING,\n self::PAYMENT_TYPE_SWISH,\n self::PAYMENT_TYPE_VIABILL,\n self::PAYMENT_TYPE_ANYDAY,\n self::PAYMENT_TYPE_MANUAL,\n self::PAYMENT_TYPE_APPLEPAY,\n self::PAYMENT_TYPE_GOOGLEPAY,\n self::PAYMENT_TYPE_PAYPAL,\n self::PAYMENT_TYPE_KLARNA_PAY_NOW,\n self::PAYMENT_TYPE_KLARNA_PAY_LATER,\n self::PAYMENT_TYPE_KLARNA_SLICE_IT,\n self::PAYMENT_TYPE_KLARNA_DIRECT_BANK_TRANSFER,\n self::PAYMENT_TYPE_KLARNA_DIRECT_DEBIT,\n self::PAYMENT_TYPE_RESURS,\n self::PAYMENT_TYPE_MOBILEPAY_SUBSCRIPTIONS,\n self::PAYMENT_TYPE_EMV_TOKEN,\n self::PAYMENT_TYPE_BCMC,\n self::PAYMENT_TYPE_BLIK,\n self::PAYMENT_TYPE_PP_BLIK_OC,\n self::PAYMENT_TYPE_GIROPAY,\n self::PAYMENT_TYPE_IDEAL,\n self::PAYMENT_TYPE_P24,\n self::PAYMENT_TYPE_SEPA,\n self::PAYMENT_TYPE_VERKKOPANKKI,\n ];\n }",
"public function getPaymentMethods(Request $request){\n error_log(\"Request for getPaymentMethods $request\");\n\n $params = array(\n \"merchantAccount\" => env('MERCHANT_ACCOUNT'),\n \"channel\" => \"Web\"\n );\n\n $response = $this->checkout->paymentMethods($params);\n\n return $response;\n }",
"public function getPaymentMethod()\n {\n return $this->user->getDefaultPaymentMethod();\n }",
"function getCronEnabledPaymentMethods()\n{\n\t$registeredPaymentMethods = getRegisteredPaymentMethods();\n\t\n\t$cronEnabledPaymentMethod = array();\n\t\n\tforeach ($registeredPaymentMethods as $paymentMethod => $className)\n\t{\n\t\t$pmObj = Service_PaymentMethodsFactory::getInstance($paymentMethod);\n\t\tif($pmObj->isAutoChargeEnabledPaymentMethod() == \"y\")\n\t\t{\n\t\t\tarray_push($cronEnabledPaymentMethod,$paymentMethod);\n\t\t}\n\t\t\n\t}\n\t\n\t$autoChargePaymentMethod = implode(\",\", $cronEnabledPaymentMethod);\n\t\n\treturn $autoChargePaymentMethod;\n}",
"public function getPayments()\n {\n return $this->payments;\n }",
"public function get_supported_payment_methods() {\n\t\treturn array(\n\t\t\tPronamic_WP_Pay_PaymentMethods::BANCONTACT,\n\t\t\tPronamic_WP_Pay_PaymentMethods::BANK_TRANSFER,\n\t\t\tPronamic_WP_Pay_PaymentMethods::CREDIT_CARD,\n\t\t\tPronamic_WP_Pay_PaymentMethods::IDEAL,\n\t\t\tPronamic_WP_Pay_PaymentMethods::SOFORT,\n\t\t);\n\t}",
"public function payment_method_details(){\n\t\t\t\n\t\t\t$this->input->post(NULL, TRUE); // returns all POST items with XSS filter\n\t\t\t\n\t\t\t//escaping the post values\n\t\t\t$pid = html_escape($this->input->post('id'));\n\t\t\t$id = preg_replace('#[^0-9]#i', '', $pid); // filter everything but numbers\n\t\t\t\n\t\t\t$detail = $this->db->select('*')->from('payment_methods')->where('id',$id)->get()->row();\n\t\t\t\n\t\t\tif($detail){\n\n\t\t\t\t\t$data['id'] = $detail->id;\n\t\t\t\t\t\n\t\t\t\t\t$data['headerTitle'] = $detail->method_name;\t\t\t\n\n\t\t\t\t\t$data['method_name'] = $detail->method_name;\n\t\t\t\t\t\n\t\t\t\t\t$select_payment_methods = '<select name=\"payment_methods\" id=\"payment_methods\" class=\"form-control\">';\n\t\t\t\t\t\n\t\t\t\t\t$this->db->from('payment_methods');\n\t\t\t\t\t$this->db->order_by('id');\n\t\t\t\t\t$result = $this->db->get();\n\t\t\t\t\tif($result->num_rows() > 0) {\n\t\t\t\t\t\tforeach($result->result_array() as $row){\n\t\t\t\t\t\t\t$default = ($row['method_name'] == $detail->method_name)?'selected':'';\n\t\t\t\t\t\t\t$select_payment_methods .= '<option value=\"'.$row['method_name'].'\" '.$default.'>'.$row['method_name'].'</option>';\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$select_payment_methods .= '</select>';\n\t\t\t\t\t\n\t\t\t\t\t$data['select_payment_methods'] = $select_payment_methods;\n\t\t\t\t\t\n\t\t\t\t\t$data['model'] = 'payment_methods';\n\t\t\t\t\t$data['success'] = true;\n\t\t\t\t\t\n\t\t\t}else {\n\t\t\t\t$data['success'] = false;\n\t\t\t}\n\t\t\t\n\t\t\techo json_encode($data);\n\t\t\t\n\t\t}",
"public static function PaymentOptionList()\n {\n \t\n \treturn array(\n \t 'cod'=>t(\"Cash On delivery\"),\n \t 'ocr'=>t(\"Offline Credit Card Payment\"),\n \t 'pyr'=>t(\"Pay On Delivery\"),\n \t 'pyp'=>t(\"paypal\"),\n \t 'stp'=>t(\"stripe\"),\n \t 'mcd'=>t(\"mercapado\"),\n \t 'ide'=>t(\"sisow\"),\n \t 'payu'=>t(\"payumoney\"),\n \t 'pys'=>t(\"paysera\"), \t \n \t 'bcy'=>t(\"Barclay\"),\n \t 'epy'=>t(\"EpayBg\"),\n \t 'atz'=>t(\"Authorize.net\"),\n \t 'obd'=>t(\"Offline Bank Deposit\"),\n \t 'btr' =>t(\"Braintree\")\n \t);\n }",
"private function getPaymentInfo()\n {\n $baseUrl = 'http://embeddables.eastus2.cloudapp.azure.com/payment/';\n\n return json_decode(\n file_get_contents(\n $baseUrl . 'payment.json'\n )\n );\n }",
"protected function getPayment()\n {\n return $this->getOrder()->getPayment();\n }",
"public function getPaymentMethodAllowableValues()\n {\n return [\n self::PAYMENT_METHOD_NONE,\n self::PAYMENT_METHOD_DOMESTIC_BANK_TRANSFER,\n self::PAYMENT_METHOD_ABROAD_BANK_TRANSFER,\n self::PAYMENT_METHOD_ACCOUNT_TRANSFER,\n self::PAYMENT_METHOD_CREDIT_CARD,\n ];\n }"
] | [
"0.76866084",
"0.7319511",
"0.72661173",
"0.7221665",
"0.695435",
"0.6938",
"0.69353247",
"0.69261116",
"0.6920887",
"0.68708",
"0.68012893",
"0.6790588",
"0.67754084",
"0.6710001",
"0.66888267",
"0.66288024",
"0.66189337",
"0.66116416",
"0.66103154",
"0.65877295",
"0.65870166",
"0.6585541",
"0.65690565",
"0.6542346",
"0.6524655",
"0.6498638",
"0.64844596",
"0.64844596",
"0.64720947",
"0.646729",
"0.6461737",
"0.6429643",
"0.64133763",
"0.63499254",
"0.6318908",
"0.63102156",
"0.6294753",
"0.6263013",
"0.62540907",
"0.6240144",
"0.6237717",
"0.6225935",
"0.62151796",
"0.62016964",
"0.6160324",
"0.6160324",
"0.6160324",
"0.6149253",
"0.61310923",
"0.6126437",
"0.6117867",
"0.6104463",
"0.6088838",
"0.6086233",
"0.60781926",
"0.6076777",
"0.60740185",
"0.6044593",
"0.6034155",
"0.60154074",
"0.60149986",
"0.60049754",
"0.6003281",
"0.5993217",
"0.59910506",
"0.5989891",
"0.59816545",
"0.59807026",
"0.59745944",
"0.59643584",
"0.5963931",
"0.5945562",
"0.5923635",
"0.5911699",
"0.5909771",
"0.5897438",
"0.58970904",
"0.58847296",
"0.5856387",
"0.58557075",
"0.5853431",
"0.58534116",
"0.58534116",
"0.58505464",
"0.58480936",
"0.583826",
"0.58342427",
"0.582397",
"0.58233356",
"0.5823206",
"0.58153784",
"0.5813465",
"0.5809711",
"0.58038896",
"0.5801267",
"0.5799417",
"0.5794403",
"0.5791443",
"0.5780097",
"0.5776729"
] | 0.73413765 | 1 |
Set the value of payment_methods | public function setPaymentMethods(array $payment_methods)
{
$this->payment_methods = $payment_methods;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setPaymentMethod($value) \n {\n $this->_fields['PaymentMethod']['FieldValue'] = $value;\n return $this;\n }",
"public function setPaymentMethod($value)\n {\n return $this->set(self::payment_method, $value);\n }",
"function updatePaymentMethodOptions() {\n try {\n $payments_table = TABLE_PREFIX . 'payments';\n\n if (!in_array('method', $this->listTableFields($payments_table))) {\n DB::execute(\"ALTER TABLE $payments_table ADD method VARCHAR(100) DEFAULT '' AFTER comment\");\n } // if\n\n DB::execute('INSERT INTO ' . TABLE_PREFIX . \"config_options (name, module, value) VALUES ('payment_methods_common', 'payments', ?)\", serialize(array('Bank Deposit','Check','Cash','Credit','Debit')));\n DB::execute('INSERT INTO ' . TABLE_PREFIX . \"config_options (name, module, value) VALUES ('payment_methods_credit_card', 'payments', ?)\", serialize(array('Credit Card','Credit Card (Visa)','Credit Card (Mastercard)','Credit Card (Discover)','Credit Card (American Express)','Credit Card (Diners)')));\n DB::execute('INSERT INTO ' . TABLE_PREFIX . \"config_options (name, module, value) VALUES ('payment_methods_online', 'payments', ?)\", serialize(array('Online Payment', 'Online Payment (PayPal)', 'Online Payment (Authorize)')));\n\n } catch(Exception $e) {\n return $e->getMessage();\n } // try\n\n return true;\n }",
"public function setPayments($payments)\n {\n $this->payments = $payments;\n }",
"public function setPayment($value) {\n $this->payment = $value;\n }",
"public function setPaymentMethod($paymentMethod = 'CC') {\n $method = array(\n 'x_method'=>strtoupper($paymentMethod),\n );\n $this->NVP = array_merge($this->NVP, $method); \n }",
"private function registerPaymentMethods()\n {\n $pPosition = 0;\n foreach ($this->paymentMethods as $pValue => $pSub) {\n if ($this->isAboveShopwareVersion52()) {\n $action = 'payment_processor_csrf/process';\n } else {\n $action = 'payment_processor/process';\n }\n $this->createPayment(array(\n 'name' => $pValue,\n 'description' => $pSub['description'],\n 'action' => $action,\n 'active' => 0,\n 'position' => $pPosition,\n 'additionalDescription' => ''\n ));\n $pPosition++;\n }\n }",
"public function setMethods($methods)\n {\n $this->methods = $methods;\n }",
"public function setMethods($methods) {\n $this->methods = is_array($methods) ? $methods : array($methods);\n }",
"public function setPayment($payment);",
"public function setPaymentMethod($method)\n {\n $this->_data['MediosPago'] = $method;\n }",
"public function getAvailablePaymentMethods ();",
"public function setPaymentFields($fields)\n\t{\n\t\t$array = (array)$fields;\n\t\tforeach ($array as $key => $value) {\n\t\t\t$this->setPaymentField($key, $value);\n\t\t}\n\t}",
"public function setShippingMethods($methods)\n {\n $addresses = $this->getQuote()->getAllShippingAddresses();\n foreach ($addresses as $address) {\n if (isset($methods[$address->getId()])) {\n $address->setShippingMethod($methods[$address->getId()]);\n } elseif (!$address->getShippingMethod()) {\n Mage::throwException(Mage::helper('checkout')->__('Please select shipping methods for all addresses'));\n }\n }\n $this->save();\n return $this;\n }",
"public function initPaymentMethod()\n {\n $helper = Mage::helper('onestepcheckout/payment');\n // check if payment saved to quote\n if (!$this->getQuote()->getPayment()->getMethod()) {\n $data = array();\n $paymentMethods = $helper->getPaymentMethods();\n if ((count($paymentMethods) == 1)) {\n $currentPaymentMethod = current($paymentMethods);\n $data['method'] = $currentPaymentMethod->getCode();\n } elseif ($lastPaymentMethod = $helper->getLastPaymentMethod()) {\n $data['method'] = $lastPaymentMethod;\n } elseif ($defaultPaymentMethod = Mage::helper('onestepcheckout/config')->getDefaultPaymentMethod()) {\n $data['method'] = $defaultPaymentMethod;\n }\n if (!empty($data)) {\n try {\n $this->getOnepage()->savePayment($data);\n } catch (Exception $e) {\n // catch this exception\n }\n }\n }\n }",
"public function setPaymentMethodFilter($list)\n {\n if (is_string($list)) {\n //if single string, set as filter\n $this->resetPaymentMethodFilter();\n $this->options['PaymentMethod.1'] = $list;\n } else if (is_array($list)) {\n //if array of strings, set all filters\n $this->resetPaymentMethodFilter();\n $i = 1;\n foreach ($list as $x) {\n $this->options['PaymentMethod.' . $i++] = $x;\n }\n } else {\n return false;\n }\n }",
"public function setAllowedMethods(int $methods): void {}",
"public function setPaymentIds(?array $paymentIds): void\n {\n $this->paymentIds['value'] = $paymentIds;\n }",
"public function getPaymentMethods()\n {\n return $this->payment_methods;\n }",
"public function setAuthMethods(?array $value): void {\n $this->getBackingStore()->set('authMethods', $value);\n }",
"public static function payment_methods() {\n return array(\n CheckfrontModule::PaymentPayNow => 'Pay now',\n CheckfrontModule::PaymentPayLater => 'Pay later'\n );\n }",
"public function set_payment_method($id = null) {\n\t\tif ($id) {\n\t\t\ttry {\n\t\t\t\tif ($this->{$this->modelClass}->setPaymentMethod($id)) {\n\t\t\t\t\t$this->notice(__d('shop', 'Payment method has been changed'), array(\n\t\t\t\t\t\t'redirect' => true\n\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t} catch (Exception $e) {\n\t\t\t\t$this->notice($e);\n\t\t\t}\n\t\t}\n\n\t\t$this->notice(__d('shop', 'No payment method selected'), array(\n\t\t\t'redirect' => true,\n\t\t\t'level' => 'warning'\n\t\t));\n\t}",
"public function setValue($value) {\n $this->setMethods($value);\n }",
"public function withPaymentMethod($value)\n {\n $this->setPaymentMethod($value);\n return $this;\n }",
"public function add_payment( $methods ) {\r\n\t\t\t$methods['payir'] = 'LP_Gateway_Payir';\r\n\r\n\t\t\treturn $methods;\r\n\t\t}",
"protected function updatePaymentMethodForReceivables(array $receivables)\n {\n\n }",
"public function setPaymentType($payment_type){\n $this->payment_type = $payment_type;\n }",
"public function setPaymentMethod($paymentMethod){\n return $this->setData(self::PAYMENT_METHOD, $paymentMethod);\n }",
"public function resetPaymentMethodFilter()\n {\n foreach ($this->options as $op => $junk) {\n if (preg_match(\"#PaymentMethod#\", $op)) {\n unset($this->options[$op]);\n }\n }\n }",
"public function setPaymentOptions(?array $paymentOptions): self\n {\n $this->initialized['paymentOptions'] = true;\n $this->paymentOptions = $paymentOptions;\n\n return $this;\n }",
"public function setOrderMethod($value)\n {\n $this->order_method = $value;\n $this->setSettingValue('retailcrm_order_method', $value);\n }",
"public static function getPaymentMethods()\n {\n return [\n static::MAIL,\n static::DIRECT_DEPOSIT,\n ];\n }",
"protected function updatePaymentMethodConfigurations($paymentMethods)\n {\n foreach ($paymentMethods as $paymentMethod) {\n $this->_paymentMethodConfigurationManagement->update($paymentMethod);\n }\n }",
"public function setPaymentMethod($payment) {\n if (!isset($payment['method'])) {\n Mage::throwException(Mage::helper('checkout')->__('Payment method is not defined'));\n }\n\n $quote = $this->getQuote();\n $quote->getPayment()->importData($payment);\n // shipping totals may be affected by payment method\n if (!$quote->isVirtual() && $quote->getShippingAddress()) {\n $quote->getShippingAddress()->setCollectShippingRates(true);\n $quote->setTotalsCollectedFlag(false)->collectTotals();\n }\n\n $quote->save();\n return $this;\n }",
"public function setEnforcePaymentMethod($value)\n {\n return $this->setParameter('enforcePaymentMethod', $value);\n }",
"public function add_payment( $methods ) {\n\t\t\t$methods['stripe'] = 'LP_Gateway_Stripe';\n\n\t\t\treturn $methods;\n\t\t}",
"public function setMapPaymentTypes(array $data)\n {\n $data = array_filter($data);\n\n $this->map_payment_types = $data;\n $this->setSettingValue('retailcrm_map_payment_types', $data, true);\n }",
"public function method($method): self {\n\t\tif (in_array($method, $this->methods)) {\n\t\t\t$this->params['method'] = $method;\n\t\t\treturn $this;\n\t\t} else {\n\t\t\t// throw exception if not set payment method from array\n\t\t\tthrow new \\Exception('Set payment Method ' . implode(',', $this->methods));\n\t\t}\n\n\t}",
"public function toOptionArray()\n {\n $methods = [];\n\n //default empty value\n $methods[] = [\"value\" => \"\", \"label\" => __(\"Accept all payment methods\")];\n $accessToken = $this->scopeConfig->getValue(\\MercadoPago\\Core\\Helper\\ConfigData::PATH_ACCESS_TOKEN, \\Magento\\Store\\Model\\ScopeInterface::SCOPE_WEBSITE, $this->_switcher->getWebsiteId());\n\n if (empty($accessToken)) {\n return $methods;\n }\n\n $this->coreHelper->log(\"GET /v1/payment_methods\", 'mercadopago');\n\n try {\n $response = \\MercadoPago\\Core\\Lib\\RestClient::get(\"/v1/payment_methods\", null, [\"Authorization: Bearer \" . $accessToken]);\n } catch (\\Exception $e) {\n $this->coreHelper->log(\"PaymentMethodsTicket:: An error occurred at the time of obtaining the ticket payment methods: \" . $e);\n return [];\n }\n\n if (isset($response['error']) || (isset($response['status']) && ($response['status'] != '200' && $response['status'] != '201'))) {\n return $methods;\n }\n\n $response = $response['response'];\n\n foreach ($response as $pm) {\n if (isset($pm['payment_type_id']) && $pm['payment_type_id'] == \"ticket\" || $pm['payment_type_id'] == \"atm\") {\n $methods[] = [\n 'value' => $pm['id'],\n 'label' => __($pm['name'])\n ];\n }\n }\n\n $this->coreHelper->log(\"PaymentMethodsTicket:: Displayed\", 'mercadopago', $methods);\n\n return $methods;\n }",
"public function setMethods($methods)\n {\n $this->methods = $methods;\n return $this;\n }",
"public function setDefaultActivePaymentMethod()\n {\n $criteria = new CDbCriteria;\n $criteria->select = 't.name, t.value';\n $criteria->condition = \"t.name LIKE 'payment_method_%' AND t.value = 1\";\n\n $data = Option::model()->findAll($criteria);\n\n $payment_method_options = array();\n\n foreach($data as $option) {\n if($option->name == 'payment_method_paypal') $payment_method_options[] = self::PAYMENT_METHOD_PAY_PAL;\n if($option->name == 'payment_method_skrill') $payment_method_options[] = self::PAYMENT_METHOD_MONEY_BOOKERS;\n if($option->name == 'payment_method_wiretransfer') $payment_method_options[] = self::PAYMENT_METHOD_WIRE_TRANSFER;\n if($option->name == 'payment_method_check') $payment_method_options[] = self::PAYMENT_METHOD_CHECK;\n if($option->name == 'payment_method_no_payment') $payment_method_options[] = self::PAYMENT_METHOD_NO_PAYMENT;\n }\n\n if(empty($payment_method_options))\n $payment_method_options[] = self::PAYMENT_METHOD_PAY_PAL;\n\n if(!in_array($this->payment_method, $payment_method_options))\n $this->payment_method = $payment_method_options[0];\n }",
"public function changePaymentMethod(Checkout $checkout, Request $request)\n {\n $paymentMethod = $request->get('paymentMethod');\n if (isset($paymentMethod) && $paymentMethod > 0)\n {\n $checkout->setPaymentMethodId($paymentMethod);\n }\n }",
"function choosePaymentMethod() {\n $booking = $this->Session->read('booking');\n // find all unpaid bookings\n $unpaid = $this->Payment->Booking->User->findUnpaid($this->Auth->user('id'));\n if ($booking) {\n // it's probably appropriate to save it at this point\n if ($this->Session->read('booking.saved') == false) {\n $bid = $this->Payment->Booking->saveBooking($booking, $this->Auth->user('id'));\n if ($bid === false) {\n $this->setFlash('Error: Could Not Save Booking');\n } else {\n $this->Session->write('booking.saved', true);\n $newbooking = $this->Payment->Booking->find('first', array(\n 'conditions' => array('Booking.id' => $bid),\n 'recursive' => '2'\n ));\n array_push($unpaid, $newbooking);\n }\n }\n }\n $this->set('unpaid', $unpaid);\n $this->set('allowedPaymentTypes', $this->allowedPaymentTypes);\n }",
"public function register_method( $methods ) {\n\t\t$methods['enda_bundle_rate'] = 'ENDA_Woocommerce_Bundle_Shipping';\n\t\treturn $methods;\n\t}",
"public function get_payment_methods() {\n\t\treturn $this->get_supported_payment_methods();\n\t}",
"public static function getPaymentMethods() {\n\n // return array(\n // self::PAYMENT_METHOD_PAY_PAL => 'Pay Pal',\n // self::PAYMENT_METHOD_MONEY_BOOKERS => 'Skrill',\n // self::PAYMENT_METHOD_WIRE_TRANSFER => 'Wiretransfer',\n // );\n\n $payment_methods = array();\n\n if(Option::getByName('payment_method_paypal')) \n $payment_methods[self::PAYMENT_METHOD_PAY_PAL] = 'Pay Pal';\n\n if(Option::getByName('payment_method_skrill')) \n $payment_methods[self::PAYMENT_METHOD_MONEY_BOOKERS] = 'Skrill';\n\n if(Option::getByName('payment_method_wiretransfer') && Option::getByName('wiretransfer_doc_path')) \n $payment_methods[self::PAYMENT_METHOD_WIRE_TRANSFER] = 'Wiretransfer';\n\n if(Option::getByName('payment_method_check')) \n $payment_methods[self::PAYMENT_METHOD_CHECK] = 'Check';\n\n if(Option::getByName('payment_method_no_payment')) \n $payment_methods[self::PAYMENT_METHOD_NO_PAYMENT] = 'No Payment';\n\n return $payment_methods;\n }",
"public function setMethod($value) { $this->_method = $value; }",
"public function setPaymentDate($payment_date);",
"public function getPaymentMethodAllowableValues()\n {\n return [\n self::PAYMENT_METHOD_ACC,\n self::PAYMENT_METHOD_ALP,\n self::PAYMENT_METHOD_APL,\n self::PAYMENT_METHOD_AMX,\n self::PAYMENT_METHOD_AZP,\n self::PAYMENT_METHOD_BON,\n self::PAYMENT_METHOD_CFY,\n self::PAYMENT_METHOD_CSY,\n self::PAYMENT_METHOD_CUP,\n self::PAYMENT_METHOD_DIN,\n self::PAYMENT_METHOD_DII,\n self::PAYMENT_METHOD_DIB,\n self::PAYMENT_METHOD_DIS,\n self::PAYMENT_METHOD_DNK,\n self::PAYMENT_METHOD_ECA,\n self::PAYMENT_METHOD_ELV,\n self::PAYMENT_METHOD_EPS,\n self::PAYMENT_METHOD_ESY,\n self::PAYMENT_METHOD_INT,\n self::PAYMENT_METHOD_JCB,\n self::PAYMENT_METHOD_JEL,\n self::PAYMENT_METHOD_KLN,\n self::PAYMENT_METHOD_MAU,\n self::PAYMENT_METHOD_MDP,\n self::PAYMENT_METHOD_MFX,\n self::PAYMENT_METHOD_MPX,\n self::PAYMENT_METHOD_MYO,\n self::PAYMENT_METHOD_PAP,\n self::PAYMENT_METHOD_PAY,\n self::PAYMENT_METHOD_PEF,\n self::PAYMENT_METHOD_PFC,\n self::PAYMENT_METHOD_PSC,\n self::PAYMENT_METHOD_REK,\n self::PAYMENT_METHOD_SAM,\n self::PAYMENT_METHOD_SWB,\n self::PAYMENT_METHOD_SCX,\n self::PAYMENT_METHOD_SWP,\n self::PAYMENT_METHOD_TWI,\n self::PAYMENT_METHOD_UAP,\n self::PAYMENT_METHOD_VIS,\n self::PAYMENT_METHOD_WEC,\n ];\n }",
"public function setPaymentMethod(PaymentMethodInterface $method, $amount = null);",
"public function setAllowedRequestMethods(string ...$methods): void\n {\n $this->allowedRequestMethods = array_merge(\n $this->allowedRequestMethods, array_fill_keys($methods, \"allowed\")\n );\n }",
"public function testAllowedPaymentMethods()\n {\n $expected = [\n 'ideal',\n 'bancontact',\n 'sofort',\n 'eps',\n 'giropay',\n 'belfius',\n 'creditcard',\n 'paypal',\n 'directdebit',\n ];\n\n $this->assertEquals($expected, SubscriptionRemover::ALLOWED_METHODS);\n }",
"public function setPaymentRequest(string $payment_request);",
"public function admin_update_payment_gateways()\n {\n $admin = true;\n include GEO_BASE_DIR . 'get_common_vars.php';\n //whether allowed to enable this type or not\n $can_enable = true;\n $is_enabled = (isset($_POST['enabled_gateways'][self::gateway_name]) && $_POST['enabled_gateways'][self::gateway_name]);\n\n if (isset($_POST[self::gateway_name]) && is_array($_POST[self::gateway_name]) && count($_POST[self::gateway_name]) > 0) {\n $settings = $_POST[self::gateway_name];\n\n //save common settings\n $this->_updateCommonAdminOptions($settings);\n\n //save non-common settings\n $this->set('sid', trim($settings['sid']));\n $this->set('secret', trim($settings['secret']));\n $this->serialize();\n }\n\n\n return true;\n }",
"function modify_user_contact_methods($methods)\r\n{\r\n\t$methods['postalcode'] = __('郵便番号');\r\n\t$methods['address'] = __('住所');\r\n\t$methods['telnmber'] = __('電話番号');\r\n\t$methods['businessday'] = __('営業日');\r\n\t$methods['businesshours '] = __('営業時間');\r\n\t$methods['specialbusiness'] = __('特別営業');\r\n\t$methods['twitter'] = __('Twitterネーム');\r\n\r\n\t// Remove user contact methods\r\n\tunset($methods['first_name']);\r\n\tunset($methods['jabber']);\r\n\r\n\treturn $methods;\r\n}",
"public function setPayments($payments)\n {\n $this->payments = $payments;\n\n return $this;\n }",
"public static function listPaymentMethods()\n {\n return [\n [\n 'id' => self::PAYMENT_BY_CASH,\n 'name' => 'Tiền mặt',\n ],\n [\n 'id' => self::PAYMENT_BY_CONTRACT,\n 'name' => 'Hợp đồng',\n ],\n ];\n }",
"public function setPaymentIndex($payment_index);",
"public function setPaymentMethodIdAttribute($input)\n {\n $this->attributes['payment_method_id'] = $input ? $input : null;\n }",
"public function get_supported_payment_methods() {\n\t\treturn array(\n\t\t\tPronamic_WP_Pay_PaymentMethods::BANCONTACT,\n\t\t\tPronamic_WP_Pay_PaymentMethods::BANK_TRANSFER,\n\t\t\tPronamic_WP_Pay_PaymentMethods::CREDIT_CARD,\n\t\t\tPronamic_WP_Pay_PaymentMethods::IDEAL,\n\t\t\tPronamic_WP_Pay_PaymentMethods::SOFORT,\n\t\t);\n\t}",
"function admin_update_payment_gateways()\n {\n $admin = true;\n include GEO_BASE_DIR . 'get_common_vars.php';\n //whether allowed to enable this type or not\n $can_enable = true;\n $is_enabled = (isset($_POST['enabled_gateways'][self::gateway_name]) && $_POST['enabled_gateways'][self::gateway_name]);\n\n if (isset($_POST[self::gateway_name]) && is_array($_POST[self::gateway_name]) && count($_POST[self::gateway_name]) > 0) {\n $settings = $_POST[self::gateway_name];\n\n //save common settings\n $this->_updateCommonAdminOptions($settings);\n\n //save non-common settings\n $this->set('installation_id', trim($settings['installation_id']));\n $this->set('currency', $settings['currency']);\n $this->set('callback_password', trim($settings['callback_password']));\n $this->serialize();\n }\n\n\n return true;\n }",
"function woocommerce_add_paycoingateway_gateway($methods) {\n\t\t\t$methods[] = 'WC_Gateway_PaycoinGateway';\n\t\t\treturn $methods;\n\t\t}",
"public function setMethods($methods): self\n {\n $this->config['AlloMethods'] = $methods;\n\n return $this;\n }",
"public function payment(){\n $page_data['page_title'] = 'Payment Methods';\n $page_data['pg_name'] = 'store_settings';\n $page_data['sub_name'] = 'payment_set';\n $page_data['least_sub'] = '';\n $page_data['methods'] = $this->admin->get_results('payment_methods')->result();\n $page_data['profile'] = $this->admin->get_profile_details($this->session->userdata('logged_id'),\n 'first_name,last_name,email,profile_pic');\n if( $this->input->post() ){\n $settings = '';\n $settings = trim($this->input->post('settings'));\n\n if( $settings ) {\n $settings = explode(',' , $settings);\n $settings = json_encode( $settings );\n }\n// $slug = trim(strtolower($this->input->post('name')));\n// $slug = preg_replace(\"/[^A-Za-z0-9\\-]/\", $slug);\n $data_array = array(\n 'name' => $this->input->post('name', true),\n 'settings' => $settings,\n 'notes' => htmlentities($this->input->post('notes'), ENT_QUOTES,\"UTF-8\")\n );\n if( $this->admin->insert_data('payment_methods', $data_array) ) {\n $this->session->set_flashdata('success_msg', 'The Payment Method has been added successfully.');\n }else{\n $this->session->set_flashdata('error_msg', 'There was an error inserting the data.');\n }\n redirect($_SERVER['HTTP_REFERER']);\n }else{\n $this->load->view('settings/payment', $page_data);\n }\n }",
"private function setActivatedPayment($pMethod, $defaultValue, $elementValues)\n {\n $sql = \"SELECT id from s_core_paymentmeans where name = '\".$pMethod.\"'\";\n $query = Shopware()->Db()->query($sql);\n $data = $query->fetchAll();\n $paymentID = $data[0]['id'];\n\n $sql = \"DELETE FROM s_core_paymentmeans_subshops WHERE paymentID = '\".$paymentID.\"'\";\n Shopware()->Db()->query($sql);\n\n $active = '0';\n\n foreach ($elementValues as $key => $value) {\n if (empty($value['value'])) {\n $value['value'] = $defaultValue;\n }\n\n if ($value['value'] == 'Yes') {\n $sql = \"INSERT INTO s_core_paymentmeans_subshops (paymentID, subshopID)\n VALUES ('\".$paymentID.\"', '\".$value['shopId'].\"')\";\n Shopware()->Db()->query($sql);\n $active = '1';\n }\n }\n\n $sql = \"UPDATE s_core_paymentmeans SET active = '\".$active.\"' WHERE name = '\".$pMethod.\"'\";\n Shopware()->Db()->query($sql);\n }",
"public function hookPaymentOptions($params)\n {\n if (!$this->active) {\n return;\n }\n if (!$this->checkCurrency($params['cart'])) {\n return;\n }\n $payments_options = [];\n $ifthenpayGateway = GatewayFactory::build('gateway');\n foreach ((array) unserialize($this->ifthenpayConfig['IFTHENPAY_USER_PAYMENT_METHODS']) as $paymentMethod) {\n if (PrestashopModelFactory::buildCurrency($params['cart']->id_currency)->iso_code === 'EUR' || $paymentMethod === 'ccard') {\n if (Configuration::get('IFTHENPAY_' . Tools::strtoupper($paymentMethod))) {\n $option = PrestashopFactory::buildPaymentOption();\n if ($paymentMethod === 'mbway') {\n $this->context->smarty->assign('mbwaySvg', Media::getMediaPath(\n _PS_MODULE_DIR_ . $this->name . '/views/svg/mbway.svg' \n )\n );\n $this->context->smarty->assign(\n [\n 'action' => $this->context->link->getModuleLink(\n $this->name,\n 'validation',\n [\n 'paymentOption' => $paymentMethod,\n ],\n true\n ),\n ]\n );\n $option->setForm(\n $this->context->smarty->fetch(\n $this->local_path .\n 'views/templates/front/mbwayPhone.tpl'\n )\n );\n }\n $option->setCallToActionText($this->l('Pay by ') . $ifthenpayGateway->getAliasPaymentMethods(\n $paymentMethod, $this->context->language->iso_code)\n )\n ->setLogo(Media::getMediaPath(\n _PS_MODULE_DIR_ . $this->name . '/views/img/' . $paymentMethod . '_option.png'\n ))\n ->setAction(\n $this->context->link->getModuleLink(\n $this->name,\n 'validation',\n [\n 'paymentOption' => $paymentMethod,\n ],\n true\n )\n )\n ->setModuleName($this->name);\n $payments_options[] = $option;\n }\n }\n \n }\n return $payments_options;\n }",
"public function getSupportedPaymentTypes()\n {\n return [PaymentMethod::PAYPAL];\n }",
"public function setPaymentButton($payment_button = 'pay')\n {\n if (in_array($payment_button, ['buy', 'pay'])) {\n $this->payment_button = $payment_button;\n }\n }",
"public function paymentMethod($payment_method) {\n $this->data['attachment']['payload']['payment_method'] = $payment_method;\n\n return $this;\n }",
"public function setPaymentData($data = []): bool\n\t{\n\t\treturn false;\n\t}",
"public static function setMethod($val) \n { \n emailSettings::$method = $val; \n }",
"public function filterPaymentMethods($payments, $value) {\n foreach ((array)$payments as $id => $payment) {\n if (isset($payment['settlement'])) {\n if ($payment['settlement'] === $this->module->getActingFlag()) {\n if ($this->module->canProcessCart() === false) {\n array_splice($payments, $id, 1);\n }\n }\n }\n }\n\n return $payments;\n }",
"public function getAllPaymentMethods($translate = true)\n {\n if (empty($this->paymentMethods)) {\n $free = new \\PiedWeb\\ReservationBundle\\PaymentMethod\\Free();\n $this->paymentMethods[$free->getId()] = $translate ? $this->trans->trans('choices.'.$free->getHumanId()) : $free->getHumanId();\n\n $paymentMethods = explode('|', $this->getConfigurationPool()->getContainer()->getParameter('app.payment_method'));\n foreach ($paymentMethods as $paymentMethod) {\n $p = new $paymentMethod();\n $this->paymentMethods[$p->getId()] = $translate ? $this->trans->trans('choices.'.$p->getHumanId()) : $p->getHumanId();\n }\n }\n\n return $this->paymentMethods;\n }",
"function add_CDEK_shipping_method($methods)\n {\n $methods['CDEK_shipping_method'] = 'WC_CDEK_Shipping_Method';\n return $methods;\n }",
"public function set_sess_cart_payment_method()\n {\n $std = new stdClass();\n $std->payment_option = $this->input->post('payment_option', true);\n $std->terms_conditions = $this->input->post('terms_conditions', true);\n $this->session->set_userdata('mds_cart_payment_method', $std);\n }",
"public function payment_fields() {\n \n\t\t\n \n\t\t}",
"public function getPaymentMethodsForCod()\n {\n return $this->_toArrayObject($this->getConfig(\n 'packages/global_settings_payments-for-cod'));\n }",
"function add_payssion_gateway( $methods )\r\n\t{\n\t\treturn array_merge($methods, \n\t\t\t\tarray(\n\t\t\t\t\t\t'WC_Gateway_Payssion', \n\t\t\t\t\t\t'WC_Gateway_Payssion_Alipay',\n\t\t\t\t\t\t'WC_Gateway_Payssion_Banamex',\n\t\t\t\t\t\t'WC_Gateway_Payssion_Bancochile',\r\n\t\t\t\t\t\t'WC_Gateway_Payssion_Bancodobrasil',\r\n\t\t\t\t\t\t'WC_Gateway_Payssion_Bancomer',\n\t\t\t\t\t\t'WC_Gateway_Payssion_BitCashJP',\n\t\t\t\t\t\t'WC_Gateway_Payssion_Bitcoin',\n\t\t\t\t\t\t'WC_Gateway_Payssion_Boleto',\n\t\t\t\t\t\t'WC_Gateway_Payssion_CashU',\n\t\t\t\t\t\t'WC_Gateway_Payssion_CreditCardJP',\n\t\t\t\t\t\t'WC_Gateway_Payssion_Dragonpay',\n\t\t\t\t\t\t'WC_Gateway_Payssion_Enets',\n\t\t\t\t\t\t'WC_Gateway_Payssion_MercadoPago',\n\t\t\t\t\t\t'WC_Gateway_Payssion_Molpay',\n\t\t\t\t\t\t'WC_Gateway_Payssion_Neosurf',\n\t\t\t\t\t\t'WC_Gateway_Payssion_NetCashJP',\n\t\t\t\t\t\t'WC_Gateway_Payssion_Nganluong',\n\t\t\t\t\t\t'WC_Gateway_Payssion_OneCard',\n\t\t\t\t\t\t'WC_Gateway_Payssion_Openbucks',\n\t\t\t\t\t\t'WC_Gateway_Payssion_OXXO',\n\t\t\t\t\t\t'WC_Gateway_Payssion_Paysafecard',\n\t\t\t\t\t\t'WC_Gateway_Payssion_POLi',\n\t\t\t\t\t\t'WC_Gateway_Payssion_QIWI',\n\t\t\t\t\t\t'WC_Gateway_Payssion_Redcompra',\n\t\t\t\t\t\t'WC_Gateway_Payssion_Santander',\n\t\t\t\t\t\t'WC_Gateway_Payssion_Santandermx',\n\t\t\t\t\t\t'WC_Gateway_Payssion_SOFORT',\n\t\t\t\t\t\t'WC_Gateway_Payssion_Tenpay',\n\t\t\t\t\t\t'WC_Gateway_Payssion_Trustpay',\n\t\t\t\t\t\t'WC_Gateway_Payssion_Unionpay',\n\t\t\t\t\t\t'WC_Gateway_Payssion_WebMoney',\n\t\t\t\t\t\t'WC_Gateway_Payssion_WebMoneyJP',\n\t\t\t\t\t\t'WC_Gateway_Payssion_Yamoney'));\r\n\t}",
"protected function getAllAvailableMethods()\n {\n /* TODO get all available payment methods from toolbox */\n }",
"public function setUp() : void {\n parent::setUp();\n $controller = payment_method_controller_load('stripe_payment_payment_request');\n $method = entity_create('payment_method', [\n 'controller' => $controller,\n 'controller_data' => $controller->controller_data_defaults,\n ]);\n entity_save('payment_method', $method);\n $this->method = $method;\n }",
"public function getPaymentMethods() {\r\n\t\t//@TODO: Insert PaymentMethods into the datebase, create table\r\n\t\t$payment_methods = array();\r\n\t\t\t$payment_methods[0] = array('id' => 0, 'name' => 'AMEX');\r\n\t\t\t$payment_methods[1] = array('id' => 1, 'name' => 'Discover');\r\n\t\t\t$payment_methods[2] = array('id' => 2, 'name' => 'Mastercard');\r\n\t\t\t$payment_methods[3] = array('id' => 3, 'name' => 'Visa');\r\n\t\t\t$payment_methods[4] = array('id' => 4, 'name' => 'Store Credit');\r\n\t\t\t$payment_methods[5] = array('id' => 5, 'name' => 'Check');\r\n\t\t\t$payment_methods[6] = array('id' => 6, 'name' => 'Wire Transfer');\r\n\t\t\t$payment_methods[7] = array('id' => 7, 'name' => 'Trade');\r\n\t\t\t$payment_methods[9] = array('id' => 9, 'name' => 'Cash');\r\n\t\treturn $payment_methods; //array\r\n\t}",
"public function setPaymentMethod($paymentMethod)\n {\n $validValues = [\n PaymentMethod::CREDIT_CARD,\n PaymentMethod::BANK_TRANSFER,\n PaymentMethod::DIRECT_DEBIT,\n PaymentMethod::WECHAT,\n PaymentMethod::LINE,\n PaymentMethod::ALIPAY\n ];\n\n if (in_array($paymentMethod, $validValues)) {\n $this->paymentMethod = $this->limitLength($paymentMethod, 32);\n } else {\n Utils::error(\"Invalid paymentMethod provided: \" . $paymentMethod);\n }\n\n return $this;\n }",
"public function whmcs_get_payment_methods($params = array()) {\n\t\t$params['action'] = 'GetPaymentMethods';\n\t\t// return Whmcs_base::send_request($params);\n $load = new Whmcs_base();\n return $load->send_request($params);\n\t}",
"function register_shipping_method($methods)\n {\n $methods['legacy_pakkelabels_shipping_gls_business'] = 'Legacy_Pakkelabels_Shipping_GLS_Business';\n return $methods;\n }",
"public function setPaymentProvider(PaymentProvider $paymentProvider)\n {\n $this->paymentProvider = $paymentProvider;\n }",
"public function setPaymentField($name, $value)\n\t{\n\t\tif ($this->verify_fields) {\n\t\t\tif (in_array($name, $this->_string_fields)) {\n\t\t\t\t$this->_payment_fields[$name] = $value;\n\t\t\t} else {\n\t\t\t\tforeach($this->_pattern_fields as $pattern) {\n\t\t\t\t\tif (preg_match(\"/\" . $pattern . \"/\", $name)) {\n\t\t\t\t\t\t$this->_payment_fields[$name] = $value;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthrow new PayPalException(\"Error: no field $name exists in the PayPal API.\");\n\t\t\t}\n\t\t} else {\n\t\t\t$this->_payment_fields[$name] = $value;\n\t\t}\n\t}",
"protected function _initPaymentMethod($paymentMethod)\n {\n /**\n *\n * @note Check if quote is free\n *\n */\n if ($this->_isFreeQuote()) {\n /**\n *\n * @note If it is a free quote then use free payment method\n *\n */\n $paymentMethod = Free::PAYMENT_METHOD_FREE_CODE;\n }\n\n /**\n *\n * @note Add payment method\n *\n */\n $data[PaymentInterface::KEY_METHOD] = $paymentMethod;\n\n /**\n *\n * @note Save payment information\n *\n */\n $this->savePayment($data);\n }",
"public function getPaymentMethodAllowableValues()\n {\n return [\n self::PAYMENT_METHOD_COD,\n self::PAYMENT_METHOD_CVS,\n self::PAYMENT_METHOD_OTHER,\n ];\n }",
"protected function _getPaymentMethodsHtml()\n {\n return $this->_getHtmlByHandle('checkout_onepage_paymentmethod');\n }",
"public function getAllPaymentMethods($asArray = false) {\r\n $jsonMethods = array();\r\n $methods = array();\r\n $model = new Mage_Checkout_Block_Onepage_Payment_Methods();\r\n $quote = Mage::getSingleton('checkout/cart')->getQuote();\r\n try {\r\n $selectedPaymentMethod = $quote->getPayment()->getData('method');\r\n } catch (Exception $e) {\r\n $this->logException($e, 'Get payment method');\r\n $this->_JSONencodeAndRespond(array(\"title\" => \"Error\", \"content\" => $e->getMessage()));\r\n return;\r\n }\r\n foreach ($model->getMethods() as $method) {\r\n $methodTitle = $method->getTitle();\r\n $methodCode = $method->getCode();\r\n if ($methodCode == \"paypal_express\") { // PayPal. Has logo and strange label text, override\r\n $methodTitle = \"PayPal\";\r\n }\r\n\r\n //eLabelz specific fix\r\n if ($methodCode == 'msp_cashondelivery') {\r\n $methodTitle .= \" – \" . Mage::helper('core')->currency($quote->getMspCashondeliveryInclTax(), true, false);\r\n }\r\n\r\n $m = array(\r\n 'type' => 'option',\r\n 'title' => $methodTitle,\r\n 'code' => $methodCode,\r\n 'price' => $this->getPaymentMethodPrice($methodCode),\r\n // Payment fee (price) is not available for standard payment methods, for extensions this need to be individualy coded\r\n 'image' => null,\r\n 'options' => $this->_getSuboptionsForPaymentMethod($methodCode),\r\n );\r\n $methods[] = $m;\r\n }\r\n if ($asArray)\r\n return $methods;\r\n $jsonMethods['payment_methods'] = $methods;\r\n\r\n return $jsonMethods;\r\n }",
"public function setClassPaymentByInstructor_post()\n {\n /* code goes here */\n }",
"function add_paysera_gateway($methods) {\n $methods[] = 'WC_Paysera';\n return $methods;\n }",
"function add_paysto_gateway($methods)\n {\n $methods[] = 'WC_PAYSTO';\n\n return $methods;\n }",
"public function setShippingMethod() {\n\t\t$json = array();\n\t\t$json['status'] = false;\n\t\t\n\t\tif (isset($this->request->post['code'])) {\n\t\t\t$code=$this->request->post['code'];\n\t\t\t$shipping_method=$this->session->data['shipping_methods'][$code]; \n\t\t\tif ($shipping_method) {\n\t\t\t\tunset($this->session->data['shipping_method']);\n\t\t\t\t$this->session->data['shipping_method'] = $shipping_method;\n\t\t\t\t\n\t\t\t\t$json['status'] = true;\n\t\t\t\t$json['delivery'] = $shipping_method['delivery'];\n\n\t\t\t} else {\n\t\t\t\t$json['error'] = 'Неизвестный способ доставки';\n\t\t\t}\n\t\t} else {\n\t\t\t$json['error'] = 'Не указан тип доставки';\n\t\t}\n\t\t$this->response->addHeader('Content-Type: application/json');\n\t\t$this->response->setOutput(json_encode($json));\n\t}",
"public function iN_PaymentMethods() {\n\t\t$query = mysqli_query($this->db, \"SELECT * FROM i_payment_methods WHERE payment_method_id = '1'\") or die(mysqli_error($this->db));\n\t\t$data = mysqli_fetch_array($query, MYSQLI_ASSOC);\n\t\treturn $data;\n\t}",
"protected function getPaymentMethod(){\n return $this->method;\n }",
"function wc_add_btcpay($methods)\n {\n // Add main BTCPay payment method class.\n $methods[] = 'WC_Gateway_BtcPay';\n\n // Add additional tokens as separate payment methods.\n if ($additional_tokens = btcpay_get_additional_tokens()) {\n foreach ($additional_tokens as $token) {\n $methods[] = $token['classname'];\n }\n }\n\n return $methods;\n }",
"public function methods()\n {\n return collect(Paymentmethods::getList());\n }",
"public function getPaymentMethodAllowableValues() : array\n {\n return [\n self::PAYMENT_METHOD_COD,\n self::PAYMENT_METHOD_CVS,\n self::PAYMENT_METHOD_OTHER,\n ];\n }",
"public function setMethod(BankPaymentType $method): self\n {\n $this->method = $method;\n\n return $this;\n }"
] | [
"0.6860181",
"0.6693383",
"0.65033394",
"0.6467303",
"0.64586055",
"0.6385596",
"0.63696027",
"0.63293606",
"0.6303766",
"0.6187696",
"0.6003539",
"0.5993322",
"0.5969776",
"0.59444124",
"0.5942135",
"0.5932928",
"0.5913211",
"0.59125215",
"0.5885478",
"0.5883385",
"0.5874511",
"0.5870319",
"0.5833074",
"0.58294886",
"0.58071995",
"0.58037114",
"0.5783175",
"0.56866556",
"0.5670832",
"0.558955",
"0.55646455",
"0.5555627",
"0.5550281",
"0.5548861",
"0.5526949",
"0.5521726",
"0.5508533",
"0.5504146",
"0.5496526",
"0.54893196",
"0.5474193",
"0.54500407",
"0.54426384",
"0.5421125",
"0.5415031",
"0.54101664",
"0.53921735",
"0.5384266",
"0.53518546",
"0.53504485",
"0.53459775",
"0.5333641",
"0.5319462",
"0.5318963",
"0.5290575",
"0.52793497",
"0.52783245",
"0.5264749",
"0.52645963",
"0.5263598",
"0.5261039",
"0.525817",
"0.5255001",
"0.5251761",
"0.5251134",
"0.5248155",
"0.5246854",
"0.52468055",
"0.52421224",
"0.523052",
"0.5228709",
"0.5227037",
"0.5216144",
"0.52103287",
"0.5195209",
"0.51928186",
"0.51857394",
"0.51820004",
"0.51743263",
"0.5173682",
"0.5172644",
"0.5162774",
"0.5157191",
"0.51569635",
"0.51549125",
"0.51526254",
"0.51493686",
"0.5146431",
"0.5146374",
"0.5143908",
"0.5122722",
"0.5111994",
"0.5110966",
"0.51101243",
"0.5109759",
"0.5107051",
"0.5106743",
"0.50992525",
"0.50981885",
"0.50883746"
] | 0.67242706 | 1 |
Get the value of offers | public function getOffers()
{
return $this->offers;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getOffer()\n {\n return $this->offer;\n }",
"public function getOffers()\n {\n return $this->getValue('offers');\n }",
"public function getOffer_price()\n {\n return $this->offer_price;\n }",
"public function getItemOffered()\n {\n $itemOffered = $this->get('schema:itemOffered');\n return $itemOffered;\n }",
"public function offers_get()\n\t{\n $token = $_SERVER['HTTP_TOKEN'];\n $data = array(\n 'status' => 0,\n 'code' => -1,\n 'msg' => 'Bad Request',\n 'data' => null\n );\n if($this->checkToken($token))\n {\n $offers = $this->Api_model->getOffers();\n if (isset($offers)) {\n $data = array(\n 'status' => 1,\n 'code' => 1,\n 'msg' => 'success',\n 'data' => $offers\n );\n }else{\n $data = array(\n 'status' => 1,\n 'code' => 1,\n 'msg' => 'success',\n 'data' => null\n );\n }\n }else\n {\n $data['msg'] = 'Request Unknown or Bad Request';\n }\n $this->response($data, REST_Controller::HTTP_OK);\n\t}",
"public function offers($offers)\n {\n return $this->setProperty('offers', $offers);\n }",
"public function retrieveOfferData() {\n\t\t\tif (!$this->availableOffers) {\n\t\t\t\t// affiliate has to be logged in\n\t\t\t\tif ($this->affiliateID) {\n\t\t\t\t\t### IMPLEMENT AFFILIATE EXCLUSIVE OFFERS ###\n\t\t\t\t\t$result = $this->dbh->query(\"SELECT * \n\t\t\t\t\t\t\t\t\t\t\t\t\tFROM `offers` \n\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE `availability` IN ('affiliate', 'all') \n\t\t\t\t\t\t\t\t\t\t\t\t\tAND `startDate` <= NOW() \n\t\t\t\t\t\t\t\t\t\t\t\t\tAND `endDate` > NOW()\");\n\t\t\t\t\tif ($result->rowCount) {\n\t\t\t\t\t\t$this->availableOffers = array();\n\t\t\t\t\t\twhile ($row = $result->fetchAssoc()) {\n\t\t\t\t\t\t\t$this->availableOffers[] = $row;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public function getOffer($name);",
"public function getOffer_description()\n {\n return $this->offer_description;\n }",
"public function getOffer_name()\n {\n return $this->offer_name;\n }",
"public function getOffSell()\n {\n return $this->offSell;\n }",
"public function getOffer(): ?string {\n $val = $this->getBackingStore()->get('offer');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'offer'\");\n }",
"function get_offered($course)\n{\n return $course->offered;\n}",
"public static function getVisibleValueToProvider (){\n \t\t$settings = self::where('key', 'visible_value_to_provider')->first();\n\n \t\tif($settings)\n\t\t\treturn $settings->value;\n\t\telse \n\t\t\treturn 0;\n \t}",
"public function getOffer($productId, $sellerId);",
"public function offers()\n {\n return $this->hasMany('\\App\\Offer');\n }",
"public function getValue() {}",
"public function getValue() {}",
"public function getValue() {}",
"public function getValue() {}",
"public function getValue() {}",
"public function getValue() {}",
"public function getValue() {}",
"public function getValue() {}",
"public function getValue() {}",
"public function getValue() {}",
"public function getValue() {}",
"public function getValue() {}",
"public function getValue() {}",
"public function getValue() {}",
"public function getValue() {}",
"public function getValue() {}",
"public function getValue() {}",
"public function getValue() {}",
"public function getValue() {}",
"public function getValue();",
"public function getValue();",
"public function getValue();",
"public function getValue();",
"public function getValue();",
"public function getValue();",
"public function getValue();",
"public function getValue();",
"public function getValue();",
"public function getValue();",
"public function getValue();",
"public function getValue();",
"public function getValue();",
"public function getValue();",
"public function getValue();",
"public function getValue();",
"public function getValue();",
"public function getValue();",
"public function getValue();",
"public function getValue();",
"public function getValue();",
"public function getPrice()\n {\n return $this->get(self::_PRICE);\n }",
"public function getValue()\n\t{\n\t\treturn $this->data['value'];\n\t}",
"function getExtendedOffersPrice($storeId = null, $merchant_id = null, $extendedOffersPrice = array(),$user_id=null,$ItemQuantity=null,$itemPrice=null) {\n App::import('Model', 'ItemOffer');\n $this->ItemOffer = new ItemOffer();\n $extendedOfferCheck = $this->ItemOffer->find('first', array('conditions' => array('ItemOffer.store_id' => $storeId, 'ItemOffer.merchant_id' => $merchant_id, 'ItemOffer.is_deleted' => 0, 'ItemOffer.is_active' => 1, 'ItemOffer.id' => $extendedOffersPrice['promo_id'], 'ItemOffer.item_id' => $extendedOffersPrice['item_id'], 'ItemOffer.unit_counter' => $extendedOffersPrice['unit'])));\n $arrExtendedOffer=array();\n if (empty($extendedOfferCheck)) {\n $arrExtendedOffer['message']=\"Extended Offer is not applicable for this Item.\";\n $arrExtendedOffer['Price']=\"\";\n return $arrExtendedOffer;\n }\n if(!empty($extendedOfferCheck)){\n $itemisFree=$this->checkItemOffer($extendedOffersPrice['item_id'],$user_id,$ItemQuantity,$storeId);\n if($itemisFree==0){\n $arrExtendedOffer['message']=\"No item free.\";\n $arrExtendedOffer['price']=\"\";\n return $arrExtendedOffer;\n }\n if($itemisFree>0){\n $arrExtendedOffer['message']=\"Item free.\";\n $arrExtendedOffer['price']=$itemPrice;\n return $arrExtendedOffer;\n }\n }\n \n \n }",
"public function get_value()\n {\n }",
"public function get_value()\n {\n }",
"public function getValue() {\n\t\treturn $this->data[\"value\"];\n\t}",
"public function getValue(){\n return $this->getData();\n }",
"public function offers() {\n return $this->hasMany('Rockit\\Models\\Offer');\n }",
"public function getTotalAuctionSellingValue()\n {\n return $this->totalAuctionSellingValue;\n }",
"public function getPrice();",
"public function getPrice();",
"public function getPrice();",
"public function getPrice();",
"public function getValue()\n {\n return $this->get(self::VALUE);\n }",
"public function getValue()\n {\n return $this->get(self::VALUE);\n }",
"public function getListPrice()\n\t{\n\t\treturn $this->getKeyValue('list_price'); \n\n\t}",
"public function getTotalOffers()\n {\n return $this->totalOffers;\n }",
"public function getPrice(): string;",
"public function offers()\n {\n \t// hasMany(RelatedModel, foreignKeyOnRelatedModel = sp_id, localKey = sp_id)\n \treturn $this->hasMany('App\\Offer','sp_id','sp_id');\n }",
"public function offer() {\n return $this->hasOne('Modules\\Admin\\Models\\Offer', 'id', 'offer_id');\n }",
"function sale_price() {\n\t\treturn $this->_apptivo_sale_price;\n\t}",
"public function value()\n {\n return $this->getValue();\n }",
"public function getValue()\n {\n return $this->getOriginData('value');\n }",
"public function getValue()\r\n {\r\n return $this->value;\r\n }",
"public function getValue() {\n return $this->value;\n }",
"public function getValue() {\n return $this->value;\n }",
"public function getValue() {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }"
] | [
"0.724268",
"0.7181417",
"0.68554395",
"0.6695693",
"0.6353183",
"0.62652284",
"0.6260542",
"0.6209798",
"0.6204455",
"0.6178389",
"0.60597265",
"0.59480673",
"0.5900475",
"0.5815657",
"0.5802591",
"0.5716276",
"0.57150304",
"0.57150304",
"0.57150304",
"0.57150304",
"0.57150304",
"0.57150304",
"0.57150304",
"0.57150304",
"0.57150304",
"0.57150304",
"0.57150304",
"0.57150304",
"0.57150304",
"0.57150304",
"0.5714331",
"0.5714331",
"0.5714331",
"0.5714331",
"0.5714331",
"0.5701229",
"0.5701229",
"0.5701229",
"0.5701229",
"0.5701229",
"0.5701229",
"0.5701229",
"0.5701229",
"0.5701229",
"0.5701229",
"0.5701229",
"0.5701229",
"0.5701229",
"0.5701229",
"0.5701229",
"0.5701229",
"0.5701229",
"0.5701229",
"0.5701229",
"0.5701229",
"0.5701229",
"0.5697253",
"0.5696058",
"0.56949425",
"0.56925726",
"0.56925726",
"0.5689071",
"0.5686445",
"0.56710833",
"0.5636239",
"0.56216747",
"0.56216747",
"0.56216747",
"0.56216747",
"0.5611389",
"0.5611389",
"0.5605879",
"0.5604095",
"0.559161",
"0.5581858",
"0.5581711",
"0.557754",
"0.5571598",
"0.55505496",
"0.55459297",
"0.55342406",
"0.55342406",
"0.55342406",
"0.55303735",
"0.55303735",
"0.55303735",
"0.55303735",
"0.55303735",
"0.55303735",
"0.55303735",
"0.55303735",
"0.55303735",
"0.55303735",
"0.55303735",
"0.55303735",
"0.55303735",
"0.55303735",
"0.55303735",
"0.55303735",
"0.55303735"
] | 0.6523902 | 4 |
Set the value of offers | public function setOffers(array $offers)
{
$this->offers = $offers;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function setOfferValue ()\n {\n $this->request->coupon_benefits[ $this->offerNature ] = $this->offer->rate;\n }",
"public function setOffers($offers)\n {\n $this->setValue('offers', $offers);\n }",
"public function setOffer(?string $value): void {\n $this->getBackingStore()->set('offer', $value);\n }",
"public function offers($offers)\n {\n return $this->setProperty('offers', $offers);\n }",
"public function setOffers($offers) {\n $this->properties['offers'] = $offers;\n\n return $this;\n }",
"protected function setOfferNature ()\n {\n $this->offerNature = $this->offer->rate_nature->value;\n }",
"public function edit(Offer $offer)\n {\n //\n }",
"public function addOffer($offer) {\n $this->offers[] = $offer;\n }",
"protected function setOfferApplicablePricing ()\n {\n $offerApplicableAccountHeads = $this->getOfferApplicableAccountHeads();\n\n foreach ( $this->request->pricing as $accountHead => $amount ) {\n if ( in_array($accountHead, $offerApplicableAccountHeads) ) {\n $this->offerApplicablePricing[ $accountHead ] = $amount;\n $this->offerApplicableAmount += $amount;\n }\n }\n }",
"public function setOfferType($offer_type): void\n {\n if (rex_plugin::get('d2u_machinery', 'used_machines')->isAvailable()) {\n $this->offer_type = $offer_type;\n }\n }",
"public function massQuoteIdAction()\n {\n $offerIds = $this->getRequest()->getParam('offer');\n if (!is_array($offerIds)) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('mfb_myflyingbox')->__('Please select offers.')\n );\n } else {\n try {\n foreach ($offerIds as $offerId) {\n $offer = Mage::getSingleton('mfb_myflyingbox/offer')->load($offerId)\n ->setQuoteId($this->getRequest()->getParam('flag_quote_id'))\n ->setIsMassupdate(true)\n ->save();\n }\n $this->_getSession()->addSuccess(\n $this->__('Total of %d offers were successfully updated.', count($offerIds))\n );\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('mfb_myflyingbox')->__('There was an error updating offers.')\n );\n Mage::logException($e);\n }\n }\n $this->_redirect('*/*/index');\n }",
"public function updateOffer($options)\n {\n $this->data = $this->model->updateOffer($this->client, $options);\n $this->loadXmlUpdateData();\n }",
"public function massPickupAction()\n {\n $offerIds = $this->getRequest()->getParam('offer');\n if (!is_array($offerIds)) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('mfb_myflyingbox')->__('Please select offers.')\n );\n } else {\n try {\n foreach ($offerIds as $offerId) {\n $offer = Mage::getSingleton('mfb_myflyingbox/offer')->load($offerId)\n ->setPickup($this->getRequest()->getParam('flag_pickup'))\n ->setIsMassupdate(true)\n ->save();\n }\n $this->_getSession()->addSuccess(\n $this->__('Total of %d offers were successfully updated.', count($offerIds))\n );\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('mfb_myflyingbox')->__('There was an error updating offers.')\n );\n Mage::logException($e);\n }\n }\n $this->_redirect('*/*/index');\n }",
"public static function AddOffer(){\n\n\t\t\t\n\n\t\t}",
"public function setOfferList($obOfferList)\n {\n $this->obOfferList = $obOfferList;\n }",
"public function acceptOfferAction()\r\n {\r\n $this->checkSession();\r\n $offerId = $this->Request()->getParam(\"offerId\");\r\n\r\n // updating status of Offer\r\n $offer = Shopware()->Models()->find('Shopware\\CustomModels\\Offer\\Offer',$offerId);\r\n $offer->setStatus(4);\r\n try {\r\n Shopware()->Models()->persist($offer);\r\n Shopware()->Models()->flush();\r\n } catch(Exception $e) {\r\n }\r\n\r\n $this->redirect(array(\r\n 'module' => 'frontend',\r\n 'controller' => 'sKUZOOffer',\r\n 'action' => 'offers'\r\n ));\r\n\r\n }",
"public function setOffer($offer)\n {\n $this->offer = $offer;\n\n return $this;\n }",
"public function __construct(Offer $offer)\n {\n $this->offer = $offer;\n }",
"public function update(Request $request, Offer $offer)\n {\n //\n }",
"public function testOfferId()\n {\n $value = '99 ';\n\n $model = $this->getOfferModel();\n\n $model->setOfferId($value);\n\n $this->assertSame(intval($value), intval($model->getOfferId()));\n }",
"public function getOffer()\n {\n return $this->offer;\n }",
"public function setOfferPerPage(?int $offerPerPage = null): self\n {\n // validation for constraint: int\n if (!is_null($offerPerPage) && !(is_int($offerPerPage) || ctype_digit($offerPerPage))) {\n throw new InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($offerPerPage, true), gettype($offerPerPage)), __LINE__);\n }\n if (is_null($offerPerPage) || (is_array($offerPerPage) && empty($offerPerPage))) {\n unset($this->OfferPerPage);\n } else {\n $this->OfferPerPage = $offerPerPage;\n }\n \n return $this;\n }",
"public function offermade($sellerId, $offerId){\n try{\n $response = array();\n $offerModel = $this->_offerFactory->create();\n $store = $this->_storemanager->getStore();\n $offerCollection = $offerModel->getCollection()\n ->addFieldToFilter('buyer_id', array('eq' => $sellerId))\n ->addFieldToFilter('id', array('eq' => $offerId))\n //->addFieldToFilter('expired', array('eq' => '0'))\n //->addFieldToFilter('offer_used', array('eq' => '1'))\n ;\n $offerCollection->getSelect()->where(\"offer_used = '1' OR status = 'counter_offer'\");\n if($offerCollection->getSize() > 0){\n $products = array();\n $offer = $offerCollection->getFirstItem();\n\n $response = $offer->getData();\n $productIds = explode(\",\",$offer->getProductId());\n foreach($productIds as $productId){\n $product = $this->_productModel->load($productId);\n $eachProduct = array();\n $eachProduct['productId'] = $product->getId();\n $eachProduct['name'] = $product->getName();\n $eachProduct['description'] = $product->getDescription();\n $eachProduct['price'] = $product->getPriceInfo()->getPrice('regular_price')->getValue();\n $eachProduct['imageUrl'] = $store->getBaseUrl(\\Magento\\Framework\\UrlInterface::URL_TYPE_MEDIA) . 'catalog/product' . $product->getImage();\n\n $eachProduct['productUrl'] = $product->getProductUrl();\n\n array_push($products, $eachProduct);\n }\n\n $partner = $this->_marketplacehelper->getSellerDataBySellerId($offer->getSellerId())->getFirstItem();\n\n if ($partner->getLogoPic()) {\n $logoPic = $this->_marketplacehelper->getMediaUrl().'avatar/'.$partner->getLogoPic();\n } else {\n $logoPic = $this->_marketplacehelper->getMediaUrl().'avatar/noimage.png';\n }\n $shopUrl = $this->_marketplacehelper->getRewriteUrl(\n 'marketplace/seller/collection/shop/'.\n $partner->getShopUrl()\n );\n $response['products'] = $products;\n $response['seller']['firstname'] = $partner->getFirstname();\n $response['seller']['lastname'] = $partner->getLastname();\n $response['seller']['email'] = $partner->getEmail();\n $response['seller']['logo_image'] = $logoPic;\n\n $response['seller']['username'] = $partner->getShopUrl();\n $response['seller']['shopUrl'] = $shopUrl;\n }\n\n return $this->getResponseFormat($response);\n } catch(\\Exception $e) {\n return $this->errorMessage($e);\n }\n }",
"protected function doActionSetSalePrice()\n {\n $form = new \\XLite\\Module\\CDev\\Sale\\View\\Form\\SaleSelectedDialog();\n $form->getRequestData();\n\n if ($form->getValidationMessage()) {\n \\XLite\\Core\\TopMessage::addError($form->getValidationMessage());\n } elseif (!$this->getSelected() && $ids = $this->getActionProductsIds()) {\n $qb = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Product')->createQueryBuilder();\n $alias = $qb->getMainAlias();\n $qb->update('\\XLite\\Model\\Product', $alias)\n ->andWhere($qb->expr()->in(\"{$alias}.product_id\", $ids));\n\n foreach ($this->getUpdateInfoElement() as $key => $value) {\n $qb->set(\"{$alias}.{$key}\", \":{$key}\")\n ->setParameter($key, $value);\n }\n\n $qb->execute();\n\n \\XLite\\Core\\TopMessage::addInfo('Products information has been successfully updated');\n } else {\n \\XLite\\Core\\Database::getRepo('\\XLite\\Model\\Product')->updateInBatchById($this->getUpdateInfo());\n \\XLite\\Core\\TopMessage::addInfo('Products information has been successfully updated');\n }\n\n $this->setReturnURL($this->buildURL('product_list', '', ['mode' => 'search']));\n }",
"public function offersAction()\r\n {\r\n $config = Shopware()->Plugins()->Backend()->sKUZOOffer()->Config();\r\n $this->View()->directPayment = $config->paymentOption;\r\n $destinationPage = (int)$this->Request()->sPage;\r\n $orderData = $this->sGetOpenOfferData($destinationPage);\r\n $this->View()->sOpenOrders = $orderData[\"orderData\"];\r\n $this->View()->sNumberPages = $orderData[\"numberOfPages\"];\r\n $this->View()->sPages = $orderData[\"pages\"];\r\n\r\n //this has to be assigned here because the config method in smarty can't handle array structures\r\n $this->View()->sDownloadAvailablePaymentStatus = Shopware()->Config()->get('downloadAvailablePaymentStatus');\r\n }",
"public function massRelayAction()\n {\n $offerIds = $this->getRequest()->getParam('offer');\n if (!is_array($offerIds)) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('mfb_myflyingbox')->__('Please select offers.')\n );\n } else {\n try {\n foreach ($offerIds as $offerId) {\n $offer = Mage::getSingleton('mfb_myflyingbox/offer')->load($offerId)\n ->setRelay($this->getRequest()->getParam('flag_relay'))\n ->setIsMassupdate(true)\n ->save();\n }\n $this->_getSession()->addSuccess(\n $this->__('Total of %d offers were successfully updated.', count($offerIds))\n );\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('mfb_myflyingbox')->__('There was an error updating offers.')\n );\n Mage::logException($e);\n }\n }\n $this->_redirect('*/*/index');\n }",
"public function getOffers()\n {\n return $this->getValue('offers');\n }",
"private function publishOffer() {\n if ($this->Session->check('addOffer')) {\n\n // salvando oferta\n $params ['Offer'] = $this->Session->read('addOffer.Offer');\n\n if ($params ['Offer'] ['parcels'] == 1) {\n $params ['Offer'] ['parcels'] = 'ACTIVE';\n\n if ($params ['Offer'] ['parcels_off_impost'] == 1)\n $params ['Offer'] ['parcels_off_impost'] = 'ACTIVE';\n else\n $params ['Offer'] ['parcels_off_impost'] = 'INACTIVE';\n } else {\n $params ['Offer'] ['parcels'] = 'INACTIVE';\n $params ['Offer'] ['parcels_off_impost'] = 'INACTIVE';\n }\n\n $params ['Offer'] ['company_id'] = $this->Session->read('CompanyLoggedIn.Company.id');\n $params ['Offer'] ['status'] = 'ACTIVE';\n\n $params ['Offer'] ['begins_at'] = $this->Utility->formataData($params ['Offer'] ['begins_at']);\n $params ['Offer'] ['ends_at'] = $this->Utility->formataData($params ['Offer'] ['ends_at']);\n\n // trabalhando especificacao e descricao para insert no banco\n $params ['Offer'] ['description'] = strip_tags($params ['Offer'] ['description'], '<a><strong><p><br><b><li><ul><img>');\n $params ['Offer'] ['specification'] = strip_tags($params ['Offer'] ['specification'], '<a><strong><p><br><b><li><ul><img>');\n\n // $params['Offer']['description'] = substr($params['Offer']['description'], 0, 1000);\n // $params['Offer']['specification'] = substr ($params['Offer']['specification'], 0 ,1000);\n\n $ofertaPublica = $params ['Offer'] ['public'];\n $params ['Offer'] ['value'] = str_replace(',', '.', str_replace('.', '', $params ['Offer'] ['value']));\n $addOffer = $this->Utility->urlRequestToSaveData('offers', $params);\n if ($addOffer ['status'] == 'SAVE_OK') {\n if ($this->Session->read('addOffer.update') == true) {\n // deletando publico alvo e filtros selecionados\n $offerId = $this->Session->read('addOffer.Offer.id');\n\n $query = \"DELETE FROM offers_filters where offer_id = {$offerId}\";\n $params = array(\n 'User' => array(\n 'query' => $query\n )\n );\n $delOfferFilter = $this->Utility->urlRequestToGetData('users', 'query', $params);\n\n $query = \"DELETE FROM offers_users where offer_id = {$offerId}\";\n $params = array(\n 'User' => array(\n 'query' => $query\n )\n );\n $delOfferUser = $this->Utility->urlRequestToGetData('users', 'query', $params);\n\n $query = \"DELETE FROM offers_photos where offer_id = {$offerId}\";\n $params = array(\n 'User' => array(\n 'query' => $query\n )\n );\n $delOfferUser = $this->Utility->urlRequestToGetData('users', 'query', $params);\n } else {\n // pegando id de oferta cadastrada\n $params = array(\n 'Offer' => array(\n 'order' => array(\n 'Offer.id' => 'DESC'\n )\n )\n );\n $offer = $this->Utility->urlRequestToGetData('offers', 'first', $params);\n $offerId = $offer ['Offer'] ['id'];\n }\n\n // $offerId = 42;\n // pegando valores de filtros selecionados\n $gender = implode(',', $this->Session->read('addOffer.filters.gender'));\n $location = implode(',', $this->Session->read('addOffer.filters.location'));\n $age_group = implode(',', $this->Session->read('addOffer.filters.age_group'));\n $political = implode(',', $this->Session->read('addOffer.filters.political'));\n $relationship_status = implode(',', $this->Session->read('addOffer.filters.relationship_status'));\n $religion = implode(',', $this->Session->read('addOffer.filters.religion'));\n\n // fazendo insert de filtros\n $params = array(\n 'OffersFilter' => array(\n 'offer_id' => $offerId,\n 'gender' => $gender,\n 'location' => $location,\n 'age_group' => $age_group,\n 'political' => $political,\n 'religion' => $religion,\n 'relationship_status' => $relationship_status\n )\n );\n $addOfferFilters = $this->Utility->urlRequestToSaveData('offers', $params);\n\n // fazendo insert de fotos\n $photos = $this->Session->read('addOffer.OffersPhoto');\n foreach ($photos as $photo) {\n if (!empty($photo)) {\n $params = array(\n 'OffersPhoto' => array(\n 'offer_id' => $offerId,\n 'photo' => $photo ['photo']\n )\n );\n $addPhoto = $this->Utility->urlRequestToSaveData('offers', $params);\n }\n }\n\n if ($ofertaPublica == 'INACTIVE') {\n // fazendo insert de usuarios capturados\n $users = $this->Session->read('addOffer.users');\n foreach ($users as $user) {\n $data = date('Y/m/d');\n $query = \"INSERT INTO offers_users values(NULL, '{$offerId}', '{$user['User']['id']}', '{$data}', 'facebook - portal')\";\n $params = array(\n 'User' => array(\n 'query' => $query\n )\n );\n\n $addUserOffer = $this->Utility->urlRequestToGetData('users', 'query', $params);\n }\n }\n\n // verifica se oferta esta sendo cadastrada para usuario que fez desejo\n if ($this->Session->check('CadOfferUser.id_linha_wishlist')) {\n $data = date('Y/m/d');\n\n // faz update de oferta para usuario na linha do wishlist\n $params = array(\n 'UsersWishlistCompany' => array(\n 'id' => $this->Session->read('CadOfferUser.id_linha_wishlist'),\n 'status' => 'ACTIVE',\n 'offer_id' => $offerId\n )\n );\n $desejosOfferUpdate = $this->Utility->urlRequestToSaveData('companies', $params);\n\n if ($desejosOfferUpdate ['status'] == 'SAVE_OK') {\n\n // verifica se usuario ja tem esta oferta\n $params = array(\n 'OffersUser' => array(\n 'conditions' => array(\n 'offer_id' => $desejosOfferUpdate ['data'] ['UsersWishlistCompany'] ['offer_id'],\n 'user_id' => $desejosOfferUpdate ['data'] ['User'] ['id']\n )\n )\n );\n $offer_user = $this->Utility->urlRequestToGetData('users', 'first', $params);\n\n if (!is_array($offer_user)) {\n // salvando oferta para usuario\n $data = date('Y/m/d');\n $query = \"INSERT INTO offers_users values(NULL, '{$desejosOfferUpdate['data']['UsersWishlistCompany']['offer_id']}', '{$desejosOfferUpdate['data']['User']['id']}', '{$data}', 'facebook - portal')\";\n $params = array(\n 'User' => array(\n 'query' => $query\n )\n );\n $addUserOffer = $this->Utility->urlRequestToGetData('users', 'query', $params);\n }\n }\n }\n } else {\n echo \"<script>alert('email enviado com sucesso');</script>\";\n $this->redirect(array(\n 'controller' => 'companies',\n 'action' => 'addOffer',\n 'plugin' => 'companies',\n 'detalhes'\n ));\n }\n }\n }",
"function setData($id_recip, $id_offer, $expirationdate) {\n $this->setid_recipient($id_recip);\n $this->setid_offer($id_offer);\n $this->setExpirationDate($expirationdate);\n\n $this->setCode($this->getRandomCode());\n }",
"public function setSellerOfferDiscountByProductId($sellerId,$productId,$offerAmount, $offer_comment) {\n try {\n $rmaHelper = $this->_objectManager->create('Webkul\\MpRmaSystem\\Helper\\Data');\n $productSellerId = $rmaHelper->getSellerIdByproductid($productId);\n $response = [];\n $i = 0;\n if($sellerId == $productSellerId) {\n $likesByProductId = $this->_objectManager->create('Seasia\\Customapi\\Helper\\Data')->getLikesByProductId($productId);\n\n //echo '<pre>'; print_r($likesByProductId);die;\n if(is_array($likesByProductId)) {\n foreach($likesByProductId as $value) {\n $offerCollection = $this->_offerFactory->create();\n $offerCollection->setProductId($productId);\n $offerCollection->setSellerId($sellerId);\n $offerCollection->setBuyerId($value['entity_id']);\n $offerCollection->setOrderId(null);\n $offerCollection->setOfferAmount($offerAmount);\n $offerCollection->setStatus('pending');\n $offerCollection->setComment($offer_comment);\n $offerCollection->setCreatedAt(date(\"Y-m-d H:i:s\"));\n $offerCollection->setStripeToken(null);\n $offerCollection->setExpired(null);\n $offerCollection->setOfferUsed(null);\n $offerCollection->setOfferType('productOffer');\n $offerCollection->save();\n if($offerCollection->save()) {\n $offerId = $offerCollection->getId();\n $offer = $this->getOfferById($offerId);\n if($this->sendOfferMail(\"sent\", $offer)) {\n\n $notification_helper = $this->_objectManager->create(\n 'Seasia\\Customnotifications\\Helper\\Data'\n );\n\n $offerId = $offer->getId();\n $type = \"offer_received\";\n $buyer = $offer->getBuyerId();\n $seller = $offer->getSellerId();\n $message = 'Test';\n\n $notification_helper->setNotification($offerId,$type,$buyer,$seller,$message);\n // Send Notification To Buyer\n $i++;\n }\n }\n }\n }\n $response['status'] = \"Success \";\n $response['message'] = \"Discount set to offer successfully\";\n }\n return $this->getResponseFormat($response);\n } catch(\\Exception $e) {\n return $this->errorMessage($e);\n }\n }",
"function\tsetCustomerOfferNo( $_myCustomerOfferNo) {\n\t\tFDbg::begin( 1, basename( __FILE__), __CLASS__, __METHOD__.\"( '$_myCustomerOfferNo')\") ;\n\t\t$this->CustomerOfferNo\t=\t$_myCustomerOfferNo ;\n\t\tif ( strlen( $_myCustomerOfferNo) > 0) {\n\t\t\t$this->reload() ;\n\t\t}\n\t\tFDbg::end() ;\n\t}",
"public function setOfferDisplayName(?string $value): void {\n $this->getBackingStore()->set('offerDisplayName', $value);\n }",
"private function setWebsiteValue()\n {\n $value = $this->getData(self::$websiteAttributeCode);\n $list = $this->storeManager->getWebsites();\n $this->setCustomAttribute(self::$websiteAttributeCode, $list[$value]->getName());\n $this->setCustomAttribute(self::$websiteIdAttributeCode, $value);\n }",
"function setPrice($new_price)\n {\n $this->price = $new_price;\n }",
"public function offers()\n {\n return $this->hasMany('\\App\\Offer');\n }",
"public function getOffers()\n {\n return $this->offers;\n }",
"public function seller($value)\n {\n $this->setProperty('seller', $value);\n return $this;\n }",
"public function increaseOffersCount() {\n $this->user->increaseNumberOfOffers();\n }",
"public function setSalePriceAttribute($value)\n {\n $this->attributes['sale_price'] = Utils::numbersOnly($value);\n }",
"public function set( $option, $value );",
"private function writeOffers($offers)\n {\n $chunkOffers = array_chunk($offers, $this->chunk);\n foreach ($chunkOffers as $offers) {\n $this->xml = $this->loadXml();\n\n $this->offers = $this->xml->shop->offers;\n $this->addOffers($offers);\n\n $this->xml->asXML($this->tmpFile);\n }\n\n unset($this->offers);\n }",
"function setPrice($price)\n {\n $this->price = $price;\n }",
"public function show(Offer $offer)\n {\n\n }",
"public function massStatusAction()\n {\n $offerIds = $this->getRequest()->getParam('offer');\n if (!is_array($offerIds)) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('mfb_myflyingbox')->__('Please select offers.')\n );\n } else {\n try {\n foreach ($offerIds as $offerId) {\n $offer = Mage::getSingleton('mfb_myflyingbox/offer')->load($offerId)\n ->setStatus($this->getRequest()->getParam('status'))\n ->setIsMassupdate(true)\n ->save();\n }\n $this->_getSession()->addSuccess(\n $this->__('Total of %d offers were successfully updated.', count($offerIds))\n );\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('mfb_myflyingbox')->__('There was an error updating offers.')\n );\n Mage::logException($e);\n }\n }\n $this->_redirect('*/*/index');\n }",
"function setPrice( $value )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n $this->Price = $value;\n setType( $this->Price, \"double\" );\n }",
"public function updateOffer()\n {\n global $mysqli, $_POST;\n $offer_id = $_POST['offer_id'];\n $date_begin = date(\"Y-m-d\", strtotime($_POST[\"date_begin\"]));\n $date_end = date(\"Y-m-d\", strtotime($_POST[\"date_end\"]));\n $title = $mysqli->real_escape_string($_POST[\"title\"]);\n $subtitle = $mysqli->real_escape_string($_POST[\"subtitle\"]);\n $header = $mysqli->real_escape_string($_POST[\"header\"]);\n $footer = $mysqli->real_escape_string($_POST[\"footer\"]);\n $services = $mysqli->real_escape_string($_POST[\"services\"]);\n $description = $mysqli->real_escape_string($_POST[\"description\"]);\n $alias = $mysqli->real_escape_string($_POST[\"alias\"]);\n $type = $mysqli->real_escape_string($_POST[\"type\"]);\n $course = $mysqli->real_escape_string($_POST[\"course\"]);\n $status = $mysqli->real_escape_string($_POST[\"status\"]);\n $type_date = $mysqli->real_escape_string($_POST[\"type_date\"]);\n $discount = $mysqli->real_escape_string($_POST[\"discount\"]);\n $update_qry = \"UPDATE `offers` SET\n `date_begin`='\".$date_begin.\"',\n `date_end`='\".$date_end.\"',\n `title`='\".$title.\"',\n `subtitle`='\".$subtitle.\"',\n `header`='\".$header.\"',\n `footer`='\".$footer.\"',\n `services`='\".$services.\"',\n `description`='\".$description.\"',\n `alias`='\".$alias.\"',\n `type`='\".$type.\"',\n `course`='\".$course.\"',\n `status`='\".$status.\"',\n `type_date`='\".$type_date.\"',\n `discount`='\".$discount.\"',\n `updated_at` =NOW() WHERE id=\".$offer_id;\n $mysqli->query($update_qry);\n $mes = ($mysqli->affected_rows>=0)?1:0;\n $heading = $title.'<small> Typ: '.$type.'</small> '.$_POST[\"date_begin\"].' - '.$_POST[\"date_end\"];\n\n print json_encode(['success'=>$mes,\"heading\" =>$heading]);\n }",
"public function offers() {\n return $this->hasMany('Rockit\\Models\\Offer');\n }",
"function setItem_price($price){\n $this->item_price = $price;\n }",
"public function setPriceAttribute($value)\n {\n $this->attributes['price'] = $value * 100;\n }",
"public function getOffer_price()\n {\n return $this->offer_price;\n }",
"public function setPriceAttribute($value)\n {\n $this->attributes['price'] = $value*100;\n }",
"public function show(Offer $offer)\n {\n //\n }",
"public function show(Offer $offer)\n {\n //\n }",
"public function change()\n {\n $sellersTable = TableRegistry::get('Sellers');\n $sellerDataTable = TableRegistry::get('ProductSellerData');\n $sellers = $sellersTable->find()->toArray();\n foreach($sellers as $seller){\n\n $sellerData = $sellerDataTable->find()->where(['seller_id'=>$seller['id']])->order(['updated_on'=>'DESC'])->first();\n\n $query = $sellersTable->query();\n $query->update()\n ->set(['rating' => $sellerData->rating,'rating_count' => $sellerData->rating_count])\n ->where(['id' => $seller['id']])\n ->execute();\n }\n\n }",
"function makeOffer()\r\n {\r\n \r\n }",
"public function offers($sellerId, $pageNum, $length, $orderBy, $orderDir, $searchStr, $getData){\n try {\n $response = array();\n $responseArray = array();\n $offerModel = $this->_offerFactory->create();\n $key = \"\";\n if($getData == \"offermade\"){\n $key = \"buyer_id\";\n }else{\n $key = \"seller_id\";\n }\n\n\n $offerCollection = $offerModel->getCollection()\n ->addFieldToFilter($key, array('eq' => $sellerId))\n ;\n\n $offerCollection->getSelect()->where(\"(offer_used = '1' OR status = 'counter_offer') AND status != 'counter'\");\n\n // $joinTable = $this->_objectManager->create(\n // 'Webkul\\Agorae\\Model\\ResourceModel\\Mpfavouriteseller\\Collection'\n // )->getTable('customer_entity');\n\n\n $joinTable = $this->_objectManager->create(\n 'Webkul\\Agorae\\Model\\ResourceModel\\Mpfavouriteseller\\Collection'\n )->getTable('marketplace_userdata');\n\n\n\n if($getData == \"offermade\"){\n $offerCollection->getSelect()->joinLeft(\n $joinTable.' as cgf',\n 'main_table.seller_id = cgf.seller_id',\n array('shop_url as username')\n );\n }else{\n $offerCollection->getSelect()->joinLeft(\n $joinTable.' as cgf',\n 'main_table.buyer_id = cgf.seller_id',\n array('shop_url as username')\n );\n }\n\n\n\n $eavAttribute = $this->_objectManager->get(\n 'Magento\\Eav\\Model\\ResourceModel\\Entity\\Attribute'\n );\n $proAttId = $eavAttribute->getIdByCode('catalog_product', 'name');\n\n $catalogProductEntityVarchar = $this->_objectManager->create(\n 'Webkul\\Marketplace\\Model\\ResourceModel\\Product\\Collection'\n )->getTable('catalog_product_entity_varchar');\n\n\n $offerCollection->getSelect()->joinLeft($catalogProductEntityVarchar.' as cpev','main_table.product_id = cpev.entity_id', array('value as productName'))\n ->where('cpev.attribute_id = '.$proAttId);\n\n if($searchStr != \"\"){\n $offerCollection->getSelect()->where(\n 'shop_url like \"%'.$searchStr.'%\" OR value like \"%'.$searchStr.'%\" OR offer_amount like \"%'.$searchStr.'%\" OR status like \"%'.$searchStr.'%\"'\n );\n }\n\n $offerCollection->setPageSize($length)->setCurPage($pageNum);\n $offerCollection->setOrder($orderBy, $orderDir);\n $totalCount = $offerCollection->getSize();\n\n //echo $offerCollection->getSelect();\n\n //die(\"DDDDDDDDDDD\");\n\n $productArr = [];\n $i = 0;\n $j = 0;\n foreach($offerCollection as $collection){\n $partner = $this->_marketplacehelper->getSellerDataBySellerId($collection->getBuyerId())->getFirstItem();\n\n $seller = $this->_marketplacehelper->getSellerDataBySellerId($collection->getSellerId())->getFirstItem();\n\n $responseArray[$j] = $collection->getData();\n\n\n $now = date('Y-m-d H:i:s');\n $expiredDate = $this->offerhelper->getExpiredDate($collection->getCreatedAt());\n $t1 = strtotime( $expiredDate );\n $t2 = strtotime($now);\n\n $diff = $t1 - $t2;\n $hours = $diff / ( 60 * 60 );\n\n if($hours > 0){\n $status = $responseArray[$j]['status'];\n }else{\n $status = \"expired\";\n }\n $responseArray[$j]['status'] = $status;\n\n $productIds = explode(\",\",$collection->getProductId());\n if(count($productIds) > 0){\n $productNameArray = array();\n foreach ($productIds as $productId) {\n $productArr[$productId][$i] = $collection->getId();\n $i++;\n $product = $this->_productModel->load($productId);\n array_push($productNameArray, $product->getName());\n }\n $responseArray[$j]['productName'] = implode(\",\", $productNameArray);\n $responseArray[$j]['shop_url'] = $this->_marketplacehelper->getRewriteUrl(\n 'marketplace/seller/collection/shop/'.\n $seller->getShopUrl()\n );\n $responseArray[$j]['expired_at'] = $this->offerhelper->getExpiredDate($collection->getCreatedAt());\n\n }\n $j++;\n }\n //echo '<pre>'; print_r($responseArray);die;\n $finalArray = [];\n $idArray = [];\n $incr = 0;\n // if(!empty($productArr)) {\n // foreach($responseArray as $val) {\n // if(max($productArr[$val['product_id']]) == $val['id'] && !in_array($val['id'],$idArray)) {\n // $idArray[$incr++] = $val['id'];\n // array_push($finalArray, $val);\n // }\n // }\n // }\n //echo \"<pre>\"; print_r($responseArray);\n\n //die();\n $response['offers'] = $responseArray;\n $response['totalCount'] = $incr;\n return $this->getResponseFormat($response);\n } catch(\\Exception $e) {\n return $this->errorMessage($e);\n }\n }",
"public function update(OfferUpdateRequest $request, Offer $offer)\n {\n $codeIsNotUnique = Offer::query()\n ->where('code', $request->get('code'))\n ->where('id', '!=', $offer->id)\n ->exists();\n\n if ($codeIsNotUnique){\n return redirect()->back()\n ->withErrors(['code' => 'code must be unique.']);\n }\n\n $offer->update([\n 'code' => $request->get('code'),\n 'starts_at' => $request->get('starts_at'),\n 'expires_at' => $request->get('expires_at'),\n ]);\n\n return redirect(route('offers.index'));\n }",
"public function setOfferID($offerID)\n {\n if (C2PValidate::isInt($offerID)) {\n $this->offerID = (int) $offerID;\n } else {\n Utils::error(\"Bad value for offerID: \" . $offerID);\n }\n\n return $this;\n }",
"public function setPrice($value)\n {\n $this->price = $value;\n $this->recalculate();\n }",
"public function offers()\n {\n \t// hasMany(RelatedModel, foreignKeyOnRelatedModel = sp_id, localKey = sp_id)\n \treturn $this->hasMany('App\\Offer','sp_id','sp_id');\n }",
"public function setOffer_name($offer_name)\n {\n $this->offer_name = $offer_name;\n\n return $this;\n }",
"private function setDepositFromData()\n {\n if ($this->dataHasDeposit()) {\n $this->collection->items[$this->cart_hash]->deposit = $this->data['deposit'];\n $this->collection->deposit += $this->data['deposit'];\n }\n }",
"public function setPriceAttribute($value)\n {\n $this->attributes['price'] = Utils::numbersOnly($value);\n }",
"public function offer(){\n return $this->belongsTo('App\\Models\\Offer', 'offer_id', 'id');\n }",
"public function process_offer()\n {\n if (isset($_POST[$this->token . '_nonce']) && wp_verify_nonce($_POST[$this->token . '_nonce'], $this->token . '_submit_offer')) {\n global $wpdb;\n $quiz_id = sanitize_text_field($_POST['quiz_id']);\n $user_id = sanitize_text_field($_POST['user_id']);\n $last_name = sanitize_text_field($_POST['last_name']);\n $address = sanitize_text_field($_POST['address']);\n $address_2 = sanitize_text_field($_POST['address_2']);\n $city = sanitize_text_field($_POST['city']);\n $state = sanitize_text_field($_POST['state']);\n $zip_code = sanitize_text_field($_POST['zip_code']);\n $phone = sanitize_text_field($_POST['phone']);\n\n // Get the prospect data saved previously\n $subscriber = $wpdb->get_row('SELECT frontdesk_id, email FROM ' . $this->table_name . ' WHERE id = \\'' . $user_id . '\\' ORDER BY id DESC LIMIT 0,1');\n\n // Update the FrontDesk prospect if exists\n if ($subscriber->frontdesk_id != null) {\n $this->frontdesk->setApiKey(get_post_meta($quiz_id, 'api_key', true))\n ->updateProspect($subscriber->frontdesk_id, [\n 'email' => $subscriber->email,\n 'last_name' => $last_name,\n 'address' => $address,\n 'address_2' => $address_2,\n 'city' => $city,\n 'state' => $state,\n 'zip_code' => $zip_code,\n 'phone' => $phone\n ]);\n }\n\n // Update the prospect data\n $wpdb->query($wpdb->prepare(\n 'UPDATE ' . $this->table_name . '\n\t\t\t SET last_name = %s, address = %s, address2 = %s, phone = %s\n\t\t\t WHERE id = \\'' . $user_id . '\\'',\n [\n $last_name,\n $address . ', ' . $city . ', ' . $state . ' ' . $zip_code,\n $address_2,\n $phone\n ]\n ));\n\n echo json_encode('success');\n die();\n }\n }",
"public function testSetPrice()\n {\n $item = $this->addItem();\n $item->price = 3;\n\n $this->assertEquals(3, $item->price);\n\n $item->price = 3.52313123;\n $this->assertEquals(3.52313123, $item->price);\n\n $item->price = -123123.000;\n $this->assertEquals(-123123.000, $item->price);\n\n try {\n $item->price = 'a';\n $this->setExpectedException(\\LukePOLO\\LaraCart\\Exceptions\\InvalidPrice::class);\n } catch (\\LukePOLO\\LaraCart\\Exceptions\\InvalidPrice $e) {\n $this->assertEquals('The price must be a valid number', $e->getMessage());\n }\n }",
"public function setValue($value) {}",
"public function setValue($value) {}",
"public function setValue($value) {}",
"public function setValue($value) {}",
"public function setValue($value) {}",
"public function setValue($value) {}",
"public function setValue($value) {}",
"public function setValue($value) {}",
"public function setValue($value) {}",
"public function setValue($value) {}",
"public function setValue($value) {}",
"public function setValue($value) {}",
"public function setValue($value) {}",
"public function offerreceivedbyid($sellerId, $offerId){\n try{\n $response = array();\n $response['products'] = array();\n $response['buyer'] = array();\n $offerModel = $this->_offerFactory->create();\n $store = $this->_storemanager->getStore();\n $offerCollection = $offerModel->getCollection()\n ->addFieldToFilter('seller_id', array('eq' => $sellerId))\n ->addFieldToFilter('product_id', array('eq' => $offerId))\n //->addFieldToFilter('expired', array('eq' => '0'))\n //->addFieldToFilter('offer_used', array('eq' => '1'))\n ;\n $offerCollection->getSelect()->where(\"(offer_used = '1' OR status = 'counter_offer') AND status != 'counter' \");\n\n\n if($offerCollection->getSize() > 0){\n $productsArray = array();\n\n\n $productData = array();\n $product = $this->_productModel->load($offerId);\n $productData['name'] = $product->getName();\n $productData['description'] = $product->getDescription();\n $productData['original_price'] = $product->getCost();\n $productData['price'] = $product->getPriceInfo()->getPrice('regular_price')->getValue();\n $productData['imageUrl'] = $store->getBaseUrl(\\Magento\\Framework\\UrlInterface::URL_TYPE_MEDIA) . 'catalog/product' . $product->getImage();\n\n $productData['productUrl'] = $product->getProductUrl();\n\n array_push($productsArray, $productData);\n\n $buyerCollection = $offerModel->getCollection()\n ->addFieldToFilter('main_table.seller_id', array('eq' => $sellerId))\n ->addFieldToFilter('product_id', array('eq' => $offerId))\n //->addFieldToFilter('offer_used', array('eq' => '1'))\n ;\n $buyerCollection->getSelect()->where(\"(offer_used = '1' OR status = 'counter_offer') AND status != 'counter'\");\n $joinTable = $this->_objectManager->create(\n 'Webkul\\Agorae\\Model\\ResourceModel\\Mpfavouriteseller\\Collection'\n )->getTable('customer_entity');\n\n $buyerCollection->getSelect()->join(\n $joinTable.' as cgf',\n 'main_table.buyer_id = cgf.entity_id',\n array('firstname','lastname')\n );\n\n $sellerjoinTable = $this->_objectManager->create(\n 'Webkul\\Agorae\\Model\\ResourceModel\\Mpfavouriteseller\\Collection'\n )->getTable('marketplace_userdata');\n\n $buyerCollection->getSelect()->joinLeft(\n $sellerjoinTable.' as sgf',\n 'main_table.buyer_id = sgf.seller_id',\n array('shop_url as username')\n );\n $buyerCollection->setOrder(\"offer_amount\", \"desc\");\n\n\n\n $allBuyers = array();\n foreach ($buyerCollection as $eachBuyer) {\n $partner = $this->_marketplacehelper->getSellerDataBySellerId($eachBuyer->getBuyerId())->getFirstItem();\n $eachBuyerArray = array();\n $eachBuyerArray = $eachBuyer->getData();\n\n $now = date('Y-m-d H:i:s');\n $expiredDate = $this->offerhelper->getExpiredDate($eachBuyerArray['created_at']);\n $t1 = strtotime( $expiredDate );\n $t2 = strtotime($now);\n\n $diff = $t1 - $t2;\n $hours = $diff / ( 60 * 60 );\n\n if($hours > 0){\n $status = $eachBuyerArray['status'];\n }else{\n $status = \"expired\";\n }\n $eachBuyerArray['status'] = $status;\n $eachBuyerArray['shop_url'] =\"\";\n if($partner->getId()){\n $eachBuyerArray['shop_url'] = $this->_marketplacehelper->getRewriteUrl(\n 'marketplace/seller/collection/shop/'.\n $partner->getShopUrl()\n );\n }\n\n $eachBuyerArray['expired_at'] = $this->offerhelper->getExpiredDate($eachBuyer->getCreatedAt());\n\n\n array_push($allBuyers, $eachBuyerArray);\n }\n\n\n $response['products'] = $productsArray;\n $response['buyer'] = $allBuyers;\n\n\n\n }\n return $this->getResponseFormat($response);\n } catch(\\Exception $e) {\n return $this->errorMessage($e);\n }\n }",
"public function offers() {\n $data = date('Y-m-d');\n $limit = 10;\n $update = true;\n\n // total de ofertas\n $params = array(\n 'Offer' => array(\n 'conditions' => array(\n 'company_id' => $this->Session->read('CompanyLoggedIn.Company.id'),\n 'status ' => '<> DELETE'\n ),\n 'order' => array(\n 'Offer.id' => 'DESC'\n )\n )\n );\n $contador = $this->Utility->urlRequestToGetData('offers', 'count', $params);\n\n $arrayBusca = array(\n 'company_id' => $this->Session->read('CompanyLoggedIn.Company.id'),\n 'status <>' => 'DELETE'\n );\n // verifica se esta sendo feita uma busca\n if (!empty($this->request->data ['busca'])) {\n if ($this->request->data ['calendario-inicio'] != 'Data Inicial' && $this->request->data ['calendario-fim'] != 'Data Final') {\n $dataInicio = $this->Utility->formataData($this->request->data ['calendario-inicio']);\n $dataFinal = $this->Utility->formataData($this->request->data ['calendario-fim']);\n $arrayData = array(\n 'Offer.begins_at >= ' => $dataInicio,\n 'Offer.ends_at <= ' => $dataFinal\n );\n $arrayBusca = array_merge($arrayData, $arrayBusca);\n }\n if ($this->request->data ['titulo'] != 'Titulo') {\n $arrayProduto = array(\n 'Offer.title LIKE' => \"%{$this->request->data['titulo']}%\"\n );\n $arrayBusca = array_merge($arrayProduto, $arrayBusca);\n }\n }\n\n // verifica se esta fazendo uma requisicao ajax\n if (!empty($this->request->data ['limit'])) {\n $render = true;\n $this->layout = '';\n $limit = $_POST ['limit'] + 3;\n if ($limit > $contador) {\n $limit = $contador;\n $update = false;\n }\n }\n\n $params = array(\n 'Offer' => array(\n 'conditions' => $arrayBusca,\n 'order' => array(\n 'Offer.id' => 'DESC'\n ),\n 'limit' => $limit\n )\n );\n $company = $this->Utility->urlRequestToGetData('offers', 'all', $params);\n\n $this->set(compact('company', 'limit', 'contador', 'update'));\n if (!empty($render))\n $this->render('Elements/ajax_ofertas');\n }",
"public function setSellerSKU($value) \n {\n $this->_fields['SellerSKU']['FieldValue'] = $value;\n return $this;\n }",
"public function setValue($value);",
"public function setValue($value);",
"public function setValue($value);",
"public function setValue($value);",
"public function setValue($value);",
"public function setValue($value);",
"public function setValue($value);",
"public function setValue($value);",
"public function setValue($value);",
"public function setValue($value);",
"function setValue($value){\r\n\t\t$this->value = $value;\r\n\t}",
"public function setOfferSupplyModeFilter(?string $offerSupplyModeFilter = null): self\n {\n // validation for constraint: enumeration\n if (!\\SengentoBV\\CdiscountMarketplaceSdk\\Enums\\CdiscountOfferSupplyModeFilter::valueIsValid($offerSupplyModeFilter)) {\n throw new InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \\SengentoBV\\CdiscountMarketplaceSdk\\Enums\\CdiscountOfferSupplyModeFilter', is_array($offerSupplyModeFilter) ? implode(', ', $offerSupplyModeFilter) : var_export($offerSupplyModeFilter, true), implode(', ', \\SengentoBV\\CdiscountMarketplaceSdk\\Enums\\CdiscountOfferSupplyModeFilter::getValidValues())), __LINE__);\n }\n if (is_null($offerSupplyModeFilter) || (is_array($offerSupplyModeFilter) && empty($offerSupplyModeFilter))) {\n unset($this->OfferSupplyModeFilter);\n } else {\n $this->OfferSupplyModeFilter = $offerSupplyModeFilter;\n }\n \n return $this;\n }",
"public function getOfferSellerId()\n {\n return $this->offer_seller_id;\n }",
"public function updateSellIn(): void\n {\n $this->getItem()->sell_in--;\n }",
"public function setOfferReference($offer_reference)\n {\n $this->offer_reference = $offer_reference;\n }",
"function __construct($offers){\r\n $this->offers = $offers;\r\n $this->construct_xml_contain();\r\n $this->create_xml_file();\r\n }",
"public function set_value($value) {\n\t\t$this->_value = $value + 0;\n\t}",
"public function offers_get()\n\t{\n $token = $_SERVER['HTTP_TOKEN'];\n $data = array(\n 'status' => 0,\n 'code' => -1,\n 'msg' => 'Bad Request',\n 'data' => null\n );\n if($this->checkToken($token))\n {\n $offers = $this->Api_model->getOffers();\n if (isset($offers)) {\n $data = array(\n 'status' => 1,\n 'code' => 1,\n 'msg' => 'success',\n 'data' => $offers\n );\n }else{\n $data = array(\n 'status' => 1,\n 'code' => 1,\n 'msg' => 'success',\n 'data' => null\n );\n }\n }else\n {\n $data['msg'] = 'Request Unknown or Bad Request';\n }\n $this->response($data, REST_Controller::HTTP_OK);\n\t}"
] | [
"0.7673545",
"0.75685054",
"0.7160782",
"0.6967146",
"0.6418885",
"0.5921777",
"0.5772829",
"0.57594293",
"0.57505745",
"0.567738",
"0.5659733",
"0.5556572",
"0.5553627",
"0.5552125",
"0.5502171",
"0.5492526",
"0.5485541",
"0.5481147",
"0.54386353",
"0.5421234",
"0.54209334",
"0.5418276",
"0.5413927",
"0.5411276",
"0.5405173",
"0.5325867",
"0.53105634",
"0.53082687",
"0.53045154",
"0.52750385",
"0.5259995",
"0.5251552",
"0.52289397",
"0.5228914",
"0.52198684",
"0.52100104",
"0.5206408",
"0.51748765",
"0.5168842",
"0.51665074",
"0.51646495",
"0.51405597",
"0.51347893",
"0.5126614",
"0.5124343",
"0.5119921",
"0.5109228",
"0.5099214",
"0.5070926",
"0.5061085",
"0.5060141",
"0.504237",
"0.504237",
"0.50405884",
"0.5034198",
"0.50235754",
"0.5021837",
"0.5018892",
"0.4997321",
"0.4971905",
"0.49607053",
"0.49265885",
"0.4906885",
"0.49055687",
"0.49052075",
"0.49011004",
"0.48834988",
"0.48834988",
"0.4882896",
"0.4882896",
"0.4882896",
"0.4882896",
"0.4882896",
"0.4882896",
"0.4882896",
"0.4882896",
"0.4882896",
"0.4882896",
"0.4882896",
"0.48679122",
"0.4861941",
"0.4859569",
"0.4858526",
"0.4858526",
"0.4858526",
"0.4858526",
"0.4858526",
"0.4858526",
"0.4858526",
"0.4858526",
"0.4858526",
"0.4858526",
"0.48505446",
"0.4848955",
"0.48413673",
"0.48384544",
"0.48336488",
"0.48307037",
"0.48174536",
"0.4816864"
] | 0.6254397 | 5 |
Get the value of countries | public function getCountries()
{
return $this->countries;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getCountriesInfo();",
"public function getCountry();",
"public function getCountry();",
"public function getCountry() {}",
"public function getCountry() {}",
"public function getCountries();",
"public function getCountry()\n {\n return $this->getValueObject('country');\n }",
"public function getCountry()\n {\n return parent::getValue('country');\n }",
"public function getCountry()\n {\n $arr_countries = array(\n 'F' =>\t_('Austria'),\n 'T' =>\t_('Belgium'),\n 'D' =>\t_('Finland'),\n 'E' =>\t_('France'),\n 'L' =>\t_('France'),\n 'P' =>\t_('Germany'),\n 'R' =>\t_('Germany'),\n 'N' =>\t_('Greece'),\n 'K' =>\t_('Ireland'),\n 'J' =>\t_('Italy'),\n 'G' =>\t_('Netherlands'),\n 'H' =>\t_('United Kingdom'),\n 'U' =>\t_('Portugal'),\n 'M' =>\t_('Spain'),\n );\n\n return $arr_countries[$this->str_value[0]];\n }",
"public function getCountries() {\n\n $countries = civicrm_api3('Address', 'Getoptions', [\n 'field' => 'country_id',\n ]);\n return $countries['values'];\n }",
"public function getCountryName();",
"public function getAllCountriesProperty()\n {\n return Country::get();\n }",
"public function getCountries() {\n\t\treturn $this->getData('/objekt/laender');\n\t}",
"public function countryCode();",
"public function countries(): array\n {\n return $this->client->get(\"country\");\n }",
"public function getCountry(): string\n {\n return $this->result->country_name;\n }",
"public function getCountries()\n {\n return $this->_countries;\n }",
"public function getCountryList()\n {\n return $this->call('country.list');\n }",
"public static function getCountries()\n {\n return self::$countryList;\n }",
"function getCountry() {\r\r\n\t\treturn $this->country;\r\r\n\t}",
"public function getCountry() \n {\n return $this->country;\n }",
"public function get_countries()\n\t{\n\t\t$t_countries = xtc_get_countriesList();\n\t\treturn $t_countries;\n\t}",
"public function getCountry()\n {\n return $this->country;\n }",
"public function getCountry()\n {\n return $this->country;\n }",
"public function getCountry()\n {\n return $this->country;\n }",
"public function getCountry()\n {\n return $this->country;\n }",
"public function getCountry()\n {\n return $this->country;\n }",
"public function getCountry()\n {\n return $this->country;\n }",
"public function getCountry()\n {\n return $this->country;\n }",
"public function getCountry()\n {\n return $this->country;\n }",
"public function getCountry()\n {\n return $this->country;\n }",
"public function getCountry()\n {\n return $this->country;\n }",
"public function getCountry()\n {\n return $this->country;\n }",
"public function getCountry()\n {\n return $this->country;\n }",
"public function getCountry()\n {\n return $this->country;\n }",
"public function getCountry()\n {\n return $this->country;\n }",
"public function get_country_list() \n\t{\n\t\treturn $this->db->select('num_code')\n\t\t->select('country_name')\n\t\t->select('num_code')\n\t\t->from('system_iso3166_l10n')\n\t\t->order_by('country_name', 'ASC')\t\n\t\t->get()->result();\n\t}",
"static function get_countries() {\n static $ret = array();\n if(empty($ret)) {\n global $wpdb;\n $ret = $wpdb->get_results('SELECT * FROM ai_country ORDER BY name', OBJECT_K);\n }\n return $ret;\n }",
"public function getCountries()\n {\n return \"/V1/directory/countries\";\n }",
"public function getCountryList()\n {\n $countryList=array(\n 'BG'=>__('Bulgaria')\n 'DE'=>__('Germany'),\n 'GB'=>__('Great Britain'),\n );\n\n return $countryList;\n }",
"public function getCountry()\n {\n return $this->getParameter('country');\n }",
"public function country()\r\n\t{\r\n\t\t$country = \\Shop\\Models\\Countries::fromCode( $this->country_isocode_2 );\r\n\r\n\t\treturn $country;\r\n\t}",
"public function country_list()\n {\n $result = common_select_values('id, name', 'ad_countries', '', 'result');\n return $result; \n }",
"public function getCountryCode();",
"public static function countries(): array\n\t{\n\t\treturn ArrayLists::countries();\n\t}",
"public function getCountriesPerRegion();",
"function getSiteCountries() {\n global $dbAccess;\n $this->db = $dbAccess;\n $data = $this->db->SimpleQuery(\"SELECT * FROM \" . TBL_COUNTRIES . \" WHERE status='1' ORDER BY country_name\");\n\n return $data;\n }",
"public function getCountry()\n\t{\n\t\treturn $this->country;\n\t}",
"public function getCountry()\n\t{\n\t\treturn $this->country;\n\t}",
"public function countries(): array\n {\n $payload = Payload::list('countries');\n\n $result = $this->transporter->get($payload->uri)->throw();\n\n return (array) $result->json('data');\n }",
"function tep_get_countries_with_iso_codes($countries_id) {\n\treturn tep_get_countries($countries_id, true);\n}",
"protected static function country_code(): mixed\n\t{\n\t\treturn self::$query->country_code;\n\t}",
"public function getZoneCountriesProperty()\n {\n return Country::whereIn('id', $this->selectedCountries)->get();\n }",
"public function country_details() {\n $options = [\n 'projection' => [\n '_id' => 1,\n 'country_name' => 1,\n 'iso_country_code' => 1,\n 'telephone_code' => 1,\n 'currency_code' => 1,\n 'currency_symbol' => 1\n ],\n 'sort' => [\n 'country_name' => 1\n ]\n ];\n $res = $this->mongo_db->find(MDB_CSC, ['country_status' => 'A'], $options);\n\n return (!empty($res)) ? $res : array();\n }",
"public function getCountriesList() {\n return $this->_get(7);\n }",
"public function country(): string\n {\n return $this->country;\n }",
"function GetCountries()\n\t{\n\t\t$result = $this->sendRequest(\"GetCountries\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}",
"public function getCountry() {\n\t\treturn self::$_country;\n\t}",
"public function getCountry()\n {\n return isset($this->address_data['country']) ? $this->address_data['country'] : null;\n }",
"public function getCountry()\n {\n if (!array_key_exists('country', $this->userInfo)) {\n $this->getLocation();\n }\n\n return $this->getInfoVar('country');\n }",
"public function getCountries()\n {\n $uri = '/countries';\n $cacheKey = substr($uri, 1);\n\n $result = $this->cache->get($cacheKey);\n if ($result == null) {\n $result = $this->requestData($uri);\n if (!$result) {\n return false;\n }\n $this->cache->save($cacheKey, $result);\n }\n return $result;\n\n }",
"public static function getCountries()\n\t{\n\t\t$country[\"AFG\"] = Array(\"iso2\" => \"AF\", \"name\" => \"Afghanistan, Islamic Republic \");\n\t\t$country[\"ALA\"] = Array(\"iso2\" => \"AX\", \"name\" => \"Åland Islands\");\n\t\t$country[\"ALB\"] = Array(\"iso2\" => \"AL\", \"name\" => \"Albania, Republic of\");\n\t\t$country[\"DZA\"] = Array(\"iso2\" => \"DZ\", \"name\" => \"Algeria, People's Democratic Republic\");\n\t\t$country[\"ASM\"] = Array(\"iso2\" => \"AS\", \"name\" => \"American Samoa\");\n\t\t$country[\"AND\"] = Array(\"iso2\" => \"AD\", \"name\" => \"Andorra, Principality of\");\n\t\t$country[\"AGO\"] = Array(\"iso2\" => \"AO\", \"name\" => \"Angola, Republic of\");\n\t\t$country[\"AIA\"] = Array(\"iso2\" => \"AI\", \"name\" => \"Anguilla\");\n\t\t$country[\"ATA\"] = Array(\"iso2\" => \"AQ\", \"name\" => \"Antarctica (the territory Sout\");\n\t\t$country[\"ATG\"] = Array(\"iso2\" => \"AG\", \"name\" => \"Antigua and Barbuda\");\n\t\t$country[\"ARG\"] = Array(\"iso2\" => \"AR\", \"name\" => \"Argentina, Argentine Republic\");\n\t\t$country[\"ARM\"] = Array(\"iso2\" => \"AM\", \"name\" => \"Armenia, Republic of\");\n\t\t$country[\"ABW\"] = Array(\"iso2\" => \"AW\", \"name\" => \"Aruba\");\n\t\t$country[\"AUS\"] = Array(\"iso2\" => \"AU\", \"name\" => \"Australia, Commonwealth of\");\n\t\t$country[\"AUT\"] = Array(\"iso2\" => \"AT\", \"name\" => \"Austria, Republic of\");\n\t\t$country[\"AZE\"] = Array(\"iso2\" => \"AZ\", \"name\" => \"Azerbaijan, Republic of\");\n\t\t$country[\"BHS\"] = Array(\"iso2\" => \"BS\", \"name\" => \"Bahamas, Commonwealth of the\");\n\t\t$country[\"BHR\"] = Array(\"iso2\" => \"BH\", \"name\" => \"Bahrain, Kingdom of\");\n\t\t$country[\"BGD\"] = Array(\"iso2\" => \"BD\", \"name\" => \"Bangladesh, People's Republic \");\n\t\t$country[\"BRB\"] = Array(\"iso2\" => \"BB\", \"name\" => \"Barbados\");\n\t\t$country[\"BLR\"] = Array(\"iso2\" => \"BY\", \"name\" => \"Belarus, Republic of\");\n\t\t$country[\"BEL\"] = Array(\"iso2\" => \"BE\", \"name\" => \"Belgium, Kingdom of\");\n\t\t$country[\"BLZ\"] = Array(\"iso2\" => \"BZ\", \"name\" => \"Belize\");\n\t\t$country[\"BEN\"] = Array(\"iso2\" => \"BJ\", \"name\" => \"Benin, Republic of\");\n\t\t$country[\"BMU\"] = Array(\"iso2\" => \"BM\", \"name\" => \"Bermuda\");\n\t\t$country[\"BTN\"] = Array(\"iso2\" => \"BT\", \"name\" => \"Bhutan, Kingdom of\");\n\t\t$country[\"BOL\"] = Array(\"iso2\" => \"BO\", \"name\" => \"Bolivia, Republic of\");\n\t\t$country[\"BIH\"] = Array(\"iso2\" => \"BA\", \"name\" => \"Bosnia and Herzegovina\");\n\t\t$country[\"BWA\"] = Array(\"iso2\" => \"BW\", \"name\" => \"Botswana, Republic of\");\n\t\t$country[\"BVT\"] = Array(\"iso2\" => \"BV\", \"name\" => \"Bouvet Island (Bouvetoya)\");\n\t\t$country[\"BRA\"] = Array(\"iso2\" => \"BR\", \"name\" => \"Brazil, Federative Republic of\");\n\t\t$country[\"IOT\"] = Array(\"iso2\" => \"IO\", \"name\" => \"British Indian Ocean Territory\");\n\t\t$country[\"VGB\"] = Array(\"iso2\" => \"VG\", \"name\" => \"British Virgin Islands\");\n\t\t$country[\"BRN\"] = Array(\"iso2\" => \"BN\", \"name\" => \"Brunei Darussalam\");\n\t\t$country[\"BGR\"] = Array(\"iso2\" => \"BG\", \"name\" => \"Bulgaria, Republic of\");\n\t\t$country[\"BFA\"] = Array(\"iso2\" => \"BF\", \"name\" => \"Burkina Faso\");\n\t\t$country[\"BDI\"] = Array(\"iso2\" => \"BI\", \"name\" => \"Burundi, Republic of\");\n\t\t$country[\"KHM\"] = Array(\"iso2\" => \"KH\", \"name\" => \"Cambodia, Kingdom of\");\n\t\t$country[\"CMR\"] = Array(\"iso2\" => \"CM\", \"name\" => \"Cameroon, Republic of\");\n\t\t$country[\"CAN\"] = Array(\"iso2\" => \"CA\", \"name\" => \"Canada\");\n\t\t$country[\"CPV\"] = Array(\"iso2\" => \"CV\", \"name\" => \"Cape Verde, Republic of\");\n\t\t$country[\"CYM\"] = Array(\"iso2\" => \"KY\", \"name\" => \"Cayman Islands\");\n\t\t$country[\"CAF\"] = Array(\"iso2\" => \"CF\", \"name\" => \"Central African Republic\");\n\t\t$country[\"TCD\"] = Array(\"iso2\" => \"TD\", \"name\" => \"Chad, Republic of\");\n\t\t$country[\"CHL\"] = Array(\"iso2\" => \"CL\", \"name\" => \"Chile, Republic of\");\n\t\t$country[\"CHN\"] = Array(\"iso2\" => \"CN\", \"name\" => \"China, People's Republic of\");\n\t\t$country[\"CXR\"] = Array(\"iso2\" => \"CX\", \"name\" => \"Christmas Island\");\n\t\t$country[\"CCK\"] = Array(\"iso2\" => \"CC\", \"name\" => \"Cocos (Keeling) Islands\");\n\t\t$country[\"COL\"] = Array(\"iso2\" => \"CO\", \"name\" => \"Colombia, Republic of\");\n\t\t$country[\"COM\"] = Array(\"iso2\" => \"KM\", \"name\" => \"Comoros, Union of the\");\n\t\t$country[\"COD\"] = Array(\"iso2\" => \"CD\", \"name\" => \"Congo, Democratic Republic of \");\n\t\t$country[\"COG\"] = Array(\"iso2\" => \"CG\", \"name\" => \"Congo, Republic of the\");\n\t\t$country[\"COK\"] = Array(\"iso2\" => \"CK\", \"name\" => \"Cook Islands\");\n\t\t$country[\"CRI\"] = Array(\"iso2\" => \"CR\", \"name\" => \"Costa Rica, Republic of\");\n\t\t$country[\"CIV\"] = Array(\"iso2\" => \"CI\", \"name\" => \"Cote d'Ivoire, Republic of\");\n\t\t$country[\"HRV\"] = Array(\"iso2\" => \"HR\", \"name\" => \"Croatia, Republic of\");\n\t\t$country[\"CUB\"] = Array(\"iso2\" => \"CU\", \"name\" => \"Cuba, Republic of\");\n\t\t$country[\"CYP\"] = Array(\"iso2\" => \"CY\", \"name\" => \"Cyprus, Republic of\");\n\t\t$country[\"CZE\"] = Array(\"iso2\" => \"CZ\", \"name\" => \"Czech Republic\");\n\t\t$country[\"DNK\"] = Array(\"iso2\" => \"DK\", \"name\" => \"Denmark, Kingdom of\");\n\t\t$country[\"DJI\"] = Array(\"iso2\" => \"DJ\", \"name\" => \"Djibouti, Republic of\");\n\t\t$country[\"DMA\"] = Array(\"iso2\" => \"DM\", \"name\" => \"Dominica, Commonwealth of\");\n\t\t$country[\"DOM\"] = Array(\"iso2\" => \"DO\", \"name\" => \"Dominican Republic\");\n\t\t$country[\"ECU\"] = Array(\"iso2\" => \"EC\", \"name\" => \"Ecuador, Republic of\");\n\t\t$country[\"EGY\"] = Array(\"iso2\" => \"EG\", \"name\" => \"Egypt, Arab Republic of\");\n\t\t$country[\"SLV\"] = Array(\"iso2\" => \"SV\", \"name\" => \"El Salvador, Republic of\");\n\t\t$country[\"GNQ\"] = Array(\"iso2\" => \"GQ\", \"name\" => \"Equatorial Guinea, Republic of\");\n\t\t$country[\"ERI\"] = Array(\"iso2\" => \"ER\", \"name\" => \"Eritrea, State of\");\n\t\t$country[\"EST\"] = Array(\"iso2\" => \"EE\", \"name\" => \"Estonia, Republic of\");\n\t\t$country[\"ETH\"] = Array(\"iso2\" => \"ET\", \"name\" => \"Ethiopia, Federal Democratic R\");\n\t\t$country[\"FRO\"] = Array(\"iso2\" => \"FO\", \"name\" => \"Faroe Islands\");\n\t\t$country[\"FLK\"] = Array(\"iso2\" => \"FK\", \"name\" => \"Falkland Islands (Malvinas)\");\n\t\t$country[\"FJI\"] = Array(\"iso2\" => \"FJ\", \"name\" => \"Fiji, Republic of the Fiji Isl\");\n\t\t$country[\"FIN\"] = Array(\"iso2\" => \"FI\", \"name\" => \"Finland, Republic of\");\n\t\t$country[\"FRA\"] = Array(\"iso2\" => \"FR\", \"name\" => \"France, French Republic\");\n\t\t$country[\"GUF\"] = Array(\"iso2\" => \"GF\", \"name\" => \"French Guiana\");\n\t\t$country[\"PYF\"] = Array(\"iso2\" => \"PF\", \"name\" => \"French Polynesia\");\n\t\t$country[\"ATF\"] = Array(\"iso2\" => \"TF\", \"name\" => \"French Southern Territories\");\n\t\t$country[\"GAB\"] = Array(\"iso2\" => \"GA\", \"name\" => \"Gabon, Gabonese Republic\");\n\t\t$country[\"GMB\"] = Array(\"iso2\" => \"GM\", \"name\" => \"Gambia, Republic of the\");\n\t\t$country[\"GEO\"] = Array(\"iso2\" => \"GE\", \"name\" => \"Georgia\");\n\t\t$country[\"DEU\"] = Array(\"iso2\" => \"DE\", \"name\" => \"Germany, Federal Republic of\");\n\t\t$country[\"GHA\"] = Array(\"iso2\" => \"GH\", \"name\" => \"Ghana, Republic of\");\n\t\t$country[\"GIB\"] = Array(\"iso2\" => \"GI\", \"name\" => \"Gibraltar\");\n\t\t$country[\"GRC\"] = Array(\"iso2\" => \"GR\", \"name\" => \"Greece, Hellenic Republic\");\n\t\t$country[\"GRL\"] = Array(\"iso2\" => \"GL\", \"name\" => \"Greenland\");\n\t\t$country[\"GRD\"] = Array(\"iso2\" => \"GD\", \"name\" => \"Grenada\");\n\t\t$country[\"GLP\"] = Array(\"iso2\" => \"GP\", \"name\" => \"Guadeloupe\");\n\t\t$country[\"GUM\"] = Array(\"iso2\" => \"GU\", \"name\" => \"Guam\");\n\t\t$country[\"GTM\"] = Array(\"iso2\" => \"GT\", \"name\" => \"Guatemala, Republic of\");\n\t\t$country[\"GGY\"] = Array(\"iso2\" => \"GG\", \"name\" => \"Guernsey, Bailiwick of\");\n\t\t$country[\"GIN\"] = Array(\"iso2\" => \"GN\", \"name\" => \"Guinea, Republic of\");\n\t\t$country[\"GNB\"] = Array(\"iso2\" => \"GW\", \"name\" => \"Guinea-Bissau, Republic of\");\n\t\t$country[\"GUY\"] = Array(\"iso2\" => \"GY\", \"name\" => \"Guyana, Co-operative Republic \");\n\t\t$country[\"HTI\"] = Array(\"iso2\" => \"HT\", \"name\" => \"Haiti, Republic of\");\n\t\t$country[\"HMD\"] = Array(\"iso2\" => \"HM\", \"name\" => \"Heard Island and McDonald Isla\");\n\t\t$country[\"VAT\"] = Array(\"iso2\" => \"VA\", \"name\" => \"Holy See (Vatican City State)\");\n\t\t$country[\"HND\"] = Array(\"iso2\" => \"HN\", \"name\" => \"Honduras, Republic of\");\n\t\t$country[\"HKG\"] = Array(\"iso2\" => \"HK\", \"name\" => \"Hong Kong, Special Administrat\");\n\t\t$country[\"HUN\"] = Array(\"iso2\" => \"HU\", \"name\" => \"Hungary, Republic of\");\n\t\t$country[\"ISL\"] = Array(\"iso2\" => \"IS\", \"name\" => \"Iceland, Republic of\");\n\t\t$country[\"IND\"] = Array(\"iso2\" => \"IN\", \"name\" => \"India, Republic of\");\n\t\t$country[\"IDN\"] = Array(\"iso2\" => \"ID\", \"name\" => \"Indonesia, Republic of\");\n\t\t$country[\"IRN\"] = Array(\"iso2\" => \"IR\", \"name\" => \"Iran, Islamic Republic of\");\n\t\t$country[\"IRQ\"] = Array(\"iso2\" => \"IQ\", \"name\" => \"Iraq, Republic of\");\n\t\t$country[\"IRL\"] = Array(\"iso2\" => \"IE\", \"name\" => \"Ireland\");\n\t\t$country[\"IMN\"] = Array(\"iso2\" => \"IM\", \"name\" => \"Isle of Man\");\n\t\t$country[\"ISR\"] = Array(\"iso2\" => \"IL\", \"name\" => \"Israel, State of\");\n\t\t$country[\"ITA\"] = Array(\"iso2\" => \"IT\", \"name\" => \"Italy, Italian Republic\");\n\t\t$country[\"JAM\"] = Array(\"iso2\" => \"JM\", \"name\" => \"Jamaica\");\n\t\t$country[\"JPN\"] = Array(\"iso2\" => \"JP\", \"name\" => \"Japan\");\n\t\t$country[\"JEY\"] = Array(\"iso2\" => \"JE\", \"name\" => \"Jersey, Bailiwick of\");\n\t\t$country[\"JOR\"] = Array(\"iso2\" => \"JO\", \"name\" => \"Jordan, Hashemite Kingdom of\");\n\t\t$country[\"KAZ\"] = Array(\"iso2\" => \"KZ\", \"name\" => \"Kazakhstan, Republic of\");\n\t\t$country[\"KEN\"] = Array(\"iso2\" => \"KE\", \"name\" => \"Kenya, Republic of\");\n\t\t$country[\"KIR\"] = Array(\"iso2\" => \"KI\", \"name\" => \"Kiribati, Republic of\");\n\t\t$country[\"PRK\"] = Array(\"iso2\" => \"KP\", \"name\" => \"Korea, Democratic People's Rep\");\n\t\t$country[\"KOR\"] = Array(\"iso2\" => \"KR\", \"name\" => \"Korea, Republic of\");\n\t\t$country[\"KWT\"] = Array(\"iso2\" => \"KW\", \"name\" => \"Kuwait, State of\");\n\t\t$country[\"KGZ\"] = Array(\"iso2\" => \"KG\", \"name\" => \"Kyrgyz Republic\");\n\t\t$country[\"LAO\"] = Array(\"iso2\" => \"LA\", \"name\" => \"Lao People's Democratic Republ\");\n\t\t$country[\"LVA\"] = Array(\"iso2\" => \"LV\", \"name\" => \"Latvia, Republic of\");\n\t\t$country[\"LBN\"] = Array(\"iso2\" => \"LB\", \"name\" => \"Lebanon, Lebanese Republic\");\n\t\t$country[\"LSO\"] = Array(\"iso2\" => \"LS\", \"name\" => \"Lesotho, Kingdom of\");\n\t\t$country[\"LBR\"] = Array(\"iso2\" => \"LR\", \"name\" => \"Liberia, Republic of\");\n\t\t$country[\"LBY\"] = Array(\"iso2\" => \"LY\", \"name\" => \"Libyan Arab Jamahiriya\");\n\t\t$country[\"LIE\"] = Array(\"iso2\" => \"LI\", \"name\" => \"Liechtenstein, Principality of\");\n\t\t$country[\"LTU\"] = Array(\"iso2\" => \"LT\", \"name\" => \"Lithuania, Republic of\");\n\t\t$country[\"LUX\"] = Array(\"iso2\" => \"LU\", \"name\" => \"Luxembourg, Grand Duchy of\");\n\t\t$country[\"MAC\"] = Array(\"iso2\" => \"MO\", \"name\" => \"Macao, Special Administrative \");\n\t\t$country[\"MKD\"] = Array(\"iso2\" => \"MK\", \"name\" => \"Macedonia, the former Yugoslav\");\n\t\t$country[\"MDG\"] = Array(\"iso2\" => \"MG\", \"name\" => \"Madagascar, Republic of\");\n\t\t$country[\"MWI\"] = Array(\"iso2\" => \"MW\", \"name\" => \"Malawi, Republic of\");\n\t\t$country[\"MYS\"] = Array(\"iso2\" => \"MY\", \"name\" => \"Malaysia\");\n\t\t$country[\"MDV\"] = Array(\"iso2\" => \"MV\", \"name\" => \"Maldives, Republic of\");\n\t\t$country[\"MLI\"] = Array(\"iso2\" => \"ML\", \"name\" => \"Mali, Republic of\");\n\t\t$country[\"MLT\"] = Array(\"iso2\" => \"MT\", \"name\" => \"Malta, Republic of\");\n\t\t$country[\"MHL\"] = Array(\"iso2\" => \"MH\", \"name\" => \"Marshall Islands, Republic of \");\n\t\t$country[\"MTQ\"] = Array(\"iso2\" => \"MQ\", \"name\" => \"Martinique\");\n\t\t$country[\"MRT\"] = Array(\"iso2\" => \"MR\", \"name\" => \"Mauritania, Islamic Republic o\");\n\t\t$country[\"MUS\"] = Array(\"iso2\" => \"MU\", \"name\" => \"Mauritius, Republic of\");\n\t\t$country[\"MYT\"] = Array(\"iso2\" => \"YT\", \"name\" => \"Mayotte\");\n\t\t$country[\"MEX\"] = Array(\"iso2\" => \"MX\", \"name\" => \"Mexico, United Mexican States\");\n\t\t$country[\"FSM\"] = Array(\"iso2\" => \"FM\", \"name\" => \"Micronesia, Federated States o\");\n\t\t$country[\"MDA\"] = Array(\"iso2\" => \"MD\", \"name\" => \"Moldova, Republic of\");\n\t\t$country[\"MCO\"] = Array(\"iso2\" => \"MC\", \"name\" => \"Monaco, Principality of\");\n\t\t$country[\"MNG\"] = Array(\"iso2\" => \"MN\", \"name\" => \"Mongolia\");\n\t\t$country[\"MNE\"] = Array(\"iso2\" => \"ME\", \"name\" => \"Montenegro, Republic of\");\n\t\t$country[\"MSR\"] = Array(\"iso2\" => \"MS\", \"name\" => \"Montserrat\");\n\t\t$country[\"MAR\"] = Array(\"iso2\" => \"MA\", \"name\" => \"Morocco, Kingdom of\");\n\t\t$country[\"MOZ\"] = Array(\"iso2\" => \"MZ\", \"name\" => \"Mozambique, Republic of\");\n\t\t$country[\"MMR\"] = Array(\"iso2\" => \"MM\", \"name\" => \"Myanmar, Union of\");\n\t\t$country[\"NAM\"] = Array(\"iso2\" => \"NA\", \"name\" => \"Namibia, Republic of\");\n\t\t$country[\"NRU\"] = Array(\"iso2\" => \"NR\", \"name\" => \"Nauru, Republic of\");\n\t\t$country[\"NPL\"] = Array(\"iso2\" => \"NP\", \"name\" => \"Nepal, State of\");\n\t\t$country[\"ANT\"] = Array(\"iso2\" => \"AN\", \"name\" => \"Netherlands Antilles\");\n\t\t$country[\"NLD\"] = Array(\"iso2\" => \"NL\", \"name\" => \"Netherlands, Kingdom of the\");\n\t\t$country[\"NCL\"] = Array(\"iso2\" => \"NC\", \"name\" => \"New Caledonia\");\n\t\t$country[\"NZL\"] = Array(\"iso2\" => \"NZ\", \"name\" => \"New Zealand\");\n\t\t$country[\"NIC\"] = Array(\"iso2\" => \"NI\", \"name\" => \"Nicaragua, Republic of\");\n\t\t$country[\"NER\"] = Array(\"iso2\" => \"NE\", \"name\" => \"Niger, Republic of\");\n\t\t$country[\"NGA\"] = Array(\"iso2\" => \"NG\", \"name\" => \"Nigeria, Federal Republic of\");\n\t\t$country[\"NIU\"] = Array(\"iso2\" => \"NU\", \"name\" => \"Niue\");\n\t\t$country[\"NFK\"] = Array(\"iso2\" => \"NF\", \"name\" => \"Norfolk Island\");\n\t\t$country[\"MNP\"] = Array(\"iso2\" => \"MP\", \"name\" => \"Northern Mariana Islands, Comm\");\n\t\t$country[\"NOR\"] = Array(\"iso2\" => \"NO\", \"name\" => \"Norway, Kingdom of\");\n\t\t$country[\"OMN\"] = Array(\"iso2\" => \"OM\", \"name\" => \"Oman, Sultanate of\");\n\t\t$country[\"PAK\"] = Array(\"iso2\" => \"PK\", \"name\" => \"Pakistan, Islamic Republic of\");\n\t\t$country[\"PLW\"] = Array(\"iso2\" => \"PW\", \"name\" => \"Palau, Republic of\");\n\t\t$country[\"PSE\"] = Array(\"iso2\" => \"PS\", \"name\" => \"Palestinian Territory, Occupie\");\n\t\t$country[\"PAN\"] = Array(\"iso2\" => \"PA\", \"name\" => \"Panama, Republic of\");\n\t\t$country[\"PNG\"] = Array(\"iso2\" => \"PG\", \"name\" => \"Papua New Guinea, Independent \");\n\t\t$country[\"PRY\"] = Array(\"iso2\" => \"PY\", \"name\" => \"Paraguay, Republic of\");\n\t\t$country[\"PER\"] = Array(\"iso2\" => \"PE\", \"name\" => \"Peru, Republic of\");\n\t\t$country[\"PHL\"] = Array(\"iso2\" => \"PH\", \"name\" => \"Philippines, Republic of the\");\n\t\t$country[\"PCN\"] = Array(\"iso2\" => \"PN\", \"name\" => \"Pitcairn Islands\");\n\t\t$country[\"POL\"] = Array(\"iso2\" => \"PL\", \"name\" => \"Poland, Republic of\");\n\t\t$country[\"PRT\"] = Array(\"iso2\" => \"PT\", \"name\" => \"Portugal, Portuguese Republic\");\n\t\t$country[\"PRI\"] = Array(\"iso2\" => \"PR\", \"name\" => \"Puerto Rico, Commonwealth of\");\n\t\t$country[\"QAT\"] = Array(\"iso2\" => \"QA\", \"name\" => \"Qatar, State of\");\n\t\t$country[\"REU\"] = Array(\"iso2\" => \"RE\", \"name\" => \"Reunion\");\n\t\t$country[\"ROU\"] = Array(\"iso2\" => \"RO\", \"name\" => \"Romania\");\n\t\t$country[\"RUS\"] = Array(\"iso2\" => \"RU\", \"name\" => \"Russian Federation\");\n\t\t$country[\"RWA\"] = Array(\"iso2\" => \"RW\", \"name\" => \"Rwanda, Republic of\");\n\t\t$country[\"BLM\"] = Array(\"iso2\" => \"BL\", \"name\" => \"Saint Barthelemy\");\n\t\t$country[\"SHN\"] = Array(\"iso2\" => \"SH\", \"name\" => \"Saint Helena\");\n\t\t$country[\"KNA\"] = Array(\"iso2\" => \"KN\", \"name\" => \"Saint Kitts and Nevis, Federat\");\n\t\t$country[\"LCA\"] = Array(\"iso2\" => \"LC\", \"name\" => \"Saint Lucia\");\n\t\t$country[\"MAF\"] = Array(\"iso2\" => \"MF\", \"name\" => \"Saint Martin\");\n\t\t$country[\"SPM\"] = Array(\"iso2\" => \"PM\", \"name\" => \"Saint Pierre and Miquelon\");\n\t\t$country[\"VCT\"] = Array(\"iso2\" => \"VC\", \"name\" => \"Saint Vincent and the Grenadin\");\n\t\t$country[\"WSM\"] = Array(\"iso2\" => \"WS\", \"name\" => \"Samoa, Independent State of\");\n\t\t$country[\"SMR\"] = Array(\"iso2\" => \"SM\", \"name\" => \"San Marino, Republic of\");\n\t\t$country[\"STP\"] = Array(\"iso2\" => \"ST\", \"name\" => \"Sao Tome and Principe, Democra\");\n\t\t$country[\"SAU\"] = Array(\"iso2\" => \"SA\", \"name\" => \"Saudi Arabia, Kingdom of\");\n\t\t$country[\"SEN\"] = Array(\"iso2\" => \"SN\", \"name\" => \"Senegal, Republic of\");\n\t\t$country[\"SRB\"] = Array(\"iso2\" => \"RS\", \"name\" => \"Serbia, Republic of\");\n\t\t$country[\"SYC\"] = Array(\"iso2\" => \"SC\", \"name\" => \"Seychelles, Republic of\");\n\t\t$country[\"SLE\"] = Array(\"iso2\" => \"SL\", \"name\" => \"Sierra Leone, Republic of\");\n\t\t$country[\"SGP\"] = Array(\"iso2\" => \"SG\", \"name\" => \"Singapore, Republic of\");\n\t\t$country[\"SVK\"] = Array(\"iso2\" => \"SK\", \"name\" => \"Slovakia (Slovak Republic)\");\n\t\t$country[\"SVN\"] = Array(\"iso2\" => \"SI\", \"name\" => \"Slovenia, Republic of\");\n\t\t$country[\"SLB\"] = Array(\"iso2\" => \"SB\", \"name\" => \"Solomon Islands\");\n\t\t$country[\"SOM\"] = Array(\"iso2\" => \"SO\", \"name\" => \"Somalia, Somali Republic\");\n\t\t$country[\"ZAF\"] = Array(\"iso2\" => \"ZA\", \"name\" => \"South Africa, Republic of\");\n\t\t$country[\"SGS\"] = Array(\"iso2\" => \"GS\", \"name\" => \"South Georgia and the South Sa\");\n\t\t$country[\"ESP\"] = Array(\"iso2\" => \"ES\", \"name\" => \"Spain, Kingdom of\");\n\t\t$country[\"LKA\"] = Array(\"iso2\" => \"LK\", \"name\" => \"Sri Lanka, Democratic Socialis\");\n\t\t$country[\"SDN\"] = Array(\"iso2\" => \"SD\", \"name\" => \"Sudan, Republic of\");\n\t\t$country[\"SUR\"] = Array(\"iso2\" => \"SR\", \"name\" => \"Suriname, Republic of\");\n\t\t$country[\"SJM\"] = Array(\"iso2\" => \"SJ\", \"name\" => \"Svalbard & Jan Mayen Islands\");\n\t\t$country[\"SWZ\"] = Array(\"iso2\" => \"SZ\", \"name\" => \"Swaziland, Kingdom of\");\n\t\t$country[\"SWE\"] = Array(\"iso2\" => \"SE\", \"name\" => \"Sweden, Kingdom of\");\n\t\t$country[\"CHE\"] = Array(\"iso2\" => \"CH\", \"name\" => \"Switzerland, Swiss Confederati\");\n\t\t$country[\"SYR\"] = Array(\"iso2\" => \"SY\", \"name\" => \"Syrian Arab Republic\");\n\t\t$country[\"TWN\"] = Array(\"iso2\" => \"TW\", \"name\" => \"Taiwan\");\n\t\t$country[\"TJK\"] = Array(\"iso2\" => \"TJ\", \"name\" => \"Tajikistan, Republic of\");\n\t\t$country[\"TZA\"] = Array(\"iso2\" => \"TZ\", \"name\" => \"Tanzania, United Republic of\");\n\t\t$country[\"THA\"] = Array(\"iso2\" => \"TH\", \"name\" => \"Thailand, Kingdom of\");\n\t\t$country[\"TLS\"] = Array(\"iso2\" => \"TL\", \"name\" => \"Timor-Leste, Democratic Republ\");\n\t\t$country[\"TGO\"] = Array(\"iso2\" => \"TG\", \"name\" => \"Togo, Togolese Republic\");\n\t\t$country[\"TKL\"] = Array(\"iso2\" => \"TK\", \"name\" => \"Tokelau\");\n\t\t$country[\"TON\"] = Array(\"iso2\" => \"TO\", \"name\" => \"Tonga, Kingdom of\");\n\t\t$country[\"TTO\"] = Array(\"iso2\" => \"TT\", \"name\" => \"Trinidad and Tobago, Republic \");\n\t\t$country[\"TUN\"] = Array(\"iso2\" => \"TN\", \"name\" => \"Tunisia, Tunisian Republic\");\n\t\t$country[\"TUR\"] = Array(\"iso2\" => \"TR\", \"name\" => \"Turkey, Republic of\");\n\t\t$country[\"TKM\"] = Array(\"iso2\" => \"TM\", \"name\" => \"Turkmenistan\");\n\t\t$country[\"TCA\"] = Array(\"iso2\" => \"TC\", \"name\" => \"Turks and Caicos Islands\");\n\t\t$country[\"TUV\"] = Array(\"iso2\" => \"TV\", \"name\" => \"Tuvalu\");\n\t\t$country[\"UGA\"] = Array(\"iso2\" => \"UG\", \"name\" => \"Uganda, Republic of\");\n\t\t$country[\"UKR\"] = Array(\"iso2\" => \"UA\", \"name\" => \"Ukraine\");\n\t\t$country[\"ARE\"] = Array(\"iso2\" => \"AE\", \"name\" => \"United Arab Emirates\");\n\t\t$country[\"GBR\"] = Array(\"iso2\" => \"GB\", \"name\" => \"United Kingdom of Great Britain\");\n\t\t$country[\"USA\"] = Array(\"iso2\" => \"US\", \"name\" => \"United States of America\");\n\t\t$country[\"UMI\"] = Array(\"iso2\" => \"UM\", \"name\" => \"United States Minor Outlying I\");\n\t\t$country[\"VIR\"] = Array(\"iso2\" => \"VI\", \"name\" => \"United States Virgin Islands\");\n\t\t$country[\"URY\"] = Array(\"iso2\" => \"UY\", \"name\" => \"Uruguay, Eastern Republic of\");\n\t\t$country[\"UZB\"] = Array(\"iso2\" => \"UZ\", \"name\" => \"Uzbekistan, Republic of\");\n\t\t$country[\"VUT\"] = Array(\"iso2\" => \"VU\", \"name\" => \"Vanuatu, Republic of\");\n\t\t$country[\"VEN\"] = Array(\"iso2\" => \"VE\", \"name\" => \"Venezuela, Bolivarian Republic\");\n\t\t$country[\"VNM\"] = Array(\"iso2\" => \"VN\", \"name\" => \"Vietnam, Socialist Republic of\");\n\t\t$country[\"WLF\"] = Array(\"iso2\" => \"WF\", \"name\" => \"Wallis and Futuna\");\n\t\t$country[\"ESH\"] = Array(\"iso2\" => \"EH\", \"name\" => \"Western Sahara\");\n\t\t$country[\"YEM\"] = Array(\"iso2\" => \"YE\", \"name\" => \"Yemen\");\n\t\t$country[\"ZMB\"] = Array(\"iso2\" => \"ZM\", \"name\" => \"Zambia, Republic of\");\n\t\t$country[\"ZWE\"] = Array(\"iso2\" => \"ZW\", \"name\" => \"Zimbabwe, Republic of\");\n\t\t$country[\"0\"] = Array(\"iso2\" => \"0\", \"name\" => \"NO VALID COUNTRY\");\n\n\t\treturn $country;\n\t}",
"public function getCountry() : string\n {\n return $this->country;\n }",
"public function getCountries() {\n\n $result = $this->doRequest('v1.0/all-countries', 'GET');\n\n return $result;\n\n }",
"public static function getCountry(){\n $country = '';\n $ip = self::getClientIP();\n if ($ip != '') {\n $data = file_get_contents('http://freegeoip.net/json/' . $ip);\n $response = json_decode($data);\n $country = $response->country_code;\n }\n \n return $country;\n }",
"abstract public function country();",
"function get_country() {\n $sql = \"Select * FROM country\";\n $res = $this->mysqli->query($sql);\n $data = array();\n while ($row = $res->fetch_array(MYSQLI_ASSOC)) {\n $data[] = $row;\n }\n return $data;\n }",
"public function getCountries()\n {\n foreach (CountryStorage::getAll() as $id=>$content) {\n $key = $content->id;\n $value = $content->name;\n $countryoptions[$key] = $value;\n }\n return $countryoptions;\n }",
"public function getCountryList()\r\n {\r\n return $this->admin->sGetCountryList();\r\n }",
"public function getCountries()\n {\n if (is_null($this->_countries)) {\n $this->_countries = Mage::getModel('adminhtml/system_config_source_country')\n ->toOptionArray();\n }\n\n return $this->_countries;\n }",
"public function getAllCountryCodes() {\n\t\t$filter = new Filters\\Misc\\CountryCode();\n\t\treturn $filter->query->find();\n\t}",
"public function getCountryCode(): string;",
"function GetCountry()\n\t{\n\t\t$country = new Country();\n\t\treturn $country->Get($this->countryId);\n\t}",
"public function getCountry() : string {\n\t\t\treturn substr($this->value, 4, 2);\n\t\t}",
"public static function getCountries()\n\t{\n\t\t# MAX ID is 314 atm\n\t\treturn array(\n\t//\t\t'0' => array('Unknown Country', 'eng', '--', '--'),\n\t//\t\t\"666\" => array('Local Area Network', 'eng', '--', '--'),\n\t//\t\t'305' => array('Abkhazia', ''),\n\t//\t\t'306' => array('Akrotiri and Dhekelia', ),\n\t\t\t'100' => array('Afghanistan', 'per:pas', 'as', 'AF', 29121286),\n\t\t\t'301' => array('Aland Islands', 'swe', 'eu', 'AX', 0),\n\t\t\t'69' => array('Albania', 'alb', 'eu', 'AL', 2986952),\n\t\t\t'307' => array('Alderney', 'eng:fre', 'eu', 'GG', 0),\n\t\t\t'79' => array('Algeria', 'ara:ama:fre', 'af', 'DZ', 34586184),\n\t\t\t'101' => array('American Samoa', 'eng:sam', 'au', 'AS', 66432),\n\t\t\t'71' => array('Andorra', 'cat', 'eu', 'AD', 84525),\n\t\t\t'102' => array('Angola', 'por', 'af', 'AO', 13068161),\n\t\t\t'103' => array('Anguilla', 'eng', 'ma', 'AI', 14766),\n\t\t\t'104' => array('Antarctica', 'eng', 'an', 'AQ', 0),\n\t\t\t'105' => array('Antigua And Barbuda', 'eng', 'ma', 'AG', 86754),\n\t\t\t'29' => array('Argentina', 'spa', 'sa', 'AR', 41343201),\n\t\t\t'36' => array('Armenia', 'arm', 'as', 'AM', 2966802),\n\t\t\t'106' => array('Aruba', 'dut', 'ma', 'AW', 104589),\n\t\t\t'308' => array('Ascension Island', 'eng', 'am', 'AC', 0),\n\t\t\t'26' => array('Australia', 'eng', 'au', 'AU', 21515754),\n\t\t\t'22' => array('Austria', 'ger', 'eu', 'AT', 8214160),\n\t\t\t'46' => array('Azerbaijan', 'aze', 'as', 'AZ', 8303512),\n\t\t\t'107' => array('Bahamas', 'eng', 'ma', 'BS', 310426),\n\t\t\t'108' => array('Bahrain', 'ara', 'as', 'BH', 738004),\n\t\t\t'75' => array('Bangladesh', 'ben', 'as', 'BD', 156118464),\n\t\t\t'109' => array('Barbados', 'eng:baj', 'ma', 'BB', 285653),\n\t\t\t'110' => array('Belarus', 'rus:bel', 'eu', 'BY', 9612632),\n\t\t\t'23' => array('Belgium', 'fre:ger:dut', 'eu', 'BE', 10423493),\n\t\t\t'111' => array('Belize', 'eng:spa', 'ma', 'BZ', 314522),\n\t\t\t'112' => array('Benin', 'fre', 'af', 'BJ', 9056010),\n\t\t\t'113' => array('Bermuda', 'eng', 'ma', 'BM', 68265),\n\t\t\t'114' => array('Bhutan', 'dzo', 'as', 'BT', 699847),\n\t\t\t'115' => array('Bolivia', 'spa:que:aym', 'sa', 'BO', 9947418),\n\t\t\t'82' => array('Bosnia Herzegovina', 'bos:ser:cro', 'eu', 'BA', 4621598),\n\t\t\t'116' => array('Botswana', 'eng:set', 'af', 'BW', 2029307),\n\t\t\t'117' => array('Bouvet Island', 'eng', 'sa', 'BV', 0),\n\t\t\t'38' => array('Brazil', 'por', 'sa', 'BR', 201103330),\n\t\t\t'118' => array('British Indian Ocean Territory', 'eng', 'au', 'IO', 0),\n\t\t\t'119' => array('Brunei Darussalam', 'mal:bru', 'as', 'BN', 395027),\n\t\t\t'37' => array('Bulgaria', 'bul', 'eu', 'BG', 7148785),\n\t\t\t'120' => array('Burkina Faso', 'fre:ind', 'af', 'BF', 16241811),\n\t\t\t'121' => array('Burundi', 'kir:fre:swa', 'af', 'BI', 9863117),\n\t\t\t'122' => array('Cambodia', 'khm', 'as', 'KH', 14453680),\n\t\t\t'123' => array('Cameroon', 'fre:eng', 'af', 'CM', 19294149),\n\t\t\t'19' => array('Canada', 'eng:fre', 'na', 'CA', 33759742),\n\t\t\t'124' => array('Cape Verde', 'por', 'af', 'CV', 508659),\n\t\t\t'125' => array('Cayman Islands', 'eng', 'ma', 'KY', 50209),\n\t\t\t'126' => array('Central African Republic', 'fre:san', 'af', 'CF', 4844927),\n\t\t\t'127' => array('Chad', 'fre:ara', 'af', 'TD', 10543464),\n\t\t\t'63' => array('Chile', 'spa', 'sa', 'CL', 16746491),\n\t\t\t'47' => array('China', 'chi', 'as', 'CN', 1330141295),\n\t\t\t'128' => array('Christmas Islands', 'eng', 'au', 'CX', 1402),\n\t\t\t'129' => array('Cocos (Keeling) Islands', 'eng', 'au', 'CC', 596),\n\t\t\t'31' => array('Colombia', 'spa', 'sa', 'CO', 44205293),\n\t\t\t'130' => array('Comoros', 'ara:fre', 'af', 'KM', 773407),\n\t\t\t'131' => array('Congo', 'fre', 'af', 'CG', 4125916),\n\t\t\t'132' => array('Congo, The Democratic Republic Of The', 'fre:swa:lin:kon:tsh', 'af', 'CD', 70916439),\n\t\t\t'133' => array('Cook Islands', 'eng:mao', 'au', 'CK', 11488),\n\t\t\t'83' => array('Costa Rica', 'spa', 'ma', 'CR', 4516220),\n\t\t\t'134' => array('Côte d’Ivoire', 'fre', 'af', 'CI', 0),\n\t\t\t'48' => array('Croatia', 'cro', 'eu', 'HR', 4486881),\n\t\t\t'62' => array('Cuba', 'spa', 'ma', 'CU', 11477459),\n\t\t\t'76' => array('Cyprus', 'gre:tur', 'eu', 'CY', 1102677),\n\t\t\t'20' => array('Czech Republic', 'cze', 'eu', 'CZ', 10201707),\n\t\t\t'21' => array('Denmark', 'dan', 'eu', 'DK', 5515575),\n\t\t\t'135' => array('Djibouti', 'ara:fre:afa:som', 'af', 'DJ', 740528),\n\t\t\t'136' => array('Dominica', 'eng', 'ma', 'DM', 72813),\n\t\t\t'60' => array('Dominican Republic', 'spa', 'ma', 'DO', 9823821),\n\t\t\t'309' => array('East Timor', 'tet:por:inn:eng', 'as', 'TL', 1154625),\n\t\t\t'77' => array('Ecuador', 'spa', 'sa', 'EC', 14790608),\n\t\t\t'14' => array('Egypt', 'ara', 'af', 'EG', 80471869),\n\t\t\t'137' => array('El Salvador', 'spa', 'ma', 'SV', 6052064),\n\t\t\t'138' => array('Equatorial Guinea', 'spa:fre:por:fan:bub:ann', 'af', 'GQ', 650702),\n\t\t\t'139' => array('Eritrea', 'ara:tig', 'af', 'ER', 5792984),\n\t\t\t'140' => array('Estonia', 'est', 'eu', 'EE', 1291170),\n\t\t\t'141' => array('Ethiopia', 'amh', 'af', 'ET', 88013491),\n\t\t\t'142' => array('Falkland Islands (Malvinas)', 'eng', 'sa', 'FK', 3140),\n\t\t\t'143' => array('Faroe Islands', 'far:dan', 'eu', 'FO', 49057),\n\t\t\t'144' => array('Fiji', 'eng:bau:hit', 'au', 'FJ', 875983),\n\t\t\t'15' => array('Finland', 'fin:swe', 'eu', 'FI', 5255068),\n\t\t\t'16' => array('France', 'fre', 'eu', 'FR', 64768389),\n\t\t\t'146' => array('French Guiana', 'fre', 'sa', 'GF', 0),\n\t\t\t'147' => array('French Polynesia', 'fre:tah', 'au', 'PF', 291000),\n\t\t\t'148' => array('French Southern Territories', 'fre', 'an', 'TF', 0),\n\t\t\t'149' => array('Gabon', 'fre', 'af', 'GA', 1545255),\n\t\t\t'150' => array('Gambia', 'eng', 'af', 'GM', 1824158),\n\t\t\t'151' => array('Georgia', 'geo', 'eu', 'GE', 4600825),\n\t\t\t'17' => array('Germany', 'ger', 'eu', 'DE', 82282988),\n\t\t\t'152' => array('Ghana', 'eng', 'af', 'GH', 24339838),\n\t\t\t'153' => array('Gibraltar', 'eng:spa', 'eu', 'GI', 28877),\n\t\t\t'44' => array('Greece', 'gre', 'eu', 'GR', 10749943),\n\t\t\t'154' => array('Greenland', 'grl:dan', 'na', 'GL', 57637),\n\t\t\t'155' => array('Grenada', 'eng', 'ma', 'GD', 107818),\n\t\t\t'156' => array('Guadeloupe', 'fre', 'ma', 'GP', 0),\n\t\t\t'157' => array('Guam', 'eng:cha', 'au', 'GU', 0),\n\t\t\t'18' => array('Guatemala', 'spa', 'ma', 'GT', 13550440),\n\t\t\t'310' => array('Guernsey', 'eng:fre', 'eu', 'GG', 64775),\n\t\t\t'158' => array('Guinea', 'fre:cri', 'af', 'GN', 10324025),\n\t\t\t'159' => array('Guinea-Bissau', 'por:cri', 'af', 'GW', 1565126),\n\t\t\t'160' => array('Guyana', 'eng:hin', 'sa', 'GY', 748486),\n\t\t\t'161' => array('Haiti', 'fre:hai', 'ma', 'HT', 9648924),\n\t//\t\t'162' => array('Heard And McDonald Islands', 'HM),\n\t\t\t'163' => array('Holy See (Vatican City State)', 'ita', 'eu', 'VA', 0),\n\t\t\t'66' => array('Honduras', 'spa', 'ma', 'HN', 7989415),\n\t\t\t'164' => array('Hong Kong', 'chi:eng', 'as', 'HK', 7089705),\n\t\t\t'9' => array('Hungary', 'hun', 'eu', 'HU', 9992339),\n\t\t\t'10' => array('Iceland', 'ice', 'eu', 'IS', 308910),\n\t\t\t'33' => array('India', 'hin:eng', 'as', 'IN', 1173108018),\n\t\t\t'165' => array('Indonesia', 'inn', 'as', 'ID', 242968342),\n\t\t\t'55' => array('Iran', 'per:kur', 'as', 'IR', 76923300),\n\t\t\t'166' => array('Iraq', 'ara:kur', 'as', 'IQ', 29671605),\n\t\t\t'11' => array('Ireland', 'iri:eng', 'eu', 'IE', 4622917),\n\t\t\t'304' => array('Isle of Man', 'max:eng', 'eu', 'IM', 83859),\n\t\t\t'35' => array('Israel', 'heb:ara', 'as', 'IL', 7353985),\n\t\t\t'12' => array('Italy', 'ita', 'eu', 'IT', 58090681),\n\t\t\t'56' => array('Jamaica', 'eng', 'ma', 'JM', 2847232),\n\t\t\t'13' => array('Japan', 'jap', 'as', 'JP', 126804433),\n\t\t\t'303' => array('Jersey', 'eng:fre', 'eu', 'JE', 93363),\n\t\t\t'167' => array('Jordan', 'ara:eng', 'as', 'JO', 6407085),\n\t\t\t'168' => array('Kazakhstan', 'kaz:rus', 'as', 'KZ', 15460484),\n\t\t\t'169' => array('Kenya', 'swa:eng', 'af', 'KE', 40046566),\n\t\t\t'170' => array('Kiribati', 'eng:gil', 'au', 'KI', 99482),\n\t\t\t'171' => array('Korea, Democratic People\\'s Republic Of', 'kor', 'as', 'KP', 22757275),\n\t\t\t'172' => array('Korea, Republic Of', 'kor', 'as', 'KR', 48636068),\n\t\t\t'311' => array('Kosovo', 'alb:ser', 'eu', 'RS', 1815048),\n\t\t\t'173' => array('Kuwait', 'ara', 'as', 'KW', 2789132),\n\t\t\t'174' => array('Kyrgyzstan', 'kyr:rus', 'as', 'KG', 5508626),\n\t\t\t'175' => array('Lao People\\'s Democratic Republic', 'lao', 'as', 'LA', 6368162),\n\t\t\t'28' => array('Latvia', 'lat', 'eu', 'LV', 2217969),\n\t\t\t'40' => array('Lebanon', 'ara:fre:eng:arm', 'as', 'LB', 4125247),\n\t\t\t'176' => array('Lesotho', 'sso:eng', 'af', 'LS', 1919552),\n\t\t\t'177' => array('Liberia', 'eng', 'af', 'LR', 3685076),\n\t\t\t'178' => array('Libya', 'ara', 'af', 'LY', 6461454),\n\t\t\t'179' => array('Liechtenstein', 'ger', 'eu', 'LI', 35002),\n\t\t\t'30' => array('Lithuania', 'lit', 'eu', 'LT', 3545319),\n\t\t\t'53' => array('Luxembourg', 'lux:ger:fre', 'eu', 'LU', 497538),\n\t\t\t'180' => array('Macau', 'chi:por', 'as', 'MO', 567957),\n\t\t\t'64' => array('Macedonia, Republic of', 'mac', 'eu', 'MK', 2072086),\n\t\t\t'181' => array('Madagascar', 'mag:fre:eng', 'af', 'MG', 21281844),\n\t\t\t'182' => array('Malawi', 'eng:chw', 'af', 'MW', 15447500),\n\t\t\t'73' => array('Malaysia', 'mal', 'as', 'MY', 28274729),\n\t\t\t'78' => array('Maldives', 'dhi', 'af', 'MV', 395650),\n\t\t\t'183' => array('Mali', 'fre', 'af', 'ML', 13796354),\n\t\t\t'184' => array('Malta', 'mat:eng', 'eu', 'MT', 406771),\n\t\t\t'185' => array('Marshall Islands', 'mar:eng', 'au', 'MH', 65859),\n\t\t\t'186' => array('Martinique', 'fre', 'ma', 'MQ', 0),\n\t\t\t'187' => array('Mauritania', 'ara:fre', 'af', 'MR', 3205060),\n\t\t\t'188' => array('Mauritius', 'eng:fre', 'af', 'MU', 1294104),\n\t\t\t'189' => array('Mayotte', 'fre', 'af', 'YT', 231139),\n\t\t\t'42' => array('Mexico', 'spa', 'ma', 'MX', 112468855),\n\t\t\t'190' => array('Micronesia, Federated States Of', 'eng', 'au', 'FM', 107154),\n\t\t\t'191' => array('Moldova, Republic Of', 'mol:rus:ukr:gag', 'eu', 'MD', 4317483),\n\t\t\t'192' => array('Monaco', 'fre:moq', 'eu', 'MC', 30586),\n\t\t\t'80' => array('Montenegro', 'mon:ser:bos:alb:cro', 'eu', 'ME', 666730),\n\t\t\t'193' => array('Mongolia', 'mgl', 'as', 'MN', 3086918),\n\t\t\t'194' => array('Montserrat', 'eng', 'ma', 'MS', 5118),\n\t\t\t'74' => array('Morocco', 'ara', 'af', 'MA', 31627428),\n\t\t\t'195' => array('Mozambique', 'por', 'af', 'MZ', 22061451),\n\t\t\t'196' => array('Myanmar', 'bur', 'as', 'MM', 53414374),\n\t\t\t'197' => array('Namibia', 'eng:ger:afr:osh', 'af', 'NA', 2128471),\n\t\t\t'198' => array('Nauru', 'eng:nau', 'au', 'NR', 9267),\n\t\t\t'199' => array('Nepal', 'nep', 'as', 'NP', 28951852),\n\t\t\t'25' => array('Netherlands, The', 'dut', 'eu', 'NL', 16783092),\n\t\t\t'200' => array('Netherlands Antilles', 'dut:eng:pap', 'ma', 'AN', 228693),\n\t\t\t'201' => array('New Caledonia', 'fre', 'au', 'NC', 252352),\n\t\t\t'39' => array('New Zealand', 'mao:eng', 'au', 'NZ', 4252277),\n\t\t\t'202' => array('Nicaragua', 'spa', 'ma', 'NI', 5995928),\n\t\t\t'203' => array('Niger', 'fre', 'af', 'NE', 15878271),\n\t\t\t'204' => array('Nigeria', 'eng', 'af', 'NG', 152217341),\n\t\t\t'205' => array('Niue', 'niu:eng', 'au', 'NU', 1354),\n\t\t\t'206' => array('Norfolk Island', 'eng:nfk', 'au', 'NF', 2155),\n\t\t\t'207' => array('Northern Mariana Islands', 'eng:cha:car', 'au', 'MP', 48317),\n\t\t\t'6' => array('Norway', 'nor', 'eu', 'NO', 4676305),\n\t\t\t'208' => array('Oman', 'ara', 'as', 'OM', 2967717),\n\t\t\t'209' => array('Pakistan', 'urd', 'as', 'PK', 184404791),\n\t\t\t'210' => array('Palau', 'eng:pal', 'au', 'PW', 20879),\n\t\t\t'211' => array('Palestinian Territory, Occupied', 'ara', 'as', 'PS', 0),\n\t//\t\t'57' => array('Palestine', '', ''),\n\t\t\t'45' => array('Panama', 'spa', 'ma', 'PA', 3410676),\n\t\t\t'212' => array('Papua New Guinea', 'eng:tok:hir', 'au', 'PG', 6064515),\n\t\t\t'213' => array('Paraguay', 'spa:gua', 'sa', 'PY', 6375830),\n\t\t\t'67' => array('Peru', 'spa', 'sa', 'PE', 29907003),\n\t\t\t'54' => array('Philippines, The', 'fil:eng', 'as', 'PH', 99900177),\n\t\t\t'214' => array('Pitcairn Islands', 'eng:pit', 'ma', 'PN', 48),\n\t\t\t'7' => array('Poland', 'pol', 'eu', 'PL', 38463689),\n\t\t\t'8' => array('Portugal', 'por', 'eu', 'PT', 10735765),\n\t//\t\t'319' => array('Pridnestrovian Moldavian Republic', '', '', ''),\n\t\t\t'215' => array('Puerto Rico', 'spa:eng', 'ma', 'PR', 3978702),\n\t\t\t'216' => array('Qatar', 'ara', 'as', 'QA', 840926),\n\t\t\t'217' => array('Reunion', 'fre', 'eu', 'RE', 0),\n\t\t\t'27' => array('Romania', 'rom', 'eu', 'RO', 21959278),\n\t\t\t'32' => array('Russian Federation', 'rus', 'as', 'RU', 139390205),\n\t\t\t'218' => array('Rwanda', 'kin:fre:eng', 'af', 'RW', 11055976),\n\t\t\t'219' => array('Saint Kitts And Nevis', 'eng', 'ma', 'KN', 49898),\n\t\t\t'220' => array('Saint Lucia', 'eng:ant', 'ma', 'LC', 160922),\n\t\t\t'221' => array('Saint Vincent And The Grenadines', 'eng', 'ma', 'VC', 104217),\n\t\t\t'222' => array('Samoa', 'eng:sam', 'ma', 'WS', 192001),\n\t\t\t'223' => array('San Marino', 'ita', 'eu', 'SM', 31477),\n\t\t\t'224' => array('Sao Tome And Principe', 'por', 'af', 'ST', 175808),\n\t\t\t'59' => array('Saudi Arabia', 'ara', 'as', 'SA', 25731776),\n\t\t\t'225' => array('Senegal', 'fre:wol', 'af', 'SN', 12323252),\n\t\t\t'81' => array('Serbia', 'ser:hun:slo:rom:cro:alb', 'eu', 'RS', 7344847),\n\t\t\t#'312' => array('Serbia and Montenegro', 'ser', 'eu', 'CS', 0),\n\t\t\t'226' => array('Seychelles', 'eng:fre', 'af', 'SC', 88340),\n\t\t\t'227' => array('Sierra Leone', 'eng', 'af', 'SL', 5245695),\n\t\t\t'52' => array('Singapore', 'eng:mal:man:tam', 'as', 'SG', 4701069),\n\t\t\t'4' => array('Slovakia', 'slo', 'eu', 'SK', 5470306),\n\t\t\t'41' => array('Slovenia', 'slv', 'eu', 'SI', 2003136),\n\t\t\t'228' => array('Solomon Islands', 'eng', 'au', 'SB', 559198),\n\t\t\t'229' => array('Somalia', 'som:eng:ita:ara', 'af', 'SO', 10112453),\n\t\t\t'3' => array('South Africa', 'afr:zul:xho:nso:tsw:sot:tso', 'af', 'ZA', 49109107),\n\t\t\t'313' => array('South Georgia and the South Sandwich Islands', 'eng', 'sa', 'GS', 0),\n\t//\t\t'317' => array('South Ossetia, Republic of', '', '', ''),\n\t\t\t'233' => array('South Sudan', 'ara:eng', 'af', 'SS', 0),\n\t\t\t'5' => array('Spain', 'spa', 'eu', 'ES', 46505963),\n\t\t\t'230' => array('Sri Lanka', 'sin:tam', 'as', 'LK', 21513990),\n\t\t\t'231' => array('St. Helena', 'eng', 'ma', 'sa', 7670),\n\t\t\t'232' => array('St. Pierre And Miquelon', 'fre', 'na', 'pm', 0),\n\t\t\t'233' => array('Sudan', 'ara:eng', 'af', 'SD', 43939598),\n\t\t\t'235' => array('Suriname', 'dut:sra', 'af', 'SR', 486618),\n\t//\t\t'236' => array('Svalbard And Jan Mayen Islands'), 2 COUNTRIES\n\t\t\t'237' => array('Swaziland', 'eng:swt', 'af', 'SZ', 1354051),\n\t\t\t'24' => array('Sweden', 'swe', 'eu', 'SE', 9074055),\n\t\t\t'43' => array('Switzerland', 'ger:fre:ita:rom', 'eu', 'CH', 7623438),\n\t\t\t'240' => array('Syrian Arab Republic', 'syr', 'as', 'SY', 22198110),\n\t\t\t'300' => array('Taiwan', 'tai:chi', 'as', 'TW', 23024956),\n\t\t\t'241' => array('Tajikistan', 'taj', 'as', 'TJ', 7487489),\n\t\t\t'242' => array('Tanzania, United Republic Of', 'swa:eng', 'af', 'TZ', 0),\n\t\t\t'65' => array('Thailand', 'tha', 'as', 'TH', 67089500),\n\t\t\t'243' => array('Timor-Leste', 'tet:por', 'au', 'tl', 0),\n\t\t\t'244' => array('Togo', 'fre', 'af', 'TG', 6587239),\n\t\t\t'245' => array('Tokelau', 'tol:eng', 'au', 'TK', 1400),\n\t\t\t'246' => array('Tonga', 'ton:eng', 'au', 'TO', 122580),\n\t\t\t'34' => array('Trinidad & Tobago', 'eng:spa', 'ma', 'TT', 1228691),\n\t\t\t'320' => array('Tristan da Cunha', 'eng', 'af', 'SH', 0),\n\t\t\t'70' => array('Tunisia', 'ara', 'af', 'TN', 10589025),\n\t\t\t'61' => array('Turkey', 'tur', 'as', 'TR', 77804122),\n\t\t\t'247' => array('Turkmenistan', 'tkm:rus:uzb:dar', 'as', 'TM', 4940916),\n\t\t\t'248' => array('Turks And Caicos Islands', 'eng', 'ma', 'TC', 23528),\n\t\t\t'249' => array('Tuvalu', 'tuv', 'au', 'TV', 10472),\n\t\t\t'250' => array('Uganda', 'eng:swa', 'af', 'UG', 33398682),\n\t\t\t'58' => array('Ukraine', 'ukr', 'eu', 'UA', 45415596),\n\t\t\t'251' => array('United Arab Emirates', 'ara', 'as', 'AE', 4975593),\n\t\t\t'2' => array('United Kingdom', 'eng', 'eu', 'GB', 62348447),\n\t\t\t'1' => array('United States', 'eng', 'na', 'US', 310232863),\n\t\t\t'252' => array('United States Minor Outlying Islands', 'eng', 'ma', 'UM', 0),\n\t\t\t'68' => array('Uruguay', 'spa', 'sa', 'UY', 3510386),\n\t\t\t'253' => array('Uzbekistan', 'uzb', 'as', 'UZ', 27865738),\n\t\t\t'254' => array('Vanuatu', 'bis:eng:fre', 'au', 'VU', 221552),\n\t\t\t'49' => array('Venezuela', 'spa', 'sa', 'VE', 27223228),\n\t\t\t'50' => array('Vietnam', 'vie', 'as', 'VN', 89571130),\n\t\t\t'255' => array('Virgin Islands (British)', 'eng', 'ma', 'VG', 24939),\n\t\t\t'256' => array('Virgin Islands (U.S.)', 'eng', 'ma', 'VI', 109750),\n\t\t\t'257' => array('Wallis And Futuna Islands', 'fre:uve:fut', 'au', 'WF', 0),\n\t\t\t'258' => array('Western Sahara', 'ara:spa', 'af', 'eh', 491519),\n\t\t\t'259' => array('Yemen', 'ara', 'as', 'YE', 23495361),\n\t\t\t'260' => array('Zambia', 'eng', 'af', 'ZM', 13460305),\n\t\t\t'270' => array('Zimbabwe', 'eng:sho:sid', 'af', 'ZW', 11651858),\n\t\t);\t\n\t}",
"public function getCountry() :string\n {\n return $this->country;\n }",
"public function getAllCountries() {\n return $this->_countries->pluck ( 'name', 'code','id','flag');\n }",
"public function getCountryInfo($countryId);",
"public function getCountryList() {\n $result = array();\n $collection = Mage::getModel('directory/country')->getCollection();\n foreach ($collection as $country) {\n $cid = $country->getId();\n $cname = $country->getName();\n $result[$cid] = $cname;\n }\n return $result;\n }",
"public function getCountry()\n {\n return $this->getParameter('billingCountry');\n }",
"public function getCountryOptions() {\n\t\treturn array(\n \"us\" => \"United States\",\n \"uk\" => \"United Kingdom\",\n \"ca\" => \"Canada\",\n );\n }",
"public function sGetCountryList()\n {\n $context = Shopware()->Container()->get('shopware_storefront.context_service')->getShopContext();\n $service = Shopware()->Container()->get('shopware_storefront.location_service');\n\n $countryList = $service->getCountries($context);\n $countryList = Shopware()->Container()->get('legacy_struct_converter')->convertCountryStructList($countryList);\n\n $countryList = array_map(function ($country) {\n $request = $this->front->Request();\n $countryId = (int) $country['id'];\n $country['flag'] = ((int) $request->getPost('country') === $countryId || (int) $request->getPost('countryID') === $countryId);\n\n return $country;\n }, $countryList);\n\n $countryList = $this->eventManager->filter(\n 'Shopware_Modules_Admin_GetCountries_FilterResult',\n $countryList,\n ['subject' => $this]\n );\n\n return $countryList;\n }",
"public function getCountriesProperty()\n {\n return Country::where('name', 'LIKE', \"%{$this->searchTerm}%\")\n ->whereNotIn('id', $this->selectedCountries)->get();\n }",
"public function getCountry()\n {\n $this->db->select('*');\n $this->db->from('1w_tbl_country');\n return $this->db->get()->result_array();\n }",
"function tep_get_countries($default = '') {\n $countries_array = array();\n if ($default) {\n $countries_array[] = array('id' => '',\n 'text' => $default);\n }\n\n $Qcountries = Registry::get('Db')->get('countries', ['countries_id', 'countries_name'], null, 'countries_name');\n\n while ($Qcountries->fetch()) {\n $countries_array[] = [\n 'id' => $Qcountries->valueInt('countries_id'),\n 'text' => $Qcountries->value('countries_name')\n ];\n }\n\n return $countries_array;\n }",
"public function GetCountries(){\n try {\n \n // $country=new Countries();\n $countries=Countries::model()->GetCountries();\n return $countries;\n \n } catch (Exception $ex) {\n Yii::log(\"SkiptaUserService:GetCountries::\".$ex->getMessage().\"--\".$ex->getTraceAsString(), 'error', 'application');\n }\n }",
"function get_state_options_by_country($country) {\r\n\r\n /* $states = [\"India\" =>[ \"Tamil Nadu\",\"Kerala\", \"Andra Pradesh\" , \"Telungana\", \"Karnataka\"]];\r\n $options = $states[$country]; \r\n\treturn $options; */\r\n}",
"public function getCountriesNames() {\n $query = \\Drupal::entityQuery('taxonomy_term');\n $query->condition('vid', 'country');\n $result = $query->execute();\n\n $countries = Term::loadMultiple($result);\n $countries_list = []; \n foreach ($countries as $country) {\n $countries_list[$country->id()] = $country->name->value;\n }\n\n return $countries_list;\n }",
"function getAllCountries() {\n $myModel = new My_Model();\n $result = $myModel->select('countries', \"*\", null);\n if (count($result) > 1) {\n return $result = [\n \"message\" => \"countries list\",\n \"data\" => $result\n ];\n } else {\n return $resp = [\n \"message\" => \"no country available\",\n \"data\" => \"null\"\n ];\n }\n }",
"public function getCountries() {\n $db = database::getDB();\n $query = \"SELECT country FROM countries ORDER BY id\";\n $data = $db->query($query);\n return $data;\n }",
"function getcountries() {\n\t\t// import the country DB\n\t\t$cntArray = array();\t \n\t\tApp::import(\"Model\",\"Country\");\n\t\t$this->Country=& new Country();\n\t\t$country = $this->Country->find('all', array('conditions'=>array('Country.status'=>'1'), 'fields'=>array('Country.id','Country.country_name')));\n\t\tforeach($country as $cat){\n\t\t\t$cntArray[$cat['Country']['id']] = $cat['Country']['country_name'];\n\t\t}\n\t\treturn $cntArray;\n\t}",
"public function countryOptionList();",
"function country_list()\t{\r\n\t\t$list = array(\r\n\t\t\t'AF' => 'Afghanistan',\r\n\t\t\t'AX' => 'Aland Island (Finland)',\r\n\t\t\t'AL' => 'Albania',\r\n\t\t\t'DZ' => 'Algeria',\r\n\t\t\t'AD' => 'Andorra',\r\n\t\t\t'AO' => 'Angola',\r\n\t\t\t'AI' => 'Anguilla',\r\n\t\t\t'AG' => 'Antigua and Barbuda',\r\n\t\t\t'AR' => 'Argentina',\r\n\t\t\t'AM' => 'Armenia',\r\n\t\t\t'AW' => 'Aruba',\r\n\t\t\t'AU' => 'Australia',\r\n\t\t\t'AT' => 'Austria',\r\n\t\t\t'AZ' => 'Azerbaijan',\r\n\t\t\t'BS' => 'Bahamas',\r\n\t\t\t'BH' => 'Bahrain',\r\n\t\t\t'BD' => 'Bangladesh',\r\n\t\t\t'BB' => 'Barbados',\r\n\t\t\t'BY' => 'Belarus',\r\n\t\t\t'BE' => 'Belgium',\r\n\t\t\t'BZ' => 'Belize',\r\n\t\t\t'BJ' => 'Benin',\r\n\t\t\t'BM' => 'Bermuda',\r\n\t\t\t'BT' => 'Bhutan',\r\n\t\t\t'BO' => 'Bolivia',\r\n\t\t\t'BQ' => 'Bonaire (Netherlands Antilles)',\r\n\t\t\t'BA' => 'Bosnia-Herzegovina',\r\n\t\t\t'BW' => 'Botswana',\r\n\t\t\t'BR' => 'Brazil',\r\n\t\t\t'VG' => 'British Virgin Islands',\r\n\t\t\t'BN' => 'Brunei Darussalam',\r\n\t\t\t'BG' => 'Bulgaria',\r\n\t\t\t'BF' => 'Burkina Faso',\r\n\t\t\t'MM' => 'Burma',\r\n\t\t\t'BI' => 'Burundi',\r\n\t\t\t'KH' => 'Cambodia',\r\n\t\t\t'CM' => 'Cameroon',\r\n\t\t\t'CA' => 'Canada',\r\n\t\t\t'CV' => 'Cape Verde',\r\n\t\t\t'KY' => 'Cayman Islands',\r\n\t\t\t'CF' => 'Central African Republic',\r\n\t\t\t'TD' => 'Chad',\r\n\t\t\t'CL' => 'Chile',\r\n\t\t\t'CN' => 'China',\r\n\t\t\t'CX' => 'Christmas Island (Australia)',\r\n\t\t\t'CC' => 'Cocos Island (Australia)',\r\n\t\t\t'CO' => 'Colombia',\r\n\t\t\t'KM' => 'Comoros',\r\n\t\t\t'CG' => 'Congo, Republic of the',\r\n\t\t\t'CD' => 'Congo, Democratic Republic of the',\r\n\t\t\t'CK' => 'Cook Islands (New Zealand)',\r\n\t\t\t'CR' => 'Costa Rica',\r\n\t\t\t'CI' => 'Cote d\\'Ivoire',\r\n\t\t\t'HR' => 'Croatia',\r\n\t\t\t'CU' => 'Cuba',\r\n\t\t\t'CW' => 'Curacao (Netherlands Antilles)',\r\n\t\t\t'CY' => 'Cyprus',\r\n\t\t\t'CZ' => 'Czech Republic',\r\n\t\t\t'DK' => 'Denmark',\r\n\t\t\t'DJ' => 'Djibouti',\r\n\t\t\t'DM' => 'Dominica',\r\n\t\t\t'DO' => 'Dominican Republic',\r\n\t\t\t'TL' => 'East Timor (Indonesia)',\r\n\t\t\t'EC' => 'Ecuador',\r\n\t\t\t'EG' => 'Egypt',\r\n\t\t\t'SV' => 'El Salvador',\r\n\t\t\t'GQ' => 'Equatorial Guinea',\r\n\t\t\t'ER' => 'Eritrea',\r\n\t\t\t'EE' => 'Estonia',\r\n\t\t\t'ET' => 'Ethiopia',\r\n\t\t\t'FK' => 'Falkland Islands',\r\n\t\t\t'FO' => 'Faroe Islands',\r\n\t\t\t'FJ' => 'Fiji',\r\n\t\t\t'FI' => 'Finland',\r\n\t\t\t'FR' => 'France',\r\n\t\t\t'GF' => 'French Guiana',\r\n\t\t\t'PF' => 'French Polynesia',\r\n\t\t\t'GA' => 'Gabon',\r\n\t\t\t'GM' => 'Gambia',\r\n\t\t\t'GE' => 'Georgia, Republic of',\r\n\t\t\t'DE' => 'Germany',\r\n\t\t\t'GH' => 'Ghana',\r\n\t\t\t'GI' => 'Gibraltar',\r\n\t\t\t'GB' => 'Great Britain and Northern Ireland',\r\n\t\t\t'GR' => 'Greece',\r\n\t\t\t'GL' => 'Greenland',\r\n\t\t\t'GD' => 'Grenada',\r\n\t\t\t'GP' => 'Guadeloupe',\r\n\t\t\t'GT' => 'Guatemala',\r\n\t\t\t'GG' => 'Guernsey',\r\n\t\t\t'GN' => 'Guinea',\r\n\t\t\t'GW' => 'Guinea-Bissau',\r\n\t\t\t'GY' => 'Guyana',\r\n\t\t\t'HT' => 'Haiti',\r\n\t\t\t'HN' => 'Honduras',\r\n\t\t\t'HK' => 'Hong Kong',\r\n\t\t\t'HU' => 'Hungary',\r\n\t\t\t'IS' => 'Iceland',\r\n\t\t\t'IN' => 'India',\r\n\t\t\t'ID' => 'Indonesia',\r\n\t\t\t'IR' => 'Iran',\r\n\t\t\t'IQ' => 'Iraq',\r\n\t\t\t'IE' => 'Ireland',\r\n\t\t\t'IM' => 'Isle of Man (Great Britain and Northern Ireland)',\r\n\t\t\t'IL' => 'Israel',\r\n\t\t\t'IT' => 'Italy',\r\n\t\t\t'JM' => 'Jamaica',\r\n\t\t\t'JP' => 'Japan',\r\n\t\t\t'JE' => 'Jersey (Channel Islands) (Great Britain and Northern Ireland)',\r\n\t\t\t'JO' => 'Jordan',\r\n\t\t\t'KZ' => 'Kazakhstan',\r\n\t\t\t'KE' => 'Kenya',\r\n\t\t\t'KI' => 'Kiribati',\r\n\t\t\t'KW' => 'Kuwait',\r\n\t\t\t'KG' => 'Kyrgyzstan',\r\n\t\t\t'LA' => 'Laos',\r\n\t\t\t'LV' => 'Latvia',\r\n\t\t\t'LB' => 'Lebanon',\r\n\t\t\t'LS' => 'Lesotho',\r\n\t\t\t'LR' => 'Liberia',\r\n\t\t\t'LY' => 'Libya',\r\n\t\t\t'LI' => 'Liechtenstein',\r\n\t\t\t'LT' => 'Lithuania',\r\n\t\t\t'LU' => 'Luxembourg',\r\n\t\t\t'MO' => 'Macao',\r\n\t\t\t'MK' => 'Macedonia, Republic of',\r\n\t\t\t'MG' => 'Madagascar',\r\n\t\t\t'MW' => 'Malawi',\r\n\t\t\t'MY' => 'Malaysia',\r\n\t\t\t'MV' => 'Maldives',\r\n\t\t\t'ML' => 'Mali',\r\n\t\t\t'MT' => 'Malta',\r\n\t\t\t'MQ' => 'Martinique',\r\n\t\t\t'MR' => 'Mauritania',\r\n\t\t\t'MU' => 'Mauritius',\r\n\t\t\t'YT' => 'Mayotte (France)',\r\n\t\t\t'MX' => 'Mexico',\r\n\t\t\t'MD' => 'Moldova',\r\n\t\t\t'MC' => 'Monaco (France)',\r\n\t\t\t'MN' => 'Mongolia',\r\n\t\t\t'ME' => 'Montenegro',\r\n\t\t\t'MS' => 'Montserrat',\r\n\t\t\t'MA' => 'Morocco',\r\n\t\t\t'MZ' => 'Mozambique',\r\n\t\t\t'NA' => 'Namibia',\r\n\t\t\t'NR' => 'Nauru',\r\n\t\t\t'NP' => 'Nepal',\r\n\t\t\t'NL' => 'Netherlands',\r\n\t\t\t'AN' => 'Netherlands Antilles',\r\n\t\t\t'NC' => 'New Caledonia',\r\n\t\t\t'NZ' => 'New Zealand',\r\n\t\t\t'NI' => 'Nicaragua',\r\n\t\t\t'NE' => 'Niger',\r\n\t\t\t'NG' => 'Nigeria',\r\n\t\t\t'NU' => 'Niue',\r\n\t\t\t'NF' => 'Norfolk Island',\r\n\t\t\t'KP' => 'North Korea (Korea, Democratic People\\'s Republic of)',\r\n\t\t\t'NO' => 'Norway',\r\n\t\t\t'OM' => 'Oman',\r\n\t\t\t'PK' => 'Pakistan',\r\n\t\t\t'PA' => 'Panama',\r\n\t\t\t'PG' => 'Papua New Guinea',\r\n\t\t\t'PY' => 'Paraguay',\r\n\t\t\t'PE' => 'Peru',\r\n\t\t\t'PH' => 'Philippines',\r\n\t\t\t'PN' => 'Pitcairn Island',\r\n\t\t\t'PL' => 'Poland',\r\n\t\t\t'PT' => 'Portugal',\r\n\t\t\t'QA' => 'Qatar',\r\n\t\t\t'RE' => 'Reunion',\r\n\t\t\t'RO' => 'Romania',\r\n\t\t\t'RU' => 'Russia',\r\n\t\t\t'RW' => 'Rwanda',\r\n\t\t\t'BL' => 'Saint Barthelemy (Guadeloupe)',\r\n\t\t\t'SH' => 'Saint Helena',\r\n\t\t\t'KN' => 'Saint Kitts (Saint Christopher and Nevis)',\r\n\t\t\t'LC' => 'Saint Lucia',\r\n\t\t\t'MF' => 'Saint Martin (French) (Guadeloupe)',\r\n\t\t\t'PM' => 'Saint Pierre and Miquelon',\r\n\t\t\t'VC' => 'Saint Vincent and the Grenadines',\r\n\t\t\t'SM' => 'San Marino',\r\n\t\t\t'ST' => 'Sao Tome and Principe',\r\n\t\t\t'SA' => 'Saudi Arabia',\r\n\t\t\t'SN' => 'Senegal',\r\n\t\t\t'RS' =>\t'Serbia, Republic of',\r\n\t\t\t'SC' => 'Seychelles',\r\n\t\t\t'SL' => 'Sierra Leone',\r\n\t\t\t'SG' => 'Singapore',\r\n\t\t\t'SX' => 'Saint Maarten (Dutch) (Netherlands Antilles)',\r\n\t\t\t'SK' => 'Slovak Republic',\r\n\t\t\t'SI' => 'Slovenia',\r\n\t\t\t'SB' => 'Solomon Islands',\r\n\t\t\t'SO' => 'Somalia',\r\n\t\t\t'ZA' => 'South Africa',\r\n\t\t\t'GS' => 'South Georgia (Falkland Islands)',\r\n\t\t\t'KR' => 'South Korea (Korea, Republic of)',\r\n\t\t\t'SS' => 'Sudan', // South Sudan, not listed separately from Sudan by USPS\r\n\t\t\t'ES' => 'Spain',\r\n\t\t\t'LK' => 'Sri Lanka',\r\n\t\t\t'SD' => 'Sudan',\r\n\t\t\t'SR' => 'Suriname',\r\n\t\t\t'SZ' => 'Swaziland',\r\n\t\t\t'SE' => 'Sweden',\r\n\t\t\t'CH' => 'Switzerland',\r\n\t\t\t'SY' => 'Syrian Arab Republic',\r\n\t\t\t'TW' => 'Taiwan',\r\n\t\t\t'TJ' => 'Tajikistan',\r\n\t\t\t'TZ' => 'Tanzania',\r\n\t\t\t'TH' => 'Thailand',\r\n\t\t\t'TG' => 'Togo',\r\n\t\t\t'TK' => 'Tokelau (Union Group) (Western Samoa)',\r\n\t\t\t'TO' => 'Tonga',\r\n\t\t\t'TT' => 'Trinidad and Tobago',\r\n\t\t\t'TN' => 'Tunisia',\r\n\t\t\t'TR' => 'Turkey',\r\n\t\t\t'TM' => 'Turkmenistan',\r\n\t\t\t'TC' => 'Turks and Caicos Islands',\r\n\t\t\t'TV' => 'Tuvalu',\r\n\t\t\t'UG' => 'Uganda',\r\n\t\t\t'UA' => 'Ukraine',\r\n\t\t\t'AE' => 'United Arab Emirates',\r\n\t\t\t'UY' => 'Uruguay',\r\n\t\t\t'UZ' => 'Uzbekistan',\r\n\t\t\t'VU' => 'Vanuatu',\r\n\t\t\t'VA' => 'Vatican City',\r\n\t\t\t'VE' => 'Venezuela',\r\n\t\t\t'VN' => 'Vietnam',\r\n\t\t\t'WF' => 'Wallis and Futuna Islands',\r\n\t\t\t'WS' => 'Western Samoa',\r\n\t\t\t'YE' => 'Yemen',\r\n\t\t\t'ZM' => 'Zambia',\r\n\t\t\t'ZW' => 'Zimbabwe');\r\n\t\treturn $list;\r\n\t}",
"public function getCountries() {\n $this->db->select('id, country_name, internet'); \n $result = $this->db->get(TBL_COUNTRIES);\n if ($result->num_rows() > 0 )\n return $result->result_array();\n else\n return FALSE;\n }",
"public function getCountry_id()\n {\n return $this->country_id;\n }",
"public function getCountryList()\r\n\t{\r\n\t\t$this->db->select('*');\r\n\t\t$this->db->from('country');\r\n\t\t$this->db->where('country_status', '1');\r\n\t\t$query = $this->db->get();\r\n\t\treturn $query->result() ;\r\n\t}",
"public function getCountryList()\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from('country');\n\t\t$this->db->where('country_status', '1');\n\t\t$query = $this->db->get();\n\t\treturn $query->result() ;\n\t}",
"public function country_full()\r\n {\r\n\r\n // $address = new PiplApi_Address(array('country' => 'FR'));\r\n // print $address->country; // Outputs \"FR\"\r\n // print $address->country_full(); // Outputs \"France\"\r\n if (!empty($this->country))\r\n {\r\n $uppedcoutnry = strtoupper($this->country);\r\n\r\n return array_key_exists($uppedcoutnry, PiplApi_Utils::$piplapi_countries) ?\r\n PiplApi_Utils::$piplapi_countries[$uppedcoutnry] :\r\n NULL;\r\n }\r\n return;\r\n }"
] | [
"0.81700367",
"0.8095525",
"0.8095525",
"0.80177665",
"0.80177665",
"0.78001094",
"0.7757645",
"0.7663727",
"0.74745226",
"0.7462076",
"0.7430954",
"0.7367893",
"0.7367762",
"0.7356241",
"0.7345116",
"0.7340851",
"0.7312196",
"0.7300742",
"0.72986746",
"0.7253824",
"0.7248858",
"0.72193056",
"0.72086775",
"0.72086775",
"0.72086775",
"0.72086775",
"0.72086775",
"0.72086775",
"0.72086775",
"0.72086775",
"0.72086775",
"0.72086775",
"0.72086775",
"0.72086775",
"0.72086775",
"0.72086775",
"0.7199275",
"0.7178365",
"0.7164382",
"0.7150735",
"0.71496725",
"0.713095",
"0.7127456",
"0.71102786",
"0.7098597",
"0.7092988",
"0.7064056",
"0.70608836",
"0.70608836",
"0.70440644",
"0.7035166",
"0.7024096",
"0.70219266",
"0.7021833",
"0.7018408",
"0.7014313",
"0.6981414",
"0.69710714",
"0.6964658",
"0.6959558",
"0.693903",
"0.69374925",
"0.69159204",
"0.6913602",
"0.69070333",
"0.6906172",
"0.6905803",
"0.6903245",
"0.68894136",
"0.68869543",
"0.6883754",
"0.6882126",
"0.6879747",
"0.687369",
"0.6869817",
"0.6862852",
"0.68403447",
"0.6812172",
"0.680672",
"0.67838645",
"0.6782815",
"0.6729972",
"0.6727241",
"0.6706075",
"0.67039967",
"0.67011607",
"0.66914153",
"0.6683345",
"0.6677396",
"0.6676438",
"0.6656144",
"0.6654071",
"0.6628766",
"0.66230154",
"0.6621228",
"0.66127414",
"0.66094875",
"0.65975475"
] | 0.7427401 | 13 |
Set the value of countries | public function setCountries(array $countries)
{
$this->countries = $countries;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setCountry($value) {\n\t\tself::$_country = $value;\n\t}",
"public function setCountry($country = \"\");",
"function setCountryId( $value )\n {\n $this->CountryID = $value;\n }",
"public function setCountry($newCountry){\n\t}",
"function setCountry($country) {\r\r\n\t\t$this->country = $country;\r\r\n\t}",
"private function setCountriesFromDB()\n {\n /** @var Country $item */\n foreach (app(Languages::class)->all() as $item) {\n $this->valueOptions[] = new Option($item->id, $item->name, ['data-country' => $item->code]);\n }\n }",
"public function setCountry($country)\r\n {\r\n $this->country = $country;\r\n }",
"public function setCountry($value)\n {\n return $this->set('Country', $value);\n }",
"protected function setCountry(): void\n {\n Config::set('butik.country', 'DE');\n }",
"public function setCountriesAndRegions(?array $value): void {\n $this->getBackingStore()->set('countriesAndRegions', $value);\n }",
"public function setcountryAttribute($country)\n {\n $this->attributes['country']= BasicSiteRepository::getListOfCountries()[$country];\n }",
"public function setCountry($value)\n {\n parent::setValue('country', $value);\n\n return $this;\n }",
"function setCountry( &$country )\n {\n if ( get_class( $country ) == \"ezcountry\" )\n {\n $this->CountryID = $country->id();\n }\n else if ( is_numeric( $country ) )\n {\n $this->CountryID = $country;\n }\n }",
"function SetCountry(&$country)\n\t{\n\t\t$this->countryId = $country->countryId;\n\t}",
"public function setCountry($value)\n {\n return $this->setParameter('country', $value);\n }",
"public function setCountry($country)\n {\n $this->country = $country;\n }",
"public function set_restriction($countries)\n\t{\n\t\t\n\t}",
"public function setCountry(string $country): void\n {\n $this->_country = $country;\n }",
"private function setCountries(array|null $countries)\n {\n if (empty($countries)) {\n $this->countries = [];\n\n return;\n }\n\n if (is_array($countries[0])) {\n $countries = $countries[0];\n }\n\n foreach ($countries as $country) {\n $this->countries[] = $country;\n }\n }",
"public function setCountry($value, $desc = \"\")\n {\n $this->setValueObject('country', $value, $desc);\n }",
"public function testCanSetAndGetCountry()\n {\n $mockCountry = 'United States';\n\n $this->dataCenter->setCountry($mockCountry);\n\n $this->assertEquals($mockCountry, $this->dataCenter->getCountry());\n }",
"public function addCountries($value) {\n return $this->_add(7, $value);\n }",
"public function setCustomerCountry($customerCountry = '') {\n $country = array(\n 'x_country'=>$this->truncateChars($customerCountry, 60),\n );\n $this->NVP = array_merge($this->NVP, $country); \n }",
"public function setCountryModel()\n {\n\n $layout = Mage::app()->getLayout();\n\n $layout->getBlock('js')->append($layout\n ->createBlock('adminhtml/template')\n ->setTemplate('gls/system/shipping/gls_applicable_country.phtml'));\n }",
"public function setPopCountry($value)\n {\n return $this->set('PopCountry', $value);\n }",
"public function setCountryCode($countryCode);",
"public function setCountries($countries)\n {\n $this->countries = $countries;\n\n return $this;\n }",
"public function presetCountries()\n {\n $fullResult = $this->client->call(\n 'crm.requisite.preset.countries'\n );\n return $fullResult;\n }",
"public function setCountry(array $country = [])\n {\n $this->country = [];\n if ([] === $country) {\n return $this;\n }\n foreach($country as $v) {\n if ($v instanceof FHIRCodeableConcept) {\n $this->addCountry($v);\n } else {\n $this->addCountry(new FHIRCodeableConcept($v));\n }\n }\n return $this;\n }",
"public static function add_country_code() {\n\n $taxamo = taxedd_get_country_code();\n\n if ( $taxamo && isset( $taxamo->country_code ) ) {\n ?>\n <input class=\"edd-country\" type=\"hidden\" name=\"edd_country\" id=\"edd-country\" value=\"<?php echo $taxamo->country_code; ?>\"/>\n <?php\n }\n }",
"public function resetCountrys()\n {\n $this->countrys = new ArrayCollection();\n $this->hasRestrictedCountries = null;\n }",
"function setCountryList(&$theme,$firebase)\n\t{\t\n\t\t$country_list = json_decode($firebase->get('/country_list'),true);\n\t\t$theme['country_list'] = $country_list;\n\t}",
"function testCountries() {\n $field_name = $this->field->getName();\n $edit = [];\n // Optional field: Country should be optional and set to default_country.\n $this->drupalGet($this->nodeAddUrl);\n $this->assertFalse((bool) $this->xpath('//select[@name=\"' . $field_name . '[0][country_code]\" and boolean(@required)]'), 'Country is shown as optional.');\n $this->assertOptionSelected('edit-field-address-0-country-code', 'US', 'The configured default_country is selected.');\n\n // Required field: Country should be required and set to default_country.\n $this->field->setRequired(TRUE);\n $this->field->save();\n $this->drupalGet($this->nodeAddUrl);\n $this->assertTrue((bool) $this->xpath('//select[@name=\"' . $field_name . '[0][country_code]\" and boolean(@required)]'), 'Country is shown as required.');\n $this->assertOptionSelected('edit-field-address-0-country-code', 'US', 'The configured default_country is selected.');\n\n // All countries should be present in the form.\n $countries = array_keys($this->countryRepository->getList());\n $this->assertOptions($field_name . '[0][country_code]', $countries, 'All countries are present.');\n\n // Limit the list of available countries.\n $countries = ['US', 'FR', 'BR', 'JP'];\n $edit['settings[available_countries][]'] = array_map(function ($country) {\n return $country;\n }, $countries);\n $this->drupalPostForm($this->fieldConfigUrl, $edit, t('Save settings'));\n $this->assertResponse(200);\n $this->drupalGet($this->nodeAddUrl);\n $this->assertOptions($field_name . '[0][country_code]', $countries, 'The restricted list of available countries is present.');\n\n // Create an article with one of them.\n $address = [\n 'country_code' => 'US',\n 'recipient' => 'Some Recipient',\n 'organization' => 'Some Organization',\n 'address_line1' => '1098 Alta Ave',\n 'locality' => 'Mountain View',\n 'administrative_area' => 'US-CA',\n 'postal_code' => '94043',\n ];\n $edit = [];\n $edit['title[0][value]'] = $this->randomMachineName(8);\n foreach ($address as $property => $value) {\n $path = $field_name . '[0][' . $property . ']';\n $edit[$path] = $value;\n }\n $this->drupalPostForm(NULL, $edit, t('Save'));\n $this->assertResponse(200);\n // Check that the article has been created.\n $node = $this->drupalGetNodeByTitle($edit['title[0][value]']);\n $this->assertTrue($node, 'Created article ' . $edit['title[0][value]']);\n\n // Now remove 'US' from the list of available countries.\n $countries = ['FR', 'BR', 'JP'];\n $edit = [];\n $edit['settings[available_countries][]'] = array_map(function ($country) {\n return $country;\n }, $countries);\n $this->drupalPostForm($this->fieldConfigUrl, $edit, t('Save settings'));\n\n // Acccess article's edit form and confirm the values are unchanged.\n // 'US' should be in the list along with the available countries and should\n // be selected.\n $this->drupalGet('node/' . $node->id() . '/edit');\n $this->assertFieldByName($field_name . '[0][recipient]', $address['recipient']);\n $this->assertFieldByName($field_name . '[0][organization]', $address['organization']);\n $this->assertFieldByName($field_name . '[0][address_line1]', $address['address_line1']);\n $this->assertFieldByName($field_name . '[0][locality]', $address['locality']);\n $this->assertOptionSelected('edit-field-address-0-administrative-area', $address['administrative_area']);\n $this->assertFieldByName($field_name . '[0][postal_code]', $address['postal_code']);\n $this->assertOptionSelected('edit-field-address-0-country-code', $address['country_code']);\n\n // Test the widget with only one available country.\n // Since the field is required, the country selector should be hidden.\n $countries = ['US'];\n $edit = [];\n $edit['settings[available_countries][]'] = array_map(function ($country) {\n return $country;\n }, $countries);\n $this->drupalPostForm($this->fieldConfigUrl, $edit, t('Save settings'));\n\n $this->drupalGet('node/' . $node->id() . '/edit');\n $this->assertNoFieldByName($field_name . '[0][country_code]');\n // Submitting the form should result in no data loss.\n $this->drupalPostForm(NULL, [], t('Save'));\n $this->drupalGet('node/' . $node->id() . '/edit');\n $this->assertFieldByName($field_name . '[0][recipient]', $address['recipient']);\n $this->assertFieldByName($field_name . '[0][organization]', $address['organization']);\n $this->assertFieldByName($field_name . '[0][address_line1]', $address['address_line1']);\n $this->assertFieldByName($field_name . '[0][locality]', $address['locality']);\n $this->assertOptionSelected('edit-field-address-0-administrative-area', $address['administrative_area']);\n $this->assertFieldByName($field_name . '[0][postal_code]', $address['postal_code']);\n }",
"public function countryOptionList();",
"public function requestCountry();",
"public function setCountries(\n TechDivision_Collections_Interfaces_Collection $countries) {\n $this->_countries = $countries;\n }",
"public function actionCountries()\n {\n $salys = Yii::$app->db_prod->createCommand(\"SELECT * FROM salys\")->queryAll();\n foreach ($salys as $salis) {\n $city = new City([\n 'name' => $salis['pavadinimas_lt'],\n 'ansi_name' => $salis['pavadinimas_lt'],\n 'alt_name' => $this->formatCountryAltName($salis),\n 'latitude' => $salis['latitude'],\n 'longitude' => $salis['longitude'],\n 'country_code' => strtoupper($salis['kodas']),\n 'population' => null,\n 'elevation' => null,\n 'timezone' => null,\n 'modification_date' => null,\n ]);\n $city->save();\n }\n\n Cities::addCountries();\n }",
"abstract public function country();",
"function ajax_genmapper_user_country_selected() {\n\t\n\t$choosed_country = isset($_POST['choosed_country']) ? $_POST['choosed_country'] : '';\n\t\n\tif ( $choosed_country )\n\t{\n\t\t\t$meta=get_user_meta(get_current_user_id(), 'genmapper_country_code', true);\n\t\t\tif ( $meta == '' || (is_array($meta) && count($meta)==0 ) )\n\t\t\t{\n\t\t \tupdate_user_meta(get_current_user_id(), 'genmapper_country_code',$choosed_country);\n\t\t\t\techo 'country_set';\n\t\t\t}\n\n\t}\n\telse\n\t{\n\t\t\n\t}\n\t\n\twp_die();\n}",
"public function addressCountry($value)\n {\n $this->setProperty('addressCountry', $value);\n return $this;\n }",
"public function setAccountCountry($country)\n\t {\n\t \t $this->json['params'][$this->account]['country'] = $country;\n\t \t \n\t \t return $this;\n\t }",
"public function setCountry($value)\n {\n $this->setParameter('billingCountry', $value);\n $this->setParameter('shippingCountry', $value);\n\n return $this;\n }",
"public function addCountriesIso($value) {\n return $this->_add(4, $value);\n }",
"public function __construct(array $countries)\n {\n $this->countries = collect($countries);\n }",
"function selectCountry(){\n $countries = array(\"USA\", \"Mexico\", \"France\");\n \n for($i = 0; $i < sizeof($countries); $i++){\n echo \"<option value='\" .$countries[$i].\"'>\" .$countries[$i]. \"</option>\"; \n }\n }",
"public function setShippingCountry($shippingCountry = '') {\n $country = array(\n 'x_ship_to_country'=>$this->truncateChars($shippingCountry, 60),\n );\n $this->NVP = array_merge($this->NVP, $country); \n }",
"public function actionAddCountryCode()\n {\n Loads::addCountryCode();\n }",
"public function updatecountry($data, $id) {\r\n $this->db->where('id', $id);\r\n return $this->db->update('countries', $data);\r\n }",
"function countryAction() {\n\t\t$oFilter = utilityInputFilter::filterString();\n\t\t$country = $oFilter->doFilter($this->getActionFromRequest(false, 1));\n\n\t\tif ( !$country || strlen($country) != 2 ) {\n\t\t\t$country = null;\n\t\t}\n\n\t\t$this->getModel()->setCountry($country);\n\t\t$this->getModel()->setPage($this->getPageFromRequest());\n\n\t\t$oView = new userView($this);\n\t\tif ( $country ) {\n\t\t\t$oView->showCountryLeaderboard();\n\t\t} else {\n\t\t\t$oView->showCountryList();\n\t\t}\n\t}",
"public function setCountryCode( $val, $markChanged=true ) {\n\t\t$this->countryCode = $val;\n\t\tif( $markChanged ) $this->isChanged = true;\n\t}",
"protected function loadCountry()\n {\n $country = Country::findOne([\n 'code' => 'es'\n ]);\n $this->countryId = $country->id;\n }",
"public function countrySet($def){\n\n\t$x = $this->dbOne(\"SELECT 1 FROM k_country WHERE iso='\".$def['k_country']['iso']['value'].\"'\");\n\t$q = ($x[1])\n\t\t? $this->dbUpdate($def).\" WHERE iso='\".$def['k_country']['iso']['value'].\"'\"\n\t\t: $this->dbInsert($def);\n\n\t@$this->dbQuery($q);\n\tif($this->db_error != NULL) return false;\n\n\treturn true;\n}",
"public function countryList(){\n $response['status'] = \"false\"; \n $response['message'] = \"Invalid request.\"; \n \n $country = Country::getCountries();\n if(!empty($country)){\n $response['status'] = \"true\"; \n $response['message'] = \"Country data.\"; \n $response['data'] = $country; \n }\n $this->response($response);\n \n }",
"public function getCountriesInfo();",
"public function setCountry($country) \n {\n $this->country = $country;\n\n return $this;\n }",
"public function getCountry() {}",
"public function getCountry() {}",
"public function getCountries();",
"function tep_cfg_pull_down_country_list($country_id) {\n return HTML::selectField('configuration_value', tep_get_countries(), $country_id);\n }",
"public function setBillingCountry($value)\n {\n return $this->setParameter('billingCountry', $value);\n }",
"public function countryCode();",
"private function Geolocation_RegisterCountry( $country ) {\n\t\tif ( array_key_exists( $country, $this->countries ) ) {\n\t\t\t// 3b. otherwise increase that city and country's value by 1\n\t\t\t$this->countries[$country] ++;\n\t\t} else {\n\t\t\t// 3a. if that city and country doesn't exist, create a key in an array for that city and country, and set its number to 1\n\t\t\t$this->countries[$country] = 1;\n\t\t}\n\t}",
"public function setCountryCodes( $country_codes ) {\n\t\t$this->container['country_codes'] = $country_codes;\n\n\t\treturn $this;\n\t}",
"public function setCountry($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->country !== $v) {\n\t\t\t$this->country = $v;\n\t\t\t$this->modifiedColumns[] = UserPeer::COUNTRY;\n\t\t}\n\n\t\treturn $this;\n\t}",
"public function countries(): array\n {\n return $this->client->get(\"country\");\n }",
"public function getCountry();",
"public function getCountry();",
"public function setCountry(?string $country): self\n {\n $this->initialized['country'] = true;\n $this->country = $country;\n\n return $this;\n }",
"public function actionCountries()\n {\n $continentId = Yii::$app->request->get(\"continentId\");\n $countries = Country::getAvailable( $continentId );\n echo json_encode( $countries );\n Yii::$app->end(200);\n }",
"private function addUsStates(CountryInterface $country)\r\n {\r\n $states = array(\r\n 'AL' => 'Alabama',\r\n 'AK' => 'Alaska',\r\n 'AZ' => 'Arizona',\r\n 'AR' => 'Arkansas',\r\n 'CA' => 'California',\r\n 'CO' => 'Colorado',\r\n 'CT' => 'Connecticut',\r\n 'DE' => 'Delaware',\r\n 'DC' => 'District Of Columbia',\r\n 'FL' => 'Florida',\r\n 'GA' => 'Georgia',\r\n 'HI' => 'Hawaii',\r\n 'ID' => 'Idaho',\r\n 'IL' => 'Illinois',\r\n 'IN' => 'Indiana',\r\n 'IA' => 'Iowa',\r\n 'KS' => 'Kansas',\r\n 'KY' => 'Kentucky',\r\n 'LA' => 'Louisiana',\r\n 'ME' => 'Maine',\r\n 'MD' => 'Maryland',\r\n 'MA' => 'Massachusetts',\r\n 'MI' => 'Michigan',\r\n 'MN' => 'Minnesota',\r\n 'MS' => 'Mississippi',\r\n 'MO' => 'Missouri',\r\n 'MT' => 'Montana',\r\n 'NE' => 'Nebraska',\r\n 'NV' => 'Nevada',\r\n 'NH' => 'New Hampshire',\r\n 'NJ' => 'New Jersey',\r\n 'NM' => 'New Mexico',\r\n 'NY' => 'New York',\r\n 'NC' => 'North Carolina',\r\n 'ND' => 'North Dakota',\r\n 'OH' => 'Ohio',\r\n 'OK' => 'Oklahoma',\r\n 'OR' => 'Oregon',\r\n 'PA' => 'Pennsylvania',\r\n 'RI' => 'Rhode Island',\r\n 'SC' => 'South Carolina',\r\n 'SD' => 'South Dakota',\r\n 'TN' => 'Tennessee',\r\n 'TX' => 'Texas',\r\n 'UT' => 'Utah',\r\n 'VT' => 'Vermont',\r\n 'VA' => 'Virginia',\r\n 'WA' => 'Washington',\r\n 'WV' => 'West Virginia',\r\n 'WI' => 'Wisconsin',\r\n 'WY' => 'Wyoming'\r\n );\r\n\r\n $this->addProvinces($country, $states); \r\n }",
"public function setCountryLookupMethod(?CountryLookupMethodType $value): void {\n $this->getBackingStore()->set('countryLookupMethod', $value);\n }",
"public function setShippingCountry($value)\n {\n return $this->setParameter('shippingCountry', $value);\n }",
"public function testSetPurchaseCountry()\n {\n $configuration = new Configuration();\n $purchaseCountry = 'IT';\n $configuration->setPurchaseCountry($purchaseCountry);\n $this->assertSame($purchaseCountry, $configuration->getPurchaseCountry());\n\n $configuration = new Configuration();\n $purchaseCountry = 'it';\n $configuration->setPurchaseCountry($purchaseCountry);\n $this->assertSame(strtoupper($purchaseCountry), $configuration->getPurchaseCountry());\n\n $configuration = new Configuration();\n $purchaseCountry = 'en';\n $configuration->setPurchaseCountry($purchaseCountry);\n $this->assertNull($configuration->getPurchaseCountry());\n\n $configuration = new Configuration();\n $purchaseCountry = '';\n $configuration->setPurchaseCountry($purchaseCountry);\n $this->assertNull($configuration->getPurchaseCountry());\n\n $configuration = new Configuration();\n $purchaseCountry = null;\n $configuration->setPurchaseCountry($purchaseCountry);\n $this->assertNull($configuration->getPurchaseCountry());\n }",
"public function getCountry()\n {\n return parent::getValue('country');\n }",
"function genmapper_user_country_is_set()\n{\n\tif ( !is_user_logged_in() || is_admin() || is_super_admin() )\n\t{\n\t\treturn;\n\t}\n\t$meta=get_user_meta(get_current_user_id(), 'genmapper_country_code', true);\n\t\n\tif ( ! $meta || (is_array($meta) && count($meta)==0 ) )\n\t{\n\t?>\n\t<div id=\"genmapoverlay\">\n\t\t<div id=\"genmapoverlay-country-selector\">You must set your country before continue the browsing.\n\t\t\t<form method=\"post\"><?php genmapper_country_select(null,true) ?></form>\n\t\t</div>\n\t</div>\n\t<style>\n\t#genmapoverlay {\n position: fixed; /* Sit on top of the page content */\n display: block; /* Hidden by default */\n width: 100%; /* Full width (cover the whole page) */\n height: 100%; /* Full height (cover the whole page) */\n top: 0; \n left: 0;\n right: 0;\n bottom: 0;\n background-color: rgba(0,0,0,0.5); /* Black background with opacity */\n z-index: 2; /* Specify a stack order in case you're using a different order for other elements */\n cursor: pointer; /* Add a pointer on hover */\n\t}\n\t#genmapoverlay-country-selector\n\t{text-align: center; color:white;font-size:32px; background-color: red; position: absolute;top:33px; margin-left: 30%;margin-right: 30%; margin-top: 20%;}\t\n\n\n\t</style>\n\t<script>\n\t\tvar $ = window.jQuery;\n\t\t$('#genmapoverlay-country-selector select').change( function() {\n\t\t\t$.post( GenMapperBase.ajaxurl , {\n\t\t\t\t'action' : 'genmapper_user_country_selected',\n\t\t\t\t///'nodes': JSON.stringify( nodes )\n\t\t\t\t'choosed_country': $(this).val()\n\t\t\t}).done(function(data) { \n\t\t\t\tconsole.log('response', data );\n\t\t\t\tif ( data == 'country_set' ) {\n\t\t\t\t\t$('#genmapoverlay').hide();\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\n\t\t\n\t</script>\n\t<?php\t\n\t}\n}",
"public function country_list()\n {\n $result = common_select_values('id, name', 'ad_countries', '', 'result');\n return $result; \n }",
"function tep_get_countries_with_iso_codes($countries_id) {\n\treturn tep_get_countries($countries_id, true);\n}",
"public function setCountry($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->country !== $v) {\n\t\t\t$this->country = $v;\n\t\t\t$this->modifiedColumns[] = VenuePeer::COUNTRY;\n\t\t}\n\n\t\treturn $this;\n\t}",
"public function setLimitCountries(array $limitCountries)\n {\n $this->_limitCountries = (array) $limitCountries;\n return $this;\n }",
"private function configureCountryProviderMock(array $data): void\n {\n if ($data['default']) {\n $this\n ->getCountryProviderMock()\n ->method('getDefault')\n ->willReturn(Fixture::country($data['default']));\n }\n\n if ($data['current']) {\n $this\n ->getCountryProviderMock()\n ->method('getCountry')\n ->willReturn(Fixture::country($data['current']));\n }\n }",
"public function getCountry() \n {\n return $this->country;\n }",
"public function setCountryOrRegion($val)\n {\n $this->_propDict[\"countryOrRegion\"] = $val;\n return $this;\n }",
"function wc_ru_regions_add_counties( $states ) {\n\n $states['RU'] = array(\n 'AD' => 'Республика Адыгея (Адыгея)',\n 'BA' => 'Республика Башкортостан',\n 'BU' => 'Республика Бурятия',\n 'AL' => 'Республика Алтай',\n 'DA' => 'Республика Дагестан',\n 'IN' => 'Республика Ингушетия',\n 'KABA' => 'Кабардино-Балкарская Республика',\n 'KA' => 'Республика Калмыкия',\n 'KACH' => 'Карачаево-Черкесская Республика',\n 'KAR' => 'Республика Карелия',\n 'KOM' => 'Республика Коми',\n 'MAR' => 'Республика Марий Эл',\n 'MOR' => 'Республика Мордовия',\n 'SAH' => 'Республика Саха (Якутия)',\n 'SEV' => 'Республика Северная Осетия - Алания',\n 'TAT' => 'Республика Татарстан (Татарстан)',\n 'TI' => 'Республика Тыва',\n 'UD' => 'Удмуртская Республика',\n 'HA' => 'Республика Хакасия',\n 'CHE' => 'Чеченская Республика',\n 'CHU' => 'Чувашская Республика - Чувашия',\n 'ALT' => 'Алтайский край',\n 'KRD' => 'Краснодарский край',\n 'KRY' => 'Красноярский край',\n 'PRI' => 'Приморский край',\n 'STA' => 'Ставропольский край',\n 'HAB' => 'Хабаровский край',\n 'AM' => 'Амурская область',\n 'AR' => 'Архангельская область',\n 'AS' => 'Астраханская область',\n 'BE' => 'Белгородская область',\n 'BR' => 'Брянская область',\n 'VL' => 'Владимирская область',\n 'VG' => 'Волгоградская область',\n 'VOG' => 'Вологодская область',\n 'VR' => 'Воронежская область',\n 'IV' => 'Ивановская область',\n 'IR' => 'Иркутская область',\n 'KON' => 'Калининградская область',\n 'KLG' => 'Калужская область',\n 'KM' => 'Камчатский край',\n 'KE' => 'Кемеровская область',\n 'KI' => 'Кировская область',\n 'KO' => 'Костромская область',\n 'KU' => 'Курганская область',\n 'KUR' => 'Курская область',\n 'LEO' => 'Ленинградская область',\n 'LI' => 'Липецкая область',\n 'MA' => 'Магаданская область',\n 'MO' => 'Московская область',\n 'MU' => 'Мурманская область',\n 'NI' => 'Нижегородская область',\n 'NO' => 'Новгородская область',\n 'NOV' => 'Новосибирская область',\n 'OM' => 'Омская область',\n 'OR' => 'Оренбургская область',\n 'ORL' => 'Орловская область',\n 'PEN' => 'Пензенская область',\n 'PER' => 'Пермский край',\n 'PS' => 'Псковская область',\n 'RO' => 'Ростовская область',\n 'RY' => 'Рязанская область',\n 'SA' => 'Самарская область',\n 'SAR' => 'Саратовская область',\n 'SHL' => 'Сахалинская область',\n 'SV' => 'Свердловская область',\n 'SM' => 'Смоленская область',\n 'TA' => 'Тамбовская область',\n 'TV' => 'Тверская область',\n 'TO' => 'Томская область',\n 'TU' => 'Тульская область',\n 'TY' => 'Тюменская область',\n 'UL' => 'Ульяновская область',\n 'CH' => 'Челябинская область',\n 'ZA' => 'Забайкальский край',\n 'YA' => 'Ярославская область',\n 'DC' => 'г. Москва',\n 'LE' => 'Санкт-Петербург',\n 'EV' => 'Еврейская автономная область',\n 'NE' => 'Ненецкий автономный округ',\n 'HAN' => 'Ханты-Мансийский автономный округ - Югра',\n 'CHK' => 'Чукотский автономный округ',\n 'YM' => 'Ямало-Ненецкий автономный округ',\n 'KRM' => 'Республика Крым',\n 'SVS' => 'Севастополь',\n 'OTH' => 'Иные территории, включая город и космодром Байконур',\n );\n return $states;\n\n}",
"function country_list()\t{\r\n\t\t$list = array(\r\n\t\t\t'AF' => 'Afghanistan',\r\n\t\t\t'AX' => 'Aland Island (Finland)',\r\n\t\t\t'AL' => 'Albania',\r\n\t\t\t'DZ' => 'Algeria',\r\n\t\t\t'AD' => 'Andorra',\r\n\t\t\t'AO' => 'Angola',\r\n\t\t\t'AI' => 'Anguilla',\r\n\t\t\t'AG' => 'Antigua and Barbuda',\r\n\t\t\t'AR' => 'Argentina',\r\n\t\t\t'AM' => 'Armenia',\r\n\t\t\t'AW' => 'Aruba',\r\n\t\t\t'AU' => 'Australia',\r\n\t\t\t'AT' => 'Austria',\r\n\t\t\t'AZ' => 'Azerbaijan',\r\n\t\t\t'BS' => 'Bahamas',\r\n\t\t\t'BH' => 'Bahrain',\r\n\t\t\t'BD' => 'Bangladesh',\r\n\t\t\t'BB' => 'Barbados',\r\n\t\t\t'BY' => 'Belarus',\r\n\t\t\t'BE' => 'Belgium',\r\n\t\t\t'BZ' => 'Belize',\r\n\t\t\t'BJ' => 'Benin',\r\n\t\t\t'BM' => 'Bermuda',\r\n\t\t\t'BT' => 'Bhutan',\r\n\t\t\t'BO' => 'Bolivia',\r\n\t\t\t'BQ' => 'Bonaire (Netherlands Antilles)',\r\n\t\t\t'BA' => 'Bosnia-Herzegovina',\r\n\t\t\t'BW' => 'Botswana',\r\n\t\t\t'BR' => 'Brazil',\r\n\t\t\t'VG' => 'British Virgin Islands',\r\n\t\t\t'BN' => 'Brunei Darussalam',\r\n\t\t\t'BG' => 'Bulgaria',\r\n\t\t\t'BF' => 'Burkina Faso',\r\n\t\t\t'MM' => 'Burma',\r\n\t\t\t'BI' => 'Burundi',\r\n\t\t\t'KH' => 'Cambodia',\r\n\t\t\t'CM' => 'Cameroon',\r\n\t\t\t'CA' => 'Canada',\r\n\t\t\t'CV' => 'Cape Verde',\r\n\t\t\t'KY' => 'Cayman Islands',\r\n\t\t\t'CF' => 'Central African Republic',\r\n\t\t\t'TD' => 'Chad',\r\n\t\t\t'CL' => 'Chile',\r\n\t\t\t'CN' => 'China',\r\n\t\t\t'CX' => 'Christmas Island (Australia)',\r\n\t\t\t'CC' => 'Cocos Island (Australia)',\r\n\t\t\t'CO' => 'Colombia',\r\n\t\t\t'KM' => 'Comoros',\r\n\t\t\t'CG' => 'Congo, Republic of the',\r\n\t\t\t'CD' => 'Congo, Democratic Republic of the',\r\n\t\t\t'CK' => 'Cook Islands (New Zealand)',\r\n\t\t\t'CR' => 'Costa Rica',\r\n\t\t\t'CI' => 'Cote d\\'Ivoire',\r\n\t\t\t'HR' => 'Croatia',\r\n\t\t\t'CU' => 'Cuba',\r\n\t\t\t'CW' => 'Curacao (Netherlands Antilles)',\r\n\t\t\t'CY' => 'Cyprus',\r\n\t\t\t'CZ' => 'Czech Republic',\r\n\t\t\t'DK' => 'Denmark',\r\n\t\t\t'DJ' => 'Djibouti',\r\n\t\t\t'DM' => 'Dominica',\r\n\t\t\t'DO' => 'Dominican Republic',\r\n\t\t\t'TL' => 'East Timor (Indonesia)',\r\n\t\t\t'EC' => 'Ecuador',\r\n\t\t\t'EG' => 'Egypt',\r\n\t\t\t'SV' => 'El Salvador',\r\n\t\t\t'GQ' => 'Equatorial Guinea',\r\n\t\t\t'ER' => 'Eritrea',\r\n\t\t\t'EE' => 'Estonia',\r\n\t\t\t'ET' => 'Ethiopia',\r\n\t\t\t'FK' => 'Falkland Islands',\r\n\t\t\t'FO' => 'Faroe Islands',\r\n\t\t\t'FJ' => 'Fiji',\r\n\t\t\t'FI' => 'Finland',\r\n\t\t\t'FR' => 'France',\r\n\t\t\t'GF' => 'French Guiana',\r\n\t\t\t'PF' => 'French Polynesia',\r\n\t\t\t'GA' => 'Gabon',\r\n\t\t\t'GM' => 'Gambia',\r\n\t\t\t'GE' => 'Georgia, Republic of',\r\n\t\t\t'DE' => 'Germany',\r\n\t\t\t'GH' => 'Ghana',\r\n\t\t\t'GI' => 'Gibraltar',\r\n\t\t\t'GB' => 'Great Britain and Northern Ireland',\r\n\t\t\t'GR' => 'Greece',\r\n\t\t\t'GL' => 'Greenland',\r\n\t\t\t'GD' => 'Grenada',\r\n\t\t\t'GP' => 'Guadeloupe',\r\n\t\t\t'GT' => 'Guatemala',\r\n\t\t\t'GG' => 'Guernsey',\r\n\t\t\t'GN' => 'Guinea',\r\n\t\t\t'GW' => 'Guinea-Bissau',\r\n\t\t\t'GY' => 'Guyana',\r\n\t\t\t'HT' => 'Haiti',\r\n\t\t\t'HN' => 'Honduras',\r\n\t\t\t'HK' => 'Hong Kong',\r\n\t\t\t'HU' => 'Hungary',\r\n\t\t\t'IS' => 'Iceland',\r\n\t\t\t'IN' => 'India',\r\n\t\t\t'ID' => 'Indonesia',\r\n\t\t\t'IR' => 'Iran',\r\n\t\t\t'IQ' => 'Iraq',\r\n\t\t\t'IE' => 'Ireland',\r\n\t\t\t'IM' => 'Isle of Man (Great Britain and Northern Ireland)',\r\n\t\t\t'IL' => 'Israel',\r\n\t\t\t'IT' => 'Italy',\r\n\t\t\t'JM' => 'Jamaica',\r\n\t\t\t'JP' => 'Japan',\r\n\t\t\t'JE' => 'Jersey (Channel Islands) (Great Britain and Northern Ireland)',\r\n\t\t\t'JO' => 'Jordan',\r\n\t\t\t'KZ' => 'Kazakhstan',\r\n\t\t\t'KE' => 'Kenya',\r\n\t\t\t'KI' => 'Kiribati',\r\n\t\t\t'KW' => 'Kuwait',\r\n\t\t\t'KG' => 'Kyrgyzstan',\r\n\t\t\t'LA' => 'Laos',\r\n\t\t\t'LV' => 'Latvia',\r\n\t\t\t'LB' => 'Lebanon',\r\n\t\t\t'LS' => 'Lesotho',\r\n\t\t\t'LR' => 'Liberia',\r\n\t\t\t'LY' => 'Libya',\r\n\t\t\t'LI' => 'Liechtenstein',\r\n\t\t\t'LT' => 'Lithuania',\r\n\t\t\t'LU' => 'Luxembourg',\r\n\t\t\t'MO' => 'Macao',\r\n\t\t\t'MK' => 'Macedonia, Republic of',\r\n\t\t\t'MG' => 'Madagascar',\r\n\t\t\t'MW' => 'Malawi',\r\n\t\t\t'MY' => 'Malaysia',\r\n\t\t\t'MV' => 'Maldives',\r\n\t\t\t'ML' => 'Mali',\r\n\t\t\t'MT' => 'Malta',\r\n\t\t\t'MQ' => 'Martinique',\r\n\t\t\t'MR' => 'Mauritania',\r\n\t\t\t'MU' => 'Mauritius',\r\n\t\t\t'YT' => 'Mayotte (France)',\r\n\t\t\t'MX' => 'Mexico',\r\n\t\t\t'MD' => 'Moldova',\r\n\t\t\t'MC' => 'Monaco (France)',\r\n\t\t\t'MN' => 'Mongolia',\r\n\t\t\t'ME' => 'Montenegro',\r\n\t\t\t'MS' => 'Montserrat',\r\n\t\t\t'MA' => 'Morocco',\r\n\t\t\t'MZ' => 'Mozambique',\r\n\t\t\t'NA' => 'Namibia',\r\n\t\t\t'NR' => 'Nauru',\r\n\t\t\t'NP' => 'Nepal',\r\n\t\t\t'NL' => 'Netherlands',\r\n\t\t\t'AN' => 'Netherlands Antilles',\r\n\t\t\t'NC' => 'New Caledonia',\r\n\t\t\t'NZ' => 'New Zealand',\r\n\t\t\t'NI' => 'Nicaragua',\r\n\t\t\t'NE' => 'Niger',\r\n\t\t\t'NG' => 'Nigeria',\r\n\t\t\t'NU' => 'Niue',\r\n\t\t\t'NF' => 'Norfolk Island',\r\n\t\t\t'KP' => 'North Korea (Korea, Democratic People\\'s Republic of)',\r\n\t\t\t'NO' => 'Norway',\r\n\t\t\t'OM' => 'Oman',\r\n\t\t\t'PK' => 'Pakistan',\r\n\t\t\t'PA' => 'Panama',\r\n\t\t\t'PG' => 'Papua New Guinea',\r\n\t\t\t'PY' => 'Paraguay',\r\n\t\t\t'PE' => 'Peru',\r\n\t\t\t'PH' => 'Philippines',\r\n\t\t\t'PN' => 'Pitcairn Island',\r\n\t\t\t'PL' => 'Poland',\r\n\t\t\t'PT' => 'Portugal',\r\n\t\t\t'QA' => 'Qatar',\r\n\t\t\t'RE' => 'Reunion',\r\n\t\t\t'RO' => 'Romania',\r\n\t\t\t'RU' => 'Russia',\r\n\t\t\t'RW' => 'Rwanda',\r\n\t\t\t'BL' => 'Saint Barthelemy (Guadeloupe)',\r\n\t\t\t'SH' => 'Saint Helena',\r\n\t\t\t'KN' => 'Saint Kitts (Saint Christopher and Nevis)',\r\n\t\t\t'LC' => 'Saint Lucia',\r\n\t\t\t'MF' => 'Saint Martin (French) (Guadeloupe)',\r\n\t\t\t'PM' => 'Saint Pierre and Miquelon',\r\n\t\t\t'VC' => 'Saint Vincent and the Grenadines',\r\n\t\t\t'SM' => 'San Marino',\r\n\t\t\t'ST' => 'Sao Tome and Principe',\r\n\t\t\t'SA' => 'Saudi Arabia',\r\n\t\t\t'SN' => 'Senegal',\r\n\t\t\t'RS' =>\t'Serbia, Republic of',\r\n\t\t\t'SC' => 'Seychelles',\r\n\t\t\t'SL' => 'Sierra Leone',\r\n\t\t\t'SG' => 'Singapore',\r\n\t\t\t'SX' => 'Saint Maarten (Dutch) (Netherlands Antilles)',\r\n\t\t\t'SK' => 'Slovak Republic',\r\n\t\t\t'SI' => 'Slovenia',\r\n\t\t\t'SB' => 'Solomon Islands',\r\n\t\t\t'SO' => 'Somalia',\r\n\t\t\t'ZA' => 'South Africa',\r\n\t\t\t'GS' => 'South Georgia (Falkland Islands)',\r\n\t\t\t'KR' => 'South Korea (Korea, Republic of)',\r\n\t\t\t'SS' => 'Sudan', // South Sudan, not listed separately from Sudan by USPS\r\n\t\t\t'ES' => 'Spain',\r\n\t\t\t'LK' => 'Sri Lanka',\r\n\t\t\t'SD' => 'Sudan',\r\n\t\t\t'SR' => 'Suriname',\r\n\t\t\t'SZ' => 'Swaziland',\r\n\t\t\t'SE' => 'Sweden',\r\n\t\t\t'CH' => 'Switzerland',\r\n\t\t\t'SY' => 'Syrian Arab Republic',\r\n\t\t\t'TW' => 'Taiwan',\r\n\t\t\t'TJ' => 'Tajikistan',\r\n\t\t\t'TZ' => 'Tanzania',\r\n\t\t\t'TH' => 'Thailand',\r\n\t\t\t'TG' => 'Togo',\r\n\t\t\t'TK' => 'Tokelau (Union Group) (Western Samoa)',\r\n\t\t\t'TO' => 'Tonga',\r\n\t\t\t'TT' => 'Trinidad and Tobago',\r\n\t\t\t'TN' => 'Tunisia',\r\n\t\t\t'TR' => 'Turkey',\r\n\t\t\t'TM' => 'Turkmenistan',\r\n\t\t\t'TC' => 'Turks and Caicos Islands',\r\n\t\t\t'TV' => 'Tuvalu',\r\n\t\t\t'UG' => 'Uganda',\r\n\t\t\t'UA' => 'Ukraine',\r\n\t\t\t'AE' => 'United Arab Emirates',\r\n\t\t\t'UY' => 'Uruguay',\r\n\t\t\t'UZ' => 'Uzbekistan',\r\n\t\t\t'VU' => 'Vanuatu',\r\n\t\t\t'VA' => 'Vatican City',\r\n\t\t\t'VE' => 'Venezuela',\r\n\t\t\t'VN' => 'Vietnam',\r\n\t\t\t'WF' => 'Wallis and Futuna Islands',\r\n\t\t\t'WS' => 'Western Samoa',\r\n\t\t\t'YE' => 'Yemen',\r\n\t\t\t'ZM' => 'Zambia',\r\n\t\t\t'ZW' => 'Zimbabwe');\r\n\t\treturn $list;\r\n\t}",
"public function setCountryCode($countryCode) {\n\t\t$this->_countryCode = $countryCode;\n\t}",
"public function setCity($value) {\n\t\tself::$_city = $value;\n\t}",
"public function save_country_settings() {\n if ($this->checkLogin('A') == '') {\n redirect(ADMIN_ENC_URL);\n } else {\n if ($this->checkPrivileges('admin', '2') == TRUE) {\n $condition = array('admin_id' => '1');\n $this->admin_model->commonInsertUpdate(ADMIN, 'update', array(), array(), $condition);\n $countryId = $this->input->post(\"countryId\");\n $config = '<?php ';\n foreach ($this->data['countryList'] as $country) {\n if ($countryId == $country->_id) {\n $countryName = addslashes($country->name);\n $config .= \"\\n\\$config['countryId'] = '$country->_id'; \";\n $config .= \"\\n\\$config['countryName'] = '$countryName'; \";\n $config .= \"\\n\\$config['countryCode'] = '$country->cca3'; \";\n $config .= \"\\n\\$config['dialCode'] = '$country->dial_code'; \";\n }\n }\n $config .= \"\\n ?>\";\n $file = 'commonsettings/dectar_country_settings.php';\n file_put_contents($file, $config);\n $this->setErrorMessage('success', 'Country settings updated successfully','admin_adminlogin_country_setting_updated');\n redirect(ADMIN_ENC_URL.'/adminlogin/admin_country_settings');\n } else {\n redirect(ADMIN_ENC_URL);\n }\n }\n }",
"public function country($country_id)\n {\n $this->where('user_addresses.country_id', $user_id);\n }",
"public function setCountryCode($s)\n {\n if (is_string($s)) {\n $this->resetCountryCode();\n $this->options['ShipToCountryCode'] = $s;\n } else {\n return false;\n }\n }",
"public function country_options()\n\t{\n\t\t$countries = ee()->db\n\t\t\t\t->where('enabled', 1)\n\t\t\t\t->get('store_countries');\n\n\t\t$output = '<option value=\"\">--Select Country--</option>' . \"\\n\";\n\n\t\tforeach($countries->result() as $country)\n\t\t{\n\t\t\tif($country->code == ee()->TMPL->fetch_param('country_code'))\n\t\t\t{\n\t\t\t\t$selected = ' selected=\"selected\"';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$selected = '';\n\t\t\t}\n\n\t\t\t$output .= '<option value=\"' . $country->code . '\"' . $selected . ' >' . $country->name . '</option>' . \"\\n\";\n\n\t\t}\t\t\n\n\t\treturn $output;\n\t}",
"public function setPopCountryCode($value)\n {\n return $this->set('PopCountryCode', $value);\n }",
"public function getCountries()\n {\n return $this->countries;\n }",
"public function getCountries()\n {\n return $this->countries;\n }",
"public function getCountries()\n {\n return $this->countries;\n }",
"public function setOrganizations(?int $value): void {\n $this->getBackingStore()->set('organizations', $value);\n }",
"abstract public function countryISOCode();",
"public function testSetGetCountryCode()\n {\n $countryCode = 'DE';\n\n $location = new Location();\n\n $this->assertSame($location, $location->setCountryCode($countryCode));\n $this->assertEquals($countryCode, $location->getCountryCode());\n }",
"public static function countries(): array\n\t{\n\t\treturn ArrayLists::countries();\n\t}",
"protected function addCountry($form, $country = null) {\n $form->add('country', 'entity', array(\n 'class' => 'DaVinci\\TaxiBundle\\Entity\\Admin\\CountryCity',\n 'property' => 'country',\n 'empty_value' => 'form.please_select',\n 'translation_domain' => 'FOSUserBundle',\n //'property_path' => 'country',\n 'mapped' => false,\n 'data' => $country, \n 'query_builder' => function(EntityRepository $er) use ($country){\n \n if($country) \n {\n //use passed to post country\n $cc = $country->getCountryCode();\n $ci = $country->getId();\n \n return $er->createQueryBuilder('c')->select('c')->where('c.status = 1')->andWhere('(c.countryCode != ?1 OR c.id = ?2)')->groupBy('c.countryCode')->orderBy('c.countryCode', 'ASC')->setParameters(array(1 => $cc, 2 => $ci));\n }\n else\n return $er->createQueryBuilder('c')->select('c')->where('c.status = 1')->groupBy('c.countryCode')->orderBy('c.countryCode', 'ASC');\n }));\n }",
"public function getAllCountriesProperty()\n {\n return Country::get();\n }"
] | [
"0.77311397",
"0.7348999",
"0.7319342",
"0.7246737",
"0.7169907",
"0.70847714",
"0.70641494",
"0.7007439",
"0.6937442",
"0.69373447",
"0.6829532",
"0.6716478",
"0.66962695",
"0.6626168",
"0.65853554",
"0.6549243",
"0.6500382",
"0.64771974",
"0.6398946",
"0.6388749",
"0.6310077",
"0.6292781",
"0.6259541",
"0.6252085",
"0.6182435",
"0.6169696",
"0.61547965",
"0.61468846",
"0.6124776",
"0.6122124",
"0.61069876",
"0.6105061",
"0.6067722",
"0.6002084",
"0.6000664",
"0.60004383",
"0.59694386",
"0.5959307",
"0.5938149",
"0.59146535",
"0.5856135",
"0.5853696",
"0.58354634",
"0.5825594",
"0.5817988",
"0.580708",
"0.5802805",
"0.5791151",
"0.576064",
"0.575324",
"0.5744281",
"0.5730923",
"0.5728996",
"0.57246387",
"0.57190436",
"0.5718193",
"0.5718193",
"0.571254",
"0.570961",
"0.5708899",
"0.5701033",
"0.5700134",
"0.5669134",
"0.5668877",
"0.566743",
"0.56531227",
"0.56531227",
"0.56318367",
"0.56109154",
"0.559253",
"0.5590596",
"0.55853796",
"0.5578685",
"0.55623204",
"0.55619645",
"0.5552474",
"0.55517143",
"0.5541659",
"0.553742",
"0.5529043",
"0.5528576",
"0.5526786",
"0.5522683",
"0.5513381",
"0.5507447",
"0.5491257",
"0.548558",
"0.54834676",
"0.54805815",
"0.5472968",
"0.5467128",
"0.5461662",
"0.5461662",
"0.5461662",
"0.54552907",
"0.54501045",
"0.5448773",
"0.5428643",
"0.542808",
"0.5419486"
] | 0.6365015 | 20 |
Get the value of shipping_profiles | public function getShippingProfiles()
{
return $this->shipping_profiles;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getShippingPolicyProfile()\n {\n return $this->shippingPolicyProfile;\n }",
"public function getShippingDetails();",
"function get_shipping_type($shipping_profile_id)\n\t{\n\t\t$shipping_profile_id = mysql_escape_string($shipping_profile_id);\n\t\t$sql = \"SELECT shipping_type FROM nm_partner_shipping_profile WHERE shipping_profile_id = $shipping_profile_id\";\n\t\t$result = Mage::getSingleton('core/resource')->getConnection('core_read')->fetchAll($sql);\n\t\treturn end(end($result));\n\t}",
"public function getShippingInfo();",
"public function getProfile()\n {\n return $this->getFieldValue(self::FIELD_PROFILE);\n }",
"public function getBillingProfile();",
"public function getShipping();",
"public function getShippingInfo()\n {\n return $this->shippingInfo;\n }",
"function get_shipping_by_weight($shipping_profile_id)\n\t{\n\t\t$shipping_profile_id = mysql_escape_string($shipping_profile_id);\n\t\t$sql = \"SELECT s.shipping_profile_id, s.account_id, sm.shipping_master_id, swp.rate, swp.other_charges, swp.shipment_rate, swp.unit_of_measure,sm.service_desc, sl.service_level_id, sl.service_level_name, r.region_name \n\t\t\tFROM nm_shipping_settings as s\n\t\t\tLEFT JOIN nm_shipping_master as sm ON sm.shipping_master_id = s.shipping_master_id\n\t\t\tLEFT JOIN nm_shipping_region as r ON sm.region_id = r.region_id\n\t\t\tLEFT JOIN nm_shipping_service_level as sl ON sm.service_level_id = sl.service_level_id\n\t\t\tRIGHT JOIN nm_shipping_weight_profile as swp ON sm.shipping_master_id = swp.shipping_master_id\n\t\t\tWHERE s.shipping_profile_id = $shipping_profile_id\";\t\n\t\t$result = Mage::getSingleton('core/resource')->getConnection('core_read')->fetchAll($sql);\n \t\treturn $result;\n\t}",
"public function getShipping()\r\n {\r\n return $this->shipping;\r\n }",
"public function getShippingInformation(){\n return $this->_getData(self::SHIPPING_INFORMATION);\n }",
"function getShippingProfiles($object) {\n $object->addCollectionEntry(\"Paket National\");\n $object->addCollectionEntry(\"Paket International\");\n $object->addCollectionEntry(\"Kurier (Express)\");\n}",
"public function getShipping()\n {\n return $this->shipping;\n }",
"public function getShipping()\n {\n return $this->shipping;\n }",
"public function getShipping()\n {\n return $this->shipping;\n }",
"public function getShippingInsurance()\n {\n return $this->shippingInsurance;\n }",
"public function get_sess_cart_shipping_address()\n {\n if (!empty($this->session->userdata('mds_cart_shipping_address'))) {\n return $this->session->userdata('mds_cart_shipping_address');\n }\n $std = new stdClass();\n $row = null;\n\n if ($this->auth_check) {\n $row = $this->profile_model->get_user_shipping_address($this->auth_user->id);\n } else {\n $row = $this->profile_model->get_user_shipping_address(null);\n }\n $std->shipping_first_name = $row->shipping_first_name;\n $std->shipping_last_name = $row->shipping_last_name;\n $std->shipping_email = $row->shipping_email;\n $std->shipping_phone_number = $row->shipping_phone_number;\n $std->shipping_address_1 = $row->shipping_address_1;\n $std->shipping_address_2 = $row->shipping_address_2;\n $std->shipping_country_id = $row->shipping_country_id;\n $std->shipping_state = $row->shipping_state;\n $std->shipping_city = $row->shipping_city;\n $std->shipping_zip_code = $row->shipping_zip_code;\n $std->billing_first_name = $row->shipping_first_name;\n $std->billing_last_name = $row->shipping_last_name;\n $std->billing_email = $row->shipping_email;\n $std->billing_phone_number = $row->shipping_phone_number;\n $std->billing_address_1 = $row->shipping_address_1;\n $std->billing_address_2 = $row->shipping_address_2;\n $std->billing_country_id = $row->shipping_country_id;\n $std->billing_state = $row->shipping_state;\n $std->billing_city = $row->shipping_city;\n $std->billing_zip_code = $row->shipping_zip_code;\n $std->use_same_address_for_billing = 1;\n $this->session->unset_userdata('mds_cart_shipping_address');\n return $std;\n }",
"public function getAddressShipping()\n {\n return $this->addressShipping;\n }",
"public function getShippingCountry()\n {\n return $this->getParameter('shippingCountry');\n }",
"public static function GetProfilesValues()\n\t{\n\t\treturn self::$aPROFILES;\n\t}",
"public function getBillingProfileId();",
"public function getShippingPostcode()\n {\n return $this->getParameter('shippingPostcode');\n }",
"public function getProfile()\n {\n return $this->profile;\n }",
"public function getProfile()\n {\n return $this->profile;\n }",
"public function getProfile()\n {\n return $this->profile;\n }",
"protected function getShippingProfile(OrderInterface $order) {\n $shipping_profile = $this->getShippingProfileFromOrder($order);\n\n if (!$shipping_profile) {\n $shipping_profile = $this->entityTypeManager->getStorage('profile')->create([\n 'type' => $this->getApplicableShippingProfileBundle(),\n 'uid' => 0,\n ]);\n }\n\n return $shipping_profile;\n }",
"private function getShippingData()\n {\n $isOrderVirtual = $this->order->getIsVirtual();\n $orderParams = null;\n\n if ($isOrderVirtual) {\n $orderParams = $this->order->getBillingAddress();\n } else {\n $orderParams = $this->order->getShippingAddress();\n }\n\n return $orderParams->getData();\n }",
"public function getProfileType()\n {\n return $this->profile_type;\n }",
"public function getShippingCode()\n {\n $result = parent::getShippingCode();\n return $result;\n }",
"public function profile() {\n return $this->profile;\n }",
"public function getShipcountry()\n {\n return $this->shipcountry;\n }",
"public function getShippingRate();",
"public function getProfile() {\n\t\treturn $this->profile;\n\t}",
"public function getProfileId() {\n\t\treturn ($this->profileId);\n\t}",
"public function getProfileId() {\n\t\treturn ($this->profileId);\n\t}",
"public function GetProfile()\n {\n return $this->profile;\n }",
"static function getDeliveryId($profile){ // ���������� id �������� �������\n $profiles = array();\n if(self::isConverted()){\n $dTS = Bitrix\\Sale\\Delivery\\Services\\Table::getList(array(\n 'order' => array('SORT' => 'ASC', 'NAME' => 'ASC'),\n 'filter' => array('CODE' => 'sdek:'.$profile)\n ));\n while($dPS = $dTS->Fetch())\n $profiles[]=$dPS['ID'];\n }else\n $profiles = array('sdek_'.$profile);\n return $profiles;\n }",
"public static function getShippingInfo($shipping_id)\n {\n $fields = array(\n \"?:shippings.shipping_id\",\n \"?:shipping_descriptions.shipping\",\n );\n\n $join = \"LEFT JOIN ?:shipping_descriptions ON ?:shippings.shipping_id = ?:shipping_descriptions.shipping_id \";\n\n $shipping_info = db_get_row(\"SELECT \". implode(', ', $fields) .\" FROM ?:shippings \" . $join . \" WHERE ?:shippings.status = ?s AND ?:shippings.shipping_id = ?i\", 'A', $shipping_id);\n\n return $shipping_info;\n }",
"public function getShippingAddress(){\n return $this->_getData(self::SHIPPING_ADDRESS);\n }",
"public function getSellerShipping() {\r\n return Mage::getResourceModel ( 'eav/entity_attribute' )->getIdByCode ( 'catalog_product', 'seller_shipping_option' );\r\n }",
"public function getProfileType() {\n\t\treturn ($this->profileType);\n\t}",
"public function getProfileId() {\n\t\treturn($this->profileId);\n\t}",
"public function getShippingPhone()\n {\n return $this->getParameter('shippingPhone');\n }",
"public function getProfileId()\n {\n return $this->profile_id;\n }",
"public function getShippingStatus()\n {\n return $this->status ?: '';\n }",
"public function getShippingType()\n {\n return $this->shippingType;\n }",
"public function getShippingAmount();",
"private function getShippingInformation()\n {\n $street = \"\";\n $number = \"\";\n $complement = \"\";\n $district = \"\";\n\n $fullAddress = $this->addressConfig($this->shippingData['street']);\n $street = $fullAddress[0] != '' ? $fullAddress[0] : $this->addressConfig($this->shippingData['street']);\n $number = is_null($fullAddress[1]) ? '' : $fullAddress[1];\n $complement = is_null($fullAddress[2]) ? '' : $fullAddress[2];\n $district = is_null($fullAddress[3]) ? '' : $fullAddress[3];\n\n $PagSeguroShipping = new PagSeguroShipping();\n $PagSeguroAddress = new PagSeguroAddress();\n $PagSeguroAddress->setCity($this->shippingData['city']);\n $PagSeguroAddress->setPostalCode(self::fixPostalCode($this->shippingData['postcode']));\n $PagSeguroAddress->setState($this->shippingData['region']);\n $PagSeguroAddress->setStreet($street);\n $PagSeguroAddress->setNumber($number);\n $PagSeguroAddress->setComplement($complement);\n $PagSeguroAddress->setDistrict($district);\n $PagSeguroShipping->setAddress($PagSeguroAddress);\n\n return $PagSeguroShipping;\n }",
"public function getProfileBytes()\n {\n return $this->profile_bytes;\n }",
"public function getShippingDetails()\n {\n return $this->shippingDetails instanceof ItemShippingDetailsDraftBuilder ? $this->shippingDetails->build() : $this->shippingDetails;\n }",
"public function getShipzip()\n {\n return $this->shipzip;\n }",
"public function getProfilePhone() {\n\t\treturn ($this->profilePhone);\n\t}",
"public function getShippingState()\n {\n return $this->getParameter('shippingState');\n }",
"public function getSingleItemDetails($shippingRates)\n {\n return $this->getHelperBlock()->getSingleItemDetails($shippingRates);\n }",
"public function getProfileId() {\n\t\treturn $this->profileId;\n\t}",
"public function getEmailShippingLabelDetail()\n {\n return isset($this->emailShippingLabelDetail) ? $this->emailShippingLabelDetail : null;\n }",
"function getShippingPrice(){\n\t\t$data = $this->_collectShippingInfo();\n\t\tif(Mage::getModel(\"tax/config\")->displayCartShippingExclTax()) return $data->getShippingExclTax();\n\t\telse return $data->getShippingInclTax();\n\t}",
"public function getProfiles()\n {\n return $this->profiles;\n }",
"public function getShippedValue()\n {\n return defined('static::SHIPPED_VALUE') ? static::SHIPPED_VALUE : 'shipped';\n }",
"public function getProfileId() \n {\n if (!$this->hasProfileId()) \n {\n $this->profileId = '';\n }\n\n return $this->profileId;\n }",
"public function getShippingKey()\n {\n return $this->shippingKey;\n }",
"public function getShippingKey()\n {\n return $this->shippingKey;\n }",
"public function getMapShippingTypes()\n {\n return $this->map_shipping_types;\n }",
"public function getShippingInfo(array $parameters = []) {\n return $this->oauth()->requestObject('GET', '/shipping/info/:shipping_info_id', $parameters);\n }",
"public function getShippingCost()\r\n {\r\n return $this->shipping_cost;\r\n }",
"public function getShippingDetails()\n {\n if (is_null($this->shippingDetails)) {\n /** @psalm-var stdClass|array<string, mixed>|null $data */\n $data = $this->raw(self::FIELD_SHIPPING_DETAILS);\n if (is_null($data)) {\n return null;\n }\n\n $this->shippingDetails = ItemShippingDetailsDraftModel::of($data);\n }\n\n return $this->shippingDetails;\n }",
"public function issetShippingPolicyProfile($index)\n {\n return isset($this->shippingPolicyProfile[$index]);\n }",
"public function getShippingAddress1()\n {\n return $this->getParameter('shippingAddress1');\n }",
"public function getShippingOption()\n {\n if($this->shippingOptionId) {\n $shippingOption = Shop_ShippingOption::create()->find($this->shippingOptionId);\n if(is_a($shippingOption,'Shop_ShippingOption') && $shippingOption->id){\n return $shippingOption;\n }\n }\n return null;\n }",
"public function getShippingDescription();",
"public function getSubtotalShipping()\n {\n $this->initializeSubtotals();\n\n return $this->getIfSet('shipping', $this->data->amount->subtotals);\n }",
"public function getProdCategoryShipping()\n {\n return $this->prod_category_shipping;\n }",
"public function getPaymentProfiles() {\n if (!$this->hasData('payment_profiles')) {\n $profilesArray = array();\n $profiles = Mage::getModel('ipay/profile')->getCollection()\n ->addCustomerFilter($this->getCustomer());\n foreach ($profiles as $profile) {\n if ($profile->getIsVisible()) { // don't display on frontend\n $profilesArray[] = $profile;\n }\n }\n }\n $this->setPaymentProfiles($profilesArray);\n return $this->getData('payment_profiles');\n }",
"protected function getShippingCountry()\n {\n return $this->checkoutSession->getLastRealOrder()->getShippingAddress() ? strtoupper($this->checkoutSession->getLastRealOrder()->getShippingAddress()->getCountryId()) : null;\n }",
"function get_item_shipping() {\n\t}",
"public function getAllProfiles()\n {\n return self::$profiles;\n }",
"protected function getShippingPostcode()\n {\n return $this->checkoutSession->getLastRealOrder()->getShippingAddress() ? $this->checkoutSession->getLastRealOrder()->getShippingAddress()->getPostcode() : null;\n }",
"protected function getStoredShippingData()\n {\n $group_key = isset($this->shipping_info['keys']['group_key']) ? $this->shipping_info['keys']['group_key'] : 0;\n $shipping_id = isset($this->shipping_info['keys']['shipping_id']) ? $this->shipping_info['keys']['shipping_id'] : 0;\n if (isset(Tygh::$app['session']['cart']['shippings_extra']['data'][$group_key][$shipping_id])) {\n return Tygh::$app['session']['cart']['shippings_extra']['data'][$group_key][$shipping_id];\n }\n\n return [];\n }",
"public function getSource()\n {\n return 'user_profile';\n }",
"public function getPaymentProfileList()\n {\n return $this->paymentProfileList;\n }",
"function get_shipping_status($nimli_account_id, $state_code)\n {\n \t$nimli_account_id = mysql_escape_string($nimli_account_id);\n \t$state_code = mysql_escape_string(strtoupper($state_code));\n $sql = \"SELECT s.state_code, s.state_name, tp.shipping_taxable, tp.giftwrap_taxable, c.country_name, tp.account_id \n\t\tFROM chunk.nm_partner_tax_profile as tp\n\t\tLEFT JOIN nm_state AS s ON tp.state_id = s.state_id\n\t\tLEFT JOIN nm_country as c ON s.country_id = c.country_id\n\t\tWHERE account_id = $nimli_account_id\n\t \tAND s.state_code = '$state_code'\";\n\t\t$result = Mage::getSingleton('core/resource')->getConnection('core_read')->\n fetchAll($sql);\n \t\treturn end($result);\n\t}",
"public function getShippingAddress()\n {\n return Mage::getSingleton('checkout/cart')->getQuote()->getShippingAddress();\n }",
"public function getCouponProfiles()\n {\n return $this->coupon_profiles;\n }",
"public function getShippingFields()\n {\n if (!isset($this->arrCache['shippingFields'])) {\n\n $this->arrCache['shippingFields'] = array_filter(array_map(\n function($field) {\n return $field['enabled'] ? $field['value'] : null;\n },\n $this->getShippingFieldsConfig()\n ));\n }\n\n return $this->arrCache['shippingFields'];\n }",
"public function getShippingCost();",
"public function get_shipping_data($userid = \"\")\n\t{\n\t\t$result = $this->db->from(\"shipping_module_settings\")->where(array(\"ship_user_id\" => $userid))->limit(1)->get();\n\t\treturn $result;\n\t}",
"public function getShippingInvoiced();",
"public function getShippingAddress2()\n {\n return $this->getParameter('shippingAddress2');\n }",
"protected function getShippingStreet()\n {\n\n $streetOriginal = $this->checkoutSession->getLastRealOrder()->getShippingAddress() ? $this->checkoutSession->getLastRealOrder()->getShippingAddress()->getStreet() : null;\n $streetData = is_array($streetOriginal) ? implode(' ', $streetOriginal) : $streetOriginal;\n\n return $streetData;\n }",
"public function getShippingId() \n {\n if (!$this->hasShippingId())\n {\n $this->shippingId = '';\n }\n\n return $this->shippingId;\n }",
"public function getNetworkProfile()\n {\n return $this->network_profile;\n }",
"function getPaypalShippingAddress()\n {\n return $this->getPaypalAddress('shipping');\n }",
"public function getProfilePhone() : string {\n\t\treturn $this->profilePhone;\n\t}",
"public function getFreeShipping() {\n return $this->item->getFreeShipping();\n }",
"public function getProfileSize() {}",
"public function get_shipping_details() : array {\n\n\t\t// Return the cached data first.\n\t\tif ( ! empty( $this->shipping_details ) ) {\n\t\t\treturn $this->shipping_details;\n\t\t}\n\n\t\t$product_id = $this->get_product_id();\n\t\tif ( empty( $product_id['ID'] ) ) {\n\t\t\treturn [ 'shipping_details' => [] ];\n\t\t}\n\n\t\t$defaults = apply_filters( 'jays_aliex_get_default_freight_params', [\n\t\t\t'productid' => $product_id['ID'],\n\t\t\t'country' => 'US',\n\t\t\t'province' => '',\n\t\t\t'city' => '',\n\t\t\t'count' => '1',\n\t\t\t'f' => 'd',\n\t\t\t'currencyCode' => 'USD',\n\t\t\t'abVersion' => '1',\n\t\t] );\n\n\t\ttry {\n\t\t\t$request = $this->remote_get( add_query_arg( $defaults, self::FREIGHT_URL ) );\n\t\t} catch ( Exception $e ) {\n\t\t\treturn [ 'shipping_details' => [] ];\n\t\t}\n\n\t\t// The request wraps the content in parenthesis, remove them.\n\t\t$request = ltrim( rtrim( $request, ')' ), '(' );\n\n\t\t$this->shipping_details = [ 'shipping_details' => json_decode( $request, true ) ];\n\n\t\treturn $this->shipping_details;\n\t}",
"public function getUserProfileId() {\n return($this->userProfileId); \n }",
"function getShipping()\n {\n return array('name'=>'test','cost'=>4.5);\n }",
"public function getShipaddress()\n {\n return $this->shipaddress;\n }",
"public function getProfileId() : Uuid {\n\t\treturn ($this->profileId);\n\t}"
] | [
"0.6806734",
"0.66213655",
"0.6515504",
"0.6509815",
"0.6359894",
"0.62811923",
"0.62667805",
"0.6251507",
"0.6250057",
"0.6204455",
"0.6183997",
"0.6169621",
"0.6153559",
"0.6153559",
"0.6153559",
"0.61286604",
"0.6119736",
"0.6083255",
"0.59905535",
"0.59312236",
"0.5903608",
"0.58684826",
"0.5861728",
"0.5861728",
"0.5861728",
"0.5850213",
"0.58432466",
"0.58338577",
"0.58325136",
"0.5831849",
"0.58091974",
"0.5793977",
"0.579023",
"0.5772029",
"0.5772029",
"0.5755938",
"0.5727969",
"0.57268494",
"0.5726357",
"0.57134044",
"0.5702669",
"0.5698853",
"0.56963724",
"0.56696206",
"0.5663517",
"0.5654292",
"0.56433725",
"0.5641768",
"0.56369144",
"0.5630807",
"0.5630581",
"0.5613921",
"0.5609842",
"0.56046736",
"0.5602189",
"0.55896956",
"0.55895746",
"0.5585631",
"0.55845165",
"0.5571771",
"0.5559577",
"0.5559577",
"0.5554827",
"0.55522346",
"0.552257",
"0.5514484",
"0.5512824",
"0.5511711",
"0.5508668",
"0.5505955",
"0.5501635",
"0.5496975",
"0.54946876",
"0.54918855",
"0.5485874",
"0.5477007",
"0.54718435",
"0.54685277",
"0.54659975",
"0.54642195",
"0.54607207",
"0.54426813",
"0.54416275",
"0.5440976",
"0.543796",
"0.54354626",
"0.5433508",
"0.54316914",
"0.5428799",
"0.5427485",
"0.5426359",
"0.5421436",
"0.5410717",
"0.5408534",
"0.5405933",
"0.5392689",
"0.5392548",
"0.53917086",
"0.5384185",
"0.5380265"
] | 0.78327453 | 0 |
Set the value of shipping_profiles | public function setShippingProfiles(array $shipping_profiles)
{
$this->shipping_profiles = $shipping_profiles;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setShipping($shipping);",
"public function setShippingPolicyProfile(array $shippingPolicyProfile)\n {\n $this->shippingPolicyProfile = $shippingPolicyProfile;\n return $this;\n }",
"public function setShipping($shipping)\n {\n $this->shipping = $shipping;\n }",
"public function getShippingProfiles()\n {\n return $this->shipping_profiles;\n }",
"public function setShippingAddress($shippingAddress = '') {\n $address = array(\n 'x_ship_to_address'=>$this->truncateChars($shippingAddress, 60),\n );\n $this->NVP = array_merge($this->NVP, $address); \n }",
"public function saveShippingInfo($attributes) {\n\n $userProfile_model = $this->findByPk(Yii::app()->user->id);\n /**\n * in case when profile id is exsit thats why to take new\n * instance\n */\n if (empty($userProfile_model)) {\n $userProfile_model = new UserProfile;\n $userProfile_model->id = Yii::app()->user->id;\n }\n $userProfile_model->attributes = $attributes;\n \n $userProfile_model->save(false);\n }",
"public function setShippingCountry($shippingCountry = '') {\n $country = array(\n 'x_ship_to_country'=>$this->truncateChars($shippingCountry, 60),\n );\n $this->NVP = array_merge($this->NVP, $country); \n }",
"public function setShippingAddressAction()\n {\n $data = $this->Request()->getParams();\n //we need to set this because of a bug in the shopware models\n if (!isset($data['stateId'])) {\n $data['stateId'] = 0;\n }\n\n /** @var Shopware\\Models\\Customer\\Customer $customerModel */\n $customerModel = Shopware()->Models()->find('Shopware\\Models\\Customer\\Customer', $data['userId']);\n\n if ($shippingAddressModel = $customerModel->getShipping()) {\n $shippingAddressModel->fromArray($data);\n\n Shopware()->Models()->persist($shippingAddressModel);\n Shopware()->Models()->flush();\n\n $this->view->assign(['shippingAddressId' => $shippingAddressModel->getId()]);\n }\n }",
"public function setShippingState($shippingState = '') {\n $state = array(\n 'x_ship_to_state'=>$this->truncateChars($shippingState, 40),\n );\n $this->NVP = array_merge($this->NVP, $state); \n }",
"public function setShippingPostcode($value)\n {\n return $this->setParameter('shippingPostcode', $value);\n }",
"public function set_shipping_info( $values ) {\n\n\t\t// Update customer location to posted location so we can correctly check available shipping methods\n\t\tif ( ! empty( $values['country'] ) ) {\n\t\t\tWC()->customer->set_shipping_country( $values['country'] );\n\t\t}\n\t\tif ( ! empty( $values['state'] ) ) {\n\t\t\tWC()->customer->set_shipping_state( $values['state'] );\n\t\t}\n\t\tif ( ! empty( $values['postcode'] ) ) {\n\t\t\tWC()->customer->set_shipping_postcode( $values['postcode'] );\n\t\t}\n\t}",
"public function setShipping($shippingAddress)\n {\n $this->_shipping['Name'] = $shippingAddress['shipping_firstname'].' '.$shippingAddress['shipping_lastname'];\n $this->_shipping['Address'] = array('AddressLine' => $shippingAddress['shipping_address1'].' '.$shippingAddress['shipping_address2'],\n 'City' => $shippingAddress['shipping_city'],\n 'StateProvinceCode' => $shippingAddress['shipping_state'],\n 'PostalCode' => $shippingAddress['shipping_zipcode'],\n 'CountryCode' => $shippingAddress['shipping_country'],\n );\n $this->_shipping['address_id'] = $shippingAddress['address_id'];\n $this->_shipping['contact_phone'] = $shippingAddress['contact_phone'];\n $this->_shipping['contact_email'] = $shippingAddress['contact_email'];\n $this->persist();\n }",
"public function setProfile(Profile $profile): void\n {\n $this->profile = $profile;\n }",
"function setShipping($ship_key)\n {\n return 4.50;\n }",
"public function SetProfile($profile)\n {\n $this->profile = $profile;\n }",
"public function setBillingProfileId($billing_profile_id);",
"public function setShippingZip($shippingZip = '') {\n $zip = array(\n 'x_ship_to_zip'=>$this->truncateChars($shippingZip, 20),\n );\n $this->NVP = array_merge($this->NVP, $zip); \n }",
"public function updateShipping($data)\n {\n $this->validateAddress($data);\n $customer = new Customer();\n $customer->setValue(\"shipping_first_name\",trim($data['fName']));\n Session::set('shipping_first_name',trim($data['fName']));\n $customer->setValue(\"shipping_last_name\",trim($data['lName']));\n Session::set('shipping_last_name',trim($data['lName']));\n $address = array(\n \"address1\"=>trim($data['addr1']),\n \"address2\"=>trim($data['addr2']),\n \"city\"=>trim($data['city']),\n \"state_province\"=>trim($data['state']),\n \"postal_code\"=>trim($data['postal']),\n \"country\"=>trim($data['count']),\n );\n $customer->setValue(\"shipping_address\",$address);\n Session::set('shipping_address',$address);\n }",
"public function setSameAsBillingShippingAddress()\n {\n $this->_rootElement->find($this->sameAsBilling, Locator::SELECTOR_CSS, 'checkbox')->hover();\n $this->browser->find($this->accountInformationBlock)->hover();\n $this->_rootElement->find($this->sameAsBilling, Locator::SELECTOR_CSS, 'checkbox')->setValue('Yes');\n }",
"public function setShippingCode($data)\n {\n parent::setShippingCode($data);\n }",
"public function setShippingFirstName($firstName = '') {\n $first = array(\n 'x_ship_to_first_name'=>$this->truncateChars($firstName, 50),\n );\n $this->NVP = array_merge($this->NVP, $first); \n }",
"public function issetShippingPolicyProfile($index)\n {\n return isset($this->shippingPolicyProfile[$index]);\n }",
"protected function setFundraiserProfile()\n {\n $this->fundraiser_profile = new UserProfile;\n $this->fundraiser_profile->set( 'user_id', $this->data['fundraiser'] );\n $this->fundraiser_profile->read();\n }",
"public function setAttributeByDefault() {\n $userinfo = UserProfile::model()->findByPk(Yii::app()->user->id);\n // in this case when user has set bit that\n // user want to use orignial address to 1\n \n /**\n * in this case when user has its own \n * billing address then it will be same address as shipping\n */\n if(!empty($_REQUEST['billing'])){\n $billing = UserOrderBilling::model()->findByPk($_REQUEST['billing']);\n \n $this->shipping_first_name = $billing->billing_first_name;\n $this->shipping_last_name = $billing->billing_last_name;\n $this->shipping_address1 = $billing->billing_address1;\n $this->shipping_address2 = $billing->billing_address2;\n $this->shipping_country = $billing->billing_country;\n $this->shipping_state = $billing->billing_state;\n $this->shipping_city = $billing->billing_city;\n $this->shipping_zip = $billing->billing_zip;\n $this->shipping_phone = $billing->billing_phone;\n $this->shipping_mobile = $billing->billing_mobile;\n }\n else if (isset($userinfo->is_shipping_address) && $userinfo->is_shipping_address == 1) {\n $this->shipping_first_name = $userinfo->first_name;\n $this->shipping_last_name = $userinfo->last_name;\n $this->shipping_address1 = $userinfo->address;\n $this->shipping_country = $userinfo->country;\n $this->shipping_state = $userinfo->state_province;\n $this->shipping_city = $userinfo->city;\n $this->shipping_zip = $userinfo->zip_code;\n $this->shipping_phone = $userinfo->contact_number;\n \n } else {\n $criteria = new CDbCriteria();\n $criteria->addCondition(\"user_id = \" . Yii::app()->user->id);\n $criteria->order = \"id DESC\";\n\n $user_order_shipping = UserOrderShipping::model()->find($criteria);\n\n if (!empty($user_order_shipping)) {\n $this->shipping_first_name = $user_order_shipping->shipping_first_name;\n $this->shipping_last_name = $user_order_shipping->shipping_last_name;\n $this->shipping_address1 = $user_order_shipping->shipping_address1;\n $this->shipping_address2 = $user_order_shipping->shipping_address2;\n $this->shipping_country = $user_order_shipping->shipping_country;\n $this->shipping_state = $user_order_shipping->shipping_state;\n $this->shipping_city = $user_order_shipping->shipping_city;\n $this->shipping_zip = $user_order_shipping->shipping_zip;\n $this->shipping_phone = $user_order_shipping->shipping_phone;\n $this->shipping_mobile = $user_order_shipping->shipping_mobile;\n }\n }\n $this->_states = $this->getStates();\n }",
"public function setShippingCountry($value)\n {\n return $this->setParameter('shippingCountry', $value);\n }",
"public function set_sess_cart_shipping_address()\n {\n $std = new stdClass();\n $std->shipping_first_name = $this->input->post('shipping_first_name', true);\n $std->shipping_last_name = $this->input->post('shipping_last_name', true);\n $std->shipping_email = $this->input->post('shipping_email', true);\n $std->shipping_phone_number = $this->input->post('shipping_phone_number', true);\n $std->shipping_address_1 = $this->input->post('shipping_address_1', true);\n $std->shipping_address_2 = $this->input->post('shipping_address_2', true);\n $std->shipping_country_id = $this->input->post('shipping_country_id', true);\n $std->shipping_state = $this->input->post('shipping_state', true);\n $std->shipping_city = $this->input->post('shipping_city', true);\n $std->shipping_zip_code = $this->input->post('shipping_zip_code', true);\n $std->billing_first_name = $this->input->post('billing_first_name', true);\n $std->billing_last_name = $this->input->post('billing_last_name', true);\n $std->billing_email = $this->input->post('billing_email', true);\n $std->billing_phone_number = $this->input->post('billing_phone_number', true);\n $std->billing_address_1 = $this->input->post('billing_address_1', true);\n $std->billing_address_2 = $this->input->post('billing_address_2', true);\n $std->billing_country_id = $this->input->post('billing_country_id', true);\n $std->billing_state = $this->input->post('billing_state', true);\n $std->billing_city = $this->input->post('billing_city', true);\n $std->billing_zip_code = $this->input->post('billing_zip_code', true);\n $std->use_same_address_for_billing = $this->input->post('use_same_address_for_billing', true);\n if (!isset($std->use_same_address_for_billing)) {\n $std->use_same_address_for_billing = 0;\n }\n\n if ($std->use_same_address_for_billing == 1) {\n $std->billing_first_name = $std->shipping_first_name;\n $std->billing_last_name = $std->shipping_last_name;\n $std->billing_email = $std->shipping_email;\n $std->billing_phone_number = $std->shipping_phone_number;\n $std->billing_address_1 = $std->shipping_address_1;\n $std->billing_address_2 = $std->shipping_address_2;\n $std->billing_country_id = $std->shipping_country_id;\n $std->billing_state = $std->shipping_state;\n $std->billing_city = $std->shipping_city;\n $std->billing_zip_code = $std->shipping_zip_code;\n } else {\n if (empty($std->billing_first_name)) {\n $std->billing_first_name = $std->shipping_first_name;\n }\n if (empty($std->billing_last_name)) {\n $std->billing_last_name = $std->shipping_last_name;\n }\n if (empty($std->billing_email)) {\n $std->billing_email = $std->shipping_email;\n }\n if (empty($std->billing_phone_number)) {\n $std->billing_phone_number = $std->shipping_phone_number;\n }\n if (empty($std->billing_address_1)) {\n $std->billing_address_1 = $std->shipping_address_1;\n }\n if (empty($std->billing_address_2)) {\n $std->billing_address_2 = $std->shipping_address_2;\n }\n if (empty($std->billing_country_id)) {\n $std->billing_country_id = $std->shipping_country_id;\n }\n if (empty($std->billing_state)) {\n $std->billing_state = $std->shipping_state;\n }\n if (empty($std->billing_city)) {\n $std->billing_city = $std->shipping_state;\n }\n if (empty($std->billing_zip_code)) {\n $std->billing_zip_code = $std->shipping_zip_code;\n }\n }\n $this->session->set_userdata('mds_cart_shipping_address', $std);\n }",
"public function offsetSet($offset, $value) { if (is_null($offset)) { $this->profile[] = $value; } else { $this->profile[$offset] = $value; }}",
"public function offsetSet($offset, $value) { if (is_null($offset)) { $this->profile[] = $value; } else { $this->profile[$offset] = $value; }}",
"public function setShippingAmount($amount);",
"function setProfileConfig($profile_config){\n\t\t$this->profile_config = $profile_config;\n\t}",
"public function setMapShippingTypes(array $data)\n {\n $data = array_filter($data);\n\n $this->map_shipping_types = $data;\n $this->setSettingValue('retailcrm_map_shipping_types', $data, true);\n }",
"public function setBillingProfile(ProfileInterface $profile);",
"public function setShippingCost($shippingCost);",
"public function setShipToAddress($data=null) {\n if(!is_array($data)) {\n $s = $this->getShipping();\n $data = array(\n 'SHIPTONAME' => $s['firstName'] . ' ' . $s['lastName'],\n 'SHIPTOSTREET' => $s['address'],\n 'SHIPTOSTREET2' => $s['address2'],\n 'SHIPTOCITY' => $s['city'],\n 'SHIPTOSTATE' => $s['state'],\n 'SHIPTOCOUNTRYCODE' => $s['country'],\n 'SHIPTOZIP' => $s['zip']\n );\n }\n $this->_payerShipToAddress = $data;\n }",
"public function unsetShippingPolicyProfile($index)\n {\n unset($this->shippingPolicyProfile[$index]);\n }",
"public function setShippingPhone($value)\n {\n return $this->setParameter('shippingPhone', $value);\n }",
"public function set_manual_shipping($shipping_data = FALSE)\r\n\t{\r\n\t\tif (is_array($shipping_data) && ! empty($shipping_data))\r\n\t\t{\r\n\t\t\t// Loop through data and set to cart session summary.\r\n\t\t\tforeach($shipping_data as $column => $column_value)\r\n\t\t\t{\r\n\t\t\t\tif ($column == 'value' && $this->non_negative($column_value))\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->flexi->cart_contents['settings']['shipping']['value'] = $this->format_calculation($column_value, 2, TRUE);\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Add any existing shipping surcharge to the new value.\r\n\t\t\t\t\t$this->flexi->cart_contents['summary']['shipping_total'] = $this->format_calculation(\r\n\t\t\t\t\t\t$column_value + $this->flexi->cart_contents['settings']['shipping']['data']['surcharge'], 2, TRUE\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\t\t\t\telse if ($column == 'tax_rate' && $this->non_negative($column_value))\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->flexi->cart_contents['settings']['shipping']['tax_rate'] = $column_value;\r\n\t\t\t\t}\r\n\t\t\t\telse if (isset($this->flexi->cart_contents['settings']['shipping'][$column]))\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->flexi->cart_contents['settings']['shipping'][$column] = $column_value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn TRUE;\r\n\t\t}\r\n\t\t\r\n\t\treturn FALSE;\r\n\t}",
"public function setShippingAddress(?Address $shippingAddress): void\n {\n $this->shippingAddress = $shippingAddress;\n }",
"function getShippingProfiles($object) {\n $object->addCollectionEntry(\"Paket National\");\n $object->addCollectionEntry(\"Paket International\");\n $object->addCollectionEntry(\"Kurier (Express)\");\n}",
"public function setShippingMethod(ShippingMethodInterface $shipping_method);",
"public function setProfiles($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\ZwiftPHP\\Protobuf\\Profile::class);\n $this->profiles = $arr;\n\n return $this;\n }",
"public function setShippingValues(Order $order): void;",
"public function save()\n\t{\n\t\t$updatedProfile = Yii::$app->user->identity->profile;\n\t\t\n\t\t$updatedProfile = Yii::$app->user->identity->profile;\n\t\t\n\t\t$updatedProfile->{Yii::$app->request->post()['flag']} = Yii::$app->request->post()['val'];\n\n\t\t$updatedProfile->save();\n\t}",
"public function setShippingState($value)\n {\n return $this->setParameter('shippingState', $value);\n }",
"function useMemberShippingAddress($data, $form, $request) {\n\t\t$order = ShoppingCart::curr();\n\t\t$order->SeparateBillingAddress = false;\n\t\t$order->write();\n\t\t$this->saveDataToSession($data);\n\t\tController::curr()->redirectBack();\n\t}",
"public function setCouponProfiles(array $coupon_profiles)\n {\n $this->coupon_profiles = $coupon_profiles;\n\n return $this;\n }",
"public function setProfile($data)\n {\n if (isset($data['identifier'])) $this->setIdentifier ($data['identifier']);\n if (isset($data['providerName'])) $this->setProvider ($data['providerName']);\n if (isset($data['displayName'])) $this->setDisplayName($data['displayName']);\n if (isset($data['preferredUsername'])) $this->setUserName ($data['preferredUsername']);\n if (isset($data['verifiedEmail'])) $this->setEmail ($data['verifiedEmail']);\n }",
"public function setPostbackProfiles(array $postback_profiles)\n {\n $this->postback_profiles = $postback_profiles;\n\n return $this;\n }",
"public function setShippingAddress2($value)\n {\n return $this->setParameter('shippingAddress2', $value);\n }",
"public function setShippingFaxNo($shippingFaxNo)\r\n {\r\n $this->_shippingFaxNo = $shippingFaxNo;\r\n }",
"public function updateShippingAddress() {\n Log::debug(\"Entering updateShipping\");\n DB::transaction(function () {\n $order = $this->getOrderData();\n if (isset($order)) {\n // If set shipping addres same as billing\n if (isset($_POST['useBillingAddress'])) {\n $useBilling = $_POST['useBillingAddress'];\n if ($useBilling == \"1\") {\n $order->shipping_address = $order->billing_address;\n }\n // Not using billing address\n } else {\n // update the existing billing adress or create a new one\n $address = $order->shippingAddress;\n // if no existing address or changing from billing address\n if (!isset($address) || $order->billing_address == $order->shipping_address)\n $address = new Address();\n\n $address = $this->fillOrderAddress($address);\n $address->save();\n $order->shipping_address = $address->id;\n }\n $order->save();\n }\n });\n }",
"protected function setShipment(array $value)\n {\n $this->shipment = $value;\n }",
"public function setBillingFields($value) {\n\t\t$this->billingDetails = $this->convertToArray($value);\n\t}",
"public function setShippingAddress1($value)\n {\n return $this->setParameter('shippingAddress1', $value);\n }",
"public function save_shipping($post) {\n\t\t$user = $this->session->userdata('user');\n\t\t// Grab only the data that belongs in the shipping table\n\t\t$data['first_name'] = $post['first_name'];\n\t\t$data['last_name'] = $post['last_name'];\n\t\t$data['address'] = $post['address'];\n\t\t$data['address_2'] = $post['address_2'];\n\t\t$data['state'] = $post['state'];\n\t\t$data['city'] = $post['city'];\n\t\t$data['country'] = $post['country'];\n\t\t$data['zip_code'] = $post['zip_code'];\n\n\t\t// If a record already exists, update it\n\t\tif ($userMailing = $this->fetch(array('user_id'=>$user['id']))) {\n\t\t\t$this->db->where(array('user_id',$user['id']));\n\t\t\t$this->db->update(self::TABLE, $data);\n\t\t} else {\n\t\t\t$data['user_id'] = $user['id'];\n\t\t\t$this->db->insert(self::TABLE, $data);\n\t\t}\n\n\t}",
"public function setShippingLastName($lastName = '') {\n $last = array(\n 'x_ship_to_last_name'=>$this->truncateChars($lastName, 50),\n );\n $this->NVP = array_merge($this->NVP, $last); \n }",
"public function setProfileId($value)\n {\n return $this->set('ProfileId', $value);\n }",
"public function setShips(array $ships): void {\n\t\t$this->ships = $ships;\n\t}",
"public function save_shippingAction() {\r\n\t\t$shipping_method = $this->getRequest()->getPost('shipping_method', '');\r\n\t\t$payment_method = $this->getRequest()->getPost('payment_method', false);\r\n\t\t$old_shipping_method = $this->getOnepage()->getQuote()->getShippingAddress()->getShippingMethod();\r\n\t\t$billing_data = $this->getRequest()->getPost('billing', false);\r\n\t\tif($billing_data['country_id']){\r\n\t\t\tMage::getModel('checkout/session')->getQuote()->getBillingAddress()->setData('country_id',$billing_data['country_id'])->save();\r\n\t\t}\r\n\t\t// if ($shipping_method && $shipping_method != '' && $shipping_method != $old_shipping_method) {\r\n\t\t\tMage::helper('onestepcheckout')->saveShippingMethod($shipping_method);\r\n\t\t\t$this->getOnepage()->saveShippingMethod($shipping_method);\r\n\t\t// }\r\n\t\t\r\n\t\t// if ($payment_method != '') {\r\n\t\t\ttry{\r\n\t\t\t\t$payment = $this->getRequest()->getPost('payment', array());\r\n\t\t\t\t$payment['method'] = $payment_method;\r\n\t\t\t\t$this->getOnepage()->savePayment($payment);\r\n\t\t\t\tMage::helper('onestepcheckout')->savePaymentMethod($payment);\r\n\t\t\t}\r\n\t\t\tcatch(Exception $e) {\r\n\t\t\t\t//\r\n\t\t\t}\r\n\t\t// }\r\n\t\t\r\n\t\t// $paymentHtml = $this->_getPaymentMethodsHtml();\r\n\t\t// $reviewHtml = $this->_getReviewTotalHtml();\r\n\t\t// $result = array('payment' => $paymentHtml, \r\n\t\t\t\t\t\t\t\t\t\t// 'review' => $reviewHtml);\r\n\t\t// $this->getResponse()->setBody(Zend_Json::encode($result));\r\n\t\t$this->loadLayout(false);\r\n\t\t$this->renderLayout();\r\n\t}",
"public function setPROFILEID($profileId)\n\t\t{\n\t\t\t$this->profileId=$profileId;\n\t\t}",
"public function setProfileInfo($profile){\n $profile_dir = conf::pathBase() . \"/profiles/$profile\";\n if (!file_exists($profile_dir)) {\n common::abort( \"No such path to profiles: $profile_dir\");\n } \n \n include $profile_dir . \"/profile.inc\";\n $this->profileModules = $_PROFILE_MODULES;\n $this->profileTemplates = $_PROFILE_TEMPLATES;\n $this->profileTemplate = $_PROFILE_TEMPLATE;\n }",
"public function setShippingAddress($shippingAddress){\n return $this->setData(self::SHIPPING_ADDRESS, $shippingAddress);\n }",
"public function setShippingOptionId($id){\n $this->shippingOptionId = $id;\n }",
"public function setCountriesAndRegions(?array $value): void {\n $this->getBackingStore()->set('countriesAndRegions', $value);\n }",
"function setZip( $value )\n {\n $this->Zip = $value;\n }",
"public function setShippingName($value)\n {\n $names = $this->listFirstLastName($value);\n\n $this->setShippingFirstName($names[0]);\n $this->setShippingLastName($names[1]);\n\n return $this;\n }",
"public function updateProfile($user, array $profile);",
"public function setup_profiles( $success, $default, $network ) {\r\n\t\t// Fetch the list of profiles.\r\n\t\tif ( $success ) {\r\n\t\t\tData::instance()->profiles_list( $network, true );\r\n\t\t}\r\n\t}",
"protected function _setShippingAddress(Mage_Sales_Model_Order $order, array $postData)\n {\n $order->getShippingAddress()\n ->setFirstname($postData['firstname'])\n ->setLastname($postData['lastname'])\n ->setCompany($postData['company'])\n ->setStreetFull($postData['street'])\n ->setCity($postData['city'])\n ->setPostcode($postData['postcode'])\n ->setCountryId($postData['country_id'])\n ;\n }",
"public function setShippingMethod() {\n\t\t$json = array();\n\t\t$json['status'] = false;\n\t\t\n\t\tif (isset($this->request->post['code'])) {\n\t\t\t$code=$this->request->post['code'];\n\t\t\t$shipping_method=$this->session->data['shipping_methods'][$code]; \n\t\t\tif ($shipping_method) {\n\t\t\t\tunset($this->session->data['shipping_method']);\n\t\t\t\t$this->session->data['shipping_method'] = $shipping_method;\n\t\t\t\t\n\t\t\t\t$json['status'] = true;\n\t\t\t\t$json['delivery'] = $shipping_method['delivery'];\n\n\t\t\t} else {\n\t\t\t\t$json['error'] = 'Неизвестный способ доставки';\n\t\t\t}\n\t\t} else {\n\t\t\t$json['error'] = 'Не указан тип доставки';\n\t\t}\n\t\t$this->response->addHeader('Content-Type: application/json');\n\t\t$this->response->setOutput(json_encode($json));\n\t}",
"public function setProfileSalt($newProfileSalt) : void {\n\t\t$this->profileSalt = $newProfileSalt;\n\t}",
"public function setShippingInvoiced($shippingInvoiced);",
"function useDifferentShippingAddress($data, $form, $request) {\n\t\t$order = ShoppingCart::curr();\n\t\t$order->SeparateBillingAddress = true;\n\t\t$order->write();\n\t\t$this->saveDataToSession($data);\n\t\tController::curr()->redirectBack();\n\t}",
"private function set_shipping_data($shipping_data = FALSE, $reset_data_only = FALSE)\r\n\t{\r\n\t\t// If all data must be set, rather than just the shippings internal 'data' array.\r\n\t\tif (! $reset_data_only)\r\n\t\t{\r\n\t\t\t// Set default shipping data if no data is submitted.\r\n\t\t\tif (! $shipping_data)\r\n\t\t\t{\r\n\t\t\t\t$set_default_data = TRUE;\r\n\t\t\t\t$shipping_data = (empty($shipping_data)) ? \r\n\t\t\t\t\tarray('id' => 0, 'name' => FALSE, 'description' => FALSE, 'value' => 0, 'tax_rate' => FALSE) : $shipping_data;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tforeach($shipping_data as $column => $data)\r\n\t\t\t{\r\n\t\t\t\t// If data was submitted, update cart shipping array.\r\n\t\t\t\tif (! isset($set_default_data))\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->flexi->cart_contents['settings']['shipping'][$column] = $data;\r\n\t\t\t\t}\r\n\t\t\t\t// Else, default values need to be set.\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$value = (! empty($this->flexi->cart_defaults['shipping'][$column]) || $this->non_negative($this->flexi->cart_defaults['shipping'][$column])) ? \r\n\t\t\t\t\t\t$this->flexi->cart_defaults['shipping'][$column] : $data;\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->flexi->cart_contents['settings']['shipping'][$column] = $value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Set location placeholder if not set.\r\n\t\t\tif (! isset($this->flexi->cart_contents['settings']['shipping']['location']))\r\n\t\t\t{\r\n\t\t\t\t$this->flexi->cart_contents['settings']['shipping']['location'] = array();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Set shipping 'data' array.\r\n\t\tif (isset($set_default_data) || $reset_data_only)\r\n\t\t{\r\n\t\t\t$default_columns = array(\r\n\t\t\t\t'surcharge' => 0, 'separate_shipping_value' => 0, \r\n\t\t\t\t'separate_items' => 0, 'separate_value' => 0, 'separate_weight' => 0, \r\n\t\t\t\t'free_items' => 0, 'free_value' => 0, 'free_weight' => 0, \r\n\t\t\t\t'banned_shipping_items' => array(), 'separate_shipping_items' => array(), 'item_shipping_rates' => array()\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\tforeach($default_columns as $column => $default_value)\r\n\t\t\t{\r\n\t\t\t\t$this->flexi->cart_contents['settings']['shipping']['data'][$column] = $default_value;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn TRUE;\r\n\t}",
"public function setCertificateProfileDisplayName(?string $value): void {\n $this->getBackingStore()->set('certificateProfileDisplayName', $value);\n }",
"public function saveSkins()\n {\n \\XLite\\Core\\Database::getCacheDriver()->save(\n get_called_class() . '.SubstitutonalSkins',\n $this->resourcesCache\n );\n }",
"public function saveShippingAction() {\n\t\tif ($this->getRequest ()->isPost ()) {\n\t\t\t$preAddr = Mage::getSingleton ( 'customer/session' )->getPreaddress ();\n\t\t\t\n\t\t\tif ($preAddr) {\n\t\t\t\t$data = array ();\n\t\t\t\tif (! empty ( $preAddr ['ShippingAddress'] [0] )) {\n\t\t\t\t\t$preData = $preAddr ['ShippingAddress'];\n\t\t\t\t} else {\n\t\t\t\t\t$preData = $preAddr;\n\t\t\t\t}\n\t\t\t\t$dataId = $this->getRequest ()->getPost ( 'addressid' );\n\t\t\t\t\n\t\t\t\t$mpData = Mage::getModel ( 'masterpass/masterpass' );\n\t\t\t\tforeach ( $preData as $value ) {\n\t\t\t\t\tif ($dataId == $value ['AddressId']) {\n\t\t\t\t\t\t$reecipientName = $value ['RecipientName'];\n\t\t\t\t\t\t$name = Mage::helper ( 'masterpass' )->getRecipienName ( $reecipientName );\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (! is_array ( $value ['Line2'] )) {\n\t\t\t\t\t\t\t$lin2 = $value ['Line2'];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$lin2 = null;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (! is_array ( $value ['Line3'] )) {\n\t\t\t\t\t\t\t$lin3 = $value ['Line3'];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$lin3 = null;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$regionIdS = Mage::helper ( 'masterpass' )->checkMasterpassData ( $mpData->statesMapping ( $value ['CountrySubdivision'] ) );\n\t\t\t\t\t\t$regionS = Mage::helper ( 'masterpass' )->checkMasterpassData ( $mpData->getMasterpassRegion ( $value ['CountrySubdivision'] ) );\n\t\t\t\t\t\t$shippingPhone = $mpData->getRemoveDash ( Mage::helper ( 'masterpass' )->checkMasterpassData ( $value ['RecipientPhoneNumber'] ) );\n\t\t\t\t\t\t$data = array (\n\t\t\t\t\t\t\t\t'firstname' => $name [0],\n\t\t\t\t\t\t\t\t'lastname' => $name [1],\n\t\t\t\t\t\t\t\t'street' => array (\n\t\t\t\t\t\t\t\t\t\t0 => $value ['Line1'],\n\t\t\t\t\t\t\t\t\t\t1 => $lin2,\n\t\t\t\t\t\t\t\t\t\t2 => $lin3 \n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'city' => $value ['City'],\n\t\t\t\t\t\t\t\t'region_id' => $regionIdS,\n\t\t\t\t\t\t\t\t'region' => $regionS,\n\t\t\t\t\t\t\t\t'postcode' => $value ['PostalCode'],\n\t\t\t\t\t\t\t\t'country_id' => $value ['Country'],\n\t\t\t\t\t\t\t\t'telephone' => $shippingPhone \n\t\t\t\t\t\t);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$customerAddressId = $this->getRequest ()->getPost ( 'shipping_address_id', false );\n\t\t\t\t$this->getOnepage ()->saveShipping ( $data, $customerAddressId );\n\t\t\t}\n\t\t}\n\t\t$this->loadLayout ( false );\n\t\t$this->renderLayout ();\n\t}",
"public function setIdentityCertificate(?IosCertificateProfileBase $value): void {\n $this->getBackingStore()->set('identityCertificate', $value);\n }",
"public function setShippingPhoneExtension($value)\n {\n return $this->setParameter('shippingPhoneExtension', $value);\n }",
"public function setOneClickApplyProfiles(array $profiles);",
"public function setShippingInformation($shippingInformation){\n return $this->setData(self::SHIPPING_INFORMATION, $shippingInformation);\n }",
"public function setShippingService(ShippingService $service)\n {\n $this->shippingService = $service;\n }",
"public function unset_sess_cart_shipping_address()\n {\n if (!empty($this->session->userdata('mds_cart_shipping_address'))) {\n $this->session->unset_userdata('mds_cart_shipping_address');\n }\n }",
"public function setPostcode($value) {\n\t\tself::$_postCode = $value;\n\t}",
"public function setShippingCity($shippingCity = '') {\n $city = array(\n 'x_ship_to_city'=>$this->truncateChars($shippingCity, 40),\n );\n $this->NVP = array_merge($this->NVP, $city); \n }",
"public function setProfilePhone($profilePhone) {\n\t\t$this->profilePhone = $profilePhone;\n\t}",
"public function shipping_tab() {\n global $wpdb, $post;\n\n $vendor_id = $post->post_author;\n\n $shipping_zone = $wpdb->get_results(\n $wpdb->prepare(\n \"SELECT locations.zone_id, locations.seller_id, locations.location_type as vendor_location_type, locations.location_code as vendor_location_code, wc_zones.location_code, wc_zones.location_type FROM {$wpdb->prefix}dokan_shipping_zone_locations as locations INNER JOIN {$wpdb->prefix}woocommerce_shipping_zone_locations as wc_zones ON locations.zone_id = wc_zones.zone_id INNER JOIN {$wpdb->prefix}dokan_shipping_zone_methods as dokan_methods ON dokan_methods.zone_id = locations.zone_id AND dokan_methods.seller_id = locations.seller_id WHERE locations.seller_id =%d AND locations.location_type != 'postcode' ORDER BY wc_zones.zone_id ASC\", $vendor_id\n ), ARRAY_A\n );\n\n $_overwrite_shipping = get_post_meta( $post->ID, '_overwrite_shipping', true );\n $dps_processing = get_user_meta( $vendor_id, '_dps_pt', true );\n $from = get_user_meta( $vendor_id, '_dps_form_location', true );\n $dps_country_rates = get_user_meta( $vendor_id, '_dps_country_rates', true );\n $shipping_policy = get_user_meta( $vendor_id, '_dps_ship_policy', true );\n $refund_policy = get_user_meta( $vendor_id, '_dps_refund_policy', true );\n $product_processing_time = get_post_meta( $post->ID, '_dps_processing_time', true );\n $processing_time = $dps_processing;\n\n if ( 'yes' === $_overwrite_shipping ) {\n $processing_time = ( $product_processing_time ) ? $product_processing_time : $dps_processing;\n }\n\n $country_obj = new WC_Countries();\n $countries = $country_obj->countries;\n $states = $country_obj->states;\n\n $shipping_countries = '';\n $shipping_states = '';\n $location_code = '';\n $check_countries = array();\n $check_states = array();\n\n if ( $shipping_zone ) {\n foreach ( $shipping_zone as $zone ) {\n $location_code = $zone['vendor_location_code'];\n\n if ( $zone['vendor_location_type'] === 'state' ) {\n $location_codes = explode( ':', $location_code );\n $country_code = isset( $location_codes[0] ) ? $location_codes[0] : '';\n $state_code = isset( $location_codes[1] ) ? $location_codes[1] : '';\n\n if ( isset( $states[ $country_code ][ $state_code ] ) && isset( $countries[ $country_code ] ) && ! in_array( $states[ $country_code ][ $state_code ], $check_states, true ) ) {\n $get_state_name = $states[ $country_code ][ $state_code ];\n\n $check_states[ $get_state_name ] = $get_state_name;\n $shipping_states .= $get_state_name . ' (' . $countries[ $country_code ] . '), ';\n }\n }\n\n if ( $zone['vendor_location_type'] === 'country' && $countries[ $location_code ] && ! in_array( $countries[ $location_code ], $check_countries, true ) ) {\n $location_code = $countries[ $location_code ];\n $check_countries[ $location_code ] = $location_code;\n $shipping_countries .= $location_code . ', ';\n }\n }\n }\n ?>\n\n <?php if ( $shipping_countries ) { ?>\n <p>\n <?php esc_html_e( 'Shipping Countries', 'dokan' ); ?>:\n <strong><?php echo rtrim( $shipping_countries, ', ' ); ?></strong>\n </p>\n <hr>\n <?php } ?>\n\n <?php if ( $shipping_states ) { ?>\n <p>\n <?php esc_html_e( 'Shipping States', 'dokan' ); ?>:\n <strong><?php echo rtrim( $shipping_states, ', ' ); ?></strong>\n </p>\n <hr>\n <?php } ?>\n\n <?php if ( $processing_time ) { ?>\n <p>\n <strong>\n <?php esc_html_e( 'Ready to ship in', 'dokan' ); ?> <?php echo dokan_get_processing_time_value( $processing_time ); ?>\n\n <?php\n if ( $from ) {\n echo __( 'from', 'dokan' ) . ' ' . $countries[ $from ];\n }\n ?>\n </strong>\n </p>\n <hr>\n <?php } ?>\n\n <?php if ( $shipping_policy ) { ?>\n <p> </p>\n <strong><?php esc_html_e( 'Shipping Policy', 'dokan' ); ?></strong>\n <hr>\n <?php echo wpautop( $shipping_policy ); ?>\n <?php } ?>\n\n <?php if ( $refund_policy ) { ?>\n <hr>\n <p> </p>\n <strong><?php esc_html_e( 'Refund Policy', 'dokan' ); ?></strong>\n <hr>\n <?php echo wpautop( $refund_policy ); ?>\n <?php } ?>\n <?php\n }",
"public function setShippingDescription($description);",
"public function setGeo($value)\n {\n $this->geo = $value;\n }",
"private function setShippingOptions() {\n // Reset the settings if this is a recrawl\n if ($this->getSaverData()->isRecrawl()) {\n // Set dimensions and weight\n $this->product->set_weight('');\n $this->product->set_length('');\n $this->product->set_width('');\n $this->product->set_height('');\n\n // Set shipping class\n $this->product->set_shipping_class_id(0);\n }\n\n // No shipping for virtual products.\n if ($this->wcData->isVirtual()) {\n $this->product->set_virtual(true);\n return;\n }\n\n // Not a virtual product.\n $this->product->set_virtual(false);\n\n // Set dimensions and weight\n $this->product->set_weight($this->wcData->getWeight());\n $this->product->set_length($this->wcData->getLength());\n $this->product->set_width($this->wcData->getWidth());\n $this->product->set_height($this->wcData->getHeight());\n\n // Set shipping class\n $this->product->set_shipping_class_id($this->wcData->getShippingClassId());\n }",
"function adjust_shipping_rate($rates)\n{\n foreach ($rates as $rate) {\n if ($rate->id === 'cdek_shipping_method') {\n if (isset($_COOKIE['shipping_city_cost'])) {\n $rate->cost = $_COOKIE['shipping_city_cost'];\n $rate->label = $_COOKIE['shipping_name'];\n }\n }\n }\n return $rates;\n}",
"public function setShipping($shipping)\r\n {\r\n $this->shipping = $shipping;\r\n\r\n return $this;\r\n }",
"public function addToShippingPolicyProfile(\\Nogrod\\eBaySDK\\BusinessPoliciesManagement\\ShippingPolicyProfileType $shippingPolicyProfile)\n {\n $this->shippingPolicyProfile[] = $shippingPolicyProfile;\n return $this;\n }",
"public function setCartShippingMethodID($shippingMethodId)\n {\n }",
"public function setSku(?string $value): void {\n $this->getBackingStore()->set('sku', $value);\n }",
"public function get_sess_cart_shipping_address()\n {\n if (!empty($this->session->userdata('mds_cart_shipping_address'))) {\n return $this->session->userdata('mds_cart_shipping_address');\n }\n $std = new stdClass();\n $row = null;\n\n if ($this->auth_check) {\n $row = $this->profile_model->get_user_shipping_address($this->auth_user->id);\n } else {\n $row = $this->profile_model->get_user_shipping_address(null);\n }\n $std->shipping_first_name = $row->shipping_first_name;\n $std->shipping_last_name = $row->shipping_last_name;\n $std->shipping_email = $row->shipping_email;\n $std->shipping_phone_number = $row->shipping_phone_number;\n $std->shipping_address_1 = $row->shipping_address_1;\n $std->shipping_address_2 = $row->shipping_address_2;\n $std->shipping_country_id = $row->shipping_country_id;\n $std->shipping_state = $row->shipping_state;\n $std->shipping_city = $row->shipping_city;\n $std->shipping_zip_code = $row->shipping_zip_code;\n $std->billing_first_name = $row->shipping_first_name;\n $std->billing_last_name = $row->shipping_last_name;\n $std->billing_email = $row->shipping_email;\n $std->billing_phone_number = $row->shipping_phone_number;\n $std->billing_address_1 = $row->shipping_address_1;\n $std->billing_address_2 = $row->shipping_address_2;\n $std->billing_country_id = $row->shipping_country_id;\n $std->billing_state = $row->shipping_state;\n $std->billing_city = $row->shipping_city;\n $std->billing_zip_code = $row->shipping_zip_code;\n $std->use_same_address_for_billing = 1;\n $this->session->unset_userdata('mds_cart_shipping_address');\n return $std;\n }",
"public function setPopZipCode($value)\n {\n return $this->set('PopZipCode', $value);\n }",
"public function setType(PagSeguroShippingType $type)\n {\n $this->type = $type;\n }",
"function idc_save_shipping_info($user_id, $order_id, $paykey = '', $fields = null, $source = '') {\n\tif (!empty($fields)) {\n\t\t$address_info = get_user_meta($user_id, 'md_shipping_info', true);\n\t\tif (empty($address_info)) {\n\t\t\t$address_info = array(\n\t\t\t\t'address' => '',\n\t\t\t\t'address_two' => '',\n\t\t\t\t'city' => '',\n\t\t\t\t'state' => '',\n\t\t\t\t'zip' => '',\n\t\t\t\t'country' => ''\n\t\t\t);\n\t\t}\n\t\tforeach ($fields as $field) {\n\t\t\tif (array_key_exists($field['name'], $address_info)) {\n\t\t\t\tif (!empty($field['value'])) {\n\t\t\t\t\t$address_info[$field['name']] = sanitize_text_field(str_replace('%20', ' ', $field['value']));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Adding the Address info to shipping info to show in Account tab\n\t\tif (!empty($address_info)) {\n\t\t\tupdate_user_meta($user_id, 'md_shipping_info', $address_info);\n\t\t}\n\n\t\t// Adding address to order meta as well, in case needed\n\t\tID_Member_Order::update_order_meta($order_id, 'shipping_info', $address_info);\n\t}\n}",
"public function setShippingStatus($status, $updateTime = null)\n {\n /** @var TimeProvider $timeProvider */\n $timeProvider = ServiceRegister::getService(TimeProvider::CLASS_NAME);\n\n $this->status = $status;\n\n if ($updateTime === null) {\n $this->lastStatusUpdateTime = $timeProvider->getCurrentLocalTime();\n } else {\n $this->lastStatusUpdateTime = $timeProvider->getDateTime($updateTime);\n }\n }"
] | [
"0.62533206",
"0.60267454",
"0.6007191",
"0.59815156",
"0.58917296",
"0.58784646",
"0.5840728",
"0.5788696",
"0.57856846",
"0.5728427",
"0.57164305",
"0.571469",
"0.56986743",
"0.56973845",
"0.5642806",
"0.5616884",
"0.5593729",
"0.55740577",
"0.5571537",
"0.55700624",
"0.5511548",
"0.5460159",
"0.54288006",
"0.5428153",
"0.5392032",
"0.53804797",
"0.5361821",
"0.5361821",
"0.5359162",
"0.5355566",
"0.5354606",
"0.5324265",
"0.5321217",
"0.5286693",
"0.5284191",
"0.52696824",
"0.5267894",
"0.5243333",
"0.5238881",
"0.5234851",
"0.52289206",
"0.52246594",
"0.52078545",
"0.5202957",
"0.5192321",
"0.5178989",
"0.5173939",
"0.5164956",
"0.51600933",
"0.5151202",
"0.51454866",
"0.51355505",
"0.5118524",
"0.5109182",
"0.5102897",
"0.50956345",
"0.5088402",
"0.5080304",
"0.5080232",
"0.5069475",
"0.5061077",
"0.50306493",
"0.50127447",
"0.5012026",
"0.5003704",
"0.4979073",
"0.49741912",
"0.49586105",
"0.49463344",
"0.49461946",
"0.49403802",
"0.4938926",
"0.49311665",
"0.49311477",
"0.4930248",
"0.4922864",
"0.49169183",
"0.49090508",
"0.49056634",
"0.49008211",
"0.48854265",
"0.4881314",
"0.48737878",
"0.4871573",
"0.487032",
"0.4868004",
"0.48664537",
"0.4865224",
"0.48646963",
"0.48601845",
"0.48572806",
"0.48512313",
"0.48454508",
"0.48250806",
"0.48237234",
"0.48233345",
"0.48221883",
"0.48127264",
"0.4812524",
"0.48077735"
] | 0.73087424 | 0 |
Get the value of return_profiles | public function getReturnProfiles()
{
return $this->return_profiles;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function GetProfilesValues()\n\t{\n\t\treturn self::$aPROFILES;\n\t}",
"public function getProfiles()\n {\n return $this->profiles;\n }",
"public function getReturnPolicyProfileList()\n {\n return $this->returnPolicyProfileList;\n }",
"public function getAllProfiles()\n {\n return self::$profiles;\n }",
"public function getProfile()\n {\n return $this->getFieldValue(self::FIELD_PROFILE);\n }",
"public function getProfileResult($token){\n\t\treturn $this->_profiles[$token];\n\t}",
"public function profileDetails()\n {\n $processReaction = $this->userEngine->prepareProfileDetails();\n\n return __processResponse($processReaction, [], null, true);\n }",
"public function getPostbackProfiles()\n {\n return $this->postback_profiles;\n }",
"public function profile() {\n return $this->profile;\n }",
"public function getProfilesToShow()\n\t{\n\t\treturn $this->profilesToShow;\n\t}",
"static function profiles() {\n global $LANG;\n\n $a_profil = array();\n $a_profil[] = array('profil' => 'agent',\n 'name' => $LANG['plugin_fusioninventory']['profile'][2]);\n $a_profil[] = array('profil' => 'remotecontrol',\n 'name' => $LANG['plugin_fusioninventory']['profile'][3]);\n $a_profil[] = array('profil' => 'configuration',\n 'name' => $LANG['plugin_fusioninventory']['profile'][4]);\n $a_profil[] = array('profil' => 'wol',\n 'name' => $LANG['plugin_fusioninventory']['profile'][5]);\n $a_profil[] = array('profil' => 'unknowndevice',\n 'name' => $LANG['plugin_fusioninventory']['profile'][6]);\n $a_profil[] = array('profil' => 'task',\n 'name' => $LANG['plugin_fusioninventory']['profile'][7]);\n\n return $a_profil;\n }",
"public function getProfile()\n {\n return $this->profile;\n }",
"public function getProfile()\n {\n return $this->profile;\n }",
"public function getProfile()\n {\n return $this->profile;\n }",
"public function getProfile() {\n\t\treturn $this->profile;\n\t}",
"public function getWebProfileList()\n {\n $url = $this->host . '/v1/payment-experience/web-profiles';\n $authorization = 'Authorization: Bearer ' . $this->clientCredentials->access_token;\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json;charset=UTF-8', $authorization));\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($curl, CURLOPT_POST, 1);\n\n $this->cUrl = $curl;\n return $this->sendRequest();\n //===\n }",
"public function GetProfile()\n {\n return $this->profile;\n }",
"function profile_info() {\n $parameters = array(\n 'method' => __FUNCTION__\n );\n return $this->get_data($parameters);\n }",
"public function getProfileBytes()\n {\n return $this->profile_bytes;\n }",
"public function getUserProfile();",
"public function getProfileId() {\n\t\treturn ($this->profileId);\n\t}",
"public function getProfileId() {\n\t\treturn ($this->profileId);\n\t}",
"public function getProfile()\n {\n $res = $this->getEntity()->getProfile();\n\t\tif($res === null)\n\t\t{\n\t\t\t$this->setProfile(SDIS62_Model_DAO_Abstract::getInstance($this::$type_objet)->findByCriteria('Profile', array('primary' => $this::getPrimary())));\n\t\t\treturn $this->getEntity()->getProfile();\n\t\t}\n return $res;\n }",
"public function getUserProfile(){\n\n\t\treturn $this->cnuser->getUserProfile($this->request->header('Authorization'));\n\t}",
"public function getProfileId() {\n\t\treturn($this->profileId);\n\t}",
"public function getPaymentProfiles() {\n if (!$this->hasData('payment_profiles')) {\n $profilesArray = array();\n $profiles = Mage::getModel('ipay/profile')->getCollection()\n ->addCustomerFilter($this->getCustomer());\n foreach ($profiles as $profile) {\n if ($profile->getIsVisible()) { // don't display on frontend\n $profilesArray[] = $profile;\n }\n }\n }\n $this->setPaymentProfiles($profilesArray);\n return $this->getData('payment_profiles');\n }",
"public function getPaymentProfileList()\n {\n return $this->paymentProfileList;\n }",
"public function getProfilePicture()\n\t{\n\t\treturn $this->info['profile_picture'];\n\t}",
"public function getProfileId() {\n\t\treturn $this->profileId;\n\t}",
"public function get_profile_data() {\n\t\treturn $this->db->get_where('users', array('id' => $this->session->userdata('user_id')))->row_array();\n\t}",
"public function getProf(){\n return $this->prof;\n }",
"function getProfile(){\n $profile = $this->loadUser();\n return $profile;\n }",
"public function getProfileId() \n {\n if (!$this->hasProfileId()) \n {\n $this->profileId = '';\n }\n\n return $this->profileId;\n }",
"public function getShippingProfiles()\n {\n return $this->shipping_profiles;\n }",
"public static function getProfiles() {\n $db = Db::instance();\n $q = \"SELECT * FROM `\".self::DB_TABLE.\"`\";\n $result = $db->query($q);\n\n $profiles = array();\n if($result->num_rows != 0) {\n while($row = $result->fetch_assoc()) {\n $profiles[] = self::getProfile($row['profile_id']);\n }\n }\n return $profiles;\n }",
"public function getProfileHash() {\n\t\treturn ($this->profileHash);\n\t}",
"public function setReturnProfiles(array $return_profiles)\n {\n $this->return_profiles = $return_profiles;\n\n return $this;\n }",
"public function getProfileType()\n {\n return $this->profile_type;\n }",
"public function fetch(): object\n {\n return $this->get('userProfile/v1/internal/users/' . $this->accountId . '/profiles');\n }",
"public function fetch(): object\n {\n return $this->get('userProfile/v1/internal/users/' . $this->accountId . '/profiles');\n }",
"public function getDbProfileResult($token){\n\t\treturn $this->_profiles[$token];\n\t}",
"public function getProfilePicture()\n {\n return $this->profilePicture;\n }",
"public function twitter_user_profile() {\n $current_uid = isset($_GET['team']) ? $_GET['muid'] : \\Drupal::currentUser()->id();\n $TwitterHelper = new TwitterHelperFunction();\n $properties = ['token_access'];\n $response_token = \\Drupal::service('social_media.social_media_controller')->getKabbodeNetworkStatusProperty(174, $current_uid, $properties);\n $connection = new TwitterOAuth($TwitterHelper->getTwitterApiKey(), $TwitterHelper->getTwitterSecretKey(), $response_token['token_access']->oauth_token, $response_token['token_access']->oauth_token_secret);\n $verify_account = $connection->get('account/verify_credentials');\n return $verify_account;\n }",
"public function getProfileType() {\n\t\treturn ($this->profileType);\n\t}",
"public function getCouponProfiles()\n {\n return $this->coupon_profiles;\n }",
"public function getProfile()\r\n {\r\n return $this->getGuardUser() ? $this->getGuardUser()->getProfile() : null;\r\n }",
"public function getProfileId(): ?int {\n\t\treturn ($this->profileId);\n\t}",
"abstract protected function getUserProfile();",
"public function getProfile() {\n return $this->getGuardUser() ? $this->getGuardUser()->getProfile() : null;\n }",
"public function getProfileId() : Uuid {\n\t\treturn ($this->profileId);\n\t}",
"function ds_get_social_profiles() {\n\n // Return a filterable social profile.\n return apply_filters(\n 'ds_social_profiles',\n array()\n );\n \n}",
"public function getInfoProfile(){\n return $this->get_user_by_id($this->getAccountID());\n }",
"public function existing_profiles()\n {\n if ($this->db->table_exists('profiles'))\n {\n $this->db->select('id, temperatureopt, temperaturemax, lighthours, moisture, phvaluemin, phvaluemax');\n $this->db->where('is_default', '1');\n $query = $this->db->get('profiles');\n return $query;\n }\n }",
"public function getProfileName() {\n\t\treturn ($this->profileName);\n\t}",
"function getProfileName() {\n\t\treturn $this->_ProfileName;\n\t}",
"public function getProfileId()\n {\n return $this->profile_id;\n }",
"public function getBillingProfile();",
"public static function getProfiles()\n {\n $db = DataBase::connect();\n\n $result = $db->query('SELECT * FROM `profile`');\n\n $profiles = [];\n\n $i = 1;\n\n while($row = $result->fetch()) {\n\n $profiles[$i]['profile'] = $row['profile'];\n $profiles[$i]['ukr_title'] = $row['ukr_title'];\n $profiles[$i]['upper_ukr_title'] = $row['upper_ukr_title'];\n\n $i++;\n }\n return $profiles;\n }",
"public function getProfileImg()\n {\n return $this->profile_img;\n }",
"public function getUserProfileName(): string {\n\t\treturn ($this->userProfileName);\n\t}",
"public function testDestiny2GetProfile()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }",
"public function getUserProfileId() {\n return($this->userProfileId); \n }",
"public function jsonStructureGetProfile()\n {\n return [\n \"result\"=> [\n \"id\",\n \"username\",\n \"full_name\",\n \"gender\",\n \"phone\",\n \"email\",\n \"created_at\",\n \"updated_at\",\n \"deleted_at\",\n ],\n \"code\"\n ];\n }",
"public function getUserProfileDetails()\n {\n // Obtain the authenticated user's id.\n $id = Auth::id();\n\n // Query to obtain the user's profile details.\n $userDetails = User::select('first_name', 'last_name', 'email', 'max_fuel_limit', 'max_distance_limit')->where('user_id', $id)->first();\n\n // Return the selected details.\n return $userDetails;\n }",
"public function getProfesseurs()\n {\n return $this->professeurs;\n }",
"function getProfileID() {\n\t\treturn $this->_ProfileID;\n\t}",
"public function getProfile(){\n\t\treturn (new Profile($this->userName));\n\t}",
"public function getProfileImg()\n {\n return $this->profileImg;\n }",
"public function issetReturnPolicyProfileList($index)\n {\n return isset($this->returnPolicyProfileList[$index]);\n }",
"public function getProfilePicture();",
"public function getOneClickApplyProfiles();",
"protected function _getProfile($loadProfileFlag = self::NO_PROFILE_THROW_EXCEPTION)\n {\n if (!$this->_loadedProfile) {\n if (($this->_loadProfile($loadProfileFlag) === false) && ($loadProfileFlag === self::NO_PROFILE_RETURN_FALSE)) {\n return false;\n }\n }\n\n return $this->_loadedProfile;\n }",
"public function getUserProfile() {\n global $user, $db;\n\n $userID = $user->getId();\n\n $sql = 'SELECT p.firstName, p.lastName, p.dob, p.addressFirst, p.addressSecond, p.city, p.postcode, p.mobile, p.bio\n FROM users AS u\n JOIN profiles AS p ON p.userId = u.id\n WHERE u.id = ?';\n\n $stmt = $db->get()->prepare($sql);\n\n if ($stmt) {\n $stmt->execute([$userID]);\n return $stmt->fetch(PDO::FETCH_ASSOC);\n }\n }",
"public function get_communicationProfiles(): array\n {\n // $profiles is a str;\n $lines = []; // strArr;\n // $nlines is a int;\n // $idx is a int;\n // $line is a str;\n // $cpos is a int;\n // $profno is a int;\n $res = []; // strArr;\n\n $profiles = $this->_AT('+UMNOPROF=?');\n $lines = explode(''.\"\\n\".'', $profiles);\n $nlines = sizeof($lines);\n if (!($nlines > 0)) return $this->_throw( YAPI::IO_ERROR, 'fail to retrieve profile list',$res);\n while (sizeof($res) > 0) {\n array_pop($res);\n };\n $idx = 0;\n while ($idx < $nlines) {\n $line = $lines[$idx];\n $cpos = YAPI::Ystrpos($line,':');\n if ($cpos > 0) {\n $profno = intVal(substr($line, 0, $cpos));\n if ($profno > 1) {\n $res[] = $line;\n }\n }\n $idx = $idx + 1;\n }\n return $res;\n }",
"private function getReturn()\n {\n // Don't return object like this:\n // return [\n // 'user' => [\n // 'id' => auth()->user()->id,\n // 'name' => auth()->user()->name,\n // ]\n // ];\n\n return [\n 'user_id' => auth()->user()->id,\n 'user_name' => auth()->user()->name,\n 'user_image' => auth()->user()->profile_image,\n ];\n }",
"public function profiles()\n {\n $sql = \"SELECT *\n FROM profile\";\n\n $query = $this->db->prepare($sql);\n $query->execute();\n return $query->fetchAll();\n }",
"public function profile(): string\n {\n if ($this->profile) {\n return $this->profile;\n }\n\n return $this->app['opx.profile'] ?? 'default';\n }",
"private function fetch_social_profiles() {\n\t\t$profiles = [];\n\t\t$social_profiles = [\n\t\t\t'facebook_site',\n\t\t\t'instagram_url',\n\t\t\t'linkedin_url',\n\t\t\t'myspace_url',\n\t\t\t'youtube_url',\n\t\t\t'pinterest_url',\n\t\t\t'wikipedia_url',\n\t\t];\n\t\tforeach ( $social_profiles as $profile ) {\n\t\t\t$social_profile = $this->helpers->options->get( $profile, '' );\n\t\t\tif ( $social_profile !== '' ) {\n\t\t\t\t$profiles[] = \\urldecode( $social_profile );\n\t\t\t}\n\t\t}\n\n\t\t$twitter = $this->helpers->options->get( 'twitter_site', '' );\n\t\tif ( $twitter !== '' ) {\n\t\t\t$profiles[] = 'https://twitter.com/' . $twitter;\n\t\t}\n\n\t\t/**\n\t\t * Filter: 'wpseo_schema_organization_social_profiles' - Allows filtering social profiles for the\n\t\t * represented organization.\n\t\t *\n\t\t * @api string[] $profiles\n\t\t */\n\t\t$profiles = \\apply_filters( 'wpseo_schema_organization_social_profiles', $profiles );\n\n\t\treturn $profiles;\n\t}",
"public function getProfileHash() : string {\n\t\treturn $this->profileHash;\n\t}",
"public function getProfilePictureFile()\n {\n return $this->profile_picture_file;\n }",
"function getProfile($id){\n return $this->activity_model->fetchProfile($id)->row();;\n }",
"public function getProfile()\n {\n return $this->request('me');\n }",
"public function getProfileInfo()\n\t{\n\t\t$data = $this->get($this->_objectType . $this->_objectId);\n\t\treturn $data;\n\t\t$fields = array();\n\t\tforeach ($data as $fieldName => $fieldValue)\n\t\t{\n\t\t\t$fields[$fieldName] = $fieldValue;\n\t\t}\n\t\t$this->_fields = $fields;\n\t\treturn $this->_fields;\n\t}",
"function user_get_profile_data($id = null)\n\t{\n\t\t$uid = ($id == null) ? $this->user_getid() : $id; //If ID is null, then fetch *this* user profile\n\t\t$columns = $this->DB->database_build_query('USER_PROFILE');\n\t\t$profile = $this->DB->database_select('users', $columns,\n\t\t\t\t\t\t array('uid' => $uid), 1);\n\t\tif($profile == FALSE)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\treturn $profile;\n\t}",
"function yz_profile() {\n\treturn Youzer_Profile::get_instance();\n}",
"public static function getProfile($gotuser) {\n $assocprofile = User::with('profile')->find($gotuser->id)->profile;\n return $assocprofile;\n }",
"public function getProfileName()\n\t\t{\n\t\t return $this->profileName;\n\t\t}",
"public function retrieve_profile_data()\n\t{\n\t\t$user_id = $this->session->userdata('user_id');\n\t\t\n\t\t$this->db->select('a.user_name,a.mobile_no,b.email');\n\t\t$this->db->from('users a');\n\t\t$this->db->join('client_user_login b','b.user_id = a.user_id');\n\t\t$this->db->where(array('a.user_id'=>$user_id,'b.status'=>1));\n\t\t$query = $this->db->get();\n\t\tif ($query->num_rows() > 0) {\n\t\t\treturn $query->result_array();\t\n\t\t}\n\t\treturn false;\n\t}",
"public function getProfileUrl()\n {\n return $this->ProfileUrl;\n }",
"public function controlProfile(){\n\t\t$profilePage = \\Utility\\Singleton::getInstance('\\View\\Main');\n\t\t$data=\"\";\n\t\t\n\t\tswitch($profilePage->get('profileAction'))\n\t\t{\t\n\t\t\tcase 'hasAlreadyVoted':\n\t\t\t\t$data=$this->hasVoted();\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'getProfilePage':\n\t\t\t\t$data=$this->setProfileInformation();\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'rateUser':\n\t\t\t\t$data=$this->rateUser();\n\t\t\t\tbreak;\n\n\t\t}\n\t\n\t\treturn $data;\n\t\t\n\t}",
"public function getProfileEmail() {\n\t\treturn ($this->profileEmail);\n\t}",
"static function getProfile($profile_id)\n\t{\n\t\t$profile = ORM::for_table('PROFILE')->where('profile_id', $profile_id)->find_array();\n\n\t\treturn $profile;\n\t}",
"public function getReturnValues()\n\t{\n\t\t$session = Yii::$app->session;\n\t\t$time = $session->get('screenshotid');\n\t\t$module = Yii::$app->moduleManager->getModule('performance_insights');\n\t\t$moduleBasePath = $module->getBasePath();\n\t\t$imgUrl = Yii::$app->getModule('performance_insights')->getAssetsUrl() . '/screenshots/' . 'screenshot_' . $time . '.png';\n\t\t$inp = $this->readFromLocalFile();\n\t\t$tempArray = json_decode($inp,true);\n\t\t$timeInSec = $this->convertToSeconds($tempArray['fullLoadedTime']);\n\t\t$pageSize = $this->convertToReadableSize($tempArray['responseLength']);\n\t\treturn [\n\t\t\t'timeInSec' => $timeInSec,\n\t\t\t'pageSize' => $pageSize,\n\t\t\t'imgUrl' => $imgUrl\n\t\t];\n\t}",
"function getUserProfile()\n\t{\n\t\t$data = $this->api->api( \"v1/market/private/user/account.json\" );\n\t\tif ( ! isset( $data->account ) ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an invalid response.\", 6 );\n\t\t}\n\n\t\t$this->user->profile->identifier = @ $data->account->surname;\n\t\t$this->user->profile->displayName = @ $data->account->firstname . ' ' . $data->account->surname;\n\t\t$this->user->profile->photoURL = @ $data->account->image;\n\t\t$this->user->profile->profileURL = @ $data->account->image;\n\n\t\t// request user emails from envato api\n\t\ttry{\n\t\t\t$email = $this->api->api(\"v1/market/private/user/email.json\");\n\t\t\t$this->user->profile->email = @ $email->email;\n\t\t}\n\t\tcatch( Exception $e ){\n\t\t\tthrow new Exception( \"User email request failed! {$this->providerId} returned an error: $e\", 6 );\n\t\t}\n\n\t\treturn $this->user->profile;\n\t}",
"function profile ($user_id) {\n global $sql;\n $res = $sql->sql_select_array_query(\"SELECT * FROM `profile` WHERE user_id = '{$user_id}'\");\n return count($res) > 0 ? $res[0] : null;\n }",
"public function getProfileImageProfileId() {\n\t\treturn($this->profileImageProfileId);\n\t}",
"public function getProfileActivationToken() {\n\t\treturn ($this->profileActivationToken);\n\t}",
"public function inProfileListFranchise($id) {\n\n $this->db->where('account_id', $id);\n $this->db->where('account_type', 2);\n $profileinfo = $this->db->get('profile')->result();\n return $profileinfo;\n }",
"public function getUserProcessingResults()\n {\n if (array_key_exists(\"userProcessingResults\", $this->_propDict)) {\n return $this->_propDict[\"userProcessingResults\"];\n } else {\n return null;\n }\n }",
"public function get_profile_information($profile_id)\n\t{\n\t\treturn $this->ci->profile_model->get_profile_information($profile_id);\n\t}"
] | [
"0.73352987",
"0.68788",
"0.68065435",
"0.6677281",
"0.66333145",
"0.6404519",
"0.6382641",
"0.62967443",
"0.62537235",
"0.62351567",
"0.6222724",
"0.6174596",
"0.6174596",
"0.6174596",
"0.61528885",
"0.6142884",
"0.61423206",
"0.61174154",
"0.6114831",
"0.6101218",
"0.6065968",
"0.6065968",
"0.5984056",
"0.5918253",
"0.59179926",
"0.5901326",
"0.58862424",
"0.5807011",
"0.57794714",
"0.5778302",
"0.577626",
"0.5775564",
"0.5775264",
"0.5766559",
"0.5764937",
"0.5755414",
"0.5730237",
"0.5719776",
"0.5711293",
"0.5711293",
"0.57112205",
"0.5678757",
"0.56698555",
"0.56627244",
"0.56564456",
"0.5649053",
"0.5632613",
"0.561873",
"0.56166154",
"0.56109214",
"0.5607332",
"0.560506",
"0.5598189",
"0.55860984",
"0.55844676",
"0.5577916",
"0.55772656",
"0.5572528",
"0.5566594",
"0.5550708",
"0.55262583",
"0.552321",
"0.5510637",
"0.54782206",
"0.5474507",
"0.5473925",
"0.54662657",
"0.54579437",
"0.54544806",
"0.5452533",
"0.5449444",
"0.544599",
"0.54412925",
"0.54408586",
"0.5431587",
"0.5430167",
"0.5422517",
"0.5411746",
"0.54104906",
"0.5410323",
"0.54008096",
"0.540046",
"0.5398262",
"0.53943646",
"0.53868955",
"0.53847474",
"0.5384607",
"0.53741574",
"0.53573364",
"0.5353327",
"0.53528285",
"0.5346289",
"0.5345393",
"0.5340293",
"0.5336587",
"0.53280735",
"0.5323924",
"0.5320952",
"0.5300125",
"0.5297708"
] | 0.7934923 | 0 |
Set the value of return_profiles | public function setReturnProfiles(array $return_profiles)
{
$this->return_profiles = $return_profiles;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getReturnProfiles()\n {\n return $this->return_profiles;\n }",
"public function setProfiles($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\ZwiftPHP\\Protobuf\\Profile::class);\n $this->profiles = $arr;\n\n return $this;\n }",
"public function setup_profiles( $success, $default, $network ) {\r\n\t\t// Fetch the list of profiles.\r\n\t\tif ( $success ) {\r\n\t\t\tData::instance()->profiles_list( $network, true );\r\n\t\t}\r\n\t}",
"public function setPostbackProfiles(array $postback_profiles)\n {\n $this->postback_profiles = $postback_profiles;\n\n return $this;\n }",
"public function setOneClickApplyProfiles(array $profiles);",
"public function setReturnPolicyProfileList(array $returnPolicyProfileList)\n {\n $this->returnPolicyProfileList = $returnPolicyProfileList;\n return $this;\n }",
"public function setProfile($data)\n {\n if (isset($data['identifier'])) $this->setIdentifier ($data['identifier']);\n if (isset($data['providerName'])) $this->setProvider ($data['providerName']);\n if (isset($data['displayName'])) $this->setDisplayName($data['displayName']);\n if (isset($data['preferredUsername'])) $this->setUserName ($data['preferredUsername']);\n if (isset($data['verifiedEmail'])) $this->setEmail ($data['verifiedEmail']);\n }",
"public function unsetReturnPolicyProfileList($index)\n {\n unset($this->returnPolicyProfileList[$index]);\n }",
"public function setReturn($value) {\n $this->return= $value;\n }",
"public function offsetSet($offset, $value) { if (is_null($offset)) { $this->profile[] = $value; } else { $this->profile[$offset] = $value; }}",
"public function offsetSet($offset, $value) { if (is_null($offset)) { $this->profile[] = $value; } else { $this->profile[$offset] = $value; }}",
"public function getProfiles()\n {\n return $this->profiles;\n }",
"function setViewerReturnValues($viewer) {\n\t\t$viewer->assign('RETURN_MODULE', $this->get('returnmodule'));\n\t\t$viewer->assign('RETURN_VIEW', $this->get('returnview'));\n\t\t$viewer->assign('RETURN_PAGE', $this->get('returnpage'));\n\t\t$viewer->assign('RETURN_VIEW_NAME', $this->get('returnviewname'));\n\t\t$viewer->assign('RETURN_SEARCH_PARAMS', $this->get('returnsearch_params'));\n\t\t$viewer->assign('RETURN_SEARCH_KEY', $this->get('returnsearch_key'));\n\t\t$viewer->assign('RETURN_SEARCH_VALUE', $this->get('returnsearch_value'));\n\t\t$viewer->assign('RETURN_SEARCH_OPERATOR', $this->get('returnoperator'));\n\t\t$viewer->assign('RETURN_SORTBY', $this->get('returnsortorder'));\n\t\t$viewer->assign('RETURN_ORDERBY', $this->get('returnorderby'));\n\t\t\n\t\t$viewer->assign('RETURN_RECORD', $this->get('returnrecord'));\n\t\t$viewer->assign('RETURN_RELATED_TAB', $this->get('returntab_label'));\n\t\t$viewer->assign('RETURN_RELATED_MODULE', $this->get('returnrelatedModuleName'));\n\t\t$viewer->assign('RETURN_MODE', $this->get('returnmode'));\n $viewer->assign('RETURN_RELATION_ID', $this->get('returnrelationId'));\n $viewer->assign('RETURN_PARENT_MODULE', $this->get('returnparent'));\n\t}",
"public function setShippingProfiles(array $shipping_profiles)\n {\n $this->shipping_profiles = $shipping_profiles;\n\n return $this;\n }",
"function setProfileConfig($profile_config){\n\t\t$this->profile_config = $profile_config;\n\t}",
"public function setProfileId($value)\n {\n return $this->set('ProfileId', $value);\n }",
"protected function setReturnDetails(array $data)\n {\n $this->returnDetails = PaymentReturnDetails::fromArray($data);\n }",
"public function getReturnPolicyProfileList()\n {\n return $this->returnPolicyProfileList;\n }",
"public function testCreateCustomerProfile_multiplePaymentProfilesAndSucceeds()\n {\n $ccOptions = array('type' => 'visa',\n 'number' => '3234567890123',\n 'month' => 09,\n 'year' => 2009,\n 'card_code' => 388,\n 'first_name' => 'tom',\n 'last_name' => 'yevlekcm');\n\n $payProfile = new Mercantile_Gateways_AuthNetCim_PaymentProfile();\n\n $payProfile->setPayment(new Mercantile_Billing_CreditCard($ccOptions));\n\n $options = array('description' => (string)randStr());\n \n $cusProfile = new Mercantile_Gateways_AuthNetCim_CustomerProfile($options); \n\n $cusProfile->addPaymentProfile($payProfile);\n\n $ccOptions = array('type' => 'visa',\n 'number' => '1234567890123',\n 'month' => 09,\n 'year' => 2009,\n 'card_code' => 388,\n 'first_name' => 'tom',\n 'last_name' => 'yevlekcm');\n\n $payProfile = new Mercantile_Gateways_AuthNetCim_PaymentProfile();\n\n $payProfile->setPayment(new Mercantile_Billing_CreditCard($ccOptions));\n\n $cusProfile->addPaymentProfile($payProfile);\n\n $response = $this->gateway->createCustomerProfile($cusProfile);\n\n $this->customerProfileId = $response->getCustomerProfileId();\n\n $this->assertTrue($response->isSuccess());\n }",
"public static function GetProfilesValues()\n\t{\n\t\treturn self::$aPROFILES;\n\t}",
"public function issetReturnPolicyProfileList($index)\n {\n return isset($this->returnPolicyProfileList[$index]);\n }",
"public function setProfileInfo($profile){\n $profile_dir = conf::pathBase() . \"/profiles/$profile\";\n if (!file_exists($profile_dir)) {\n common::abort( \"No such path to profiles: $profile_dir\");\n } \n \n include $profile_dir . \"/profile.inc\";\n $this->profileModules = $_PROFILE_MODULES;\n $this->profileTemplates = $_PROFILE_TEMPLATES;\n $this->profileTemplate = $_PROFILE_TEMPLATE;\n }",
"public function setCouponProfiles(array $coupon_profiles)\n {\n $this->coupon_profiles = $coupon_profiles;\n\n return $this;\n }",
"public function get_reference_profiles($client_id = NULL) {\n try {\n $client_id = $client_id ? $client_id : $this->id;\n $DB = new \\dumbu\\cls\\DB();\n $ref_profs_data = $DB->get_reference_profiles_data($client_id);\n while ($prof_data = $ref_profs_data->fetch_object()) {\n $Ref_Prof = new \\dumbu\\cls\\Reference_profile();\n //print_r($prof_data);\n // Update Ref Prof Data if not privated\n if ($Ref_Prof->is_private($prof_data->insta_name) === FALSE) {\n $Ref_Prof->id = $prof_data->id;\n $Ref_Prof->insta_id = $prof_data->insta_id;\n $Ref_Prof->insta_name = $prof_data->insta_name;\n $Ref_Prof->insta_follower_cursor = $prof_data->insta_follower_cursor;\n array_push($this->reference_profiles, $Ref_Prof);\n }\n }\n } catch (Exception $exc) {\n echo $exc->getTraceAsString();\n }\n }",
"public function setProfileInformation()\n {\n $view = \\Utility\\Singleton::getInstance(\"\\View\\Main\");\n\t\t$username=$view->get('userProfile');\n\t\t$this->getUserInformations($view,$username);\n\t\t$this->setResourcesUploaded($view,$username);\n\t\treturn $view->fetch('profile.tpl');\n\t}",
"public function setProfile($profile) {\n\t\t$this->profile = $profile;\n\t\treturn $this;\n\t}",
"public function addToReturnPolicyProfileList(\\Nogrod\\eBaySDK\\BusinessPoliciesManagement\\ReturnPolicyProfileType $returnPolicyProfile)\n {\n $this->returnPolicyProfileList[] = $returnPolicyProfile;\n return $this;\n }",
"public function profileSettings(array $settings);",
"protected function setFundraiserProfile()\n {\n $this->fundraiser_profile = new UserProfile;\n $this->fundraiser_profile->set( 'user_id', $this->data['fundraiser'] );\n $this->fundraiser_profile->read();\n }",
"public function save()\n\t{\n\t\t$updatedProfile = Yii::$app->user->identity->profile;\n\t\t\n\t\t$updatedProfile = Yii::$app->user->identity->profile;\n\t\t\n\t\t$updatedProfile->{Yii::$app->request->post()['flag']} = Yii::$app->request->post()['val'];\n\n\t\t$updatedProfile->save();\n\t}",
"public function getAllProfiles()\n {\n return self::$profiles;\n }",
"public function setProfile(Profile $profile): void\n {\n $this->profile = $profile;\n }",
"public function api_entry_setprofile() {\n parent::validateParams(array('user'));\n\n $user = $this->Mdl_Users->get($_POST[\"user\"]);\n\n if ($user == null)\n parent::returnWithErr(\"User id is not valid.\");\n\n $arg = $this->safeArray(array('fullname', 'avatar', 'church', 'city', 'province', 'bday', 'mood'), $_POST);\n\n $arg['id'] = $_POST[\"user\"];\n\n if (count($arg) == 1)\n parent::returnWithErr(\"You should pass the profile 1 entry at least to update.\");\n\n $user = $this->Mdl_Users->update($arg);\n\n if ($user == null)\n parent::returnWithErr(\"Profile has not been updated.\");\n\n parent::returnWithoutErr(\"Profile has been updated successfully.\", $user);\n }",
"public function manageProfiles()\r\n {\r\n $profiles = Profile::latest()->paginate(6);\r\n $users = User::all();\r\n return view('profiles.manage_profiles')->with('profiles',$profiles)->with('users',$users);\r\n }",
"public function supports_payment_profiles()\n\t\t{\n\t\t\treturn true;\n\t\t}",
"public function process_post($redirect) {\n if (!$data = $this->get_data()) {\n return false;\n }\n // Generate params and send off.\n $api = new api();\n $result = $api->set_servicepaymentprofiles($data->paymentprofile);\n if ((bool)$result->status) {\n $string = implode('<br/>', $result->result->results);\n $message = get_string('setserviceprofiles:success', 'enrol_classicpay', $string);\n } else {\n $message = get_string('err:setserviceprofiles', 'enrol_classicpay', $result);\n }\n redirect($redirect, $message, 5);\n }",
"public function getPostbackProfiles()\n {\n return $this->postback_profiles;\n }",
"public function setPROFILEID($profileId)\n\t\t{\n\t\t\t$this->profileId=$profileId;\n\t\t}",
"public static function reset_profiler() {\n\t\tif (\n\t\t\t! Loader::is_admin_page() ||\n\t\t\t! isset( $_GET['reset_profiler'] ) // phpcs:ignore CSRF ok.\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t$previous = 1 === absint( $_GET['reset_profiler'] ); // phpcs:ignore CSRF ok.\n\t\t$new_value = ! $previous;\n\n\t\twc_admin_record_tracks_event(\n\t\t\t'storeprofiler_toggled',\n\t\t\tarray(\n\t\t\t\t'previous' => $previous,\n\t\t\t\t'new_value' => $new_value,\n\t\t\t)\n\t\t);\n\n\t\t$request = new \\WP_REST_Request( 'POST', '/wc-admin/onboarding/profile' );\n\t\t$request->set_headers( array( 'content-type' => 'application/json' ) );\n\t\t$request->set_body(\n\t\t\twp_json_encode(\n\t\t\t\tarray(\n\t\t\t\t\t'completed' => $new_value,\n\t\t\t\t\t'skipped' => $new_value,\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t\t$response = rest_do_request( $request );\n\t\twp_safe_redirect( wc_admin_url() );\n\t\texit;\n\t}",
"public function testProfileChange() {\n $this->installProcedure->shouldBeCalledTimes(2);\n $this->updateProcedure->shouldNotBeCalled();\n\n $this->cachedInstall->install($this->installer, $this->updater);\n $this->cachedInstall->setProfile('standard');\n $this->cachedInstall->install($this->installer, $this->updater);\n\n $this->assertSiteInstalled();\n $this->assertSiteCached($this->cachedInstall->getInstallCacheId());\n $this->assertSiteCached($this->cachedInstall->getUpdateCacheId());\n }",
"public function setProfileEmail($newProfileEmail) : void {\n\t\t$this->profileEmail = $newProfileEmail;\n\t}",
"public function getWebProfileList()\n {\n $url = $this->host . '/v1/payment-experience/web-profiles';\n $authorization = 'Authorization: Bearer ' . $this->clientCredentials->access_token;\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json;charset=UTF-8', $authorization));\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($curl, CURLOPT_POST, 1);\n\n $this->cUrl = $curl;\n return $this->sendRequest();\n //===\n }",
"public function setProfileHash($newProfileHash) : void {\n\t\t$this->profileHash = $newProfileHash;\n\t}",
"public function setSuccessfulUsers(?int $value): void {\n $this->getBackingStore()->set('successfulUsers', $value);\n }",
"public function SetProfile($profile)\n {\n $this->profile = $profile;\n }",
"public function setProfileUrl($url)\n {\n if ($url) {\n $this->profileUrl = preg_replace(\"#(\\/+)$#\", \"\", $url) . \"/\";\n }\n }",
"public function &setExternalUpdateProfileUrl($value);",
"public function set_return_url($return_url)\n {\n }",
"public function set_returned($returned) {\n $this->returned = $returned;\n }",
"public function setReturnValue($value, $type = null)\n {\n $this->_return = $value;\n $this->_type = (string) $type;\n }",
"public function setProfileId($newProfileId) {\n\t\t$newProfileId = filter_var($newProfileId, FILTER_VALIDATE_INT);\n\t\t//if filter_var rejects the variable, throw an exception\n\t\tif($newProfileId === false) {\n\t\t\tthrow(new InvalidArgumentException(\"Profile Id is not a proper int\"));\n\t\t}\n\t\t//If $newProfileId is out of range, throw an exception.\n\t\tif($newProfileId <= 0) {\n\t\t\tthrow(new RangeException(\"Profile ID must be positive\"));\n\t\t}\n\t\t$this->profileId = $newProfileId;\n\t}",
"public function setProfile($profile)\n {\n $this->profile = $profile;\n\n return $this;\n }",
"public function testDestiny2GetLinkedProfiles()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }",
"function setProfileId(int $newProfileId = null) {\n\tif($newProfileId <= 0) {\n\t\tthrow(new \\RangeException(\"profile id is not positive\"));\n\t}\n\t// convert and store this profile id\n\t$this->profileId = $newProfileId;\n}",
"public function setResults($results){\n $this->results = $results;\n }",
"public function updateProfile() {\n\t\t\n\t\treturn $this->_post(self::URL_USERS_UPDATE_PROFILE, $this->_query);\n\t}",
"function setProfilePicture($a_status)\n\t{\n\t\t$this->ppic = (bool)$a_status;\n\t}",
"public function executeProfile($request)\n {\n $this->_checkAuth();\n $profile = new Profile();\n $this->configTypes = $profile->configTypeDefault();\n $this->platformNames = $profile->platformNameDefault();\n \n $configRep = new ConfigRepository();\n $this->platform_config = $configRep->getProfileByPlatform();\n $this->iOSpasscodeSetting = $configRep->getiOSPasscodeSetting();\n $this->profilePasscodeTooltip = $this->notificationMsg['tooltip'];\n $this->locationWarning = $this->notificationMsg['N9001'];\n $this->confirm = $this->confirmMsg;\n }",
"public function setReturnUrl($url) {\n\t\t$this->_url_return = $url;\n\t}",
"function setProfiling(){\r\n\t\t$this->query(\"SET profiling=1\");\r\n\t}",
"public function setPaymentProfileList(array $paymentProfileList)\n {\n $this->paymentProfileList = $paymentProfileList;\n return $this;\n }",
"protected function _storeProfile()\n {\n $projectProfileFile = $this->_loadedProfile->search('ProjectProfileFile');\n\n $name = $projectProfileFile->getContext()->getPath();\n\n $this->_registry->getResponse()->appendContent('Updating project profile \\'' . $name . '\\'');\n\n $projectProfileFile->getContext()->save();\n }",
"public function getOneClickApplyProfiles();",
"public function setupProfile(SetupCustomerProfileRequest $request) {\n $input = $request->all();\n $response = UserServiceProvider::setupCustomerProfile($input);\n return $this->sendJsonResponse($response);\n }",
"public function setProfileSalt($newProfileSalt) : void {\n\t\t$this->profileSalt = $newProfileSalt;\n\t}",
"protected function setResult($value)\n {\n $this->result = $value;\n }",
"static function profiles() {\n global $LANG;\n\n $a_profil = array();\n $a_profil[] = array('profil' => 'agent',\n 'name' => $LANG['plugin_fusioninventory']['profile'][2]);\n $a_profil[] = array('profil' => 'remotecontrol',\n 'name' => $LANG['plugin_fusioninventory']['profile'][3]);\n $a_profil[] = array('profil' => 'configuration',\n 'name' => $LANG['plugin_fusioninventory']['profile'][4]);\n $a_profil[] = array('profil' => 'wol',\n 'name' => $LANG['plugin_fusioninventory']['profile'][5]);\n $a_profil[] = array('profil' => 'unknowndevice',\n 'name' => $LANG['plugin_fusioninventory']['profile'][6]);\n $a_profil[] = array('profil' => 'task',\n 'name' => $LANG['plugin_fusioninventory']['profile'][7]);\n\n return $a_profil;\n }",
"public function setCertificateProfileDisplayName(?string $value): void {\n $this->getBackingStore()->set('certificateProfileDisplayName', $value);\n }",
"protected function changeFollow()\n\t{\n\t\tif ( !\\IPS\\Member::loggedIn()->modPermission('can_modify_profiles') AND ( \\IPS\\Member::loggedIn()->member_id !== $this->member->member_id OR !$this->member->group['g_edit_profile'] ) )\n\t\t{\n\t\t\t\\IPS\\Output::i()->error( 'no_permission_edit_profile', '2C138/3', 403, '' );\n\t\t}\n\n\t\t\\IPS\\Session::i()->csrfCheck();\n\n\t\t\\IPS\\Member::loggedIn()->members_bitoptions['pp_setting_moderate_followers'] = ( \\IPS\\Request::i()->enabled == 1 ? FALSE : TRUE );\n\t\t\\IPS\\Member::loggedIn()->save();\n\n\t\tif( \\IPS\\Request::i()->isAjax() )\n\t\t{\n\t\t\t\\IPS\\Output::i()->json( 'OK' );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\\IPS\\Output::i()->redirect( $this->member->url(), 'follow_saved' );\n\t\t}\n\t}",
"function ds_register_default_social_profiles( $profiles ) {\n\n\t// add the facebook profile.\n\t$profiles['facebook'] = array(\n\t\t'id' => 'ds_facebook_url',\n\t\t'label' => __( 'Facebook URL', 'hd-extensible-social-profiles-widget' ),\n\t\t'class' => 'facebook',\n\t\t'description' => __( 'Enter your Facebook profile URL', 'hd-extensible-social-profiles-widget' ),\n\t\t'priority' => 10,\n\t\t'type' => 'text',\n\t\t'default' => '',\n\t\t'sanitize_callback' => 'sanitize_text_field',\n\t);\n\n\t// add the linkedin profile.\n\t$profiles['linkedin'] = array(\n\t\t'id' => 'ds_linkedin_url',\n\t\t'label' => __( 'LinkedIn URL', 'hd-extensible-social-profiles-widget' ),\n\t\t'class' => 'linkedin',\n\t\t'description' => __( 'Enter your LinkedIn profile URL', 'hd-extensible-social-profiles-widget' ),\n\t\t'priority' => 20,\n\t\t'type' => 'text',\n\t\t'default' => '',\n\t\t'sanitize_callback' => 'sanitize_text_field',\n\t);\n\n\t// add the twitter profile.\n\t$profiles['twitter'] = array(\n\t\t'id' => 'ds_twitter_url',\n\t\t'label' => __( 'Twitter URL', 'hd-extensible-social-profiles-widget' ),\n\t\t'class' => 'twitter',\n\t\t'description' => __( 'Enter your Twitter profile URL', 'hd-extensible-social-profiles-widget' ),\n\t\t'priority' => 40,\n\t\t'type' => 'text',\n\t\t'default' => '',\n\t\t'sanitize_callback' => 'sanitize_text_field',\n\t);\n\n\t// return the modified profiles.\n\treturn $profiles;\n\n}",
"function ds_get_social_profiles() {\n\n // Return a filterable social profile.\n return apply_filters(\n 'ds_social_profiles',\n array()\n );\n \n}",
"public function setResults($return)\n {\n if ($this->isResultsStackable()) {\n if (null === $this->_return) {\n $this->_return = array();\n }\n if (!is_array($this->_return)) {\n (array) $this->_return[] = $return;\n } else {\n $this->_return[] = $return;\n }\n } else {\n // Blindly overwrite the return of this event\n $this->_return = $return;\n }\n\n return true;\n }",
"function drush_dslm_profiles() {\n // Bootstrap dslm, this grabs the instantiated and configured dslm library object\n if (!$dslm = _dslm_bootstrap()) {\n return FALSE;\n }\n\n // Pull the profiles\n $profiles = $dslm->getProfiles();\n\n // Iterate through the profiles array and print them out\n foreach ($profiles as $name => $profile) {\n $out .= \"$name:\\n\";\n foreach($profile['all'] as $version) {\n $out .= \" $version\\n\";\n }\n }\n\n drush_log(trim($out), 'ok');\n return TRUE;\n}",
"public function testDestiny2GetProfile()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }",
"function hybridauth_complete_profile($user_profile, $ruser = array(), $provider_code = '', $generate_emails = true)\n{\n\tglobal $cfg, $cot_extrafields, $db, $db_users;\n\n\tif (empty($user_profile->displayName) && !empty($user_profile->firstName) && !empty($user_profile->lastName))\n\t{\n\t\t$user_profile->displayName = $user_profile->firstName . ' ' . $user_profile->lastName;\n\t}\n\n\tif (empty($ruser['user_name']))\n\t{\n\t\t$user_name = $user_profile->displayName;\n\t\twhile ($db->query(\"SELECT COUNT(*) FROM $db_users WHERE user_name = ?\", $user_name)->fetchColumn() > 0)\n\t\t{\n\t\t\t// Name is busy, generate a random prefix\n\t\t\t$user_name = $user_profile->displayName . mt_rand(2,9999);\n\t\t}\n\t\t$ruser['user_name'] = $user_name;\n\t}\n\n\tif (empty($ruser['user_email']))\n\t{\n\t\tif (isset($user_profile->email) && !empty($user_profile->email))\n\t\t{\n\t\t\t$ruser['user_email'] = $user_profile->email;\n\t\t}\n\t\telseif ($generate_emails)\n\t\t{\n\t\t\t// Provider does not provide user emails\n\t\t\t$ruser['user_email'] = $user_profile->identifier . '@'. $provider_code . '.com';\n\t\t\tif(mb_strlen($ruser['user_email']) > 64 || !cot_check_email($ruser['user_email']))\n\t\t\t{\n\t\t\t\t$ruser['user_email'] = md5($user_profile->identifier.microtime()) . '@' . $provider_code . '.com';\n\t\t\t}\n\n\t\t}\n\t}\n\n\tif (empty($ruser['user_birthdate']))\n\t\t$ruser['user_birthdate'] = cot_mktime(1, 0, 0, $user_profile->birthMonth, $user_profile->birthDay, $user_profile->birthYear);\n\n\tif (empty($ruser['user_country']) && strlen($user_profile->country) == 2)\n\t\t$ruser['user_country'] = $user_profile->country;\n\n\tif (empty($ruser['user_lang']) && !$cfg['forcedefaultlang'] && !empty($user_profile->language))\n\t{\n\t\t$lang = $user_profile->language;\n\t\tif (file_exists(\"lang/$lang\"))\n\t\t{\n\t\t\t$ruser['user_lang'] = $lang;\n\t\t}\n\t}\n\n\tif (empty($ruser['user_gender']) && $user_profile->gender !== null)\n\t\t$ruser['user_gender'] = $user_profile->gender == 'female' ? 'F' : 'M';\n\n\tif ((!empty($user_profile->photoURL) || !empty($user_profile->avatarURL)) && $db->fieldExists($db_users, 'user_avatar'))\n\t\t$ruser['user_avatar'] = empty($user_profile->avatarURL) ? $user_profile->photoURL : $user_profile->avatarURL;\n\n\tif (!empty($user_profile->photoURL) && $db->fieldExists($db_users, 'user_photo'))\n\t\t$ruser['user_photo'] = $user_profile->photoURL;\n\n\t// Some extra fields\n\tif (isset($cot_extrafields[$db_users]['firstname']) && empty($ruser['user_firstname']))\n\t\t$ruser['user_firstname'] = $user_profile->firstName;\n\tif (isset($cot_extrafields[$db_users]['first_name']) && empty($ruser['user_first_name']))\n\t\t$ruser['user_first_name'] = $user_profile->firstName;\n\n\tif (isset($cot_extrafields[$db_users]['lastname']) && empty($ruser['user_lastname']))\n\t\t$ruser['user_lastname'] = $user_profile->lastName;\n\tif (isset($cot_extrafields[$db_users]['last_name']) && empty($ruser['user_last_name']))\n\t\t$ruser['user_last_name'] = $user_profile->lastName;\n\n\tif (!empty($provider_code))\n\t{\n\t\t$ruser[\"user_{$provider_code}_id\"] = $user_profile->identifier;\n\t\t$ruser[\"user_{$provider_code}_url\"] = $user_profile->profileURL;\n\t}\n\n\treturn $ruser;\n}",
"public function setProfileBytes($var)\n {\n GPBUtil::checkString($var, False);\n $this->profile_bytes = $var;\n }",
"final protected function setResults(array $results)\n {\n $this->results = $results;\n }",
"public function setProfileActivationToken($newProfileActivation) : void {\n\t\t$this->profileActivationToken = $newProfileActivation;\n\t}",
"public function index()\n {\n $users = DB::table('users')->paginate(8);\n\n foreach ($users as &$user) {\n $user->profile_picture = Helper::getUserResource($user->profile_picture, $user->id);\n }\n\n return view('show_profiles', [\n 'users' => $users,\n ]);\n }",
"function setResult($function, $result)\n {\n $this->m_results[$function] = $result;\n }",
"public function setProfileId($newProfileId) {\n\t\t// base case if the profile id is null this a new tweet without a mySQL assigned id (yet)\n\t\tif ($newProfileId === null){\n\t\t\t$this->profileId = null;\n\t\t\treturn;\n\t\t}\n\t\t// verify profile id\n\t\t$newProfileId = filter_var($newProfileId, FILTER_VALIDATE_INT);\n\t\t//if filter_var()frejects the new id throw an Exception\n\t\tif($newProfileId === false) {\n\t\t\tthrow(new InvalidArgumentException(\"profile id is not an integer punk\"));\n\t\t}\n\t\tif($newProfileId <= 0) {\n\t\t\tthrow(new RangeException(\"proflie id must be positive fool\"));\n\t\t}\n\t\t// saving to object\n\t\t$this->email = $newProfileId;\n\t}",
"public function profile($values)\n\t{\n\t\treturn $this->getRequest('Profile', $values);\n\t}",
"public function setProfil(array $profil)\n {\n $this->profil = $profil;\n\n return $this;\n }",
"private function getProfiles($arguments)\n {\n $totalScripts = $arguments[\"totalScripts\"]; // total no of scripts\n\t\t$currentScript = $arguments[\"currentScript\"]; // current script number\n $lastLoginWithIn = $arguments[\"lastLoginWithIn\"]; // last login with in [time specified]\n \n if(!$lastLoginWithIn || !strlen($lastLoginWithIn))\n {\n $lastLoginWithIn = self::LAST_LOGIN_SINCE;\n }\n \n if(null === $this->m_objNewJs_Jprofile_Slave)\n {\n if($this->m_bDebugInfo)\n $this->logSection('Error: ', 'Not able to establish connection with newjs_slave');\n return false;\n }\n \n /*\n * Where Condition for reteriveing set of profiles\n */\n $time = new DateTime();\n $time->sub(date_interval_create_from_date_string($lastLoginWithIn));\n \n $whereCndArray= array('LAST_LOGIN_DT'=>$time->format('Y-m-d'));\n if($this->m_bDebugInfo)\n {\n $this->logSection('DebugInfo: Where Cond on last login date', $whereCndArray['LAST_LOGIN_DT']);\n }\n \n /*\n * Get list of all profiles whose score are not stored on db\n */\n $this->m_arrProfiles = $this->m_objNewJs_Jprofile_Slave->getUncomputedProfiles($totalScripts,$currentScript,$lastLoginWithIn,self::LIMIT_PROFILES);\n \n if($this->m_bDebugInfo)\n {\n $this->logSection('DebugInfo: Counts of profiles reterieved : ',count($this->m_arrProfiles));\n }\n }",
"function setResults ($result) {\n\t\t$this->_results = $result;\n\t}",
"final public function addForProfile($profiles_id) {\n global $DB;\n\n $criteria = $this->getDistinctUserCriteria() + $this->getProfileJoinCriteria();\n $criteria['FIELDS'][] = Profile_User::getTable() . '.entities_id AS entity';\n $criteria['FROM'] = User::getTable();\n $criteria['WHERE'][Profile_User::getTable() . '.profiles_id'] = $profiles_id;\n\n $iterator = $DB->request($criteria);\n while ($data = $iterator->next()) {\n $this->addToRecipientsList($data);\n }\n\n $this->recipient_data = [\n 'itemtype' => Profile::class,\n 'items_id' => $profiles_id,\n ];\n Plugin::doHook('add_recipient_to_target', $this);\n unset($this->recipient_data);\n }",
"function setInvestigators($investigators) {\n\t\treturn $this->investigators = $investigators;\n\t}",
"public function getUsersProfiles($data = array()) {\r\n \r\n $results = $this->dbDriver->query('SELECT userid, email, groups, username, givenname, lastname, to_char(registrationdate, \\'YYYY-MM-DD\"T\"HH24:MI:SS\"Z\"\\') as registrationdate, country, organization, organizationcountry, flags, topics, activated, validatedby, to_char(validationdate, \\'YYYY-MM-DD\"T\"HH24:MI:SS\"Z\"\\') as validationdate FROM usermanagement.users' . (isset($data['groupid']) ? ' WHERE \\'' . pg_escape_string($data['groupid']) . '\\' = any(groups)' : (isset($data['keywords']) ? ' WHERE email LIKE \\'' . pg_escape_string($data['keywords']) .'\\' OR username LIKE \\'' . pg_escape_string($data['keywords']) .'\\' OR givenname LIKE \\'' . pg_escape_string($data['keywords']) .'\\' OR lastname LIKE \\'' . pg_escape_string($data['keywords']) .'\\' OR country LIKE \\'' . pg_escape_string($data['keywords']) .'\\' OR organization LIKE \\'' . pg_escape_string($data['keywords']) .'\\'' : '')) . (isset($data['limit']) ? ' LIMIT ' . pg_escape_string($data['limit']) : '') . (isset($data['offset']) ? ' OFFSET ' . pg_escape_string($data['offset']) : '') );\r\n $profiles = array();\r\n while ($profile = pg_fetch_assoc($results)) {\r\n $profile['groups'] = substr($profile['groups'], 1, -1);\r\n\r\n $profiles[] = array(\r\n 'userid' => $profile['userid'],\r\n 'email' => $profile['email'],\r\n 'picture' => $this->getPicture($profile['email']),\r\n 'groups' => $profile['groups'],\r\n 'username' => $profile['username'],\r\n 'givenname' => $profile['givenname'],\r\n 'lastname' => $profile['lastname'],\r\n 'registrationdate' => $profile['registrationdate'],\r\n 'country' => $profile['country'],\r\n 'organization' => $profile['organization'],\r\n 'organizationcountry' => $profile['organizationcountry'],\r\n 'flags' => $profile['flags'],\r\n 'topics' => $profile['topics'],\r\n 'activated' => (integer) $profile['activated'],\r\n 'validatedby' => $profile['validatedby'],\r\n 'validationdate' => $profile['validationdate']\r\n );\r\n }\r\n return $profiles;\r\n }",
"public function update_customer_profile($card_details, $customerProfileId = \"1511420207\", $customerPaymentProfileId = \"1511265906\"){\n $merchantAuthentication = new AnetAPI\\MerchantAuthenticationType();\n $merchantAuthentication->setName($this->authorize['merchant_login_id']);\n $merchantAuthentication->setTransactionKey($this->authorize['merchant_transaction_key']);\n \n // Set the transaction's refId\n\t\t$refId = 'ref' . time();\n\t\t\n\t\t// echo $customerProfileId;die;\n\n $request = new AnetAPI\\GetCustomerPaymentProfileRequest();\n $request->setMerchantAuthentication($merchantAuthentication);\n $request->setRefId( $refId);\n $request->setCustomerProfileId($customerProfileId);\n $request->setCustomerPaymentProfileId($customerPaymentProfileId);\n \n $controller = new AnetController\\GetCustomerPaymentProfileController($request);\n $response = $controller->executeWithApiResponse(\\net\\authorize\\api\\constants\\ANetEnvironment::PRODUCTION);\n\t\t// $response = $controller->executeWithApiResponse( \\net\\authorize\\api\\constants\\ANetEnvironment::SANDBOX);\n\t\n \n if (($response != null) && ($response->getMessages()->getResultCode() == \"Ok\"))\n {\n $billto = new AnetAPI\\CustomerAddressType();\n $billto = $response->getPaymentProfile()->getbillTo();\n \n $creditCard = new AnetAPI\\CreditCardType();\n $creditCard->setCardNumber((int) $card_details['card_number'] );\n $creditCard->setExpirationDate($card_details['expiry']);\n $creditCard->setCardCode($card_details['cvc']);\n\n \n $paymentCreditCard = new AnetAPI\\PaymentType();\n $paymentCreditCard->setCreditCard($creditCard);\n $paymentprofile = new AnetAPI\\CustomerPaymentProfileExType();\n $paymentprofile->setCustomerPaymentProfileId($customerPaymentProfileId);\n $paymentprofile->setPayment($paymentCreditCard);\t\n\n // Submit a UpdatePaymentProfileRequest\n $request = new AnetAPI\\UpdateCustomerPaymentProfileRequest();\n $request->setMerchantAuthentication($merchantAuthentication);\n $request->setCustomerProfileId($customerProfileId);\n $request->setPaymentProfile( $paymentprofile );\n\n $controller = new AnetController\\UpdateCustomerPaymentProfileController($request);\n $response = $controller->executeWithApiResponse(\\net\\authorize\\api\\constants\\ANetEnvironment::PRODUCTION);\n // $response = $controller->executeWithApiResponse( \\net\\authorize\\api\\constants\\ANetEnvironment::SANDBOX);\n if (($response != null) && ($response->getMessages()->getResultCode() == \"Ok\") )\n {\n $payment_method['card_name'] = $card_details['card_name'];\n $payment_method['card_number'] = substr($card_details['card_number'], -4);\n $payment_method['expiry'] = $card_details['expiry'];\n $payment_method['is_validated'] = 1;\n $payment_method['updated_at'] = date('Y-m-d H:i:s');\n\n $this->db->update('payment_methods', $payment_method, ['customer_profile_id' => $customerProfileId]);\n return true;\n }\n else if ($response != null)\n {\n $errorMessages = $response->getMessages()->getMessage();\n return \"Failed to Update Customer Payment Profile : \" . $errorMessages[0]->getCode() . \" \" .$errorMessages[0]->getText();\n }\n } else if (is_null($response) && !isset($errorMessages)){\n\t\t\treturn \"Sandbox and production mode confilct\";\n\t\t} else {\n return \"Failed to Get Customer Payment Profile : \" . $errorMessages[0]->getCode() . \" \" .$errorMessages[0]->getText();\n }\n\n }",
"public function setProfileUrl($profileUrl)\n\t\t{\n\t\t $this->profileUrl = $profileUrl;\n\n\t\t return $this;\n\t\t}",
"function save_profile() {\n global $wpdb;\n\n // Get the current subscriber, fail if not found\n $user = $this->get_user_from_request(true);\n\n // Conatains the cleaned up user data to be saved\n $data = array();\n $data['id'] = $user->id;\n\n $options_profile = get_option('newsletter_profile', array());\n $options_main = get_option('newsletter_main', array());\n\n // Not an elegant interaction between modules but...\n $subscription_module = NewsletterSubscription::instance();\n\n if (!$this->is_email($_REQUEST['ne'])) {\n $user->alert = $this->options['profile_error'];\n return $user;\n }\n\n $email = $this->normalize_email(stripslashes($_REQUEST['ne']));\n $email_changed = ($email != $user->email);\n\n // If the email has been changed, check if it is available\n if ($email_changed) {\n $tmp = $this->get_user($email);\n if ($tmp != null && $tmp->id != $user->id) {\n // TODO: Move the label on profile setting panel\n $user->alert = $this->options['error'];\n return $user;\n }\n $data['status'] = Newsletter::STATUS_NOT_CONFIRMED;\n }\n\n // General data\n $data['email'] = $email;\n if (isset($_REQUEST['nn'])) {\n $data['name'] = $this->normalize_name(stripslashes($_REQUEST['nn']));\n if ($subscription_module->is_spam_text($data['name'])) {\n die();\n }\n }\n if (isset($_REQUEST['ns'])) {\n $data['surname'] = $this->normalize_name(stripslashes($_REQUEST['ns']));\n if ($subscription_module->is_spam_text($data['surname'])) {\n die();\n }\n }\n if ($options_profile['sex_status'] >= 1) {\n $data['sex'] = $_REQUEST['nx'][0];\n // Wrong data injection check\n if ($data['sex'] != 'm' && $data['sex'] != 'f' && $data['sex'] != 'n') {\n die('Wrong sex field');\n }\n }\n\n // Lists. If not list is present or there is no list to choose or all are unchecked.\n $nl = array();\n if (isset($_REQUEST['nl']) && is_array($_REQUEST['nl'])) {\n $nl = $_REQUEST['nl'];\n }\n\n // Every possible list shown in the profile must be processed\n $lists = $this->get_lists_for_profile();\n foreach ($lists as $list) {\n $field_name = 'list_' . $list->id;\n $data[$field_name] = in_array($list->id, $nl) ? 1 : 0;\n }\n\n // Profile\n for ($i = 1; $i <= NEWSLETTER_PROFILE_MAX; $i++) {\n // Private fields cannot be changed by the subscriber\n if ($options_profile['profile_' . $i . '_status'] == 0) {\n continue;\n }\n $data['profile_' . $i] = stripslashes($_REQUEST['np' . $i]);\n }\n\n\n // Feed by Mail service is saved here\n $data = apply_filters('newsletter_profile_save', $data);\n\n if ($user->status == TNP_User::STATUS_NOT_CONFIRMED) {\n $data['status'] = TNP_User::STATUS_CONFIRMED;\n }\n\n $user = $this->save_user($data);\n $this->add_user_log($user, 'profile');\n\n // Send the activation again only if we use double opt-in, otherwise it has no meaning\n // TODO: Maybe define a specific email for that and not the activation email\n if ($email_changed && $subscription_module->is_double_optin()) {\n $subscription_module->send_activation_email($user);\n // TODO: Move this option on new profile configuration panel\n $alert = $this->options['profile_email_changed'];\n }\n\n if (isset($alert)) {\n $user->alert = $alert;\n } else {\n // TODO: Move this label on profile settings panel\n $user->alert = $this->options['saved'];\n }\n return $user;\n }",
"public function setReturnUrl($returnUrl)\n {\n $this->returnUrl = $returnUrl;\n }",
"public function getAllUserProfiles() {\n $gender = $this->session->userdata('key_gender');\n extract($_GET);\n //print_r($_GET);\n $result = $this->Searchbyprofileid_model->getAllUserProfiles($gender);\n if (!$result) {\n echo '500';\n } else {\n print_r(json_encode($result));\n }\n }",
"public static function setCurrentUser($return, $params = null){\n\t\t$UserObject = self::$UserService->setCurrentUser();\n\t\tCoreRender::setData('user', $UserObject);\n return $return;\n\t}",
"public function getProfilesToShow()\n\t{\n\t\treturn $this->profilesToShow;\n\t}",
"protected function loadConfigurationProfiles(){\n $domain = base_url(\"\",true);\n $config = [];\n /*\n Loadding default config Systems\n */\n $file = $this->basePath('profiles/default.php');\n\n if(is_file($file) && file_exists($file)){\n\n $this->make(\"config\")->set(\"site\",array_merge($config,require($file)));\n $config = config(\"site\");\n }\n\n /*\n Loadding default config Stores edit by root admin\n */\n $file = $this->basePath('profiles/config.php');\n\n if(is_file($file) && file_exists($file)){\n\n $this->make(\"config\")->set(\"site\",array_merge($config,require($file)));\n $config = config(\"site\");\n }\n\n \n /*\n Loadding Profiles Domain Settings\n Defiend MUTI_SITE = true on index.php\n */\n if(defined(\"MUTI_SITE\")){\n $file = $this->basePath('profiles/'.$domain.'/config/system.php');\n \n if(is_file($file) && file_exists($file)){\n \n $this->make(\"config\")->set(\"site\",array_merge($config,require($file)));\n }\n\n if($this->make(\"config\")->get(\"site.templates\")){\n $this->make(\"config\")->set(\"view.paths.0\",str_replace('{template_name}',$this->make(\"config\")->get(\"site.templates\"),$this->app[\"config\"]->get(\"view.paths.0\")));\n }else{\n $this->make(\"config\")->set(\"view.paths.0\",str_replace('{template_name}','default',$this->make(\"config\")->get(\"view.paths.0\")));\n }\n }\n \n \n return $this;\n\n }",
"abstract function setUserProfileProperty($user, $property_name, $property);",
"public function profile(OutputInterface $output, array $response)\n {\n $this->printList($output,\n ['Fullname', 'Username', 'Email', 'Admin', 'Notifications'],\n ['fullname', 'username', 'email', 'admin', 'notifications'],\n $response,\n function ($key, $value) {\n if ('Notifications' !== $key) {\n return $value;\n }\n\n return sprintf('%d / %d', $value['new'], $value['total']);\n }\n );\n }",
"public function getPaymentProfileList()\n {\n return $this->paymentProfileList;\n }",
"public function setMiniProfile( $oView ) {\n\t\t$this->oMiniProfile = $oView;\n\t}"
] | [
"0.6165424",
"0.6018269",
"0.5884993",
"0.5694176",
"0.5627235",
"0.5333177",
"0.53190994",
"0.52437717",
"0.5233144",
"0.51650345",
"0.51650345",
"0.5162533",
"0.51583725",
"0.5143957",
"0.51410943",
"0.50946885",
"0.5085443",
"0.5052869",
"0.5047257",
"0.50444204",
"0.50436825",
"0.5012866",
"0.49985492",
"0.4916715",
"0.4905492",
"0.48860148",
"0.4862794",
"0.48606634",
"0.48398396",
"0.4825535",
"0.48235914",
"0.481426",
"0.47985598",
"0.4787184",
"0.47833353",
"0.4751106",
"0.47299063",
"0.4707401",
"0.47069272",
"0.46991774",
"0.46795326",
"0.4673822",
"0.466722",
"0.46647042",
"0.46598113",
"0.46539286",
"0.46410248",
"0.46391773",
"0.46209955",
"0.45844892",
"0.45778358",
"0.45413196",
"0.4534498",
"0.45218557",
"0.45149645",
"0.4495669",
"0.44946888",
"0.4481145",
"0.4466186",
"0.4465872",
"0.44585297",
"0.44553038",
"0.4434617",
"0.4434515",
"0.44342354",
"0.4423182",
"0.44208607",
"0.44075692",
"0.43903235",
"0.43855998",
"0.43758163",
"0.4372176",
"0.43688595",
"0.43601376",
"0.43570125",
"0.4353611",
"0.43471947",
"0.43427014",
"0.43284765",
"0.43217608",
"0.43204263",
"0.431642",
"0.43136516",
"0.43059075",
"0.43044654",
"0.43031138",
"0.43004346",
"0.4299505",
"0.4296962",
"0.4294111",
"0.42905414",
"0.42873943",
"0.42868492",
"0.42810056",
"0.42807987",
"0.42698562",
"0.42696416",
"0.42616072",
"0.42587605",
"0.42571267"
] | 0.7404647 | 0 |
Get the value of coupon_profiles | public function getCouponProfiles()
{
return $this->coupon_profiles;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function GetProfilesValues()\n\t{\n\t\treturn self::$aPROFILES;\n\t}",
"public function getCouponCode();",
"public function getProfile()\n {\n return $this->getFieldValue(self::FIELD_PROFILE);\n }",
"public function get()\n {\n return $this->coupon->get();\n }",
"public function getBillingProfile();",
"public function getCouponInfoByCoupon($coupon)\n {\n $sql = \"SELECT c.bid,c.aid,c.uid,c.code,c.get_time,c.use_time,c.status,a.content FROM casino_coupon AS c,casino_award AS a \n\t\t\t\tWHERE c.bid=a.bid AND c.aid=a.id AND c.code=:coupon \";\n return $this->_rdb->fetchRow($sql, array('coupon' => $coupon));\n }",
"public static function singleCoupon($coupon)\n {\n \n $value=DB::table('coupon')->where('coupon_code','=',$coupon)->where('coupon_status','=',1)->first(); \n return $value;\n\t\n }",
"function getCoupon()\n {\n if (!empty($this->coupon_id))\n if (!$this->_coupon || ($this->_coupon->coupon_id != $this->coupon_id))\n $this->_coupon = $this->getDi()->couponTable->load($this->coupon_id);\n return $this->_coupon;\n }",
"function getCouponDetail($ccode){\n\t\t$retVal = 'err';\n\t\t$sqlCouponDetail = \"Select * from `red_coupons` where `coupon_code`='$ccode' and status='1' and valid_untill > now() limit 1\";\n\t\t\n\t\t$rsCoupon = $this->db->query($sqlCouponDetail);\n\t\tif($rsCoupon->num_rows() > 0){\t\t\t\n\t\t\t$arrCoupon = $rsCoupon->result_array();\n\t\t\t$maxnumberOfMembers = $arrCoupon[0]['max_number_of_members'];\n\t\t\t$totalUsedYet = $this->countCouponUsed($ccode);\n\t\t\tif($totalUsedYet < $maxnumberOfMembers){\n\t\t\t\t$discountValue = ($arrCoupon[0]['coupon_type']== 0)?'$'.$arrCoupon[0]['coupon_value']: $arrCoupon[0]['coupon_value'].'%';\n\t\t\t\t$retVal = 'Discount applicable is '.$discountValue.' of the first '.$arrCoupon[0]['usable_number_of_times'].' month(s) of your payment cycle.';\n\t\t\t}\n\t\t} \n\t\treturn $retVal;\n\t}",
"function getCouponStatus($coupon_code)\n\t{\n\t\t \n\t\t$this->db->select('*');\n\t\t$this->db->from('coupon');\n\t\t$this->db->where('identification_code',$coupon_code);\n\t\t$query = $this->db->get();\n\t\tif($query->num_rows() > 0){\n\t\t$coupon_row = $query->row();\n\t\treturn $coupon_row->verification_status;\n\t\t}else{\n\t\treturn 1;\n\t\t}\t\t \t\n\t}",
"public function getProfileId() {\n\t\treturn ($this->profileId);\n\t}",
"public function getProfileId() {\n\t\treturn ($this->profileId);\n\t}",
"public function getProfileBytes()\n {\n return $this->profile_bytes;\n }",
"public function getProfile()\n {\n return $this->profile;\n }",
"public function getProfile()\n {\n return $this->profile;\n }",
"public function getProfile()\n {\n return $this->profile;\n }",
"public function getProfile()\n {\n $res = $this->getEntity()->getProfile();\n\t\tif($res === null)\n\t\t{\n\t\t\t$this->setProfile(SDIS62_Model_DAO_Abstract::getInstance($this::$type_objet)->findByCriteria('Profile', array('primary' => $this::getPrimary())));\n\t\t\treturn $this->getEntity()->getProfile();\n\t\t}\n return $res;\n }",
"public function getProfileResult($token){\n\t\treturn $this->_profiles[$token];\n\t}",
"public function getProfileId()\n {\n return $this->profile_id;\n }",
"public function getCouponTotalValue(Request $request)\n {\n Log::debug('Getting total coupon value to apply.');\n\n \t$couponIds = explode(',', $request->session()->get($this->couponIdsKey, ''));\n \t$totalValue = 0;\n \n foreach($couponIds as $couponId)\n {\n $coupon = Coupon::find($couponId);\n $applicableValue = 0;\n if ($coupon != null && $this->isValidCoupon($coupon))\n {\n $applicableValue += $this->getApplicableValue(explode(\",\", $coupon->selected_product_ids)); \n if ($applicableValue > 0) {\n $totalValue += $this->getAppliedCouponValue($coupon, $applicableValue);\n }\n }\n }\n\n Log::debug('Total coupon value: '.number_format((float)$totalValue, 2, '.', ''));\n\n return number_format((float)$totalValue, 2, '.', '');\n }",
"public function getProfileId() {\n\t\treturn($this->profileId);\n\t}",
"public function getProfilePicture()\n\t{\n\t\treturn $this->info['profile_picture'];\n\t}",
"public function profile() {\n return $this->profile;\n }",
"public function getProfile() {\n\t\treturn $this->profile;\n\t}",
"public function GetProfile()\n {\n return $this->profile;\n }",
"protected function getCouponInfo($coupon, $coupon_code)\n {\n $infoCoupon = [];\n $amount = (float)$coupon['response']['coupon_amount'];\n\n $site_id = strtoupper($this->_scopeConfig->getValue(\n \\MercadoPago\\Core\\Helper\\ConfigData::PATH_SITE_ID,\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE\n ));\n\n if ($site_id == \"MCO\" || $site_id == \"MLC\") {\n $amount = round($amount);\n }\n\n $infoCoupon['coupon_amount'] = $amount;\n $infoCoupon['coupon_code'] = $coupon_code;\n $infoCoupon['campaign_id'] = $coupon['response']['id'];\n\n if ($coupon['status'] == 200) {\n $this->_coreHelper->log(\"Coupon applied. API response 200.\", 'mercadopago-custom.log');\n } else {\n $this->_coreHelper->log(\"Coupon invalid, not applied.\", 'mercadopago-custom.log');\n }\n\n return $infoCoupon;\n }",
"public function getBillingProfileId();",
"protected function _get_coupons( $coupons ) {\n\t\treturn implode( ', ', wp_list_pluck( $coupons, 'code' ) );\n\t}",
"public function getProfileId() \n {\n if (!$this->hasProfileId()) \n {\n $this->profileId = '';\n }\n\n return $this->profileId;\n }",
"public function getProfileType()\n {\n return $this->profile_type;\n }",
"public function getProf(){\n return $this->prof;\n }",
"public function getProfileId() : Uuid {\n\t\treturn ($this->profileId);\n\t}",
"public function getProfiles()\n {\n return $this->profiles;\n }",
"function getCoupon($id) {\r\n\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*','tx_commercecoupons_coupons','uid = '.intval($id).$GLOBALS['TSFE']->cObj->enableFields('tx_commercecoupons_coupons'));\r\n\t\treturn $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);\r\n\t}",
"public function getProfilePicture()\n {\n return $this->profilePicture;\n }",
"public function getProfileId() {\n\t\treturn $this->profileId;\n\t}",
"public function getProfileImg()\n {\n return $this->profile_img;\n }",
"public function getPaymentProfileList()\n {\n return $this->paymentProfileList;\n }",
"function getMembersCount($coupon_id)\n {\n $queryString = \"select count(*) as count from coupons_purchase where couponid='$coupon_id' and Coupon_amount_Status='T' \";\n\t//$queryString = \"select count(*) as count from coupons_purchase where couponid='$coupon_id'\"; \n $result = mysql_query($queryString);\n $row = mysql_fetch_object($result);\n return $row->count;\n }",
"public function getProfileId(): ?int {\n\t\treturn ($this->profileId);\n\t}",
"function getCouponUsersLimit($coupon_id)\n {\n $queryString = \"select coupon_minuserlimit as minuser,coupon_maxuserlimit as maxuser from coupons_coupons where coupon_id='$coupon_id'\";\n $resultSet = mysql_query($queryString);\n while ($row = mysql_fetch_object($resultSet)) \n {\n $limit[min] = $row->minuser;\n $limit[max] = $row->maxuser;\n }\n return $limit;\n }",
"public function getBeneficios()\n {\n return $this->beneficios;\n }",
"public function getAllProfiles()\n {\n return self::$profiles;\n }",
"public function getUserProfile();",
"public function getProfileImg()\n {\n return $this->profileImg;\n }",
"public function getAddCouponInfo()\n {\n $sql = \"SELECT * FROM casino_coupon_add \";\n return $this->_rdb->fetchAll($sql);\n }",
"public function getBeneficiaryInfoDetails() {\n return $this->type_infos()->where('types.name', 'beneficiary')->beneficiary_info;\n }",
"public function getShippingProfiles()\n {\n return $this->shipping_profiles;\n }",
"public function getUsage($coupon_id)\r\n {\r\n return $this->__getUsage($coupon_id);\r\n }",
"public function getPaymentProfiles() {\n if (!$this->hasData('payment_profiles')) {\n $profilesArray = array();\n $profiles = Mage::getModel('ipay/profile')->getCollection()\n ->addCustomerFilter($this->getCustomer());\n foreach ($profiles as $profile) {\n if ($profile->getIsVisible()) { // don't display on frontend\n $profilesArray[] = $profile;\n }\n }\n }\n $this->setPaymentProfiles($profilesArray);\n return $this->getData('payment_profiles');\n }",
"public function getInfoProfile(){\n return $this->get_user_by_id($this->getAccountID());\n }",
"public function getWebProfileList()\n {\n $url = $this->host . '/v1/payment-experience/web-profiles';\n $authorization = 'Authorization: Bearer ' . $this->clientCredentials->access_token;\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json;charset=UTF-8', $authorization));\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($curl, CURLOPT_POST, 1);\n\n $this->cUrl = $curl;\n return $this->sendRequest();\n //===\n }",
"function getCouponDetails($payableAmount, $ccode=''){\n\t\t$jsonArray = array('status' => 'failed');\n\t\t\n\t\t$sqlCouponDetail = \"Select * from `red_coupons` where `coupon_code`='$ccode' and status='1' limit 1\";\n\t\t$retVal = $payableAmount;\n\t\t$rsCoupon = $this->db->query($sqlCouponDetail);\n \n\t\tif($rsCoupon->num_rows() > 0){\t\t\t\n\t\t\t$arrCoupon = $rsCoupon->result_array();\n\t\t\t \n\t\t\t$maxnumberOfMembers = $arrCoupon[0]['max_number_of_members'];\n\t\t\t$totalUsedYet = $this->countCouponUsed($ccode); \n\t\t\tif($totalUsedYet > $maxnumberOfMembers){\n\t\t\t\t$retVal = $payableAmount;\n $status = 'failed';\n\t\t\t}elseif($arrCoupon[0]['coupon_type']== 0){\n\t\t\t\t$retVal = $payableAmount - $arrCoupon[0]['coupon_value'];\n $status = 'success';\n\t\t\t}else{\n\t\t\t\t$retVal = $payableAmount * (100 - $arrCoupon[0]['coupon_value'])/100;\n $status = 'success';\n\t\t\t}\n$jsonArray = array('status' => 'failed');\n\t\t\tif($status == 'success'){\n\t\t\t\t$noOfUses = $arrCoupon[0]['usable_number_of_times'];\n\t\t\t\tif($noOfUses <=\t24){\n\t\t\t\t\t$currentDate = date('Y-m-d');\n\t\t\t\t\t$Coupon_exp_date = date('Y-m-d',strtotime($arrCoupon[0]['valid_untill']));\n\t\t\t\t\n\t\t\t\t\tif(strtotime($currentDate) < strtotime($Coupon_exp_date)){\n\t\t\t\t\t\t$jsonArray = array('status' => 'success','noOfUses' => $noOfUses);\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$jsonArray = array('status' => 'failed');\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$jsonArray = array('status' => 'success','noOfUses' => 'all');\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t} \n\t\t\n\t\treturn $jsonArray;\t\n\t}",
"public function getProfileType() {\n\t\treturn ($this->profileType);\n\t}",
"function getSessionCoupon($id) {\r\n\t\t$couponsArray = $this->getSessionCoupons();\r\n\t\treturn $couponsArray[$id];\r\n\t}",
"public function getCouponId()\n {\n return $this->getParameter('couponId');\n }",
"function getBeneficiario1() {\r\n return $this->beneficiario1;\r\n }",
"public function getCoupon($id)\n {\n return CI::db()->where('id', $id)->get('coupons')->row();\n }",
"public function getUserProfileId() {\n return($this->userProfileId); \n }",
"public function getCouponData() {\n return array(\n 'couponName' => $this->couponName,\n 'couponCode' => $this->couponCode,\n 'couponType' => $this->couponType,\n 'discountCriteria' => $this->discountCriteria,\n 'excItems' => $this->excItems,\n 'accumulateDisc' => $this->accumulateDisc,\n 'eligibility' => $this->eligibility,\n 'loyaltyPoints' => $this->loyaltyPoints,\n 'description' => $this->description,\n 'nudgepromocode' => $this->nudgepromocode,\n 'nudgedescription' => $this->nudgedescription,\n 'appliedCoupons' => $this->appliedCoupons\n );\n }",
"function get_coupon_code($c_id)\n {\n $query = \"select * from coupons_coupons where coupon_id='$c_id'\";\n $resultset = mysql_query($query);\n return $resultset;\n }",
"public function getCoupon(): array\n {\n $name = $this->coupon->name();\n $discount = $this->coupon->applyDiscount($this->subtotal_in_cents);\n\n return [\n 'name' => $name,\n 'discount' => Present::price($discount),\n ];\n }",
"public function inProfileListFranchise($id) {\n\n $this->db->where('account_id', $id);\n $this->db->where('account_type', 2);\n $profileinfo = $this->db->get('profile')->result();\n return $profileinfo;\n }",
"public function profileDetails()\n {\n $processReaction = $this->userEngine->prepareProfileDetails();\n\n return __processResponse($processReaction, [], null, true);\n }",
"static function profiles() {\n global $LANG;\n\n $a_profil = array();\n $a_profil[] = array('profil' => 'agent',\n 'name' => $LANG['plugin_fusioninventory']['profile'][2]);\n $a_profil[] = array('profil' => 'remotecontrol',\n 'name' => $LANG['plugin_fusioninventory']['profile'][3]);\n $a_profil[] = array('profil' => 'configuration',\n 'name' => $LANG['plugin_fusioninventory']['profile'][4]);\n $a_profil[] = array('profil' => 'wol',\n 'name' => $LANG['plugin_fusioninventory']['profile'][5]);\n $a_profil[] = array('profil' => 'unknowndevice',\n 'name' => $LANG['plugin_fusioninventory']['profile'][6]);\n $a_profil[] = array('profil' => 'task',\n 'name' => $LANG['plugin_fusioninventory']['profile'][7]);\n\n return $a_profil;\n }",
"public function getDbProfileResult($token){\n\t\treturn $this->_profiles[$token];\n\t}",
"protected function getUsedCoupon()\n {\n return $this->booking->usedCoupon;\n }",
"private function getCustomerData(UserProfile $profile)\n {\n $customerData = [];\n foreach (['firstName', 'lastName', 'email'] as $field) {\n $data = $profile->{$field};\n $customerData[strtolower($field)] = $data !== null ? $data : '-';\n }\n return $customerData;\n }",
"public function getIdProf()\n {\n return $this->idProf;\n }",
"public function findCoupon($code)\n {\n return array_get($this->coupons, $code);\n }",
"public function getProfileImageProfileId() {\n\t\treturn($this->profileImageProfileId);\n\t}",
"public function getPostbackProfiles()\n {\n return $this->postback_profiles;\n }",
"public function controlProfile(){\n\t\t$profilePage = \\Utility\\Singleton::getInstance('\\View\\Main');\n\t\t$data=\"\";\n\t\t\n\t\tswitch($profilePage->get('profileAction'))\n\t\t{\t\n\t\t\tcase 'hasAlreadyVoted':\n\t\t\t\t$data=$this->hasVoted();\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'getProfilePage':\n\t\t\t\t$data=$this->setProfileInformation();\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'rateUser':\n\t\t\t\t$data=$this->rateUser();\n\t\t\t\tbreak;\n\n\t\t}\n\t\n\t\treturn $data;\n\t\t\n\t}",
"public function get_profil()\n {\n return $this->_profil;\n }",
"function get_valid_coupon_details( $code )\n\t{\n\t\t$username = $this->session->userdata( 'user' )->username; //new\n\t\t$this->db->select( '*' );\n\t\t$this->db->where( 'code', $code );\n\t\t//Check Username OR Email Address of User for Valid User (Loged User)\n\t\t$this->db->where( 'username', $username ); //new\n\t\t$this->db->where( 'status', 1 );\n\t\t$this->db->where( 'validity >=', date( 'Y-m-d' ) );\n\t\t$query = $this->db->get( 'oe_coupon' );\n\t\tif ( $query->num_rows() > 0 ) {\n\t\t\treturn $query->row();\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}",
"function profile ($user_id) {\n global $sql;\n $res = $sql->sql_select_array_query(\"SELECT * FROM `profile` WHERE user_id = '{$user_id}'\");\n return count($res) > 0 ? $res[0] : null;\n }",
"public function getCustomerCouponInfo($customer){\n $customerId = $customer->getId();\n $customerCouponCollection = Mage::getModel('fidelityprogram/fidelitycouponcodebabynotified')->getCollection()\n ->addFieldToSelect('*')->addFieldToFilter('customer_id', $customerId)->getFirstItem();\n //check if array brings results\n if(sizeof($customerCouponCollection) > 0):\n return $customerCouponCollection->getData();\n else:\n return false;\n endif;\n }",
"function getProfile(){\n $profile = $this->loadUser();\n return $profile;\n }",
"public function getProfesseurs()\n {\n return $this->professeurs;\n }",
"public function existing_profiles()\n {\n if ($this->db->table_exists('profiles'))\n {\n $this->db->select('id, temperatureopt, temperaturemax, lighthours, moisture, phvaluemin, phvaluemax');\n $this->db->where('is_default', '1');\n $query = $this->db->get('profiles');\n return $query;\n }\n }",
"public function getReturnProfiles()\n {\n return $this->return_profiles;\n }",
"public function getUserProfileId() : Uuid{\n\t\treturn($this->userProfileId);\n\t}",
"public function get_profile_data() {\n\t\treturn $this->db->get_where('users', array('id' => $this->session->userdata('user_id')))->row_array();\n\t}",
"public function getProfile()\r\n {\r\n return $this->getGuardUser() ? $this->getGuardUser()->getProfile() : null;\r\n }",
"function profile_info() {\n $parameters = array(\n 'method' => __FUNCTION__\n );\n return $this->get_data($parameters);\n }",
"public function getVoteProfileId(): int {\n\t\treturn ($this->voteProfileId);\n\t}",
"public function getCoupon($json){\n $obj = json_decode($json, true);\n return response()->json(wallet_detail::where([['id',$obj['coupon']['id']],['walletId',$obj['client']],['status','Activo']])->get());\n }",
"public function getProfileHash() {\n\t\treturn ($this->profileHash);\n\t}",
"public function getProfile() {\n return $this->getGuardUser() ? $this->getGuardUser()->getProfile() : null;\n }",
"public function getProfileSize() {}",
"function get_coupon()\n{\n // get voucher\n global $current_user_id, $db_prefix, $sql_today;\n\n // find single use\n $gift = sql_qquery(\"SELECT * FROM \".$db_prefix.\"gift WHERE redeem_user_id='$current_user_id' AND redeem_order_id='' AND valid_date >= '$sql_today' LIMIT 1\");\n if (!empty($gift)) {\n $g = explode('.', $gift['gift_code']);\n $gift['gift_code'] = $g[0];\n return $gift;\n } else {\n return false;\n }\n}",
"public function getSource()\n {\n return 'user_profile';\n }",
"public function getProvincia() {\n\t\treturn $this -> provincia;\n\t}",
"function getProfileConfig() {\n $this->load->model('Usermodel');\n $this->Usermodel->getProfileConfiguration();\n }",
"function getProfileID() {\n\t\treturn $this->_ProfileID;\n\t}",
"public function get_profile_information($profile_id)\n\t{\n\t\treturn $this->ci->profile_model->get_profile_information($profile_id);\n\t}",
"function coupon_value($code, $total) {\r\n if ($this->check_coupon($code)) {\r\n $coupons = (array)get_site_option('psts_coupons');\r\n $coupon_code = preg_replace('/[^A-Z0-9_-]/', '', strtoupper($code));\r\n if ($coupons[$coupon_code]['discount_type'] == 'amt') {\r\n $new_total = round($total - $coupons[$coupon_code]['discount'], 2);\r\n $new_total = ($new_total < 0) ? 0.00 : $new_total;\r\n $discount = '-' . $this->format_currency('', $coupons[$coupon_code]['discount']);\r\n return array('discount' => $discount, 'new_total' => $new_total);\r\n } else {\r\n $new_total = round($total - ($total * ($coupons[$coupon_code]['discount'] * 0.01)), 2);\r\n $new_total = ($new_total < 0) ? 0.00 : $new_total;\r\n $discount = '-' . $coupons[$coupon_code]['discount'] . '%';\r\n return array('discount' => $discount, 'new_total' => $new_total);\r\n }\r\n\r\n } else {\r\n return false;\r\n }\r\n }",
"public function get_provinsi()\n\t{\n\t\treturn $this->db->get(\"ref_provinsi\")->result();\n\t}",
"public function getProvincia()\n {\n return $this->provincia;\n }",
"public function getProvincia()\n {\n return $this->provincia;\n }"
] | [
"0.63687015",
"0.6294413",
"0.60774785",
"0.60598344",
"0.60544753",
"0.60258913",
"0.6008101",
"0.59009206",
"0.58125716",
"0.5784459",
"0.57645506",
"0.57645506",
"0.57597435",
"0.57444996",
"0.57444996",
"0.57444996",
"0.56989723",
"0.56974196",
"0.5684037",
"0.5665834",
"0.5652828",
"0.56505245",
"0.5624184",
"0.56239545",
"0.5623207",
"0.56189036",
"0.56187516",
"0.56070405",
"0.5589963",
"0.5577482",
"0.5576922",
"0.55519706",
"0.55479956",
"0.5546469",
"0.55155236",
"0.55102736",
"0.5492604",
"0.5474414",
"0.5465815",
"0.5465683",
"0.5463554",
"0.54610795",
"0.5458423",
"0.5446315",
"0.54218024",
"0.5415389",
"0.5412091",
"0.539378",
"0.5391537",
"0.53820574",
"0.53778726",
"0.53692394",
"0.5367726",
"0.53670484",
"0.5354246",
"0.5346009",
"0.5345935",
"0.5338517",
"0.533798",
"0.5336513",
"0.5332379",
"0.53246653",
"0.53184414",
"0.53170735",
"0.53139156",
"0.5310525",
"0.5297683",
"0.5294188",
"0.52863103",
"0.52846944",
"0.5283015",
"0.5279754",
"0.527613",
"0.52631617",
"0.5256677",
"0.52520806",
"0.52378213",
"0.52213746",
"0.52152586",
"0.52088547",
"0.5208817",
"0.5204784",
"0.51971555",
"0.5195586",
"0.51797825",
"0.5173368",
"0.5171898",
"0.5165561",
"0.5160015",
"0.5159268",
"0.51566",
"0.51561797",
"0.5154073",
"0.51523536",
"0.5146804",
"0.5146602",
"0.5146547",
"0.5144106",
"0.5140168",
"0.5140168"
] | 0.7436424 | 0 |
Set the value of coupon_profiles | public function setCouponProfiles(array $coupon_profiles)
{
$this->coupon_profiles = $coupon_profiles;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setCoupon($coupon)\n {\n if ($coupon->value > 0) {\n $this->coupon['value'] = $coupon->value;\n }\n elseif ($coupon->discount > 0) {\n $this->coupon['percent'] = $coupon->discount;\n }\n session(['coupon' => $coupon]);\n }",
"public function set($cartId, $couponCode);",
"public function getCouponProfiles()\n {\n return $this->coupon_profiles;\n }",
"public function setCouponCode($code);",
"protected function setFundraiserProfile()\n {\n $this->fundraiser_profile = new UserProfile;\n $this->fundraiser_profile->set( 'user_id', $this->data['fundraiser'] );\n $this->fundraiser_profile->read();\n }",
"public function move_applied_coupon_from_cookies_to_account() {\n\n\t\t\t$user_id = get_current_user_id();\n\n\t\t\tif ( $user_id > 0 && ! empty( $_COOKIE['sc_applied_coupon_profile_id'] ) ) {\n\n\t\t\t\t$unique_id = wc_clean( wp_unslash( $_COOKIE['sc_applied_coupon_profile_id'] ) ); // phpcs:ignore\n\n\t\t\t\t$applied_coupons = get_option( 'sc_applied_coupon_profile_' . $unique_id );\n\n\t\t\t\tif ( false !== $applied_coupons && is_array( $applied_coupons ) && ! empty( $applied_coupons ) ) {\n\n\t\t\t\t\t$saved_coupons = get_user_meta( $user_id, 'sc_applied_coupon_from_url', true );\n\t\t\t\t\tif ( empty( $saved_coupons ) || ! is_array( $saved_coupons ) ) {\n\t\t\t\t\t\t$saved_coupons = array();\n\t\t\t\t\t}\n\t\t\t\t\t$saved_coupons = array_merge( $saved_coupons, $applied_coupons );\n\t\t\t\t\tupdate_user_meta( $user_id, 'sc_applied_coupon_from_url', $saved_coupons );\n\t\t\t\t\twc_setcookie( 'sc_applied_coupon_profile_id', '' );\n\t\t\t\t\tdelete_option( 'sc_applied_coupon_profile_' . $unique_id );\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t}",
"public function setProfile(Profile $profile): void\n {\n $this->profile = $profile;\n }",
"function setCoupon(Coupon $_coupon)\n {\n $this->_couponCode = null;\n $this->coupon_id = $_coupon->coupon_id;\n $this->coupon_code = $_coupon->code;\n $this->_coupon = $_coupon;\n }",
"public function setProfile($data)\n {\n if (isset($data['identifier'])) $this->setIdentifier ($data['identifier']);\n if (isset($data['providerName'])) $this->setProvider ($data['providerName']);\n if (isset($data['displayName'])) $this->setDisplayName($data['displayName']);\n if (isset($data['preferredUsername'])) $this->setUserName ($data['preferredUsername']);\n if (isset($data['verifiedEmail'])) $this->setEmail ($data['verifiedEmail']);\n }",
"function setProfileConfig($profile_config){\n\t\t$this->profile_config = $profile_config;\n\t}",
"function setSessionCoupon($coupon) {\r\n\t\t$couponsArray = $this->getSessionCoupons();\r\n\t\t$couponsArray[$coupon['uid']] = $coupon;\r\n\t\t$this->setSessionCoupons($couponsArray);\r\n\t}",
"function setCouponCode($code)\n {\n $this->_coupon = $this->coupon_id = $this->coupon_code = null;\n $this->_couponCode = $code;\n }",
"function setCoupon(){\n\tif(isset($_POST['couponCode'])){\n\t\t$_SESSION['couponCode'] = $_POST['couponCode'];\n\t\tsetcookie(\"couponCode\", $_POST['couponCode'], time() + 86400 * 1, '/');\n\t}\n\tif(isset($_COOKIE['couponCode'])){\n\t\t$_SESSION['couponCode'] = $_COOKIE['couponCode'];\n\t}\n}",
"public function setBillingProfileId($billing_profile_id);",
"public function save()\n\t{\n\t\t$updatedProfile = Yii::$app->user->identity->profile;\n\t\t\n\t\t$updatedProfile = Yii::$app->user->identity->profile;\n\t\t\n\t\t$updatedProfile->{Yii::$app->request->post()['flag']} = Yii::$app->request->post()['val'];\n\n\t\t$updatedProfile->save();\n\t}",
"public function applyCoupon($coupon)\n {\n $this->assertCustomerExists();\n\n $customer = $this->asStripeCustomer();\n\n $customer->coupon = $coupon;\n\n $customer->save();\n }",
"public function setProfileInfo($profile){\n $profile_dir = conf::pathBase() . \"/profiles/$profile\";\n if (!file_exists($profile_dir)) {\n common::abort( \"No such path to profiles: $profile_dir\");\n } \n \n include $profile_dir . \"/profile.inc\";\n $this->profileModules = $_PROFILE_MODULES;\n $this->profileTemplates = $_PROFILE_TEMPLATES;\n $this->profileTemplate = $_PROFILE_TEMPLATE;\n }",
"public function SetProfile($profile)\n {\n $this->profile = $profile;\n }",
"public function setProfileUrl($url)\n {\n if ($url) {\n $this->profileUrl = preg_replace(\"#(\\/+)$#\", \"\", $url) . \"/\";\n }\n }",
"protected function setOfferValue ()\n {\n $this->request->coupon_benefits[ $this->offerNature ] = $this->offer->rate;\n }",
"public function my_profile_update( $user_id ) {\n\n\t\t\tglobal $wpdb;\n\n\t\t\tif ( current_user_can( 'edit_user', $user_id ) ) {\n\n\t\t\t\t$current_user = get_userdata( $user_id );\n\n\t\t\t\t$old_customers_email_id = $current_user->data->user_email;\n\n\t\t\t\t$post_email = ( isset( $_POST['email'] ) ) ? wc_clean( wp_unslash( $_POST['email'] ) ) : ''; // phpcs:ignore\n\n\t\t\t\tif ( ! empty( $post_email ) && $post_email !== $old_customers_email_id ) {\n\n\t\t\t\t\t$result = wp_cache_get( 'wc_sc_customers_coupon_ids_' . sanitize_key( $old_customers_email_id ), 'woocommerce_smart_coupons' );\n\n\t\t\t\t\tif ( false === $result ) {\n\t\t\t\t\t\t$result = $wpdb->get_col( // phpcs:ignore\n\t\t\t\t\t\t\t$wpdb->prepare(\n\t\t\t\t\t\t\t\t\"SELECT post_id\n\t\t\t\t\t\t\t\t\tFROM $wpdb->postmeta\n\t\t\t\t\t\t\t\t\tWHERE meta_key = %s\n\t\t\t\t\t\t\t\t\tAND meta_value LIKE %s\n\t\t\t\t\t\t\t\t\tAND post_id IN ( SELECT ID\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM $wpdb->posts\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE post_type = %s)\",\n\t\t\t\t\t\t\t\t'customer_email',\n\t\t\t\t\t\t\t\t'%' . $wpdb->esc_like( $old_customers_email_id ) . '%',\n\t\t\t\t\t\t\t\t'shop_coupon'\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t\twp_cache_set( 'wc_sc_customers_coupon_ids_' . sanitize_key( $old_customers_email_id ), $result, 'woocommerce_smart_coupons' );\n\t\t\t\t\t\t$this->maybe_add_cache_key( 'wc_sc_customers_coupon_ids_' . sanitize_key( $old_customers_email_id ) );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( ! empty( $result ) ) {\n\n\t\t\t\t\t\tforeach ( $result as $post_id ) {\n\n\t\t\t\t\t\t\t$coupon_meta = get_post_meta( $post_id, 'customer_email', true );\n\n\t\t\t\t\t\t\tforeach ( $coupon_meta as $key => $email_id ) {\n\n\t\t\t\t\t\t\t\tif ( $email_id === $old_customers_email_id ) {\n\n\t\t\t\t\t\t\t\t\t$coupon_meta[ $key ] = $post_email;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tupdate_post_meta( $post_id, 'customer_email', $coupon_meta );\n\n\t\t\t\t\t\t} //end foreach\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public function setOneClickApplyProfiles(array $profiles);",
"public function setProfileId($value)\n {\n return $this->set('ProfileId', $value);\n }",
"public function update(Request $request, Coupon $coupon)\n {\n if (Auth::user()->cant('update', $coupon)) {\n return redirect()->route('admin.home')->with(['message'=>'You don\\'t have permissions']);\n }\n $rules = [\n 'code' => 'required|unique:coupons,code,'.$coupon->id,\n 'value' => 'required|numeric|min:0.01',\n 'expire' => 'date_format:\"d.m.Y\"|nullable',\n 'min_order_price' => 'numeric|nullable|min:0.01',\n 'max_usages' => 'integer|nullable|min:0',\n ];\n $validator = Validator::make($request->all(), $rules);\n if ($validator->fails()) {\n return redirect()->route('coupons.edit', ['id'=>$coupon->id])->withErrors($validator)->withInput();\n }\n\n $coupon->code = $request->get('code');\n $coupon->value = $request->get('value');\n $coupon->type = $request->get('type');\n $coupon->expire = $request->get('expire');\n $coupon->min_order_price = $request->get('min_order_price');\n $coupon->max_usages = $request->get('max_usages');\n $coupon->save();\n return redirect()->route('coupons.edit', ['id'=>$coupon->id]);\n }",
"public function setCouponId($value)\n {\n return $this->setParameter('couponId', $value);\n }",
"public function set_applied_coupons( $value = array() ) {\n\t\t$this->applied_coupons = (array) $value;\n\t}",
"public function setProfiles($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\ZwiftPHP\\Protobuf\\Profile::class);\n $this->profiles = $arr;\n\n return $this;\n }",
"public function setIdentityCertificate(?IosCertificateProfileBase $value): void {\n $this->getBackingStore()->set('identityCertificate', $value);\n }",
"public function applyCoupon(CouponContract $coupon)\n {\n $this->coupons[$coupon->code] = $coupon;\n\n $this->update();\n }",
"public function update(User $user, Coupon $coupon)\n {\n //\n }",
"public function setPROFILEID($profileId)\n\t\t{\n\t\t\t$this->profileId=$profileId;\n\t\t}",
"public function setCoverAttribute($value) {\n\n\t\tif (!$this->preventAttrSet) {\n\t\t\t$field_name = 'profile.cover';\n\t\t\t$attribute_name = 'cover';\n\t\t\t$disk = config('filesystems.default');\n\n\t\t\t// Set the right field name\n\t\t\t$request = \\Request::instance();\n\t\t\tif (!$request->hasFile($field_name)) {\n\t\t\t\t$field_name = $attribute_name;\n\t\t\t}\n\n\t\t\t// if (!isset($this->country_code) || !isset($this->user_id)) {\n\t\t\t// $this->attributes[$attribute_name] = null;\n\t\t\t// return false;\n\t\t\t// }\n\n\t\t\t// Path\n\t\t\t$destination_path = 'profile/cover/'. $this->user_id;\n\n\t\t\t// Upload\n\t\t\t$this->uploadFileToDiskCustom($value, $field_name, $attribute_name, $disk, $destination_path);\n\t\t} else {\n\t\t\t$this->attributes['cover'] = $value;\n\t\t}\n\t}",
"public function apply_coupon_from_session() {\n\n\t\t\t$cart = ( is_object( WC() ) && isset( WC()->cart ) ) ? WC()->cart : null;\n\n\t\t\tif ( empty( $cart ) || WC()->cart->is_empty() ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$user_id = get_current_user_id();\n\n\t\t\tif ( 0 === $user_id ) {\n\t\t\t\t$unique_id = ( ! empty( $_COOKIE['sc_applied_coupon_profile_id'] ) ) ? wc_clean( wp_unslash( $_COOKIE['sc_applied_coupon_profile_id'] ) ) : ''; // phpcs:ignore\n\t\t\t\t$applied_coupon_from_url = ( ! empty( $unique_id ) ) ? get_option( 'sc_applied_coupon_profile_' . $unique_id, array() ) : array();\n\t\t\t} else {\n\t\t\t\t$applied_coupon_from_url = get_user_meta( $user_id, 'sc_applied_coupon_from_url', true );\n\t\t\t}\n\n\t\t\tif ( empty( $applied_coupon_from_url ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tforeach ( $applied_coupon_from_url as $index => $coupon_code ) {\n\t\t\t\tWC()->cart->add_discount( trim( $coupon_code ) );\n\t\t\t\tunset( $applied_coupon_from_url[ $index ] );\n\t\t\t}\n\n\t\t\tif ( 0 === $user_id ) {\n\t\t\t\tupdate_option( 'sc_applied_coupon_profile_' . $unique_id, $applied_coupon_from_url, 'no' );\n\t\t\t} else {\n\t\t\t\tupdate_user_meta( $user_id, 'sc_applied_coupon_from_url', $applied_coupon_from_url );\n\t\t\t}\n\n\t\t}",
"abstract function setUserProfileProperty($user, $property_name, $property);",
"public function updateProfile($user, array $profile);",
"public function &setExternalUpdateProfileUrl($value);",
"public function offsetSet($offset, $value) { if (is_null($offset)) { $this->profile[] = $value; } else { $this->profile[$offset] = $value; }}",
"public function offsetSet($offset, $value) { if (is_null($offset)) { $this->profile[] = $value; } else { $this->profile[$offset] = $value; }}",
"public function api_entry_setprofile() {\n parent::validateParams(array('user'));\n\n $user = $this->Mdl_Users->get($_POST[\"user\"]);\n\n if ($user == null)\n parent::returnWithErr(\"User id is not valid.\");\n\n $arg = $this->safeArray(array('fullname', 'avatar', 'church', 'city', 'province', 'bday', 'mood'), $_POST);\n\n $arg['id'] = $_POST[\"user\"];\n\n if (count($arg) == 1)\n parent::returnWithErr(\"You should pass the profile 1 entry at least to update.\");\n\n $user = $this->Mdl_Users->update($arg);\n\n if ($user == null)\n parent::returnWithErr(\"Profile has not been updated.\");\n\n parent::returnWithoutErr(\"Profile has been updated successfully.\", $user);\n }",
"public function updateCustomerPaymentProfile($billing_id, $data, $profile_id=0) {\r\n\t\tif( $this->_debug ) Mage::log('updateCustomerPaymentProfile('.$billing_id.')', null, 'authnetcim.log');\r\n\t\t\r\n\t\ttry {\r\n\t\t\tif( $profile_id < 1 ) {\r\n\t\t\t\t$profile_id = $this->getProfileId( $this->getCustomer() );\r\n\t\t\t}\r\n\r\n\t\t\tif( !empty($profile_id) && !empty($billing_id) ) {\r\n\t\t\t\tif( !empty($data) ) {\r\n\t\t\t\t\t$this->cim->setParameter( 'customerProfileId', $profile_id );\r\n\t\t\t\t\t$this->cim->setParameter( 'customerPaymentProfileId', $billing_id );\r\n\t\t\t\t\t$this->cim->setParameter( 'billToFirstName', $data['firstname'] );\r\n\t\t\t\t\t$this->cim->setParameter( 'billToLastName', $data['lastname'] );\r\n\t\t\t\t\t$this->cim->setParameter( 'billToAddress', $data['address1'] );\r\n\t\t\t\t\t$this->cim->setParameter( 'billToCity', $data['city'] );\r\n\t\t\t\t\t$this->cim->setParameter( 'billToState', $data['state'] );\r\n\t\t\t\t\t$this->cim->setParameter( 'billToZip', $data['zip'] );\r\n\t\t\t\t\t$this->cim->setParameter( 'billToCountry', $data['country'] );\r\n\t\t\t\t\t\r\n\t\t\t\t\tif( !empty($data['cc_cid']) )\r\n\t\t\t\t\t\t$this->cim->setParameter( 'cardCode', $data['cc_cid'] );\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tif( !empty($data['cc_exp_year']) && !empty($data['cc_exp_month']) )\r\n\t\t\t\t\t\t$this->cim->setParameter( 'expirationDate', sprintf(\"%04d-%02d\", $data['cc_exp_year'], $data['cc_exp_month']) );\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t$this->cim->setParameter( 'expirationDate', 'XXXX' );\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->cim->setParameter( 'cardNumber', (string)$data['cc_number'] );\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->cim->updateCustomerPaymentProfile();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t$this->checkCimErrors();\r\n\t\t\t\r\n\t\t\tif( $this->cim->isError() ) {\r\n\t\t\t\tMage::log( 'CIM: '.$this->cim->responses, null, 'authnetcim.log', true );\r\n\t\t\t\tMage::throwException( $this->cim->getResponse() );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn $billing_id;\r\n\t\t}\r\n\t\tcatch (AuthnetCIMException $e) {\r\n\t\t\tMage::log( $e->getMessage(), null, 'authnetcim.log', true );\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}",
"public function setCountriesAndRegions(?array $value): void {\n $this->getBackingStore()->set('countriesAndRegions', $value);\n }",
"function setCountryId( $value )\n {\n $this->CountryID = $value;\n }",
"public function setProfileSalt($newProfileSalt) : void {\n\t\t$this->profileSalt = $newProfileSalt;\n\t}",
"public function updateProfile(array $data){\n $user = App_Auth::getInstance()->getIdentity();\n $data['id'] = $user->id;\n\n $this->save($data);\n }",
"public function setup_profiles( $success, $default, $network ) {\r\n\t\t// Fetch the list of profiles.\r\n\t\tif ( $success ) {\r\n\t\t\tData::instance()->profiles_list( $network, true );\r\n\t\t}\r\n\t}",
"public function setWebsiteProfile(WebsiteProfile $websiteProfile = null)\n {\n $this->saveConfigValue('websiteProfile', $websiteProfile ? json_encode($websiteProfile->toArray()) : null);\n }",
"public function setBillingProfile(ProfileInterface $profile);",
"public static function edit_profile() {\n\t\twp_enqueue_media();\n\t\twp_enqueue_script( 'ur-my-account' );\n\n\t\t$user_id = get_current_user_id();\n\t\t$form_id = ur_get_form_id_by_userid( $user_id );\n\n\t\t$profile = user_registration_form_data( $user_id, $form_id );\n\n\t\t$user_data = get_userdata( $user_id );\n\t\t$user_data = $user_data->data;\n\n\t\t$form_data_array = ( $form_id ) ? UR()->form->get_form( $form_id, array( 'content_only' => true ) ) : array();\n\n\t\tif ( ! empty( $form_data_array ) ) {\n\n\t\t\tif ( count( $profile ) < 1 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Prepare values.\n\t\t\tforeach ( $profile as $key => $field ) {\n\t\t\t\t$value = get_user_meta( get_current_user_id(), $key, true );\n\t\t\t\t$profile[ $key ]['value'] = apply_filters( 'user_registration_my_account_edit_profile_field_value', $value, $key );\n\t\t\t\t$new_key = str_replace( 'user_registration_', '', $key );\n\n\t\t\t\tif ( in_array( $new_key, ur_get_registered_user_meta_fields() ) ) {\n\t\t\t\t\t$value = get_user_meta( get_current_user_id(), ( str_replace( 'user_', '', $new_key ) ), true );\n\t\t\t\t\t$profile[ $key ]['value'] = apply_filters( 'user_registration_my_account_edit_profile_field_value', $value, $key );\n\t\t\t\t} elseif ( isset( $user_data->$new_key ) && in_array( $new_key, ur_get_user_table_fields() ) ) {\n\t\t\t\t\t$profile[ $key ]['value'] = apply_filters( 'user_registration_my_account_edit_profile_field_value', $user_data->$new_key, $key );\n\n\t\t\t\t} elseif ( isset( $user_data->display_name ) && 'user_registration_display_name' === $key ) {\n\t\t\t\t\t$profile[ $key ]['value'] = apply_filters( 'user_registration_my_account_edit_profile_field_value', $user_data->display_name, $key );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tur_get_template(\n\t\t\t\t'myaccount/form-edit-profile.php',\n\t\t\t\tarray(\n\t\t\t\t\t'profile' => apply_filters( 'user_registration_profile_to_edit', $profile ),\n\t\t\t\t\t'form_data_array' => $form_data_array,\n\t\t\t\t)\n\t\t\t);\n\t\t} else {\n\t\t\techo '<h1>' . esc_html__( 'No profile details found.', 'user-registration' ) . '</h1>';\n\t\t}\n\t}",
"public function setProfile($profile)\n {\n if (empty($profile)) {\n throw new Exception (\"profile is empty!\");\n } \n $this->profile = $profile;\n }",
"public function setCoupons($coupons)\n {\n $this->values['Coupons'] = $coupons;\n return $this;\n }",
"public function update_profile(Request $request) {\n //type can be: mobile/phone/email\n $type = $request->type;\n //this new value is already validated in javascript\n $new_value = $request->new_value;\n $user = User::find($request->user_id);\n //dd($user);\n switch ($type) {\n case 'mobile':\n $user->gsm = $new_value;\n break;\n case 'phone':\n $user->tel = $new_value;\n break;\n case 'email':\n $user->email = $new_value;\n break;\n }\n\n $user->save();\n return 'success';\n }",
"function ds_register_social_customizer_settings( $wp_customize ) {\n\n\t// get the social profiles.\n\t$social_profiles = ds_get_social_profiles();\n\n\t// if we have any social profiles.\n\tif ( ! empty( $social_profiles ) ) {\n\n\t\t// register the customizer section for social profiles.\n\t\t$wp_customize->add_section(\n\t\t\t'ds_social',\n\t\t\tarray(\n\t\t\t\t'title' => __( 'Social Profiles' ),\n\t\t\t\t'description' => __( 'Add social media profiles here.' ),\n\t\t\t\t'priority' => 160,\n\t\t\t\t'capability' => 'edit_theme_options',\n\t\t\t)\n\t\t);\n\n\t\t// loop through each progile.\n\t\tforeach ( $social_profiles as $social_profile ) {\n\n\t\t\t// add the customizer setting for this profile.\n\t\t\t$wp_customize->add_setting(\n\t\t\t\t$social_profile['id'],\n\t\t\t\tarray(\n\t\t\t\t\t'default' => '',\n\t\t\t\t\t'sanitize_callback' => $social_profile['sanitize_callback'],\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t// add the customizer control for this profile.\n\t\t\t$wp_customize->add_control(\n\t\t\t\t$social_profile['id'],\n\t\t\t\tarray(\n\t\t\t\t\t'type' => $social_profile['type'],\n\t\t\t\t\t'priority' => $social_profile['priority'],\n\t\t\t\t\t'section' => 'ds_social',\n\t\t\t\t\t'label' => $social_profile['label'],\n\t\t\t\t\t'description' => $social_profile['description'],\n\t\t\t\t)\n\t\t\t);\n\n\t\t}\n\n\t}\n\n}",
"public function update_customer_profile($card_details, $customerProfileId = \"1511420207\", $customerPaymentProfileId = \"1511265906\"){\n $merchantAuthentication = new AnetAPI\\MerchantAuthenticationType();\n $merchantAuthentication->setName($this->authorize['merchant_login_id']);\n $merchantAuthentication->setTransactionKey($this->authorize['merchant_transaction_key']);\n \n // Set the transaction's refId\n\t\t$refId = 'ref' . time();\n\t\t\n\t\t// echo $customerProfileId;die;\n\n $request = new AnetAPI\\GetCustomerPaymentProfileRequest();\n $request->setMerchantAuthentication($merchantAuthentication);\n $request->setRefId( $refId);\n $request->setCustomerProfileId($customerProfileId);\n $request->setCustomerPaymentProfileId($customerPaymentProfileId);\n \n $controller = new AnetController\\GetCustomerPaymentProfileController($request);\n $response = $controller->executeWithApiResponse(\\net\\authorize\\api\\constants\\ANetEnvironment::PRODUCTION);\n\t\t// $response = $controller->executeWithApiResponse( \\net\\authorize\\api\\constants\\ANetEnvironment::SANDBOX);\n\t\n \n if (($response != null) && ($response->getMessages()->getResultCode() == \"Ok\"))\n {\n $billto = new AnetAPI\\CustomerAddressType();\n $billto = $response->getPaymentProfile()->getbillTo();\n \n $creditCard = new AnetAPI\\CreditCardType();\n $creditCard->setCardNumber((int) $card_details['card_number'] );\n $creditCard->setExpirationDate($card_details['expiry']);\n $creditCard->setCardCode($card_details['cvc']);\n\n \n $paymentCreditCard = new AnetAPI\\PaymentType();\n $paymentCreditCard->setCreditCard($creditCard);\n $paymentprofile = new AnetAPI\\CustomerPaymentProfileExType();\n $paymentprofile->setCustomerPaymentProfileId($customerPaymentProfileId);\n $paymentprofile->setPayment($paymentCreditCard);\t\n\n // Submit a UpdatePaymentProfileRequest\n $request = new AnetAPI\\UpdateCustomerPaymentProfileRequest();\n $request->setMerchantAuthentication($merchantAuthentication);\n $request->setCustomerProfileId($customerProfileId);\n $request->setPaymentProfile( $paymentprofile );\n\n $controller = new AnetController\\UpdateCustomerPaymentProfileController($request);\n $response = $controller->executeWithApiResponse(\\net\\authorize\\api\\constants\\ANetEnvironment::PRODUCTION);\n // $response = $controller->executeWithApiResponse( \\net\\authorize\\api\\constants\\ANetEnvironment::SANDBOX);\n if (($response != null) && ($response->getMessages()->getResultCode() == \"Ok\") )\n {\n $payment_method['card_name'] = $card_details['card_name'];\n $payment_method['card_number'] = substr($card_details['card_number'], -4);\n $payment_method['expiry'] = $card_details['expiry'];\n $payment_method['is_validated'] = 1;\n $payment_method['updated_at'] = date('Y-m-d H:i:s');\n\n $this->db->update('payment_methods', $payment_method, ['customer_profile_id' => $customerProfileId]);\n return true;\n }\n else if ($response != null)\n {\n $errorMessages = $response->getMessages()->getMessage();\n return \"Failed to Update Customer Payment Profile : \" . $errorMessages[0]->getCode() . \" \" .$errorMessages[0]->getText();\n }\n } else if (is_null($response) && !isset($errorMessages)){\n\t\t\treturn \"Sandbox and production mode confilct\";\n\t\t} else {\n return \"Failed to Get Customer Payment Profile : \" . $errorMessages[0]->getCode() . \" \" .$errorMessages[0]->getText();\n }\n\n }",
"private function p_save($data)\n\t{\n\t\t// data must be already sanitized through the form array\n\t\t$this->db->where('user_id', $data['user_id'])->update('profiles', $data);\n\t}",
"protected function initializeBenefit ()\n {\n if ( !isset($this->request->coupon_benefits[ $this->offerNature ]) )\n $this->request->coupon_benefits[ $this->offerNature ] = 0;\n }",
"public function applyProfile(string $profile): void\n {\n ConfigProfiles::getInstance()->checkProfiles($profile, $this);\n }",
"public function syncCoupon(): void\n {\n $stripeCoupon = $this->asStripeCoupon();\n\n $this->valid = $stripeCoupon->valid;\n\n $this->times_redeemed = $stripeCoupon->times_redeemed;\n\n $this->save();\n }",
"public function updateProfile($data) {\n $this->db->query(\"UPDATE \" . DB_PREFIX . \"wkpos_user SET firstname = '\" . $data['firstname'] . \"', lastname = '\" . $data['lastname'] . \"', email = '\" . $data['account_email'] . \"', username = '\" . $data['username'] . \"', salt = '\" . $this->db->escape($salt = token(9)) . \"', password = '\" . $this->db->escape(sha1($salt . sha1($salt . sha1($data['account_npwd'])))) . \"' WHERE user_id = '\" . $this->session->data['user_login_id'] . \"'\");\n }",
"function update_couponCode(){\n\t\t\tprint_r($this->input->post());\n\t\t}",
"public function setProfileEmail($newProfileEmail) : void {\n\t\t$this->profileEmail = $newProfileEmail;\n\t}",
"public function setMiniProfile( $oView ) {\n\t\t$this->oMiniProfile = $oView;\n\t}",
"public function testCreateCustomerProfile_multiplePaymentProfilesAndSucceeds()\n {\n $ccOptions = array('type' => 'visa',\n 'number' => '3234567890123',\n 'month' => 09,\n 'year' => 2009,\n 'card_code' => 388,\n 'first_name' => 'tom',\n 'last_name' => 'yevlekcm');\n\n $payProfile = new Mercantile_Gateways_AuthNetCim_PaymentProfile();\n\n $payProfile->setPayment(new Mercantile_Billing_CreditCard($ccOptions));\n\n $options = array('description' => (string)randStr());\n \n $cusProfile = new Mercantile_Gateways_AuthNetCim_CustomerProfile($options); \n\n $cusProfile->addPaymentProfile($payProfile);\n\n $ccOptions = array('type' => 'visa',\n 'number' => '1234567890123',\n 'month' => 09,\n 'year' => 2009,\n 'card_code' => 388,\n 'first_name' => 'tom',\n 'last_name' => 'yevlekcm');\n\n $payProfile = new Mercantile_Gateways_AuthNetCim_PaymentProfile();\n\n $payProfile->setPayment(new Mercantile_Billing_CreditCard($ccOptions));\n\n $cusProfile->addPaymentProfile($payProfile);\n\n $response = $this->gateway->createCustomerProfile($cusProfile);\n\n $this->customerProfileId = $response->getCustomerProfileId();\n\n $this->assertTrue($response->isSuccess());\n }",
"public function update(Request $request, Coupon $coupon)\n {\n //\n }",
"public function update(Request $request, Coupon $coupon)\n {\n //\n }",
"public function update(Request $request, Coupon $coupon)\n {\n //\n }",
"public function update(Request $request, Coupon $coupon)\n {\n //\n }",
"private function setPremiumCode(){\n for($i = 0; $i < 7; $i++) {\n $this->premiumCode .= rand(1,9);\n };\n $this->discount = 10;\n }",
"public static function profile($profile){\n $pro = Profile::where('user_id',Auth::id())->first();\n if ($pro){\n $pro->update($profile);\n }else{\n Profile::create($profile);\n }\n }",
"function updateProfile($mysqli,$profile){\r\n $query = \"UPDATE `profiles` SET FirstName = '\".$profile->firstName.\"', LastName = '\".$profile->lastName.\"', Gender = '\".$profile->gender.\"', Birthday = '\".$profile->birthday.\"', Weight = '\".$profile->weight.\"', \r\n Height = '\".$profile->height.\"', Bio = '\".$profile->bio.\"', Prof_Pic_URL = '\".$profile->profPicURL.\"' WHERE UserID = \".$profile->userID;\r\n $mysqli->query($query);\r\n }",
"public function setPostbackProfiles(array $postback_profiles)\n {\n $this->postback_profiles = $postback_profiles;\n\n return $this;\n }",
"public function get_reference_profiles($client_id = NULL) {\n try {\n $client_id = $client_id ? $client_id : $this->id;\n $DB = new \\dumbu\\cls\\DB();\n $ref_profs_data = $DB->get_reference_profiles_data($client_id);\n while ($prof_data = $ref_profs_data->fetch_object()) {\n $Ref_Prof = new \\dumbu\\cls\\Reference_profile();\n //print_r($prof_data);\n // Update Ref Prof Data if not privated\n if ($Ref_Prof->is_private($prof_data->insta_name) === FALSE) {\n $Ref_Prof->id = $prof_data->id;\n $Ref_Prof->insta_id = $prof_data->insta_id;\n $Ref_Prof->insta_name = $prof_data->insta_name;\n $Ref_Prof->insta_follower_cursor = $prof_data->insta_follower_cursor;\n array_push($this->reference_profiles, $Ref_Prof);\n }\n }\n } catch (Exception $exc) {\n echo $exc->getTraceAsString();\n }\n }",
"protected abstract function applyCoupon($coupon_code);",
"public function __construct(Coupon $coupon)\n {\n $this->coupon = $coupon;\n }",
"public function update_customer_profile($host_obj, $customer, $data)\n\t\t{\n\t\t\t/* This method is never called in the transparent redirect scenario */\n\t\t}",
"public function executeProfile($request)\n {\n $this->_checkAuth();\n $profile = new Profile();\n $this->configTypes = $profile->configTypeDefault();\n $this->platformNames = $profile->platformNameDefault();\n \n $configRep = new ConfigRepository();\n $this->platform_config = $configRep->getProfileByPlatform();\n $this->iOSpasscodeSetting = $configRep->getiOSPasscodeSetting();\n $this->profilePasscodeTooltip = $this->notificationMsg['tooltip'];\n $this->locationWarning = $this->notificationMsg['N9001'];\n $this->confirm = $this->confirmMsg;\n }",
"public function setAccountCode($value);",
"public static function send_profile_data() {\n\t\tif ( 'yes' !== get_option( 'woocommerce_allow_tracking', 'no' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! class_exists( '\\WC_Helper_API' ) || ! method_exists( '\\WC_Helper_API', 'put' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! class_exists( '\\WC_Helper_Options' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$auth = \\WC_Helper_Options::get( 'auth' );\n\t\tif ( empty( $auth['access_token'] ) || empty( $auth['access_token_secret'] ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$profile = get_option( self::PROFILE_DATA_OPTION, array() );\n\t\t$base_location = wc_get_base_location();\n\t\t$defaults = array(\n\t\t\t'plugins' => 'skipped',\n\t\t\t'industry' => array(),\n\t\t\t'product_types' => array(),\n\t\t\t'product_count' => '0',\n\t\t\t'selling_venues' => 'no',\n\t\t\t'revenue' => 'none',\n\t\t\t'other_platform' => 'none',\n\t\t\t'business_extensions' => array(),\n\t\t\t'theme' => get_stylesheet(),\n\t\t\t'setup_client' => false,\n\t\t\t'store_location' => $base_location['country'],\n\t\t\t'default_currency' => get_woocommerce_currency(),\n\t\t);\n\n\t\t// Prepare industries as an array of slugs if they are in array format.\n\t\tif ( isset( $profile['industry'] ) && is_array( $profile['industry'] ) ) {\n\t\t\t$industry_slugs = array();\n\t\t\tforeach ( $profile['industry'] as $industry ) {\n\t\t\t\t$industry_slugs[] = is_array( $industry ) ? $industry['slug'] : $industry;\n\t\t\t}\n\t\t\t$profile['industry'] = $industry_slugs;\n\t\t}\n\t\t$body = wp_parse_args( $profile, $defaults );\n\n\t\t\\WC_Helper_API::put(\n\t\t\t'profile',\n\t\t\tarray(\n\t\t\t\t'authenticated' => true,\n\t\t\t\t'body' => wp_json_encode( $body ),\n\t\t\t\t'headers' => array(\n\t\t\t\t\t'Content-Type' => 'application/json',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t}",
"public function setProfileId($newProfileId) {\n\t\t$newProfileId = filter_var($newProfileId, FILTER_VALIDATE_INT);\n\t\t//if filter_var rejects the variable, throw an exception\n\t\tif($newProfileId === false) {\n\t\t\tthrow(new InvalidArgumentException(\"Profile Id is not a proper int\"));\n\t\t}\n\t\t//If $newProfileId is out of range, throw an exception.\n\t\tif($newProfileId <= 0) {\n\t\t\tthrow(new RangeException(\"Profile ID must be positive\"));\n\t\t}\n\t\t$this->profileId = $newProfileId;\n\t}",
"public function store_discount_affiliate_new( $coupon_object ) {\n\n\t\t$coupon_id = $coupon_object->getId();\n\n\t\tif ( empty( $_POST['user_name'] ) ) {\n\t\t\tdelete_post_meta( $coupon_id, 'affwp_discount_affiliate' );\n\t\t\treturn;\n\t\t}\n\n\t\tif ( empty( $_POST['user_id'] ) && empty( $_POST['user_name'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$data = affiliate_wp()->utils->process_request_data( $_POST, 'user_name' );\n\n\t\t$affiliate_id = affwp_get_affiliate_id( $data['user_id'] );\n\n\t\tupdate_post_meta( $coupon_id, 'affwp_discount_affiliate', $affiliate_id );\n\n\t}",
"private function buildPaymentProfile($customer_payment_profile_id)\n {\n\n $this->paymentProfile = new PaymentProfileType();\n\n $this->paymentProfile->setpaymentProfileId($customer_payment_profile_id);\n }",
"private function saveCoupon($coupon, $type)\n {\n if ($type == 'coupon') {\n if (isset($coupon['length'])) {\n unset($coupon['length']);\n }\n if (isset($coupon['prefix'])) {\n unset($coupon['prefix']);\n }\n if (isset($coupon['symbols'])) {\n unset($coupon['symbols']);\n }\n }\n $coupon['type'] = $type;\n return $this->coupon_model->save($coupon);\n }",
"public function update(Request $request, Coupon $coupon)\n {\n $this->validateWith([\n 'couponCode' => 'required|alpha_num',\n 'type' => 'required',\n 'discountPrice' => 'required',\n 'minPrice' => 'required'\n ]);\n\n $coupon->couponCode = $request->couponCode;\n $coupon->type = $request->type;\n $data->discountPrice = $request->discountPrice;\n $coupon->minPrice = $request->minPrice;\n\n $coupon->save();\n\n Session::flash('success', 'Succesfully updated.');\n\n return redirect()->route('coupons.index');\n }",
"function save_code( $coupon_get_id ) {\n\t$freeproductid = $_POST['freeproduct'];\n\tupdate_post_meta( $coupon_get_id, 'freeproductid', $freeproductid );\n}",
"public function applyCouponAction()\n {\n if (!$this->_isActive()) {\n $this->norouteAction();\n return;\n }\n\n $isRemove = (bool)$this->getRequest()->getParam('remove', false);\n $coupon = $this->getRequest()->getParam('coupon');\n if ($isRemove) {\n $coupon = null;\n }\n\n $result = $this->getOnepage()->saveCouponCode($coupon);\n\n $this->_addHashInfo($result);\n $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));\n }",
"public function setupProfile(SetupCustomerProfileRequest $request) {\n $input = $request->all();\n $response = UserServiceProvider::setupCustomerProfile($input);\n return $this->sendJsonResponse($response);\n }",
"public function update(Request $request, $id)\n {\n // if(count(Coupon::where('id', '!=' , $id)->where('code', $request->coupon_code)->get()) > 0){\n // flash(translate('Coupon already exist for this coupon code'))->error();\n // return back();\n // }\n\n // $coupon = Coupon::findOrFail($id);\n // if ($request->coupon_type == \"product_base\") {\n // $coupon->type = $request->coupon_type;\n // $coupon->code = $request->coupon_code;\n // $coupon->discount = $request->discount;\n // $coupon->discount_type = $request->discount_type;\n // $date_var = explode(\" - \", $request->date_range);\n // $coupon->start_date = strtotime($date_var[0]);\n // $coupon->end_date = strtotime( $date_var[1]);\n // $cupon_details = array();\n // foreach($request->product_ids as $product_id) {\n // $data['product_id'] = $product_id;\n // array_push($cupon_details, $data);\n // }\n // $coupon->details = json_encode($cupon_details);\n // if ($coupon->save()) {\n // flash(translate('Coupon has been saved successfully'))->success();\n // return redirect()->route('coupon.index');\n // }\n // else{\n // flash(translate('Something went wrong'))->danger();\n // return back();\n // }\n // }\n // elseif ($request->coupon_type == \"cart_base\") {\n // $coupon->type = $request->coupon_type;\n // $coupon->code = $request->coupon_code;\n // $coupon->discount = $request->discount;\n // $coupon->discount_type = $request->discount_type;\n // $date_var = explode(\" - \", $request->date_range);\n // $coupon->start_date = strtotime($date_var[0]);\n // $coupon->end_date = strtotime( $date_var[1]);\n // $data = array();\n // $data['min_buy'] = $request->min_buy;\n // $data['max_discount'] = $request->max_discount;\n // $coupon->details = json_encode($data);\n // if ($coupon->save()) {\n // flash(translate('Coupon has been saved successfully'))->success();\n // return redirect()->route('coupon.index');\n // }\n // else{\n // flash(translate('Something went wrong'))->danger();\n // return back();\n // }\n // }\n }",
"function setProfileId(int $newProfileId = null) {\n\tif($newProfileId <= 0) {\n\t\tthrow(new \\RangeException(\"profile id is not positive\"));\n\t}\n\t// convert and store this profile id\n\t$this->profileId = $newProfileId;\n}",
"private function load(){\n\t\tglobal $TBL_ecommerce_coupon;\n\t\t$link = dbConnect();\n\t\t$request = request(\"SELECT * FROM `$TBL_ecommerce_coupon` WHERE `code`='$this->code'\",$link);\n\t\tmysql_close($link);\n\t\tif(!mysql_num_rows($request)) {\n\t\t\treturn;\n\t\t}\n\t\t$coupon = mysql_fetch_object($request);\n\t\t$this->id=$coupon->id;\n\t\t$this->code=$coupon->code;\n\t\t$this->idClient=$coupon->id_client;\n\t\t$this->type=$coupon->type;\n\t\t$this->value=$coupon->value;\n\t\t$this->percentage=$coupon->percentage;\n\t\t$this->grid=EcommerceCoupon::parseGrid($coupon->grid);\n\t\t$this->usage = $coupon->usage;\n\t\t$this->maxUsage = $coupon->max_usage;\n\t\t$this->usageCount = $coupon->usage_count;\n\t\t$this->validFrom = $coupon->valid_from;\n\t\t$this->validUntil = $coupon->valid_until;\n\n\t\t$this->getStatus();\n\t}",
"public function execute(\\Magento\\Framework\\Event\\Observer $observer)\n {\n $this->payPalPlusHelper->resetWebProfileId();\n }",
"public function setProfileId($newProfileId) {\n\t\t// base case if the profile id is null this a new tweet without a mySQL assigned id (yet)\n\t\tif ($newProfileId === null){\n\t\t\t$this->profileId = null;\n\t\t\treturn;\n\t\t}\n\t\t// verify profile id\n\t\t$newProfileId = filter_var($newProfileId, FILTER_VALIDATE_INT);\n\t\t//if filter_var()frejects the new id throw an Exception\n\t\tif($newProfileId === false) {\n\t\t\tthrow(new InvalidArgumentException(\"profile id is not an integer punk\"));\n\t\t}\n\t\tif($newProfileId <= 0) {\n\t\t\tthrow(new RangeException(\"proflie id must be positive fool\"));\n\t\t}\n\t\t// saving to object\n\t\t$this->email = $newProfileId;\n\t}",
"public function update(StoreCouponsRequest $request, Coupon $coupon)\n {\n //\n $coupon->code = $request->code;\n $coupon->expirationdate = $request->expirationdate;\n $coupon->discount = $request->discount;\n\n $coupon->save();\n\n return redirect()->route('coupons.index')->with('message', 'Coupon geupdate');\n }",
"function classiera_save_extra_profile_fields( $user_id ) {\r\n\tupdate_user_meta( $user_id, 'price_plan' );\r\n\tadd_user_meta( $user_id, 'price_plan_id' );\r\n}",
"private function _save_values( $user_id, $profile_id, $count, $type ) {\n $social_value = Social_value::inst();\n $where = array(\n 'user_id' => $user_id,\n 'profile_id' => $profile_id,\n 'date' => date('Y-m-d'),\n 'type' => $type\n );\n $social_value = $social_value->where($where)->get();\n $social_value->user_id = (int)$user_id;\n $social_value->profile_id = (int)$profile_id;\n $social_value->date = date('Y-m-d');\n $social_value->value = $count;\n $social_value->type = $type;\n $social_value->save();\n }",
"public function save_applied_coupon_in_cookie( $coupons_args = array() ) {\n\n\t\t\t$saved_status = array(); // Variable to store whether coupons saved/already saved in cookie.\n\n\t\t\tif ( ! empty( $coupons_args ) ) {\n\n\t\t\t\tif ( empty( $_COOKIE['sc_applied_coupon_profile_id'] ) ) {\n\t\t\t\t\t$unique_id = $this->generate_unique_id();\n\t\t\t\t} else {\n\t\t\t\t\t$unique_id = wc_clean( wp_unslash( $_COOKIE['sc_applied_coupon_profile_id'] ) ); // phpcs:ignore\n\t\t\t\t}\n\n\t\t\t\t$applied_coupons = get_option( 'sc_applied_coupon_profile_' . $unique_id, array() );\n\n\t\t\t\tforeach ( $coupons_args as $coupon_args ) {\n\t\t\t\t\t$coupon_code = isset( $coupon_args['coupon-code'] ) ? $coupon_args['coupon-code'] : '';\n\t\t\t\t\tif ( ! in_array( $coupon_code, $applied_coupons, true ) ) {\n\t\t\t\t\t\t$applied_coupons[] = $coupon_code;\n\t\t\t\t\t\t$saved_status[ $coupon_code ] = 'saved';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$saved_status[ $coupon_code ] = 'already_saved';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tupdate_option( 'sc_applied_coupon_profile_' . $unique_id, $applied_coupons, 'no' );\n\t\t\t\twc_setcookie( 'sc_applied_coupon_profile_id', $unique_id, $this->get_cookie_life() );\n\t\t\t}\n\n\t\t\treturn $saved_status;\n\n\t\t}",
"function setProfilePicture($a_status)\n\t{\n\t\t$this->ppic = (bool)$a_status;\n\t}",
"public function setProfilePictureFile(File $profile_picture_file)\n {\n $this->profile_picture_file = $profile_picture_file;\n\n // Only change the updated af if the file is really uploaded to avoid database updates.\n // This is needed when the file should be set when loading the entity.\n if ($this->profile_picture_file instanceof UploadedFile) {\n $this->setUpdateAt(new Carbon());\n }\n\n return $this;\n }",
"public function setCertificateProfileDisplayName(?string $value): void {\n $this->getBackingStore()->set('certificateProfileDisplayName', $value);\n }",
"public function setAutomaticUserConsentSettings(?InboundOutboundPolicyConfiguration $value): void {\n $this->getBackingStore()->set('automaticUserConsentSettings', $value);\n }",
"private function updateProfileImage($cleaned) {\n\t\t$value = $cleaned['profileImage'];\n\t\t$purify = Utils::purify($value);\t\t\n\t\tif ($purify == $value && @getImageSize($purify) != false) {\n\t\t\t$this -> user-> setData(\"profileImage\", $value);\n\t\t\t$this -> user-> write();\n\t\t\techo \"SUCCESS \". $purify;\n\t\t\treturn;\n\t\t} \n\t\techo \"Sorry, that image URL is invalid.\";\n\t}",
"public function testCreateCustomerProfile()\n {\n $options = array('description' => (string)randStr());\n\n $cusProfile = new Mercantile_Gateways_AuthNetCim_CustomerProfile($options);\n\n $response = $this->gateway->createCustomerProfile($cusProfile);\n\n $this->customerProfileId = $response->getCustomerProfileId();\n\n $this->assertTrue($response->isSuccess());\n }"
] | [
"0.6272754",
"0.6066336",
"0.5926924",
"0.5885133",
"0.5826973",
"0.5697054",
"0.5587995",
"0.55742896",
"0.5558009",
"0.5551863",
"0.553692",
"0.5517464",
"0.55090725",
"0.5478162",
"0.54485506",
"0.5390142",
"0.5369571",
"0.5357371",
"0.5312586",
"0.525024",
"0.52275187",
"0.5225825",
"0.52211297",
"0.52020454",
"0.51964396",
"0.5174728",
"0.5170984",
"0.5131725",
"0.5108979",
"0.51076555",
"0.509407",
"0.509283",
"0.50755507",
"0.5039526",
"0.50238055",
"0.49996915",
"0.49979025",
"0.49979025",
"0.4984699",
"0.49739772",
"0.4953663",
"0.49448034",
"0.4925826",
"0.49206218",
"0.49123716",
"0.48946157",
"0.48856634",
"0.4879202",
"0.4874661",
"0.4869847",
"0.48650002",
"0.48638976",
"0.48512053",
"0.48497257",
"0.48457712",
"0.48353097",
"0.48337558",
"0.48241603",
"0.48235786",
"0.48213336",
"0.4813437",
"0.48123562",
"0.48123404",
"0.48123404",
"0.48123404",
"0.48123404",
"0.48049638",
"0.48049384",
"0.4804403",
"0.4795006",
"0.4786812",
"0.47715074",
"0.47650293",
"0.4751721",
"0.47416884",
"0.47416523",
"0.47331968",
"0.4721216",
"0.47142574",
"0.47132546",
"0.47130772",
"0.47063592",
"0.46979582",
"0.46864048",
"0.46844876",
"0.46784478",
"0.467595",
"0.46685433",
"0.46666217",
"0.46556863",
"0.46463898",
"0.46291143",
"0.46240094",
"0.46220043",
"0.4616767",
"0.46163094",
"0.46114898",
"0.46056268",
"0.46042493",
"0.45990658"
] | 0.66583765 | 0 |
Get the value of postback_profiles | public function getPostbackProfiles()
{
return $this->postback_profiles;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getProfile()\n {\n return $this->getFieldValue(self::FIELD_PROFILE);\n }",
"public static function GetProfilesValues()\n\t{\n\t\treturn self::$aPROFILES;\n\t}",
"public function getProfile() {\n\t\treturn $this->profile;\n\t}",
"public function getProfile()\n {\n return $this->profile;\n }",
"public function getProfile()\n {\n return $this->profile;\n }",
"public function getProfile()\n {\n return $this->profile;\n }",
"public function getProfileType()\n {\n return $this->profile_type;\n }",
"public function profile() {\n return $this->profile;\n }",
"public function getPostProfileUserName() {\n\t\treturn ($this->postProfileUserName);\n\t}",
"public function GetProfile()\n {\n return $this->profile;\n }",
"function getProfileName() {\n\t\treturn $this->_ProfileName;\n\t}",
"function getProfileID() {\n\t\treturn $this->_ProfileID;\n\t}",
"public function getProfileType() {\n\t\treturn ($this->profileType);\n\t}",
"public function controlProfile(){\n\t\t$profilePage = \\Utility\\Singleton::getInstance('\\View\\Main');\n\t\t$data=\"\";\n\t\t\n\t\tswitch($profilePage->get('profileAction'))\n\t\t{\t\n\t\t\tcase 'hasAlreadyVoted':\n\t\t\t\t$data=$this->hasVoted();\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'getProfilePage':\n\t\t\t\t$data=$this->setProfileInformation();\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'rateUser':\n\t\t\t\t$data=$this->rateUser();\n\t\t\t\tbreak;\n\n\t\t}\n\t\n\t\treturn $data;\n\t\t\n\t}",
"public function getProfileId()\n {\n return $this->profile_id;\n }",
"public function getProfilesToShow()\n\t{\n\t\treturn $this->profilesToShow;\n\t}",
"public function getProfileId() {\n\t\treturn ($this->profileId);\n\t}",
"public function getProfileId() {\n\t\treturn ($this->profileId);\n\t}",
"public function getProfileName() {\n\t\treturn ($this->profileName);\n\t}",
"public function getProfileName()\n\t\t{\n\t\t return $this->profileName;\n\t\t}",
"public function getProfileId() {\n\t\treturn($this->profileId);\n\t}",
"public function getProfileId() {\n\t\treturn $this->profileId;\n\t}",
"public function getProfileId() \n {\n if (!$this->hasProfileId()) \n {\n $this->profileId = '';\n }\n\n return $this->profileId;\n }",
"public function getProfilePicture()\n\t{\n\t\treturn $this->info['profile_picture'];\n\t}",
"public function getOneClickApplyProfiles();",
"public function getProfileHash() {\n\t\treturn ($this->profileHash);\n\t}",
"public function getProfileId() : Uuid {\n\t\treturn ($this->profileId);\n\t}",
"function profile_info() {\n $parameters = array(\n 'method' => __FUNCTION__\n );\n return $this->get_data($parameters);\n }",
"public function getProfileUrl()\n {\n return $this->ProfileUrl;\n }",
"public function getReturnProfiles()\n {\n return $this->return_profiles;\n }",
"function getProfile(){\n $profile = $this->loadUser();\n return $profile;\n }",
"public function getProfileUrl()\n\t\t{\n\t\t return $this->profileUrl;\n\t\t}",
"public function getProfile()\n {\n return $this->request('me');\n }",
"public function getUserProfileName(): string {\n\t\treturn ($this->userProfileName);\n\t}",
"function theme_haarlem_intranet_get_profile_manager_profile_field($metadata_name) {\n\tstatic $fields;\n\t\n\tif (!isset($fields)) {\n\t\t$fields = array();\n\t\t\n\t\tif (elgg_is_active_plugin('profile_manager')) {\n\t\t\t$site = elgg_get_site_entity();\n\t\t\t\n\t\t\t$options = array(\n\t\t\t\t'type' => 'object',\n\t\t\t\t'subtype' => ProfileManagerCustomProfileField::SUBTYPE,\n\t\t\t\t'limit' => false,\n\t\t\t\t'owner_guid' => $site->getGUID(),\n\t\t\t\t'site_guid' => $site->getGUID()\n\t\t\t);\n\t\t\t$profile_fields = elgg_get_entities($options);\n\t\t\tif (!empty($profile_fields)) {\n\t\t\t\tforeach ($profile_fields as $profile_field) {\n\t\t\t\t\t$fields[$profile_field->metadata_name] = $profile_field;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn elgg_extract($metadata_name, $fields, false);\n}",
"public function getProfileImageProfileId() {\n\t\treturn($this->profileImageProfileId);\n\t}",
"public function getProfileBytes()\n {\n return $this->profile_bytes;\n }",
"public function getProfile()\r\n {\r\n return $this->getGuardUser() ? $this->getGuardUser()->getProfile() : null;\r\n }",
"public function getProfileEmail() {\n\t\treturn ($this->profileEmail);\n\t}",
"public function getProfiles()\n {\n return $this->profiles;\n }",
"public function getProfileActivationToken() {\n\t\treturn ($this->profileActivationToken);\n\t}",
"public function getProfileHash() : string {\n\t\treturn $this->profileHash;\n\t}",
"public function getProfilePicture()\n {\n return $this->profilePicture;\n }",
"public function getUserProfile();",
"public function getProfile() {\n return $this->getGuardUser() ? $this->getGuardUser()->getProfile() : null;\n }",
"public function woo_slg_get_google_user_data() {\n\t\t\t\n\t\t\t$user_profile_data = '';\n\t\t\t\n\t\t\t$user_profile_data = isset( $_SESSION['woo_slg_google_user_cache'] ) ? $_SESSION['woo_slg_google_user_cache'] : '';\n\t\t\treturn $user_profile_data;\n\t\t}",
"public function getProfileImg()\n {\n return $this->profile_img;\n }",
"public function getPostVariables();",
"private function getProfileId()\n {\n $identity = $this->getIdentity();\n \n return $identity !== null && $identity->getCurrentProfile() ? $identity->getCurrentProfile()->profile_id : null;\n }",
"public function getUserProfileId() {\n return($this->userProfileId); \n }",
"abstract public function get_posted_value();",
"public function getManageProfile() {\n\t\treturn $this->manageProfile;\n\t}",
"public function getProf(){\n return $this->prof;\n }",
"public function profileDetails()\n {\n $processReaction = $this->userEngine->prepareProfileDetails();\n\n return __processResponse($processReaction, [], null, true);\n }",
"public function setProfileInformation()\n {\n $view = \\Utility\\Singleton::getInstance(\"\\View\\Main\");\n\t\t$username=$view->get('userProfile');\n\t\t$this->getUserInformations($view,$username);\n\t\t$this->setResourcesUploaded($view,$username);\n\t\treturn $view->fetch('profile.tpl');\n\t}",
"public function getSavedJobProfileId(): string {\n\t\treturn ($this->savedJobProfileId);\n\t}",
"public function getProfileId(): ?int {\n\t\treturn ($this->profileId);\n\t}",
"public function getProfileDefault()\n {\n return $this->getConfig('packages/global_settings_default-profile');\n }",
"public function getProfileEmail(): string {\n\t\treturn $this->profileEmail;\n\t}",
"public static function edit_profile() {\n\t\twp_enqueue_media();\n\t\twp_enqueue_script( 'ur-my-account' );\n\n\t\t$user_id = get_current_user_id();\n\t\t$form_id = ur_get_form_id_by_userid( $user_id );\n\n\t\t$profile = user_registration_form_data( $user_id, $form_id );\n\n\t\t$user_data = get_userdata( $user_id );\n\t\t$user_data = $user_data->data;\n\n\t\t$form_data_array = ( $form_id ) ? UR()->form->get_form( $form_id, array( 'content_only' => true ) ) : array();\n\n\t\tif ( ! empty( $form_data_array ) ) {\n\n\t\t\tif ( count( $profile ) < 1 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Prepare values.\n\t\t\tforeach ( $profile as $key => $field ) {\n\t\t\t\t$value = get_user_meta( get_current_user_id(), $key, true );\n\t\t\t\t$profile[ $key ]['value'] = apply_filters( 'user_registration_my_account_edit_profile_field_value', $value, $key );\n\t\t\t\t$new_key = str_replace( 'user_registration_', '', $key );\n\n\t\t\t\tif ( in_array( $new_key, ur_get_registered_user_meta_fields() ) ) {\n\t\t\t\t\t$value = get_user_meta( get_current_user_id(), ( str_replace( 'user_', '', $new_key ) ), true );\n\t\t\t\t\t$profile[ $key ]['value'] = apply_filters( 'user_registration_my_account_edit_profile_field_value', $value, $key );\n\t\t\t\t} elseif ( isset( $user_data->$new_key ) && in_array( $new_key, ur_get_user_table_fields() ) ) {\n\t\t\t\t\t$profile[ $key ]['value'] = apply_filters( 'user_registration_my_account_edit_profile_field_value', $user_data->$new_key, $key );\n\n\t\t\t\t} elseif ( isset( $user_data->display_name ) && 'user_registration_display_name' === $key ) {\n\t\t\t\t\t$profile[ $key ]['value'] = apply_filters( 'user_registration_my_account_edit_profile_field_value', $user_data->display_name, $key );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tur_get_template(\n\t\t\t\t'myaccount/form-edit-profile.php',\n\t\t\t\tarray(\n\t\t\t\t\t'profile' => apply_filters( 'user_registration_profile_to_edit', $profile ),\n\t\t\t\t\t'form_data_array' => $form_data_array,\n\t\t\t\t)\n\t\t\t);\n\t\t} else {\n\t\t\techo '<h1>' . esc_html__( 'No profile details found.', 'user-registration' ) . '</h1>';\n\t\t}\n\t}",
"public function getProfileImg()\n {\n return $this->profileImg;\n }",
"function ds_get_social_profiles() {\n\n // Return a filterable social profile.\n return apply_filters(\n 'ds_social_profiles',\n array()\n );\n \n}",
"public function getProfile()\n {\n $res = $this->getEntity()->getProfile();\n\t\tif($res === null)\n\t\t{\n\t\t\t$this->setProfile(SDIS62_Model_DAO_Abstract::getInstance($this::$type_objet)->findByCriteria('Profile', array('primary' => $this::getPrimary())));\n\t\t\treturn $this->getEntity()->getProfile();\n\t\t}\n return $res;\n }",
"public function get_profile($user_profile_data){\n\t\t$user_name = $_SESSION['username'];\n\t\t// get user id for the logged in user\n\t\t$user_id = Database::user_id_query($user_name);\n\t\t//call static fucntion to get contents of user profile\n\t\t$user_profile_data = UserProfileHelper::get_user_profile($user_id);\n\t\treturn $user_profile_data;\n\t}",
"public function getProfileActivationToken() : string {\n\t\treturn $this->profileActivationToken;\n\t}",
"public function getProfileEmail() : string {\n\t\treturn $this->profileEmail;\n\t}",
"public function get_profil()\n {\n return $this->_profil;\n }",
"public function getProfileResult($token){\n\t\treturn $this->_profiles[$token];\n\t}",
"public function process()\n {\n $oProfilePopup = Phpfox::getService('profilepopup');\n $oProfilePopupProcess = Phpfox::getService('profilepopup.process');\n\n $oProfilePopupProcess->synchronizeAllCustomFieldInSystem();\n $aAllItems = $oProfilePopup->getAllItems(1);\n $iLen = count($aAllItems);\n\n for ($idx = 0; $idx < $iLen; $idx++)\n {\n $aAllItems[$idx]['checked'] = '';\n $aAllItems[$idx]['lang_name'] = '';\n if (intval($aAllItems[$idx]['is_active']) == 1 && intval($aAllItems[$idx]['is_display']) == 1)\n {\n $aAllItems[$idx]['checked'] = 'checked';\n }\n\n if (intval($aAllItems[$idx]['is_custom_field']) == 1)\n {\n $aAllItems[$idx]['lang_name'] = Phpfox::getPhrase($aAllItems[$idx]['phrase_var_name']);\n } else\n {\n $aAllItems[$idx]['lang_name'] = Phpfox::getPhrase('profilepopup.' . $aAllItems[$idx]['phrase_var_name']);\n }\n }\n\t\t\t\t\n\t\t\t\t//\tget resume fields\n\t\t\t\t$aResumeItems = $oProfilePopup->getItemsByModule(1, 'user', 'resume');\n\t\t\t\t$iResumeLen = count($aResumeItems);\n for ($idx = 0; $idx < $iResumeLen; $idx++)\n {\n $aResumeItems[$idx]['checked'] = '';\n $aResumeItems[$idx]['lang_name'] = '';\n if (intval($aResumeItems[$idx]['is_active']) == 1 && intval($aResumeItems[$idx]['is_display']) == 1)\n {\n $aResumeItems[$idx]['checked'] = 'checked';\n }\n\n if (intval($aResumeItems[$idx]['is_custom_field']) == 1)\n {\n $aResumeItems[$idx]['lang_name'] = Phpfox::getPhrase($aResumeItems[$idx]['phrase_var_name']);\n } else\n {\n $aResumeItems[$idx]['lang_name'] = Phpfox::getPhrase('profilepopup.' . $aResumeItems[$idx]['phrase_var_name']);\n }\n }\n\n $this->template()->setTitle(Phpfox::getPhrase('profilepopup.user_global_settings'))\n ->setBreadcrumb(Phpfox::getPhrase('profilepopup.user_global_settings'), $this->url()->makeUrl('admincp.profilepopup.user'))\n ->assign(array(\n 'aAllItems' => $aAllItems\n , 'aResumeItems' => $aResumeItems\n )\n )\n ->setHeader('cache', array(\n 'quick_edit.js' => 'static_script'\n )\n );\n }",
"public function getUserProfileId() : Uuid{\n\t\treturn($this->userProfileId);\n\t}",
"public function getReturnPolicyProfileList()\n {\n return $this->returnPolicyProfileList;\n }",
"abstract protected function getUserProfile();",
"public function getProfilePictureFile()\n {\n return $this->profile_picture_file;\n }",
"public function getAllProfiles()\n {\n return self::$profiles;\n }",
"public function getVoteProfileId(): int {\n\t\treturn ($this->voteProfileId);\n\t}",
"public function getPostSubmission() {\n\t\treturn ($this->postSubmission);\n\t}",
"public function getProfileHandle(): string {\n\t\treturn ($this->profileHandle);\n\t}",
"function yz_profile() {\n\treturn Youzer_Profile::get_instance();\n}",
"public static function sql_user_admin_profile() {\n\t\tglobal $wpdb;\n\n\t\t$profile_user_fields = $wpdb->get_results( \"SELECT * FROM {$wpdb->base_prefix}pp_profile_fields\" );\n\n\t\treturn $profile_user_fields;\n\t}",
"public function profile(): string\n {\n if ($this->profile) {\n return $this->profile;\n }\n\n return $this->app['opx.profile'] ?? 'default';\n }",
"public function value()\n {\n if ($this->is_previewed) {\n $value = $this->post_value();\n } else {\n $mod = $this->getRealMod();\n $value = get_theme_mod($mod, false);\n }\n\n return $value;\n }",
"public function getSelectedItem()\n {\n $tab = intval($_REQUEST[\"tab\"]);\n $swagPostItems = $this->getSwagPostItems();\n return $swagPostItems[$tab];\n }",
"public function getUserProfileId(): Uuid {\n\t\treturn ($this->userProfileId);\n\t}",
"public function getShippingProfiles()\n {\n return $this->shipping_profiles;\n }",
"public function get_post_data() {\n\t\treturn $this->post;\n\t}",
"public function getProfileAccessToken() {\n\t\treturn ($this->profileAccessToken);\n\t}",
"function save_profile() {\n global $wpdb;\n\n // Get the current subscriber, fail if not found\n $user = $this->get_user_from_request(true);\n\n // Conatains the cleaned up user data to be saved\n $data = array();\n $data['id'] = $user->id;\n\n $options_profile = get_option('newsletter_profile', array());\n $options_main = get_option('newsletter_main', array());\n\n // Not an elegant interaction between modules but...\n $subscription_module = NewsletterSubscription::instance();\n\n if (!$this->is_email($_REQUEST['ne'])) {\n $user->alert = $this->options['profile_error'];\n return $user;\n }\n\n $email = $this->normalize_email(stripslashes($_REQUEST['ne']));\n $email_changed = ($email != $user->email);\n\n // If the email has been changed, check if it is available\n if ($email_changed) {\n $tmp = $this->get_user($email);\n if ($tmp != null && $tmp->id != $user->id) {\n // TODO: Move the label on profile setting panel\n $user->alert = $this->options['error'];\n return $user;\n }\n $data['status'] = Newsletter::STATUS_NOT_CONFIRMED;\n }\n\n // General data\n $data['email'] = $email;\n if (isset($_REQUEST['nn'])) {\n $data['name'] = $this->normalize_name(stripslashes($_REQUEST['nn']));\n if ($subscription_module->is_spam_text($data['name'])) {\n die();\n }\n }\n if (isset($_REQUEST['ns'])) {\n $data['surname'] = $this->normalize_name(stripslashes($_REQUEST['ns']));\n if ($subscription_module->is_spam_text($data['surname'])) {\n die();\n }\n }\n if ($options_profile['sex_status'] >= 1) {\n $data['sex'] = $_REQUEST['nx'][0];\n // Wrong data injection check\n if ($data['sex'] != 'm' && $data['sex'] != 'f' && $data['sex'] != 'n') {\n die('Wrong sex field');\n }\n }\n\n // Lists. If not list is present or there is no list to choose or all are unchecked.\n $nl = array();\n if (isset($_REQUEST['nl']) && is_array($_REQUEST['nl'])) {\n $nl = $_REQUEST['nl'];\n }\n\n // Every possible list shown in the profile must be processed\n $lists = $this->get_lists_for_profile();\n foreach ($lists as $list) {\n $field_name = 'list_' . $list->id;\n $data[$field_name] = in_array($list->id, $nl) ? 1 : 0;\n }\n\n // Profile\n for ($i = 1; $i <= NEWSLETTER_PROFILE_MAX; $i++) {\n // Private fields cannot be changed by the subscriber\n if ($options_profile['profile_' . $i . '_status'] == 0) {\n continue;\n }\n $data['profile_' . $i] = stripslashes($_REQUEST['np' . $i]);\n }\n\n\n // Feed by Mail service is saved here\n $data = apply_filters('newsletter_profile_save', $data);\n\n if ($user->status == TNP_User::STATUS_NOT_CONFIRMED) {\n $data['status'] = TNP_User::STATUS_CONFIRMED;\n }\n\n $user = $this->save_user($data);\n $this->add_user_log($user, 'profile');\n\n // Send the activation again only if we use double opt-in, otherwise it has no meaning\n // TODO: Maybe define a specific email for that and not the activation email\n if ($email_changed && $subscription_module->is_double_optin()) {\n $subscription_module->send_activation_email($user);\n // TODO: Move this option on new profile configuration panel\n $alert = $this->options['profile_email_changed'];\n }\n\n if (isset($alert)) {\n $user->alert = $alert;\n } else {\n // TODO: Move this label on profile settings panel\n $user->alert = $this->options['saved'];\n }\n return $user;\n }",
"public function getIdProf()\n {\n return $this->idProf;\n }",
"public function setPostbackProfiles(array $postback_profiles)\n {\n $this->postback_profiles = $postback_profiles;\n\n return $this;\n }",
"static function &getProfileFields()\n\t{\n\t\tinclude_once(\"./Services/User/classes/class.ilUserProfile.php\");\n\t\t$up = new ilUserProfile();\n\t\t$up->skipField(\"username\");\n\t\t$up->skipField(\"roles\");\n\t\t$up->skipGroup(\"preferences\");\n\t\t$fds = $up->getStandardFields();\n\t\tforeach ($fds as $k => $f)\n\t\t{\n\t\t\t$profile_fields[] = $k;\n\t\t}\n\n\t\treturn $profile_fields;\n\t}",
"public function getblogProfileId(): Uuid {\n\t\treturn ($this->blogProfileId);\n\t}",
"public function getProfileInfo()\n\t{\n\t\t$data = $this->get($this->_objectType . $this->_objectId);\n\t\treturn $data;\n\t\t$fields = array();\n\t\tforeach ($data as $fieldName => $fieldValue)\n\t\t{\n\t\t\t$fields[$fieldName] = $fieldValue;\n\t\t}\n\t\t$this->_fields = $fields;\n\t\treturn $this->_fields;\n\t}",
"public function getUserProfileHash(): string {\n\t\treturn ($this->userProfileHash);\n\t}",
"protected function getCurrentPageIdFromGetPostData() {}",
"function get_profile_fname($fname){\r\n\t\r\n}",
"public function profile($values)\n\t{\n\t\treturn $this->getRequest('Profile', $values);\n\t}",
"public function woo_slg_get_linkedin_user_data() {\n\t\t\t\n\t\t\t$user_profile_data = '';\n\t\t\t\n\t\t\t$user_profile_data = \\WSL\\Persistent\\WOOSLGPersistent::get('woo_slg_linkedin_user_cache');\n\t\t\t\n\t\t\t\\WSL\\Persistent\\WOOSLGPersistent::delete('woo_slg_linkedin_user_cache');\n\n\t\t\treturn $user_profile_data;\n\t\t}",
"protected function loadFormData(){\n // Check the session for previously entered form data.\n $data = JFactory::getApplication()->getUserState($this->option.'.edit.profile.data', array());\n \n if(empty($data)){\n $data = $this->getItem();\n }\n \n return $data;\n }",
"function at_follow_is_pro_user() {\n $isPro = false;\n $options = get_option('addthis_settings');\n $profile = $options['profile'];\n if ($profile) {\n $request = wp_remote_get( \"http://q.addthis.com/feeds/1.0/config.json?pubid=\" . $profile );\n $server_output = wp_remote_retrieve_body( $request );\n $array = json_decode($server_output);\n // check for pro user\n if (array_key_exists('_default',$array)) {\n $isPro = true;\n } else {\n $isPro = false;\n }\n }\n return $isPro;\n}",
"static function profiles() {\n global $LANG;\n\n $a_profil = array();\n $a_profil[] = array('profil' => 'agent',\n 'name' => $LANG['plugin_fusioninventory']['profile'][2]);\n $a_profil[] = array('profil' => 'remotecontrol',\n 'name' => $LANG['plugin_fusioninventory']['profile'][3]);\n $a_profil[] = array('profil' => 'configuration',\n 'name' => $LANG['plugin_fusioninventory']['profile'][4]);\n $a_profil[] = array('profil' => 'wol',\n 'name' => $LANG['plugin_fusioninventory']['profile'][5]);\n $a_profil[] = array('profil' => 'unknowndevice',\n 'name' => $LANG['plugin_fusioninventory']['profile'][6]);\n $a_profil[] = array('profil' => 'task',\n 'name' => $LANG['plugin_fusioninventory']['profile'][7]);\n\n return $a_profil;\n }"
] | [
"0.66234016",
"0.6343087",
"0.61335546",
"0.60755986",
"0.60755986",
"0.60755986",
"0.6033517",
"0.60306144",
"0.60228944",
"0.5992966",
"0.5988742",
"0.5933398",
"0.5917927",
"0.59088445",
"0.5883375",
"0.58692276",
"0.5833819",
"0.5833819",
"0.5825711",
"0.57548976",
"0.5738838",
"0.5721221",
"0.5706955",
"0.56581503",
"0.561557",
"0.5589054",
"0.5557256",
"0.55463064",
"0.5531873",
"0.549319",
"0.54683006",
"0.54467",
"0.54314274",
"0.5429741",
"0.5425029",
"0.5423728",
"0.541631",
"0.5401239",
"0.5379101",
"0.53789294",
"0.5370943",
"0.5354556",
"0.5344552",
"0.5338861",
"0.5331454",
"0.5326353",
"0.5325773",
"0.53132623",
"0.5291116",
"0.5290949",
"0.528943",
"0.5286764",
"0.5282981",
"0.5281763",
"0.5277338",
"0.52486336",
"0.5244114",
"0.52296436",
"0.52280444",
"0.5220421",
"0.52170146",
"0.518599",
"0.51846784",
"0.5172505",
"0.51710474",
"0.51505053",
"0.5138624",
"0.5132824",
"0.51216894",
"0.5116774",
"0.5113797",
"0.50991267",
"0.50965",
"0.5073579",
"0.5061835",
"0.5061614",
"0.5059118",
"0.50583065",
"0.505299",
"0.5040466",
"0.50293946",
"0.5027007",
"0.5019168",
"0.50170195",
"0.50126785",
"0.5011413",
"0.50097364",
"0.50043017",
"0.49964398",
"0.49917585",
"0.49863973",
"0.4986182",
"0.49772137",
"0.49726245",
"0.49639812",
"0.49617127",
"0.49609047",
"0.49585676",
"0.49585342",
"0.49574053"
] | 0.7618986 | 0 |
Set the value of postback_profiles | public function setPostbackProfiles(array $postback_profiles)
{
$this->postback_profiles = $postback_profiles;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function save()\n\t{\n\t\t$updatedProfile = Yii::$app->user->identity->profile;\n\t\t\n\t\t$updatedProfile = Yii::$app->user->identity->profile;\n\t\t\n\t\t$updatedProfile->{Yii::$app->request->post()['flag']} = Yii::$app->request->post()['val'];\n\n\t\t$updatedProfile->save();\n\t}",
"public function getPostbackProfiles()\n {\n return $this->postback_profiles;\n }",
"public function setOneClickApplyProfiles(array $profiles);",
"function setProfileConfig($profile_config){\n\t\t$this->profile_config = $profile_config;\n\t}",
"public function setProfile(Profile $profile): void\n {\n $this->profile = $profile;\n }",
"protected function setFundraiserProfile()\n {\n $this->fundraiser_profile = new UserProfile;\n $this->fundraiser_profile->set( 'user_id', $this->data['fundraiser'] );\n $this->fundraiser_profile->read();\n }",
"public function api_entry_setprofile() {\n parent::validateParams(array('user'));\n\n $user = $this->Mdl_Users->get($_POST[\"user\"]);\n\n if ($user == null)\n parent::returnWithErr(\"User id is not valid.\");\n\n $arg = $this->safeArray(array('fullname', 'avatar', 'church', 'city', 'province', 'bday', 'mood'), $_POST);\n\n $arg['id'] = $_POST[\"user\"];\n\n if (count($arg) == 1)\n parent::returnWithErr(\"You should pass the profile 1 entry at least to update.\");\n\n $user = $this->Mdl_Users->update($arg);\n\n if ($user == null)\n parent::returnWithErr(\"Profile has not been updated.\");\n\n parent::returnWithoutErr(\"Profile has been updated successfully.\", $user);\n }",
"public function SetProfile($profile)\n {\n $this->profile = $profile;\n }",
"public function setProfile($data)\n {\n if (isset($data['identifier'])) $this->setIdentifier ($data['identifier']);\n if (isset($data['providerName'])) $this->setProvider ($data['providerName']);\n if (isset($data['displayName'])) $this->setDisplayName($data['displayName']);\n if (isset($data['preferredUsername'])) $this->setUserName ($data['preferredUsername']);\n if (isset($data['verifiedEmail'])) $this->setEmail ($data['verifiedEmail']);\n }",
"public static function edit_profile() {\n\t\twp_enqueue_media();\n\t\twp_enqueue_script( 'ur-my-account' );\n\n\t\t$user_id = get_current_user_id();\n\t\t$form_id = ur_get_form_id_by_userid( $user_id );\n\n\t\t$profile = user_registration_form_data( $user_id, $form_id );\n\n\t\t$user_data = get_userdata( $user_id );\n\t\t$user_data = $user_data->data;\n\n\t\t$form_data_array = ( $form_id ) ? UR()->form->get_form( $form_id, array( 'content_only' => true ) ) : array();\n\n\t\tif ( ! empty( $form_data_array ) ) {\n\n\t\t\tif ( count( $profile ) < 1 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Prepare values.\n\t\t\tforeach ( $profile as $key => $field ) {\n\t\t\t\t$value = get_user_meta( get_current_user_id(), $key, true );\n\t\t\t\t$profile[ $key ]['value'] = apply_filters( 'user_registration_my_account_edit_profile_field_value', $value, $key );\n\t\t\t\t$new_key = str_replace( 'user_registration_', '', $key );\n\n\t\t\t\tif ( in_array( $new_key, ur_get_registered_user_meta_fields() ) ) {\n\t\t\t\t\t$value = get_user_meta( get_current_user_id(), ( str_replace( 'user_', '', $new_key ) ), true );\n\t\t\t\t\t$profile[ $key ]['value'] = apply_filters( 'user_registration_my_account_edit_profile_field_value', $value, $key );\n\t\t\t\t} elseif ( isset( $user_data->$new_key ) && in_array( $new_key, ur_get_user_table_fields() ) ) {\n\t\t\t\t\t$profile[ $key ]['value'] = apply_filters( 'user_registration_my_account_edit_profile_field_value', $user_data->$new_key, $key );\n\n\t\t\t\t} elseif ( isset( $user_data->display_name ) && 'user_registration_display_name' === $key ) {\n\t\t\t\t\t$profile[ $key ]['value'] = apply_filters( 'user_registration_my_account_edit_profile_field_value', $user_data->display_name, $key );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tur_get_template(\n\t\t\t\t'myaccount/form-edit-profile.php',\n\t\t\t\tarray(\n\t\t\t\t\t'profile' => apply_filters( 'user_registration_profile_to_edit', $profile ),\n\t\t\t\t\t'form_data_array' => $form_data_array,\n\t\t\t\t)\n\t\t\t);\n\t\t} else {\n\t\t\techo '<h1>' . esc_html__( 'No profile details found.', 'user-registration' ) . '</h1>';\n\t\t}\n\t}",
"public function setPROFILEID($profileId)\n\t\t{\n\t\t\t$this->profileId=$profileId;\n\t\t}",
"public function setProfileInfo($profile){\n $profile_dir = conf::pathBase() . \"/profiles/$profile\";\n if (!file_exists($profile_dir)) {\n common::abort( \"No such path to profiles: $profile_dir\");\n } \n \n include $profile_dir . \"/profile.inc\";\n $this->profileModules = $_PROFILE_MODULES;\n $this->profileTemplates = $_PROFILE_TEMPLATES;\n $this->profileTemplate = $_PROFILE_TEMPLATE;\n }",
"protected function changeFollow()\n\t{\n\t\tif ( !\\IPS\\Member::loggedIn()->modPermission('can_modify_profiles') AND ( \\IPS\\Member::loggedIn()->member_id !== $this->member->member_id OR !$this->member->group['g_edit_profile'] ) )\n\t\t{\n\t\t\t\\IPS\\Output::i()->error( 'no_permission_edit_profile', '2C138/3', 403, '' );\n\t\t}\n\n\t\t\\IPS\\Session::i()->csrfCheck();\n\n\t\t\\IPS\\Member::loggedIn()->members_bitoptions['pp_setting_moderate_followers'] = ( \\IPS\\Request::i()->enabled == 1 ? FALSE : TRUE );\n\t\t\\IPS\\Member::loggedIn()->save();\n\n\t\tif( \\IPS\\Request::i()->isAjax() )\n\t\t{\n\t\t\t\\IPS\\Output::i()->json( 'OK' );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\\IPS\\Output::i()->redirect( $this->member->url(), 'follow_saved' );\n\t\t}\n\t}",
"public function Edit_My_Profile()\n\t{\n\t\t$this->_CheckLogged();\n\t\t\n\t\t$this->_processInsert($this->instructors_model->getMyPostId());\n\t}",
"function save_extra_user_profile_fields( $user_id ) {\n if ( !current_user_can( 'edit_user', $user_id ) ) { \n return false; \n }\n\n\n $socialLinks=array(\"twitter\" => $_POST['twitter'] , \"facebook\" => $_POST['facebook'],\"instagram\" => $_POST['instagram']);\n\n \n update_user_meta(\n $user_id,\n 'social_links',\n $socialLinks\n );\n}",
"private function p_save($data)\n\t{\n\t\t// data must be already sanitized through the form array\n\t\t$this->db->where('user_id', $data['user_id'])->update('profiles', $data);\n\t}",
"function save_profile() {\n global $wpdb;\n\n // Get the current subscriber, fail if not found\n $user = $this->get_user_from_request(true);\n\n // Conatains the cleaned up user data to be saved\n $data = array();\n $data['id'] = $user->id;\n\n $options_profile = get_option('newsletter_profile', array());\n $options_main = get_option('newsletter_main', array());\n\n // Not an elegant interaction between modules but...\n $subscription_module = NewsletterSubscription::instance();\n\n if (!$this->is_email($_REQUEST['ne'])) {\n $user->alert = $this->options['profile_error'];\n return $user;\n }\n\n $email = $this->normalize_email(stripslashes($_REQUEST['ne']));\n $email_changed = ($email != $user->email);\n\n // If the email has been changed, check if it is available\n if ($email_changed) {\n $tmp = $this->get_user($email);\n if ($tmp != null && $tmp->id != $user->id) {\n // TODO: Move the label on profile setting panel\n $user->alert = $this->options['error'];\n return $user;\n }\n $data['status'] = Newsletter::STATUS_NOT_CONFIRMED;\n }\n\n // General data\n $data['email'] = $email;\n if (isset($_REQUEST['nn'])) {\n $data['name'] = $this->normalize_name(stripslashes($_REQUEST['nn']));\n if ($subscription_module->is_spam_text($data['name'])) {\n die();\n }\n }\n if (isset($_REQUEST['ns'])) {\n $data['surname'] = $this->normalize_name(stripslashes($_REQUEST['ns']));\n if ($subscription_module->is_spam_text($data['surname'])) {\n die();\n }\n }\n if ($options_profile['sex_status'] >= 1) {\n $data['sex'] = $_REQUEST['nx'][0];\n // Wrong data injection check\n if ($data['sex'] != 'm' && $data['sex'] != 'f' && $data['sex'] != 'n') {\n die('Wrong sex field');\n }\n }\n\n // Lists. If not list is present or there is no list to choose or all are unchecked.\n $nl = array();\n if (isset($_REQUEST['nl']) && is_array($_REQUEST['nl'])) {\n $nl = $_REQUEST['nl'];\n }\n\n // Every possible list shown in the profile must be processed\n $lists = $this->get_lists_for_profile();\n foreach ($lists as $list) {\n $field_name = 'list_' . $list->id;\n $data[$field_name] = in_array($list->id, $nl) ? 1 : 0;\n }\n\n // Profile\n for ($i = 1; $i <= NEWSLETTER_PROFILE_MAX; $i++) {\n // Private fields cannot be changed by the subscriber\n if ($options_profile['profile_' . $i . '_status'] == 0) {\n continue;\n }\n $data['profile_' . $i] = stripslashes($_REQUEST['np' . $i]);\n }\n\n\n // Feed by Mail service is saved here\n $data = apply_filters('newsletter_profile_save', $data);\n\n if ($user->status == TNP_User::STATUS_NOT_CONFIRMED) {\n $data['status'] = TNP_User::STATUS_CONFIRMED;\n }\n\n $user = $this->save_user($data);\n $this->add_user_log($user, 'profile');\n\n // Send the activation again only if we use double opt-in, otherwise it has no meaning\n // TODO: Maybe define a specific email for that and not the activation email\n if ($email_changed && $subscription_module->is_double_optin()) {\n $subscription_module->send_activation_email($user);\n // TODO: Move this option on new profile configuration panel\n $alert = $this->options['profile_email_changed'];\n }\n\n if (isset($alert)) {\n $user->alert = $alert;\n } else {\n // TODO: Move this label on profile settings panel\n $user->alert = $this->options['saved'];\n }\n return $user;\n }",
"public function process_post($redirect) {\n if (!$data = $this->get_data()) {\n return false;\n }\n // Generate params and send off.\n $api = new api();\n $result = $api->set_servicepaymentprofiles($data->paymentprofile);\n if ((bool)$result->status) {\n $string = implode('<br/>', $result->result->results);\n $message = get_string('setserviceprofiles:success', 'enrol_classicpay', $string);\n } else {\n $message = get_string('err:setserviceprofiles', 'enrol_classicpay', $result);\n }\n redirect($redirect, $message, 5);\n }",
"public static function reset_profiler() {\n\t\tif (\n\t\t\t! Loader::is_admin_page() ||\n\t\t\t! isset( $_GET['reset_profiler'] ) // phpcs:ignore CSRF ok.\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t$previous = 1 === absint( $_GET['reset_profiler'] ); // phpcs:ignore CSRF ok.\n\t\t$new_value = ! $previous;\n\n\t\twc_admin_record_tracks_event(\n\t\t\t'storeprofiler_toggled',\n\t\t\tarray(\n\t\t\t\t'previous' => $previous,\n\t\t\t\t'new_value' => $new_value,\n\t\t\t)\n\t\t);\n\n\t\t$request = new \\WP_REST_Request( 'POST', '/wc-admin/onboarding/profile' );\n\t\t$request->set_headers( array( 'content-type' => 'application/json' ) );\n\t\t$request->set_body(\n\t\t\twp_json_encode(\n\t\t\t\tarray(\n\t\t\t\t\t'completed' => $new_value,\n\t\t\t\t\t'skipped' => $new_value,\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t\t$response = rest_do_request( $request );\n\t\twp_safe_redirect( wc_admin_url() );\n\t\texit;\n\t}",
"function ds_register_default_social_profiles( $profiles ) {\n\n\t// add the facebook profile.\n\t$profiles['facebook'] = array(\n\t\t'id' => 'ds_facebook_url',\n\t\t'label' => __( 'Facebook URL', 'hd-extensible-social-profiles-widget' ),\n\t\t'class' => 'facebook',\n\t\t'description' => __( 'Enter your Facebook profile URL', 'hd-extensible-social-profiles-widget' ),\n\t\t'priority' => 10,\n\t\t'type' => 'text',\n\t\t'default' => '',\n\t\t'sanitize_callback' => 'sanitize_text_field',\n\t);\n\n\t// add the linkedin profile.\n\t$profiles['linkedin'] = array(\n\t\t'id' => 'ds_linkedin_url',\n\t\t'label' => __( 'LinkedIn URL', 'hd-extensible-social-profiles-widget' ),\n\t\t'class' => 'linkedin',\n\t\t'description' => __( 'Enter your LinkedIn profile URL', 'hd-extensible-social-profiles-widget' ),\n\t\t'priority' => 20,\n\t\t'type' => 'text',\n\t\t'default' => '',\n\t\t'sanitize_callback' => 'sanitize_text_field',\n\t);\n\n\t// add the twitter profile.\n\t$profiles['twitter'] = array(\n\t\t'id' => 'ds_twitter_url',\n\t\t'label' => __( 'Twitter URL', 'hd-extensible-social-profiles-widget' ),\n\t\t'class' => 'twitter',\n\t\t'description' => __( 'Enter your Twitter profile URL', 'hd-extensible-social-profiles-widget' ),\n\t\t'priority' => 40,\n\t\t'type' => 'text',\n\t\t'default' => '',\n\t\t'sanitize_callback' => 'sanitize_text_field',\n\t);\n\n\t// return the modified profiles.\n\treturn $profiles;\n\n}",
"function save_custom_user_profile_fields($user_id){\n if(!current_user_can('edit_posts'))\n return false;\n\n // save my custom field\n update_user_meta($user_id, 'learner', esc_html($_POST['learner']));\n}",
"protected function _storeProfile()\n {\n $projectProfileFile = $this->_loadedProfile->search('ProjectProfileFile');\n\n $name = $projectProfileFile->getContext()->getPath();\n\n $this->_registry->getResponse()->appendContent('Updating project profile \\'' . $name . '\\'');\n\n $projectProfileFile->getContext()->save();\n }",
"public function setProfileInformation()\n {\n $view = \\Utility\\Singleton::getInstance(\"\\View\\Main\");\n\t\t$username=$view->get('userProfile');\n\t\t$this->getUserInformations($view,$username);\n\t\t$this->setResourcesUploaded($view,$username);\n\t\treturn $view->fetch('profile.tpl');\n\t}",
"public function &setExternalUpdateProfileUrl($value);",
"public function setProfileEmail($newProfileEmail) : void {\n\t\t$this->profileEmail = $newProfileEmail;\n\t}",
"private function __setProfileFormData() {\n\t\t$adminUser = $this->Auth->user();\n\n\t\t$this->request->data['User'] = $adminUser;\n\t\t$this->request->data['User']['old_email'] = $adminUser['email'];\n\n\t\t$dob = $adminUser['date_of_birth'];\n\t\tif (!is_null($dob) && ($dob !== '')) {\n\t\t\tlist($dobYear, $dobMonth, $dobDay) = explode('-', $dob);\n\t\t\t$formattedDob = sprintf('%s-%s-%s', $dobMonth, $dobDay, $dobYear);\n\t\t\t$this->request->data['User']['date_of_birth'] = $formattedDob;\n\t\t}\n\n\t\t$gender = $adminUser['gender'];\n\n\t\t$profileImg = Common::getUserThumb($adminUser['id'], $adminUser['type'], 'medium', 'user_pic');\n\n\t\t$superAdminStatus = __('No');\n\t\tif (intval($adminUser['type']) === User::ROLE_SUPER_ADMIN) {\n\t\t\t$superAdminStatus = __('Yes');\n\t\t}\n\n\t\t$timezoneList = $this->Timezone->get_timezone_list();\n\n\t\t// form details\n\t\t$formId = 'AdminProfileEditForm';\n\t\t$changePasswordFormId = 'AdminChangePasswordForm';\n\t\t$changePasswordFields = $this->__listAdminUserChangePasswordFormFields();\n\t\t$inputDefaults = array(\n\t\t\t'label' => false,\n\t\t\t'div' => false\n\t\t);\n\n\t\t// validation\n\t\t$modelName = 'User';\n\t\t$this->JQValidator->addValidation($modelName, $this->AdminChangePasswordForm->validate, $changePasswordFormId);\n\t\t$this->JQValidator->addValidation($modelName, $this->AdminProfileForm->validate, $formId);\n\n\t\t$title_for_layout = 'Edit Profile';\n\n\t\t$this->set(compact('title_for_layout', 'modelName', 'changePasswordFields', 'formId', 'changePasswordFormId', 'timezoneList', 'inputDefaults', 'gender', 'profileImg', 'superAdminStatus'));\n\t}",
"public function profileSettings(array $settings);",
"public function action_profile() {\n\t\tif (!Auth::instance()->has_permission('update_profile', $this->_model_name)) {\n\t\t\tthrow new Oxygen_Access_Exception;\n\t\t}\n\t\t$this->_init_model();\n\t\t$this->_load_model();\n\t\t$this->_create_nonce();\n\n\t\t// Hooks\n\t\tOHooks::instance()\n\t\t\t->add(get_class($this).'.profile.view_data', array(\n\t\t\t\tget_class($this),\n\t\t\t\t'profile_view_data'\n\t\t\t))\n\t\t\t->add(get_class($this).'.profile.model_post_save', array(\n\t\t\t\tget_class($this),\n\t\t\t\t'profile_model_post_save'\n\t\t\t))\n\t\t\t->add(get_class($this).'.profile.model_saved', array(\n\t\t\t\tget_class($this),\n\t\t\t\t'profile_model_saved'\n\t\t\t))\n\t\t\t->add('profile_edit.form.header_data', array(\n\t\t\t\tget_class($this),\n\t\t\t\t'user_edit_form_header_data',\n\t\t\t));\n\n\t\t// Form posted?\n\t\tif (Arr::get($_POST, 'save')) {\n\t\t\ttry {\n\t\t\t\t// Validation\n\t\t\t\tNonce::check_fatal($this->_nonce_action, $this->_model->id);\n\t\t\t\t$this->_model->check();\n\n\t\t\t\t// Check collision\n\t\t\t\tif (!$this->_model->no_collision($this->_model->id, $this->_nonce_action)) {\n\t\t\t\t\t$this->_model->validation()->error('username', 'collision');\n\t\t\t\t\tthrow new ORM_Validation_Exception($this->_model->object_name, $this->_model->validation());\n\t\t\t\t}\n\n\t\t\t\t// Save the profile\n\t\t\t\t$this->_model->values_via_fieldgroup($_POST, 'profile');\n\t\t\t\t$this->_model->update();\n\n\t\t\t\tforeach ($this->_model->fieldgroup('preferences') as $key => $field) {\n\t\t\t\t\t$value = Arr::get($_POST, $key);\n\t\t\t\t\tif (!is_null($value)) {\n\t\t\t\t\t\t$this->_model->preference($key, $value);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Set the confirmation message\n\t\t\t\tMsg::add('confirm', 'Profile successfully updated.');\n\n\t\t\t\t// Hooks\n\t\t\t\t$this->_model = OHooks::instance()->filter(get_class($this).'.profile.model_post_save', $this->_model);\n\t\t\t\tOHooks::instance()->event(get_class($this).'.profile.model_saved', $this->_model);\n\n\t\t\t\t// All done!\n\t\t\t\t$this->request->redirect('profile');\n\t\t\t}\n\t\t\tcatch (ORM_Validation_Exception $e) {\n\t\t\t\tMsg::add('error', $e->errors('validation'));\n\t\t\t}\n\t\t}\n\n\t\t// Add additional fields\n\t\t$this->_model->fields_init();\n\t\t$this->_model->set_field_values();\n\t\t$fields = array(\n\t\t\tOField::factory('hidden')\n\t\t\t\t->model($this->_model)\n\t\t\t\t->name('updated')\n\t\t\t\t->value($this->_model->updated),\n\n\t\t\tNonce::field($this->_nonce_action, $this->_model->id),\n\t\t\t$this->_model->field('name'),\n\t\t\t$this->_model->field('email'),\n\t\t);\n\n\t\t// Initialize the form\n\t\t$form = OForm::factory()\n\t\t\t->title('Edit Profile')\n\t\t\t->name('profile_edit')\n\t\t\t->fields($fields)\n\t\t\t->button('save',\n\t\t\t\tOField::factory('submit')\n\t\t\t\t\t->model($this->_model)\n\t\t\t\t\t->name('save')\n\t\t\t\t\t->default_value('Save')\n\t\t\t)\n\t\t\t->view('header', 'form/header/tabs/default')\n\t\t\t->attributes(array(\n\t\t\t\t'class' => 'edit'\n\t\t\t))\n\t\t\t->add_css_class('base', true)\n\t\t\t->add_css_class('box-tabs', true);\n\t\t// add preferences\n\t\tforeach ($this->_model->fieldgroup('preferences') as $key => $field) {\n\t\t\t$value = $this->_model->preference($key);\n\t\t\tif (is_null($value)) {\n\t\t\t\t$value = Oxygen::config('oxygen')->get($key, null);\n\t\t\t}\n\t\t\t$form->field($key, $field->value($value));\n\t\t}\n\n\t\t// Favorite\n\t\t$title = 'User Profile';\n\t\t$this->favorites->title($title);\n\n\t\t// Get the hook to modify data.\n\t\t$data = OHooks::instance()->filter(get_class($this).'.profile.view_data', array(\n\t\t\t'controller' => $this,\n\t\t\t'model' => $this->_model,\n\t\t\t'form' => $form\n\t\t));\n\n\t\t// Set template content\n\t\t$this->template->set(array(\n\t\t\t'title' => $title,\n\t\t\t'content' => View::factory('user/profile', array(\n\t\t\t\t'model' => $data['model'],\n\t\t\t\t'form' => $data['form']\n\t\t\t))\n\t\t));\n\t}",
"abstract function setUserProfileProperty($user, $property_name, $property);",
"function getfaircoin_edd_pre_update_user_profile( $user_id, $userdata ) {\r\n $fairaddress = isset( $_POST['edd_fairaddress'] ) ? $_POST['edd_fairaddress'] : '';\r\n $fairsaving = isset( $_POST['edd_fairsaving'] ) ? $_POST['edd_fairsaving'] : '0';\r\n // Make sure user enters a fairaddress number\r\n if ( ! $fairsaving && ! $fairaddress ) {\r\n edd_set_error( 'fairaddress_required', __( 'Please enter a Faircoin Address', 'edd-getfaircoin' ) );\r\n }\r\n // update fairaddress number\r\n update_user_meta( $user_id, '_edd_user_fairaddress', $fairaddress );\r\n update_user_meta( $user_id, '_edd_user_fairsaving', $fairsaving );\r\n}",
"public function setProfile($profile)\n {\n if (empty($profile)) {\n throw new Exception (\"profile is empty!\");\n } \n $this->profile = $profile;\n }",
"public function updateProfile($user, array $profile);",
"public static function profile_model_saved($model) {\n\t\t$model->preference('timezone', Arr::get($_POST, 'timezone'));\n\t}",
"public function applyProfile(string $profile): void\n {\n ConfigProfiles::getInstance()->checkProfiles($profile, $this);\n }",
"function handle_profile_form( int $user_id ) {\n\tif ( ! check_admin_referer( 'update-user_' . $user_id ) ) {\n\t\treturn;\n\t}\n\n\tif ( isset( $_POST['altis_telemetry_opt_in_toggle'] ) ) {\n\t\topt_in( true );\n\t} else {\n\t\topt_in( false );\n\t}\n}",
"public function p_editProfile() {\n\t$_POST['modified'] = Time::now();\n \n $w = \"WHERE user_id = \".$this->user->user_id;\n\t\t\n\t# Insert\n\tDB::instance(DB_NAME)->update(\"users\", $_POST, $w);\n \n Router::redirect(\"/users/profile\");\n\n }",
"public function setProfiles($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\ZwiftPHP\\Protobuf\\Profile::class);\n $this->profiles = $arr;\n\n return $this;\n }",
"public function SaveProfile_data_post(){\n $housingInfo = $_POST;\n $response = $this->ManageEnquiry_model->SaveProfile_data($housingInfo);\n return $this->response($response);\n }",
"public function setProfileId($value)\n {\n return $this->set('ProfileId', $value);\n }",
"public function setProfileUrl($url)\n {\n if ($url) {\n $this->profileUrl = preg_replace(\"#(\\/+)$#\", \"\", $url) . \"/\";\n }\n }",
"public function setWebsiteProfile(WebsiteProfile $websiteProfile = null)\n {\n $this->saveConfigValue('websiteProfile', $websiteProfile ? json_encode($websiteProfile->toArray()) : null);\n }",
"public function onProfileSave(ProfileEvent $event)\n {\n $this->historyFacade->save(\n $event->{ProfileEvent::ENTITY},\n self::SUCCESS_SAVE_TITLE\n );\n return; \n }",
"public function setProfileHash($newProfileHash) : void {\n\t\t$this->profileHash = $newProfileHash;\n\t}",
"function ds_register_social_customizer_settings( $wp_customize ) {\n\n\t// get the social profiles.\n\t$social_profiles = ds_get_social_profiles();\n\n\t// if we have any social profiles.\n\tif ( ! empty( $social_profiles ) ) {\n\n\t\t// register the customizer section for social profiles.\n\t\t$wp_customize->add_section(\n\t\t\t'ds_social',\n\t\t\tarray(\n\t\t\t\t'title' => __( 'Social Profiles' ),\n\t\t\t\t'description' => __( 'Add social media profiles here.' ),\n\t\t\t\t'priority' => 160,\n\t\t\t\t'capability' => 'edit_theme_options',\n\t\t\t)\n\t\t);\n\n\t\t// loop through each progile.\n\t\tforeach ( $social_profiles as $social_profile ) {\n\n\t\t\t// add the customizer setting for this profile.\n\t\t\t$wp_customize->add_setting(\n\t\t\t\t$social_profile['id'],\n\t\t\t\tarray(\n\t\t\t\t\t'default' => '',\n\t\t\t\t\t'sanitize_callback' => $social_profile['sanitize_callback'],\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t// add the customizer control for this profile.\n\t\t\t$wp_customize->add_control(\n\t\t\t\t$social_profile['id'],\n\t\t\t\tarray(\n\t\t\t\t\t'type' => $social_profile['type'],\n\t\t\t\t\t'priority' => $social_profile['priority'],\n\t\t\t\t\t'section' => 'ds_social',\n\t\t\t\t\t'label' => $social_profile['label'],\n\t\t\t\t\t'description' => $social_profile['description'],\n\t\t\t\t)\n\t\t\t);\n\n\t\t}\n\n\t}\n\n}",
"public function setProfileSalt($newProfileSalt) : void {\n\t\t$this->profileSalt = $newProfileSalt;\n\t}",
"public function updateOptionsWithPost() {\n if (isset($_POST[$this->selectedProviderOptName])) {\n $selected = (string)$_POST[$this->selectedProviderOptName];\n $this->setSelectedProvider($selected);\n }\n if (isset($_POST[$this->updateUrlOverrideOptName])) {\n $url = (string)$_POST[$this->updateUrlOverrideOptName];\n $this->setUpdateUrlOverride($url);\n }\n }",
"function getfaircoin_edd_save_extra_profile_fields( $user_id ) {\r\n if ( ! current_user_can( 'edit_user', $user_id ) )\r\n return false;\r\n update_user_meta( $user_id, '_edd_user_fairaddress', $_POST['_edd_user_fairaddress'] );\r\n update_user_meta( $user_id, '_edd_user_fairsaving', $_POST['_edd_user_fairsaving'] );\r\n}",
"function docdirect_save_custom_user_profile_fields($user_id){\n\t\tif(!current_user_can('manage_options'))\n\t\t\treturn false;\n\t\n\t\t# save my custom field\n\t\tupdate_user_meta($user_id, 'verify_user', 'off');\n\t\tupdate_user_meta( $user_id, 'show_admin_bar_front', false );\n\t}",
"public function setPostcode($value) {\n\t\tself::$_postCode = $value;\n\t}",
"public function setup_profiles( $success, $default, $network ) {\r\n\t\t// Fetch the list of profiles.\r\n\t\tif ( $success ) {\r\n\t\t\tData::instance()->profiles_list( $network, true );\r\n\t\t}\r\n\t}",
"public function setValue($value)\n\t{\n\t\tif (parent::getValue() === $value) {\n\t\t\treturn;\n\t\t}\n\n\t\tparent::setValue($value);\n\t\tif ($this->getActiveControl()->canUpdateClientSide() && $this->getHasLoadedPostData()) {\n\t\t\t$this->getPage()->getCallbackClient()->setValue($this, $value);\n\t\t}\n\t}",
"public function process()\n {\n $oProfilePopup = Phpfox::getService('profilepopup');\n $oProfilePopupProcess = Phpfox::getService('profilepopup.process');\n\n $oProfilePopupProcess->synchronizeAllCustomFieldInSystem();\n $aAllItems = $oProfilePopup->getAllItems(1);\n $iLen = count($aAllItems);\n\n for ($idx = 0; $idx < $iLen; $idx++)\n {\n $aAllItems[$idx]['checked'] = '';\n $aAllItems[$idx]['lang_name'] = '';\n if (intval($aAllItems[$idx]['is_active']) == 1 && intval($aAllItems[$idx]['is_display']) == 1)\n {\n $aAllItems[$idx]['checked'] = 'checked';\n }\n\n if (intval($aAllItems[$idx]['is_custom_field']) == 1)\n {\n $aAllItems[$idx]['lang_name'] = Phpfox::getPhrase($aAllItems[$idx]['phrase_var_name']);\n } else\n {\n $aAllItems[$idx]['lang_name'] = Phpfox::getPhrase('profilepopup.' . $aAllItems[$idx]['phrase_var_name']);\n }\n }\n\t\t\t\t\n\t\t\t\t//\tget resume fields\n\t\t\t\t$aResumeItems = $oProfilePopup->getItemsByModule(1, 'user', 'resume');\n\t\t\t\t$iResumeLen = count($aResumeItems);\n for ($idx = 0; $idx < $iResumeLen; $idx++)\n {\n $aResumeItems[$idx]['checked'] = '';\n $aResumeItems[$idx]['lang_name'] = '';\n if (intval($aResumeItems[$idx]['is_active']) == 1 && intval($aResumeItems[$idx]['is_display']) == 1)\n {\n $aResumeItems[$idx]['checked'] = 'checked';\n }\n\n if (intval($aResumeItems[$idx]['is_custom_field']) == 1)\n {\n $aResumeItems[$idx]['lang_name'] = Phpfox::getPhrase($aResumeItems[$idx]['phrase_var_name']);\n } else\n {\n $aResumeItems[$idx]['lang_name'] = Phpfox::getPhrase('profilepopup.' . $aResumeItems[$idx]['phrase_var_name']);\n }\n }\n\n $this->template()->setTitle(Phpfox::getPhrase('profilepopup.user_global_settings'))\n ->setBreadcrumb(Phpfox::getPhrase('profilepopup.user_global_settings'), $this->url()->makeUrl('admincp.profilepopup.user'))\n ->assign(array(\n 'aAllItems' => $aAllItems\n , 'aResumeItems' => $aResumeItems\n )\n )\n ->setHeader('cache', array(\n 'quick_edit.js' => 'static_script'\n )\n );\n }",
"public function unset_profile_fields()\n\t{\n\t\tif (! $this->settings['fields'] || empty($_POST['fields']) ) { return false; }\n\n\t\t$all_fields = array_merge($this->settings['profile_fields'], $this->settings['pass_fields']);\n\n\t\tforeach ( $all_fields as $key ) {\n\t\t\tif (! empty($this->settings['fields'][$key]) ) {\n\t\t\t\tunset( $_POST['fields'][$this->settings['fields'][$key]['key']] );\n\t\t\t}\n\t\t}\n\n\t\tif ( empty($_POST['fields']) ) {\n\t\t\tunset($_POST['fields']);\n\t\t}\n\t}",
"function bibdk_favourite_form_user_profile_form_alter(&$form, $form_state){\n $form['#submit'][] = 'bibdk_favourite_add_favourite_message';\n}",
"public function setMiniProfile( $oView ) {\n\t\t$this->oMiniProfile = $oView;\n\t}",
"public function testProfilePrototypeUpdateAttributes()\n {\n\n }",
"public function proceed()\n {\n $fieldsValues = new Model_FieldsValues();\n $users = new Users_Model_Users();\n foreach ($users->getUsers() as $user) {\n $profileId = $user->createDefaultProfile($this->_view);\n foreach ($fieldsValues->getForUser($user) as $fieldValue) {\n $fieldValue->profile_id = $profileId;\n $fieldValue->save();\n }\n }\n\n $this->_db->query('ALTER TABLE `fields_values` ADD FOREIGN KEY ( `profile_id` ) REFERENCES `profiles` (`id`) ON DELETE CASCADE');\n }",
"public function setprofile(){\n \n \n \n $region=M('region');\n $user=D('user');\n $userinfo=M('userinfo');\n $ucenter_member=M('ucenter_member');\n $member=M('member');\n //main menu\n $channel = new \\Common\\Model\\ChannelModel();\n $menu = $channel->getMenu(\"Blog\");\n $this->assign('menu', $menu);\n $uid = I('get.uid');\n $choice = I('get.type');\n if(!(session('username') || cookie('username'))){\n $url = \"http://\".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].\"?s=/Home/User/login.html\";\n header('Location:'.$url);\n }\n if(IS_POST){\n //判断是否已存在信息\n $isset=$userinfo->where(\"user_id=$uid\")->find();\n $array=I('post.');\n $judge1=$ucenter_member->where(\"id=$uid\")->setField('username',$array['nickname']);\n $judge2=$member->where(\"uid=$uid\")->setField('nickname',$array['nickname']);\n $save['user_id']=$uid;\n $save['sex']=$array['sex'];\n $save['introduce']=$array['introduce'];\n $save['sign']=$array['sign'];\n $save['create_time']=$save['update_time']=time();\n if($array['town']){\n $save['region_id']=$array['town'];\n }else {\n $save['region_id']=$array['city'];\n }\n if($isset){\n $judge3=$userinfo->where(\"user_id=$uid\")->save($save);\n }else {\n $judge3=$userinfo->add($save);\n }\n }\n \n //判断有没有填写过个人信息\n $user_info=M('ucenter_member')->alias('u')\n ->where(\"u.id=$uid\") \n ->join('lsgoweb_userinfo i on u.id=i.user_id','left')\n ->field('i.sex,i.introduce,i.sign,i.region_id,u.username')\n ->find();\n if($user_info['region_id']){\n $path=$region->where(array(id=>$user_info['region_id']))->find();\n $path_id=explode('.',$path['path_id']);\n $path_name=explode('.',$path['path_name']);\n }\n $province=$region->where(\"parent=86\")->select();\n $this->assign('path_name',$path_name);\n $this->assign('path_id',$path_id);\n $this->assign('nickname',$user_info['username']);\n $this->assign('province',$province);\n $this->assign('sex',$user_info['sex']);\n $this->assign('introduce',$user_info['introduce']);\n $this->assign('sign',$user_info['sign']);\n $this->assign('urlinfo',$this->getMenu2($uid));\n $this->assign('judge',$this->showchoice($choice));\n $this->assign('info',$user->info($uid));\n \n $this->display('setprofile');\n }",
"public function updateProfile(array $data){\n $user = App_Auth::getInstance()->getIdentity();\n $data['id'] = $user->id;\n\n $this->save($data);\n }",
"function set_data($name,$value) {\n $this->store_in_session('page_data',$name,$value);\n\n }",
"public function actionProfile(){\r\r\n\t\t$attributes = Yii::app()->portfolio->getAttributes(Yii::app()->user->id);\r\r\n\t\tif(isset($_POST['Attribute'])){\r\r\n\t\t\tYii::app()->portfolio->saveAttributes($_POST['Attribute']);\r\r\n\t\t}\r\r\n\t\t$this->render('profile',array('attributes'=>$attributes));\r\r\n\t}",
"public function save()\n {\n $this->checkModel();\n if (!is_null($this->profile)) $this->saved = $this->profile->save();\n }",
"public function postProfile() {\n $this->_adminUserRepository->updateProfile ( $this->auth->user ()->id );\n return redirect ( 'users/profile' )->withSuccess ( trans ( 'user::adminuser.profile.success' ) );\n }",
"public function setPostFields(array $post_data) {}",
"public function updateProfile() {\n\t\t\n\t\treturn $this->_post(self::URL_USERS_UPDATE_PROFILE, $this->_query);\n\t}",
"public function setPostHookName($value) { $this->_postHookName = $value; }",
"public function setCertificateProfileDisplayName(?string $value): void {\n $this->getBackingStore()->set('certificateProfileDisplayName', $value);\n }",
"public function action_save_postdata($post_id)\n {\n\n $fields = ['protect', 'redirect_url', 'users'];\n\n foreach ($fields as $field) {\n\n if ($this->has_post_value($field)) {\n $value = $this->get_post_value($field);\n $this->plugin->set_option($post_id, $field, $value);\n\n }\n\n }\n\n }",
"public function setProfileId($newProfileId) {\n\t\t// base case if the profile id is null this a new tweet without a mySQL assigned id (yet)\n\t\tif ($newProfileId === null){\n\t\t\t$this->profileId = null;\n\t\t\treturn;\n\t\t}\n\t\t// verify profile id\n\t\t$newProfileId = filter_var($newProfileId, FILTER_VALIDATE_INT);\n\t\t//if filter_var()frejects the new id throw an Exception\n\t\tif($newProfileId === false) {\n\t\t\tthrow(new InvalidArgumentException(\"profile id is not an integer punk\"));\n\t\t}\n\t\tif($newProfileId <= 0) {\n\t\t\tthrow(new RangeException(\"proflie id must be positive fool\"));\n\t\t}\n\t\t// saving to object\n\t\t$this->email = $newProfileId;\n\t}",
"protected function saveProfile($user)\n\t{\n\t}",
"function itstar_save_extra_user_profile_fields( $user_id ) {\n $saved = false;\n if ( current_user_can( 'edit_user', $user_id ) ) {\n update_user_meta( $user_id, 'birthday', $_POST['birthday'] );\n update_user_meta( $user_id, 'birthmonth', $_POST['birthmonth'] );\n update_user_meta( $user_id, 'birthyear', $_POST['birthyear'] );\n update_user_meta( $user_id, 'phone', $_POST['phone'] );\n update_user_meta( $user_id, 'job', $_POST['job'] );\n $saved = true;\n }\n return true;\n}",
"public function save_settings() {\n\n\t\tif ( !isset( $_REQUEST['action'] ) || !isset( $_GET['page'] ) )\n\t\t\treturn;\n\n\t\tif ( 'vfb-settings' !== $_GET['page'] )\n\t\t\treturn;\n\n\t\tif ( 'vfb_settings' !== $_REQUEST['action'] )\n\t\t\treturn;\n\n\t\tcheck_admin_referer( 'vfb-update-settings' );\n\n\t\t$data = array();\n\n\t\tforeach ( $_POST['vfb-settings'] as $key => $val ) {\n\t\t\t$data[ $key ] = esc_html( $val );\n\t\t}\n\n\t\tupdate_option( 'vfb-settings', $data );\n\t}",
"public function setPostInSession() {\n $_SESSION ['gateway_redirect'] = array (\n 'url' => $this->getUrl (), \n 'enctype' => $this->encType, \n 'pageTitle' => $this->pageTitle, \n 'postParameters' => $this->postParameters );\n }",
"public function executeProfile($request)\n {\n $this->_checkAuth();\n $profile = new Profile();\n $this->configTypes = $profile->configTypeDefault();\n $this->platformNames = $profile->platformNameDefault();\n \n $configRep = new ConfigRepository();\n $this->platform_config = $configRep->getProfileByPlatform();\n $this->iOSpasscodeSetting = $configRep->getiOSPasscodeSetting();\n $this->profilePasscodeTooltip = $this->notificationMsg['tooltip'];\n $this->locationWarning = $this->notificationMsg['N9001'];\n $this->confirm = $this->confirmMsg;\n }",
"public function reloadProfile($profile){\n $this->setProfileInfo($profile);\n $this->loadProfileFiles($profile);\n }",
"function on_postback($data){\n\t\t}",
"public function offsetSet($offset, $value) { if (is_null($offset)) { $this->profile[] = $value; } else { $this->profile[$offset] = $value; }}",
"public function offsetSet($offset, $value) { if (is_null($offset)) { $this->profile[] = $value; } else { $this->profile[$offset] = $value; }}",
"public function setProfileBirthdateAttribute($value)\n {\n if(is_string($value)){\n $this->attributes['profile_birthdate'] = $this->setDate($value);\n } else {\n $this->attributes['profile_birthdate'] = null;\n }\n }",
"function ffl_save_extra_profile_fields( $user_id ) \n{\n\tif ( !current_user_can( 'edit_user', $user_id ) )\n\t\treturn false;\n\n\t//set the display name\n\t$display_name = trim($_POST['first_name'] . \" \" . $_POST['last_name']);\n\tif(!$display_name)\n\t\t$display_name = $_POST['user_login'];\n\t\t\n\t$_POST['display_name'] = $display_name;\n\t\n\t$args = array(\n\t\t\t'ID' => $user_id,\n\t\t\t'display_name' => $display_name\n\t); \n\twp_update_user( $args ) ;\n}",
"function storeInCookie($user_profile_data)\n{\n\t$context = Context::getContext();\n\t$cookie = $context->cookie;\n\t$cookie->login_radius_data = serialize($user_profile_data);\n}",
"function ajax_genmapper_user_country_selected() {\n\t\n\t$choosed_country = isset($_POST['choosed_country']) ? $_POST['choosed_country'] : '';\n\t\n\tif ( $choosed_country )\n\t{\n\t\t\t$meta=get_user_meta(get_current_user_id(), 'genmapper_country_code', true);\n\t\t\tif ( $meta == '' || (is_array($meta) && count($meta)==0 ) )\n\t\t\t{\n\t\t \tupdate_user_meta(get_current_user_id(), 'genmapper_country_code',$choosed_country);\n\t\t\t\techo 'country_set';\n\t\t\t}\n\n\t}\n\telse\n\t{\n\t\t\n\t}\n\t\n\twp_die();\n}",
"public static function profile($profile){\n $pro = Profile::where('user_id',Auth::id())->first();\n if ($pro){\n $pro->update($profile);\n }else{\n Profile::create($profile);\n }\n }",
"function save_custom_fields( $post_id, $post ) {\n if ( !isset($_POST['wpnext_wpnonce']) || !wp_verify_nonce($_POST['wpnext_wpnonce'], 'wpnext') )\n return;\n if ( !current_user_can( 'edit_post', $post_id ) )\n return;\n\n if ( isset($_POST['wpn_post_data']) ) {\n update_post_meta( $post_id, 'wpnext', $_POST['wpn_post_data']);\n } else {\n delete_post_meta( $post_id, 'wpnext');\n }\n }",
"public function controlProfile(){\n\t\t$profilePage = \\Utility\\Singleton::getInstance('\\View\\Main');\n\t\t$data=\"\";\n\t\t\n\t\tswitch($profilePage->get('profileAction'))\n\t\t{\t\n\t\t\tcase 'hasAlreadyVoted':\n\t\t\t\t$data=$this->hasVoted();\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'getProfilePage':\n\t\t\t\t$data=$this->setProfileInformation();\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'rateUser':\n\t\t\t\t$data=$this->rateUser();\n\t\t\t\tbreak;\n\n\t\t}\n\t\n\t\treturn $data;\n\t\t\n\t}",
"public function saveProfile()\n\t{\n\t\tif (isset($_REQUEST['username'])) {\n\t\t\t$username = trim($_REQUEST['username']);\n\t\t\t$fbuid = $this->getFBUID();\n\t\t\tif (isset($_POST['sub_clear'])) { $username = ''; }\n\t\t\tif ($username) {\n\t\t\t\t$result = $this->db->exec(\"INSERT IGNORE INTO selective_status_users (fbuid, twitterid) VALUES (\" . $this->db->quote($fbuid) . \", \" . $this->db->quote($username) . \");\");\n\t\t\t}\n\t\t\t$result = $this->db->exec(\"UPDATE selective_status_users SET twitterid = \" . $this->db->quote($username) . \", is_page = 0 WHERE fbuid = \" . $this->db->quote($fbuid) . \" LIMIT 1\");\n\t\t\treturn true;\n\t\t}\n\t}",
"public function setProfileActivationToken($newProfileActivation) : void {\n\t\t$this->profileActivationToken = $newProfileActivation;\n\t}",
"function setOnPage($value){\n\t\t$this->on_page = $value;\n\t}",
"public function init()\n {\n $this->form = new Account_Form_Editprofile();\n }",
"final public function addForProfile($profiles_id) {\n global $DB;\n\n $criteria = $this->getDistinctUserCriteria() + $this->getProfileJoinCriteria();\n $criteria['FIELDS'][] = Profile_User::getTable() . '.entities_id AS entity';\n $criteria['FROM'] = User::getTable();\n $criteria['WHERE'][Profile_User::getTable() . '.profiles_id'] = $profiles_id;\n\n $iterator = $DB->request($criteria);\n while ($data = $iterator->next()) {\n $this->addToRecipientsList($data);\n }\n\n $this->recipient_data = [\n 'itemtype' => Profile::class,\n 'items_id' => $profiles_id,\n ];\n Plugin::doHook('add_recipient_to_target', $this);\n unset($this->recipient_data);\n }",
"public function setExtended() {\n /* first cut out regular and unwanted fields */\n $excludeExtended = $this->controller->getProperty('excludeExtended','');\n $excludeExtended = explode(',',$excludeExtended);\n $profileFields = $this->profile->toArray();\n $userFields = $this->user->toArray();\n $extended = array();\n $fields = $this->dictionary->toArray();\n $fields = $this->filterAllowedFields($fields);\n $userGroupField = $this->controller->getProperty('usergroupsField','');\n foreach ($fields as $field => $value) {\n if (!isset($profileFields[$field])\n && !isset($userFields[$field])\n && $field != 'password_confirm'\n && $field != 'passwordconfirm'\n && $field != $userGroupField\n && !in_array($field,$excludeExtended)\n ) {\n $extended[$field] = $value;\n }\n }\n /* now set extended data */\n $this->profile->set('extended',$extended);\n }",
"public function updateProfileColor() {\n\t\t\n\t\treturn $this->_post(self::URL_UPDATE_PROFILE_COLOR, $this->_query);\n\t\t\n\t}",
"function setProfileID($inProfileID) {\n\t\tif ( $inProfileID !== $this->_ProfileID ) {\n\t\t\t$this->_ProfileID = $inProfileID;\n\t\t\t$this->setModified();\n\t\t}\n\t\treturn $this;\n\t}",
"public function getOneClickApplyProfiles();",
"public function updateProfile()\n {\n $breadCrumb = $this->userEngine->breadcrumbGenerate('profileEdit');\n\n return $this->loadPublicView('user.profile-edit', $breadCrumb['data']);\n }",
"function classiera_save_extra_profile_fields( $user_id ) {\r\n\tupdate_user_meta( $user_id, 'price_plan' );\r\n\tadd_user_meta( $user_id, 'price_plan_id' );\r\n}",
"public function setProfile($profile) {\n\t\t$this->profile = $profile;\n\t\treturn $this;\n\t}",
"public function profile()\n {\n if (isset($_REQUEST['submit'])) {\n\n $fullname = $_POST['fullname'];\n\n $phone = $_POST['phone'];\n\n $username = $_POST['username'];\n\n $des = $_POST['des'];\n\n $user = $_POST['user'];\n\n\n //Checking for User login or not\n $change = $this->getChange($username, $fullname, $phone ,$des, $user);\n\n if ($change) {\n $success = 'Change profile successful!';\n echo \"<p><span class='error' style='color: green'>\" . $success . \"</span></p><br>\";\n } else {\n // Registration Failed\n $fail = 'Change profile failed. Account already not exits, please try again.';\n echo \"<p><span class='error' style='color: red;'>\" . $fail . \"</span></p><br>\";\n };\n }\n }",
"public function trackProfileUpdate(int $type)\n {\n $this->engagement->setType($type);\n $this->saveTracker();\n }",
"public function editProfile(array $changes);"
] | [
"0.61555207",
"0.6126701",
"0.5951328",
"0.5918712",
"0.58189404",
"0.58073837",
"0.5753503",
"0.5665864",
"0.5627545",
"0.55173075",
"0.5514155",
"0.54581445",
"0.5390925",
"0.53751504",
"0.5364285",
"0.5359572",
"0.5356901",
"0.53414136",
"0.533976",
"0.5320283",
"0.5242207",
"0.5220586",
"0.5156123",
"0.51343113",
"0.5130299",
"0.51180845",
"0.5113273",
"0.510931",
"0.509723",
"0.5072769",
"0.50503623",
"0.5048069",
"0.5008743",
"0.49731582",
"0.4959434",
"0.49558848",
"0.4938597",
"0.49214548",
"0.49169037",
"0.4895628",
"0.4890773",
"0.4890024",
"0.48850322",
"0.48766956",
"0.4874733",
"0.48692134",
"0.4867889",
"0.486147",
"0.48514268",
"0.48387545",
"0.4816726",
"0.480968",
"0.4800307",
"0.4799891",
"0.47945514",
"0.47731978",
"0.477077",
"0.47603053",
"0.47601098",
"0.4756554",
"0.4743125",
"0.4737811",
"0.47340748",
"0.47313577",
"0.47311875",
"0.47263396",
"0.47218698",
"0.47035018",
"0.47033653",
"0.46898162",
"0.4688636",
"0.46799815",
"0.46670404",
"0.4663703",
"0.46619603",
"0.4659315",
"0.46557367",
"0.46557367",
"0.46505013",
"0.46488258",
"0.46445933",
"0.46426532",
"0.46404785",
"0.4636552",
"0.4630578",
"0.46194017",
"0.46182418",
"0.46113244",
"0.4605712",
"0.46049875",
"0.4601556",
"0.45985264",
"0.45974606",
"0.4597113",
"0.45968443",
"0.45916864",
"0.45845821",
"0.45781833",
"0.45775005",
"0.45766926"
] | 0.6816586 | 0 |
Get the value of id | public function getId()
{
return $this->id;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getId(){\n\t\t\treturn $this->$id;\n\t\t}",
"public function getId()\n {\n return $this->getValue('id');\n }",
"public function getId() {\n\t\treturn $this -> data['id'];\n\t}",
"function get_id() {\n\t\treturn $this->get_data( 'id' );\n\t}",
"function getID() {\n\t\treturn $this->data_array['id'];\n\t}",
"public function getId(){\n return $this->_data['id'];\n }",
"public function get_id();",
"public function get_id();",
"public function getId() {\r\n\t\treturn $this->data['id'];\r\n\t}",
"function getId() {\n\t\treturn $this->getData('id');\n\t}",
"function getId() {\n\t\treturn $this->getData('id');\n\t}",
"public function getid(){\n\t\t\treturn $this->id;\n\t\t}",
"public function value($id)\n\t{\n\t\treturn $this->connection()->get(\"element/$id/value\");\n\t}",
"public function get_id(){\n\t\treturn $this->id;\n\t}",
"public function getId() : string{\n return $this->id;\n }",
"public function getId() : string{\n return $this->id;\n }",
"public function getId() : string\n {\n $rtn = $this->data['id'];\n\n return $rtn;\n }",
"function get_id() {\n\t\treturn $this->id;\n\t}",
"public function getID();",
"public function getID();",
"public function getID();",
"function get_id() {\n return $this->get_mapped_property('id');\n }",
"public static function id(){\n return self::info('id');\n }",
"public function getid() {\n\t\treturn $this->id;\n\t}",
"public function getID()\n { return $this->get('id'); }",
"function get_id() {\n\t\treturn $this->id;\n\n\t}",
"public function getid()\n {\n return $this->id;\n }",
"public function getid()\n {\n return $this->id;\n }",
"public function get_id(){\n return $this->id;\n }",
"function get_id() {\n return $this->id;\n }",
"public function getId(){\n\t\t\treturn $this->id;\n\t\t}",
"public function getId(){\n\t\t\treturn $this->id;\n\t\t}",
"public function getId(){\n\t\t\treturn $this->id;\n\t\t}",
"public function getId(){\n\t\t\treturn $this->id;\n\t\t}",
"static function id()\n\t{\n\t\treturn self::data('id');\n\t}",
"public function getId(){\n\t\treturn $this->id;\n\t}",
"public function getId(){\n\t\treturn $this->id;\n\t}",
"public function getId(){\n\t\treturn $this->id;\n\t}",
"public function getId(){\n\t\treturn $this->id;\n\t}",
"public function getId(){\n\t\treturn $this->id;\n\t}",
"public function getId(){\r\n\t\t\treturn $this->id;\r\n\t\t}",
"public function getId(){\r\n\t\treturn $this->id;\r\n\t}",
"public function getIdVit(){\n\t\treturn ($this->id);\n\t}",
"public static function get()\n {\n return self::$id;\n }",
"public function getId()\n {\n $value = $this->get(self::ID);\n return $value === null ? (string)$value : $value;\n }",
"function getId() {\n\t\treturn $this->id;\n\t}",
"function getId();",
"public function getValueId()\n {\n return $this->valueId;\n }",
"function get_id()\n {\n return $this->id;\n }",
"function get_id()\r\n {\r\n return $this->id;\r\n }",
"function getId(){\n\t\treturn $this->id;\n\t}",
"function getId(){\n\t\treturn $this->id;\n\t}",
"function getId(){\n\t\treturn $this->id;\n\t}",
"public function getId() ;",
"public function get_id () {\r\n\t\treturn $this->id;\r\n\t}",
"public function getId() {\n return @$this->attributes['id'];\n }",
"public function getId() {\n return @$this->attributes['id'];\n }",
"function get() {\n if (!empty($this->_id)) {\n return $this->_id;\n }\n return '';\n }",
"abstract public function get_id();",
"function get_id(){\n return $this -> id;\n }",
"function get_id(){\n return $this -> id;\n }",
"public function get_id() {\r\n\t\treturn ($this->id);\r\n\t}",
"public function get_id() {\r\n\t\treturn ($this->id);\r\n\t}",
"public function getID(){\n \treturn $this->id;\n }",
"public function get($id) {\n return $this->currentValues[$id];\n }",
"public function getId()\n { return $this->getAttribute('id'); }",
"public function getID(): string;",
"function get_id()\n\t{\n\t\treturn $this->id;\n\t}",
"public function getId(): mixed;",
"public function getId()\n { // getter ID\n return $this->id;\n }",
"public function getId()\n {\n return $this['id'];\n }",
"public function id() {\n return $this->id;\n }",
"public function getId() {}",
"public function getId() {}",
"public function getid()\n {\n return $this->Id;\n }",
"public function getId()\n {\n $rtn = $this->data['id'];\n\n return $rtn;\n }",
"public function getID() : string;",
"public function getId()\n\t{\n\t\treturn $this->id; \n\n\t}",
"public function getId()\n {\n return $this->getData(self::ID);\n }",
"public function id(): string\n {\n return $this->getAttribute('id');\n }",
"function id():string {return $this->_p['_id'];}",
"public function get_id() {\n return $this->id;\n }",
"public function get_id() {\n return $this->id;\n }",
"public function get_id() {\n return $this->id;\n }",
"public function id()\n {\n return $this->id;\n }",
"public function id()\n {\n return $this->id;\n }",
"public function id()\n {\n return $this->id;\n }",
"public function id()\n {\n return $this->id;\n }",
"private function getId() {\n return Xss::filter($this->request->get('id'));\n }",
"public function getId() : string {\n return $this->id;\n }",
"public function getID()\n {\n return $this->formattedData['id'];\n }",
"function getId()\r\n\t\t{\r\n\t\t\treturn $this->id;\r\n\t\t\t\r\n\t\t}",
"public function getId():string {\n return $this->id;\n }",
"public function getId() {\n\t\treturn $this->id;\n\t}",
"public function getId() {\n\t\treturn $this->id;\n\t}",
"public function getId() {\n\t\treturn $this->id;\n\t}",
"public function getId() {\n\t\treturn $this->id;\n\t}",
"public function getId() {\n\t\treturn $this->id;\n\t}",
"public function getId() {\n\t\treturn $this->id;\n\t}",
"public function getId() {\n\t\treturn $this->id;\n\t}",
"public function getId() {\n\t\treturn $this->id;\n\t}"
] | [
"0.77531433",
"0.75790346",
"0.7551146",
"0.74920887",
"0.7472376",
"0.7445116",
"0.7433321",
"0.7433321",
"0.74298936",
"0.7415067",
"0.7415067",
"0.732741",
"0.7291388",
"0.72722006",
"0.7259057",
"0.7259057",
"0.7255057",
"0.7253809",
"0.72535557",
"0.72535557",
"0.72535557",
"0.72478676",
"0.7239034",
"0.7214735",
"0.7207342",
"0.72061116",
"0.7202167",
"0.7202167",
"0.7191623",
"0.7179009",
"0.7162689",
"0.7162689",
"0.7162689",
"0.7162689",
"0.7156056",
"0.7142556",
"0.7142556",
"0.7142556",
"0.7142556",
"0.7142556",
"0.7142064",
"0.71383333",
"0.71373826",
"0.7133959",
"0.71320766",
"0.712474",
"0.711623",
"0.7115175",
"0.7114791",
"0.71101403",
"0.7102386",
"0.7102386",
"0.7102386",
"0.7091067",
"0.70898867",
"0.708427",
"0.708427",
"0.7076914",
"0.7074607",
"0.7059175",
"0.7059175",
"0.705889",
"0.705889",
"0.7057164",
"0.7053134",
"0.705276",
"0.70520186",
"0.7050234",
"0.7041468",
"0.7041224",
"0.7039091",
"0.7035577",
"0.70308214",
"0.70308214",
"0.7025611",
"0.70220804",
"0.7018659",
"0.7014001",
"0.7010808",
"0.7003174",
"0.70012575",
"0.69916296",
"0.69916296",
"0.69916296",
"0.69893074",
"0.69893074",
"0.69893074",
"0.69893074",
"0.69839543",
"0.6982348",
"0.69735116",
"0.6972415",
"0.6970156",
"0.69687396",
"0.69687396",
"0.69687396",
"0.69687396",
"0.69687396",
"0.69687396",
"0.69687396",
"0.69687396"
] | 0.0 | -1 |
Set the value of id | public function setId($id)
{
$this->id = $id;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function SetId($value) { $this->id=$value; }",
"function setId($value) {\n $this->_id = intval($value);\n }",
"public function setID($value) {\r\n //if (!is_numeric($value)) die(\"setID() only accepts a numerical ID value\");\r\n $this->id = $value;\r\n }",
"function set_id($id) {\n\t\t$this->id = $id;\n\t}",
"private function setID($id) {\r\n\t\t$this->id = $id;\r\n\t}",
"private function SetID($value)\n\t\t{\n\t\t\t$this->id = $value;\n\t\t}",
"function setId($id) {\n\t\t$this->setData('id', $id);\n\t}",
"function setId($id){\r\n\t\t$this->id = $id;\r\n\t}",
"function setId($id){\n\t\t$this->id = $id;\n\t}",
"function set_id($id)\n {\n $this->id = $id;\n }",
"function setId($id) {\n\t\t$this->_id = $id;\n\t}",
"public function set_id($id){\n $this->id = $id;\n }",
"function setId($id) {\r\n $this->_id = $id;\r\n }",
"public function set_id( $id ) {\n\t\t$this->id = absint( $id );\n\t}",
"public function setId($id){\n $this->_id = $id;\n }",
"public function SetId ($id);",
"function setId($id) {\n $this->id = $id;\n }",
"function setId($id) {\n $this->id = $id;\n }",
"public function setID($id) {\n $this->id = $id; \n }",
"public function setID($id){\n $this->id = $id;\n }",
"function setId($id)\n {\n $this->id = $id;\n }",
"private function setId($id)\n {\n $this->id = $id;\n }",
"public function setId($id) { $this->id = $id; }",
"public function setId($id){\n\t\t$this->id = $id;\n\t}",
"public function setId($id)\n {\n $this->id = $id;\n\n \n }",
"public function setID($id);",
"public function setId($id){\n $this->id = $id;\n }",
"public function setId($id){\n $this->id = $id;\n }",
"public function setId($id){\n $this->id = $id;\n }",
"public function set_id( $id ) {\n\t\t\t$this->id = $id;\n\t\t}",
"public function setId($id)\n {\n $this->id = $id;\n }",
"public function setId( $id ) {\n\t\t$this->id = $id;\n\t}",
"public function setId( $id ) {\n\t\t$this->id = $id;\n\t}",
"public function setId($id){\n\t\t\t$this->id = $id;\n\t\t}",
"public function setId($id) {\n\t\t$this->id = (integer)$id;\n\t}",
"function setId($value){\n\t\t//echo \"setting ID to \".$value;\n\t\t$this->_id=$value;\n\t\t//echo \"ID set to \".$this->_id;\n\t\treturn $this;\n\t}",
"public function setID($id){\n $this->id=$id;\n }",
"public function setId($id) \n {\n $this->id = $id;\n }",
"public function setId( $id )\n {\n $this->id = $id;\n }",
"public function setId($id){\n $this->id = $id;\n }",
"public function setId($x) { $this->id = $x; }",
"public function set($id, $value);",
"public function set($id, $value);",
"public function setId($value)\n {\n $this->setDataField('id', $value);\n }",
"public function setId($id){\n\t\tself::$_id[get_class($this)] = $id;\n\t}",
"public function setId($id) {\n $this->id = $id;\n }",
"public function setId($id) {\n\t\t$this->id = $id;\n\t}",
"public function setId($id) {\n\t\t$this->id = $id;\n\t}",
"public function setId($id) {\n\t\t$this->id = $id;\n\t}",
"public function setId($id) {\n\t\t$this->id = $id;\n\t}",
"public function setId($id) {\n\t\t$this->id = $id;\n\t}",
"public function setid($id)\n\t\t{\n\t\t\t$this->id = $id;\n\t\t}",
"public function setId($id) {\r\n $this->_id = $id;\r\n }",
"public function set(string $id, $value);",
"public function setId($id)\n {\n $this->_id = (int) $id;\n }",
"public function setId($id)\n {\n $this->_id = (int) $id;\n }",
"public function setId($id) {\r\n $this->id = $id;\r\n }",
"public function setId($id) {\r\n $this->id = $id;\r\n }",
"public function setId($id)\n {\n $id = (int) $id;\n \n if ($id > 0)\n {\n $this->_id = $id;\n }\n }",
"public function setId($id){\n $this->id = (string) $id;\n }",
"public function setId($id)\n {\n $this->id = $id;\n }",
"public function setId($id)\r\n\t\t{\r\n\t\t\t$this->_id = $id;\r\n\t\t}",
"public function setId($id)\r\n\t{\r\n\t\t$this->id = $id;\r\n\t}",
"public function setID($id) {\n\t\t$this->id = $id;\n\t}",
"function setId($id)\n\t{\n\t\t// Set id\n\t\t$this->_id\t = $id;\n\t}",
"public static function set($id)\n {\n self::$id = $id;\n }",
"public function setId($var){\n\t\t$this->id=$var;\n\t}",
"function set_id( $id ){\n\t\t$this->id = $id;\n\t\t// this is add request. so number is 0\n\t\tif( $this->id == $this->id_base ){\n\t\t\t$this->number = 0;\n\t\t\t$this->is_new = true;\n\t\t}\n\t\t// parse number\n\t\telse{\n\t\t\t$this->number = str_replace($this->id_base.'-', '', $this->id);\n\n\t\t\t// load instance data\n\t\t\t$this->instance = jcf_field_settings_get( $this->id );\n\t\t\tif( !empty($this->instance) ){\n\t\t\t\t$this->slug = $this->instance['slug'];\n\t\t\t}\n\t\t}\n\t}",
"public function setId($id){\n $this->id=$id;\n }",
"function setId($id) {\n\t\treturn $this->setData('id', $id);\n\t}",
"public function setId($id)\n {\n $this->_id = $id;\n }",
"public function setId($id)\r\n {\r\n $this->_id = (int) $id;\r\n }",
"public function setId($id)\n\t{\n\t\t$this->id = (int) $id;\n\t}",
"public function setId($id)\n\t\t{\n\t\t\t$this->id = $id;\n\t\t}",
"public function setId($id)\n\t{\n\t\t$this->id = $id;\n\t}",
"public function setId($id)\n\t{\n\t\t$this->id = $id;\n\t}",
"public function setId($id)\n\t{\n\t\t$this->id = $id;\n\t}",
"public function setId($id)\n\t{\n\t\t$this->id = $id;\n\t}",
"public function setId($id)\n {\n $this->_id = (int)$id;\n }",
"function setId($id) {\r\n\t\t// Set id and wipe data\r\n\t\t$this->_id = $id;\r\n\t}",
"function set_id($id)\r\n {\r\n $this->set_default_property(self :: PROPERTY_ID, $id);\r\n }",
"public function setID($_id) \n \t{\n \t\t$this->_id = $_id;\n \t}",
"public function setId($id) {\n $this->id = $id;\n }",
"public function setId($id) {\n $this->id = $id;\n }",
"public function setId($id) {\n $this->id = $id;\n }",
"public function setId($id) {\n $this->id = $id;\n }",
"public function setID($id){\n $this->ID = $id;\n }",
"public function setId($id){\n\t\t\t\t$this->id=$id;\n\t\t\t}",
"public function setId($id) {\n $this->id = $id;\n }",
"public function setId($id)\n {\n $this->id = $id;\n }",
"public function setId($id)\n {\n $this->id = $id;\n }",
"public function setId($id)\n {\n $this->id = $id;\n }",
"public function setId($id)\n {\n $this->id = $id;\n }",
"public function setId($id)\n {\n $this->id = $id;\n }",
"public function setId($id)\n {\n $this->id = $id;\n }",
"public function setId($id)\n {\n $this->id = $id;\n }",
"public function setId($id)\n {\n $this->id = $id;\n }",
"public function setId($id)\n {\n $this->id = $id;\n }",
"public function setId($id)\n {\n $this->id = $id;\n }",
"public function setId($id)\n {\n $this->id = $id;\n }",
"public function setId($id)\n {\n $this->id = $id;\n }"
] | [
"0.88871074",
"0.843179",
"0.8386374",
"0.82243615",
"0.8207132",
"0.8197505",
"0.8139511",
"0.81316125",
"0.8130276",
"0.81274986",
"0.8092258",
"0.80916125",
"0.807949",
"0.80521345",
"0.80423075",
"0.8040586",
"0.8028681",
"0.8028681",
"0.80261153",
"0.8006119",
"0.8002501",
"0.80008864",
"0.79958093",
"0.79923487",
"0.79879093",
"0.79750544",
"0.7966122",
"0.7966122",
"0.7966122",
"0.7961761",
"0.79594445",
"0.7944638",
"0.7944638",
"0.7937812",
"0.79355067",
"0.79330397",
"0.792408",
"0.79183996",
"0.790568",
"0.79031277",
"0.7896356",
"0.7891149",
"0.7891149",
"0.78905076",
"0.7888843",
"0.78869873",
"0.7884865",
"0.7884865",
"0.7884865",
"0.7884865",
"0.7884865",
"0.7882667",
"0.78793806",
"0.787181",
"0.78704524",
"0.7868695",
"0.78657496",
"0.78657496",
"0.78600323",
"0.78554225",
"0.7837032",
"0.7824912",
"0.782488",
"0.78234637",
"0.7819974",
"0.7815607",
"0.7811229",
"0.78052753",
"0.7797653",
"0.7787404",
"0.77867395",
"0.7781688",
"0.7772302",
"0.7768127",
"0.7766342",
"0.7766342",
"0.7766342",
"0.7766342",
"0.7764087",
"0.7759395",
"0.7751634",
"0.77469563",
"0.7746471",
"0.7746471",
"0.7746471",
"0.7746471",
"0.77461237",
"0.7740466",
"0.77401155",
"0.7731116",
"0.7731116",
"0.7731116",
"0.7731116",
"0.7731116",
"0.7731116",
"0.7731116",
"0.7731116",
"0.7731116",
"0.7731116",
"0.7731116",
"0.7731116"
] | 0.0 | -1 |
/ this file for main functions on website show styling success message | function success($msg = '', $url = 'index.php', $time = 3){
if ($msg == '') {
header("location: index.php");
exit();
} else {
echo '<div class="alert alert-success">';
echo '<h3 style="text-align:center">';
echo '<i class="fa fa-check"></i>';
echo " $msg successfully";
echo '</h3>';
echo '</div>';
// header("refresh: $time;url = $url");
// exit();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function success() {\n echo \"<br />\";\n \n echo \"Thank you for contacting us. We will be in touch with you very soon.\";\n \n echo \"<br />\";\n \n \n \n }",
"function feedbackAvaliador() {\n echo '<p class=\"feedback success\"><b>Revisor adicionado com sucesso.</b></p>';\n }",
"function formSuccess() {\n\n // Template\n $this->r->text['back_url'] = suxFunct::getPreviousURL();\n $this->r->title .= \" | {$this->r->gtext['success']}\";\n\n $this->tpl->display('success.tpl');\n\n }",
"function ufclas_matlab_admin_notice_success(){\n\t$message = ufclas_matlab_get_success();\n\t?>\n <div class=\"notice notice-success\">\n <p><?php echo __( 'Import successful. View the imported page: ', 'ufclas-matlab' ) . $message; ?> </p>\n </div>\n <?php\n\t\n}",
"function success($msg) {\n if ($msg) {\n echo \" <div class=\\\"success\\\">\" . $msg . \"</div>\\n\";\n } else {\n echo \" <div class=\\\"success\\\">\" . _('Something has been successfully performed. What exactly, however, will remain a mystery.') . \"</div>\\n\";\n }\n}",
"function outputStatusMessage($message, $status) {\n\t\techo '<div class=\"alert alert-'.$status.'\">'.$message.'</div>';\n\t}",
"function success_page($msg, $redirect_to = \"\", $redirect_time = 0)\n{\n page_header($redirect_to, $redirect_time);\n echo ' <div class=\"success\">'.$msg.'</div>';\n page_footer();\n exit;\n}",
"function _showStatus() {\r\n $okMessage = implode('<br />', $this->_okMessage);\r\n $errMessage = implode('<br />', $this->_errMessage);\r\n\r\n if (!empty($errMessage)) {\r\n $this->_objTpl->setVariable('FILEBROWSER_ERROR_MESSAGE', $errMessage);\r\n } else {\r\n $this->_objTpl->hideBlock('errormsg');\r\n }\r\n\r\n if (!empty($okMessage)) {\r\n $this->_objTpl->setVariable('FILEBROWSER_OK_MESSAGE', $okMessage);\r\n } else {\r\n $this->_objTpl->hideBlock('okmsg');\r\n }\r\n }",
"protected function renderAlertStatus() {}",
"function displaySuccessMessage($index,$params = array()) {\n\t\tglobal $lang;\n\t\n\t\treturn '<div class=\"alert alert-success\">'.getLang('form_success_'.$index,$params).'</div>';\n\t}",
"function successMsg($msg)\n{\n\treturn \"<div class=\\\"successMsg\\\">$msg</div>\";\n}",
"function successMsg($msg)\n{\n\treturn \"<div class=\\\"successMsg\\\">$msg</div>\";\n}",
"function displayNoticeWithStyle($arg) {\r\n if ($arg < 3) {\r\n echo '<div class=\"notice success\">';\r\n } else if ($arg == 3) {\r\n echo '<div class=\"notice warning\">';\r\n } else if ($arg > 3) {\r\n echo '<div class=\"notice error\">';\r\n }\r\n echo '<i class=\"icon-ok icon-large\">';\r\n}",
"public function license_success_message() {\n\t\t$message = __( 'Your Block Lab license was successfully activated!', 'block-lab' );\n\t\treturn sprintf( '<div class=\"notice notice-success\"><p>%s</p></div>', esc_html( $message ) );\n\t}",
"public function actionSuccess()\n\t{\n\t\t// using the default layout 'protected/views/layouts/main.php'\n\t\t\t\t\n\t\t$email = Yii::app()->request->getParam('email');\n\t\t$this->render('success', array('email'=>$email,'is_found'=>true));\n\t}",
"public function successMsg(){\n if(defined('PLUGIN_OPTIONS'))\n return $this->moduleSuccessMsg();\n return browser\\msg::pageNotFound();\n }",
"function put_success(string $message)\n{\n echo \"<aside class=\\\"notice success\\\">${message}</aside>\";\n}",
"function displaySuccessMsg() {\n\tif(isset($_SESSION['success'])) {\n\t\t// Set up row in accordance with Bootstrap grid\n\t\t/*echo '<div class=\"container\"><div class=\"row\"><div class=\"col-md-12\">';*/\n\t\techo '<div class=\"row\"><div class=\"col-md-12\">';\n\t\tforeach ($_SESSION['success'] as $success) {\n\t\t\techo '<p class=\"success\">',$success,'</p>';\n\t\t}\n\t\t/*echo '</div></div></div>';*/\n\t\techo '</div></div>';\n\t\t// Unset errors for page refresh\n\t\tunset ($_SESSION['success']);\n\t}\n}",
"function alert(){\r\n\tglobal $errors, $success,$warning;\r\n\r\n\t if (isset($errors) && !empty($errors)){\r\n\t\t$allerror = \"<ul>\";\r\n\t\tforeach($errors as $value){\r\n\t\t\t$allerror .= \"<li>$value </li>\";\r\n\t\t}\r\n\t\t$allerror .= \"</ul>\";\r\n\r\n\t\techo '<br><div class=\"alert alert-danger alert-block\"><h4>Error!</h4>'.$allerror.'</div>';\r\n\r\n\t}\r\n\r\n\telse if (isset($success)){\r\n\t\techo '<div class=\"alert alert-success\"><strong>Success! </strong>'.$success.'</div>';\r\n\t\t}\r\n\r\n\telse if (isset($warning)){\r\n\t\techo '<div class=\"alert\"><strong>Warning! </strong>'.$warning.'</div>';\r\n\t}\r\n}",
"function update_failed($msg1, $msg2)\n{\n\techo \"$msg1<br />\\n\";\n\techo \"<span style=\\\"color:red;\\\">$msg2</span>\\n\";\n\techo \"</p>\\n\\n</div>\\n\\n</body>\\n\\n</html>\\n\";\n\texit(1);\n}",
"function error_message($msg){\n $style='background-color: #FFAAAA; ';\n echo \"\\n\\n<span style='$style'>$msg</span>\\n\\n\";\n}",
"public function show_success_message() {\n\t\tif ( $this->have_settings_been_saved() ) {\n\t\t\techo '<p class=\"wpseo-message\"><span class=\"dashicons dashicons-yes\"></span>',\n\t\t\t\tesc_html__( 'Settings saved.', 'wordpress-seo' ),\n\t\t\t\t'</p>';\n\t\t}\n\t}",
"function mme_success_notice(){\n\t$msg = \"Email Id saved successfully\";\n\t?>\n\t <div class=\"updated\" style=\"margin:5px 2px 2px\">\n <p><?php _e( $msg, 'my-text-domain' ); ?></p>\n </div>\n\t<?\n\n}",
"function res_rabon($value, $success_text = 'Successful.'){\n\tif($value == \"Success\"){\n\t\treturn '<div class=\"callout callout-info\">'.$success_text.'</div>';\n\t}else{\n\t\treturn '<div class=\"callout callout-warning\">'.$value.'</div>';\n\t}\n\t\n\t\n\t}",
"function render_success_message( $form, $args ) {\n $success_message = $form['display']['success_message'];\n $success_message = apply_filters( 'af/form/success_message', $success_message, $form, $args );\n $success_message = apply_filters( 'af/form/success_message/id=' . $form['post_id'], $success_message, $form, $args );\n $success_message = apply_filters( 'af/form/success_message/key=' . $form['key'], $success_message, $form, $args );\n\n $success_message = af_resolve_merge_tags( $success_message );\n \n echo '<div class=\"af-success\" aria-live=\"assertive\" role=\"alert\">';\n \n echo $success_message;\n \n echo '</div>';\n }",
"function show_message($msg=\"\"){\n\t\tswitch($msg){\n\t\t\tcase 'business_location_success':\n\t\t\t\t$msg=\"<div class='message success'>Thank You, Business Destination Updated</div>\";\n\t\t\tbreak;\n\t\t\tcase 'offer_update_success':\n\t\t\t\t$msg=\"<div class='message success'>Offer Updated</div>\";\n\t\t\tbreak;\n\t\t\tcase 'offer_add_success':\n\t\t\t\t$msg=\"<div class='message success'>Offer Added</div>\";\n\t\t\tbreak;\n\t\t\tcase 'booking_update_success':\n\t\t\t\t$msg=\"<div class='message success'>Booking Updated</div>\";\n\t\t\tbreak;\n\t\t\tcase 'room_update_success':\n\t\t\t\t$msg=\"<div class='message success'>Room Updated</div>\";\n\t\t\tbreak;\n\t\t\tcase 'room_add_success':\n\t\t\t\t$msg=\"<div class='message success'>Room Added</div>\";\n\t\t\tbreak;\n\t\t\tcase 'house_update_success':\n\t\t\t\t$msg=\"<div class='message success'>House Updated</div>\";\n\t\t\tbreak;\n\t\t\tcase 'house_add_success':\n\t\t\t\t$msg=\"<div class='message success'>House Added</div>\";\n\t\t\tbreak;\n\t\t\tcase 'package_update_success':\n\t\t\t\t$msg=\"<div class='message success'>Package Updated</div>\";\n\t\t\tbreak;\n\t\t\tcase 'package_add_success':\n\t\t\t\t$msg=\"<div class='message success'>Package Added</div>\";\n\t\t\tbreak;\n\t\t\tcase 'property_update_success':\n\t\t\t\t$msg=\"<div class='message success'>Property updated</div>\";\n\t\t\tbreak;\n\t\t\tcase 'property_insert_success':\n\t\t\t\t$msg=\"<div class='message success'>Property added to database</div>\";\n\t\t\tbreak;\n\t\t\tcase 'image_upload_success':\n\t\t\t\t$msg=\"<div class='message success'>Images uploaded</div>\";\n\t\t\tbreak;\n\t\t\tcase 'image_upload_success_partially':\n\t\t\t\t$msg=\"<div class='message success'>Images uploaded (some images skipped due to size limit)</div>\";\n\t\t\tbreak;\n\t\t\tcase 'image_upload_error':\n\t\t\t\t$msg=\"<div class='message error'>Error uploading images</div>\";\n\t\t\tbreak;\n\t\t\tcase 'image_upload_error_no_files_selected':\n\t\t\t\t$msg=\"<div class='message error'>No files selected</div>\";\n\t\t\tbreak;\n\t\t\tcase 'image_upload_error_no_user':\n\t\t\t\t$msg=\"<div class='message error'>Error locating property owner, please contact administrator</div>\";\n\t\t\tbreak;\n\t\t\tcase 'form_missing_fields':\n\t\t\t\t$msg=\"<div class='message error'>Error: please enter fields where required</div>\";\n\t\t\tbreak;\n\t\t\tcase 'set_rate_no_selection':\n\t\t\t\t$msg=\"<div class='message error'>Skipped action, nothing selected for update</div>\";\n\t\t\tbreak;\n\t\t\tcase 'set_rate_success':\n\t\t\t\t$msg=\"<div class='message success'>Rates updated</div>\";\n\t\t\tbreak;\n\t\t\tcase 'db_error':\n\t\t\t\t$msg=\"<div class='message error'>Database connection error, please contact administrator</div>\";\n\t\t\tbreak;\n\t\t\tcase 'access_denied':\n\t\t\t\t$msg=\"<div class='message error'>Sorry, you don't have permissions to view this page</div>\";\n\t\t\tbreak;\n\t\t}\n\t\t$this->set_html('system_message',$msg);\n\t\treturn $this;\n\t}",
"function success($output)\n{\n output(\"<fg=green;options=bold>$output</>\");\n}",
"function EchoDOMSuccess($innerTEXT)\n{\n echo (\"<div class=\\\"alert alert-success\\\">$innerTEXT</div>\");\n}",
"private function alert($message) {\n\t $this->load->helper('html'); \n\t $this->data['error'] = heading($message,3);\n\t}",
"protected function add_comment_success_message(){\r\n\t\treturn 'Thank you for <a href=\"#comments\" class=\"scroll\">commenting</a>.';\r\n\t}",
"function statusMessage()\n {\n }",
"function display_login_notice()\n\t\t{\n\t\t\t?>\n\t\t\t\t<div class=\"cv-main-wrapper\">\n\t\t\t\t\t<div class=\"container\">\n\t\t\t <div class=\"cv-heading\">\n\t\t\t <h1 class=\"pt-5\">Please Login to your account before checkout.</h1>\n\t\t\t </div>\n\t\t\t\t </div>\n\t\t\t\t</div>\n\t\t\t<?php\n\t\t}",
"function showSuccess($feedback)\n{\n showFeedback(new AlertMessage(AlertMessage::STYLE_SUCCESS, $feedback));\n}",
"public function successAction()\r\n {\r\n View::renderTemplate('Signup/success.html');\r\n }",
"function wpass_after_status_delete_notice() {\r\n\t\r\n\t$class = 'notice notice-error';\r\n\t$message = __( 'Failed : Status is linked with open tickets', 'sample-text-domain' );\r\n\r\n\tprintf( '<div class=\"%1$s\"><p>%2$s</p></div>', $class, $message ); \r\n\t\r\n}",
"function actionresults($successtext)\r\n\t\t{\r\n\t\t\t$conf = new layout_setup;\r\n\r\n\t\t\t$this->pagelayout .= '<center>\r\n<table bordercolor=\"#'.$conf->calendar_border_color.'\" width=\"450\" cellspacing=\"0\" cellpadding=\"4\" border=\"1\">\r\n<tr>\r\n<td nowrap bgcolor=\"#'.$conf->calendar_title_background_color.'\" align=\"center\" width=\"100%\">\r\n<font size=\"3\" point-size=\"14\" color=\"#'.$conf->calendar_title_text_color.'\">'.$successtext.'</font>\r\n</td>\r\n</tr>\r\n</table>\r\n</center>\r\n';\r\n\t\t}",
"function form_success() {\n\t\t$this->sci->da('template');\n\t}",
"function successAlert($msgText)\n\t{\n\t\t$msgSuccess = \"<div class='alert alert-success alert-dismissible fade show'>\n\t\t\t\t\t\t<button type='button' class='close' data-dismiss='alert'>×</button>\n\t\t\t\t\t\t\" . $msgText . \"\n\t\t\t\t\t\t</div>\";\n\t\treturn $msgSuccess;\n\t}",
"public function successAction()\n {\n View::renderTemplate('Signup/success.html');\n }",
"function displaySuccess( $type )\n\t{\n\t\t$displaySuccess = '<div class=\"row\">';\n\t\t$displaySuccess .= '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"100\" height=\"100\" fill=\"currentColor\" class=\"bi bi-check-circle my-5 text-muted\" viewBox=\"0 0 16 16\">';\n\t\t$displaySuccess .= '<path d=\"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z\"/>';\n\t\t$displaySuccess .= '<path d=\"M10.97 4.97a.235.235 0 0 0-.02.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-1.071-1.05z\"/>';\n\t\t$displaySuccess .= '</svg>';\n\t\t$displaySuccess .= '';\n\t\t$displaySuccess .= '</div>';\n\t\t$displaySuccess .= '<div class=\"row\">';\n\t\t$displaySuccess .= '<h1 class=\"text-center text-muted mt-3 mb-5\">' . $type . '</h1></div>';\n\n\t\treturn $displaySuccess;\n\t}",
"public function actionSuccess()\n {\n return $this->render('success');\n }",
"public function printSuccessMessage()\n {\n printf('Successfully checked %d lines in %d files :)'. PHP_EOL, $this->lines, $this->files);\n }",
"private static function success(string $message): void\n {\n echo \"\\033[42m\\033[30m\" . $message . \"\\033[0m\" . PHP_EOL;\n }",
"function message_compare_sleep_fit($addClass,$contentMessage){\n\t\techo \"<div class='alert alert-$addClass'>\n\t\t\t\t<span class='fa fa-bell fa-2x'></span><br>\n\t\t\t\t<label> $contentMessage </label>\n\t\t\t</div>\";\n\t}",
"public function render_notice() {\n\t\t$theme = wp_get_theme();\n\t\t$slug = $theme->__get( 'stylesheet' );\n\t\t$name = $theme->__get( 'Name' );\n\t\t$url = admin_url( 'themes.php?page=' . $slug . '-welcome' );\n\t\t$notice = apply_filters( 'ti_about_welcome_notice_filter', ( '<p>' . sprintf( 'Welcome! Thank you for choosing %1$s! To fully take advantage of the best our theme can offer please make sure you visit our %2$swelcome page%3$s.', $name, '<a href=\"' . esc_url( admin_url( 'themes.php?page=' . $slug . '-welcome' ) ) . '\">', '</a>' ) . '</p><p><a href=\"' . esc_url( $url ) . '\" class=\"button\" style=\"text-decoration: none;\">' . sprintf( 'Get started with %s', $name ) . '</a></p>' ) );\n\n\t\techo wp_kses_post( $notice );\n\t}",
"function sample_admin_notice__success() {\n ?>\n <div class=\"notice notice-success is-dismissible\">\n <p><?php _e( 'RAR Example Plugin Installed!', 'sample-text-domain' ); ?></p>\n </div>\n <?php\n}",
"protected function outputSuccessMessage(string $message)\n {\n $this->outputLine(\"<fg=green>$message</>\");\n }",
"function showMessage($message, $errormsg = false)\n{\n\t\n if ($errormsg) {\n echo '<div id=\"message\" class=\"error\">';\n }\n else {\n echo '<div id=\"message\" class=\"updated notice notice-success is-dismissible\">';\n }\n\n echo \"<p>$message</p></div>\";\n}",
"public function notice_success( $itens = '' ) {\n\t\t$class = 'notice notice-success is-dismissible';\n\t\t$message = __( 'Sync completed successfully.', 'elemarjr' );\n\t\treturn sprintf( '<div class=\"%1$s\"><p>%2$s</p>%3$s</div>', esc_attr( $class ), esc_html( $message ), wp_kses_post( $itens ) );\n\t}",
"function flash_msg(){ ?>\r\n <?php if(isset($_SESSION['success'])): ?>\r\n <p style=\"color: green\"><?= htmlentities($_SESSION['success']) ?></p>\r\n <?php unset($_SESSION['success']); ?>\r\n <?php elseif(isset($_SESSION['failure'])): ?>\r\n <p style=\"color: red\"><?= htmlentities($_SESSION['failure']) ?></p>\r\n <?php unset($_SESSION['failure']); ?>\r\n <?php endif; ?>\r\n<?php }",
"function outputResultMessage()\n {\n global $application;\n\n if (!is_array($this -> _Errors) && $this -> _Errors != 'Success')\n return '';\n\n $template_contents = array(\n 'ResultMessage' => (($this -> _Errors == 'Success')\n ? getMsg('CTL', 'CTL_PGE_MSG_SUCCESS')\n : getMsg('CTL', 'CTL_PGE_MSG_ERROR')),\n 'ResultMessageColor' => (($this -> _Errors == 'Success')\n ? 'green'\n : 'red')\n );\n $this -> _Template_Contents = $template_contents;\n $application -> registerAttributes($this -> _Template_Contents);\n return $this -> mTmplFiller -> fill(\n 'catalog/product_group_edit/',\n 'result-message.tpl.html',\n array()\n );\n }",
"public function displayAjaxSaveColor()\n {\n $color1 = Tools::getValue('color1');\n $color2 = Tools::getValue('color2');\n $result = false;\n\n if (!empty($color1) && !empty($color2)) {\n $result = Configuration::updateValue('PSR_ICON_COLOR', $color1)\n && Configuration::updateValue('PSR_TEXT_COLOR', $color2);\n }\n\n // Response\n $this->ajaxRenderJson($result ? 'success' : 'error');\n }",
"function showMessage2($message, $errormsg = false)\n{\n if ($errormsg) {\n echo '<div id=\"message\" class=\"error\">';\n }\n else {\n echo '<div id=\"message\" class=\"updated fade\" style=\"margin-left: 0px; margin-right: 0px;\">';\n }\n\n echo \"<p>$message</p></div>\";\n}",
"function custom_success( $msg, $success ) {\n\n\t\tif ( $success == 'mycred_transfer_done' ) {\n\t\t\t$msg = __( 'Points transferred successfully', 'twodayssss' );\n\t\t}\n\n\t\treturn $msg;\n\t}",
"function flash_lunas() {\n\n\n return '<span class=\"badge badge-success text-light p-2\">LUNAS</span>';\n}",
"protected function printOkBoxMessage($message){\n ?>\n <div class=\"alert alert-success\">\n <strong>OK! </strong> <?php echo $message ?>\n </div>\n <?php \n }",
"function showFeedback(AlertMessage $alertMessage)\n{\n if (isset($alertMessage) && $alertMessage->isComplete()) {\n echo '</br><div class=\"alert alert-' . $alertMessage->getStyle() . '\" role=\"alert\">' . $alertMessage->getMessage() . '</div>';\n }\n}",
"function wpfme_login_obscure(){ return '<strong>Sorry</strong>: Think you have gone wrong somwhere!';}",
"public function get_success_message() {\r\n\t\treturn '';\r\n\t}",
"function printSessionSuccessMessage(){\n\t\tif (!empty($_SESSION[\"successMessage\"])) {\n\t\t\techo(\"<div class=\\\"alert alert-success alert-dismissible fade show text-center\\\" role=\\\"alert\\\">\" \n\t\t\t\t. $_SESSION[\"successMessage\"] \n\t\t\t\t. \"<button type=\\\"button\\\" class=\\\"close\\\" data-dismiss=\\\"alert\\\">×</span></button></div>\");\n\t\t}\n\t}",
"public function globalAlert() {\n if ($this->checkError()) {//check for error messages\n if ($this->errorIsSet('database')) {//check if a database error was set\n return '<div class=\"alert alert-danger\" role=\"alert\"><i class=\"fas fa-exclamation-circle\"></i>'\n .$this->getDatabaseError().'</div>';\n }\n }\n\n if ($this->checkSucces()) {//check for succes messages\n if ($this->succesIsSet('login')) {//check for any login message\n return '<div class=\"alert alert-success\" role=\"alert\"><i class=\"far fa-check-circle\"></i>'\n .$this->getGlobalSuccesMessage('login').'</div>';\n }\n\n if ($this->succesIsSet('register')) {//check for any register message\n return '<div class=\"alert alert-success\" role=\"alert\"><i class=\"far fa-check-circle\"></i>'\n .$this->getGlobalSuccesMessage('register').'</div>';\n }\n \n if ($this->succesIsSet('logout')) {//check for any logout message\n return '<div class=\"alert alert-success\" role=\"alert\"><i class=\"far fa-check-circle\"></i>'\n .$this->getGlobalSuccesMessage('logout').'</div>';\n }\n }\n return '';\n }",
"function message_mistake_validator($content) {\n\t\techo \"<div class='alert alert-danger'>\n\t\t\t\t<strong>Aviso!</strong><br>$content\n\t\t\t</div>\";\n\t}",
"function feedback($messages, $type = \"error\", $style = '')\n{\n\tif (!is_array($messages))\n\t\t$messages = array($messages);\n\n\techo '\n\t<div class=\"notice ' .(($type == \"error\")? \"warning\" : \"info\"). '\" style=\"' .$style. '\">\n\t\t<div class=\"inner_notice\">\n\t\t<ul>';\n\t\n\tforeach ($messages as $message)\n\t\techo \"<li>\" .$message. \"</li>\";\n\t\n\techo '\n\t\t</ul>\n\t\t</div>\n\t</div>';\n}",
"function flash_belum_lunas() {\n\n\n return '<span class=\"badge badge-danger text-light p-2\">BELUM LUNAS</span>';\n}",
"protected function confirm_add()\n\t{\n\t\t$msg = 'Successfully added project ' . $this->fields['Title'] . '.';\n\t\treturn '<font color=\"green\">' . $msg . '</font><br>';\n\n\t}",
"function show_wait_message()\n\t\t{\n\t\t\tif(!@is_object($GLOBALS['egw']->js))\n\t\t\t{\n\t\t\t\t$GLOBALS['egw']->js =& CreateObject('phpgwapi.javascript');\n\t\t\t}\n\t\t\t$please_wait=lang('Please wait, task in progress ...');\n\t\t\t$GLOBALS['egw_info']['flags']['java_script'] .= '<script type=\"text/javascript\">\n\t\t\t\tdocument.write(\\'<DIV id=\"loading\"><BR><BR>\\'+\"'.$please_wait.'\" +\\'</DIV>\\');\n\t\t\t\tfunction hide_loading()\n\t\t\t\t{\n\t\t\t\t\tdocument.getElementById(\"loading\").style.display=\"none\";\n\t\t\t\t}</script>';\n\t\t\t$GLOBALS['egw']->js->set_onload('hide_loading();');\n\t\t}",
"function formatStatus ($txt, $exit_code = 4)\n{\n\t$green = '#66bb6a';\n\t$red = '#f0666c';\n\t$orange = '#ffe57b';\n\t$grey = '#5f6268';\n\t$white = '#fff';\n\t\n\tif ($exit_code == 0)\n\t\t$output = '<span style=\"background-color:'. $green . '; color: ' . $white . '; padding: 1px 3px;\">'. $txt . '</span>';\n\t\n\telseif ($exit_code == 1)\n\t\t$output = '<span style=\"background-color:'. $orange . '; color: ' . $grey . '; padding: 1px 3px;\">'. $txt . '</span>';\n\t\n\telseif ($exit_code == 2)\n\t\t$output = '<span style=\"background-color:'. $red . '; color: ' . $white . '; padding: 1px 3px;\">'. $txt . '</span>';\n\telse\n\t\t$output = $txt;\n\n\treturn $output;\n}",
"public function parallax_one_welcome_admin_notice() {\n\t\t?>\n\t\t\t<div class=\"updated notice is-dismissible\">\n\t\t\t\t<p><?php echo sprintf( esc_html__( 'Welcome! Thank you for choosing Parallax One! To fully take advantage of the best our theme can offer please make sure you visit our %swelcome page%s.', 'parallax-one' ), '<a href=\"' . esc_url( admin_url( 'themes.php?page=parallax-one-welcome' ) ) . '\">', '</a>' ); ?></p>\n\t\t\t\t<p><a href=\"<?php echo esc_url( admin_url( 'themes.php?page=parallax-one-welcome' ) ); ?>\" class=\"button\" style=\"text-decoration: none;\"><?php _e( 'Get started with Parallax One', 'parallax-one' ); ?></a></p>\n\t\t\t</div>\n\t\t<?php\n\t}",
"function optionsframework_page_notice() { ?>\r\n\t\r\n\t\t<div class=\"wrap\">\r\n\t\t<?php screen_icon( 'themes' ); ?>\r\n\t\t<h2><?php _e(\"Theme Options\", 'organicthemes'); ?></h2>\r\n <p><b><?php _e(\"This theme requires the Options Framework plugin installed and activated to manage your theme options.\", 'organicthemes'); ?> <a href=\"<?php echo admin_url('plugin-install.php?tab=plugin-information&plugin=options-framework&TB_iframe=true&width=640&height=517'); ?>\" class=\"thickbox onclick\"><?php _e(\"Install Now\", 'organicthemes'); ?></a></b></p>\r\n\t\t</div>\r\n\t\t<?php\r\n\t}",
"public function showNotice() {\n\t\t// Translators: 1 - The plugin name (\"AIOSEO).\n\t\t$string1 = sprintf( __( '%1$s V3->V4 Migration In Progress', 'all-in-one-seo-pack' ), AIOSEO_PLUGIN_SHORT_NAME );\n\t\t// Translators: 1 - The plugin name (\"All in One SEO\").\n\t\t$string2 = sprintf( __( '%1$s is currently upgrading your database and migrating your SEO data in the background.', 'all-in-one-seo-pack' ), AIOSEO_PLUGIN_NAME );\n\t\t$string3 = __( 'This notice will automatically disappear as soon as the migration has completed. Meanwhile, everything should continue to work as expected.', 'all-in-one-seo-pack' );\n\t\t?>\n\t\t<div class=\"notice notice-info aioseo-migration\">\n\t\t\t<p><strong><?php echo esc_html( $string1 ); ?></strong></p>\n\t\t\t<p><?php echo esc_html( $string2 ); ?></p>\n\t\t\t<p><?php echo esc_html( $string3 ); ?></p>\n\t\t</div>\n\t\t<style>\n\t\t</style>\n\t\t<?php\n\t}",
"function display_admin_notice()\n\t{\n /* Ask The Question: \"Does Your Child Theme Work?\" To Improve Our Child Theme Library */\n\t\tglobal $wpdb;\n\t\t$table_name = esc_attr($wpdb->prefix.'childthemewp');\n\t\t$childthemeconfirmed = $wpdb->get_results(\"SELECT datavalue FROM $table_name ORDER BY id DESC LIMIT 1\");\n\t\tif(empty($childthemeconfirmed))\n\t\t{\n\t\t\t?>\n\t\t\t<div class=\"notice notice-success\"><p><strong>Message from ChildThemeWP.com:</strong> Confirm your child theme work?\n\t\t\t\t<a href=\"./options-general.php?page=childthemewpdotcom&childthemewpconfirm=Yes\">Yes my child theme works</a> or \n\t\t\t\t<a href=\"./options-general.php?page=childthemewpdotcom&childthemewpconfirm=No\">No my child theme does not work</a></p>\n\t\t\t</div>\n <?php\n\t\t}\n\n\n /* Save Answer To: \"Does Your Child Theme Work?\" To Improve Our Child Theme Library */\n if(isset($_GET[\"childthemewpconfirm\"]))\n {\n $safe_childthemewpconfirm = esc_attr($_GET[\"childthemewpconfirm\"]);\n unset($_GET[\"childthemewpconfirm\"]);\n\n $wpdb->insert('wp_childthemewp', array(\n 'id' => '',\n 'datavalue' => $safe_childthemewpconfirm\n ));\n\n if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on')\n {\n $link = \"https\";\n }\n else\n {\n $link = \"http\";\n }\n $link .= \"://\";\n $link .= $_SERVER['HTTP_HOST'];\n\n $theme = get_template();\n\n $query = http_build_query([\n 'site' => $link,\n 'theme' => $theme\n ]);\n\n if($safe_childthemewpconfirm == \"Yes\")\n {\n $type= \"success.php?\" . $query;\n }\n else\n {\n $type= \"fail.php?\" . $query;\n }\n\n /* We Log Answers To \"Does Your Child Theme Work?\" To Improve Our Child Theme Library */\n $ch = curl_init('https://childthemewp.com/report/' . $type);\n curl_setopt($ch, CURLOPT_TIMEOUT, 5);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 0);\n $data = curl_exec($ch);\n curl_close($ch);\n }\n\t}",
"public function alert() {\n\t\t/*$alert = \"<div class='alert alert-dismissible'>\";\n\t\t$alert .= \"<button type='button' class='close' data-dismiss='alert' aria-label='Close'><span aria-hidden='true'>×</span></button>\";\n\t\t$alert .= $this->message.\"</div>\";*/\n\t\treturn \"alert('danger','A database error has occurred');\";\n\t}",
"public static function admin_notice() {\r\n\t\techo '<div class=\"error\">';\r\n\t\techo '<p>' . esc_html( __( 'Your server does not support communication with servers over HTTPS.', 'inf-member' ) ) . '</p>';\r\n\t\techo '</div>';\r\n\t}",
"function displayAlert($message, $style)\n {\n $error_alert = \"\";\n \n switch($style)\n {\n case 'warning':\n $error_alert = '<div class=\"alert alert-warning alert-dismissible fade show\" role=\"alert\">\n <strong><span class=\"mdi mdi-alert mr-1\" aria-hidden=\"true\"></span>\n <span class=\"sr-only\">WARNING</span></strong>'.$message.'\n <button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\">\n <span class=\"mdi mdi-close\" aria-hidden=\"true\"></span>\n <span class=\"sr-only\">close</span>\n </button>\n </div>';\n break;\n case 'error':\n $error_alert = '<div class=\"alert alert-danger alert-dismissible fade show\" role=\"alert\">\n <strong><span class=\"mdi mdi-alert-circle mr-1\" aria-hidden=\"true\"></span>\n <span class=\"sr-only\">ERROR</span></strong>'.$message.'\n <button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\">\n <span class=\"mdi mdi-close\" aria-hidden=\"true\"></span>\n <span class=\"sr-only\">close</span>\n </button>\n </div>';\n break;\n }\n \n return $error_alert;\n }",
"function showMessage($message=\"\") {\n\t\tif (empty($message) && !empty($this->wassup_alert_message)) {\n\t\t\t$message = $this->wassup_alert_message;\n\t\t}\n\t\t//#check for error message/notice message\n\t\tif (stristr($message,\"error\") !== FALSE || stristr($message,\"problem\") !== FALSE) {\n\t\t\techo '<div id=\"wassup-error\" class=\"fade error\" style=\"color:#d00;padding:10px;\">'.$message;\n\t\t\t//print_r($this); // #debug\n\t\t\techo '</div>'.\"\\n\";\n\t\t} else {\n\t\t\techo '<div id=\"wassup-message\" class=\"fade updated\" style=\"color:#040;padding:10px;\">'.$message;\n\t\t\t//print_r($this); // #debug\n\t\t\techo '</div>'.\"\\n\";\n\t\t}\n\t}",
"function show_message( $message, $errormsg = false )\n\t{\n\t\tif ( $errormsg ) {\n\t\t\techo '<div id=\"message\" class=\"error\">';\n\t\t} else {\n\t\t\techo '<div id=\"message\" class=\"updated fade\">';\n\t\t}\n\t\techo \"<p><strong>$message</strong></p></div>\";\n\t}",
"function tm_admin_notice_css_writable() {\n\t$class = \"error\";\n\t$file = '<code>'.get_template_directory().'/css/dynamic-style.css</code>';\n\t$message = '<strong>'.__('Howes Theme Notice:','howes').'</strong><br>';\n\t$message .= __('The file \"dynamic-style.css\" is not writeable. Please contact your hosting serivice provider and ask them to solve the issue.','howes');\n\t$message .= ' '.sprintf( __('The file location is %s.','howes'), $file );\n\t\n\techo \"<div class=\\\"$class\\\"> <p>$message</p></div>\"; \n}",
"function print_warning($val) {\n\n\nreturn \"<font color=\\\"red\\\">$val</font>\";\n}",
"public function success();",
"public static function printErrors() {\n\t\tif (PNApplication::hasErrors()) {\n\t\t\tforeach (PNApplication::$errors as $e)\n\t\t\t\techo \"<div style='color:#C00000;font-familiy:Tahoma;font-size:10pt'><img src='\".theme::$icons_16[\"error\"].\"' style='vertical-align:bottom'/> \".$e.\"</div>\";\n\t\t\techo \"<script type='text/javascript'>\";\n\t\t\techo \"if (typeof window.top.status_manager != 'undefined'){\";\n\t\t\tforeach (PNApplication::$errors as $e)\n\t\t\t\techo \"window.top.status_manager.addStatus(new window.top.StatusMessageError(null,\".json_encode($e).\",5000));\";\n\t\t\techo \"};\";\n\t\t\techo \"window.page_errors=[\";\n\t\t\t$first = true;\n\t\t\tforeach (PNApplication::$errors as $e) {\n\t\t\t\tif ($first) $first = false; else echo \",\";\n\t\t\t\techo json_encode($e);\n\t\t\t}\n\t\t\techo \"];\";\n\t\t\techo \"</script>\";\n\t\t}\n\t\tif (PNApplication::hasWarnings()) {\n\t\t\techo \"<script type='text/javascript'>\";\n\t\t\techo \"if (typeof window.top.status_manager != 'undefined'){\";\n\t\t\tforeach (PNApplication::$warnings as $e)\n\t\t\t\techo \"window.top.status_manager.addStatus(new window.top.StatusMessage(window.top.Status_TYPE_WARNING,\".json_encode($e).\",[{action:'popup'},{action:'close'}],5000));\";\n\t\t\techo \"};\";\n\t\t\techo \"</script>\";\n\t\t}\n\t}",
"public function error() {\n require_once($_SERVER['DOCUMENT_ROOT'] . '../PHPIncludes/pageLinkScriptsCSS.php');\n\n $pageRequirements = new pageLinkScriptsCSS();\n\n $pageRequirements->add(\"css\", ['error.css']);\n\n $pageRequirements->add(\"title\", 'The Sky Is Falling');\n\n callStructural('header','std',$pageRequirements);\n\n require_once('views/pages/error.php');\n\n //Render the page footer:\n callStructural(\"footer\", 'std', $pageRequirements); \n\n }",
"function get_warning_error_div($msg_arg,$warning_me=false) {\n $msg=\"\";\n\n if($warning_me){$alert=\"warning\"; $gliphicon=\"warning-sign\";$txt=\"Warning\"; }else { $alert=\"danger\"; $gliphicon=\"exclamation-sign\";$txt=\"Error\"; }\n\n // {$alert} {$gliphicon} {$txt}\n if($msg_arg){\n $msg.= \"<div class=\\\"alert alert-{$alert}\\\" role='alert'>\";\n $msg.=\"<a href='#' class='close' data-dismiss='alert'>×</a>\";\n $msg.=\"<span class=\\\"glyphicon glyphicon-{$gliphicon}\\\" aria-hidden='true'></span>\";\n $msg.=\"<span class=\\\"sr-only\\\"><strong>{$txt}:</strong></span>\";\n $msg.=\" \". $msg_arg;\n $msg .= \"</div>\";\n } else {\n $msg=\"\";\n }\n\n return $msg;\n\n\n}",
"public function render() { ?>\n <!-- Message alert -->\n <div class=\"alert alert-dismissable fade in\" id=\"message-alert\">\n <button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\">\n <span aria-hidden=\"true\">×</span>\n </button>\n <h4 id=\"message-alert-title\"></h4>\n <span id=\"message-alert-body\"></span>\n </div>\n <!-- Message alert end -->\n <?php\n }",
"public function error() {\n require_once($_SERVER['DOCUMENT_ROOT'] . '../PHPIncludes/pageLinkScriptsCSS.php');\n\n $pageRequirements = new pageLinkScriptsCSS();\n\n $pageRequirements->add(\"css\", ['error.css']);\n\n $pageRequirements->add(\"title\", 'The Sky Is falling');\n\n callStructural('header','std',$pageRequirements);\n\n require_once('views/pages/error.php');\n\n //Render the page footer:\n callStructural(\"footer\", 'std', $pageRequirements); \n\n\n }",
"public function redAndFlash($result) {\r\n\t\tif (!$result) {\r\n\t\t\t$this->presenter->flashMessage(\"Operation failed. Please repeat in a while\", \"danger\");\r\n\t\t} else {\r\n\t\t\t$this->presenter->flashMessage(\"Your request was proceeded smoothly\");\r\n\t\t}\r\n\t\t$this->redirect(\"this\");\r\n\t}",
"function contact_form($type, $message){\r\n global $response;\r\n if($type == \"success\") $response = \"<div class='col-md-12'><div class='alert alert-success'>{$message}</div></div>\";\r\n else $response = \"<div class='col-md-12'><div class='alert alert-danger'>{$message}</div></div>\";\r\n }",
"function my_contact_form_generate_response($type, $message){\r\n \r\n global $response;\r\n \r\n if($type == \"success\") $response = \"<div class='success'>{$message}</div>\";\r\n else $response = \"<div class='error'>{$message}</div>\";\r\n }",
"function cis_login_get_errors(){\n\n\tglobal $cis_login_error;\n\t$html = \"<div id=\\\"message\\\" class=\\\"error\\\"><ul>\\n\";\n\n\tif(!count($cis_login_error)) return false;\n\tforeach($cis_login_error as $err)\n\t\t$html .= \"<li>{$err}</li>\\n\";\n\n\twp_enqueue_style('colors');\n\treturn $html .= \"</ul>\\n</div>\\n\";\n}",
"function showAlert($type, $msg) {\n\techo '<div class=\"alert alert-'.$type.'\" style=\"margin:0 auto;margin-bottom:20px;padding:5px;width:250px;font-weight:bold;\">';\n\techo \t$msg;\n\techo '</div>';\n}",
"public function renderNotifyMessage() {\n if (Yii::app()->user->hasFlash('beFormAction')) {\n echo '<div class=\"alert alert-success\" role=\"alert\">\n\t\t\t\t<button type=\"button\" class=\"close\" data-dismiss=\"alert\"><span aria-hidden=\"true\">×</span><span class=\"sr-only\">Close</span></button>'\n . Yii::app()->user->getFlash('beFormAction') .\n '</div>';\n }\n\n if (Yii::app()->user->hasFlash('beFormError')) {\n echo '<div class=\"alert alert-danger\" role=\"alert\">\n\t\t\t\t<button type=\"button\" class=\"close\" data-dismiss=\"alert\"><span aria-hidden=\"true\">×</span><span class=\"sr-only\">Close</span></button>'\n . Yii::app()->user->getFlash('beFormError') .\n '</div>';\n }\n }",
"public function admin_notices()\n {\n if (isset($_GET['wpstg_licensing']) && !empty($_GET['message'])) {\n\n $message = urldecode($_GET['message']);\n\n switch ($_GET['wpstg_licensing']) {\n case 'false':\n ?>\n <div class=\"wpstg-error\" style=\"font-weight:500;\">\n <p><?php _e('WP Staging - Can not activate license key! ', 'wp-staging');\n echo $message; ?></p>\n </div>\n <?php\n break;\n\n case 'true':\n default:\n // Put a custom success message here for when activation is successful if they way.\n ?>\n <!--\t\t\t\t<div class=\"success\">\n <p><?php echo $message; ?></p>\n </div>-->\n <?php\n break;\n }\n }\n }",
"function display_warning_page($message)\r\n {\r\n $this->display_header();\r\n $this->display_warning_message($message);\r\n $this->display_footer();\r\n }",
"function errorMsgForClient()\n{\n // TELLS THE CUSTOMER ONLY WHAT HE NEEDS TO KNOW. NOT MORE. ( BOTH FOR SAFETY & ABSTRACTION)\n\n echo (\"The website is facing difficulty due to some technical issues. Our Engineers are working on it. Please come back later\");\n\n}",
"protected function confirm_edit()\n\t{\n\t\t$msg = 'Successfully modified project ' . $this->fields['Title'] . '.';\n\t\treturn '<font color=\"green\">' . $msg . '</font><br>';\n\n\t}",
"public function showFailed();",
"function my_contact_form_generate_response($type, $message){\n \n global $response;\n \n if($type == \"success\") $response = \"<div class='success'>{$message}</div>\";\n else $response = \"<div class='error'>{$message}</div>\";\n \n }",
"function wp_ajax_health_check_site_status_result()\n {\n }",
"function showError(){\n\t\techo json_encode(array(\n\t\t\t\"alert\" => \"error\",\n\t\t\t\"title\" => \"Failed to Update!\",\n\t\t\t\"message\" => \"Program Updating has been Failed\"\n\t\t));\n\t}",
"public function html()\n {\n $html = '';\n if (!empty($this->error)) {\n $html = \"<div class='alert alert-danger fade in' role='alert'>\n <button type='button' class='close' data-dismiss='alert' aria-label='Close'><span aria-hidden='true'>×</span></button>\";\n $html .= '<ul>';\n foreach ($this->error as $error) {\n if (is_array($error)) {\n $html .= '<li>' . $error[0] . '</li>';\n $html .= '<script>jQuery(\"document\").ready(function(){jQuery(\"#' . $error[1] . '\").parent().closest(\"div\").addClass(\"has-error\");});</script>';\n } else {\n $html .= '<li>' . $error . '</li>';\n }\n\n }\n $html .= '</ul></div>';\n\n }\n if (!empty($this->ok)) {\n $html .= \"<div class='alert alert-success fade in' role='alert'>\n <button type='button' class='close' data-dismiss='alert' aria-label='Close'><span aria-hidden='true'>×</span></button>\";\n $html .= '<ul>';\n foreach ($this->ok as $success) {\n $html .= '<li>' . $success . '</li>';\n }\n $html .= '</ul></div>';\n }\n if (self::$debugMode) {\n if (!empty($this->debug)) {\n $html .= \"<div class='alert alert-info fade in' role='alert'>\n <button type='button' class='close' data-dismiss='alert' aria-label='Close'><span aria-hidden='true'>×</span></button>\";\n $html .= '<ul>';\n foreach ($this->debug as $success) {\n $html .= '<li>' . $success . '</li>';\n }\n $html .= '</ul></div>';\n }\n }\n return $html;\n }",
"function display_message($msg,$level) {\n\tswitch($level) {\n\t\tcase 1:\n\t\t\techo \"<div class=\\\"alert alert-success\\\" align=\\\"center\\\">\n\t\t\t\t\t\t\t<strong> $msg </strong>\n\t\t\t\t\t\t </div>\";\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\techo \"<div class=\\\"alert alert-info\\\" align=\\\"center\\\">\n\t\t\t\t\t\t\t<strong> $msg </strong>\n\t\t\t\t\t\t </div>\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\techo \"<div class=\\\"alert alert-success\\\" align=\\\"center\\\">\n\t\t\t\t\t\t\t<strong> $msg </strong>\n\t\t\t\t\t\t </div>\";\n\t}\n}"
] | [
"0.705771",
"0.7014439",
"0.67045265",
"0.67024106",
"0.66930664",
"0.6684559",
"0.66798216",
"0.66315085",
"0.6615012",
"0.6593151",
"0.6565175",
"0.6565175",
"0.6543595",
"0.6512482",
"0.64961755",
"0.648484",
"0.6463964",
"0.6431818",
"0.6416073",
"0.64123136",
"0.63648975",
"0.6323814",
"0.63095826",
"0.62831956",
"0.62571687",
"0.62456495",
"0.62414074",
"0.6240718",
"0.6212157",
"0.6208681",
"0.6207067",
"0.6196989",
"0.6194565",
"0.6191865",
"0.61909103",
"0.61874264",
"0.617949",
"0.61664927",
"0.61614496",
"0.6147889",
"0.61465174",
"0.6142713",
"0.6138531",
"0.6121988",
"0.6120487",
"0.6111054",
"0.6107608",
"0.61008424",
"0.6089235",
"0.6085884",
"0.6075617",
"0.60753584",
"0.6071981",
"0.60683614",
"0.6055407",
"0.6045985",
"0.6031983",
"0.6031903",
"0.6019353",
"0.60192525",
"0.6012769",
"0.6010917",
"0.60002756",
"0.59989005",
"0.59877264",
"0.59834856",
"0.59762806",
"0.59722185",
"0.59708077",
"0.59703743",
"0.59699583",
"0.59673446",
"0.5965202",
"0.5955582",
"0.59498817",
"0.59490424",
"0.5945453",
"0.5944119",
"0.59390193",
"0.5938234",
"0.59380245",
"0.59361356",
"0.5934844",
"0.5927255",
"0.5925937",
"0.59226596",
"0.59176224",
"0.5912548",
"0.5908745",
"0.5901958",
"0.5885917",
"0.5882767",
"0.5880383",
"0.5875587",
"0.5875233",
"0.58735824",
"0.586103",
"0.5860988",
"0.586096",
"0.5858287"
] | 0.6280658 | 24 |
show styling error message | function error(){} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function error_message($msg){\n $style='background-color: #FFAAAA; ';\n echo \"\\n\\n<span style='$style'>$msg</span>\\n\\n\";\n}",
"function error_box($msg){\n $style ='margin: 5px; padding: 5px; ';\n $style.='border: 3px solid #FF0000; ';\n $style.='background-color: #FFAAAA; ';\n echo \"\\n\\n<div style='$style'>$msg</div>\\n\\n\";\n}",
"public function showError();",
"function displayError(){\n\t\tprint \"<div class=\\\"validationerror\\\">\";\n\t\tfor ($i=0;$i<count($this->error);$i++){\n\t\t\tprintln($this->error[$i]);\n\t\t}\n\t\tprint \"</div>\";\n\t}",
"public function thm_blocksy_validation_error_notice() {\n\t\t\n\t\techo \"<div class='error notice'><p>\".$this->error.\"</p></div>\";\n\n\t}",
"function DisplayError()\n\t\t{\n\t\t\techo \"<div>\" . $this->error_message . \"</div>\";\n\t\t}",
"protected function renderAsError() {}",
"public function errorDisplay()\n {\n return \"<div class='error-message'><strong>\".Lang::get('message.error.title').\"</strong><br/>(\".date('Y-m-d H:m:s').\") \".$this->error.\"</div>\";\n }",
"static function show_error($message) {\n\t\techo '<div class=\"wrap\"><h2></h2><div class=\"error\" id=\"error\"><p>' . $message . '</p></div></div>' . \"\\n\";\n\t}",
"function render_error_message($text){\n\t\tif (sizeof($text)>0){\n\t\t\treturn \"<br /><span style=\\\"color: #ff0000\\\">\".$text.\"</span><br />\";\n\t\t}else{\n\t\t\treturn \"\";\n\t\t}\n\t}",
"public function showToastForValidationError()\n {\n $errorBag = $this->getErrorBag()->all();\n\n if (count($errorBag) > 0) $this->toast($errorBag[0], 'error');\n }",
"function get_error_style($field) {\n\tif (isset($_GET[\"error_$field\"])) {\n\t\treturn ' class=\"error\" ';\n\t} else {\n\t\treturn '';\n\t}\n}",
"function paintError($message) {\n parent::paintError($message);\n\t\t\t\t\t\tprint \"<div><span class=\\\"red\\\">Exception:</span> <strong>\";\n\t\t\t\t\t\t$breadcrumb = $this->getTestList();\n\t\t\t\t\t\tarray_shift($breadcrumb);\n\t\t\t\t\t\tprint implode(\" -> \", $breadcrumb);\n\t\t\t\t\t\tprint \"</strong><br />\\n<span class=\\\"exception\\\">\" . $this->_htmlEntities($message) . \"</span></div>\\n\";\n\t\t\t\t}",
"function showError($errmsg)\n{\n\techo \"<h2 class='error'>$errmsg</h2>\" . PHP_EOL;\n}",
"function showerror() {\r\n if (count($this->error_msgs)>0) {\r\n echo '<p><img src=\"images/eri.gif\"><b>'.lang('Error in form').'</b>:<ul>';\r\n foreach ($this->error_msgs as $errormsg) {\r\n echo '<li>'.$errormsg;\r\n }\r\n echo '</ul></p>';\r\n return True;\r\n }\r\n return False;\r\n }",
"public function notice_error() {\n\t\t$class = 'notice notice-error';\n\t\t$message = __( 'An error occurred during synchronization.', 'elemarjr' );\n\t\treturn sprintf( '<div class=\"%1$s\"><p>%2$s</p></div>', esc_attr( $class ), esc_html( $message ) );\n\t}",
"function paintError($message) {\r\n $this->_scorer->paintError($message);\r\n }",
"protected function outputErrorMessage(string $message)\n {\n $this->outputLine(\"<fg=red;options=bold>$message</>\");\n }",
"protected function enableDisplayErrors() {}",
"protected function enableDisplayErrors() {}",
"public static function showError($msg)\n {\n echo \"<div class='error'><p><strong>$msg</strong></p></div>\\n\";\n }",
"public function renderErrors();",
"public function showError($error) {\r\n\t\tprint \"<h2 style='color: red'>Error: $error</h2>\";\r\n\t}",
"public function renderGlobalErrorMessage()\n {\n $message = \"\";\n $nberror = count($this->getErrorSchema());\n if ($nberror > 0) {\n $tmp = $this->getErrorSchema()->getErrors();\n $message = \"<div class='alert alert-danger'>Please check your form, $nberror field(s) seem(s) not correctly filled </br>\";\n foreach ($tmp as $key => $e) {\n if ($key == 'Description'){\n $message .= \"- Problem description field is too long (4000 characters max): Please use verbose mode and reduce this field.\";\n }\n\n }\n $message .= \"</div>\";\n }\n return $message;\n }",
"private function _getErrorMsg($msg)\n\t{\n\t\treturn \"<b style='color:red'>$msg</b>\";\n\t}",
"function show_error ()\n {\n global $errormessage;\n if (!empty ($errormessage))\n {\n echo '\t\n\t\t<table width=\"100%\" border=\"0\" class=\"none\" style=\"clear: both;\" cellpadding=\"4\" cellspacing=\"0\">\n\t\t\t<tr><td class=\"thead\">An error has occcured!</td></tr>\n\t\t\t<tr><td><font color=\"red\"><strong>' . $errormessage . '</strong></font></td></tr>\n\t\t\t</table>\n\t\t<br />';\n }\n\n }",
"function outputErrorClass($errorType)\n{\n if ($errorType !== '') {\n echo 'error-input-color';\n }\n}",
"function showInputError($errorType)\n{\n if ($errorType !== '') {\n return \"<p class='error-alert'>$errorType</p>\";\n }\n}",
"protected function printErrorBoxMessage($message){\n ?>\n <div class=\"alert alert-danger\">\n <strong>Errore! </strong> <?php echo $message ?>\n </div>\n <?php \n }",
"function errorMessage($header, $message){\r\n\t\techo \"<div class='errorMessageContainer'>\";\r\n\t\techo \"<p class='messageHeader'>\".$header.\"</p>\";\r\n\t\techo \"<p class='messageText'>\".$message.\"</p>\";\r\n\t\techo \"</div>\";\r\n\t}",
"public function display_error($msg){\n \n }",
"function show_error($msg)\n {\n print \"<div class=\\\"PhorumAdminError\\\">\";\n print \"Error: \" . htmlspecialchars($msg);\n print \"</div>\";\n }",
"public function showFailed();",
"function field_error( $problem ){\n\tif( isset( $problem ) ){\n\t\techo 'class=\"error\"';\n\t}\n}",
"public function render()\r\n {\r\n $this->view->toView([\"subTitle\" => \"Error\"])->loadError($this->code);\r\n }",
"public function display_error_holder() {\r\n\t\tprintf( '<div id=\"nyp-error-%s\" class=\"woocommerce-nyp-message\" aria-live=\"assertive\" style=\"display: none\"><ul class=\"woocommerce-error\"></ul></div>', esc_attr( WC_Name_Your_Price_Helpers::get_counter() ) );\r\n\t}",
"function msg_error($html)\r\n{\r\n return '<div class=\"msg-error\">'.$html.'</div>';\r\n}",
"public function renderErrorDiv(){\n $row = '';\n if(count($this->error_messages) > 0){\n $row .= \"<div class='invalid-feedback'>\";\n foreach($this->error_messages as $message){\n $row .= $message;\n }\n $row .= \"</div>\";\n }\n return $row;\n }",
"public static function printErrors() {\n\t\tif (PNApplication::hasErrors()) {\n\t\t\tforeach (PNApplication::$errors as $e)\n\t\t\t\techo \"<div style='color:#C00000;font-familiy:Tahoma;font-size:10pt'><img src='\".theme::$icons_16[\"error\"].\"' style='vertical-align:bottom'/> \".$e.\"</div>\";\n\t\t\techo \"<script type='text/javascript'>\";\n\t\t\techo \"if (typeof window.top.status_manager != 'undefined'){\";\n\t\t\tforeach (PNApplication::$errors as $e)\n\t\t\t\techo \"window.top.status_manager.addStatus(new window.top.StatusMessageError(null,\".json_encode($e).\",5000));\";\n\t\t\techo \"};\";\n\t\t\techo \"window.page_errors=[\";\n\t\t\t$first = true;\n\t\t\tforeach (PNApplication::$errors as $e) {\n\t\t\t\tif ($first) $first = false; else echo \",\";\n\t\t\t\techo json_encode($e);\n\t\t\t}\n\t\t\techo \"];\";\n\t\t\techo \"</script>\";\n\t\t}\n\t\tif (PNApplication::hasWarnings()) {\n\t\t\techo \"<script type='text/javascript'>\";\n\t\t\techo \"if (typeof window.top.status_manager != 'undefined'){\";\n\t\t\tforeach (PNApplication::$warnings as $e)\n\t\t\t\techo \"window.top.status_manager.addStatus(new window.top.StatusMessage(window.top.Status_TYPE_WARNING,\".json_encode($e).\",[{action:'popup'},{action:'close'}],5000));\";\n\t\t\techo \"};\";\n\t\t\techo \"</script>\";\n\t\t}\n\t}",
"private function printCSS() \n\t{\t\t\n\t\t// str with error type and nr of errors\n\t\tif ($this->css_error == '' && $this->error_nr_css != -1) {\n\t\t\t$this->SetFont('DejaVu', 'B', 14);\n\t\t\t$this->SetTextColor(0);\n\t\t\t$this->Write(5, _AC('file_report_css').' ('.$this->error_nr_css.' '._AC('file_report_found').'):');\t\t\n\t\t\t$this->Ln(10);\n\t\t\t$this->SetFont('DejaVu', 'B', 12);\n\t\t\t$this->Write(5,strip_tags(_AC(\"css_validator_provided_by\")));\n\t\t\t$this->Ln(10);\n\t\t} else if ($this->css_error == '' && $this->error_nr_css == -1) {\n\t\t\t// css validator is disabled\n\t\t\t$this->SetTextColor(0, 0, 255);\n\t\t\t$path = AC_BASE_HREF.\"images/jpg/info.jpg\";\n\t\t\t$this->Image($path, $this->GetX(), $this->GetY(), 4, 4);\n\t\t\t$this->SetX(14);\n\t\t\t$this->SetFont('DejaVu', 'B', 12);\t\t\t\n\t\t\t$this->Write(5,_AC(\"css_validator_disabled\"));\n\t\t\t$this->SetTextColor(0);\n\t\t}\n\t\t\n\t\tif ($this->css_error != '') {\n\t\t\t// css validator is only available at validating url, not at validating a uploaded file or pasted html\n\t\t\t$this->Ln(3);\n\t\t\t$this->SetTextColor(0, 0, 255);\n\t\t\t$path = AC_BASE_HREF.\"images/jpg/info.jpg\";\n\t\t\t$this->Image($path, $this->GetX(), $this->GetY(), 4, 4);\n\t\t\t$this->SetX(14);\n\t\t\t$this->SetFont('DejaVu', 'B', 12);\n\t\t\t$this->Write(5, $this->css_error);\n\t\t} else {\n\t\t\tif ($this->error_nr_css == 0) {\n\t\t\t\t// show congratulations if no errors found\n\t\t\t\t$this->Ln(3);\n\t\t\t\t$this->SetTextColor(0, 128, 0);\n\t\t\t\t$path = AC_BASE_HREF.\"images/jpg/feedback.jpg\";\n\t\t\t\t$this->Image($path, $this->GetX(), $this->GetY(), 4, 4);\n\t\t\t\t$this->SetX(14);\n\t\t\t\t$this->SetFont('DejaVu', 'B', 12);\n\t\t\t\t$this->Write(5, _AC(\"congrats_css_validation\"));\n\t\t\t} else { // else make report on errors\n\t\t\t\tforeach($this->css as $uri => $group) {\n\t\t\t\t\t// uri\n\t\t\t\t\t$this->Ln(3);\n\t\t\t\t\t$this->SetX(17);\n\t\t\t\t\t$this->SetTextColor(0);\n\t\t\t\t\t$this->SetFont('DejaVu', 'B', 10);\n\t\t\t\t\t$this->Write(5, \"URI: \");\n\t\t\t\t\t$this->SetTextColor(26, 74, 114);\n\t\t\t\t\t$this->SetFont('DejaVu', 'B', 12);\n\t\t\t\t\t$this->Write(5, $uri);\n\t\t\t\t\t$this->Ln(10);\n\t\t\t\t\t\n\t\t\t\t\tforeach($group as $error) {\n\t\t\t\t\t\t// line, code\n\t\t\t\t\t\t$this->SetX(17);\n\t\t\t\t\t\t$this->SetTextColor(0);\n\t\t\t\t\t\t$this->SetFont('DejaVu', 'BI', 9);\n\t\t\t\t\t\t$location = _AC('line').\" \".$error['line'].\": \";\n\t\t\t\t\t\t$this->Write(5, $location);\n\t\t\t\t\t\tif ($error['code'] != '') {\n\t\t\t\t\t\t\t$this->SetFont('DejaVu', '', 9);\n\t\t\t\t\t\t\t$this->Write(5, $error['code']); \n\t\t\t\t\t\t}\n\t\t\t\t\t\t$this->Ln(7);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// parse\n\t\t\t\t\t\tif ($error['parse'] != '') {\n\t\t\t\t\t\t\t$this->SetX(17);\n\t\t\t\t\t\t\t$this->SetFont('DejaVu', '', 10);\n\t\t\t\t\t\t\t$str = str_replace(\"\\t\", \" \", strip_tags(htmlspecialchars_decode(html_entity_decode($error['parse']), ENT_QUOTES)));\n\t\t\t\t\t\t\t$this->Write(5, $str);\n\t\t\t\t\t\t\t$this->Ln(10);\n\t\t\t\t\t\t}\n\t\t\t\t\t} // end foreach error\n\t\t\t\t} // end foreach group\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"public function display_error() {\n\n\t\t\tif ( is_null( $this->error ) || ! ( $this->error instanceof WP_Error ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$messages = $this->error->get_error_messages( 'success' );\n\t\t\tif ( $messages ) : ?>\n\t\t\t<div class=\"notice notice-success\" style=\"display: block !important\">\n\t\t\t\t<ul>\n\t\t\t\t\t<li><?php echo join( '</li><li>', $messages ); ?></li>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t\t<?php\n\t\t\tendif;\n\n\t\t\t$messages = $this->error->get_error_messages( 'error' );\n\t\t\tif ( $messages ) :\n\t\t\t?>\n\t\t\t<div class=\"error\" style=\"display: block !important\">\n\t\t\t\t<ul>\n\t\t\t\t\t<li><?php echo join( '</li><li>', $messages ); ?></li>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t\t<?php\n\t\t\tendif;\n\n\t\t\t$messages = $this->error->get_error_messages( 'info' );\n\t\t\tif ( $messages ) :\n\t\t\t?>\n\t\t\t<div class=\"notice notice-info\" style=\"display: block !important\">\n\t\t\t\t<ul>\n\t\t\t\t\t<li><?php echo join( '</li><li>', $messages ); ?></li>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t\t<?php\n\t\t\tendif;\n\t\t}",
"function put_error(string $message)\n{\n echo \"<aside class=\\\"notice error\\\">${message}</aside>\";\n}",
"function message_mistake_validator($content) {\n\t\techo \"<div class='alert alert-danger'>\n\t\t\t\t<strong>Aviso!</strong><br>$content\n\t\t\t</div>\";\n\t}",
"public static function error($text) {\n self::colorPrint(self::RED, $text);\n }",
"public static function customErrorMsg()\n {\n echo \"\\n<p>An error occured, The error has been reported.</p>\";\n exit();\n }",
"public function showError($result = null) {\n if (Configure::read() > 0) {\n if ($this->error) {\n trigger_error('<span style = \"color:Red;text-align:left\"><b>SOAP Error:</b> <pre>' . print_r($this->error) . '</pre></span>', E_USER_WARNING);\n }\n if ($result) {\n e(sprintf(\"<p><b>Result:</b> %s </p>\", $result));\n }\n }\n }",
"public function error() {\n require_once($_SERVER['DOCUMENT_ROOT'] . '../PHPIncludes/pageLinkScriptsCSS.php');\n\n $pageRequirements = new pageLinkScriptsCSS();\n\n $pageRequirements->add(\"css\", ['error.css']);\n\n $pageRequirements->add(\"title\", 'The Sky Is falling');\n\n callStructural('header','std',$pageRequirements);\n\n require_once('views/pages/error.php');\n\n //Render the page footer:\n callStructural(\"footer\", 'std', $pageRequirements); \n\n\n }",
"public static function displayErrors(){\n $ec = new EmailLabsConfig();\n if( $ec->getMode() == true && !empty( self::$errors ) ){\n $message = '';\n foreach( self::$errors as $item )\n $message .= '['.$item['lvl'].']['.$item['date'].']'.$item['msg'].\"\\n\";\n die( $message );\n }\n }",
"protected function addErrorFlashMessage() {}",
"function showError(){\n\t\techo json_encode(array(\n\t\t\t\"alert\" => \"error\",\n\t\t\t\"title\" => \"Failed to Create!\",\n\t\t\t\"message\" => \"Course Creation has been Failed\"\n\t\t));\n\t}",
"public function error() {\n require_once($_SERVER['DOCUMENT_ROOT'] . '../PHPIncludes/pageLinkScriptsCSS.php');\n\n $pageRequirements = new pageLinkScriptsCSS();\n\n $pageRequirements->add(\"css\", ['error.css']);\n\n $pageRequirements->add(\"title\", 'The Sky Is Falling');\n\n callStructural('header','std',$pageRequirements);\n\n require_once('views/pages/error.php');\n\n //Render the page footer:\n callStructural(\"footer\", 'std', $pageRequirements); \n\n }",
"function show__errors ()\n {\n global $_errors;\n global $lang;\n if (0 < count ($_errors))\n {\n $errors = implode ('<br />', $_errors);\n echo '\n\t\t\t<table class=\"main\" border=\"1\" cellspacing=\"0\" cellpadding=\"5\" width=\"100%\">\n\t\t\t<tr>\n\t\t\t\t<td class=\"thead\">\n\t\t\t\t\t' . $lang->global['error'] . '\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>\n\t\t\t\t\t<font color=\"red\">\n\t\t\t\t\t\t<strong>\n\t\t\t\t\t\t\t' . $errors . '\n\t\t\t\t\t\t</strong>\n\t\t\t\t\t</font>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t</table>\n\t\t\t<br />\n\t\t';\n }\n\n }",
"function errorMsg($msg)\n{\n\treturn \"<div class=\\\"errorMsg\\\">$msg</div>\";\n}",
"function errLog($text='Error'){\n echo \"<div class='text-center' style='color:red;background-color:white;'>\".$text.\"</div>\";\n}",
"function render() {\n foreach ($this->request['invalid_elements'] as $element) {\n foreach ($element->errors as $error) {\n drupal_set_message($error, 'error');\n }\n }\n\n return parent::render();\n }",
"public function showError($message = \"\")\n {\n if(empty($message))\n {\n $this->layout->content = View::make('error')\n ->with('fmId', $this->fmId)\n ->with('serial', $this->serialNumber);\n }\n else\n {\n $this->layout->content = View::make('error')\n ->with('fmId', $this->fmId)\n ->with('serial', $this->serialNumber)\n ->with('message', $message);\n }\n }",
"public function highlight_error($field)\n\t{\n\t\t// Adapter doesn't have this ability yet\n\t\treturn '';\n\t}",
"function tanganiError ($level, $message, $file, $line) {\n echo \"<div style='padding: 2rem; background: rgba(200, 0, 0, 0.5); color: white'>\";\n echo \"<b>Terjadi Error</b>\";\n echo \"<p>[{$level}] {$message} - {$file}:{$line}</p>\";\n echo \"</div>\";\n}",
"private function getJSForError() {\n\t\treturn '$(\"#'.$this->cssID.'\").append(\\'<div class=\"flot-error\"><span>'.$this->ErrorString.'</span></div>\\');';\n\t}",
"function showError(){\n\t\techo json_encode(array(\n\t\t\t\"alert\" => \"error\",\n\t\t\t\"title\" => \"Failed to Update!\",\n\t\t\t\"message\" => \"Program Updating has been Failed\"\n\t\t));\n\t}",
"public function error($error){\n\t\t$options = ['class' => $this->getDefaultClass('errorDiv')];\n\t\t$this->elements['error'] = Html::div($error, $options);\n\t}",
"function displayAlert($message, $style)\n {\n $error_alert = \"\";\n \n switch($style)\n {\n case 'warning':\n $error_alert = '<div class=\"alert alert-warning alert-dismissible fade show\" role=\"alert\">\n <strong><span class=\"mdi mdi-alert mr-1\" aria-hidden=\"true\"></span>\n <span class=\"sr-only\">WARNING</span></strong>'.$message.'\n <button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\">\n <span class=\"mdi mdi-close\" aria-hidden=\"true\"></span>\n <span class=\"sr-only\">close</span>\n </button>\n </div>';\n break;\n case 'error':\n $error_alert = '<div class=\"alert alert-danger alert-dismissible fade show\" role=\"alert\">\n <strong><span class=\"mdi mdi-alert-circle mr-1\" aria-hidden=\"true\"></span>\n <span class=\"sr-only\">ERROR</span></strong>'.$message.'\n <button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\">\n <span class=\"mdi mdi-close\" aria-hidden=\"true\"></span>\n <span class=\"sr-only\">close</span>\n </button>\n </div>';\n break;\n }\n \n return $error_alert;\n }",
"public function putErrorMessage( $message ) {\n\t\t?>\n\t\t<div style=\"width:800px;height:300px;margin-bottom:10px;border:1px solid black;margin:0px auto;\">\n\t\t\t<div style=\"padding-left:20px;padding-right:20px;line-height:1.5;padding-top:40px;color:red;font-size:16px;text-align:left;\">\n\t\t\t\t<?php _e( 'Revolution Slider Error',REVSLIDER_TEXTDOMAIN )?>: <?php echo $message?>\n\t\t\t</div>\n\t\t\t</div>\n\t\t\t<script type=\"text/javascript\">\n\t\t\tjQuery(document).ready(function(){\n\t\t\t\tjQuery(\".rev_slider\").show();\n\t\t\t});\n\t\t\t</script>\n\t\t\t<?php\n\t}",
"function wck_single_metabox_errors_display(){\r\n /* only execute for the WCK objects defined for the current post type */\r\n global $post;\r\n if( get_post_type( $post ) != $this->args['post_type'] )\r\n return;\r\n\r\n /* and only do it once */\r\n global $allready_saved;\r\n if( isset( $allready_saved ) && $allready_saved == true )\r\n return;\r\n $allready_saved = true;\r\n\r\n /* mark the fields */\r\n if( isset( $_GET['wckerrorfields'] ) && !empty( $_GET['wckerrorfields'] ) ){\r\n echo '<script type=\"text/javascript\">';\r\n $field_names = explode( ',', urldecode( base64_decode( $_GET['wckerrorfields'] ) ) );\r\n\t\t\tif( !empty( $field_names ) ) {\r\n\t\t\t\tforeach ($field_names as $field_name) {\r\n\t\t\t\t\techo \"jQuery( '.field-label[for=\\\"\" . esc_js($field_name) . \"\\\"]' ).addClass('error');\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n echo '</script>';\r\n }\r\n\r\n /* alert the error messages */\r\n if( isset( $_GET['wckerrormessages'] ) ){\r\n echo '<script type=\"text/javascript\">alert(\"'. str_replace( '%0A', '\\n', esc_js( urldecode( base64_decode( $_GET['wckerrormessages'] ) ) ) ) .'\")</script>';\r\n }\r\n }",
"public function displayError() : string\n\t{\n\t\tif (!$this->debug)\n\t\t\treturn \"<b>ErrorMessage: </b> [\".$this->getMessage().\"] <br /><br />\";\n\t\t\n\t\t$errorMessage = \"<b>ErrorMessage: </b> [\".$this->getMessage().\"] <br />\";\n\t\t$errorMessage .= \"<b>ErrorLine: </b> [\".$this->getLine().\"] <br />\";\n\t\t$errorMessage .= \"<b>ErrorFile: </b> [\".$this->getFile().\"] <br />\";\n\t\t$errorMessage .= \"<b>ErrorClass: </b> [\".__CLASS__ .\"] <br />\";\n\t\t$errorMessage .= \"<b>ErrorCode: </b> [\".$this->getCode().\"]. <br /><br />\";\n\t\treturn $errorMessage;\n\t}",
"function display_errors($errors){\n $display = '<ul class=\"bg-danger\">';\n foreach($errors as $error) {\n //class text danger make the font red\n $display .='<li class=\"text-danger\">'.$error.'</li>';\n }\n $display .= '</ul>';\n return $display;\n}",
"function display_error() {\n\tglobal $errors;\n global $errors1;\n\n\tif (count($errors) > 0){\n\t\techo '<div class=\"error\">';\n\t\t\tforeach ($errors as $error){\n\t\t\t\techo $error .'<br>';\n\t\t\t}\n\t\techo '</div>';\n\t}\n}",
"public static function trig_err( $message )\n\t{\n\t\treturn \" <span style=\\\"color:#8B0000;background-color:#FFEAEA;\\\"> in class \".__CLASS__.\" : $message </span>\";\n\t}",
"function show_error ()\n {\n global $errormessage;\n global $lang;\n global $ts_template;\n if (!empty ($errormessage))\n {\n eval ($ts_template['show_error']);\n }\n\n }",
"private function printHTML() \n\t{\n\t\t// str with error type and nr of errors\n\t\tif ($this->error_nr_html == -1) {\n\t\t\t$this->SetTextColor(0, 0, 255);\n\t\t\t$path = AC_BASE_HREF.\"images/jpg/info.jpg\";\n\t\t\t$this->Image($path, $this->GetX(), $this->GetY(), 4, 4);\n\t\t\t$this->SetX(14);\n\t\t\t$this->SetFont('DejaVu', 'B', 12);\t\t\t\n\t\t\t$this->Write(5,_AC(\"html_validator_disabled\"));\n\t\t\t$this->SetTextColor(0);\n\t\t} else {\t\t\t\t\n\t\t\t$this->SetFont('DejaVu', 'B', 14);\n\t\t\t$this->SetTextColor(0);\n\t\t\t$this->Write(5, _AC('file_report_html').' ('.$this->error_nr_html.' '._AC('file_report_found').'):');\t\t\n\t\t\t$this->Ln(10);\n\t\t\t$this->SetFont('DejaVu', 'B', 12);\n\t\t\t$this->Write(5,strip_tags(_AC(\"html_validator_provided_by\")));\n\t\t\t$this->Ln(10);\t\t\n\t\t\n\t\t\t// show congratulations if no errors found\n\t\t\tif ($this->error_nr_html == 0 && $this->html_error == '') {\n\t\t\t\t// no html validation errors, passed\n\t\t\t\t$this->Ln(3);\n\t\t\t\t$this->SetTextColor(0, 128, 0);\n\t\t\t\t$path = AC_BASE_HREF.\"images/jpg/feedback.jpg\";\n\t\t\t\t$this->Image($path, $this->GetX(), $this->GetY(), 4, 4);\n\t\t\t\t$this->SetX(14);\n\t\t\t\t$this->SetFont('DejaVu', 'B', 12);\n\t\t\t\t$this->Write(5, _AC(\"congrats_html_validation\"));\n\t\t\t} else if($this->error_nr_html == 0 && $this->html_error != '') {\n\t\t\t\t// html validation errors\n\t\t\t\t$this->Ln(3);\n\t\t\t\t$this->SetTextColor(0);\n\t\t\t\t$this->SetFont('DejaVu', '', 10);\n\t\t\t\t$this->Write(5, $this->html_error);\n\t\t\t} else { // else make report on errors\n\t\t\t\tforeach($this->html as $error) {\n\t\t\t\t\t// error icon img, line, column, error text\n\t\t\t\t\t$img_data = explode(\".\", $error['img_src']);\t\t\n\t\t\t\t\t$path = AC_BASE_HREF.\"images/jpg/\".$img_data[0].\".jpg\";\n\t\t\t\t\t$this->Image($path, $this->GetX()+7, $this->GetY(), 4, 4);\n\t\t\t\t\t$this->SetX(21);\n\t\t\t\t\tif ($error['line'] != '' && $error['col'] != '') {\n\t\t\t\t\t\t$this->SetTextColor(0);\n\t\t\t\t\t\t$this->SetFont('DejaVu', 'BI', 9);\n\t\t\t\t\t\t$location = \" \"._AC('line').\" \".$error['line'].\", \"._AC('column').\" \".$error['col'].\": \";\n\t\t\t\t\t\t$this->Write(5, $location);\n\t\t\t\t\t}\n\t\t\t\t\t$this->SetTextColor(26, 74, 114);\n\t\t\t\t\t$this->SetFont('DejaVu', '', 10);\n\t\t\t\t\t$this->Write(5, html_entity_decode(strip_tags($error['err'])));\n\t\t\t\t\t$this->Ln(7);\n\t\n\t\t\t\t\t// html code of error\n\t\t\t\t\tif ($error['html_1'] != '' || $error['html_2'] != '' || $error['html_3'] != '') {\n\t\t\t\t\t\t$this->SetFont('DejaVu', '', 9);\n\t\t\t\t\t\t$this->SetX(17);\n\t\t\t\t\t\t$this->SetTextColor(0);\n\t\t\t\t\t\t$str = str_replace(\"\\t\", \" \", html_entity_decode(htmlspecialchars_decode($error['html_1'], ENT_QUOTES)));\n\t\t\t\t\t\t$this->Write(5, $str);\n\t\t\t\t\t\t$this->SetTextColor(255, 0 ,0);\n\t\t\t\t\t\t$str = str_replace(\"\\t\", \" \", html_entity_decode(htmlspecialchars_decode($error['html_2'], ENT_QUOTES)));\n\t\t\t\t\t\t$this->Write(5, $str);\n\t\t\t\t\t\t$this->SetTextColor(0);\n\t\t\t\t\t\t$str = str_replace(\"\\t\", \" \", html_entity_decode(htmlspecialchars_decode($error['html_3'], ENT_QUOTES)));\n\t\t\t\t\t\t$this->Write(5, $str);\n\t\t\t\t\t\t$this->Ln(10);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// text\n\t\t\t\t\tif ($error['text'] != '') {\n\t\t\t\t\t\t$this->SetX(17);\n\t\t\t\t\t\t$this->SetFont('DejaVu', '', 10);\n\t\t\t\t\t\t$this->Write(5, html_entity_decode(strip_tags($error['text'])));\n\t\t\t\t\t\t$this->Ln(10);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} // end of else \n\t\t\n\t}",
"public function errorMsg() {\r\n if(isset($this->get['e']) && isset($this->session[self::SESSION_ERROR])) {\r\n return '<p class=\"error\">' . $this->session[self::SESSION_ERROR] . '</p>';\r\n } else {\r\n return '';\r\n }\r\n }",
"protected function createValidationErrorMessage() {}",
"static function validationErrors ($type = 'warning')\n {\n $errors = View::shared ('errors');\n if (count ($errors)): ?>\n <div class=\"alert alert-<?= $type ?> alert-validation\">\n <h4><?= Lang::get ('auth.PROBLEMS 1') ?></h4><?= Lang::get ('auth.PROBLEMS') ?><br><br>\n <ul>\n <?php foreach ($errors->all () as $error)\n echo \"<li>$error</li>\" ?>\n </ul>\n </div>\n <?php\n endif;\n }",
"function display_error_message($message)\r\n {\r\n Display :: error_message($message);\r\n }",
"private function displayErrors () {\n echo '<pre>';\n\n foreach ($this->error as $single_error) {\n print_r($single_error);\n }\n\n echo '</pre>';\n }",
"function the_champ_error_message($error, $heading = false){\r\n\t$html = \"\";\r\n\t$html .= \"<div class='the_champ_error'>\";\r\n\tif($heading){\r\n\t\t$html .= \"<p style='color: black'><strong>Super Socializer: </strong></p>\";\r\n\t}\r\n\t$html .= \"<p style ='color:red; margin: 0'>\".__($error, 'super-socializer').\"</p></div>\";\r\n\treturn $html;\r\n}",
"public function actionError()\n\t{\n\t\t$this->layout ='column1';\n\t if($error=Yii::app()->errorHandler->error)\n\t {\n\t \tif(Yii::app()->request->isAjaxRequest)\n\t \t\techo $error['message'];\n\t \telse\n\t \t$this->render('error', $error);\n\t }\n\t}",
"function display_error($msg,$level) {\n\tswitch($level) {\n\t\tcase 1:\n\t\t\techo \"<div class=\\\"alert alert-danger\\\" align=\\\"center\\\">\n\t\t\t\t\t\t\t<strong> $msg </strong>\n\t\t\t\t\t\t </div>\";\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\techo \"<div class=\\\"alert alert-warning\\\" align=\\\"center\\\">\n\t\t\t\t\t\t\t<strong> $msg </strong>\n\t\t\t\t\t\t </div>\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\techo \"<div class=\\\"alert alert-danger\\\" align=\\\"center\\\">\n\t\t\t\t\t\t\t<strong> $msg </strong>\n\t\t\t\t\t\t </div>\";\n\t}\n}",
"protected function getErrorFlashMessage() {}",
"public function message()\n {\n return 'Errores en plantilla<li>'.join('</li><li>',$this->invalid);\n }",
"function paintFail($message) {\n parent::paintFail($message);\n\t\t\t\t\t\t$breadcrumb = $this->getTestList();\n\t\t\t\t\t\tarray_shift($breadcrumb);\n\t\t\t\t\t\t\n\t\t\t\t\t\tprint \"<div><span class=\\\"red\\\">Fail:</span> <strong>\";\n\t\t\t\t\t\tprint implode(\" -> \", $breadcrumb);\n\t\t\t\t\t\tprint \" </strong><br />\\n<span class=\\\"fail\\\">\" . $this->_htmlEntities($message) . \"</span></div>\\n\";\n\t\t\t\t}",
"function gtk_error($str) {\n\t\t// http://aspn.activestate.com/ASPN/Mail/Message/php-gtk-general/2253469\n\t\t$red=&new GdkColor('#FF0000');\n\t\t$style=$this->label_filename->style;\n\t\t$style=$style->copy();\n\t\t$style->fg[0] = $red;\n\t\t$this->label_filename->set_style($style);\n\t\t// change text\n\t\t$this->label_filename->set_text($str);\n\t\techo 'Fatal error : '.$str.\"\\n\";\n\t\t// define IN_ERROR so all events will stop\n\t\tdefine('IN_ERROR',true);\n\t}",
"function showError($feedback)\n{\n showFeedback(new AlertMessage(AlertMessage::STYLE_ERROR, $feedback));\n}",
"function error_label($errors, $name) {\n //create span for the error message to appear (of class 'error_message')\n echo \"<br> <span id=\\\"$name\\\" class=\\\"error_message\\\">\";\n\n //Check if an error has occurred for the field\n if (isset($errors[$name])) {\n //input code of error message if error had occurred for the field\n echo $errors[$name];\n }\n echo '</span>';\n}",
"function show_errors() {\n\t\t\t$this->show_errors = true;\n\t\t}",
"public function errorMessage()\n {\n }",
"public static function error($message)\n {\n return '<div class=\"alert alert-danger\">' . $message . '</div>';\n }",
"function show_errors()\n\t\t{\n\t\t\t$this->show_errors = true;\n\t\t}",
"function show_errors()\n\t\t{\n\t\t\t$this->show_errors = true;\n\t\t}",
"public function render_requirements_notices() {\n $notices = $this->check_requirements();\n if ( count( $notices ) > 0 ) {\n $out = join( \"\\n\", $notices );\n echo laterpay_sanitize_output( '<div class=\"error\">' . $out . '</div>' );\n }\n }",
"public function actionError() {\n $this->layout = '//layouts/error';\n if ($error = Yii::app()->errorHandler->error) {\n if (Yii::app()->request->isAjaxRequest)\n echo $error['message'];\n else\n $this->render('error', $error);\n }\n }",
"public function errorMessages() {\n if(empty($this->errors)) {\n return;\n }\n \n $message = 'The following errors have occured: <ul>';\n foreach($this->errors as $error) {\n $message .= \"<li>$error</li>\";\n }\n $message .= '</ul>';\n\n return '<div class=\"error\">'.$message.'</div>';\n }",
"public function getErrorText(){\n return $this->error;\n }",
"function EchoDOMError($innerTEXT)\n{\n echo (\"<div class=\\\"alert alert-danger\\\">$innerTEXT</div>\");\n}",
"function cis_login_get_errors(){\n\n\tglobal $cis_login_error;\n\t$html = \"<div id=\\\"message\\\" class=\\\"error\\\"><ul>\\n\";\n\n\tif(!count($cis_login_error)) return false;\n\tforeach($cis_login_error as $err)\n\t\t$html .= \"<li>{$err}</li>\\n\";\n\n\twp_enqueue_style('colors');\n\treturn $html .= \"</ul>\\n</div>\\n\";\n}",
"public function actionError()\n\t{\n\t\t$this->layout = '//layouts/error';\n\t\tif($error=Yii::app()->errorHandler->error)\n\t\t{\n\t\t\tif ( empty($error['message']) && isset(Config::$errors[ $error['code'] ]) ) {\n\t\t\t\t$error['message'] = Config::$errors[$error['code']];\n\t\t\t}\n\n\t\t\tif(Yii::app()->getRequest()->getIsAjaxRequest()) {\n\t\t\t\tYii::app()->end( json_encode( array('error'=>$error['code'], 'message'=>$error['message']), JSON_NUMERIC_CHECK ) );\n\t\t\t} else\n\t\t\t\t$this->render('error',array('error' => $error));\n\t\t}\n\t}",
"public static function display_errors( bool $html ) : void {\t\n\t\t$i = -1;\n\t\tif( !empty( self::$errors ) ){\n\t\t\twhile( ($i++) < sizeof( self::$errors ) - 1 ){\n\t\t\t\t$error = self::$errors[$i];\n\t\t\t\techo ( $html === true ) ? \"<span>\".$error.\"</span><br>\" : $error . \"\\x0a\" ;\n\t\t\t}\n\t\t}\n\t}",
"public function actionError()\n\t{\n\t\treturn $this->render('error');\n\t}",
"protected function getErrorFlashMessage()\n {\n return false;\n }",
"public function dependency_notice() {\n $errors = '';\n $error = '';\n foreach ( $this->dependency_error as $error ) {\n $errors .= '<p>' . $error . '</p>';\n }\n $message = '<div class=\"error\">' . $errors . '</div>';\n\n echo $message;\n }",
"abstract public function display( $error );"
] | [
"0.74628365",
"0.7101192",
"0.7091957",
"0.70865995",
"0.6997575",
"0.69235027",
"0.69165057",
"0.68676955",
"0.68586457",
"0.6798512",
"0.6758459",
"0.67475766",
"0.66982496",
"0.6673358",
"0.6630816",
"0.65953296",
"0.65687376",
"0.6542241",
"0.6507515",
"0.65070283",
"0.64985114",
"0.64912266",
"0.64806455",
"0.64685965",
"0.6466864",
"0.6460791",
"0.6439779",
"0.64008886",
"0.639036",
"0.63808256",
"0.6370535",
"0.6358583",
"0.6357777",
"0.63552576",
"0.6354823",
"0.6354354",
"0.6327052",
"0.63184404",
"0.63092136",
"0.6303786",
"0.6298267",
"0.62777364",
"0.62715346",
"0.6261384",
"0.6257763",
"0.62443835",
"0.62324095",
"0.6213567",
"0.61993134",
"0.6194033",
"0.61886126",
"0.618797",
"0.61879194",
"0.6180662",
"0.61771435",
"0.61596125",
"0.61584264",
"0.6157933",
"0.6149869",
"0.613976",
"0.61245936",
"0.61244327",
"0.6121038",
"0.611867",
"0.6117107",
"0.61111623",
"0.60913783",
"0.60860074",
"0.6078782",
"0.6075002",
"0.6074577",
"0.6073199",
"0.6065976",
"0.60632235",
"0.606078",
"0.60542697",
"0.6048841",
"0.6044494",
"0.60420835",
"0.60360825",
"0.60287887",
"0.6025779",
"0.6013592",
"0.6009707",
"0.5995567",
"0.5995551",
"0.5990908",
"0.59756166",
"0.59756166",
"0.5973908",
"0.5973794",
"0.59640497",
"0.59605986",
"0.5959697",
"0.5952533",
"0.59476703",
"0.5939499",
"0.59392947",
"0.59339607",
"0.59262437",
"0.5924928"
] | 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.