query
stringlengths
9
43.3k
document
stringlengths
17
1.17M
metadata
dict
negatives
listlengths
0
30
negative_scores
listlengths
0
30
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
Gets the public 'security.token_storage' shared service.
protected function getSecurity_TokenStorageService() { return $this->services['security.token_storage'] = new \Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStorageService();", "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 }", "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 getSessionStorage()\n {\n if (! $this->storage) {\n $this->storage = $this->getServiceLocator()\n ->get('cp_user_auth_storage');\n }\n\n return $this->storage;\n }", "private function _getStorageName() {\n\t\tif($this->_rememberMe) {\n\t\t\treturn self::TOKEN_COOKIE_STORAGE;\n\t\t}\n\n\t\treturn self::TOKEN_SESSION_STORAGE;\n\t}", "public static function getShared()\r\n\t{\r\n\t\treturn self::$shared;\r\n\t}", "protected function getStorage()\n {\n return unserialize(Session::retrieve(__NAMESPACE__));\n }", "public function getSharedManager();", "function getStorage()\n{\n\tif (!$this->storage) $this->storage = new AuthDbStorage;\n\treturn $this->storage;\t\n}", "public function getStorage()\n {\n return Controllers\\StorageController::getInstance();\n }", "public function getStorage()\n {\n if (NULL === $this->_storage) {\n $this->setStorage(new Auth\\Storage\\MultipleIdentities());\n }\n \n return $this->_storage;\n }", "public function getStorage():OAuthStorageInterface;", "public function getStorage(): StorageInterface\n {\n return $this->storage;\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 }", "public static function getStorage() {}", "public function getStorage()\n {\n return $this->get(self::_STORAGE);\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 getStorage()\n {\n return $this->_storage;\n }", "public function getStorage()\n {\n return $this->storage;\n }", "public function getStorage()\n {\n return $this->storage;\n }", "public function getStorage()\n {\n return $this->storage;\n }", "public function getStorage()\n {\n return $this->storage;\n }", "public function getStorage()\n {\n return $this->storage;\n }", "public function getStorage()\n {\n return $this->storage;\n }", "public function getStorage()\n {\n return $this->storage;\n }", "public function getStorage()\n {\n return $this->storage;\n }", "public function getStorage()\n {\n return $this->storage;\n }", "public function getInstanceStorage() {\n if (null == $this->instanceStorage) {\n $this->instanceStorage = new InstanceStorage();\n }\n\n return $this->instanceStorage;\n }", "public function getStorage()\r\n {\r\n return $this->storage;\r\n }", "public function getStorage() {\n\t\treturn $this->_storage;\n\t}" ]
[ "0.70061004", "0.69544894", "0.6743185", "0.6726429", "0.6493238", "0.64293724", "0.64108723", "0.6380058", "0.63707745", "0.63647574", "0.63508135", "0.62439954", "0.6182945", "0.61813575", "0.6169047", "0.61324614", "0.61092895", "0.60971105", "0.6093218", "0.6093218", "0.6093218", "0.6093218", "0.6093218", "0.6093218", "0.6093218", "0.6093218", "0.6093218", "0.609261", "0.60904485", "0.60548615" ]
0.80226177
1
Gets the private 'App\EventSubscriber\RestSubscriber' shared autowired service.
protected function getRestSubscriberService() { 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 ?: '_'}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 getVictoireViewReference_EventSubscriberService()\n {\n return $this->services['victoire_view_reference.event_subscriber'] = new \\Victoire\\Bundle\\ViewReferenceBundle\\EventSubscriber\\ViewReferenceSubscriber($this->get('event_dispatcher'));\n }", "protected function getVictoireBlog_Article_SubscriberService()\n {\n return $this->services['victoire_blog.article.subscriber'] = new \\Victoire\\Bundle\\BlogBundle\\Listener\\ArticleSubscriber($this->get('victoire_page.user_callable'), 'Victoire\\\\Bundle\\\\UserBundle\\\\Entity\\\\User');\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 get_rest_api_instance() {\n\t\treturn $this->rest_api;\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 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 getEventSubscriber();", "private function getRessourceService()\n {\n if (!$this->ressourceService) {\n $this->ressourceService = $this->getServiceManager()->get('playgroundcms_ressource_service');\n }\n\n return $this->ressourceService;\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 }", "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 }", "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 getVictoireCore_CacheSubscriberService()\n {\n return $this->services['victoire_core.cache_subscriber'] = new \\Victoire\\Bundle\\CoreBundle\\EventSubscriber\\CacheSubscriber($this->get('victoire_core.cache_builder'));\n }", "public static function instance() {\n\t\treturn tribe( 'events-aggregator.service' );\n\t}", "protected function getJmsSerializer_DoctrineProxySubscriberService()\n {\n return $this->services['jms_serializer.doctrine_proxy_subscriber'] = new \\JMS\\Serializer\\EventDispatcher\\Subscriber\\DoctrineProxySubscriber(false, true);\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 }", "protected function getSensioFrameworkExtra_Cache_ListenerService()\n {\n return $this->services['sensio_framework_extra.cache.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\HttpCacheListener();\n }", "public static function getRestDispatch() : RestDispatch\n {\n static $dispatch;\n\n if ($dispatch === null || ! ($dispatch instanceof RestDispatch)) {\n $dispatch = new RestDispatch();\n }\n\n return $dispatch;\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 getPage_SubscriberService()\n {\n return $this->services['page.subscriber'] = new \\Victoire\\Bundle\\PageBundle\\EventSubscriber\\PageSubscriber($this->get('router'), $this->get('victoire_page.user_callable'), 'Victoire\\\\Bundle\\\\UserBundle\\\\Entity\\\\User', $this->get('victoire_view_reference.builder'), $this->get('victoire_view_reference.repository'));\n }", "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 getDispatcherListener()\n {\n return $this->di->getShared('dispatcherListener');\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 getVictoireAnalytics_BrowserEvent_SubscriberService()\n {\n return $this->services['victoire_analytics.browser_event.subscriber'] = new \\Victoire\\Bundle\\AnalyticsBundle\\EventSubscriber\\BrowseEventSubscriber('Victoire\\\\Bundle\\\\UserBundle\\\\Entity\\\\User');\n }", "protected function getVictoireCore_EntityProxy_SubscriberService()\n {\n $this->services['victoire_core.entity_proxy.subscriber'] = $instance = new \\Victoire\\Bundle\\CoreBundle\\EventSubscriber\\EntityProxySubscriber();\n\n $instance->setBusinessEntityCacheReader($this->get('victoire_business_entity.cache_reader'));\n\n return $instance;\n }", "protected function getAnnotations_ReaderService()\n {\n $this->services['annotations.reader'] = $instance = new \\Doctrine\\Common\\Annotations\\AnnotationReader();\n\n $a = new \\Doctrine\\Common\\Annotations\\AnnotationRegistry();\n $a->registerUniqueLoader('class_exists');\n\n $instance->addGlobalIgnoredName('required', $a);\n\n return $instance;\n }", "public function getEventSubscriberClass()\n {\n return get_class($this->wrapped);\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 }", "function getService() {\n return $this->service;\n }", "protected function getKernelExceptionSubscriberService()\n {\n return $this->services['kernel_exception_subscriber'] = new \\phpbb\\event\\kernel_exception_subscriber(${($_ = isset($this->services['template']) ? $this->services['template'] : $this->getTemplateService()) && false ?: '_'}, ${($_ = isset($this->services['language']) ? $this->services['language'] : $this->getLanguageService()) && false ?: '_'}, false);\n }" ]
[ "0.6869794", "0.6032906", "0.59967154", "0.5986137", "0.59064466", "0.5882892", "0.5875221", "0.5854544", "0.5829561", "0.5825283", "0.58147025", "0.57799953", "0.5775164", "0.57709503", "0.57209134", "0.57184684", "0.57043725", "0.5691644", "0.5673127", "0.56611854", "0.5610289", "0.55946076", "0.5573036", "0.554843", "0.55325496", "0.5527597", "0.5527577", "0.5524188", "0.54766375", "0.5465573" ]
0.8636062
0
Gets the private 'annotation_reader' shared service.
protected function getAnnotationReaderService() { return $this->services['annotation_reader'] = new \Doctrine\Common\Annotations\CachedReader(${($_ = isset($this->services['annotations.reader']) ? $this->services['annotations.reader'] : $this->getAnnotations_ReaderService()) && false ?: '_'}, ${($_ = isset($this->services['annotations.cache']) ? $this->services['annotations.cache'] : $this->load('getAnnotations_CacheService.php')) && false ?: '_'}, true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getAnnotationReaderService()\n {\n return $this->services['annotation_reader'] = new \\Doctrine\\Common\\Annotations\\CachedReader(${($_ = isset($this->services['annotations.reader']) ? $this->services['annotations.reader'] : $this->getAnnotations_ReaderService()) && false ?: '_'}, new \\Symfony\\Component\\Cache\\DoctrineProvider(\\Symfony\\Component\\Cache\\Adapter\\PhpArrayAdapter::create((__DIR__.'/annotations.php'), ${($_ = isset($this->services['cache.annotations']) ? $this->services['cache.annotations'] : $this->getCache_AnnotationsService()) && false ?: '_'})), false);\n }", "protected function getAnnotations_ReaderService()\n {\n return $this->services['annotations.reader'] = new \\Doctrine\\Common\\Annotations\\AnnotationReader();\n }", "protected function getAnnotations_ReaderService()\n {\n $this->services['annotations.reader'] = $instance = new \\Doctrine\\Common\\Annotations\\AnnotationReader();\n\n $a = new \\Doctrine\\Common\\Annotations\\AnnotationRegistry();\n $a->registerUniqueLoader('class_exists');\n\n $instance->addGlobalIgnoredName('required', $a);\n\n return $instance;\n }", "protected function getReader()\n\t{\n\t\twith($reader = new SimpleAnnotationReader)\n\t\t\t\t->addNamespace('Adamgoose\\Events\\Annotations\\Annotations');\n\n\t\treturn $reader;\n\t}", "private static function getReader()\n {\n return new IndexedReader(new AnnotationReader());\n// return new CachedReader(\n// new IndexedReader(new AnnotationReader()),\n// Cache::instance(__CLASS__),\n// false\n// );\n }", "public static function reader()\n {\n if (!self::$reader) {\n self::$reader = new AnnotationReader();\n self::$reader = new IndexedReader(new CachedReader(\n self::$reader,\n self::getCacheProvider()\n ));\n }\n\n return self::$reader;\n }", "protected function getCache_AnnotationsService()\n {\n return $this->services['cache.annotations'] = \\Symfony\\Component\\Cache\\Adapter\\AbstractAdapter::createSystemCache('o2NSV3WKIW', 0, 'MYfBg2oUlptyQ7C3Ob4WQe', (__DIR__.'/pools'), $this->get('monolog.logger.cache', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }", "protected function annotations()\n {\n if (! $this->annotations) {\n $this->annotations = new AnnotationReader($this);\n }\n\n return $this->annotations;\n }", "public function getAnnotation() {}", "protected static function getFacadeAccessor()\n {\n return AnnotationsReader::class;\n }", "public function getDirectValueAnnotationsManager(): Annotations\\IDirectValueAnnotationsManager\n {\n return $this->annotationsManager;\n }", "public static function getRegisteredAnnotations()\n {\n return self::$annotations;\n }", "public function get_service() {\n\n\t\treturn $this->provider_instance;\n\t}", "public function getAnnotation($key)\n {\n return $this->annotations[$key];\n }", "public function getAnnotations() {}", "public function getAnnotationDictionary() {}", "public function getAnnotations()\n {\n return $this->_annotations;\n }", "public function getService()\n {\n return $this->_service;\n }", "protected function getService()\n {\n return $this->service;\n }", "protected function getService()\n {\n return $this->service;\n }", "public function getAnnotations()\n {\n return $this->annotations;\n }", "public function getAnnotations()\n {\n return $this->annotations;\n }", "public function getAnnotations()\n {\n return $this->annotations;\n }", "public function getAnnotations()\n {\n return $this->annotations;\n }", "public function getAnnotations()\n {\n return $this->annotations;\n }", "public function getAnnotations()\n {\n return $this->annotations;\n }", "public function getAnnotations()\n {\n return $this->annotations;\n }", "public function getAnnotations()\n {\n return $this->annotations;\n }", "function getService() {\n return $this->service;\n }", "public static function get(\\SetaPDF_Core_Reader_ReaderInterface $reader) {}" ]
[ "0.78386486", "0.7793118", "0.75140715", "0.6867563", "0.6572512", "0.64137864", "0.6359297", "0.62259763", "0.6131553", "0.5929245", "0.5681704", "0.5652193", "0.558437", "0.5562851", "0.5559268", "0.5553822", "0.5501414", "0.54617417", "0.5460059", "0.5460059", "0.5460035", "0.5460035", "0.5460035", "0.5460035", "0.5460035", "0.5460035", "0.5460035", "0.5460035", "0.54369104", "0.54355705" ]
0.7894564
0
Gets the private 'config_cache_factory' shared service.
protected function getConfigCacheFactoryService() { return $this->services['config_cache_factory'] = new \Symfony\Component\Config\ResourceCheckerConfigCacheFactory(new RewindableGenerator(function () { yield 0 => ${($_ = isset($this->services['dependency_injection.config.container_parameters_resource_checker']) ? $this->services['dependency_injection.config.container_parameters_resource_checker'] : $this->services['dependency_injection.config.container_parameters_resource_checker'] = new \Symfony\Component\DependencyInjection\Config\ContainerParametersResourceChecker($this)) && false ?: '_'}; yield 1 => ${($_ = isset($this->services['config.resource.self_checking_resource_checker']) ? $this->services['config.resource.self_checking_resource_checker'] : $this->services['config.resource.self_checking_resource_checker'] = new \Symfony\Component\Config\Resource\SelfCheckingResourceChecker()) && false ?: '_'}; }, 2)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getConfigCacheFactoryService()\n {\n return $this->services['config_cache_factory'] = new \\Symfony\\Component\\Config\\ResourceCheckerConfigCacheFactory(array());\n }", "protected function getCacheService()\n {\n return $this->services['cache'] = new \\phpbb\\cache\\service(${($_ = isset($this->services['cache.driver']) ? $this->services['cache.driver'] : ($this->services['cache.driver'] = new \\phpbb\\cache\\driver\\file())) && false ?: '_'}, ${($_ = 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 ?: '_'}, './../', 'php');\n }", "protected static function configFactory() {\n return \\Drupal::configFactory();\n }", "public function getCacheConfig()\n {\n $config = null;\n if (file_exists($this->options['cache_path'])) {\n $content = @file_get_contents($this->options['cache_path']);\n $config = new Config($this->app, $content);\n }\n return $config;\n }", "protected function getConfigService()\n {\n return $this->services['config'] = new \\phpbb\\config\\db(${($_ = isset($this->services['dbal.conn']) ? $this->services['dbal.conn'] : ($this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this))) && false ?: '_'}, ${($_ = isset($this->services['cache.driver']) ? $this->services['cache.driver'] : ($this->services['cache.driver'] = new \\phpbb\\cache\\driver\\file())) && false ?: '_'}, 'phpbb_config');\n }", "protected function getCache_AppService()\n {\n $this->services['cache.app'] = $instance = new \\Symfony\\Component\\Cache\\Adapter\\FilesystemAdapter('n5NzkKREKO', 0, (__DIR__.'/pools'));\n\n if ($this->has('monolog.logger.cache')) {\n $instance->setLogger($this->get('monolog.logger.cache', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }\n\n return $instance;\n }", "static public function getInstance()\n\t{\n\t\tif (empty(self::$_instance))\n\t\t\tself::$_instance = new CacheFileFactory();\n\t\t\n\t\treturn self::$_instance;\n\t}", "protected function _initCache()\n {\n $this->bootstrap('Config');\n $appConfig = Zend_Registry::get('config');\n $cache = NULL;\n\n // only attempt to init the cache if turned on\n if ($appConfig->app->caching) {\n\n // get the cache settings\n $config = $appConfig->app->cache;\n\n if (NULL !== $this->_tmpFolder) {\n if ('File' == $config->backend->adapter && !isset($config->backend->options->cache_dir)) {\n $config->backend->options->cache_dir = $this->_tmpFolder . '/cache';\n if (!is_dir($config->backend->options->cache_dir)) {\n mkdir($config->backend->options->cache_dir);\n }\n }\n }\n\n try {\n $cache = Zend_Cache::factory(\n $config->frontend->adapter,\n $config->backend->adapter,\n $config->frontend->options->toArray(),\n $config->backend->options->toArray()\n );\n } catch (Zend_Cache_Exception $e) {\n // send email to alert caching failed\n Zend_Registry::get('log')->alert(\n 'Caching failed: adapter=' . $config->backend->adapter . ', message=' . $e->getMessage(\n ));\n }\n }\n Zend_Registry::set('cache', $cache);\n return $cache;\n }", "protected static function getCacheManager() {}", "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 }", "function _biurnal_conf_get_conf_cache($name) {\n ctools_include('object-cache');\n $cache = ctools_object_cache_get('biurnal_conf', $name);\n if (!$cache) {\n $cache = biurnal_conf_load($name);\n if ($cache) {\n $cache->locked = ctools_object_cache_test('biurnal_conf', $name);\n }\n }\n\n return $cache;\n}", "public function getDefaultCacheFactory(): ?Factory\n {\n return Cache::getFacadeRoot();\n }", "public static function getInstance() {\r\n if (!Website_Service_Cache::$instance instanceof self) {\r\n Website_Service_Cache::$instance = new self();\r\n }\r\n return Website_Service_Cache::$instance;\r\n }", "protected function getCache_DriverService()\n {\n return $this->services['cache.driver'] = new \\phpbb\\cache\\driver\\file();\n }", "static function factory()\n {\n if (function_exists('apc_fetch')) {\n $class = new BaseZF_Framework_Cache_Apc();\n } else {\n $class = new BaseZF_Framework_Cache_Apc_Disable();\n }\n\n return $class;\n }", "public function getServiceConfig()\n {\n return array(\n 'factories' => array(\n 'AuthService' => function($sm) {\n // Make sure database is started.\n $sm->get('Model');\n \n $authService = new AuthenticationService();\n $adapter = new \\Swaggerdile\\Authentication\\Adapter\\Wordpress();\n\n $authService->setAdapter($adapter);\n\n // Get configuration\n $config = $sm->get('config');\n\n $authService->setStorage(new CookieBase(\n $config['cookiebase_short_secret'],\n $config['cookiebase_secret'],\n $config['cookiebase_name'],\n $config['cookiebase_timeout'],\n $config['cookiebase_domain']));\n\n return $authService;\n },\n\n 'IsAdult' => function($sm) {\n $request = $sm->get('Request');\n\n $cookie = $request->getCookie();\n return (is_object($cookie) &&\n $cookie->offsetExists('swaggerdile_opt_in') &&\n (int)$cookie->swaggerdile_opt_in);\n },\n\n 'Model' => function($sm) {\n $dbAdapter = $sm->get('\\Zend\\Db\\Adapter\\Adapter');\n \\Zend\\Db\\TableGateway\\Feature\\GlobalAdapterFeature::setStaticAdapter($dbAdapter);\n\n if($sm->get('IsAdult')) {\n \\Swaggerdile\\Model\\ModelTable::enableAdult();\n } else{\n \\Swaggerdile\\Model\\ModelTable::disableAdult();\n }\n\n return \\Swaggerdile\\Model\\Factory::getInstance();\n },\n\n 'Media' => function($sm) {\n $config = $sm->get('config');\n return new \\Swaggerdile\\Media( $config['media']['publicMediaBasePath'],\n $config['media']['privateMediaBasePath']);\n },\n\n 'Wordpress' => function($sm) {\n $config = $sm->get('config');\n return new \\Swaggerdile\\Wordpress( $config['wordpress_api_url'],\n $config['wordpress_api_key']);\n },\n\n 'Email' => function($sm) {\n $config = $sm->get('config');\n return new \\Swaggerdile\\Mail($config['mail']);\n },\n\n 'Crypto' => function($sm) {\n $config = $sm->get('config');\n return new \\Swaggerdile\\Crypto($config['crypto']);\n },\n\n 'Cache' => function($sm) {\n $config = $sm->get('config');\n\n if(array_key_exists('cloudflare_zone', $config)) {\n return new \\Swaggerdile\\Cache(\n $config['cloudflare_zone'],\n $config['cloudflare_user'],\n $config['cloudflare_key']);\n } else {\n return new \\Swaggerdile\\Cache('', '', '');\n }\n }, \n\n 'SDExceptionStrategy' => function($sm) {\n $strategy = new \\Swaggerdile\\Mvc\\View\\Http\\ExceptionStrategy();\n\n // @TODO : make this configurable\n $strategy->setDisplayExceptions(false);\n $strategy->setExceptionTemplate(\"error/index\");\n\n return $strategy;\n },\n\n 'SDRouteNotFoundStrategy' => function($sm) {\n $strategy = new \\Swaggerdile\\Mvc\\View\\Http\\RouteNotFoundStrategy();\n\n // @TODO : make this configurable\n $strategy->setDisplayExceptions(false);\n $strategy->setNotFoundTemplate(\"error/404\");\n\n return $strategy;\n },\n\n 'User' => function($sm) {\n $authAdapter = $sm->get('AuthService');\n\n if(!$authAdapter->hasIdentity()) {\n return false;\n }\n\n $id = $authAdapter->getIdentity();\n\n if(!is_object($id)) {\n $user = $sm->get('Model')\n ->get('User')\n ->fetchById($id);\n } else {\n $user = $sm->get('Model')\n ->get('User')\n ->fetchById($id->getId());\n }\n\n return $user === null ? false : $user; \n },\n\n 'Jira' => function($sm) {\n return new \\chobie\\Jira\\Api(\n TIGERDILE_JIRA_URL,\n new \\chobie\\Jira\\Api\\Authentication\\Basic(\n TIGERDILE_JIRA_USER,\n TIGERDILE_JIRA_PASSWORD\n )\n );\n },\n\n 'Chat' => function($sm) {\n return new \\Swaggerdile\\Chat();\n },\n ),\n );\n }", "public function getConfig()\n {\n $provider = new ConfigProvider();\n return [\n 'service_manager' => $provider->getDependencyConfig(),\n ];\n }", "public function getConfig()\n {\n $provider = new ConfigProvider();\n return [\n 'service_manager' => $provider->getDependencyConfig(),\n ];\n }", "public static function getCacheProvider()\n {\n if (!self::$provider) {\n self::$provider = new ArrayCache();\n }\n\n return self::$provider;\n }", "function cacheConfig() {\n\t\tif(!isset($this->_options['configCachePath'])) {\n\t\t\tthrow new PPI_Exception('Missing path to the config cache path');\n\t\t}\n\n\t\t$path = sprintf('%s%s.%s.cache',\n\t\t\t$this->_options['configCachePath'],\n\t\t\t$this->_options['configFile'],\n\t\t\t$this->_options['configBlock']);\n\n\t\tif(file_exists($path)) {\n\t\t\treturn unserialize(file_get_contents($path));\n\t\t}\n\t\t$config = $this->parseConfig();\n\t\tfile_put_contents($path, serialize($config));\n\t\treturn $config;\n\t}", "public function getCache()\r\n\t{\r\n\t\treturn \\Bitrix\\Main\\Data\\Cache::createInstance();\r\n\t}", "public function getCacheFactory(): ?Factory\n {\n if (!$this->hasCacheFactory()) {\n $this->setCacheFactory($this->getDefaultCacheFactory());\n }\n return $this->cacheFactory;\n }", "public static function getCache()\n\t{\n\t if (!self::$cache) {\n\t\t\t$frontendOptions = array('lifetime' => 604800, \n\t\t\t\t\t\t\t\t\t 'automatic_serialization' => true);\n\t\t\t$backendOptions = array('cache_dir' => APPLICATION_PATH . '/../data/cache');\n\t\t\tself::$cache \t = Zend_Cache::factory('Core', 'File', $frontendOptions, $backendOptions);\n\t }\n\t\treturn self::$cache;\n\t}", "public static function getInstance() {\n return self::getConfig();\n }", "protected function getCache() {\n\t\t$factory = $this->policy('rate_factoryname');\n\t\t$lifetime = $this->policy('rate_lock_timeout') + 60; // As long as it's longer than the actual timeout\n\t\t$cache = SS_Cache::factory($factory);\n\t\t$cache->setOption('automatic_serialization', true);\n\t\t$cache->setOption('lifetime', $lifetime);\n\t\treturn $cache;\n\t}", "protected function getCache_AnnotationsService()\n {\n return $this->services['cache.annotations'] = \\Symfony\\Component\\Cache\\Adapter\\AbstractAdapter::createSystemCache('o2NSV3WKIW', 0, 'MYfBg2oUlptyQ7C3Ob4WQe', (__DIR__.'/pools'), $this->get('monolog.logger.cache', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }", "protected function getCache_SystemService()\n {\n return $this->services['cache.system'] = \\Symfony\\Component\\Cache\\Adapter\\AbstractAdapter::createSystemCache('oF4uGKF1Zr', 0, 'MYfBg2oUlptyQ7C3Ob4WQe', (__DIR__.'/pools'), $this->get('monolog.logger.cache', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }", "protected function getCacheManager() {}", "protected function getCacheManager() {}", "function getCacheServices();" ]
[ "0.85419357", "0.7490239", "0.69463694", "0.6896996", "0.6809103", "0.66566825", "0.6515313", "0.6390726", "0.6376414", "0.63504124", "0.63116676", "0.6310457", "0.62856317", "0.6273551", "0.6257921", "0.6257274", "0.6251199", "0.6251199", "0.62475675", "0.62276244", "0.6211742", "0.620726", "0.6198504", "0.6190014", "0.6181773", "0.6180085", "0.6177892", "0.6162036", "0.6161027", "0.6158324" ]
0.83640254
1
Gets the private 'controller_name_converter' shared service.
protected function getControllerNameConverterService() { return $this->services['controller_name_converter'] = new \Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser(${($_ = isset($this->services['kernel']) ? $this->services['kernel'] : $this->get('kernel', 1)) && false ?: '_'}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getControllerNameConverterService()\n {\n return $this->services['controller_name_converter'] = new \\Symfony\\Bundle\\FrameworkBundle\\Controller\\ControllerNameParser($this->get('kernel'));\n }", "protected function getResolveControllerNameSubscriberService()\n {\n return $this->services['resolve_controller_name_subscriber'] = new \\Symfony\\Bundle\\FrameworkBundle\\EventListener\\ResolveControllerNameSubscriber(${($_ = isset($this->services['controller_name_converter']) ? $this->services['controller_name_converter'] : $this->services['controller_name_converter'] = new \\Symfony\\Bundle\\FrameworkBundle\\Controller\\ControllerNameParser(${($_ = isset($this->services['kernel']) ? $this->services['kernel'] : $this->get('kernel', 1)) && false ?: '_'})) && false ?: '_'});\n }", "public function getControllerName() {}", "public function getControllerObjectName() {}", "public function getControllerObjectName() {}", "public function getBaseControllerName(): string;", "protected function getModuleFromControllerName() \r\n {\r\n $controller_name = get_class($this);\r\n return strtolower(preg_replace('/_(.*?)$/i', '', $controller_name));\r\n }", "function getControllerObjectName() ;", "public function getControllerName()\n {\n return Inflector::id2camel($this->getControllerId(),'-');\n }", "public function getControllerExtensionName() {}", "public function getControllerExtensionName() {}", "public function getControllerName() {\n\n\t\treturn $this->_controller;\n\t}", "public function getControllerName(){\n\t\t$className = get_class($this);\n\t\tif(isset(self::$_controllerName[$className])){\n\t\t\treturn self::$_controllerName[$className];\n\t\t} else {\n\t\t\treturn $className;\n\t\t}\n\t}", "protected function getController_ResolverService()\n {\n return $this->services['controller.resolver'] = new \\phpbb\\controller\\resolver($this, './../', ${($_ = isset($this->services['template']) ? $this->services['template'] : $this->getTemplateService()) && false ?: '_'});\n }", "public function getControllername()\r\n {\r\n return $this->controllername;\r\n }", "public function getController()\n {\n return $this->str_controller;\n }", "public function getControllerName() {\n\t\treturn $this->controller;\n\t}", "public function getControllerName()\n {\n return $this->_controller;\n }", "public function getController(): string\n {\n return $this->controller;\n }", "public function getController(): string\n {\n return $this->controller;\n }", "public function getControllerName()\n {\n return $this->controller;\n }", "public function getControllerName()\n {\n if (is_null($this->_controllerName)) {\n $this->getController();\n }\n return $this->_controllerName;\n }", "public function getControllerName() {\n return $this->controllerName;\n }", "public static function getControllerName()\r\n\t{\r\n\t\treturn TRequest::getCmd('controller');\r\n\t}", "private function getControllerName() {\n if(isset($_GET['c']) && !empty($_GET['c'])) {\n return $_GET['c'];\n }\n return Config::getDefaultController();\n }", "public function getController()\n\t{\n\t\t$className = strtolower(get_class($this));\n\t\t$className = preg_replace('/_controller$/', '', $className);\n\n\t\treturn $className;\n\t}", "private function _getControllerClassName($name)\n {\n $parts = explode('/', $name);\n $result = '';\n \n //Vendor part\n foreach ( explode('_', $parts[0]) as $key )\n {\n $result .= ucfirst($key) . '_';\n }\n //Package part\n foreach ( explode('_', $parts[1]) as $key )\n {\n $result .= ucfirst($key) . '_';\n }\n //Module part\n foreach ( explode('_', $parts[2]) as $key )\n {\n $result .= ucfirst($key) . '_';\n }\n \n $result .= 'Controller';\n \n if (empty($parts[3]))\n {\n $result .= '_Default';\n }\n else foreach ( explode('_', $parts[3]) as $key )\n {\n $result .= '_'.ucfirst($key);\n }\n return $result;\n }", "public function getControllerName()\n {\n return preg_replace(\"/(.*)[\\\\\\\\](.*)(Controller)/\", '$2', get_class($this));\n }", "public function getController()\n {\n return ucfirst($this->controller).'Controller';\n }", "public function getController() {\n\t\tif (isset($_GET[$this->config->get('controllerParam')]))\n\t\t\t$controller = clearPath(urldecode($_GET[$this->config->get('controllerParam')]));\n\t\telse\n\t\t\t$controller = clearPath($this->config->get('defaultController'));\n\t\t\n\t\treturn strtolower($controller);\n\t}" ]
[ "0.87402654", "0.75222164", "0.6778608", "0.6602507", "0.6602507", "0.6550051", "0.65097094", "0.64549685", "0.6215908", "0.6212425", "0.6212425", "0.6200901", "0.617198", "0.61692774", "0.614288", "0.61354715", "0.6130968", "0.6097719", "0.60866785", "0.60866785", "0.60849196", "0.6076881", "0.6072362", "0.60608405", "0.6060049", "0.60260415", "0.59579945", "0.5924119", "0.59186566", "0.5907464" ]
0.8904801
0
Gets the private 'debug.debug_handlers_listener' shared service.
protected function getDebug_DebugHandlersListenerService() { 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); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 getDispatcherListener()\n {\n return $this->di->getShared('dispatcherListener');\n }", "private function getDebugLogger()\n {\n foreach ($this->handlers as $handler) {\n if ($handler instanceof Ecocode_Profiler_Model_Logger_DebugHandlerInterface) {\n return $handler;\n }\n }\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 }", "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 getListener(/* ... */)\n {\n return $this->_listener;\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 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 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 }", "public function listener() {\n\t\treturn $this->_runtime['listener'];\n\t}", "public function getHandlerManager()\n {\n return $this->handlerManager;\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 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 }", "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 }", "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 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 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 getSessionListenerService()\n {\n return $this->services['session_listener'] = new \\Symfony\\Bundle\\FrameworkBundle\\EventListener\\SessionListener($this);\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 }", "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 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 }", "public function getHandler();", "public function getHandler();", "public function getHandler() {}", "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 getSensioFrameworkExtra_Cache_ListenerService()\n {\n return $this->services['sensio_framework_extra.cache.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\HttpCacheListener();\n }", "private static function getHandler()\n {\n if (self::$config_handler == null) {\n self::$config_handler = new self();\n }\n return self::$config_handler;\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 getVictoireBlog_BlogMenuListenerService()\n {\n return $this->services['victoire_blog.blog_menu_listener'] = new \\Victoire\\Bundle\\BlogBundle\\Listener\\BlogMenuListener($this->get('victoire_core.admin_menu_builder'));\n }" ]
[ "0.8282563", "0.6258716", "0.62494403", "0.61819434", "0.6104834", "0.61011034", "0.59818786", "0.59299964", "0.5870668", "0.5847579", "0.5801385", "0.5797447", "0.5788257", "0.5761843", "0.57312024", "0.57001466", "0.56827587", "0.56806254", "0.56712466", "0.5661961", "0.5654134", "0.56463605", "0.5618169", "0.5618169", "0.56068575", "0.55812097", "0.5545088", "0.55439276", "0.54863846", "0.54839885" ]
0.82447433
1
Gets the private 'doctrine.dbal.connection_factory' shared service.
protected function getDoctrine_Dbal_ConnectionFactoryService() { return $this->services['doctrine.dbal.connection_factory'] = new \Doctrine\Bundle\DoctrineBundle\ConnectionFactory(array()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getDoctrine_Dbal_DefaultConnectionService()\n {\n $a = new \\Doctrine\\DBAL\\Logging\\LoggerChain();\n $a->addLogger(new \\Symfony\\Bridge\\Doctrine\\Logger\\DbalLogger(${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->services['logger'] = new \\Symfony\\Component\\HttpKernel\\Log\\Logger()) && false ?: '_'}, NULL));\n $a->addLogger(new \\Doctrine\\DBAL\\Logging\\DebugStack());\n\n $b = new \\Doctrine\\DBAL\\Configuration();\n $b->setSQLLogger($a);\n\n $c = new \\Symfony\\Bridge\\Doctrine\\ContainerAwareEventManager($this);\n $c->addEventListener(array(0 => 'loadClassMetadata'), ${($_ = isset($this->services['doctrine.orm.default_listeners.attach_entity_listeners']) ? $this->services['doctrine.orm.default_listeners.attach_entity_listeners'] : $this->services['doctrine.orm.default_listeners.attach_entity_listeners'] = new \\Doctrine\\ORM\\Tools\\AttachEntityListenersListener()) && false ?: '_'});\n\n return $this->services['doctrine.dbal.default_connection'] = ${($_ = isset($this->services['doctrine.dbal.connection_factory']) ? $this->services['doctrine.dbal.connection_factory'] : $this->services['doctrine.dbal.connection_factory'] = new \\Doctrine\\Bundle\\DoctrineBundle\\ConnectionFactory(array())) && false ?: '_'}->createConnection(array('driver' => 'pdo_mysql', 'charset' => 'utf8mb4', 'url' => $this->getEnv('resolve:DATABASE_URL'), 'host' => 'localhost', 'port' => NULL, 'user' => 'root', 'password' => NULL, 'driverOptions' => array(), 'serverVersion' => '5.7', 'defaultTableOptions' => array('charset' => 'utf8mb4', 'collate' => 'utf8mb4_unicode_ci')), $b, $c, array());\n }", "protected function getDbal_ConnService()\n {\n return $this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this);\n }", "public function getDoctrineConnection()\n {\n $driver = $this->getDoctrineDriver ();\n $data = array (\n 'pdo' => $this->pdo,\n 'dbname' => $this->getConfig ( 'database' )\n );\n return new \\Doctrine\\DBAL\\Connection ( $data, $driver );\n }", "public function getDoctrineConnection()\n {\n if(self::$doctrine_connection === null) {\n \n $config = new \\Doctrine\\DBAL\\Configuration();\n \n $connectionParams = array(\n 'dbname' => $GLOBALS['DB_DBNAME'],\n 'user' => $GLOBALS['DB_USER'],\n 'password' => $GLOBALS['DB_PASSWD'],\n 'host' => 'localhost',\n 'driver' => 'pdo_mysql',\n );\n \n self::$doctrine_connection = \\Doctrine\\DBAL\\DriverManager::getConnection($connectionParams, $config);\n }\n \n return self::$doctrine_connection;\n \n }", "protected function getConnection()\n {\n return $this->createDefaultDBConnection($this->createPdo(), static::NAME);\n }", "protected function getConnection()\n {\n require_once __DIR__ . '/../../../doctrine/bootstrap_pdo.php';\n return getConnectionToTestDB();\n }", "public static function getDoctrineConnection()\n {\n }", "public function getDbalConnection();", "public function getConnection() {\n\t\t$db = Config::get('librarydirectory::database.default');\n return static::resolveConnection($db);\n }", "static function getDbConnection() {\n\n if (empty(static::$db)) {\n $pdo = Service::get('pdo');\n static::$db = new \\PDO($pdo['dns'], $pdo['user'], $pdo['password']);\n }\n return static::$db;\n }", "final protected function getConnection(): Connection\n {\n return $this->em->getConnection();\n }", "public function getConnection()\n {\n return $this->createDefaultDBConnection($this->_pdo, Zend_Registry::get('config')->database->dbname);\n }", "public function getConnection()\n {\n return $this->createDefaultDBConnection($this->_pdo, Zend_Registry::get('config')->database->dbname);\n }", "protected function getConnection()\n {\n $pdo = new PDO(DB_DSN, DB_USER, DB_PASS);\n return new DefaultConnection($pdo, DB_NAME);\n }", "protected static function getDatabaseConnection() {}", "protected static function getDatabaseConnection() {}", "protected static function getDatabaseConnection() {}", "protected function getDatabaseConnection( )\n {\n if( sfConfig::get('sf_use_database') )\n {\n try\n {\n return Doctrine_Manager::connection();\n }\n catch( Doctrine_Connection_Exception $e )\n {\n new sfDatabaseManager(sfContext::getInstance()->getConfiguration());\n return Doctrine_Manager::connection();\n }\n }\n\n return null;\n }", "public static function getConnection()\n {\n return static::getInstance();\n }", "public function getConnection()\n {\n $this->connection = db($this->connectionName);\n\n return $this->connection;\n }", "protected static function getConnection() {\n\n static $connection = null;\n\n if ($connection === null) {\n try {\n $dsn = 'mysql:host=' . Config::DB_HOST . ';dbname=' . Config::DB_NAME;\n $connection = new PDO($dsn, Config::DB_USER, Config::DB_PSWD);\n $connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n }\n catch(PDOException $e) {\n throw new \\Exception('Error from: ' . get_class($this) . ' - Unable to connect to database ' . Config::DB_NAME);\n }\n }\n\n return $connection;\n\n }", "protected function getDbal_Extractor_FactoryService()\n {\n return $this->services['dbal.extractor.factory'] = new \\phpbb\\db\\extractor\\factory(${($_ = isset($this->services['dbal.conn.driver']) ? $this->services['dbal.conn.driver'] : $this->get('dbal.conn.driver', 1)) && false ?: '_'}, $this);\n }", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}" ]
[ "0.7696066", "0.7554053", "0.7129665", "0.68138146", "0.6775207", "0.6718847", "0.6718172", "0.6692915", "0.6646955", "0.6597594", "0.65972865", "0.6595268", "0.6595268", "0.65097743", "0.6505646", "0.65036124", "0.65036124", "0.6482762", "0.6459367", "0.6436997", "0.64220536", "0.6415463", "0.6408783", "0.6408783", "0.6408783", "0.6408783", "0.6408783", "0.6408783", "0.6408783", "0.6408783" ]
0.80488616
1
Gets the private 'doctrine.orm.default_entity_listener_resolver' shared service.
protected function getDoctrine_Orm_DefaultEntityListenerResolverService() { return $this->services['doctrine.orm.default_entity_listener_resolver'] = new \Doctrine\Bundle\DoctrineBundle\Mapping\ContainerAwareEntityListenerResolver($this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 getDoctrine_Dbal_DefaultConnectionService()\n {\n $a = $this->get('annotation_reader');\n\n $b = new \\Gedmo\\Tree\\TreeListener();\n $b->setAnnotationReader($a);\n\n $c = new \\Knp\\DoctrineBehaviors\\Reflection\\ClassAnalyzer();\n\n $d = new \\Gedmo\\Sluggable\\SluggableListener();\n $d->setAnnotationReader($a);\n\n $e = new \\Gedmo\\Timestampable\\TimestampableListener();\n $e->setAnnotationReader($a);\n\n $f = new \\Symfony\\Bridge\\Doctrine\\ContainerAwareEventManager($this);\n $f->addEventSubscriber($b);\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\Sluggable\\SluggableSubscriber($c, true, 'Knp\\\\DoctrineBehaviors\\\\Model\\\\Sluggable\\\\Sluggable'));\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\Translatable\\TranslatableSubscriber($c, new \\Knp\\DoctrineBehaviors\\ORM\\Translatable\\CurrentLocaleCallable($this), new \\Knp\\DoctrineBehaviors\\ORM\\Translatable\\DefaultLocaleCallable('en'), 'Knp\\\\DoctrineBehaviors\\\\Model\\\\Translatable\\\\Translatable', 'Knp\\\\DoctrineBehaviors\\\\Model\\\\Translatable\\\\Translation', 'LAZY', 'LAZY'));\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\Loggable\\LoggableSubscriber($c, true, new \\Knp\\DoctrineBehaviors\\ORM\\Loggable\\LoggerCallable($this->get('logger'))));\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\Geocodable\\GeocodableSubscriber($c, true, 'Knp\\\\DoctrineBehaviors\\\\Model\\\\Geocodable\\\\Geocodable', NULL));\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\Sortable\\SortableSubscriber($c, true, 'Knp\\\\DoctrineBehaviors\\\\Model\\\\Sortable\\\\Sortable'));\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\Blameable\\BlameableSubscriber($c, true, 'Knp\\\\DoctrineBehaviors\\\\Model\\\\Blameable\\\\Blameable', new \\Knp\\DoctrineBehaviors\\ORM\\Blameable\\UserCallable($this), NULL));\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\Tree\\TreeSubscriber($c, true, 'Knp\\\\DoctrineBehaviors\\\\Model\\\\Tree\\\\Node'));\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\Timestampable\\TimestampableSubscriber($c, true, 'Knp\\\\DoctrineBehaviors\\\\Model\\\\Timestampable\\\\Timestampable', 'datetime'));\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\SoftDeletable\\SoftDeletableSubscriber($c, true, 'Knp\\\\DoctrineBehaviors\\\\Model\\\\SoftDeletable\\\\SoftDeletable'));\n $f->addEventSubscriber($d);\n $f->addEventSubscriber($e);\n $f->addEventSubscriber($this->get('victoire_view_reference.event_subscriber'));\n $f->addEventSubscriber($this->get('victoire_core.widget_discriminator_map.subscriber'));\n $f->addEventSubscriber(new \\FOS\\UserBundle\\Doctrine\\UserListener(${($_ = isset($this->services['fos_user.util.password_updater']) ? $this->services['fos_user.util.password_updater'] : $this->getFosUser_Util_PasswordUpdaterService()) && false ?: '_'}, ${($_ = isset($this->services['fos_user.util.canonical_fields_updater']) ? $this->services['fos_user.util.canonical_fields_updater'] : $this->getFosUser_Util_CanonicalFieldsUpdaterService()) && false ?: '_'}));\n $f->addEventSubscriber($this->get('victoire_core.widget_subscriber'));\n $f->addEventSubscriber($this->get('victoire_business_entity.business_entity_subscriber'));\n $f->addEventSubscriber($this->get('victoire_analytics.browser_event.subscriber'));\n $f->addEventSubscriber($this->get('page.subscriber'));\n $f->addEventSubscriber($this->get('victoire_blog.article.subscriber'));\n $f->addEventListener(array(0 => 'loadClassMetadata'), $this->get('victoire_core.entity_proxy.subscriber'));\n $f->addEventListener(array(0 => 'prePersist', 1 => 'preUpdate', 2 => 'postPersist', 3 => 'postUpdate', 4 => 'preRemove'), $this->get('victoire_media.listener.doctrine'));\n $f->addEventListener(array(0 => 'loadClassMetadata'), $this->get('doctrine.orm.default_listeners.attach_entity_listeners'));\n\n return $this->services['doctrine.dbal.default_connection'] = $this->get('doctrine.dbal.connection_factory')->createConnection(array('driver' => 'pdo_mysql', 'host' => 'db', 'port' => NULL, 'dbname' => 'victoire', 'user' => 'victoire', 'password' => 'victoire', 'charset' => 'UTF8', 'driverOptions' => array(), 'defaultTableOptions' => array()), new \\Doctrine\\DBAL\\Configuration(), $f, array());\n }", "protected function getDispatcherListener()\n {\n return $this->di->getShared('dispatcherListener');\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 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 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 getEntityResolver()\n {\n return \\Yii::createObject('app\\modules\\queue\\components\\interfaces\\EntityResolverInterface');\n }", "protected function getDoctrine_Orm_DefaultManagerConfiguratorService()\n {\n return $this->services['doctrine.orm.default_manager_configurator'] = new \\Doctrine\\Bundle\\DoctrineBundle\\ManagerConfigurator(array(), array());\n }", "protected function getDoctrine_Orm_DefaultManagerConfiguratorService()\n {\n return $this->services['doctrine.orm.default_manager_configurator'] = new \\Doctrine\\Bundle\\DoctrineBundle\\ManagerConfigurator(array(), array());\n }", "protected function getSwiftmailer_Mailer_Default_Transport_EventdispatcherService()\n {\n return $this->services['swiftmailer.mailer.default.transport.eventdispatcher'] = new \\Swift_Events_SimpleEventDispatcher();\n }", "public function getListener(/* ... */)\n {\n return $this->_listener;\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 resolver() {\n return $this->resolver;\n }", "protected function getVictoire_WidgetFilter_Blog_Set_Default_Values_Form_ListenerService()\n {\n return $this->services['victoire.widget_filter.blog.set.default.values.form.listener'] = new \\Victoire\\Bundle\\BlogBundle\\Listener\\ArticleFilterDefaultValuesListener($this->get('doctrine.orm.default_entity_manager'));\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 }", "protected function getRouting_DelegatedLoaderService()\n {\n return $this->services['routing.delegated_loader'] = new \\Symfony\\Component\\Config\\Loader\\DelegatingLoader(${($_ = isset($this->services['routing.resolver']) ? $this->services['routing.resolver'] : $this->getRouting_ResolverService()) && 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 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 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 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 getDoctrine_Dbal_DefaultConnectionService()\n {\n $a = new \\Doctrine\\DBAL\\Logging\\LoggerChain();\n $a->addLogger(new \\Symfony\\Bridge\\Doctrine\\Logger\\DbalLogger(${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->services['logger'] = new \\Symfony\\Component\\HttpKernel\\Log\\Logger()) && false ?: '_'}, NULL));\n $a->addLogger(new \\Doctrine\\DBAL\\Logging\\DebugStack());\n\n $b = new \\Doctrine\\DBAL\\Configuration();\n $b->setSQLLogger($a);\n\n $c = new \\Symfony\\Bridge\\Doctrine\\ContainerAwareEventManager($this);\n $c->addEventListener(array(0 => 'loadClassMetadata'), ${($_ = isset($this->services['doctrine.orm.default_listeners.attach_entity_listeners']) ? $this->services['doctrine.orm.default_listeners.attach_entity_listeners'] : $this->services['doctrine.orm.default_listeners.attach_entity_listeners'] = new \\Doctrine\\ORM\\Tools\\AttachEntityListenersListener()) && false ?: '_'});\n\n return $this->services['doctrine.dbal.default_connection'] = ${($_ = isset($this->services['doctrine.dbal.connection_factory']) ? $this->services['doctrine.dbal.connection_factory'] : $this->services['doctrine.dbal.connection_factory'] = new \\Doctrine\\Bundle\\DoctrineBundle\\ConnectionFactory(array())) && false ?: '_'}->createConnection(array('driver' => 'pdo_mysql', 'charset' => 'utf8mb4', 'url' => $this->getEnv('resolve:DATABASE_URL'), 'host' => 'localhost', 'port' => NULL, 'user' => 'root', 'password' => NULL, 'driverOptions' => array(), 'serverVersion' => '5.7', 'defaultTableOptions' => array('charset' => 'utf8mb4', 'collate' => 'utf8mb4_unicode_ci')), $b, $c, array());\n }", "protected function getVictoireMedia_Listener_DoctrineService()\n {\n return $this->services['victoire_media.listener.doctrine'] = new \\Victoire\\Bundle\\MediaBundle\\EventListener\\DoctrineMediaListener($this->get('victoire_media.media_manager'));\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 }", "public static function getDatasourceResolver()\n {\n return static::$resolver;\n }", "protected function getEntityManager()\n {\n $em = $this->getServiceLocator()->get('doctrine.entitymanager.orm_default');\n return $em;\n }", "private function getManagerServiceId()\n {\n return 'doctrine.orm.entity_manager';\n }", "protected function getRouting_ResolverService()\n {\n return $this->services['routing.resolver'] = new \\phpbb\\routing\\loader_resolver(${($_ = isset($this->services['routing.loader.collection']) ? $this->services['routing.loader.collection'] : $this->getRouting_Loader_CollectionService()) && false ?: '_'});\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 }" ]
[ "0.6966117", "0.6966117", "0.6498643", "0.63196063", "0.62522846", "0.61482424", "0.60225236", "0.59778345", "0.5947468", "0.5942576", "0.5942576", "0.5940109", "0.57047516", "0.5683288", "0.5628644", "0.56167156", "0.55560815", "0.5549502", "0.55389035", "0.55319613", "0.55266184", "0.55062425", "0.5471043", "0.5469063", "0.5461043", "0.5441814", "0.5426334", "0.53974545", "0.53880525", "0.5386834" ]
0.85726523
1
Gets the private 'doctrine.orm.default_listeners.attach_entity_listeners' shared service.
protected function getDoctrine_Orm_DefaultListeners_AttachEntityListenersService() { return $this->services['doctrine.orm.default_listeners.attach_entity_listeners'] = new \Doctrine\ORM\Tools\AttachEntityListenersListener(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getDoctrine_Orm_DefaultEntityListenerResolverService()\n {\n return $this->services['doctrine.orm.default_entity_listener_resolver'] = new \\Doctrine\\Bundle\\DoctrineBundle\\Mapping\\ContainerAwareEntityListenerResolver($this);\n }", "protected function getDoctrine_Orm_DefaultEntityListenerResolverService()\n {\n return $this->services['doctrine.orm.default_entity_listener_resolver'] = new \\Doctrine\\Bundle\\DoctrineBundle\\Mapping\\ContainerAwareEntityListenerResolver($this);\n }", "public function getListener(/* ... */)\n {\n return $this->_listener;\n }", "protected function getDoctrine_Dbal_DefaultConnectionService()\n {\n $a = $this->get('annotation_reader');\n\n $b = new \\Gedmo\\Tree\\TreeListener();\n $b->setAnnotationReader($a);\n\n $c = new \\Knp\\DoctrineBehaviors\\Reflection\\ClassAnalyzer();\n\n $d = new \\Gedmo\\Sluggable\\SluggableListener();\n $d->setAnnotationReader($a);\n\n $e = new \\Gedmo\\Timestampable\\TimestampableListener();\n $e->setAnnotationReader($a);\n\n $f = new \\Symfony\\Bridge\\Doctrine\\ContainerAwareEventManager($this);\n $f->addEventSubscriber($b);\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\Sluggable\\SluggableSubscriber($c, true, 'Knp\\\\DoctrineBehaviors\\\\Model\\\\Sluggable\\\\Sluggable'));\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\Translatable\\TranslatableSubscriber($c, new \\Knp\\DoctrineBehaviors\\ORM\\Translatable\\CurrentLocaleCallable($this), new \\Knp\\DoctrineBehaviors\\ORM\\Translatable\\DefaultLocaleCallable('en'), 'Knp\\\\DoctrineBehaviors\\\\Model\\\\Translatable\\\\Translatable', 'Knp\\\\DoctrineBehaviors\\\\Model\\\\Translatable\\\\Translation', 'LAZY', 'LAZY'));\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\Loggable\\LoggableSubscriber($c, true, new \\Knp\\DoctrineBehaviors\\ORM\\Loggable\\LoggerCallable($this->get('logger'))));\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\Geocodable\\GeocodableSubscriber($c, true, 'Knp\\\\DoctrineBehaviors\\\\Model\\\\Geocodable\\\\Geocodable', NULL));\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\Sortable\\SortableSubscriber($c, true, 'Knp\\\\DoctrineBehaviors\\\\Model\\\\Sortable\\\\Sortable'));\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\Blameable\\BlameableSubscriber($c, true, 'Knp\\\\DoctrineBehaviors\\\\Model\\\\Blameable\\\\Blameable', new \\Knp\\DoctrineBehaviors\\ORM\\Blameable\\UserCallable($this), NULL));\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\Tree\\TreeSubscriber($c, true, 'Knp\\\\DoctrineBehaviors\\\\Model\\\\Tree\\\\Node'));\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\Timestampable\\TimestampableSubscriber($c, true, 'Knp\\\\DoctrineBehaviors\\\\Model\\\\Timestampable\\\\Timestampable', 'datetime'));\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\SoftDeletable\\SoftDeletableSubscriber($c, true, 'Knp\\\\DoctrineBehaviors\\\\Model\\\\SoftDeletable\\\\SoftDeletable'));\n $f->addEventSubscriber($d);\n $f->addEventSubscriber($e);\n $f->addEventSubscriber($this->get('victoire_view_reference.event_subscriber'));\n $f->addEventSubscriber($this->get('victoire_core.widget_discriminator_map.subscriber'));\n $f->addEventSubscriber(new \\FOS\\UserBundle\\Doctrine\\UserListener(${($_ = isset($this->services['fos_user.util.password_updater']) ? $this->services['fos_user.util.password_updater'] : $this->getFosUser_Util_PasswordUpdaterService()) && false ?: '_'}, ${($_ = isset($this->services['fos_user.util.canonical_fields_updater']) ? $this->services['fos_user.util.canonical_fields_updater'] : $this->getFosUser_Util_CanonicalFieldsUpdaterService()) && false ?: '_'}));\n $f->addEventSubscriber($this->get('victoire_core.widget_subscriber'));\n $f->addEventSubscriber($this->get('victoire_business_entity.business_entity_subscriber'));\n $f->addEventSubscriber($this->get('victoire_analytics.browser_event.subscriber'));\n $f->addEventSubscriber($this->get('page.subscriber'));\n $f->addEventSubscriber($this->get('victoire_blog.article.subscriber'));\n $f->addEventListener(array(0 => 'loadClassMetadata'), $this->get('victoire_core.entity_proxy.subscriber'));\n $f->addEventListener(array(0 => 'prePersist', 1 => 'preUpdate', 2 => 'postPersist', 3 => 'postUpdate', 4 => 'preRemove'), $this->get('victoire_media.listener.doctrine'));\n $f->addEventListener(array(0 => 'loadClassMetadata'), $this->get('doctrine.orm.default_listeners.attach_entity_listeners'));\n\n return $this->services['doctrine.dbal.default_connection'] = $this->get('doctrine.dbal.connection_factory')->createConnection(array('driver' => 'pdo_mysql', 'host' => 'db', 'port' => NULL, 'dbname' => 'victoire', 'user' => 'victoire', 'password' => 'victoire', 'charset' => 'UTF8', 'driverOptions' => array(), 'defaultTableOptions' => array()), new \\Doctrine\\DBAL\\Configuration(), $f, array());\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 getDispatcherListener()\n {\n return $this->di->getShared('dispatcherListener');\n }", "public function getEventsManager()\n {\n return $this->eventsManager;\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 getVictoire_WidgetFilter_Blog_Set_Default_Values_Form_ListenerService()\n {\n return $this->services['victoire.widget_filter.blog.set.default.values.form.listener'] = new \\Victoire\\Bundle\\BlogBundle\\Listener\\ArticleFilterDefaultValuesListener($this->get('doctrine.orm.default_entity_manager'));\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 getVictoireMedia_Listener_DoctrineService()\n {\n return $this->services['victoire_media.listener.doctrine'] = new \\Victoire\\Bundle\\MediaBundle\\EventListener\\DoctrineMediaListener($this->get('victoire_media.media_manager'));\n }", "public function attach(EventManagerInterface $eventManager, $priority = 100)\n {\n $shared = $eventManager->getSharedManager();\n $this->listeners[] = '???';\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_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 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 static function getListeners() : array\n {\n return Event::$listeners;\n }", "public function attachDefaultListeners()\n {\n parent::attachDefaultListeners();\n\n $serviceLocator = $this->serviceLocator;\n $defaultServices = $serviceLocator->get('DefaultListeners');\n $events = $this->getEventManager();\n $events->attach($defaultServices);\n\n return $this;\n }", "public function getListeners()\n {\n return $this->listeners;\n }", "public function getListeners()\n {\n return $this->listeners;\n }", "protected function getSessionListenerService()\n {\n return $this->services['session_listener'] = new \\Symfony\\Bundle\\FrameworkBundle\\EventListener\\SessionListener($this);\n }", "public function getEntityManager()\n{\nif (null === $this->em) {\n$this->em = $this->getServiceLocator()\n->get('doctrine.entitymanager.orm_default');\n}\nreturn $this->em;\n}", "public function getSubscribedEvents(): array\n {\n return [\n DoctrineEvents::prePersist\n ];\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 }", "public function getListenersConfig()\n {\n return $this->listenersConfig;\n }", "protected function getEventsManager() {}", "public function getEventManager()\n {\n Deprecation::triggerIfCalledFromOutside(\n 'doctrine/dbal',\n 'https://github.com/doctrine/dbal/issues/5784',\n '%s is deprecated.',\n __METHOD__,\n );\n\n return $this->_eventManager;\n }", "function GetEventListeners() {\n $my_file = '{%IEM_ADDONS_PATH%}/dynamiccontenttags/dynamiccontenttags.php';\n $listeners = array ();\n\n $listeners [] =\n array (\n 'eventname' => 'IEM_SENDSTUDIOFUNCTIONS_GENERATEMENULINKS',\n 'trigger_details' => array (\n 'Addons_dynamiccontenttags',\n 'SetMenuItems'\n ),\n 'trigger_file' => $my_file\n );\n\n $listeners[] =\n array (\n 'eventname' => 'IEM_USERAPI_GETPERMISSIONTYPES',\n 'trigger_details' => array (\n 'Interspire_Addons',\n 'GetAddonPermissions',\n ),\n 'trigger_file' => $my_file\n );\n\n $listeners [] =\n array (\n 'eventname' => 'IEM_DCT_HTMLEDITOR_TINYMCEPLUGIN',\n 'trigger_details' => array (\n 'Addons_dynamiccontenttags',\n 'DctTinyMCEPluginHook'\n ),\n 'trigger_file' => $my_file\n );\n\n $listeners [] =\n array (\n 'eventname' => 'IEM_EDITOR_TAG_BUTTON',\n 'trigger_details' => array (\n 'Addons_dynamiccontenttags',\n 'CreateInsertTagButton'\n ),\n 'trigger_file' => $my_file\n );\n\n $listeners[] =\n array (\n 'eventname' => 'IEM_ADDON_DYNAMICCONTENTTAGS_GETALLTAGS',\n 'trigger_details' => array (\n 'Addons_dynamiccontenttags',\n 'getAllTags'\n ),\n 'trigger_file' => $my_file\n );\n\n $listeners[] =\n array (\n 'eventname' => 'IEM_ADDON_DYNAMICCONTENTTAGS_REPLACETAGCONTENT',\n 'trigger_details' => array (\n 'Addons_dynamiccontenttags',\n 'replaceTagContent'\n ),\n 'trigger_file' => $my_file\n );\n\n return $listeners;\n }", "public function listener() {\n\t\treturn $this->_runtime['listener'];\n\t}", "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 }" ]
[ "0.64334244", "0.64334244", "0.5869672", "0.57529545", "0.57149476", "0.5712496", "0.557874", "0.55479974", "0.5502006", "0.549932", "0.5481192", "0.5437904", "0.54050857", "0.5402216", "0.5402216", "0.53823227", "0.5362008", "0.53454226", "0.53084135", "0.53084135", "0.5254958", "0.52536047", "0.52525914", "0.5251699", "0.5228801", "0.52105266", "0.5209467", "0.5203635", "0.5197158", "0.51825964" ]
0.839687
1
Gets the private 'doctrine.orm.default_manager_configurator' shared service.
protected function getDoctrine_Orm_DefaultManagerConfiguratorService() { return $this->services['doctrine.orm.default_manager_configurator'] = new \Doctrine\Bundle\DoctrineBundle\ManagerConfigurator(array(), array()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static protected function getConfigurationManager()\n\t{\n\t\tif (!is_null(static::$configurationManager)) {\n\t\t\treturn static::$configurationManager;\n\t\t}\n\t\t$objectManager = GeneralUtility::makeInstance(ObjectManager::class);\n\t\t$configurationManager = $objectManager->get(ConfigurationManagerInterface::class);\n\t\tstatic::$configurationManager = $configurationManager;\n\t\treturn $configurationManager;\n\t}", "public function getServiceConfiguration()\n {\n return array(\n 'aliases' => array(\n 'Doctrine\\ORM\\EntityManager' => 'doctrine.entitymanager.orm_default',\n ),\n 'factories' => array(\n 'DoctrineORMModule\\Form\\Annotation\\AnnotationBuilder' => function($sm) {\n return new \\DoctrineORMModule\\Form\\Annotation\\AnnotationBuilder(\n $sm->get('doctrine.entitymanager.orm_default')\n );\n },\n 'doctrine.connection.orm_default' => new CommonService\\ConnectionFactory('orm_default'),\n 'doctrine.configuration.orm_default' => new ORMService\\ConfigurationFactory('orm_default'),\n 'doctrine.driver.orm_default' => new CommonService\\DriverFactory('orm_default'),\n 'doctrine.entitymanager.orm_default' => new ORMService\\EntityManagerFactory('orm_default'),\n 'doctrine.eventmanager.orm_default' => new CommonService\\EventManagerFactory('orm_default'),\n )\n );\n }", "protected static function getConfigurationManager() {}", "protected function getDoctrine_Dbal_DefaultConnectionService()\n {\n $a = new \\Doctrine\\DBAL\\Logging\\LoggerChain();\n $a->addLogger(new \\Symfony\\Bridge\\Doctrine\\Logger\\DbalLogger(${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->services['logger'] = new \\Symfony\\Component\\HttpKernel\\Log\\Logger()) && false ?: '_'}, NULL));\n $a->addLogger(new \\Doctrine\\DBAL\\Logging\\DebugStack());\n\n $b = new \\Doctrine\\DBAL\\Configuration();\n $b->setSQLLogger($a);\n\n $c = new \\Symfony\\Bridge\\Doctrine\\ContainerAwareEventManager($this);\n $c->addEventListener(array(0 => 'loadClassMetadata'), ${($_ = isset($this->services['doctrine.orm.default_listeners.attach_entity_listeners']) ? $this->services['doctrine.orm.default_listeners.attach_entity_listeners'] : $this->services['doctrine.orm.default_listeners.attach_entity_listeners'] = new \\Doctrine\\ORM\\Tools\\AttachEntityListenersListener()) && false ?: '_'});\n\n return $this->services['doctrine.dbal.default_connection'] = ${($_ = isset($this->services['doctrine.dbal.connection_factory']) ? $this->services['doctrine.dbal.connection_factory'] : $this->services['doctrine.dbal.connection_factory'] = new \\Doctrine\\Bundle\\DoctrineBundle\\ConnectionFactory(array())) && false ?: '_'}->createConnection(array('driver' => 'pdo_mysql', 'charset' => 'utf8mb4', 'url' => $this->getEnv('resolve:DATABASE_URL'), 'host' => 'localhost', 'port' => NULL, 'user' => 'root', 'password' => NULL, 'driverOptions' => array(), 'serverVersion' => '5.7', 'defaultTableOptions' => array('charset' => 'utf8mb4', 'collate' => 'utf8mb4_unicode_ci')), $b, $c, array());\n }", "public function getDefaultManagerName()\n {\n return $this->entityManager;\n }", "public function getServiceManager ()\n {\n return $this->serviceManager;\n }", "public final function getSystemDoctrineService(): DoctrineService\n {\n return $this->systemDoctrineService;\n }", "protected 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 }", "public function getServiceManager()\n {\n return $this->serviceManager;\n }", "public function getServiceManager()\r\n\t{\r\n\t\treturn $this->serviceManager;\r\n\t}", "public function getServiceManager()\n\t{\n\t\treturn $this->serviceManager;\n\t}", "public function getServiceManager()\n {\n return $this->serviceManager->getServiceLocator();\n }", "public function getConfigurator()\n {\n if ( ! $this->getContainer()->has(ConfiguratorInterface::class) ) {\n $this->getContainer()->share(ConfiguratorInterface::class, \\ArrayObject::class);\n }\n\n return $this->getContainer()->get(ConfiguratorInterface::class);\n }", "protected function getDoctrine_Orm_DefaultEntityListenerResolverService()\n {\n return $this->services['doctrine.orm.default_entity_listener_resolver'] = new \\Doctrine\\Bundle\\DoctrineBundle\\Mapping\\ContainerAwareEntityListenerResolver($this);\n }", "protected function getDoctrine_Orm_DefaultEntityListenerResolverService()\n {\n return $this->services['doctrine.orm.default_entity_listener_resolver'] = new \\Doctrine\\Bundle\\DoctrineBundle\\Mapping\\ContainerAwareEntityListenerResolver($this);\n }", "public function getManager() {\n return $this->manager;\n }", "public function getConfigurator();", "private function getManagerServiceId()\n {\n return 'doctrine.orm.entity_manager';\n }", "public function getManager()\n {\n return $this->manager;\n }", "public function getManager()\n {\n return $this->manager;\n }", "public function getManager()\n {\n return $this->manager;\n }", "public function getServiceManager()\n {\n return $this->sm;\n }", "protected function getDoctrineService()\n {\n return $this->services['doctrine'] = new \\Doctrine\\Bundle\\DoctrineBundle\\Registry($this, array('default' => 'doctrine.dbal.default_connection'), array('default' => 'doctrine.orm.default_entity_manager'), 'default', 'default');\n }", "protected function getManager()\n {\n return $this->manager;\n }" ]
[ "0.7327674", "0.6912394", "0.67747617", "0.6763204", "0.65604854", "0.6474837", "0.6451315", "0.64095104", "0.6408204", "0.6408204", "0.6408204", "0.6408204", "0.6408204", "0.6408204", "0.6408204", "0.6386998", "0.635874", "0.63547593", "0.6352963", "0.6260632", "0.6260632", "0.6243638", "0.6241229", "0.623326", "0.6232691", "0.6232691", "0.6232691", "0.6228398", "0.6215174", "0.6178612" ]
0.88063693
1
Gets the private 'locale_listener' shared service.
protected function getLocaleListenerService() { 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 ?: '_'}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 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 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 }", "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 static function getLanguageService() {}", "public function getLocaleManager();", "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_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 }", "static function getLocale() {\n\t\treturn self::getRegistry()->get(self::REGISTRY_LOCALE);\n\t}", "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 }" ]
[ "0.82841414", "0.72171485", "0.72171485", "0.72171485", "0.716531", "0.7074446", "0.7026078", "0.69089997", "0.6866057", "0.6721692", "0.6721692", "0.6721692", "0.6721692", "0.6721692", "0.6721692", "0.6721692", "0.6720305", "0.6720305", "0.67196417", "0.67196417", "0.67196417", "0.67196417", "0.67196417", "0.67196417", "0.67196417", "0.67196417", "0.67196417", "0.6481071", "0.6435785", "0.6397187" ]
0.8450227
0
Gets the private 'logger' shared service.
protected function getLoggerService() { return $this->services['logger'] = new \Symfony\Component\HttpKernel\Log\Logger(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLogger()\n {\n if (!$this->logger)\n {\n $this->logger = $this->getDi()->getShared('logger');\n }\n return $this->logger;\n }", "public function getLogger()\n {\n return $this->getService('logger');\n }", "private function getLogger()\n {\n return $this->logger;\n }", "protected function getLogger()\n {\n return $this->_logger;\n }", "protected function getLogger()\n {\n return $this->_logger;\n }", "protected function getLogger()\n {\n return $this->_logger;\n }", "function get_logger() {\n return $this->logger;\n }", "public static function getInstance()\r\n \t{\r\n \t\t$logger = ConfService::getLogDriverImpl();\r\n \t\treturn $logger;\r\n \t}", "static private function getLogger(){\n \n if (!isset(self::$loggerM)){\n self::$loggerM = LoggerMgr::Instance()->getLogger(__CLASS__);\n }\n return self::$loggerM;\n }", "public function getLogger(){ return $this->_logger; }", "protected function getLogService() {\n return $this->_logService ?\n $this->_logService :\n $this->_logService = $this->getServiceLocator()->get('LogService');\n }", "private function getLogger()\r\n {\r\n if ($this->logger === null) {\r\n $this->logger = $this->create();\r\n }\r\n\r\n return $this->logger;\r\n }", "public function getLogger()\n {\n return $this->_logger;\n }", "public function getLogger()\n {\n return $this->_logger;\n }", "public function getLogger()\n {\n return $this->_logger;\n }", "public function getLogger() {\n return $this->logger ?: \\Drupal::service('logger.factory')->get('search_api');\n }", "public function getLogger()\n {\n return $this->logger;\n }", "public function getLogger()\n {\n return $this->logger;\n }", "public static function get() {\n return self::$logger;\n }", "protected function getLogService()\n {\n return $this->services['log'] = new \\phpbb\\log\\log(${($_ = isset($this->services['dbal.conn']) ? $this->services['dbal.conn'] : ($this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this))) && 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 ?: '_'}, ${($_ = isset($this->services['dispatcher']) ? $this->services['dispatcher'] : $this->getDispatcherService()) && false ?: '_'}, './../', 'adm/', 'php', 'phpbb_log');\n }", "protected function getLoggerService()\n {\n $this->services['logger'] = $instance = new \\Symfony\\Bridge\\Monolog\\Logger('app');\n\n $instance->useMicrosecondTimestamps(true);\n $instance->pushHandler($this->get('monolog.handler.console'));\n $instance->pushHandler($this->get('monolog.handler.main'));\n\n return $instance;\n }", "public function getLoggerInstance()\n {\n return $this->logInstance;\n\n }", "public static function getInstance()\r\n {\r\n if (!sfLogger::$logger)\r\n {\r\n // the class exists\r\n $class = __CLASS__;\r\n sfLogger::$logger = new $class();\r\n sfLogger::$logger->initialize();\r\n }\r\n\r\n return sfLogger::$logger;\r\n }", "protected function log_manager() {\n\t\treturn tribe( 'logger' );\n\t}", "protected function getServiceName()\n {\n return 'logger';\n }", "public static function getInstance()\n {\n // the class exists\n $class = __CLASS__;\n sfFlexibleLogger::$logger = new $class();\n sfFlexibleLogger::$logger->initialize();\n\n return sfFlexibleLogger::$logger;\n }", "protected function getLogger()\n {\n if (null === $this->logger) {\n $this->logger = new NullLogger();\n }\n\n return $this->logger;\n }", "public function getLogger() : Logger\n {\n return $this->logger;\n \n }", "public function getLogger(): Logger\n {\n return API::ffi()->ts_parser_logger($this->data);\n }", "public function logger()\n {\n return $this->logger;\n }" ]
[ "0.78902847", "0.77114844", "0.7637587", "0.7612341", "0.7612341", "0.7612341", "0.7590496", "0.7582935", "0.7576", "0.75731695", "0.7532807", "0.7498358", "0.748957", "0.748957", "0.748957", "0.7403776", "0.73789334", "0.73789334", "0.7314383", "0.73050183", "0.72859967", "0.7245853", "0.7225924", "0.7201929", "0.7190389", "0.7185278", "0.7160401", "0.7157306", "0.7110293", "0.70777947" ]
0.77782667
1
Gets the private 'resolve_controller_name_subscriber' shared service.
protected function getResolveControllerNameSubscriberService() { return $this->services['resolve_controller_name_subscriber'] = new \Symfony\Bundle\FrameworkBundle\EventListener\ResolveControllerNameSubscriber(${($_ = isset($this->services['controller_name_converter']) ? $this->services['controller_name_converter'] : $this->services['controller_name_converter'] = new \Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser(${($_ = isset($this->services['kernel']) ? $this->services['kernel'] : $this->get('kernel', 1)) && false ?: '_'})) && false ?: '_'}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getControllerNameConverterService()\n {\n return $this->services['controller_name_converter'] = new \\Symfony\\Bundle\\FrameworkBundle\\Controller\\ControllerNameParser(${($_ = isset($this->services['kernel']) ? $this->services['kernel'] : $this->get('kernel', 1)) && false ?: '_'});\n }", "protected function getControllerNameConverterService()\n {\n return $this->services['controller_name_converter'] = new \\Symfony\\Bundle\\FrameworkBundle\\Controller\\ControllerNameParser($this->get('kernel'));\n }", "public function getControllerName() {}", "protected function getController_ResolverService()\n {\n return $this->services['controller.resolver'] = new \\phpbb\\controller\\resolver($this, './../', ${($_ = isset($this->services['template']) ? $this->services['template'] : $this->getTemplateService()) && false ?: '_'});\n }", "public function getControllerObjectName() {}", "public function getControllerObjectName() {}", "public function getBaseControllerName(): string;", "function getControllerObjectName() ;", "public function getControllerName() {\n\n\t\treturn $this->_controller;\n\t}", "public function getControllerName() {\n\t\treturn $this->controller;\n\t}", "public function getControllerName()\n {\n return $this->_controller;\n }", "public function getControllername()\r\n {\r\n return $this->controllername;\r\n }", "public function getControllerName()\n {\n if (is_null($this->_controllerName)) {\n $this->getController();\n }\n return $this->_controllerName;\n }", "public function getControllerName()\n {\n return $this->controller;\n }", "public function getControllerName() {\n return $this->controllerName;\n }", "public function getControllerExtensionName() {}", "public function getControllerExtensionName() {}", "public function getControllerName()\n {\n return Inflector::id2camel($this->getControllerId(),'-');\n }", "protected function getModuleFromControllerName() \r\n {\r\n $controller_name = get_class($this);\r\n return strtolower(preg_replace('/_(.*?)$/i', '', $controller_name));\r\n }", "public function getController(): string\n {\n return $this->controller;\n }", "public function getController(): string\n {\n return $this->controller;\n }", "public function getController()\n {\n return $this->str_controller;\n }", "public static function getControllerName()\r\n\t{\r\n\t\treturn TRequest::getCmd('controller');\r\n\t}", "public function getControllerName()\n {\n return preg_replace(\"/(.*)[\\\\\\\\](.*)(Controller)/\", '$2', get_class($this));\n }", "public function controllerAlias()\n {\n return $this->controllerAlias;\n }", "private function getControllerName() {\n if(isset($_GET['c']) && !empty($_GET['c'])) {\n return $_GET['c'];\n }\n return Config::getDefaultController();\n }", "public function getId()\n {\n return strtolower(strstr($this->getShortName(), 'Controller', true));\n }", "public function getControllerName(){\n\t\t$className = get_class($this);\n\t\tif(isset(self::$_controllerName[$className])){\n\t\t\treturn self::$_controllerName[$className];\n\t\t} else {\n\t\t\treturn $className;\n\t\t}\n\t}", "public function getUniqueControllerPrefix()\n {\n return self::PREFIX;\n }", "public function getController()\n {\n return $this->sController;\n }" ]
[ "0.73876977", "0.7332215", "0.68224996", "0.66770595", "0.6594536", "0.6594536", "0.64360017", "0.63503516", "0.62597805", "0.61912596", "0.61863446", "0.6181331", "0.61558515", "0.61314017", "0.6104685", "0.61045015", "0.61045015", "0.6005062", "0.597336", "0.5938183", "0.5938183", "0.58632284", "0.585026", "0.5838156", "0.57969064", "0.57779604", "0.57669765", "0.57473624", "0.5747141", "0.57267845" ]
0.8670332
0
Gets the private 'response_listener' shared service.
protected function getResponseListenerService() { return $this->services['response_listener'] = new \Symfony\Component\HttpKernel\EventListener\ResponseListener('UTF-8'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 getSymfonyResponseListenerService()\n {\n return $this->services['symfony_response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener('UTF-8');\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 getListener(/* ... */)\n {\n return $this->_listener;\n }", "protected function getDispatcherListener()\n {\n return $this->di->getShared('dispatcherListener');\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 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 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 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\\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 }", "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 getSessionListenerService()\n {\n return $this->services['session_listener'] = new \\Symfony\\Bundle\\FrameworkBundle\\EventListener\\SessionListener($this);\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 &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 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 }", "protected function response(): ResponseInterface\n {\n return Context::get(ResponseInterface::class);\n }", "private static function getService()\n {\n return self::$app->get(static::SERVICE_NAME);\n }", "public function &getResponse() : ResponseInterface\n {\n return $this->response;\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 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 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 }" ]
[ "0.6912883", "0.6912883", "0.67666113", "0.65895987", "0.65895987", "0.6515243", "0.6493368", "0.64684206", "0.63182724", "0.614903", "0.6133055", "0.6073726", "0.6070657", "0.6015426", "0.5980343", "0.5924861", "0.5920159", "0.5861435", "0.5733203", "0.57256013", "0.57254016", "0.56571555", "0.56104136", "0.5566819", "0.5547108", "0.55413365", "0.5521586", "0.5521586", "0.5517802", "0.5513914" ]
0.72640127
1
Gets the private 'router.request_context' shared service.
protected function getRouter_RequestContextService() { return $this->services['router.request_context'] = new \Symfony\Component\Routing\RequestContext('', 'GET', 'localhost', 'http', 80, 443); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getContext()\n {\n if ($this->context === null) {\n $this->context = $this->container->get('security.context');\n }\n return $this->context;\n }", "private function getContext()\n {\n $context = $this->request->getData('context');\n\n return Context::isValidOrFail($context) ? $context : null;\n }", "public function getContext()\n {\n return self::$context;\n }", "public function getRequest() {\r\n\t\treturn $this->context->getState('request');\r\n\t}", "protected function getContext()\n {\n return $this->_context;\n }", "protected function getContext()\n {\n return $this->_context;\n }", "private function getRequest()\n {\n if ($this->request === null) {\n $this->request = $this->container->get('request_stack')->getCurrentRequest();\n }\n return $this->request;\n }", "protected function getContext() {}", "public function getCurrentRequest()\n {\n return $this->container['request'];\n }", "protected function getContext() {\n\t\treturn $this->context;\n\t}", "public static function context() {\n\t\treturn self::get_context();\n\t}", "protected function getContext()\n\t{\n\t\treturn $this->context;\n\t}", "protected function getRequestStackService()\n {\n return $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack();\n }", "protected function getRequestStackService()\n {\n return $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack();\n }", "protected function getRequestStackService()\n {\n return $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack();\n }", "public function getRequest()\r\n {\r\n return Mage::registry('current_request');\r\n }", "public function getRequest()\n {\n return static::app()->request;\n }", "public function getContext()\n {\n return $this->context;\n }", "public function getContext()\n {\n return $this->context;\n }", "public function getContext()\n {\n return $this->context;\n }", "public function getContext()\n {\n return $this->context;\n }", "public function getContext()\n {\n return $this->context;\n }", "public function getContext()\n {\n return $this->context;\n }", "public function getContext()\n {\n return $this->context;\n }", "public function getContext()\n {\n return $this->context;\n }", "public function getContext()\n {\n return $this->context;\n }", "public function getContext()\n {\n return $this->context;\n }", "public function getContext()\n {\n return $this->context;\n }", "public function getRequest(): Request|\\Symfony\\Component\\HttpFoundation\\Request\n {\n return $this->request ?: Request::createFromGlobals();\n }", "public function request()\n {\n return $this->context->getRequest();\n }" ]
[ "0.69826", "0.6805456", "0.66820264", "0.6676382", "0.66699517", "0.66699517", "0.6661133", "0.6650406", "0.6615614", "0.6587547", "0.65424395", "0.6526213", "0.6516481", "0.6516481", "0.6516481", "0.64759976", "0.6470407", "0.6438179", "0.6438179", "0.6438179", "0.6438179", "0.6438179", "0.6438179", "0.6438179", "0.6438179", "0.6438179", "0.6438179", "0.6438179", "0.6435923", "0.64333487" ]
0.7954178
1
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 }" ]
[ "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.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 }" ]
[ "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.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 }" ]
[ "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.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 }" ]
[ "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.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 }" ]
[ "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.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 }" ]
[ "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.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() {}" ]
[ "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.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 }" ]
[ "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.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 }" ]
[ "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.8275839
1
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 }" ]
[ "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.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}" ]
[ "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.84565985
0
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}" ]
[ "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.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);" ]
[ "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.67472875
0
====================================================================// 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\">&quot;&quot;</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}" ]
[ "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.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 }" ]
[ "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.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);" ]
[ "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.6981497
0
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 }" ]
[ "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.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 }" ]
[ "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.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 }" ]
[ "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.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 }" ]
[ "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.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 }" ]
[ "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.8065019
0
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 }" ]
[ "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.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 }" ]
[ "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.67242706
1
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 }" ]
[ "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.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}" ]
[ "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.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}" ]
[ "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.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}" ]
[ "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.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 }" ]
[ "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.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 }" ]
[ "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.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 }" ]
[ "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.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}" ]
[ "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.6816586
0
Make header search in OceanWP theme compatible with JetMenu
function jet_menu_oceanwp_fix_header_search( $items, $args ) { if ( ! isset( $args->menu_class ) || 'jet-menu' !== $args->menu_class ) { return $items; } $items = str_replace( array( 'search-toggle-li', 'site-search-toggle', ), array( 'search-toggle-li jet-menu-item jet-simple-menu-item jet-regular-item jet-responsive-menu-item', 'site-search-toggle top-level-link', ), $items ); return $items; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function techmarket_navbar_search() {\n\t\ttechmarket_get_template( 'sections/navbar-search.php' );\n\t}", "function cosmetro_top_search( $format = '%s' ) {\n\t$is_enabled = get_theme_mod( 'top_panel_search', cosmetro_theme()->customizer->get_default( 'top_panel_search' ) );\n\n\tif ( ! $is_enabled ) {\n\t\treturn;\n\t}\n\n\tprintf( $format, do_action('cosmetro_menu_shop_header') );\n}", "function pro_header_search_display()\n{\n\t$pro = get_option('up_themes_betty_commerce_wordpress_theme');\n\t\n\tif( !empty( $pro['header_search'] ) )\n\t{\n\t\treturn $pro['header_search'];\n\t}\n\treturn false;\n}", "function v2_mumm_menu_link__menu_header(&$variables) {\n\n $element = $variables ['element'];\n $sub_menu = '';\n\n if ($element ['#below']) {\n $sub_menu = drupal_render($element ['#below']);\n }\n\n if (in_array('search-btn', $element['#localized_options']['attributes']['class'])) {\n\n $output = '<button id=\"search-btn\" class=\"icon icon-search-gray search-btn\" data-trigger-toggle=\"search-box\" title=\"\" name=\"search-btn\" type=\"button\"\n data-tracking data-track-action=\"click\" data-track-category=\"header\" data-track-label=\"search\" data-track-type=\"event\">\n </button>';\n }\n else {\n $class = $element['#localized_options']['attributes']['class'];\n $element['#localized_options']['attributes'] = array(\n 'class' =>$class,\n 'data-tracking' => '',\n 'data-track-action' => 'click',\n 'data-track-category' => 'header',\n 'data-track-label' => 'book_a_visit',\n 'data-track-type' => 'event',\n );\n\n $output = l($element ['#title'], $element ['#href'] , $element['#localized_options']);\n }\n return $output;\n}", "function wpgood_nav_search($items, $args) {\n // If this isn't the primary menu, do nothing\n if( !($args->theme_location == 'primary') ) \n return $items;\n // Otherwise, add search form\n return $items . '<li>' . get_search_form(false) . '</li>';\n}", "function wpex_add_search_to_menu ( $items, $args ) {\n\n\t// Only used on main menu\n\tif ( 'main_menu' != $args->theme_location ) {\n\t\treturn $items;\n\t}\n\n\t// Get search style\n\t$search_style = wpex_global_obj( 'menu_search_style' );\n\n\t// Return if disabled\n\tif ( ! $search_style || 'disabled' == $search_style ) {\n\t\treturn $items;\n\t}\n\n\t// Get header style\n\t$header_style = wpex_global_obj( 'header_style' );\n\t\n\t// Get correct search icon class\n\tif ( 'overlay' == $search_style) {\n\t\t$class = ' search-overlay-toggle';\n\t} elseif ( 'drop_down' == $search_style ) {\n\t\t$class = ' search-dropdown-toggle';\n\t} elseif ( 'header_replace' == $search_style ) {\n\t\t$class = ' search-header-replace-toggle';\n\t} else {\n\t\t$class = '';\n\t}\n\n\t// Add search item to menu\n\t$items .= '<li class=\"search-toggle-li wpex-menu-extra\">';\n\t\t$items .= '<a href=\"#\" class=\"site-search-toggle'. $class .'\">';\n\t\t\t$items .= '<span class=\"link-inner\">';\n\t\t\t\t$items .= '<span class=\"fa fa-search\"></span>';\n\t\t\t\tif ( 'six' == $header_style ) {\n\t\t\t\t\t$items .= '<span class=\"wpex-menu-search-text\">'. _x( 'Search', 'Navbar Search Text For Vertical Nav', 'wpex' ) .'</span>';\n\t\t\t\t}\n\t\t\t$items .= '</span>';\n\t\t$items .= '</a>';\n\t$items .= '</li>';\n\t\n\t// Return nav $items\n\treturn $items;\n\n}", "function genesisawesome_do_before_header() {\n\n\techo '<div id=\"ga-topbar\">';\n\t\techo '<div class=\"wrap\">';\n\n\t\t\techo '<ul id=\"social-profiles\">';\n\t\t\t$soc_urls = array(\n\t\t\t\t'rssfeed_url' => __( 'Rss Feeds', 'genesisawesome' ),\n\t\t\t\t'twitter_url' => __( 'Twitter', 'genesisawesome' ),\n\t\t\t\t'facebook_url' => __( 'Facebook', 'genesisawesome' ),\n\t\t\t\t'dribbble_url' => __( 'Dribbble', 'genesisawesome' ),\n\t\t\t);\n\t\t\tforeach ( $soc_urls as $soc_opt => $soc_name ) {\n\n\t\t\t\tif ( ! $soc_url = genesis_get_option( $soc_opt, GA_CHILDTHEME_FIELD ) )\n\t\t\t\t\tcontinue;\n\t\t\t\t?>\n\t\t\t\t<li class='<?php echo sanitize_title( $soc_name );?>'>\n\t\t\t\t\t<a href='<?php echo esc_url( $soc_url ) ?>' target='_blank' title='<?php echo esc_attr( $soc_name );?>'><?php echo esc_attr( $soc_name );?></a>\n\t\t\t\t</li>\n\t\t\t\t<?php\n\n\t\t\t}\n\t\t\techo '</ul>';\n\t\t\t\n\t\t\tget_search_form();\n\n\t\techo '</div>';\n\techo '</div>';\n\n}", "function farmhouse_primary_nav_extras( $menu, $args ) {\n if ( 'primary' !== $args->theme_location ) {\n return $menu;\n }\n\n ob_start();\n get_search_form();\n $search = ob_get_clean();\n $menu .= '<li class=\"right search\">' . $search . '</li>';\n\n return $menu;\n}", "function do_header_search(){\n\techo\"\n\t\t<html>\n\t\t<title> Race Search </title>\n\t\t<h1> Search: </h1>\n\t\";\n}", "function _mai_add_widget_header_menu_args() {\n\tadd_filter( 'wp_nav_menu_args', 'genesis_header_menu_args' );\n\tadd_filter( 'wp_nav_menu', 'genesis_header_menu_wrap' );\n}", "function px_add_search_menu_item($items, $args)\n{\n\treturn $items;\n\t\n if( 'primary-nav' != $args->theme_location )\n return $items;\n\n ob_start();\n ?>\n <li id=\"menu-item-search\" class=\"menu-item menu-item-search\">\n <a href=\"#\"><span class=\"icon-search\"></span></a>\n <div class=\"search-template\">\n <?php get_search_form(); ?>\n </div>\n </li>\n <?php\n $items .= ob_get_clean();\n return $items;\n}", "function erp_add_menu_header( $component, $title, $icon = \"\" ) {\n add_filter('erp_menu_headers', function($menu) use( $component, $title, $icon ) {\n $menu[ $component ] = [ 'title' => $title, 'icon' => $icon ];\n return $menu;\n });\n}", "function mr_theme_header() {\n\t$facebook_url = '#';\n\t$instagram_url = '#';\n\tif ( get_option( 'mr-social-links' )['facebook'] ) {\n\t\t$facebook_url = get_option( 'mr-social-links' )['facebook'];\n\t}\n\tif ( get_option( 'mr-social-links' )['instagram'] ) {\n\t\t$instagram_url = get_option( 'mr-social-links' )['instagram'];\n\t}\n\n\t?>\n\t\t<nav class=\"mr-nav-top\">\n\t\t\t<div class=\"mr-social\">\n\t\t\t\t<a target=\"_blank\" href=\"<?php echo esc_attr( $facebook_url ); ?>\"><i class=\"fab fa-facebook\"></i></a>\n\t\t\t\t<a target=\"_balnk\" href=\"<?php echo esc_attr( $instagram_url ); ?>\"><i class=\"fab fa-instagram\"></i></a>\n\t\t\t</div>\n\t\t\t<div class=\"mr-logo\" >\n\t\t\t\t<?php the_custom_logo(); ?>\n\t\t\t\t<p><?php echo esc_attr__( get_bloginfo( 'name' ) ); ?></p>\n\t\t\t</div>\n\t\t\t\t<button class=\"navbar-toggler\" type=\"button\" id=\"menuMobileBtnShow\">\n\t\t\t\t\t<i class=\"fal fa-bars\"></i>\n\t\t\t\t</button>\t\n\n\t\t\t<div class=\"mr-search\">\n\t\t\t<?php mr_search_form(); ?>\n\t\t\t\t<i id=\"searchToggleForm\" class=\"fal fa-search\"></i>\n\t\t\t</div>\n\t\t</nav>\n\t<?php\n}", "function register_header_menu() {\r\n register_nav_menu('header-menu',__( 'Header Menu' ));\r\n}", "function erp_get_menu_headers() {\n $menu = [];\n return apply_filters( 'erp_menu_headers', $menu );\n}", "function poco_handheld_footer_bar_search() {\n echo '<a href=\"\"><span class=\"title\">' . esc_attr__('Search', 'poco') . '</span></a>';\n poco_product_search();\n }", "function custom_nav_item( $menu, stdClass $args ){\n if ( 'primary' != $args->theme_location )\n\n return $menu; \n\t\t// $menu .= '</ul><ul class=\"search-form-container\"><div class=\"search-toggle\"><i class=\"dashicons dashicons-search\"></i>\n\t\t$menu .= '</ul><ul class=\"search-form-container\"><div class=\"search-toggle\"><i class=\"fa fa-search\"></i>\n\t\t\t\t<a href=\"#search-container\" class=\"screen-reader-text\"></a>\n\t\t\t\t</div>'; \n return $menu; \n}", "function refined_magazine_main_header_right_menu()\r\n {\r\n $has_header_image = has_header_image();\r\n global $refined_magazine_theme_options;\r\n $search_class = '';\r\n if ($refined_magazine_theme_options['refined-magazine-enable-menu-section-search'] == 1):\r\n $show_search = 1;\r\n $search_class = 'ct-show-search';\r\n else:\r\n $show_search = 0;\r\n endif;\r\n $sticky_header_option = $refined_magazine_theme_options['refined-magazine-enable-sticky-primary-menu'];\r\n if($sticky_header_option == 1){\r\n $sticky_header_class = 'sticky-header';\r\n\r\n }else{\r\n $sticky_header_class = '';\r\n }\r\n\r\n $menu_alignment = $refined_magazine_theme_options['refined-magazine-change-primary-menu-position'];\r\n if ($menu_alignment == 'default-menu-position') {\r\n $menu_alignment_class = \"ct-center-aligned\";\r\n }else{\r\n $menu_alignment_class = 'ct-left-aligned';\r\n }\r\n if(!empty($search_class)){\r\n $menu_class = $menu_alignment_class.' '.$search_class;\r\n }else{\r\n $menu_class = $menu_alignment_class;\r\n }\r\n ?>\r\n <div class=\"refined-magazine-header-left-logo-wrapper logo-wrapper-block <?php echo $sticky_header_class; ?>\">\r\n <div class=\"site-branding\" <?php if (!empty($has_header_image)) { ?> style=\"background-image: url(<?php echo header_image(); ?>);\" <?php } ?>>\r\n <div class=\"container-inner\">\r\n <div class=\"refined-magazine-header-block refined-magazine-header-left-logo\" id=\"site-navigation\">\r\n <div class=\"refined-magazine-logo-main-container\">\r\n <div class=\"refined-magazine-logo-container text-center\">\r\n <?php\r\n if (function_exists('the_custom_logo')) {\r\n\r\n the_custom_logo();\r\n\r\n }\r\n if (is_front_page() && is_home()) : ?>\r\n <h1 class=\"site-title\"><a href=\"<?php echo esc_url(home_url('/')); ?>\"\r\n rel=\"home\"><?php bloginfo('name'); ?></a></h1>\r\n <?php else : ?>\r\n <p class=\"site-title\"><a href=\"<?php echo esc_url(home_url('/')); ?>\"\r\n rel=\"home\"><?php bloginfo('name'); ?></a></p>\r\n <?php\r\n endif;\r\n\r\n $description = get_bloginfo('description', 'display');\r\n if ($description || is_customize_preview()) : ?>\r\n <p class=\"site-description\"><?php echo $description; /* WPCS: xss ok. */ ?></p>\r\n <?php\r\n endif; ?>\r\n </div> <!-- refined-magazine-logo-container -->\r\n\r\n\r\n <div class=\"navbar-header clear\">\r\n <button class=\"menu-toggle\" aria-controls=\"primary-menu\"\r\n aria-expanded=\"false\"><i class=\"fa fa-bars\" aria-hidden=\"true\"></i></button>\r\n </div>\r\n </div> <!-- .refined-magazine-logo-main-container -->\r\n <div class=\"refined-magazine-menu-container clear <?php echo $menu_class; ?>\">\r\n <nav id=\"\" class=\"main-navigation\">\r\n <ul id=\"primary-menu\" class=\"nav navbar-nav nav-menu\">\r\n <?php\r\n if ($refined_magazine_theme_options['refined-magazine-enable-menu-home-icon'] == 1):\r\n if (is_front_page()) {\r\n $home_class = 'current-menu-item';\r\n } else {\r\n $home_class = '';\r\n }\r\n\r\n ?>\r\n <li class=\"<?php echo $home_class; ?>\"><a href=\"<?php echo esc_url(home_url('/')); ?>\">\r\n <i class=\"fa fa-home\"></i> </a></li>\r\n <?php\r\n endif;\r\n ?>\r\n <?php\r\n wp_nav_menu(array(\r\n 'theme_location' => 'menu-1',\r\n 'items_wrap' => '%3$s',\r\n 'container' => false\r\n ));\r\n ?>\r\n </ul>\r\n </nav><!-- #site-navigation -->\r\n <?php\r\n if ($show_search == 1):\r\n ?>\r\n <div class=\"ct-menu-search\"><a class=\"search-icon-box\" href=\"#\"> <i class=\"fa fa-search\"></i>\r\n </a></div>\r\n <div class=\"top-bar-search\">\r\n <?php get_search_form(); ?>\r\n <button type=\"button\" class=\"close\">\r\n </button>\r\n </div>\r\n <?php\r\n endif;\r\n ?>\r\n </div> <!-- refined-magazine-menu-container -->\r\n </div> <!-- .header-block -->\r\n </div>\r\n </div> <!-- .site-branding -->\r\n <?php\r\n //Check if header advertisement is enabled from customizer\r\n if ($refined_magazine_theme_options['refined-magazine-enable-ads-header'] == 1):\r\n ?>\r\n <div class=\"header-adv-section text-center\">\r\n <div class=\"container-inner clear\">\r\n <?php\r\n\r\n /**\r\n * refined_magazine_header_ads hook.\r\n *\r\n * @since 1.0.0\r\n *\r\n */\r\n do_action('refined_magazine_header_ads');\r\n ?>\r\n </div>\r\n </div>\r\n <?php\r\n\r\n\r\n endif;\r\n ?>\r\n </div>\r\n <?php\r\n\r\n }", "function voyage_mikado_get_search() {\n\n\t\tif(voyage_mikado_active_widget(false, false, 'mkd_search_opener')) {\n\n\t\t\t$search_type = voyage_mikado_options()->getOptionValue('search_type');\n\n\t\t\tvoyage_mikado_load_search_template();\n\n\t\t}\n\t}", "function add_search_form($items, $args) {\nif( $args->theme_location == 'menu-principal' )\n\t $items .= '<li class=\"search\">\n\t\t\t\t\t<a class=\"search_icon\">\n\t\t\t\t\t\t<span class=\"spicewpsearch_icon\"></span>\n\t\t\t\t\t</a>\n\t\t\t\t\t<div style=\"display:none;\" class=\"spicewpsearchform\">'. get_search_form(false) .'</div>\n\t\t\t\t</li>';\n return $items;\n}", "function customPageHeader() {\n echo osc_apply_filter('custom_plugin_title', __('Plugins'));\n }", "function fluid_edge_load_search_template() {\n fluid_edge_get_module_template_part('templates/types/fullscreen', 'search');\n }", "function theme_hbmode_process_header($app, &$vars) {\n $entries = $app->module('collections')->find(\"main_menu\");\n foreach ($entries as $entry) {\n $vars['links'][$entry['_id']] = [\n 'title' => $entry['title'],\n 'slug' => $entry['link'],\n ];\n }\n}", "private function search_bar()\n\t{\n\n\t\t# code...\n\t}", "function bj_homeheader_setup(){\n\t\tif(function_exists('the_custom_header')){\n\t\t\tthe_custom_header();\n\t\t}\n\tadd_theme_support('custom-header',array(\n\t\t'flex-height' => true,\n\t\t'flex-width'=> true,\n\t));\n}", "function agriflex4_search_results_header() {\n\n\t$title = sprintf(\n\t\t'<div class=\"entry-header\"><h1 class=\"entry-title\">Search Results for: %s</h1></div>',\n\t\tget_search_query()\n\t);\n\n\techo wp_kses_post( $title );\n\n}", "function in_admin_header()\n {\n }", "function voyage_mikado_load_search_template() {\n\t\tglobal $voyage_mikado_IconCollections;\n\n\t\t$search_type = voyage_mikado_options()->getOptionValue('search_type');\n\n\t\t$search_icon = '';\n\t\tif(voyage_mikado_options()->getOptionValue('search_icon_pack') !== '') {\n\t\t\t$search_icon = $voyage_mikado_IconCollections->getSearchIcon(voyage_mikado_options()->getOptionValue('search_icon_pack'), true);\n\t\t}\n\n\t\t$parameters = array(\n\t\t\t'search_in_grid' => voyage_mikado_options()->getOptionValue('search_in_grid') == 'yes' ? true : false,\n\t\t\t'search_icon' => $search_icon,\n\t\t);\n\n\t\tvoyage_mikado_get_module_template_part('templates/types/'.$search_type, 'search', '', $parameters);\n\n\t}", "function setwood_handheld_footer_bar_search() {\n\techo '<a href=\"#\">' . esc_attr__( 'Search', 'setwood' ) . '</a>';\n\tsetwood_product_search();\n}", "function get_custom_header()\n {\n }" ]
[ "0.7333754", "0.7208384", "0.70770043", "0.68466973", "0.67504126", "0.6710541", "0.6684724", "0.66337186", "0.653288", "0.6329191", "0.6309149", "0.6306499", "0.6290177", "0.62791806", "0.6261569", "0.62576604", "0.6240682", "0.6239846", "0.62398326", "0.6220703", "0.6214041", "0.61734056", "0.6171491", "0.6146453", "0.6122779", "0.61151814", "0.6098094", "0.6079715", "0.6057016", "0.59550923" ]
0.7612716
0
Fix nav menu arguments
function jet_menu_oceanwp_fix_menu_args( $args ) { if ( ! isset( $args['menu_class'] ) || 'jet-menu' !== $args['menu_class'] ) { return $args; } $args['link_before'] = ''; $args['link_after'] = ''; return $args; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function modify_nav_arguments($arguments){\n\n $arguments['walker'] \t\t\t\t= new accesspress_mag_walker();\n //$arguments['container_class'] \t\t= $arguments['container_class'] .= 'mega-menu-wrapper';\n $arguments['menu_class']\t\t\t= 'menu accesspress_mag_mega_menu';\n\n return $arguments;\n }", "function sic_page_menu_args( $args ) {\n\t$args['menu_class'] = 'nav';\n\t$args['container'] = FALSE;\n\n\n\treturn $args;\n}", "function my_wp_nav_menu_args($args = '')\n{\n $args['container'] = false;\n $args['menu_class'] = 'nav-list';\n return $args;\n}", "function aw2_navwalker_modify_nav_menu_args( $args )\n{\n\n\tif(!isset($args['container']))\n\t{\n\t\t$args['container'] ='div';\n\t}\n\tif(!isset($args['container_class']) || empty($args['container_class']))\n\t{\n\t\t$args['container_class'] = 'collapse navbar-collapse';\n\t}\n\n\tif(!isset($args['walker']) || empty($args['walker']))\n\t{\n\t\t\n\t\tif ( !class_exists( 'wp_bootstrap_navwalker' ) ) {\n\t\t\trequire('wp_bootstrap_navwalker.php');\n\t\t}\n\t\t\n\t\t$args['walker'] = new wp_bootstrap_navwalker();\n\t\t$args['fallback_cb']='wp_bootstrap_navwalker::fallback';\n\t\t@$args['menu_class'] =$args['menu_class'].' nav navbar-nav';\n\t}\n\t\n\tif(isset($args['walker']) && $args['walker']=='default')\n\t{\n\t\t$args['walker'] = new Walker_Nav_Menu;\n\t\t$args['fallback_cb']='';\n\t\t$args['menu_class'] =$args['menu_class'].' nav navbar-nav';\n\t\t$args['container_class'] =$args['container_class'].' navbar-collapse ';\n\t}\n\n\treturn $args;\n}", "function revo_nav_menu_args($args = '') {\n\t$revo_nav_menu_args['container'] = false;\n\t$revo_theme_locates = array();\n\t$revo_menu = sw_options( 'menu_location' );\n\tif( !is_array( $revo_menu ) ){\n\t\t$revo_theme_locates[] = $revo_menu;\n\t}else{\n\t\t$revo_theme_locates = $revo_menu;\n\t}\n\tif (!$args['items_wrap']) {\n\t\t$revo_nav_menu_args['items_wrap'] = '<ul class=\"%2$s\">%3$s</ul>';\n\t}\n\tif (!$args['walker']) {\n\t\tif ( 'mega' == sw_options( 'menu_type' ) && $revo_theme_locates[0] != NULL && in_array( $args['theme_location'], $revo_theme_locates ) ){\n\t\t\t$args['menu_class'] .= ' revo-mega';\n\t\t\t$revo_nav_menu_args['walker'] = new Revo_Mega_Menu_Walker();\n\t\t\t\n\t\t\tif( !revo_mobile_check() ) :\n\t\t\t\twp_enqueue_script('revo_megamenu', get_template_directory_uri() . '/js/megamenu.js', array(), null, true);\n\t\t\tendif;\n\t\t\t\n\t\t} else {\n\t\t\t$revo_nav_menu_args['walker'] = new Revo_Menu_Walker();\n\t\t}\n\t}\n\n\treturn array_merge($args, $revo_nav_menu_args);\n}", "public function filter_wp_nav_menu_args($args)\n {\n }", "function nav_menu_args($args = '') {\n\t$nav_menu_args = array();\n\n\t$nav_menu_args['container'] = false;\n\n\tif (!$args['items_wrap']) {\n\t\t$nav_menu_args['items_wrap'] = '<ul class=\"%2$s\">%3$s</ul>';\n\t}\n\n\tif (!$args['depth']) {\n\t\t$nav_menu_args['depth'] = 2;\n\t}\n\n\treturn array_merge($args, $nav_menu_args);\n}", "public function hash_nav_menu_args($args)\n {\n }", "function ks_wp_nav_menu_args( $args = '' ) {\n\t$args['container'] = false;\n\n\treturn $args;\n}", "function my_wp_nav_menu_args($args = '')\n{\n $args['container'] = false;\n return $args;\n}", "function my_wp_nav_menu_args( $args = '' ) {\n\t$args['container'] = false;\n\treturn $args;\n}", "function my_wp_nav_menu_args($args = '')\n{\n $args['container'] = false;\n return $args;\n}", "function my_wp_nav_menu_args($args = '')\n{\n $args['container'] = false;\n return $args;\n}", "function my_wp_nav_menu_args($args = '')\n{\n $args['container'] = false;\n return $args;\n}", "function my_wp_nav_menu_args($args = '')\n{\n $args['container'] = false;\n return $args;\n}", "function new_spa_menu_items($items, $args) {\n\n if( get_option('is_single_page') && $args->theme_location == 'header-menu' ){\n\n $myItems = wp_get_nav_menu_items($args->menu);\n foreach ($myItems as $item) {\n if ($item->post_parent){\n $auxUrl = str_replace(get_site_url().'/','#post-', $item->url);\n $auxUrl = str_replace('#post-home/','#post-', $auxUrl);\n $auxUrl = str_replace('#post-inicio/','#post-', $auxUrl);\n $auxUrl = str_replace('/','', $auxUrl);\n $auxUrl = str_replace('#post-',get_site_url().'#post-', $auxUrl);\n\n $items = str_replace($item->url, $auxUrl, $items);\n }\n }\n\n return $items;\n }\n else{\n return $items;\n }\n}", "function init_menu() {\n if (func_num_args()>0) {\n $arg_list = func_get_args();\n }\n\n // menu entries\n module::set_menu($this->module, \"Notifiable Diseases\", \"LIBRARIES\", \"_notifiable\");\n\n // add more detail\n module::set_detail($this->description, $this->version, $this->author, $this->module);\n\n }", "protected function setup_menu() {\n\t\t$nag = '';\n\n\t\tif ( $this->has_notices() ) {\n\t\t\t$nag = \" <span class='wp-shp-browser-info dashicons dashicons-info' style='line-height: 0.8em'></span>\";\n\t\t}\n\n\t\t$defaults = array(\n\t\t\t'menu_title' => __( 'Showcase', 'wp-shp-browser' ),\n\t\t\t'page_title' => $this->get_page_title(),\n\t\t\t'page_slug' => $this->page_slug,\n\t\t\t'action_link' => false,\n\t\t\t'admin_action_priority' => 99,\n\t\t);\n\t\t$this->args = wp_parse_args( $this->args, $defaults );\n\n\t\t$this->args['menu_title'] .= $nag;\n\t}", "function charity_page_menu_args() {\n\t$args = array (\n\t\t'sort_column' => 'menu_order',\n\t\t'menu_class' => 'menu',\n\t\t'include' => '',\n\t\t'exclude' => '',\n\t\t'echo' => FALSE,\n\t\t'show_home' => FALSE,\n\t\t'link_before' => '',\n\t\t'link_after' => ''\n\t);\n\treturn $args;\n}", "public function nav_menu_args( $args = [] ) {\n\n\t\t\t// Filterable menu args\n\t\t\t$nav_clean = apply_filters( 'ipress_nav_clean', false );\n\t\t\tif ( $nav_clean ) { $args['container'] = false; }\n\n\t\t\t// Return menu args\n\t\t\treturn $args;\n\t\t}", "function init_menu() {\n if (func_num_args()>0) {\n $arg_list = func_get_args();\n }\n\n // menu entries\n module::set_menu($this->module, \"RAD Facility\", \"LIBRARIES\", \"_rad_facility\");\n module::set_menu($this->module, \"RAD DX Codes\", \"LIBRARIES\", \"_rad_dxcodes\");\n module::set_menu($this->module, \"RAD DX Codes\", \"LIBRARIES\", \"_rad_\");\n\n // add more detail\n module::set_detail($this->description, $this->version, $this->author, $this->module);\n\n }", "function my_wp_nav_menu_args( $args = '' ) {\n $args['container'] = false;\n return $args;\n}", "function uwmadison_page_menu_args( $args ) {\n\t\t$args['show_home'] = true;\n\t\t$args['menu_class'] = $args['container_class'];\n\t\treturn $args;\n\t}", "function nav(array $navLinks, $name = null, array $args = array())\n{\n if ($name !== null) {\n $navLinks = apply_filters($name, $navLinks, $args);\n }\n\n $menu = get_view()->navigation()->menu(new Omeka_Navigation($navLinks));\n\n if ($acl = get_acl()) {\n $menu->setRole(current_user())->setAcl($acl);\n }\n\n return $menu;\n}", "function custom_nav_item( $menu, stdClass $args ){\n if ( 'primary' != $args->theme_location )\n\n return $menu; \n\t\t// $menu .= '</ul><ul class=\"search-form-container\"><div class=\"search-toggle\"><i class=\"dashicons dashicons-search\"></i>\n\t\t$menu .= '</ul><ul class=\"search-form-container\"><div class=\"search-toggle\"><i class=\"fa fa-search\"></i>\n\t\t\t\t<a href=\"#search-container\" class=\"screen-reader-text\"></a>\n\t\t\t\t</div>'; \n return $menu; \n}", "protected function set_new_menu_params() {\n\t\t$this->menu_args['menu-item-title'] = !empty( $_POST['premise_post_title'] ) ? $_POST['premise_post_title'] : '';\n\t\t$this->menu_args['menu-item-url'] = !empty( $_POST['premise_post_url'] ) ? $_POST['premise_post_url'] : '';\n\t\t$this->menu_args['menu-item-object-id'] = !empty( $_POST['premise_post_object_id'] ) ? $_POST['premise_post_object_id'] : '';\n\t\t$this->menu_args['menu-item-object'] = !empty( $_POST['premise_post_object'] ) ? $_POST['premise_post_object'] : '';\n\t}", "function wp_nav_menu_setup()\n {\n }", "function lkdkamp_page_menu_args( $args ) {\n\t$args['show_home'] = false;\n\treturn $args;\n}", "function custom_nav_menu_args( $args ) {\n\tif ( $args['walker'] == '' ) {\n\t\t$args['walker'] = new Custom_Walker_Nav_Menu;\n\t}\n\n\treturn $args;\n}", "protected function menus()\n {\n\n }" ]
[ "0.74896514", "0.7166882", "0.7108001", "0.7035943", "0.69678605", "0.69671065", "0.6921737", "0.6907766", "0.6883245", "0.6865129", "0.6849561", "0.68393326", "0.68393326", "0.68393326", "0.68393326", "0.67384404", "0.670297", "0.6644116", "0.6643656", "0.6622157", "0.66120845", "0.6578095", "0.6558702", "0.65452266", "0.6541236", "0.65121937", "0.65078616", "0.64810115", "0.64803416", "0.6464881" ]
0.72354436
1
Relationship for models that this model is currently blocking.
public function blocking($model = null) { $modelClass = $this->getModelMorphClass($model); return $this ->morphToMany($modelClass, 'blocker', 'blockers', 'blocker_id', 'blockable_id') ->withPivot('blockable_type') ->wherePivot('blockable_type', $modelClass) ->wherePivot('blocker_type', $this->getMorphClass()) ->withTimestamps(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function blockedUser(): BelongsTo\n {\n return $this->belongsTo(User::class, 'blocked_user_id', 'id');\n }", "public function block() {\n $friendship_relation_exists = $this->micro_relation_exists($this->from, $this->to, \"F\");\n $exists = $this->micro_relation_exists($this->from, $this->to, \"B\");\n\n if($friendship_relation_exists) {\n // Unblock\n if($exists) {\n $this->db->query(\"DELETE FROM user_relation WHERE `from` = ? AND `to` = ? AND `status` = ?\"\n ,array(\n $this->from,\n $this->to,\n \"B\"\n ));\n // Block\n } else {\n $this->db->query(\"INSERT INTO user_relation (`from`, `to`, `status`, `since`) \n VALUES (?, ?, ?, ?)\", array(\n $this->from,\n $this->to,\n \"B\",\n date(\"Y/m/d h:i:s\")\n ));\n }\n\n return true;\n }\n\n return false;\n }", "public function friendsPending()\n\t {\n\t\treturn $this->belongsToMany('User', 'friend_user', 'user_id', 'friend_id')->where('accept','=',0);\n\t }", "public function getBlocking()\n {\n return $this->_blocking;\n }", "public function getBlocked()\n {\n return $this->Blocked;\n }", "public function pending_tasks()\n {\n return $this->hasMany('App\\Models\\Crm\\Task', 'lead_id')->where('is_done', false);\n }", "public function waiting_requested(){\n\n // $waiting = Friendship::find($id);\n $user_auth = Auth::user()->id;\n $friendship = Friendship::with(['requester', 'user_requested'])\n ->where('user_requested', $user_auth);\n\n }", "public function getQueueableRelations();", "public function getQueueableRelations();", "public function getIsBlocked();", "public function isBlocking(): bool\n {\n return $this->pluck('blocking');\n }", "public function isBlocking(): bool\n {\n return $this->pluck('blocking');\n }", "public function receiver()\n\t{\n\t\treturn $this->belongsTo('\\User');\n\t}", "public function isBlocking($model): bool\n {\n if (! $model instanceof Blockable && ! $model instanceof Blocking) {\n return false;\n }\n\n return ! is_null(\n $this\n ->blocking((new $model)->getMorphClass())\n ->find($model->getKey())\n );\n }", "public function isPending()\n {\n // check if model approved by all roles in the model\n return $this->pendingItem($this->approvedByRole());\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 isBlocked() {\n return $this->user !== null && $this->user->blocked;\n }", "public function getQueueableRelations()\n {\n return [];\n }", "public function isBlocked()\n {\n return $this->getStatus() == self::STATUS_BLOCKED;\n }", "public function getIsBlocked()\n {\n return $this->isBlocked;\n }", "public function getUser()\n {\n return $this->hasOne(User::className(), ['id' => 'user_id'])->inverseOf('waitingLists');\n }", "public function pending() {\n $model = new ReferralModel;\n $refs = $model\n ->tableAlias('r')\n ->join('customers', ['r.customer_id', '=', 'c.id'], 'c')\n // Join to get employee full name\n ->leftOuterJoin('wp_users', ['r.estimator_id', '=', 'wpu.id'], 'wpu')\n ->leftOuterJoin(\n 'wp_usermeta',\n \"wpu.id = wpum1.user_id AND wpum1.meta_key='first_name'\",\n 'wpum1'\n )\n ->leftOuterJoin(\n 'wp_usermeta',\n \"wpu.id = wpum2.user_id AND wpum2.meta_key='last_name'\",\n 'wpum2'\n )\n ->selectMany(\n 'r.id', 'r.address', 'r.city',\n 'r.state', 'r.zip_code', 'r.primary_phone_number',\n 'r.status', 'r.date_requested', 'r.lat', 'r.lng'\n )\n ->selectMany(\n 'r.id', 'r.customer_id', 'r.address', 'r.city',\n 'r.state', 'r.zip_code', 'r.primary_phone_number', 'r.priority',\n 'r.status', 'r.date_requested', 'r.lat', 'r.lng'\n )\n ->selectExpr(\"CONCAT_WS(' ',wpum1.meta_value, wpum2.meta_value)\", 'estimator_full_name')\n ->select('c.display_name', 'customer_display_name')\n ->where('r.status', 'Pending')\n ->whereNull('r.route_id')\n ->orderByDesc('r.date_requested')\n ->findArray();\n $this->renderJson($refs);\n }", "public function isBlocking()\n\t{\n\t\treturn $this->blocking;\n\t}", "public function waiting_requester(){\n\n }", "public function available(): BelongsTo\n {\n return $this->belongsTo(Available::class);\n }", "public function friendRequestsPending() {\n // Returns a pending friend requests to me\n // where accepted = false\n // false, means someone added YOU\n return $this->friendOf()->wherePivot('accepted', false)->get();\n }", "public function requests()\n {\n return $this->hasMany('Restboat\\Models\\Request', 'user_id', 'id');\n }", "public function blocks($model): bool\n {\n return $this->isBlocking($model);\n }", "public function getAllowEntityCancellationAttribute()\n {\n return true;\n }", "public function block($model): bool\n {\n if (! $model instanceof Blockable && ! $model instanceof Blocking) {\n return false;\n }\n\n if ($this->isBlocking($model)) {\n return false;\n }\n\n $this->blocking()->attach($model->getKey(), [\n 'blockable_type' => (new $model)->getMorphClass(),\n ]);\n\n return true;\n }" ]
[ "0.6185107", "0.5762427", "0.5663475", "0.5565068", "0.55341184", "0.55001926", "0.54354596", "0.54343754", "0.54343754", "0.54339355", "0.5392027", "0.5392027", "0.53639805", "0.53121674", "0.52717906", "0.5270487", "0.5259728", "0.5256038", "0.5234536", "0.52189356", "0.52126575", "0.5203173", "0.51727974", "0.5159992", "0.51574963", "0.51530796", "0.51368487", "0.51314723", "0.5105932", "0.5090622" ]
0.608516
1
Check if the current model is blocking another model.
public function isBlocking($model): bool { if (! $model instanceof Blockable && ! $model instanceof Blocking) { return false; } return ! is_null( $this ->blocking((new $model)->getMorphClass()) ->find($model->getKey()) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function blocks($model): bool\n {\n return $this->isBlocking($model);\n }", "public function isBlocked()\n {\n return $this->getStatus() == self::STATUS_BLOCKED;\n }", "public function block($model): bool\n {\n if (! $model instanceof Blockable && ! $model instanceof Blocking) {\n return false;\n }\n\n if ($this->isBlocking($model)) {\n return false;\n }\n\n $this->blocking()->attach($model->getKey(), [\n 'blockable_type' => (new $model)->getMorphClass(),\n ]);\n\n return true;\n }", "public function isBlocked()\n {\n if ($this->status == 2) {\n return true;\n } else {\n return false;\n }\n }", "public function isBlocked() {\n return $this->user !== null && $this->user->blocked;\n }", "public function isBlocking(): bool\n {\n return $this->pluck('blocking');\n }", "public function isBlocking(): bool\n {\n return $this->pluck('blocking');\n }", "public function isBlocking()\n\t{\n\t\treturn $this->blocking;\n\t}", "public function hasBlocked()\n {\n return $this->blocked !== null;\n }", "public function block() {\n $friendship_relation_exists = $this->micro_relation_exists($this->from, $this->to, \"F\");\n $exists = $this->micro_relation_exists($this->from, $this->to, \"B\");\n\n if($friendship_relation_exists) {\n // Unblock\n if($exists) {\n $this->db->query(\"DELETE FROM user_relation WHERE `from` = ? AND `to` = ? AND `status` = ?\"\n ,array(\n $this->from,\n $this->to,\n \"B\"\n ));\n // Block\n } else {\n $this->db->query(\"INSERT INTO user_relation (`from`, `to`, `status`, `since`) \n VALUES (?, ?, ?, ?)\", array(\n $this->from,\n $this->to,\n \"B\",\n date(\"Y/m/d h:i:s\")\n ));\n }\n\n return true;\n }\n\n return false;\n }", "public function getIsBlocked();", "public function isBlocked()\n {\n if ($this->edit_id === 0) {\n return false;\n } else {\n if ($this->edit_time + 7200 > time()) {\n return true;\n } else {\n return false;\n }\n }\n }", "public function unblock($model): bool\n {\n if (! $model instanceof Blockable && ! $model instanceof Blocking) {\n return false;\n }\n\n if (! $this->isBlocking($model)) {\n return false;\n }\n\n return (bool) $this\n ->blocking((new $model)->getMorphClass())\n ->detach($model->getKey());\n }", "public function getIsBlocked()\n {\n return $this->isBlocked;\n }", "public function isBlockable()\n {\n if ($this->_hasVar('user_blockable')) {\n return (boolean) $this->_getVar('user_blockable');\n } else {\n return true;\n }\n }", "public function isBlocked() : bool {\n return $this->delivery_status === WebhookEvent::EVENT_BLOCKED;\n }", "public function blocking($model = null)\n {\n $modelClass = $this->getModelMorphClass($model);\n\n return $this\n ->morphToMany($modelClass, 'blocker', 'blockers', 'blocker_id', 'blockable_id')\n ->withPivot('blockable_type')\n ->wherePivot('blockable_type', $modelClass)\n ->wherePivot('blocker_type', $this->getMorphClass())\n ->withTimestamps();\n }", "public function hasBlockedUserFilter()\n {\n return $this->blocked_user_filter !== null;\n }", "public function isWaiting();", "public function getBlocking()\n {\n return $this->_blocking;\n }", "public function isPending()\n {\n // check if model approved by all roles in the model\n return $this->pendingItem($this->approvedByRole());\n }", "public function getIsBlock();", "public function getIsPending() {\n if ($parent = $this->getParentBlock()) {\n return!!$parent->getPending();\n }\n return false;\n }", "public function isAllow() {\n return !$this->isEnabled();\n }", "public function isBlocked()\n {\n if (!IS_CLI) {\n $userIp = request()->getUserIP();\n\n $command = app()->db->createCommand('SELECT ip_address FROM ' . SecurityBlockedAccess::getTableSchema()->fullName . ' WHERE is_active = 1');\n $blockedIps = $command->queryColumn();\n\n if (!empty($blockedIps)) {\n $validator = new IpValidator([\n 'subnet' => null,\n ]);\n $validator->setRanges($blockedIps);\n\n return $validator->validate($userIp);\n }\n }\n\n return false;\n }", "public function isIgnoreObserver(){\n\t\t$ignore = true;\n\t\t$data = Mage::app()->getRequest()->getParams();\n\t\tif (isset($data['echeck_dropship']) && $data['echeck_dropship'] == 1)$ignore = false;\n\t\treturn $ignore;\n\t}", "public function ownsLock()\n {\n return $this->owner() === $this->id;\n }", "public function hasBaseModel()\n\t{\n\t\treturn ! empty($this->resource->models_base);\n\t}", "public function blockAccount() {\n\t\tif(check($this->_userid)) {\n\t\t\t$result = $this->db->query(\"UPDATE \"._TBL_MI_.\" SET \"._CLMN_BLOCCODE_.\" = ? WHERE \"._CLMN_MEMBID_.\" = ?\", array(1, $this->_userid));\n\t\t\tif(!$result) return;\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif(check($this->_username)) {\n\t\t\t$result = $this->db->query(\"UPDATE \"._TBL_MI_.\" SET \"._CLMN_BLOCCODE_.\" = ? WHERE \"._CLMN_USERNM_.\" = ?\", array(1, $this->_username));\n\t\t\tif(!$result) return;\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif(check($this->_email)) {\n\t\t\t$result = $this->db->query(\"UPDATE \"._TBL_MI_.\" SET \"._CLMN_BLOCCODE_.\" = ? WHERE \"._CLMN_EMAIL_.\" = ?\", array(1, $this->_email));\n\t\t\tif(!$result) return;\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn;\n\t}", "public function isBanned() {\n return $this->getStatus() === Status::BANNED;\n }" ]
[ "0.7495757", "0.69053787", "0.6801635", "0.67990774", "0.666782", "0.66282904", "0.66282904", "0.6483337", "0.64489037", "0.6397326", "0.6258957", "0.61333466", "0.6101863", "0.5955755", "0.5909152", "0.5907648", "0.5903484", "0.56196004", "0.5583856", "0.5568157", "0.5546071", "0.5513709", "0.5469224", "0.5361682", "0.53512204", "0.5336231", "0.53269815", "0.5286806", "0.528536", "0.52774405" ]
0.73818463
1
Check if the current model is blocking another model.
public function blocks($model): bool { return $this->isBlocking($model); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isBlocking($model): bool\n {\n if (! $model instanceof Blockable && ! $model instanceof Blocking) {\n return false;\n }\n\n return ! is_null(\n $this\n ->blocking((new $model)->getMorphClass())\n ->find($model->getKey())\n );\n }", "public function isBlocked()\n {\n return $this->getStatus() == self::STATUS_BLOCKED;\n }", "public function block($model): bool\n {\n if (! $model instanceof Blockable && ! $model instanceof Blocking) {\n return false;\n }\n\n if ($this->isBlocking($model)) {\n return false;\n }\n\n $this->blocking()->attach($model->getKey(), [\n 'blockable_type' => (new $model)->getMorphClass(),\n ]);\n\n return true;\n }", "public function isBlocked()\n {\n if ($this->status == 2) {\n return true;\n } else {\n return false;\n }\n }", "public function isBlocked() {\n return $this->user !== null && $this->user->blocked;\n }", "public function isBlocking(): bool\n {\n return $this->pluck('blocking');\n }", "public function isBlocking(): bool\n {\n return $this->pluck('blocking');\n }", "public function isBlocking()\n\t{\n\t\treturn $this->blocking;\n\t}", "public function hasBlocked()\n {\n return $this->blocked !== null;\n }", "public function block() {\n $friendship_relation_exists = $this->micro_relation_exists($this->from, $this->to, \"F\");\n $exists = $this->micro_relation_exists($this->from, $this->to, \"B\");\n\n if($friendship_relation_exists) {\n // Unblock\n if($exists) {\n $this->db->query(\"DELETE FROM user_relation WHERE `from` = ? AND `to` = ? AND `status` = ?\"\n ,array(\n $this->from,\n $this->to,\n \"B\"\n ));\n // Block\n } else {\n $this->db->query(\"INSERT INTO user_relation (`from`, `to`, `status`, `since`) \n VALUES (?, ?, ?, ?)\", array(\n $this->from,\n $this->to,\n \"B\",\n date(\"Y/m/d h:i:s\")\n ));\n }\n\n return true;\n }\n\n return false;\n }", "public function getIsBlocked();", "public function isBlocked()\n {\n if ($this->edit_id === 0) {\n return false;\n } else {\n if ($this->edit_time + 7200 > time()) {\n return true;\n } else {\n return false;\n }\n }\n }", "public function unblock($model): bool\n {\n if (! $model instanceof Blockable && ! $model instanceof Blocking) {\n return false;\n }\n\n if (! $this->isBlocking($model)) {\n return false;\n }\n\n return (bool) $this\n ->blocking((new $model)->getMorphClass())\n ->detach($model->getKey());\n }", "public function getIsBlocked()\n {\n return $this->isBlocked;\n }", "public function isBlockable()\n {\n if ($this->_hasVar('user_blockable')) {\n return (boolean) $this->_getVar('user_blockable');\n } else {\n return true;\n }\n }", "public function isBlocked() : bool {\n return $this->delivery_status === WebhookEvent::EVENT_BLOCKED;\n }", "public function blocking($model = null)\n {\n $modelClass = $this->getModelMorphClass($model);\n\n return $this\n ->morphToMany($modelClass, 'blocker', 'blockers', 'blocker_id', 'blockable_id')\n ->withPivot('blockable_type')\n ->wherePivot('blockable_type', $modelClass)\n ->wherePivot('blocker_type', $this->getMorphClass())\n ->withTimestamps();\n }", "public function hasBlockedUserFilter()\n {\n return $this->blocked_user_filter !== null;\n }", "public function isWaiting();", "public function getBlocking()\n {\n return $this->_blocking;\n }", "public function isPending()\n {\n // check if model approved by all roles in the model\n return $this->pendingItem($this->approvedByRole());\n }", "public function getIsBlock();", "public function getIsPending() {\n if ($parent = $this->getParentBlock()) {\n return!!$parent->getPending();\n }\n return false;\n }", "public function isAllow() {\n return !$this->isEnabled();\n }", "public function isBlocked()\n {\n if (!IS_CLI) {\n $userIp = request()->getUserIP();\n\n $command = app()->db->createCommand('SELECT ip_address FROM ' . SecurityBlockedAccess::getTableSchema()->fullName . ' WHERE is_active = 1');\n $blockedIps = $command->queryColumn();\n\n if (!empty($blockedIps)) {\n $validator = new IpValidator([\n 'subnet' => null,\n ]);\n $validator->setRanges($blockedIps);\n\n return $validator->validate($userIp);\n }\n }\n\n return false;\n }", "public function isIgnoreObserver(){\n\t\t$ignore = true;\n\t\t$data = Mage::app()->getRequest()->getParams();\n\t\tif (isset($data['echeck_dropship']) && $data['echeck_dropship'] == 1)$ignore = false;\n\t\treturn $ignore;\n\t}", "public function ownsLock()\n {\n return $this->owner() === $this->id;\n }", "public function blockAccount() {\n\t\tif(check($this->_userid)) {\n\t\t\t$result = $this->db->query(\"UPDATE \"._TBL_MI_.\" SET \"._CLMN_BLOCCODE_.\" = ? WHERE \"._CLMN_MEMBID_.\" = ?\", array(1, $this->_userid));\n\t\t\tif(!$result) return;\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif(check($this->_username)) {\n\t\t\t$result = $this->db->query(\"UPDATE \"._TBL_MI_.\" SET \"._CLMN_BLOCCODE_.\" = ? WHERE \"._CLMN_USERNM_.\" = ?\", array(1, $this->_username));\n\t\t\tif(!$result) return;\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif(check($this->_email)) {\n\t\t\t$result = $this->db->query(\"UPDATE \"._TBL_MI_.\" SET \"._CLMN_BLOCCODE_.\" = ? WHERE \"._CLMN_EMAIL_.\" = ?\", array(1, $this->_email));\n\t\t\tif(!$result) return;\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn;\n\t}", "public function hasBaseModel()\n\t{\n\t\treturn ! empty($this->resource->models_base);\n\t}", "public function getBlocked()\n {\n return $this->Blocked;\n }" ]
[ "0.73832715", "0.6907038", "0.6803754", "0.68004143", "0.66683084", "0.66294", "0.66294", "0.6484921", "0.6448815", "0.63986456", "0.6259316", "0.6132957", "0.6103157", "0.59570366", "0.59099674", "0.59087884", "0.59076244", "0.56187606", "0.55834043", "0.5570577", "0.55431736", "0.55136603", "0.54668313", "0.53614676", "0.5351474", "0.53352934", "0.5323857", "0.52872926", "0.52836657", "0.52787745" ]
0.7497042
0
Block a certain model.
public function block($model): bool { if (! $model instanceof Blockable && ! $model instanceof Blocking) { return false; } if ($this->isBlocking($model)) { return false; } $this->blocking()->attach($model->getKey(), [ 'blockable_type' => (new $model)->getMorphClass(), ]); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function blocks($model): bool\n {\n return $this->isBlocking($model);\n }", "public function blocking($model = null)\n {\n $modelClass = $this->getModelMorphClass($model);\n\n return $this\n ->morphToMany($modelClass, 'blocker', 'blockers', 'blocker_id', 'blockable_id')\n ->withPivot('blockable_type')\n ->wherePivot('blockable_type', $modelClass)\n ->wherePivot('blocker_type', $this->getMorphClass())\n ->withTimestamps();\n }", "public function blockHandle(Request $request) \n {\n // Check parameter\n $ID = $request->get('ID', false);\n \n if (!$ID)\n {\n return App::abort(404);\n }\n\n // Check promotor\n $promotor = $this->promotor->getOne($ID);\n \n if (!$promotor)\n {\n return App::abort(404);\n }\n\n // Get promotor meta data\n $promotor_meta = $this->promotor_meta->get($ID, 'block');\n \n // Set default action log and flash message\n if(!$promotor_meta)\n {\n $this->promotor_meta->set($ID, 'block', 'block');\n \n $flash = 'promotor-block';\n $action = 'Block promotor (ID:'.$ID.')';\n }\n else\n {\n $this->promotor_meta->remove($ID, 'block');\n\n $flash = 'promotor-unblock';\n $action = 'Unblock promotor (ID:'.$ID.')';\n }\n \n // Log request\n $this->log->record($request->userID, $action);\n\n // Set session and redirect\n $request->session()->flash($flash, '');\n return back();\n }", "public function isBlocking($model): bool\n {\n if (! $model instanceof Blockable && ! $model instanceof Blocking) {\n return false;\n }\n\n return ! is_null(\n $this\n ->blocking((new $model)->getMorphClass())\n ->find($model->getKey())\n );\n }", "public function block()\n {\n $this->type = 'block';\n\n return $this;\n }", "public function blockAction()\n {\n $blockId = $this->params()->fromRoute('block');\n $handles = $this->params()->fromQuery('handles', []);\n /* @var $layoutManager LayoutManager */\n $layoutManager = $this->layoutManager();\n foreach ($handles as $handle => $priority) {\n $layoutManager->addHandle(new Handle($handle, $priority));\n }\n if (!$blockId) {\n return $this->blockNotFound($blockId);\n }\n $layoutManager->generate([BlocksGenerator::NAME => true]);\n if (!$block = $layoutManager->getBlock($blockId)) {\n $block = $this->blockNotFound($blockId);\n }\n $block->setVariable('__ESI__', true);\n $block->setTerminal(true);\n return $block;\n }", "public function unblock($model): bool\n {\n if (! $model instanceof Blockable && ! $model instanceof Blocking) {\n return false;\n }\n\n if (! $this->isBlocking($model)) {\n return false;\n }\n\n return (bool) $this\n ->blocking((new $model)->getMorphClass())\n ->detach($model->getKey());\n }", "public function blockStore()\n {\n $this->setBlocking();\n }", "public function block_user(Request $request) {\n\n try {\n\n DB::beginTransaction();\n\n $validator = Validator::make(\n $request->all(),\n array(\n 'blocker_id'=>'required|exists:users,id',\n ));\n\n if ($validator->fails()) {\n // Error messages added in response for debugging\n $errors = implode(',',$validator->messages()->all());\n\n throw new Exception($errors, 101);\n\n } else {\n\n if($request->blocker_id != $request->id) {\n\n $model = BlockList::where('user_id', $request->id)\n ->where('block_user_id', $request->blocker_id)->first();\n\n if (!$model) {\n\n $model = new BlockList;\n\n $model->user_id = $request->id;\n\n $model->block_user_id = $request->blocker_id;\n\n $model->status = DEFAULT_TRUE;\n\n if ($model->save()) {\n\n\n $response_array = ['success'=>true, 'message'=> Helper::get_message(124)];\n\n } else {\n\n throw new Exception(tr('add_block_user'));\n \n }\n\n } else {\n\n throw new Exception(Helper::error_message(153), 153);\n\n }\n\n } else {\n\n throw new Exception(Helper::error_message(155), 155);\n\n }\n }\n\n DB::commit();\n\n return response()->json($response_array, 200);\n\n }catch(Exception $e) {\n\n DB::rollback();\n\n $message = $e->getMessage();\n\n $code = $e->getCode();\n\n $response_array = ['success'=>false, 'error_messages'=>$message, 'error_code'=>$code];\n\n return response()->json($response_array);\n\n }\n\n }", "public function ajax_block_one() {\n\n $response = array();\n $object_id = json_decode($this->input->post(\"id\"));\n\n // request for approval if not super admin\n if ($this->session->userdata(\"role\") != USER_SUPER_ADMIN) {\n\n // make notification for seatizen block operation.\n\n // request for block this seatizen. (flag: not followed up yet)\n $notification = array(\n \"source\" => $this->session->userdata(\"id\"),\n \"destination\" => NULL,\n \"type\" => NOTIF_BLOCK_SEATIZEN,\n \"target\" => $object_id,\n \"status\" => false // haven't followed up yet\n );\n\n $this->generic->create($this->_notification_table, $notification);\n\n\n $response[\"status\"] = \"success\";\n $response[\"notification\"] = \"Seatizen block is waiting for super admin approval.\";\n\n } else {\n\n // arrange block configuration\n $result = $this->block($object_id);\n\n if ($result) {\n $response[\"status\"] = \"success\";\n $response[\"notification\"] = \"One item has been blocked.\";\n } else {\n $response[\"status\"] = \"error\";\n $response[\"notification\"] = \"Cannot block item\";\n }\n }\n\n $this->output->set_content_type(\"application/json\");\n $this->output->set_status_header(200);\n $this->output->set_output(json_encode($response));\n }", "public function block() {\n $friendship_relation_exists = $this->micro_relation_exists($this->from, $this->to, \"F\");\n $exists = $this->micro_relation_exists($this->from, $this->to, \"B\");\n\n if($friendship_relation_exists) {\n // Unblock\n if($exists) {\n $this->db->query(\"DELETE FROM user_relation WHERE `from` = ? AND `to` = ? AND `status` = ?\"\n ,array(\n $this->from,\n $this->to,\n \"B\"\n ));\n // Block\n } else {\n $this->db->query(\"INSERT INTO user_relation (`from`, `to`, `status`, `since`) \n VALUES (?, ?, ?, ?)\", array(\n $this->from,\n $this->to,\n \"B\",\n date(\"Y/m/d h:i:s\")\n ));\n }\n\n return true;\n }\n\n return false;\n }", "public function action_block(Request $request)\n {\n\n\n $data = DB::table('posts')->where('posts.id_product','=',$request['id']);\n\n $data = $data->select('id')->first();\n\n $post = post::find($data->id);\n\n $post->status_post = $request['action_block'];\n\n $post->save();\n\n return redirect(url('buy_user'));\n }", "protected function _blockAccess()\n\t{\n\t\t// Set the task\n\t\t$this->_task = 'block';\n\n\t\t// Set page title\n\t\t$this->_buildTitle();\n\n\t\t// Set the pathway\n\t\t$this->_buildPathway();\n\n\t\t// Instantiate a new view\n\t\tif (User::isGuest())\n\t\t{\n\t\t\t$this->_msg = Lang::txt('COM_PUBLICATIONS_PRIVATE_PUB_LOGIN');\n\t\t\treturn $this->_login();\n\t\t}\n\n\t\tNotify::error(Lang::txt('COM_PUBLICATIONS_RESOURCE_NO_ACCESS'));\n\n\t\tApp::redirect(\n\t\t\tRoute::url('index.php?option=' . $this->_option, false)\n\t\t);\n\t}", "public function Admin_Action_SetDefaultBlock() {\n $blockId = $this->_getPOSTRequest ( 'blockId', 0 );\n $query = \"UPDATE\" . \" [|PREFIX|]dynamic_content_block \" . \" SET activated = '1' WHERE blockid = '\" . intval($blockId) . \"'\";\n $this->db->Query ( $query );\n return;\n }", "public function blocked(){\n\t\t$data['user'] = $this->db->get_where('users', ['email' => $this->session->userdata('email')])->row_array();\n\t\t$data['title'] = \"BLOCKED\";\n\t\t$this->load->view('maintemplate/header', $data);\n\t\t$this->load->view('maintemplate/sidebar', $data);\n\t\t$this->load->view('maintemplate/topbar', $data);\n\t\t$this->load->view('home/blocked');\n\t\t$this->load->view('maintemplate/footer');\n\t}", "function block(Request $request)\n {\n DB::table('users')\n ->where('id', $request->id)\n ->update([\n 'active' => '0',\n ]); \n\n AuditTrail::create(['user_id' => Auth::user()->id,\n 'username' => Auth::user()->username,\n 'form_name' => 'Account',\n 'activity' => 'Locked ' . 'Account ' . $request->username, \n ]);\n\n return redirect()->back();\n }", "public function blockGateway(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 to be Blocked';\n $this->auditLogs($ip,$host,$module,$instruction);\n\n $gateway = Gateway::findOrFail($request->GATEWAY_ID);\n $gateway->REG_FLAG = 4;\n $gateway->save();\n\n return \"success\";\n }", "public function lockAndBlock()\n {\n $this->lock();\n }", "public function block($id)\n {\n $user = User::findOrFail($id);\n\n if (Auth::user()->id == $id) {\n return response('Unauthorized action.', 403);\n }\n\n if (Gate::allows('admin', auth()->user())) {\n $user->where('users.id', '=', $id)\n ->update(['blocked' => 1]);\n\n return redirect()->action('UserController@index');\n }\n return response('Unauthorized action.', 403);\n }", "public function block($id)\n {\n $block = $this->selectuser($id,'block');\n if($block[0]['block'] == 1)\n {\n $this->updateuser($id,'block',0);\n }\n else\n {\n $this->updateuser($id,'block',1);\n }\n }", "public function block_request($uri)\n {\n }", "public function saveBlock()\n\t{\n\t}", "public function model()\n {\n return HomeAdsPlacementBlockable::class;\n }", "public function blockUser(Request $request)\n {\n if (Auth::user()->role_id == 1) {\n $user = Users::findOrFail($request->input('user_id'));\n $user->valid = $request->input('action');\n $user->save();\n $data = array( 'text' => 'success' );\n } else {\n $data = array( 'text' => 'fail' . $request->input('action') );\n }\n return Response::json($data);\n }", "public function blockUser($id)\n {\n $this->db->set('status_id', '1');\n $this->db->where('id', $id);\n $this->db->update('inm_user');\n return true;\n }", "public function block()\n {\n $blocker = Yii::$app->cache->get('login_blocker_' . $this->getIp());\n \n if ($blocker === false) {\n $blocker = [1, time(), 0];\n } else { \n $blocker[0]++;\n \n if ($blocker[0] == $this->wrong_login_number) {\n $blocker[1] = time() + $this->time; \n }\n }\n \n Yii::$app->cache->set('login_blocker_' . $this->getIp(), $blocker, $this->time);\n\n return true;\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 }", "public function blockAccount() {\n\t\tif(check($this->_userid)) {\n\t\t\t$result = $this->db->query(\"UPDATE \"._TBL_MI_.\" SET \"._CLMN_BLOCCODE_.\" = ? WHERE \"._CLMN_MEMBID_.\" = ?\", array(1, $this->_userid));\n\t\t\tif(!$result) return;\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif(check($this->_username)) {\n\t\t\t$result = $this->db->query(\"UPDATE \"._TBL_MI_.\" SET \"._CLMN_BLOCCODE_.\" = ? WHERE \"._CLMN_USERNM_.\" = ?\", array(1, $this->_username));\n\t\t\tif(!$result) return;\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif(check($this->_email)) {\n\t\t\t$result = $this->db->query(\"UPDATE \"._TBL_MI_.\" SET \"._CLMN_BLOCCODE_.\" = ? WHERE \"._CLMN_EMAIL_.\" = ?\", array(1, $this->_email));\n\t\t\tif(!$result) return;\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn;\n\t}", "public function model()\n {\n return BlockAnchor::class;\n }", "public function block(Request $request,$enc_id)\n\t{\t\n\t\t$country_id = base64_decode($enc_id);\n\n\t\t$obj_status = $this->BaseModel->where('id',$country_id)->update(['status'=>'0']);\n\n\t\tif($obj_status){\n\t\t\tSession::flash('success', 'Country status updated successfully.');\n\t\t\treturn redirect($this->module_url_path);\n \t}else{\n \t\tSession::flash('error', 'Something went wrong.');\n\t\t\treturn redirect($this->module_url_path);\n \t}\n\t}" ]
[ "0.70781046", "0.67674917", "0.66868395", "0.63721085", "0.6241705", "0.6199661", "0.6120879", "0.60077304", "0.5959452", "0.5919647", "0.5855017", "0.5822905", "0.5740309", "0.5712021", "0.5683392", "0.5660049", "0.5628826", "0.56132895", "0.5609749", "0.55894256", "0.5587952", "0.55876845", "0.55863214", "0.55023", "0.5499524", "0.5451815", "0.5435003", "0.5426633", "0.54244477", "0.54235655" ]
0.7396769
0
Unblock a certain model.
public function unblock($model): bool { if (! $model instanceof Blockable && ! $model instanceof Blocking) { return false; } if (! $this->isBlocking($model)) { return false; } return (bool) $this ->blocking((new $model)->getMorphClass()) ->detach($model->getKey()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function model_call_unfreeze(Jam_Model $model, Jam_Event_Data $data)\n\t{\n\t\t$this->call_associations_method($model, 'unfreeze');\n\n\t\tforeach ($this->_fields as $name)\n\t\t{\n\t\t\t$model->{$name} = NULL;\n\t\t}\n\n\t\tif ( ! $this->_parent)\n\t\t{\n\t\t\t$model->is_frozen = FALSE;\n\t\t\t$model->is_just_frozen = FALSE;\n\t\t}\n\n\t\t$data->return = $model;\n\t}", "function unblock(Request $request)\n {\n DB::table('users')\n ->where('id', $request->id)\n ->update([\n 'active' => '1',\n ]);\n\n //insert into auditrail\n AuditTrail::create(['user_id' => Auth::user()->id,\n 'username' => Auth::user()->username,\n 'form_name' => 'Account',\n 'activity' => 'Unlocked ' . 'Account ' . $request->username, \n ]);\n\n return redirect()->back();\n }", "public function deactivate();", "function unbindAll() {\n foreach (array(\n 'hasOne' => array_keys($this->hasOne),\n 'hasMany' => array_keys($this->hasMany),\n 'belongsTo' => array_keys($this->belongsTo),\n 'hasAndBelongsToMany' => array_keys($this->hasAndBelongsToMany)\n ) as $relation => $model) {\n $this->unbindModel(array($relation => $model));\n }\n }", "public function deactivate(): void;", "public function unblockStore()\n {\n $this->setBlocking(false);\n }", "abstract public function deactivate();", "protected function deactivateSelf() {}", "public function unblockGateway(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 to be Unregistered';\n $this->auditLogs($ip,$host,$module,$instruction);\n\n $gateway = Gateway::findOrFail($request->GATEWAY_ID);\n $gateway->REG_FLAG = 0;\n $gateway->save();\n\n return \"success\";\n }", "public function unlock()\r\n {\r\n frameEbbs::_()->getModule('backup')->unlock();\r\n }", "public function run()\n {\n Model::unguard();\n\n\n\n }", "public function unlockCommand() {\n\t\tif (@is_file((PATH_typo3conf . 'LOCK_BACKEND'))) {\n\t\t\tunlink(PATH_typo3conf . 'LOCK_BACKEND');\n\t\t\tif (@is_file((PATH_typo3conf . 'LOCK_BACKEND'))) {\n\t\t\t\t$message = 'ERROR: Could not remove lock file \\'typo3conf/LOCK_BACKEND\\'!';\n\t\t\t\t$this->outputLine($message);\n\t\t\t\t$this->logger->error($message);\n\t\t\t\t$this->quit(1);\n\t\t\t} else {\n\t\t\t\t$message = 'Removed lock file \\'typo3conf/LOCK_BACKEND\\'';\n\t\t\t\t$this->outputLine($message);\n\t\t\t\t$this->logger->info($message);\n\t\t\t}\n\t\t} else {\n\t\t\t$message = 'No lock file \\'typo3conf/LOCK_BACKEND\\' was found, hence no lock could be removed.';\n\t\t\t$this->outputLine($message);\n\t\t\t$this->logger->info($message);\n\t\t\t$this->quit(1);\n\t\t}\n\t}", "function unblock($ip_address, $filter) {\n\t\t//define the global variables\n\t\tglobal $firewall_path, $firewall_name;\n\n\t\t//invalid ip address\n\t\tif (!filter_var($ip_address, FILTER_VALIDATE_IP)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t//unblock the address\n\t\tif ($firewall_name == 'iptables') {\n\t\t\t$command = $firewall_path.'/./iptables -L '.$filter.' -n --line-numbers | grep \"'.$ip_address.' \" | cut -d \" \" -f1';\n\t\t\t$line_number = trim(shell($command));\n\t\t\techo \"\\n\". $command . \" line \".__line__.\" result \".$result.\"\\n\";\n\t\t\tif (is_numeric($line_number)) {\n\t\t\t\t//$result = shell('iptables -D INPUT '.$line_number);\n\t\t\t\t$command = $firewall_path.'/./iptables -D '.$filter.' '.$line_number;\n\t\t\t\t$result = shell($command);\n\t\t\t\techo \"Unblock address \".$ip_address .\" line \".$line_number.\" command \".$command.\" result \".$result.\"\\n\";\n\t\t\t}\n\t\t}\n\n\t\t//unblock the address\n\t\tif ($firewall_name == 'pf') {\n\t\t\t//example: pfctl -t sip-auth-ip -T delete 127.0.0.5/32\n\t\t\t$command = $firewall_path.'/pfctl -t '.$filter.' -T delete '.$ip_address.'/32';\n\t\t\t$result = shell($command);\n\t\t}\n\n\t\t//send debug information to the console\n\t\tif ($debug) {\n\t\t\techo \"Unblock address \".$ip_address .\"\\n\";\n\t\t}\n\t}", "public function unlock(): void;", "public function deactivate() {\n\n }", "public function deactivate() {\n\n }", "public function unblockThirdparty($id) {\n\t\tif( Auth::user()->hasRole(1) || Auth::user()->hasRole(4) || Auth::user()->hasRole(5) || Auth::user()->hasRole(8) ) {\n\t\t\t$thirdparty = Thirdparty::find($id);\n\t\t\t$thirdparty->status = 0;\n\t\t\t$thirdparty->save();\n\t\t\tSession::flash('flashmessagetxt', 'Unblocked Successfully!!');\n\t\t\treturn Redirect::route('third-party-list');\n\t\t}\n\t}", "public static function deactivate(){\n // Do nothing\n }", "public function unlock(): void {}", "public function unlock(): void {}", "public function unlock(): void {}", "public function unlock(): void {}", "public function unlock(): void {}", "public static function deactivate()\n {\n // Do nothing\n }", "public function unlock() {\n }", "public function down()\n\t{\n\t\tif(Yii::app()->db->getSchema()->getTable(\"{{user_block}}\")){\n\t\t\t$this->dropTable(\"{{user_block}}\");\n\t\t}\n\n\t}", "public static function deactivate() {\n\n }", "public function unlockSite() {\n\t\tif (is_resource($this->lockResource)) {\n\t\t\tflock($this->lockResource, LOCK_UN);\n\t\t\tfclose($this->lockResource);\n\t\t}\n\t\t@unlink($this->lockFlagPathAndFilename);\n\t}", "public function unregister()\r\n {\r\n $this->unregisterBlock('l');\r\n }", "public function disable(Module $module);" ]
[ "0.5904039", "0.58149767", "0.57980645", "0.56206995", "0.56146276", "0.55990344", "0.5561475", "0.55518764", "0.55389905", "0.55290645", "0.5515547", "0.54373765", "0.54258466", "0.5419757", "0.5404829", "0.5404829", "0.5391785", "0.538996", "0.53700364", "0.53700364", "0.53700364", "0.53700364", "0.53700364", "0.534612", "0.5335573", "0.53336436", "0.53267825", "0.5319799", "0.53165036", "0.5305576" ]
0.7174353
0
Display a calendar view to logged in user
public function index() { if (!Sentry::check()) { // User is not logged in, or is not activated return Redirect::route('landing'); } else { return View::make('calendar.index'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index()\n {\n $this->view('calendar');\n }", "public function getindex()\n\t{\n\t\t$id = Sentry::getUser()->id;\n\t\tif(!$id)\n\t\t{\n\t\t\techo \"please login first\";\n\n\t\t}\n\t\telse\n\t\t{\n\t\t$events = Calender::all(); \n\t\t\n\t\treturn View::make('event.index')->with('events',$events);\n\t}\n\t}", "public function index() {\n \tif(!$this->user)\n \t\n \t{\n \t\t\n \t\t echo \"Members only. <a href='/users/login'>Login</a>\";\n \n \t\t # Return will force this method to exit here so the rest of the code won't be executed and the profile view won't be displayed.\n \t\t return false;\n\t\n\t }\n\t \t\t\n\t\t# Any method that loads a view will commonly start with this\n\t\t# First, set the content of the template with a view file\n\t\t\t$this->template->content = View::instance('v_calendar');\n\t\t# Now set the <title> tag\n\t\t\t$this->template->title = \"Event Calendar of \".$this->user->first_name;\t\t\n\t\n\t\t# If this view needs any JS or CSS files, \n\t\t# add their paths to this array so they will get loaded in the head\n\t\t\t$client_files = Array(\n\t\t\t\t\t\t\"\"\n\t );\n\t \n\t \t$this->template->client_files = Utils::load_client_files($client_files); \n\t \t\t\n\t\t# Render the view\n\t\t\techo $this->template;\n\n\t}", "public function calendar()\n {\n return view('pages.calendar');\n }", "public function calendario() {\n $datos['titulo'] = 'Calendario';\n $this->load->view('calendar/calendar_view',$datos);\n }", "public function calendar()\n {\n return view('calendar');\n }", "public function calendarIndex()\n {\n return view('calendar');\n }", "public function actionCalendar()\n {\n // Get current ID of logined user\n $userId = Yii::$app->user->getId() ?: '1000';\n $profile = (new UsersProfile())->getProfile();\n\n // Fill array keyes with [1, .., date(\"t\")].\n // date(\"t\") - count of days in current month\n $calendar = array_fill_keys(range(1, date(\"t\")), []);\n $model = new TaskQuery(Task::class);\n\n foreach ($model->getByCurrentMonth($userId)->all() as $task) {\n // Get current $task->date and create new DateTime object\n // $date->format(\"j\") -- Day of the month: 1, 2, .., 31\n // Fill array $calender with $task objects\n $date = \\DateTime::createFromFormat(\"Y-m-d H:i:s\", $task->deadline);\n $calendar[$date->format(\"j\")][] = $task;\n }\n\n return $this->render('calendar', \\compact('calendar', 'profile'));\n }", "public function calendar()\n {\n $this->template->set('global_setting', $this->global_setting);\n $this->template->set('page', 'calendar');\n $this->template->set_theme('default_theme');\n $this->template->set_layout('frontend')\n ->title($this->global_setting['site_title'] . ' | Calendar')\n ->set_partial('header', 'partials/header')\n ->set_partial('footer', 'partials/footer');\n $this->template->build('frontpages/calendar');\n }", "public function index()\n {\n $title = translate('📆');\n return view('backend.'.Auth::user()->role.'.event_calendar.index', compact('title'));\n }", "public function index()\n {\n //$calendar_events = CalendarEvent::all(); //Too Many?\n $calendar_events = CalendarEvent::where('user_id', '!=', '1')->whereBetween(\n 'start', [Carbon::today(), Carbon::today()->addMonths(3)])->get();\n $today = Carbon::today()->toDateString();\n $calendar_events_sorted = CalendarEvent::whereDate('start', '=', $today)\n ->get()->sortby('start');\n\n $calendar = $this->prepCalendar($calendar_events);\n\n $admins = Admin::all()->pluck('name', 'id');\n\n \\JavaScript::put(['admin' => Auth::guard('admin')->check()]);\n\n return view('calendar_events.index', compact('calendar_events', 'calendar_events_sorted', 'calendar', 'admins'));\n }", "public function index()\n {\n return view('calendar.calendar');\n }", "function academic_calendar(){\n $data['content_page']='admin/academic_calendar';\n $this->load->view('common/base_template',$data);\n }", "public function index()\n {\n $id = Auth::user()->id;\n $events = [];\n $data = Event::where(['user_id'=>$id])->get();\n if($data->count()) {\n foreach ($data as $key => $value) {\n $events[] = Calendar::event(\n $value->title,\n true,\n new \\DateTime($value->start_date),\n new \\DateTime($value->end_date.' +1 day'),\n null,\n // Add color and link on event\n [\n 'color' => '#3490dc',\n 'url' => '/update/' . $value->id,\n ]\n );\n }\n }\n $calendar = Calendar::addEvents($events);\n return view('home', compact('calendar'));\n }", "public function index()\n {\n $events = [];\n $data = Event::all();\n if($data->count()) {\n foreach ($data as $key => $value) {\n $events[] = Calendar::event(\n $value->title,\n true,\n new \\DateTime($value->start_date),\n new \\DateTime($value->end_date.' +1 day'),\n null,\n // Add color and link on event\n [\n 'color' => '#0fc',\n 'url' => 'pass here url and any route',\n ]\n );\n }\n }\n $calendar = Calendar::addEvents($events);\n return view('calender.calender', compact('calendar')); \n }", "public function index()\n {\n\n return view('webapp-layouts.calendar.agenda');\n }", "public function ownerCombinedCal()\n {\n // Restricted access\n if ( ! $this->ownerLoggedIn() )\n {\n $this->restricted();\n return;\n }\n\n require_once('views/OwnerCombinedCalView.class.php');\n $site = new SiteContainer($this->db);\n $page = new OwnerCombinedCalView();\n \n $site->printHeader();\n $site->printNav(\"owner\");\n $site->printCombinedCalFooter();\n $page->printHtml();\n $page->printCalendar(); \n\n }", "public function getCalendarPage();", "public function calendario()\n {\n $alerts = Alerts::with('user')->get();\n return view('alertas.calendario', compact('alerts'));\n }", "function DisplayCalendarOfEvents()\r\n\t{\r\n\t\tglobal $_SETTINGS;\r\n\t\techo \"<div id='calendar'></div>\";\t\r\n\t}", "public function index()\n\t{\n\t\t// Fetch calendars\n\t\t$calendars = $this->calendars->getAllCalendars();\n\n\t\t// Output\n\t\t$this->display($this->load->view('calendar/list', ['calendars' => $calendars], TRUE));\n\t}", "public function index()\n {\n return view('Shift::calendar.index');\n }", "function index()\n\t{\n\n\t\t// Load Library Calendar\n\t\t$this->load->library('calendar');\n\n\t\t$data[\"varkal\"] = $this->calendar->generate();\n\t\t$data[\"judul\"] = \"Kalender Dengan Library Calendar\";\n\n\t\t$this->load->view(\"kalender/calendar_view\", $data);\n\t}", "public function index()\n {\n $today = Carbon::now()->format('Y-m-d').'%';\n $auth_man=1;\n $list=CalendarModel::with('patient')->where('start', 'like', $today)->where('user_id',auth()->id())\n ->where('status','active')->orderBy('id','desc')->get();\n $all = CalendarModel::all();\n return view('calendar.index',compact('list','auth_man','all'));\n }", "public function index()\n {\n (new Calendar())->getOutDays();\n $user = Auth::user();\n $year = $_GET['year'] ?? Carbon::now()->year;\n $data = array(\n \"hours\" => array(1, 2, 3, 4, 5, 6),\n \"date\" => Carbon::now('Europe/Paris'),\n \"categories\" => Category::all(),\n \"calendar\" => (new Calendar())->show(),\n \"navi\" => (new Calendar())->navigation(),\n \"counts\" => array(\n 'f' => Helpers::getCounter('f', $year, $user),\n 'cp' => Helpers::getCounter('cp', $year, $user),\n 'r' => Helpers::getCounter('r', $year, $user),\n 'am' => Helpers::getCounter('am', $year, $user),\n 'cs' => Helpers::getCounter('cs', $year, $user),\n 'a' => Helpers::getCounter('a', $year, $user),\n ),\n \"days\" => Helpers::getNumberRange(1, 31),\n \"months\" => Helpers::getNumberRange(1, 12),\n \"years\" => Helpers::getNumberRange(2015, 2030),\n );\n\n return view('pages.wcalendar.index', compact('data'));\n }", "public function index()\n {\n $users = User::count();\n\n $widget = [\n 'users' => $users\n ];\n\n $schedules = $this->CalendarController->fetchSchedules();\n \n return view('home', compact('widget','schedules'));\n }", "public function viewCreateFromCalendar(){\r\n\r\n\r\n\t\tif(isset($_POST['startDate']) && isset($_POST['startTime']) && isset($_POST['endDate']) && isset($_POST['endTime']) ){\r\n\t\t\t$data['start_date'] = $_POST['startDate'];\r\n\t\t\t$data['start_time'] = $_POST['startTime'];\r\n\t\t\t$data['end_date'] = $_POST['endDate'];\r\n\t\t\t$data['end_time'] = $_POST['endTime'];\r\n\t\t\t$result = $this->load->view('vEventForCalendar',$data,TRUE);\r\n\t\t\t//$this->viewCreateEvent();\r\n\t\t\techo $result;\r\n\t\t}\r\n\r\n\r\n\r\n\t}", "public function index()\n {\n return view('calendario_main');\n }", "function displayCalendar(){\r\n $conn= databaseConnection();\r\n\r\n $dia = date (\"d\"); $mes = date (\"n\"); $ano = date (\"Y\");\r\n if($dia[0]=='0') $dia=substr($dia, -1);\r\n\r\n if (isset($_POST[\"userid\"])){\r\n $userid= ($_POST[\"userid\"]);\r\n } \r\n\r\n //(YYYY-MM-DD)\r\n if (isset($_POST[\"date\"])){\r\n //$dia = substr(($_GET[\"date\"]),8,2);\r\n $dia = \"01\";\r\n $mes = substr(($_POST[\"date\"]),5,2);\r\n $ano = substr(($_POST[\"date\"]),0,4);\r\n } \r\n\r\n //include the WeeklyCalClass and create the object !!\r\n include (\"StaffCalendar.php\");\r\n $calendar = new StaffCalendarClass ($userid, $dia, $mes, $ano);\r\n echo $calendar->showCalendar ();\r\n\r\n mysqli_close($conn);\r\n }", "public function index() {\n\t\t$employees = Employee::all();\n\t\t$descriptionSigns = DescriptionSign::all();\n\t\t$month = date('m');\n\t\t$year = date('Y');\n\t\tforeach ($employees as $key => $value) {\n\t\t\t$calendar = Calendar::where('employee_id', '=', $value->id)->where('month',$month)->where('year',$year)->first();\n\t\t\tif($calendar == null)\n\t\t\t{\n\t\t\t\t$calendar = $this->bornCalendarEmpty($value->id,$month,$year);\n\t\t\t}\n\t\t\t$this->generatePresenteWhenInitNewDate($calendar, $month, $year);\n\t\t\t$employees[$key]->calendar = $calendar;\n\t\t}\n\n\t\t$func = function($emp) {\n\t\t return $emp->year;\n\t\t};\n\t\t// Year is stored in database calendar.\n\t\t$years = collect(Calendar::all())->map($func);\n\t\t$years = array_unique($years->toArray());\n\n\t\treturn view('calendar.calendar', compact('employees','month','year','years','descriptionSigns'));\n\t}" ]
[ "0.767319", "0.74256873", "0.7383843", "0.7354142", "0.7311155", "0.72852856", "0.72561646", "0.7242718", "0.71803486", "0.7152835", "0.71456623", "0.7111431", "0.7097638", "0.70280796", "0.70278424", "0.7003563", "0.6972465", "0.69253826", "0.68868345", "0.687292", "0.68528724", "0.68315357", "0.6816005", "0.6775809", "0.6751115", "0.6746521", "0.67342144", "0.67240554", "0.6612591", "0.66068697" ]
0.74838424
1
Set the "iid" parameter for the current command
public function setIid($iid) { return $this->set('pio_iid', $iid); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setId_ubi($iid_ubi)\n {\n $this->iid_ubi = $iid_ubi;\n }", "function setId_ubi($iid_ubi)\n {\n $this->iid_ubi = $iid_ubi;\n }", "function setId_ubi($iid_ubi = '')\n {\n $this->iid_ubi = $iid_ubi;\n }", "function setId_item($iid_item)\n {\n $this->iid_item = $iid_item;\n }", "function setId_item($iid_item)\n {\n $this->iid_item = $iid_item;\n }", "function setId_item($iid_item = '')\n {\n $this->iid_item = $iid_item;\n }", "function setId_asignatura($iid_asignatura = '')\n {\n $this->iid_asignatura = $iid_asignatura;\n }", "function setId_asignatura($iid_asignatura)\n {\n $this->iid_asignatura = $iid_asignatura;\n }", "public function __construct( $iid ) {\n\t\t$this->init($iid);\n\t}", "function setId_activ($iid_activ = '')\n {\n $this->iid_activ = $iid_activ;\n }", "function setId_situacion($iid_situacion = '')\n {\n $this->iid_situacion = $iid_situacion;\n }", "function setId_activ($iid_activ)\n {\n $this->iid_activ = $iid_activ;\n }", "public function setIDfromArgV() {}", "function setId_nom($iid_nom)\n {\n $this->iid_nom = $iid_nom;\n }", "function setId_nom($iid_nom)\n {\n $this->iid_nom = $iid_nom;\n }", "function setId_situacion($iid_situacion)\n {\n $this->iid_situacion = $iid_situacion;\n }", "function setId_nivel($iid_nivel = '')\n {\n $this->iid_nivel = $iid_nivel;\n }", "function setId_serie($iid_serie)\n {\n $this->iid_serie = $iid_serie;\n }", "function setId_nivel($iid_nivel)\n {\n $this->iid_nivel = $iid_nivel;\n }", "function setId_dl($iid_dl = '')\n {\n $this->iid_dl = $iid_dl;\n }", "function setId_nom_new($iid_nom_new = '')\n {\n $this->iid_nom_new = $iid_nom_new;\n }", "function setId_region($iid_region = '')\n {\n $this->iid_region = $iid_region;\n }", "function setId_preceptor($iid_preceptor = '')\n {\n $this->iid_preceptor = $iid_preceptor;\n }", "function setId_preceptor($iid_preceptor = '')\n {\n $this->iid_preceptor = $iid_preceptor;\n }", "function setId_situacion($iid_situacion = '')\n {\n $this->iid_situacion = (int)$iid_situacion;\n }", "public function setIdif($value)\n {\n $this->setParam('idif', $value);\n }", "public function setEtatCmdIdAttribute($input)\n {\n $this->attributes['etat_cmd_id'] = $input ? $input : null;\n }", "function setAmocrmIntegreationId(string $id): void {\n\t}", "public function setIdVit($id){\n\t\t$this->id = $id;\n\t}", "public function setID($iD = null)\n {\n // validation for constraint: string\n if (!is_null($iD) && !is_string($iD)) {\n throw new \\InvalidArgumentException(sprintf('Invalid value, please provide a string, \"%s\" given', gettype($iD)), __LINE__);\n }\n if (is_null($iD) || (is_array($iD) && empty($iD))) {\n unset($this->ID);\n } else {\n $this->ID = $iD;\n }\n return $this;\n }" ]
[ "0.68654287", "0.68654287", "0.6860936", "0.6767778", "0.6767778", "0.67226034", "0.65090114", "0.63108695", "0.62251186", "0.6211543", "0.6206826", "0.6198715", "0.61696315", "0.61487794", "0.61487794", "0.61411536", "0.6100642", "0.60032284", "0.5945139", "0.5840505", "0.57852787", "0.5723957", "0.5721381", "0.5721381", "0.5697482", "0.5673136", "0.54845876", "0.5384184", "0.5365046", "0.53486466" ]
0.72621
0
get messages by customer_id
static public function getMessagesByCustomerId($rest) { $data = array(); $h = $rest->getHierarchy(); $vars = $rest->getRequestVars(); $errors = Validation::required(array("customer_id"), $vars); // do we have any errors if (count($errors)) { echo json_encode(array( "success" => false, "error" => "Missing the following fields: ".implode($errors, ", ") )); } else { // create the contact $messages = Message::getMessageByCustomerId($vars['customer_id']); $res = array( "success" => true, "messages" => $messages ); echo json_encode($res); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCustomer($customer_id);", "public function get_customer_byid($customer_id = \"\"){\r\n $query = $this->db->get_where('view_customer_info', array('customer_id' => $customer_id));\r\n return $query->row_array();\r\n }", "function get_customer($customer_id)\n {\n return $this->db->get_where('customer',array('customer_id'=>$customer_id))->row_array();\n }", "public function customer_get($customerId){\t\t\t\t\t\t\t\t\n\t\t$params = array('customerId' => $customerId);\t\t\n\t\ttry {\n\t\t\t$flow = $this->send('customer/get', $params, 'GET');\t \t\t\t\n\t\t\treturn $flow;\n\t\t} catch (Exception $e) { return $e->getCode().\" - \".$e->getMessage(); }\n\t}", "public function getCustomerBy_ID($customer_id) { /* this fun is used to get customer deatails */\n\n $sqlselect = \"SELECT * FROM customer_details WHERE cust_id = '$customer_id'\";\n\n $result = $this->db->query($sqlselect);\n\n if ($result->num_rows() <= 0) {\n $response = array(\n 'status' => 0,\n 'status_message' => 'No Records Found.');\n } else {\n $response = $result->result_array();\n }\n return $response;\n }", "function getCustomerById_customer($id_customer)\n {\n\n\n\n $query = \"SELECT * FROM `customer` WHERE id_customer = '$id_customer'\";\n $hasil = $this->db->query($query);\n\n return $hasil;\n }", "public function messages_by_user_get() {\n\t\t$uid = $this->input->get('uid');\n\t\t$skip = $this->input->get('skip');\n\t\t$limit = $this->input->get('limit');\n\n\t\t$messages = $this->Messages_model->getMessagesByUserID($uid, $skip, $limit);\n\t\t\n\t\tforeach($messages as $key=>$value) {\n\t\t\t$id = $messages[$key]['_id']->{'$id'};\n\t\t\t$messages[$key]['_id'] = $id;\n\t\t}\n\t\t\n\t\t$this->response($messages);\n\t}", "public function getCustomerByIdCustomer($id){\n $dbResult = $this->db->query(\"SELECT * FROM customer WHERE id_customer = ?\", array($id));\n return $dbResult->getResult();\n }", "public static function byCustomer($customer_id)\n {\n $payload = [\n 'subscription' => [\n 'subscriptionid' => $customer_id,\n ],\n ];\n\n return static::all($payload);\n }", "public function read($customerId);", "public static function get_customer( $id=0 ) {\r\n\t\tglobal $wpdb;\r\n\r\n\t\treturn $wpdb->get_row( $wpdb->prepare( \"SELECT * FROM {$wpdb->prefix}customers WHERE id = %d\", $id ) );\r\n\t}", "public function getOrdersForCustomer($customerId);", "public function GetCustomer($customer_id) {\n\n //set up the query\n $this->sql = \"SELECT *\n FROM customers\n WHERE customerID = :customer_id\";\n \n //execute the query\n $this->RunAdvancedQuery([\n ':customer_id' => $customer_id,\n ]);\n }", "function getNoteDetailsByCustomer($customer_id)\n {\n $stmt = \"SELECT\n cno_id,\n cno_prj_id,\n cno_customer_id,\n cno_note\n FROM\n \" . APP_DEFAULT_DB . \".\" . APP_TABLE_PREFIX . \"customer_note\n WHERE\n cno_customer_id = '\" . Misc::escapeString($customer_id) . \"'\";\n $res = DB_Helper::getInstance()->getRow($stmt, DB_FETCHMODE_ASSOC);\n if (PEAR::isError($res)) {\n Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);\n return array();\n } else {\n return $res;\n }\n }", "public function getRecentCustomers($id);", "public function getCustomerById($customer_id)\n {\n $client = $this->httpClientFactory->create();\n $client->setUri($this->chronos_url.\"customers/$customer_id/detail/\");\n $client->setMethod(\\Zend_Http_Client::GET);\n $client->setHeaders([\n 'Content-Type: application/json', \n 'Accept: application/json',\n \"Authorization: Token $this->token\"\n ]);\n try {\n $response = $client->request();\n $body = $response->getBody();\n $string = json_decode(json_encode($body),true);\n $customer_data=json_decode($string);\n \n return $customer_data;\n } catch (\\Zend_Http_Client_Exception $e) {\n $this->logger->addInfo('Chronos customer save helper', [\"Get customer error\"=>$e->getMessage()]);\n return false;\n }\n }", "public function get_customer($id = null) {\n $this->db->select('*');\n if ($id != NULL) {\n $this->db->where('customer_id_pri', $id);\n }\n $this->db->order_by('customer_id_pri');\n return $this->db->get('customer');\n }", "public function loadByCustomer(Mage_Customer_Model_Customer $customer)\n {\n $select = $this->_read->select()\n ->from($this->getMainTable())\n ->where('customer_id=:customer_id')\n ->where('store_id=:store_id');\n\n $storeId = Mage::app()->getStore()->getId();\n if ($storeId == Mage_Core_Model_App::ADMIN_STORE_ID) {\n $storeId = $customer->getStoreId();\n }\n\n $result = $this->_read->fetchRow($select, array(\n 'customer_id' => $customer->getId(),\n 'store_id' => $storeId,\n ));\n\n if ($result) {\n $result = $this->_processResult($result);\n return $result;\n }\n\n $select = $this->_read->select()\n ->from($this->getMainTable())\n ->where('subscriber_email=:subscriber_email')\n ->where('store_id=:store_id');\n\n $result = $this->_read->fetchRow($select, array(\n 'subscriber_email' => $customer->getEmail(),\n 'store_id' => $storeId\n ));\n\n if ($result) {\n $result = $this->_processResult($result);\n return $result;\n }\n\n return array();\n }", "public static function getContacts($customerid){\n\t\t$dq = Doctrine_Query::create ()\n ->select ( 'c.contact_id, c.contact, ct.name as type' )\n ->from ( 'Contacts c' )\n ->leftJoin ( 'c.ContactsTypes ct ON ct.type_id = c.type_id' )\n ->where('c.customer_id = ' . $customerid);\n \n\t return $dq->execute ( array (), Doctrine_Core::HYDRATE_ARRAY );\n\t}", "public function getMessagesFor($id)\n {\n Receiver::where('message_id', $id)->where('recipient_id', Auth::user()->id)->update(['is_seen' => true]);\n\n // get all messages between the authenticated user and the selected user\n $messages = Message_Thread::where(function($q) use ($id) {\n $q->where('message_id', $id);\n })->get();\n for($i = 0; $i < count($messages); $i++){\n $name = User::select('firstName','middleName', 'lastName')->where('id', '=', $messages[$i]['from_id'])->first();\n $messages[$i]['name'] = $name->full_name;\n }\n return response()->json($messages);\n }", "function getCcInfoByCustId($customerid) {\n $query = \"SELECT * FROM `creditcards` WHERE CustomerId='\".$customerid.\"'\";\n $result = Database::selectQuery($query);\n if($result == null) {\n return null;\n } else {\n return $result[0];\n }\n }", "public function get_message_by_id($id)\n\t{\n\t\t$query = $this->db->get_where('message', array('message_id' => $id));\n\t\treturn $query;\n\t}", "public function messages_for_user_get() {\n\t\t$uid = $this->input->get('uid');\n\t\t$skip = $this->input->get('skip');\n\t\t$limit = $this->input->get('limit');\n\n\t\t$messages = $this->Messages_model->getMessagesByFromUserID($uid, $skip, $limit);\n\n\n\t\tforeach($messages as $key=>$value) {\n\t\t\t$id = $messages[$key]['_id']->{'$id'};\n\t\t\t$messages[$key]['_id'] = $id;\n\t\t}\n\t\t\n\t\t$this->response($messages);\n\t}", "public function getCustomer($id)\n {\n return $this->_client->makeCall(\"get\", [['record' => $id]]);\n }", "public function get($ID){\n\t\tsql('DELETE FROM messages WHERE from_status=\"0\" AND to_status=\"0\"');\n\t\tsql('DELETE FROM messages WHERE fromID = \"\" or toID = \"\"');\n\t\t\n\t\t$ID = ($ID) ? $ID : $_SESSION['user'] ;\n\t\t\n\t\t$messages = sql('SELECT ' . $this->select . '\n\t\t\t\t\t\t\t\t \t\t FROM ' . $this->from . '\n\t\t\t\t\t\t\t\t \t\t WHERE a.toID LIKE \"%'.$_SESSION['user'].'%\"\n\t\t\t\t\t\t\t\t \t\t AND a.to_status!=\"0\"\n\t\t\t\t\t\t\t\t \t\t AND a.fromID = b.code\n\t\t\t\t\t\t\t\t \t\t ORDER BY a.date DESC '.$this->limit );\n\t\t\n\t\treturn $messages;\n\t\t\n\t}", "public function getCustomerByUserId($customer_id) {\n $registry = new Registry();\n // Database\n $db = new DB(DB_DRIVER, DB_HOSTNAME, DB_USERNAME, DB_PASSWORD, DB_DATABASE);\n $registry->set('db', $db);\n\n $query = $db->query(\"SELECT * FROM \" . DB_PREFIX . \"customer WHERE user_id = '\" . $customer_id . \"'\");\n\n return $query->row;\n }", "public function customer_by_id($id)\n {\n return $this->customers->customer_by_id($id);\n }", "abstract public function getCustomer($ID);", "public function getUserCustomerById($id) {\r\n\r\n $result = $this->db->select(USERS . '.*, ' . CUSTOMERS . '.group')//,'. CUSTOMERS_BY_PROVIDER . '.since')\r\n ->from(USERS, CUSTOMERS) //, CUSTOMERS_BY_PROVIDER)\r\n ->join(CUSTOMERS, USERS . '.id = ' . CUSTOMERS . '.id', 'LEFT')\r\n ->where(USERS . '.id', $id)\r\n ->limit(1)\r\n ->get()\r\n ->row();\r\n return $result;\r\n }", "public function retrieveChatCustomer($bot_id, $customer_id)\n {\n $identifier = [\n 'bot_id' => $bot_id,\n 'account_id' => $customer_id,\n ];\n $client = LeadClient::where($identifier)->first();\n\n if (is_null($client)) {\n $userData = $this->messagingTool->getUserInfo($customer_id);\n\n // Create new client.\n $client = LeadClient::create(array_merge(\n $identifier,\n [\n 'first_name' => $userData['first_name'],\n 'last_name' => $userData['last_name'],\n 'profile_pic' => $userData['profile_pic'] ?? '',\n ]\n ));\n }\n\n return $client;\n }" ]
[ "0.7138294", "0.6650438", "0.64562356", "0.6380742", "0.63308996", "0.62943935", "0.6182489", "0.6180501", "0.6141007", "0.61152154", "0.61106724", "0.6098833", "0.6061245", "0.60532624", "0.60470766", "0.60314983", "0.5998347", "0.5983128", "0.5935894", "0.59161615", "0.5890723", "0.5871195", "0.58582306", "0.5850049", "0.58479226", "0.5838078", "0.58328086", "0.583088", "0.58218586", "0.58121574" ]
0.71544516
0
get messages by contact id
static public function getMessagesByContactId($rest) { $data = array(); $h = $rest->getHierarchy(); $vars = $rest->getRequestVars(); $errors = Validation::required(array("contact_id"), $vars); // do we have any errors if (count($errors)) { echo json_encode(array( "success" => false, "error" => "Missing the following fields: ".implode($errors, ", ") )); } else { // create the contact $messages = Message::getMessageByContactId($vars['contact_id']); $res = array( "success" => true, "messages" => $messages ); echo json_encode($res); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMessagesFor($id)\n {\n Receiver::where('message_id', $id)->where('recipient_id', Auth::user()->id)->update(['is_seen' => true]);\n\n // get all messages between the authenticated user and the selected user\n $messages = Message_Thread::where(function($q) use ($id) {\n $q->where('message_id', $id);\n })->get();\n for($i = 0; $i < count($messages); $i++){\n $name = User::select('firstName','middleName', 'lastName')->where('id', '=', $messages[$i]['from_id'])->first();\n $messages[$i]['name'] = $name->full_name;\n }\n return response()->json($messages);\n }", "static public function getMessagesByCustomerId($rest) {\n\n $data = array();\n \n $h = $rest->getHierarchy(); \n $vars = $rest->getRequestVars();\n \n $errors = Validation::required(array(\"customer_id\"), $vars);\n\n // do we have any errors\n if (count($errors)) {\n\n echo json_encode(array(\n \"success\" => false,\n \"error\" => \"Missing the following fields: \".implode($errors, \", \")\n ));\n\n }\n\n else {\n\n // create the contact\n $messages = Message::getMessageByCustomerId($vars['customer_id']);\n\n $res = array(\n \"success\" => true,\n \"messages\" => $messages\n );\n\n echo json_encode($res);\n\n }\n\n }", "public function get_message_by_id($id)\n\t{\n\t\t$query = $this->db->get_where('message', array('message_id' => $id));\n\t\treturn $query;\n\t}", "function getContact($id) {\n\t\t$query = $this->createQuery();\n\t\t$query .= \"WHERE c2.id = $id\";\n\t\t$res = $this->database->getRow($query);\n\t\t\n\t\t// modify status\n\t\t$res[\"status\"] = $this->statusCaption($res[\"status\"]);\n\t\t\n\t\treturn $res;\n\t}", "public function messages(){\n $messages = Contact::orderBy('id', 'desc')\n ->limit(3)\n ->get();\n return $messages;\n }", "private function getContact($id)\n {\n// $result = $this->userModel->find($id);\n// if (!$result) {\n// $responseObj->errorResponse([\"Record not found\"], 404);\n// }\n// $responseObj->successResponse([\"Success\"], 200, $result);\n }", "public function get($ID){\n\t\tsql('DELETE FROM messages WHERE from_status=\"0\" AND to_status=\"0\"');\n\t\tsql('DELETE FROM messages WHERE fromID = \"\" or toID = \"\"');\n\t\t\n\t\t$ID = ($ID) ? $ID : $_SESSION['user'] ;\n\t\t\n\t\t$messages = sql('SELECT ' . $this->select . '\n\t\t\t\t\t\t\t\t \t\t FROM ' . $this->from . '\n\t\t\t\t\t\t\t\t \t\t WHERE a.toID LIKE \"%'.$_SESSION['user'].'%\"\n\t\t\t\t\t\t\t\t \t\t AND a.to_status!=\"0\"\n\t\t\t\t\t\t\t\t \t\t AND a.fromID = b.code\n\t\t\t\t\t\t\t\t \t\t ORDER BY a.date DESC '.$this->limit );\n\t\t\n\t\treturn $messages;\n\t\t\n\t}", "public function getById($id)\n\t{\n\t\treturn Message::findOne(\"user_id=? AND id=?\", [$this->user_id, $id]);\n\t}", "public function buscarMensaje($mensaje_id)\n\t{\n\t\treturn Contacto::find($mensaje_id);\n\t}", "public function getContacts($id) {\n\n $contacts = DB::table('contacts')\n ->select('contacts.*', 'social_contacts.*')\n ->join('social_contacts','contacts.id','=','social_contacts.id')\n ->where('social_contacts.id', '=', $id)\n ->first();\n\n return $contacts;\n }", "public function index($id)\n {\n $messages = Message::where([\n ['user_id', Auth::id()],\n ['reciever_id', $id]\n ])\n ->orWhere([\n ['user_id', $id],\n ['reciever_id', Auth::id()] \n ])\n ->with('user')\n ->get();\n\n return request()->ajax() ? $messages : view('chat');\n }", "public function fetchMessages($id)\n {\n $data = MessageThreadMessages::where('message_thread_id', $id)\n ->get();\n\n return response()->json($data);\n }", "public function pick_msg_by_id($id){\n\n\t\t(int)$id;\n\t\t$return_pick_msg = array();\n\n\t\t\t$sql = $this->query(\"SELECT * FROM `messege` WHERE `id` = $id\");\n\n\t\t\t\twhile ($pick_msg = mysql_fetch_array($sql)) {\n\t\t\t\t\t# code...\n\n\t\t\t\t\t$return_pick_msg[] = $pick_msg;\n\t\t\t\t}\n\t\treturn $return_pick_msg;\n\t}", "public function index_get() {\n\t\t$uid = 15;\n\t\t$messages = $this->Messages_model->getMessagesByFromUserID($uid);\n\t\t$this->response($messages);\n\t}", "public function messages_by_user_get() {\n\t\t$uid = $this->input->get('uid');\n\t\t$skip = $this->input->get('skip');\n\t\t$limit = $this->input->get('limit');\n\n\t\t$messages = $this->Messages_model->getMessagesByUserID($uid, $skip, $limit);\n\t\t\n\t\tforeach($messages as $key=>$value) {\n\t\t\t$id = $messages[$key]['_id']->{'$id'};\n\t\t\t$messages[$key]['_id'] = $id;\n\t\t}\n\t\t\n\t\t$this->response($messages);\n\t}", "public function getMessages();", "public function getMessages();", "public function getMessages();", "public function getMessages();", "public function getMessages();", "public function getMessages();", "public function getMessages();", "public function listChatMessages(Request $request, $id)\n {\n $result = ChatMessage::chatMessagesPagination($request->input('limit'), $id); \n\n return response()->json($result);\n }", "public function IdContact($id) {\n $sql = \"SELECT * FROM contactos WHERE id= \".$id;\n try {\n $mysql= mysqli_query($GLOBALS[\"db_link\"],$sql);\n if($mysql->num_rows == 1){\n $usuario = $mysql->fetch_assoc();\n $resultado = array($usuario);\n }\n return $resultado;\n } catch(PDOException $e) {\n echo '{\"error\":{\"text\":'. $e->getMessage() .'}}';\n }\n }", "function get_mail($id)\n {\n return $this->db->get_where('mail',array('id'=>$id))->row_array();\n }", "public function getMessages()\n {\n //PEMBAHASAN MENGENAI EAGER LOADING BISA DI CARI DI DAENGWEB.ID\n return Message::with('user')->get();\n }", "public function findContactById($id)\n {\n return $this->getContacts()->findContactById($id);\n }", "function getInboxMessage() {\n $sql = \"SELECT * FROM `mail` WHERE receiver_id = ?\";\n return getAll($sql, [getLogin()['mid']]);\n}", "static public function ctrObtenerMensajePorId(){\n\n\t\t\tif(isset($_GET[\"id\"])){\n\n\t\t\t\t$tabla = \"mensajes\";\n\n\t\t\t\t$id = $_GET[\"id\"];\n\n\t\t\t\t$respuesta = ModeloMensajes::mdlObtenerMensajePorId($tabla, $id);\n\n\t\t\t\treturn $respuesta;\t\n\t\t\t\n\t\t\t}\n\n \t}", "public function contactById($id)\n {\n $contact = ContactModel::find($id);\n if(is_null($contact)){\n return response()->json(['message'=>'Liên hệ cần tìm không tồn tại!'], 404);\n }\n return response()->json($contact,200);\n //return response()->json(ProducerModel::find($id),200);\n }" ]
[ "0.7237493", "0.69647366", "0.69646186", "0.6845872", "0.67688006", "0.6650879", "0.6597531", "0.6565107", "0.6554185", "0.65397", "0.6507119", "0.6504515", "0.6472354", "0.6444423", "0.6437541", "0.64051396", "0.64051396", "0.64051396", "0.64051396", "0.64051396", "0.64051396", "0.64051396", "0.6402166", "0.6354363", "0.6351865", "0.6350733", "0.6332188", "0.6322838", "0.6306523", "0.6302411" ]
0.77144456
0
Test Request GET (orchestra)/users without auth
public function testGetUsersPageWithoutAuth() { $response = $this->call('orchestra::users@index'); $this->assertInstanceOf('Laravel\Redirect', $response); $this->assertEquals(302, $response->foundation->getStatusCode()); $this->assertEquals(handles('orchestra::login'), $response->foundation->headers->get('location')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetUser()\n {\n $headers = $this->authenticate();\n $response = $this->json('GET', '/api/user', [], $headers);\n $response->assertStatus(200);\n }", "public function testGetUser()\n {\n $response = $this->get('getuser');\n\n $response->assertStatus(200);\n }", "public function testUserApiReturnsUsers()\n {\n // @TODO - test the updated /users endpoint properly.\n return true;\n // $users = factory(User::class, 2)->create();\n\n // $this->json('GET', 'api/v1/users')\n // ->seeJsonStructure([\n // '*' => [\n // 'northstar_id', 'created_at', 'updated_at', 'role',\n // ]\n // ]);\n }", "public function testGetUserAll()\n {\n $response = $this->request()->json('GET','/api/users');\n $response->assertStatus(200);\n }", "public function testShowUser()\n {\n $this->withoutMiddleware();\n $response = $this->get('/api/users/1');\n $response->assertJsonStructure([\n \"meta\" => [\n \"message\",\n \"code\"\n ],\n \"data\" => [\n \"id\",\n \"employee_code\",\n \"name\",\n \"email\",\n \"team\",\n \"role\",\n \"total_borrowed\",\n \"total_donated\"\n ]\n \n ])->assertStatus(Response::HTTP_OK);\n }", "public function test_unauthorized_fetch()\n {\n $headers = [\n 'Authorization' => \"Bearer None\"\n ];\n\n $response = $this\n ->withHeaders($headers)\n ->json('GET', '/api/github-users', [\n 'logins' => [\n 'souinhua',\n 'taylorotwell',\n 'no_one_151asd@'\n ]\n ]);\n\n $response->assertStatus(Response::HTTP_UNAUTHORIZED);\n }", "public function testGetSingleUserPageWithoutAuth()\n\t{\n\t\t$response = $this->call('orchestra::users@view', array(1));\n\t\t\n\t\t$this->assertInstanceOf('Laravel\\Redirect', $response);\t\n\t\t$this->assertEquals(302, $response->foundation->getStatusCode());\n\t\t$this->assertEquals(handles('orchestra::login'), \n\t\t\t$response->foundation->headers->get('location'));\n\t}", "public function testSuccessWithNoUsersToList()\n {\n $response = $this->getJson($this->endpoint(), $this->authenticationHeaders())->assertStatus(200);\n\n // Check the basic api endpoint structure.\n $this->assertEndpointBaseStructure($response);\n }", "public function test_unauthorized_user_cannot_access_the_user_route()\n {\n $response = $this->getJson('/user');\n\n $response->assertStatus(401);\n }", "public function testShowUserWithoutAddresses()\n {\n $user = factory(User::class)->state('lecturer')->create();\n $response = $this->withHeaders([\n ])->getJson(\"/api/user/{$user->id}\", []);\n\n $response->assertStatus(200)\n ->assertJson([\"user\" => $user->toArray()]);\n }", "public function user_route_api()\n {\n $this->withoutExceptionHandling();\n $response = $this->get('/api/test-user');\n\n $response->assertStatus(200);\n }", "public function testGetUsersPage()\n\t{\n\t\t$this->be($this->user);\n\n\t\t$response = $this->call('orchestra::users@index');\n\t\t\n\t\t$this->assertInstanceOf('Laravel\\Response', $response);\t\n\t\t$this->assertEquals(200, $response->foundation->getStatusCode());\n\t\t$this->assertEquals('orchestra::users.index', $response->content->view);\n\t}", "public function testuserGet200()\n {\n $response = $this->runApp('GET', '//user/{id}');\n\n $this->assertEquals(200, $response->getStatusCode());\n $this->assertContains('Success', (string)$response->getBody());\n }", "function loadUsersDetail()\n {\n $this->get('/usuarios/5')\n ->assertStatus(200)\n ->assertSee('Mostrando detalle del usuario: 5');\n }", "public function testGetApiUser()\n {\n $token = $this->getAuthToken();\n /* @var TestResponse $response */\n $this->json(\n 'GET',\n '/api/user',\n [],\n [\n 'Content-Type: application/x-www-form-urlencoded',\n 'Cache-Control: no-cache',\n 'Authorization' => 'Bearer ' . $token . '',\n ],\n 'Get current user'\n ) ->assertStatus(200)\n ->assertJsonStructure(\n [\n 'data' => [\n 'id',\n 'email',\n 'profile',\n 'privacySettings',\n ],\n 'channel',\n ]\n );\n }", "public function testItReturnsUsers()\n {\n $this->user->update([\"firstname\" => \"anthony\"]);\n $user1 = factory(User::class)->create([\n \"firstname\" => \"james\",\n \"tenant_id\" => $this->user->tenant_id,\n ]);\n $tenant2 = factory(Tenant::class)->create();\n $user2 = factory(User::class)->create([\n \"firstname\" => \"benjamin\",\n \"tenant_id\" => $tenant2->id,\n ]);\n\n $this->actingAs($this->user)\n ->getJson(\"api/v1/users\")\n ->assertOk()\n ->assertJson([\n \"data\" => [\n $this->user->only([\"id\", \"firstname\"]),\n $user2->only([\"id\", \"firstname\"]),\n $user1->only([\"id\", \"firstname\"]),\n ],\n ]);\n }", "public function testListUsers()\n {\n echo \"\\nTesting user listing...\";\n //$url = TestServiceAsReadOnly::$elasticsearchHost . \"/CIL_RS/index.php/rest/users\";\n $url = TestServiceAsReadOnly::$elasticsearchHost .$this->context.\"/users\";\n \n $response = $this->curl_get($url);\n //echo \"-------Response:\".$response;\n $result = json_decode($response);\n $total = $result->total;\n \n $this->assertTrue(($total > 0));\n \n }", "public function generate_users_list()\n {\n $this->get('/usuarios')->assertStatus(200)->assertSee('Pedro');\n }", "public function testUserIndex()\n {\n $user = factory('App\\User')->create();\n\n $this->get('/api/v1/users');\n\n $username = json_decode($this->response->getContent(), true)[0][\"username\"];\n\n $this->assertEquals(\n $user[\"username\"], $username);\n }", "public function testUsersNoLogin()\n {\n $response = $this->get('/users');\n\n $response->assertStatus(302);\n }", "public function testIndex()\n {\n $response = $this->getJson(route('users.index'), $this->headers);\n\n $response->assertStatus(200);\n }", "public function testGetProfileUserNotExist()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/thor\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n //AppBundle:User object not found. (404 Not Found)\r\n $this->assertTrue($response->code === 404);\r\n\r\n }", "public function testUserApiReturnsResponse()\n {\n // @TODO - test the updated /users endpoint properly.\n return true;\n // $this->json('GET', 'api/v1/users')\n // ->assertResponseStatus('200');\n }", "public function testAccess() {\n\n $this->drupalGet('udb3/api/1.0/user');\n $this->assertResponse('403');\n\n }", "public function testUserWithoutAccesToResource()\n {\n $this->unlogged();\n $this->visit('/resource')\n ->seePageIs(route('auth.getLogin'))\n ->see('Login');\n }", "public function testListUsersSuccess()\n {\n $mock = new MockHandler([\n new Response(200, [], '{\"users\": \"user\"}'),\n ]);\n\n $handler = HandlerStack::create($mock);\n $this->app->instance(Client::class, new Client(['handler' => $handler]));\n\n //login\n $this->get('api/user/list-users', $this->headers)\n ->assertStatus(200)\n ->assertJson(['users' => 'user']);\n\n }", "public function testAdminUser()\n {\n //$user = Sentry::getUserProvider()->findByLogin('[email protected]');\n //$this->be($user);\n\n $response = $this->call('GET', 'admin/users');\n\n // Make sure we can't view the admin pages.\n $this->assertFalse($response->isNotFound());\n }", "function messageNoUsers()\n {\n $this->get('/usuarios?empty')\n ->assertStatus(200)\n ->assertSee('No hay usuarios registrados');\n }", "public function testUserIndex()\n {\n $response = $this->actingAs($this->user())->get(route('task_statuses.index'));\n $response->assertOk();\n }", "public function testIndex(){\n\t\t\n\t\t$this->mock->shouldReceive('all')->once();\n\n\t\t$this->call('GET', 'users'); //get: Method , user: url\n\n\t\t$this->assertResponseOk();\n\t}" ]
[ "0.73905694", "0.7291999", "0.7228858", "0.7228108", "0.69783807", "0.6955865", "0.6943423", "0.69301015", "0.68712085", "0.68689054", "0.6837579", "0.6836188", "0.67942494", "0.67812806", "0.67724943", "0.67131424", "0.6707258", "0.67035097", "0.6684727", "0.6673713", "0.6671661", "0.66683394", "0.6660784", "0.66412693", "0.664036", "0.66283244", "0.6607075", "0.65929675", "0.6587093", "0.6581188" ]
0.73100895
1
Test Request GET (orchestra)/users/view/1
public function testGetSingleUserPage() { $this->be($this->user); $response = $this->call('orchestra::users@view', array(1)); $this->assertInstanceOf('Laravel\Response', $response); $this->assertEquals(200, $response->foundation->getStatusCode()); $this->assertEquals('orchestra::users.edit', $response->content->view); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetUsersPage()\n\t{\n\t\t$this->be($this->user);\n\n\t\t$response = $this->call('orchestra::users@index');\n\t\t\n\t\t$this->assertInstanceOf('Laravel\\Response', $response);\t\n\t\t$this->assertEquals(200, $response->foundation->getStatusCode());\n\t\t$this->assertEquals('orchestra::users.index', $response->content->view);\n\t}", "function loadUsersDetail()\n {\n $this->get('/usuarios/5')\n ->assertStatus(200)\n ->assertSee('Mostrando detalle del usuario: 5');\n }", "public function testProfileView()\n {\n $this->loginReader();\n\n $response = $this->get('api/user/profile/1');\n\n $response->assertStatus(200);\n }", "public function testShowUser()\n {\n $this->withoutMiddleware();\n $response = $this->get('/api/users/1');\n $response->assertJsonStructure([\n \"meta\" => [\n \"message\",\n \"code\"\n ],\n \"data\" => [\n \"id\",\n \"employee_code\",\n \"name\",\n \"email\",\n \"team\",\n \"role\",\n \"total_borrowed\",\n \"total_donated\"\n ]\n \n ])->assertStatus(Response::HTTP_OK);\n }", "public function testGetUser()\n {\n $response = $this->get('getuser');\n\n $response->assertStatus(200);\n }", "public function testShowUser()\n {\n $user = User::find(1);\n $this->browse(function (Browser $browser) use ($user) {\n $browser->visit('/users/' . $user->id)\n ->assertSee($user->id)\n ->assertSee($user->full_name)\n ->assertSee($user->email);\n });\n }", "public function test_users_edit_authenticated_leader_shows_correct_view(){\n $this->signInLeader();\n $response = $this->get(route('users.edit', ['user'=> 5]));\n $response->assertStatus(200);\n $response->assertViewIs('views.users.edit');\n }", "public function testUserIndex()\n {\n $user = factory('App\\User')->create();\n\n $this->get('/api/v1/users');\n\n $username = json_decode($this->response->getContent(), true)[0][\"username\"];\n\n $this->assertEquals(\n $user[\"username\"], $username);\n }", "public function testRouteShowDetailUser()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs(1)\n ->visit('/users')\n ->click('.table tbody tr:nth-child(1) td:nth-child(7) a:nth-child(1)')\n ->assertPathIs('/users/1')\n ->assertSee('DETAIL USER')\n ->assertSee('User Information');\n });\n }", "public function test_index_returns_view()\n {\n $controller = new UsersController();\n $view = $controller->index();\n $this->assertEquals('admin.users.index', $view->getName());\n $this->assertArrayHasKey('users', $view->getData());\n }", "public function test_users_edit_authenticated_user_shows_correct_view(){\n $this->signInUser();\n $response = $this->get(route('users.edit', ['user'=> 5]));\n $response->assertStatus(200);\n $response->assertViewIs('views.users.edit');\n }", "public function testIndex()\n {\n $response = $this->getJson(route('users.index'), $this->headers);\n\n $response->assertStatus(200);\n }", "public function testUserIndex()\n {\n $response = $this->actingAs($this->user())->get(route('task_statuses.index'));\n $response->assertOk();\n }", "public function testSeeSingleUserTest()\n {\n $user = \\App\\User::firstOrFail();\n $response = $this->get('/users/'.$user->id);\n\n $response->assertStatus(200);\n $response->assertSeeText(config('app.name'));\n }", "public function test_can_view_profile_of_any_user()\n {\n // When i access his profile\n // Then i can see his name\n $user = create(User::class);\n\n $response = $this->get(\"/profiles/{$user->name}\");\n\n $response->assertStatus(200);\n $response->assertSeeText($user->name);\n }", "public function testIndex(){\n\t\t\n\t\t$this->mock->shouldReceive('all')->once();\n\n\t\t$this->call('GET', 'users'); //get: Method , user: url\n\n\t\t$this->assertResponseOk();\n\t}", "function loadUsersListPage()\n {\n $this->get('/usuarios')\n ->assertStatus(200)\n ->assertSee('Listado de usuarios')\n ->assertSee('Javier')\n ->assertSee('Francisco');\n }", "public function test_show_user_as_user()\n {\n $user = User::factory()->create();\n\n $response = $this->actingAs($user)\n ->get(route('api.users.show', [$user->id]));\n\n $response->assertStatus(200)\n ->assertJsonStructure([\n 'data' => [\n 'id',\n 'name',\n 'email',\n 'created_at',\n 'updated_at'\n ]\n ]);\n }", "public function test_users_create_authenticated_leader_shows_correct_view(){\n $this->signInLeader();\n $response = $this->get(route('users.create'));\n $response->assertStatus(200);\n $response->assertViewIs('views.users.create');\n }", "public function testuserGet200()\n {\n $response = $this->runApp('GET', '//user/{id}');\n\n $this->assertEquals(200, $response->getStatusCode());\n $this->assertContains('Success', (string)$response->getBody());\n }", "public function generate_users_list()\n {\n $this->get('/usuarios')->assertStatus(200)->assertSee('Pedro');\n }", "public function test_users_create_authenticated_user_shows_correct_view(){\n $this->signInUser();\n $response = $this->get(route('users.create'));\n $response->assertStatus(200);\n $response->assertViewIs('views.users.create');\n }", "public function testUserApiReturnsUsers()\n {\n // @TODO - test the updated /users endpoint properly.\n return true;\n // $users = factory(User::class, 2)->create();\n\n // $this->json('GET', 'api/v1/users')\n // ->seeJsonStructure([\n // '*' => [\n // 'northstar_id', 'created_at', 'updated_at', 'role',\n // ]\n // ]);\n }", "public function testIndexUser()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit(route('admin@getLogin'))\n ->type('email', '[email protected]')\n ->type('password', 'cowell@123')\n ->press('Login')\n ->visit(route('admin@user@user'))\n ->assertSee('FIRST NAME');\n });\n }", "public function user_route()\n {\n $response = $this->get('/');\n\n $response->assertStatus(200);\n }", "public function testGetUser()\n {\n $headers = $this->authenticate();\n $response = $this->json('GET', '/api/user', [], $headers);\n $response->assertStatus(200);\n }", "public function test_logged_in_user_show_info()\n {\n $user=User::factory()->create();\n //behavior as this created user\n $response=$this->actingAs($user)->get(route('auth.user'));\n\n $response->assertStatus(Response::HTTP_OK);\n }", "public function testGetUserAll()\n {\n $response = $this->request()->json('GET','/api/users');\n $response->assertStatus(200);\n }", "public function testListUsers()\n {\n echo \"\\nTesting user listing...\";\n //$url = TestServiceAsReadOnly::$elasticsearchHost . \"/CIL_RS/index.php/rest/users\";\n $url = TestServiceAsReadOnly::$elasticsearchHost .$this->context.\"/users\";\n \n $response = $this->curl_get($url);\n //echo \"-------Response:\".$response;\n $result = json_decode($response);\n $total = $result->total;\n \n $this->assertTrue(($total > 0));\n \n }", "public function viewAction()\n {\n $repo = $this->entityManager\n ->getRepository(Entity\\User::class);\n $id = $this->params()->fromRoute('id');\n $entity = $this->params()->fromRoute('entity', 'user');\n $user = $repo->getUser($id, $entity);\n return ['entity' => $user,'id' => $id ];\n }" ]
[ "0.7879806", "0.7369127", "0.7257651", "0.721911", "0.7211713", "0.7178979", "0.714752", "0.7143988", "0.71155167", "0.7100919", "0.7097062", "0.7065654", "0.7030911", "0.6973102", "0.69707596", "0.69518113", "0.690639", "0.6853581", "0.684652", "0.6835651", "0.6828917", "0.68155044", "0.68123806", "0.6777748", "0.6757582", "0.6739506", "0.67384684", "0.67349905", "0.6733948", "0.6724899" ]
0.7388909
1
/ Return the vertex of the given string. We check the VertexList as it was generated when words were inserted into the datastructure.
function findWord($String){ foreach($vertexList as $v){ if($v->word === $String) return $v; } return NULL; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function InsertIntoTrie($vertexPointer,$wordString){\n\t\t$edgeLocation = 0;\t\t\t\t\t\t\t//counter to find edge position\n\n\t\t/*\n\t\t\tCheck if the character is within the alphabet range, 0 - 25, if it is \n\t\t\ta character that is not an alphabet, it will be a bigger or smaller value;\n\t\t*/\n\t\tif(($wordString[0] - 97) < 0 || ($wordString[0] - 97 > 25) )\n\t\t\t$edgeLocation = 26;\n\t\telse\n\t\t\t$edgeLocation = ($wordString[0]-97);\n\n\t\t//return if the word if it has a character not in the alphabet.\n\t\tif($edgeLocation == 26)\n\t\t\treturn;\n\n\t\t/*\n\t\t\tIf the edge doesnt exist for that pointer, make it,\n\t\t\tassign it, and point to it\n\t\t*/\n\t\tif($vertexPointer->edges[$edgeLocation] == NULL){\n\t\t\t$vertexPointer->edges[$edgeLocation] = new Edge($wordString[0]);\n\t\t\t$vertexPointer->edgeP[] = $edgeLocation;\n\t\t\t$vertexPointer->edges[$edgeLocation]->child = new Vertex($vertexPointer . $wordString[0]);\n\t\t}\n\n\t\t/*\n\t\t\tIf it is the last character in the word then this is the end of the word,\n\t\t\tso set the flag as true and find the neighbors as well as put this vertex\n\t\t\tback into the vertexList for lter use with breadthFirstSearch\n\t\t*/\n\t\t$nextVertex = $vertexPointer->edges[$edgeLocation]->child;\n\n\t\tif(strlen($wordString) == 1){\n\t\t\tfindNeighbor($nextVertex,$root,$nextVertex->word,0);\n\t\t\t$vertexList[] = $nextVertex;\n\t\t\t$nextVertex->end = true;\n\t\t}//otherwise keep inserting into the trie\n\t\telse\n\t\t\tInsertIntoTrie($vertexPointer->edges[$edgeLocation]->child,substr($wordString,1,strlen($wordString)));\n\n\t}", "public function getEdgeSource(EdgeInterface $edge): VertexInterface;", "function findNeighbor($Vertex_forWho,$Vertex_finder,$word,$differenceCount){\n\t\t//since some words like car had r as the end but cars had the r and s as end\n\t\t//this function kept breaking, because this was my base case, but to save myself\n\t\t// a headache i split them up into word sized tries\n\n\t\t//if the end of the word is met, then if the difference is only 1 push it back\n\t\t//as an edge to both finder and for who.\n\n\t\tif($Vertexfind->end == true){\n\t\t\tif($differenceCount == 1){\n\t\t\t\t$Vertex_forWho->neighbors[] = $Vertex_finder;\n\t\t\t\t$Vertex_finder->neighbors[] = $Vertex_forWho;\n\t\t\t}\n\t\t}//if the word is still 1 character long, check its edges and find the neighbors for it\n\t\telse if(strlen($word) == 1){\n\t\t\tforeach($Vertex_finder->edgeP as $e){\n\t\t\t\tif($e->letter == $word[0])\n\t\t\t\t\tfindNeighbor($Vertex_forWho,$e->child,substr($word,1,strlen($word)),$differenceCount);\n\t\t\t\telse\n\t\t\t\t\tfindNeighbor($Vertex_forWho,$e->child,substr($word,1,strlen($word)),$differenceCount + 1);\n\t\t\t}\n\t\t}//for any wordzie bigger than 1, add all the neighbors\n\t\telse if(strlen($word) > 1){\n\t\t\tif($differenceCount > 1)\n\t\t\t\treturn;\n\t\t\telse if($differenceCount == 0){\n\t\t\t\tforeach($Vertex_finder->edgeP as $e){\n\t\t\t\t\tif($e->letter == $word[0])\n\t\t\t\t\t\tfindNeighbor($Vertex_forWho,$e->child,substr($word,1,strlen($word)), 0);\n\t\t\t\t\telse\n\t\t\t\t\t\tfindNeighbor($Vertex_forWho,$e->child,substr($word,1,strlen($word)), 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if($differenceCount == 1){\n\t\t\t\tforeach($Vertex_finder->edgeP as $e){\n\t\t\t\t\tif($e->letter == $word[0])\n\t\t\t\t\t\tfindNeighbor($Vertex_forWho,$e->child,substr($word,1,strlen($word)),$differenceCount);\n\t\t\t\t\telse\n\t\t\t\t\t\tfindNeighbor($Vertex_forWho,$e->child,substr($word,1,strlen($word)),$differenceCount + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function testVertexFormat()\n {\n $db = new Connection([\n 'host' => 'localhost',\n 'port' => 8182,\n 'graph' => 'graph',\n 'username' => $this->username,\n 'password' => $this->password,\n ]);\n $db->message->registerSerializer(static::$serializer, TRUE);\n $db->open();\n $result = $db->send(\"g.V(1)\");\n $vertex = [\n 0 => [\n \"id\" => 1,\n \"label\" => \"vertex\",\n \"properties\" => [\n \"name\" => [\n 0 => [\n \"id\" => 0,\n \"value\" => \"marko\",\n \"label\" => \"name\",\n ],\n ],\n \"age\" => [\n 0 => [\n \"id\" => 2,\n \"value\" => 29,\n \"label\" => \"age\",\n ],\n ],\n ],\n \"type\" => \"vertex\",\n ],\n ];\n $this->ksortTree($vertex);\n $this->ksortTree($result);\n $this->assertEquals($vertex, $result, \"vertex property wasn't as expected\");\n }", "protected function findVertex($type, $key)\n {\n return $this->context->getGraphContext()->findVertex($type, $key);\n }", "public function getEdgeTarget(EdgeInterface $edge): VertexInterface;", "abstract public function getVerticesStart();", "public function addCandidateToGraph(Candidate $candidate) : Vertex\n {\n $id = $candidate->getId();\n if ($this->graph->hasVertex($id)) {\n $vertex = $this->graph->getVertex($id);\n } else {\n $vertex = $this->graph->createVertex($id);\n $vertex->setAttribute(self::CANDIDATE_ATTRIBUTE_NAME, $candidate);\n }\n return $vertex;\n }", "function point_is_on_vertex($point)\n{\n $vertices = $this->vertices;\n\n foreach ($vertices as $vertex)\n {\n if ($point === $vertex)\n {\n return true;\n }\n }\n\n return false;\n}", "function find_min_vertex($v1,$vertices,$distance_table){\n $min = INF;\n $min_i = 0;\n\n foreach($vertices as $v2){\n $d = distance_lookup($v1,$v2,$distance_table);\n if($d < $min){\n $min = $d;\n $min_i = $v2;\n }\n }\n return array($min_i,$min);\n\n}", "public function testCanCreateVertexId()\n {\n $graph = new Graph();\n $vertex = $graph->createVertex(11);\n $this->assertInstanceOf('\\Fhaculty\\Graph\\Vertex', $vertex);\n $this->assertEquals(11, $vertex->getId());\n }", "public function getVertices()\n {\n $vertices = array();\n $map = $this->getDistanceMap();\n foreach ($this->vertex->getGraph()->getVertices()->getMap() as $vid => $vertex) {\n if (isset($map[$vid])) {\n $vertices[$vid] = $vertex;\n }\n }\n\n return new Vertices($vertices);\n }", "function dijkstra(Graph $graph, $startIndex) {\n // init spt bool array to mark visited vertices\n // init dist array to mark distance between vertices from start\n // init parent array to all -1\n // set start dist to 0\n // set traverse ptr to start index\n // while not all vertices are visited\n // put index into spt\n // get edges of index\n // loop through all edges of this index\n // if distance to reach this vertex is bigger than this index dist + current weight\n // set this vertex dist to this index dist + current weight\n // set parent of this vertex to index\n // advance to next edge\n // loop through all vertices\n // if stored dist is bigger than current vertex dist\n // set dist to new smaller dist\n // set index to the smaller dist\n $spt = array_fill(0, $graph->getVerticeCount(), False);\n $dist = array_fill(0, $graph->getVerticeCount(), PHP_INT_MAX);\n $parent = array_fill(0, $graph->getVerticeCount(), -1);\n\n $dist[$startIndex] = 0;\n $index = $startIndex;\n\n while (in_array(False, $spt)) {\n $spt[$index] = True;\n $curr = $graph->getEdges()[$index];\n while (!empty($curr)) {\n if ($dist[$curr->data] > $dist[$index] + $curr->weight) {\n $dist[$curr->data] = $dist[$index] + $curr->weight;\n $parent[$curr->data] = $index;\n }\n $curr = $curr->next;\n }\n $minDist = PHP_INT_MAX;\n for ($i=0; $i < $graph->getVerticeCount(); $i++) { \n if (!$spt[$i] && $minDist > $dist[$i]) {\n $minDist = $dist[$i];\n $index = $i;\n }\n }\n }\n return $parent;\n}", "public function addVertex($id) {\n\t\tif(!isset($this->inAdjacents[$id])) {\n\t\t\t$this->inAdjacents[$id] = array();\n\t\t}\n\t\t\n\t\tif(!isset($this->outAdjacents[$id])) {\n\t\t\t$this->outAdjacents[$id] = array();\n\t\t}\n\t}", "public function getVerticesEdge()\n {\n $ret = array();\n foreach ($this->edges as $edge) {\n if ($edge->hasVertexStart($this)) {\n $ret []= $edge->getVertexToFrom($this);\n } else {\n $ret []= $edge->getVertexFromTo($this);\n }\n }\n\n return new Vertices($ret);\n }", "abstract public function hasVertexStart(Vertex $startVertex);", "static function isGraph($str) {\n return ctype_graph($str);\n }", "public function getLineString()\n {\n // todo: if these dont exist throw runtimeexception\n $path = [];\n\n foreach($this->input('vertices') as $item) {\n list($lat, $lng) = explode(\",\", $item);\n $path[] = trim(\"{$lng} {$lat}\");\n }\n\n return implode(\",\", $path);\n }", "public static function fromString(string $string): static;", "public function getVerticesEdgeFrom()\n {\n $ret = array();\n foreach ($this->getEdgesIn() as $edge) {\n $ret []= $edge->getVertexFromTo($this);\n }\n\n return new Vertices($ret);\n }", "public function testCanCreateVertex()\n {\n $graph = new Graph();\n $vertex = $graph->createVertex();\n $this->assertInstanceOf('\\Fhaculty\\Graph\\Vertex', $vertex);\n }", "function breadthFirstSearch($startVertex){\n\t\t$startVertex->visited = true;\n\t\t$Q = new SplQueue();\n\t\t$Q->push($startVertex);\n\t\twhile(!$Q->empty()){\n\t\t\t$x = new Vertex();\n\t\t\t$x = $Q->front(); $Q->pop();\n\t\t\tforeach($x->neighbors as $VertexPtr){\n\t\t\t\tif($VertexPtr->visited == false){\n\t\t\t\t\t$VertexPtr->visited = trie;\n\t\t\t\t\t$VertexPtr->pred = $x;\n\t\t\t\t\t$Q->push($VertexPtr);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "static function segword($str) {\n\t\t$segObj = new Segmentation();\n\t\t$sc = $segObj->_getSegClient();\n $sc->SetLimits(0, 1, 1);\n\t\t$searchRes = $segObj->queryViaValidConnection($str, 'goods_id_dist');\n\t\tif( $searchRes == false ) {\n\t\t\treturn false;\n\t\t}\n\t\t//var_dump($searchRes['words']);\n\t\t//return array_keys( $searchRes['words'] );\n\t\tif (!empty($searchRes['words'])) {\n\t\t\treturn array_keys($searchRes['words']);\n\t\t}\n\t\telse {\n\t\t\treturn array();\n\t\t} \n\t}", "private function translate($string) {\n $vowels = \"a,e,i,o,u\";\n $arrVowels = explode(',', $vowels);\n\n //find consonants\n $consonants = \"b,c,d,f,g,h,j,k,l,m,n,p,q,r,s,t,v,w,x,y,z\";\n $arrCons = explode(',', $consonants);\n\n //find the first letter, second, third for clusters\n $first = substr($string, 0, 1);\n $second = substr($string, 1, 1);\n $third = substr($string, 2, 1);\n\n\n //check if first letter is a vowel\n foreach($arrVowels as $check){\n if($check == $first){\n //if first letter is a vowel, add \"ay\"\n $pigLatin = $string . \"ay\";\n return $pigLatin;\n }\n }\n\n //check if first letters are consonants\n $cluster = $first;\n foreach($arrCons as $value){\n if($second == $value ){\n $cluster .= $second;\n foreach($arrCons as $value){ \n if($third == $value){\n $cluster .= $third;\n }\n }\n } \n }\n $pigLatin = str_replace($cluster, '', $string) . $cluster . \"ay\";\n return $pigLatin;\n }", "abstract public function getVertexToFrom(Vertex $startVertex);", "public function lex(string $string): TokenStreamInterface;", "function fsgs_local_navigation_get_string($string) {\n $title = $string;\n $text = explode(',', $string, 2);\n if (count($text) == 2) {\n // Check the validity of the identifier part of the string.\n if (clean_param($text[0], PARAM_STRINGID) !== '') {\n // Treat this as atext language string.\n $title = get_string($text[0], $text[1]);\n }\n } \n return $title;\n}", "protected function createLineStringZ(): LineStringEntity\n {\n return $this->createLineString([\n new Point(2, 5),\n new Point(3, 6),\n new Point(12, 8),\n new Point(10, 10),\n new Point(13, 11),\n ]);\n }", "public function insertString($string, $index) {\n if ($string != null && strlen($string)) {\n $value = $string{0};\n $child = null;\n if (isset($this->children[$value])) {\n $child = $this->children[$value];\n }\n else {\n $child = new PrefixTreeNode();\n $this->children[$value] = $child;\n }\n\n $remainder = substr($string, 1);\n $child->indexes[] = $index;\n $child->insertString($remainder, $index);\n }\n }", "protected function createNodeLineString(): LineStringEntity\n {\n return $this->createLineString([\n new Point(0, 0),\n new Point(1, 0),\n new Point(0, 1),\n new Point(1, 1),\n new Point(0, 0),\n ]);\n }" ]
[ "0.6127832", "0.5182932", "0.50650734", "0.49142325", "0.48696193", "0.4787186", "0.47306758", "0.46597344", "0.46086466", "0.46070713", "0.4604379", "0.45610985", "0.45403656", "0.45290583", "0.4510492", "0.45053533", "0.44351512", "0.4429602", "0.44199654", "0.43603408", "0.43572843", "0.43550017", "0.43528074", "0.4320858", "0.43087655", "0.43045", "0.42908597", "0.42855713", "0.4282487", "0.42575312" ]
0.6587067
0
/Find neighbor of each word, specific to it's size to avoid checks about size
function findNeighbor($Vertex_forWho,$Vertex_finder,$word,$differenceCount){ //since some words like car had r as the end but cars had the r and s as end //this function kept breaking, because this was my base case, but to save myself // a headache i split them up into word sized tries //if the end of the word is met, then if the difference is only 1 push it back //as an edge to both finder and for who. if($Vertexfind->end == true){ if($differenceCount == 1){ $Vertex_forWho->neighbors[] = $Vertex_finder; $Vertex_finder->neighbors[] = $Vertex_forWho; } }//if the word is still 1 character long, check its edges and find the neighbors for it else if(strlen($word) == 1){ foreach($Vertex_finder->edgeP as $e){ if($e->letter == $word[0]) findNeighbor($Vertex_forWho,$e->child,substr($word,1,strlen($word)),$differenceCount); else findNeighbor($Vertex_forWho,$e->child,substr($word,1,strlen($word)),$differenceCount + 1); } }//for any wordzie bigger than 1, add all the neighbors else if(strlen($word) > 1){ if($differenceCount > 1) return; else if($differenceCount == 0){ foreach($Vertex_finder->edgeP as $e){ if($e->letter == $word[0]) findNeighbor($Vertex_forWho,$e->child,substr($word,1,strlen($word)), 0); else findNeighbor($Vertex_forWho,$e->child,substr($word,1,strlen($word)), 1); } } else if($differenceCount == 1){ foreach($Vertex_finder->edgeP as $e){ if($e->letter == $word[0]) findNeighbor($Vertex_forWho,$e->child,substr($word,1,strlen($word)),$differenceCount); else findNeighbor($Vertex_forWho,$e->child,substr($word,1,strlen($word)),$differenceCount + 1); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findNeighboorKeys($size, $y, $x)\n {\n $result = [];\n if ($y - 1 >= 0) {\n array_push($result, [$y - 1, $x]);\n if ($x == $y) array_push($result, [$y - 1, $x - 1]);\n }\n\n if ($y + 1 < $size) {\n array_push($result, [$y + 1, $x]);\n if ($x == $y) array_push($result, [$y + 1, $x + 1]);\n }\n if ($x - 1 >= 0) array_push($result, [$y, $x - 1]);\n if ($x + 1 < $size) array_push($result, [$y, $x + 1]);\n return $result;\n }", "function words_list($sequence, $word_size) {\n $word_list = array();\n $sequence_size = strlen($sequence);\n $index = 0;\n\n //go through the sequence to get each word\n while ($index < $sequence_size) {\n $flag = FALSE;\n $current_word = $index + $word_size - 1;\n $word_list_count = count($word_list);\n //substr ( string $string , int $start [, int $length ] ) : string\n //Returns the portion of string specified by the start and length parameters.\n $new_word = substr($sequence, $index, $word_size);\n\n // base case\n if ($current_word >= $sequence_size) {\n break;\n }\n\n $list_index = 0;\n while ($list_index < $word_list_count) {\n // check if word_list_index isset then push it into the array\n // already seen word\n if (isset($word_list[$list_index][$new_word])) {\n array_push($word_list[$list_index][$new_word], $index);\n $flag = TRUE;\n break;\n }\n $list_index++;\n }\n\n // not seen word in word list, add word\n if (!$flag) {\n $never_seen = array($new_word => array($index));\n array_push($word_list, $never_seen);\n $flag = FALSE;\n }\n $index++;\n }\n\n return $word_list;\n}", "function printNeighbors(){\n\t\tforeach($vertexList as $v){\n\t\t\tif(count($v->neighbors) > 0){\n\t\t\t\tprint($word . \": \");\n\t\t\t\tforeach($v->neighbors as $vertex){\n\t\t\t\t\tprint($vertex->word.\", \");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function boxIDDistance(): string\n {\n\n $j = 0;\n $sizeOfArray = count($this->inputArray);\n $firstSimilarWord = '';\n $secondSimilarWord = '';\n\n foreach ($this->inputArray as $inputValue) {\n for ($i = $j; $i < $sizeOfArray - 1; $i++) {\n $wordCompare = $this->inputArray[$i + 1];\n if (levenshtein($inputValue, $wordCompare, 2, 1, 2) < 2) {\n $firstSimilarWord = $inputValue;\n $secondSimilarWord = $wordCompare;\n break 2;\n }\n }\n $j++;\n }\n\n $letterAppearsOnce = array_search(1, array_count_values(str_split($firstSimilarWord . $secondSimilarWord)), true);\n return str_replace($letterAppearsOnce,'',$firstSimilarWord);\n }", "function getSimilarWords($content) {\n $words = processContent($content);\n $suggestions = array();\n foreach ($words as $word) {\n $result = sql_query(\"SELECT * FROM `words`\");\n $shortest = -1;\n while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {\n // could use similar_text, but doing so is less efficient\n $lev = levenshtein($word, $row[\"word\"]);\n // check for an exact match\n \n if ($lev == 0) {\n $closest = $word;\n $shortest = 0;\n // break out of the loop; we've found an exact match\n break;\n }\n \n // if this distance is less than the next found shortest\n // distance, OR if a next shortest word has not yet been found\n if ($lev <= $shortest || $shortest < 0) {\n // set the closest match, and shortest distance\n $closest = $row[\"word\"];\n $shortest = $lev;\n }\n }\n if ($closest != $word) {\n $suggestions[$word] = $closest;\n }\n }\n return $suggestions;\n }", "function find_similar_words($word, $threshold)\n {\n $similar = array();\n $tbl = 'babl_words_' . $this->lan;\n $word = addslashes( ( trim( $word ) ) );\n $sndx = substr($word, 0, 2);\n $query = \"select `word` AS word from `$tbl` where `di`=?\";\n @$result = $this->mDb->query($query, array($sndx));\n while ($res = $result->fetchRow() )\n {\n $tword = $res[\"word\"];\n $lev = levenshtein($tword, $word);\n if (count($similar) < $threshold)\n {\n $similar[$tword] = $lev;\n asort ($similar);\n }\n else\n {\n // If the array is full then if the lev is better than the worst lev\n // then update $keys = array_keys($similar);\n $last_key = $keys[count($keys) - 1];\n if ($lev < $similar[$last_key])\n {\n unset ($similar[$last_key]);\n $similar[$tword] = $lev;\n asort ($similar);\n }\n }\n }\n return $similar;\n }", "function strposa($string, $words=array(), $offset=0) {\n $chr = array();\n //check by simlarity\n foreach($words as $word) {\n $res = checkExistanceBySimilarity($string,$word);\n if ($res !== false) $chr[$word] = $res;\n }\n // check exist\n /*foreach($words as $word) {\n $res = strpos($string, $word, $offset);\n if ($res !== false) $chr[$word] = $res;\n }*/\n if(empty($chr)) return false;\n return min($chr);\n}", "function live_neighbors($key, $type, $cells, $cols)\r\n\t{\r\n\t\t$live_neighbors = 0;\r\n\t\tif ($type !== 'ur' && $type !== 'rs' && $type !== 'br' && $cells[$key+1] == 'alive') {\r\n\t\t\t$live_neighbors++;\r\n\t\t}\r\n\t\tif ($type !== 'ul' && $type !== 'ls' && $type !== 'bl' && $cells[$key-1] == 'alive') {\r\n\t\t\t$live_neighbors++;\r\n\t\t}\r\n\t\tif ($type !== 'bl' && $type !== 'bs' && $type !== 'br' && $cells[$key+$cols] == 'alive') {\r\n\t\t\t$live_neighbors++;\r\n\t\t}\r\n\t\tif ($type !== 'ur' && $type !== 'rs' && $type !== 'br' && $type !== 'bl' && $type !== 'bs' && $cells[$key+$cols+1] == 'alive') {\r\n\t\t\t$live_neighbors++;\r\n\t\t}\r\n\t\tif ($type !== 'ul' && $type !== 'ls' && $type !== 'br' && $type !== 'bl' && $type !== 'bs' && $cells[$key+$cols-1] == 'alive') {\r\n\t\t\t$live_neighbors++;\r\n\t\t}\t\r\n\t\tif ($type !== 'ul' && $type !== 'us' && $type !== 'ur' && $cells[$key-$cols] == 'alive') {\r\n\t\t\t$live_neighbors++;\r\n\t\t}\t\t\r\n\t\tif ($type !== 'ul' && $type !== 'ls' && $type !== 'us' && $type !== 'bl' && $type !== 'ur' && $cells[$key-$cols-1] == 'alive') {\r\n\t\t\t$live_neighbors++;\r\n\t\t}\t\r\n\t\tif ($type !== 'ul' && $type !== 'us' && $type !== 'br' && $type !== 'ur' && $type !== 'rs' && $cells[$key-$cols+1] == 'alive') {\r\n\t\t\t$live_neighbors++;\r\n\t\t}\r\n\t\treturn $live_neighbors;\r\n\t}", "function getNeighbours($arr, $x, $y){\n\t$c = getColumn($arr, $x);\n\t$r = getRow($arr, $y);\n\t[$bnum, $bpos] = locateBlock($x, $y);\n\t$b = getBlock($arr, $bnum);\n\t$ret = array_merge(remove($b, $bpos), remove($c, $y), remove($r, $x));\n\treturn $ret;\n}", "function FrequentWordsMismatches($genome, $k, $d)\n{\n\t$solution = array();\n\t$_max = -1;\n\tfor ($i = 0; $i <= strlen($genome) - $k; $i++)\n\t{\n\t\t$_text = substr($genome, $i, $k);\n\t\t$_indexes = ApproximatePatternMatching($_text, $genome, $d);\n\t\tif ($_indexes)\n\t\t{\n\t\t\t$_cnt = count($_indexes);\n\t\t\tif ($_cnt > $_max)\n\t\t\t{\n\t\t\t\t$solution = array();\n\t\t\t\t$solution[$_text] = $_text;\n\t\t\t\t$_max = $_cnt;\n\t\t\t}\n\t\t\telseif ($_cnt == $_max)\n\t\t\t{\n\t\t\t\t$solution[$_text] = $_text;\n\t\t\t}\n\t\t\t// echo $_max.'<hr>';\n\t\t}\n\t}\n\treturn $solution;\n}", "public function neighbors($v);", "function check_for_word($letters_hashmap,$word){\n /// found letters\n $found_letters=0;\n ///visited cordinates\n $visited=[];\n //iterate in the word letters searching for them on the hash table\n $words_count=strlen($word);\n ///\n $stop=false;\n ///start from first letter \n $the_temp_letter=$word[0];\n \n while($found_letters<$words_count && !$stop){\n//serch for the letter on the hash table\n $the_letter=$the_temp_letter;\n \n \n\n if(array_key_exists($the_letter,$letters_hashmap)\n && count(array_diff(str_split($letters_hashmap[$the_letter],2),$visited))>=1\n ){\n \n //the letter is found on the hsah table\n //let us get how many times\n ///the last number was making error in the last letter to add to hash table\n $cordenates=$letters_hashmap[$the_letter];\n $cordenates = str_replace(' ', '', $cordenates);\n \n \n \n \n\n \n ///lets iterate throw the cordenates and check if it's available\n\n \n for($j=0;$j<strlen($cordenates);$j+=2){\n ///assign the first cordinates to start the search\n \n \n \n \n if($found_letters==0 && !in_array($cordenates[$j].$cordenates[$j+1],$visited)){\n $x_cord=$cordenates[$j];\n $y_cord=$cordenates[$j+1];\n array_push($visited,$x_cord.$y_cord);\n $found_letters++;\n $the_temp_letter=$word[$found_letters];\n break;\n \n\n }\n\n\n \n ///we are not on the first letter so we need compare the second letter cord with our cords\n else{\n \n $nexX=$cordenates[$j];\n $newY=$cordenates[$j+1];\n\n\n \n \n\n\n if(($x_cord-$newY+$y_cord-$nexX)<=1 && !in_array($j.$j+1,$visited)){\n \n\n ///the new position\n $x_cord=$cordenates[$j];\n $y_cord=$cordenates[$j+1];\n array_push($visited,$x_cord.$y_cord);\n\n \n \n $found_letters++;\n ///if we reached the last letter and found it then we should stop the loop\n if($found_letters==$words_count){\n \n $stop= true;\n \n break;\n \n }\n \n \n $the_temp_letter=$word[$found_letters];\n \n break;\n \n \n \n\n\n }else{\n\n if($j==strlen($cordenates)-1){\n $found_letters--;\n\n $the_temp_letter=$word[$found_letters];\n //\n \n array_push($visited,$cordenates[$j].$cordenates[$j+1]);\n $stop=true;\n break;\n }\n \n \n $the_temp_letter=$word[$found_letters];\n //array_push($visited,$cordenates[$j].$cordenates[$j+1]);\n \n // break;\n\n \n\n \n \n\n }\n }\n\n\n }\n \n \n }\n //so the letter is not found on the matrix so the word cant be formated\n else{\n $stop= true;\n \n \n }\n \n\n }\n \n //return $found_letters;\n if($found_letters==$words_count){\n return $found_letters;\n }else{\n return false;\n }\n\n}", "function getLabel($data, $neighbors)\n{\n $results = array();\n $neighbors = array_keys($neighbors);\n print_r($neighbors);\n foreach ($neighbors as $neighbor) {\n $results[] = $data[$neighbor][2];\n }\n $values = array_count_values($results);\n $values = array_flip($values);\n ksort($values);\n return array_pop($values);\n}", "function distance($a, $b)\n{\n if (strlen($a) !== strlen($b)) {\n throw new \\InvalidArgumentException(\"DNA strands must be of equal length.\", 1);\n }\n //\n // YOUR CODE GOES HERE\n //\n if ($a === $b)\n return 0;\n\n $charArrayA = str_split($a);\n $charArrayB = str_split($b);\n $hammingDistance = 0;\n foreach ($charArrayA as $idx => $value) {\n if( $charArrayA[$idx] !== $charArrayB[$idx]) {\n $hammingDistance++;\n }\n }\n\n return $hammingDistance;\n}", "abstract protected function getTextBoundings( $size, ezcGraphFontOptions $font, $text );", "function solve_two(string $input) : string\n{\n\n $seats = array_map('str_split', xplode_input($input));\n $limit = 5;\n while(true) {\n [$seats, $hasChanged, $occupied] = walk_matrix($seats, $limit, 'visible_neighbors');\n if (!$hasChanged) {\n return sprintf(\"Occupied seats: %d\\n\", $occupied);\n }\n }\n}", "function search_short($patt, $k, $text, $start_index = 0, $max_len = -1, $text_strlen = -1)\n {\n if ($text_strlen < 0) {\n $text_strlen = strlen($text);\n }\n\n if ($max_len < 0) {\n $max_len = $text_strlen;\n }\n\n $start_index = (int)max(0, $start_index);\n $n = min($max_len, $text_strlen - $start_index);\n $m = strlen($patt);\n $end_index = $start_index + $n;\n\n // If $text is shorter than $patt, use the built-in\n // levenshtein() instead:\n if ($n < $m) {\n $lev = levenshtein(substr($text, $start_index, $n), $patt);\n\n if ($lev <= $k) {\n return Array($start_index + $n - 1 => $lev);\n } else {\n return Array();\n }\n }\n\n $s = Array();\n\n for ($i = 0; $i < $m; $i++) {\n $c = $patt[$i];\n\n if (isset($s[$c])) {\n $s[$c] = min($i, $s[$c]);\n } else {\n $s[$c] = $i;\n }\n }\n\n if ($end_index < $start_index) {\n return Array();\n }\n\n $matches = Array();\n $da = $db = range(0, $m - $k + 1);\n\n $mk = $m - $k;\n\n for ($t = $start_index; $t < $end_index; $t++) {\n $c = $text[$t];\n $in_patt = isset($s[$c]);\n\n if ($t & 1) {\n $d = &$da;\n $e = &$db;\n } else {\n $d = &$db;\n $e = &$da;\n }\n\n for ($i = 1; $i <= $mk; $i++) {\n $g = min($k + 1, $e[$i] + 1, $e[$i + 1] + 1);\n\n // TODO: optimize this with a look-up-table?\n if ($in_patt)\n for ($j = $e[$i - 1]; ($j < $g && $j <= $mk); $j++) {\n if ($patt[$i + $j - 1] == $c) {\n $g = $j;\n }\n }\n\n $d[$i] = $g;\n }\n\n if ($d[$mk] <= $k) {\n $err = $d[$mk];\n $i = min($t-$err + $k + 1, $start_index + $n - 1);\n\n if (!isset($matches[$i]) || $err < $matches[$i]) {\n $matches[$i] = $err;\n }\n }\n }\n\n unset($da, $db);\n\n return $matches;\n }", "function string_compare_DP($str1, $str2) {\n $MATCH = 0;\n $INSERT = 1;\n $DELETE = 2;\n\n // init DP table, with Cell object inserted into each cell\n $temp = array_fill(0, strlen($str2)+1, 0);\n $compareTable = array_fill(0, strlen($str1)+1, $temp);\n \n for ($i=0; $i < strlen($str1)+1; $i++) { \n for ($j=0; $j < strlen($str2)+1; $j++) { \n // if 1st string is empty, the only option is to insert all char\n // of 2nd string\n if ($i == 0) {\n $compareTable[$i][$j] = $j;\n } elseif ($j == 0) { // if 2nd string is empty, the only option is to remove all char from 1st string\n $compareTable[$i][$j] = $i;\n } elseif ($str1[$i-1] == $str2[$j-1]) {\n $compareTable[$i][$j] = $compareTable[$i-1][$j-1];\n } else {\n $compareTable[$i][$j] = 1 + min($compareTable[$i-1][$j-1], $compareTable[$i-1][$j], $compareTable[$i][$j-1]);\n }\n }\n }\n print2DArray($compareTable);\n // return cost\n return $compareTable[strlen($str1)][strlen($str2)];\n}", "static function segword($str) {\n\t\t$segObj = new Segmentation();\n\t\t$sc = $segObj->_getSegClient();\n $sc->SetLimits(0, 1, 1);\n\t\t$searchRes = $segObj->queryViaValidConnection($str, 'goods_id_dist');\n\t\tif( $searchRes == false ) {\n\t\t\treturn false;\n\t\t}\n\t\t//var_dump($searchRes['words']);\n\t\t//return array_keys( $searchRes['words'] );\n\t\tif (!empty($searchRes['words'])) {\n\t\t\treturn array_keys($searchRes['words']);\n\t\t}\n\t\telse {\n\t\t\treturn array();\n\t\t} \n\t}", "function findWordArray2(string $word, array $array)\n{\n $word_array = [];\n $word = trim($word);\n if (!empty($word) && !empty($array)) {\n\n foreach ($array as $key => $value) {\n if ($value === $word) {\n $word_array[$key] = strlen($value);\n }\n }\n return !empty($word_array) ? $word_array : false;\n }\n}", "function parseList(){\r\n //gets word list, creates array of words from it\r\n //or return false if impossible\r\n\r\n global $currentWord, $boardData;\r\n\r\n $itWorked = TRUE;\r\n\r\n //convert word list entirely to upper case\r\n //$wordList = strtoupper($wordList);\r\n\r\n //split word list into array\r\n //$word = explode(\"\\n\", $wordList);\r\n\r\n //foreach ($word as $currentWord){\r\n //take out trailing newline characters\r\n //$currentWord = rtrim($currentWord);\r\n foreach($currentWord as $wordIndex) {\r\n var_dump($wordIndex);\r\n echo \"\\n\";\r\n //stop if any words are too long to fit in puzzle\r\n if ((strLen($wordIndex) > $boardData['width']) &&\r\n (strLen($wordIndex) > $boardData['height'])\r\n ) {\r\n print \"$wordIndex is too long for puzzle\";\r\n print \"Please increase the grid size in previous page and try again\";\r\n $itWorked = FALSE;\r\n } // end if\r\n }\r\n\r\n //} // end foreach\r\n return $itWorked;\r\n}", "public function findAdjacentOf(Cell $cell);", "public function getNeighbors(array $columns = ['*']);", "function toys($w){\n \n //we need to sort arra first\n \n sort($w);\n $start_e = $w[0]; \n $end_e = $start_e+4;\n $counter = 1; // at anycase there's a one container\n \n for($i = 1; $i < count($w); $i++){\n // so if an element $w[$i] is greater than a start_point+4 so he should be inside a new container\n if($w[$i] > $end_e){\n $start_e = $w[$i];\n $end_e = $start_e+4;\n $counter++;\n }\n }\n \n \n return $counter;\n \n}", "public function findLongestWord() {\n\n }", "function matching_words($query_words_list, $protein_subject_words_list) {\n $index = 0;\n $query_size = count($query_words_list);\n $matching_words_indices = array();\n\n // go through the whole query words list\n while ($index < $query_size) {\n // key — Fetch a key from an array\n $query_word_key = key($query_words_list[$index]);\n $db_index = 0;\n $db_size = count($protein_subject_words_list);\n\n // go through each database word list\n while ($db_index < $db_size) {\n $word_index_match = array();\n $db_word_key = key($protein_subject_words_list[$db_index]);\n // Returns < 0 if str1 is less than str2; > 0 if str1 is greater \n // than str2, and 0 if they are equal.\n $word_match = strcmp($query_word_key, $db_word_key);\n // if query word match with database then push it to array\n if ($word_match == 0) {\n $query_word_index = $query_words_list[$index][$query_word_key];\n $db_word_index = $protein_subject_words_list[$db_index][$db_word_key];\n $word_index_match = array($query_word_index, $db_word_index);\n array_push($matching_words_indices, $word_index_match);\n }\n $db_index++;\n } // end db\n $index++;\n }\n\n return $matching_words_indices;\n}", "public function neighbors()\n {\n $parent = $this->parent;\n $exclude = $this->term_id;\n\n $query = static::where('term_id', '!=', $exclude);\n\n return $parent ? $query->where('parent', $parent) : $query->whereNull('parent');\n }", "function findEditDistanceMatrix($initial, $final)\n{\t\n\t$m = sizeof($initial);\n\t$n = sizeof($final);\n\t\n\t$matrix = array();\n\tfor ($i = 0; $i <= $m; $i++)\n\t\t$matrix[$i] = array($i);\n\tfor ($j = 0; $j <= $n; $j++)\n\t\t$matrix[0][$j] = $j;\n\t\n\tfor ($j = 1; $j <= $n; $j++)\n\t{\n\t\tfor ($i = 1; $i <= $m; $i++)\n\t\t{\n\t\t\tif ($initial[$i - 1] === $final[$j - 1])\n\t\t\t\t$matrix[$i][$j] = $matrix[$i - 1][$j - 1];\n\t\t\telse\n\t\t\t\t$matrix[$i][$j] = min(\t$matrix[$i - 1][ $j ] + 1,\n\t\t\t\t\t\t\t\t\t\t$matrix[ $i ][$j - 1] + 1,\n\t\t\t\t\t\t\t\t\t\t$matrix[$i - 1][$j - 1] + 1);\n\t\t}\n\t}\n\n\treturn $matrix;\n}", "function ClumpFinding($genome, $kmer, $Length, $times)\n{\n\t$kmers = explode(' ', FrequentWords($genome, $kmer));\n\tif ($kmers)\n\t{\n\t\t$solution = array();\n\t\t// Check each one of them\n\t\t$_strlen = strlen($genome);\n\t\t//ddd($kmers);\n\t\tforeach ($kmers as $_item)\n\t\t{\n\t\t\t//echo strpos($genome, $_item).'<br>';\n\t\t\t//echo $_strlen.'<br>';\n\t\t\t//die();\n\t\t\t// Is it a solution?\n\t\t\tfor ($i = strpos($genome, $_item); $i <= $_strlen; $i++)\n\t\t\t{\n\t\t\t\t// echo $i.'<br>';\n\t\t\t\t//die('ffg');\n\t\t\t\t$_text = substr($genome, $i, $Length);\n\t\t\t\t//echo $_text.'<br>';\n\t\t\t\tif (PatternCount($_text, $_item) >= $times)\n\t\t\t\t{\n\t\t\t\t\t$solution[] = $_item;\n\t\t\t\t\t//ddd($solution);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn implode(' ', $solution);\n\t}\n\treturn '';\n}", "public function wordLength(){\n\n\t\t\t\t\n\t\t\t\t$array = explode(' ',$this->sentence);\n\t\t\t\t$Length = strlen($array[0]);\n\t\t\t\t$shortestWord=NULL;\n\n\t\t\t\tforeach ($array as $word) {\n \t\t\t\t\tif (strlen($word) < $Length) {\n \t\t\t\t\t $Length = strlen($word);\n \t\t\t \t\t $shortestWord = $word;\n \t\t\t\t }\n\t\t\t\t}\n\t\t\t\techo $shortestWord;\n\n\t\t\t}" ]
[ "0.55393374", "0.5393672", "0.5344756", "0.5256735", "0.5157782", "0.5143379", "0.5100168", "0.50893384", "0.5087017", "0.5025564", "0.4932043", "0.48924276", "0.4760784", "0.47087795", "0.46929485", "0.4657881", "0.46575263", "0.46490246", "0.4636563", "0.46287817", "0.46173584", "0.45898056", "0.45721936", "0.45658275", "0.45615816", "0.45142877", "0.4511122", "0.44931686", "0.44710648", "0.44314384" ]
0.69498
0
/end of find neighbor function /print function for vertex neighbors
function printNeighbors(){ foreach($vertexList as $v){ if(count($v->neighbors) > 0){ print($word . ": "); foreach($v->neighbors as $vertex){ print($vertex->word.", "); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function neighbors($v);", "function findNeighbor($Vertex_forWho,$Vertex_finder,$word,$differenceCount){\n\t\t//since some words like car had r as the end but cars had the r and s as end\n\t\t//this function kept breaking, because this was my base case, but to save myself\n\t\t// a headache i split them up into word sized tries\n\n\t\t//if the end of the word is met, then if the difference is only 1 push it back\n\t\t//as an edge to both finder and for who.\n\n\t\tif($Vertexfind->end == true){\n\t\t\tif($differenceCount == 1){\n\t\t\t\t$Vertex_forWho->neighbors[] = $Vertex_finder;\n\t\t\t\t$Vertex_finder->neighbors[] = $Vertex_forWho;\n\t\t\t}\n\t\t}//if the word is still 1 character long, check its edges and find the neighbors for it\n\t\telse if(strlen($word) == 1){\n\t\t\tforeach($Vertex_finder->edgeP as $e){\n\t\t\t\tif($e->letter == $word[0])\n\t\t\t\t\tfindNeighbor($Vertex_forWho,$e->child,substr($word,1,strlen($word)),$differenceCount);\n\t\t\t\telse\n\t\t\t\t\tfindNeighbor($Vertex_forWho,$e->child,substr($word,1,strlen($word)),$differenceCount + 1);\n\t\t\t}\n\t\t}//for any wordzie bigger than 1, add all the neighbors\n\t\telse if(strlen($word) > 1){\n\t\t\tif($differenceCount > 1)\n\t\t\t\treturn;\n\t\t\telse if($differenceCount == 0){\n\t\t\t\tforeach($Vertex_finder->edgeP as $e){\n\t\t\t\t\tif($e->letter == $word[0])\n\t\t\t\t\t\tfindNeighbor($Vertex_forWho,$e->child,substr($word,1,strlen($word)), 0);\n\t\t\t\t\telse\n\t\t\t\t\t\tfindNeighbor($Vertex_forWho,$e->child,substr($word,1,strlen($word)), 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if($differenceCount == 1){\n\t\t\t\tforeach($Vertex_finder->edgeP as $e){\n\t\t\t\t\tif($e->letter == $word[0])\n\t\t\t\t\t\tfindNeighbor($Vertex_forWho,$e->child,substr($word,1,strlen($word)),$differenceCount);\n\t\t\t\t\telse\n\t\t\t\t\t\tfindNeighbor($Vertex_forWho,$e->child,substr($word,1,strlen($word)),$differenceCount + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function getNeighbours($arr, $x, $y){\n\t$c = getColumn($arr, $x);\n\t$r = getRow($arr, $y);\n\t[$bnum, $bpos] = locateBlock($x, $y);\n\t$b = getBlock($arr, $bnum);\n\t$ret = array_merge(remove($b, $bpos), remove($c, $y), remove($r, $x));\n\treturn $ret;\n}", "public function getNeighbor($m, $n) {\n $ret = array();\n for ($j = -1; $j <= 1; $j++) {\n for ($i = -1; $i <= 1; $i++) {\n $x = $this->x + $i;\n $y = $this->y + $j;\n if ( !($x == $this->x && $y == $this->y) \n && ( $x >= 0 ) && ( $y >= 0 ) \n && ( $x < $m ) && ( $y < $n ) \n ) {\n $ret[] = array($x, $y);\n }\n }\n }\n return $ret;\n }", "public function edges();", "function live_neighbors($key, $type, $cells, $cols)\r\n\t{\r\n\t\t$live_neighbors = 0;\r\n\t\tif ($type !== 'ur' && $type !== 'rs' && $type !== 'br' && $cells[$key+1] == 'alive') {\r\n\t\t\t$live_neighbors++;\r\n\t\t}\r\n\t\tif ($type !== 'ul' && $type !== 'ls' && $type !== 'bl' && $cells[$key-1] == 'alive') {\r\n\t\t\t$live_neighbors++;\r\n\t\t}\r\n\t\tif ($type !== 'bl' && $type !== 'bs' && $type !== 'br' && $cells[$key+$cols] == 'alive') {\r\n\t\t\t$live_neighbors++;\r\n\t\t}\r\n\t\tif ($type !== 'ur' && $type !== 'rs' && $type !== 'br' && $type !== 'bl' && $type !== 'bs' && $cells[$key+$cols+1] == 'alive') {\r\n\t\t\t$live_neighbors++;\r\n\t\t}\r\n\t\tif ($type !== 'ul' && $type !== 'ls' && $type !== 'br' && $type !== 'bl' && $type !== 'bs' && $cells[$key+$cols-1] == 'alive') {\r\n\t\t\t$live_neighbors++;\r\n\t\t}\t\r\n\t\tif ($type !== 'ul' && $type !== 'us' && $type !== 'ur' && $cells[$key-$cols] == 'alive') {\r\n\t\t\t$live_neighbors++;\r\n\t\t}\t\t\r\n\t\tif ($type !== 'ul' && $type !== 'ls' && $type !== 'us' && $type !== 'bl' && $type !== 'ur' && $cells[$key-$cols-1] == 'alive') {\r\n\t\t\t$live_neighbors++;\r\n\t\t}\t\r\n\t\tif ($type !== 'ul' && $type !== 'us' && $type !== 'br' && $type !== 'ur' && $type !== 'rs' && $cells[$key-$cols+1] == 'alive') {\r\n\t\t\t$live_neighbors++;\r\n\t\t}\r\n\t\treturn $live_neighbors;\r\n\t}", "abstract public function getEdges();", "public function getNeighborhood()\n {\n return $this->neighborhood;\n }", "public function getNeighbors(array $columns = ['*']);", "public function get_neighbors()\n\t{\n\t\t// get parent Directory and its children\n\t\t$path = $this->dir->getPath();\n\t\t$parent = new self(dirname($path));\n\t\t$dirs = $parent->get_dirs();\n\n\t\t// find position of current dir\n\t\t$key = array_search(basename($path), $dirs);\n\n\t\t// check if previous/next directories exist\n\t\t$neighbors = array();\n\t\tif (array_key_exists($key - 1, $dirs))\n\t\t\t$neighbors['prev'] = $dirs[$key - 1];\n\t\tif (array_key_exists($key + 1, $dirs))\n\t\t\t$neighbors['next'] = $dirs[$key + 1];\n\n\t\treturn $neighbors;\n\t}", "public function getNeighborCount()\n {\n return $this->neighbor_count;\n }", "public function neighbors()\n {\n $parent = $this->parent;\n $exclude = $this->term_id;\n\n $query = static::where('term_id', '!=', $exclude);\n\n return $parent ? $query->where('parent', $parent) : $query->whereNull('parent');\n }", "public function printRoute()\r\n {\r\n foreach (end($this->visited) as $visit) {\r\n echo $this->locations[$visit]['name'] . \"\\n\";\r\n }\r\n }", "function getLabel($data, $neighbors)\n{\n $results = array();\n $neighbors = array_keys($neighbors);\n print_r($neighbors);\n foreach ($neighbors as $neighbor) {\n $results[] = $data[$neighbor][2];\n }\n $values = array_count_values($results);\n $values = array_flip($values);\n ksort($values);\n return array_pop($values);\n}", "public function outAdjacentVertices($id) {\n\t\treturn $this->outAdjacents[$id];\n\t}", "public function get_edges()\n {\n }", "public function countVertices() {\n\t\treturn count($this->inAdjacents);\n\t}", "public function inAdjacentVertices($id) {\n\t\treturn $this->inAdjacents[$id];\n\t}", "public function findAdjacentOf(Cell $cell);", "public function edgeCount();", "public function add_neighbor($uid, $neighbor_ip){\n $ngh_id = $this->get_uid($neighbor_ip);\n if(!$ngh_id)\n $ngh_id = $this->add_user($neighbor_ip);\n \n if(!$ngh_id)\n return NULL;\n\n $edge_exists = $this->edge_exists($uid, $ngh_id);\n \n\t\t$query = \"INSERT INTO edges(\n src_id,\n\t\t\ttarget_id) \n\t\t\tVALUES(?, ?)\n ON DUPLICATE KEY UPDATE src_id = src_id;\n\t\t\";\n\t\t\t\n\t\t$stmt = $this->prepare_statement($query);\n if(!$stmt)\n return NULL;\n\t\t$bind = $stmt->bind_param(\"ii\", $uid, $ngh_id);\n\t\tif(!$bind)\n\t\t\treturn NULL;\n\t\t\n\t\t$exec = $stmt->execute();\n\t\tif(!$exec)\n\t\t\treturn NULL;\n\n /* duplicate edges */\n\t\t$bind = $stmt->bind_param(\"ii\", $ngh_id, $uid);\n\t\tif(!$bind)\n\t\t\treturn NULL;\n\t\t\n\t\t$exec = $stmt->execute();\n\t\tif(!$exec)\n\t\t\treturn NULL;\n\t\t\t\n\t\treturn array(\n \"neighbor_id\" => $ngh_id,\n \"edge_exists\" => $edge_exists\n );\n }", "public function __toString()\n {\n $vertices = $this->getVertices();\n // init\n $buffer = [];\n // add\n $buffer[] = sprintf(\n '%d vertices, %d edges',\n $vertices,\n $this->getEdges()\n );\n // iterate over the vertices\n for ($vertex = 0; $vertex < $vertices; $vertex++) {\n // get the adjacent vertices\n $adjacentVertices = $this->adjacent($vertex);\n // add\n $buffer[] = sprintf(\n '%d : %s',\n $vertex,\n implode(' ', $adjacentVertices)\n );\n }\n // convert to string\n return implode(PHP_EOL, $buffer);\n }", "public function getProductNeighbors()\n {\n return $this->productNeighbors;\n }", "public function index()\n {\n $a = new Node(1,'A',12,34,[]);\n $b = new Node(2,'B',12,34,[]);\n $c = new Node(3,'C',12,34,[]);\n $d = new Node(4,'D',12,34,[]);\n $e = new Node(5,'E',13,45,[]); \n $f = new Node(7,'F',13,45,[]); \n $g = new Node(8,'G',13,45,[]); \n $h = new Node(9,'H',13,45,[]); \n $i = new Node(12,'I',13,45,[]); \n $j = new Node(10,'J',13,45,[]); \n $k = new Node(11,'K',13,45,[]); \n $l = new Node(13,'L',13,45,[]); \n $m = new Node(14,'M',13,45,[]); \n $n = new Node(16,'N',13,45,[]); \n $p = new Node(17,'P',13,45,[]);\n\n\n $gr = new Grafo();\n $gr->Add($a);\n $gr->Add($b);\n $gr->Add($c);\n $gr->Add($d);\n $gr->Add($e);\n $gr->Add($f);\n $gr->Add($g);\n $gr->Add($h);\n $gr->Add($i);\n $gr->Add($j);\n $gr->Add($k);\n $gr->Add($l);\n $gr->Add($m);\n $gr->Add($n);\n $gr->Add($p);\n\n // A\n $gr->AddEdge($a,8,$b);\n $gr->AddEdge($b,8,$a);\n $gr->AddEdge($a,4,$e);\n $gr->AddEdge($e,4,$a);\n $gr->AddEdge($a,5,$d);\n $gr->AddEdge($d,5,$a);\n // B\n $gr->AddEdge($b,12,$e);\n $gr->AddEdge($e,12,$b);\n $gr->AddEdge($b,4,$f);\n $gr->AddEdge($f,4,$b);\n $gr->AddEdge($b,3,$c);\n $gr->AddEdge($c,3,$b);\n // C\n $gr->AddEdge($c,9,$f);\n $gr->AddEdge($f,9,$c);\n $gr->AddEdge($c,11,$g);\n $gr->AddEdge($g,11,$c);\n // F\n $gr->AddEdge($f,1,$g);\n $gr->AddEdge($g,1,$f);\n $gr->AddEdge($f,3,$e);\n $gr->AddEdge($e,3,$f);\n $gr->AddEdge($f,8,$k);\n $gr->AddEdge($k,8,$f);\n // G\n $gr->AddEdge($g,7,$l);\n $gr->AddEdge($l,7,$g);\n $gr->AddEdge($g,8,$k);\n $gr->AddEdge($k,8,$g);\n // E\n $gr->AddEdge($e,9,$d);\n $gr->AddEdge($d,9,$e);\n $gr->AddEdge($e,5,$j);\n $gr->AddEdge($j,5,$e);\n $gr->AddEdge($e,8,$i);\n $gr->AddEdge($i,8,$e);\n // D\n $gr->AddEdge($d,6,$h);\n $gr->AddEdge($h,6,$d);\n // H\n $gr->AddEdge($h,2,$i);\n $gr->AddEdge($i,2,$h);\n $gr->AddEdge($h,7,$m);\n $gr->AddEdge($m,7,$h);\n // I\n $gr->AddEdge($i,10,$j);\n $gr->AddEdge($j,10,$i);\n $gr->AddEdge($i,6,$m);\n $gr->AddEdge($m,6,$i);\n // M\n $gr->AddEdge($m,2,$n);\n $gr->AddEdge($n,2,$m);\n // J\n $gr->AddEdge($j,6,$k);\n $gr->AddEdge($k,6,$j);\n $gr->AddEdge($j,9,$n);\n $gr->AddEdge($n,9,$j);\n // K\n $gr->AddEdge($k,5,$l);\n $gr->AddEdge($l,5,$k);\n $gr->AddEdge($k,7,$p);\n $gr->AddEdge($p,7,$k);\n // L\n $gr->AddEdge($l,6,$p);\n $gr->AddEdge($p,6,$l);\n // N\n $gr->AddEdge($n,12,$p);\n $gr->AddEdge($p,12,$n);\n // P\n\n // dd($gr);\n // return $gr->MenorDistancia([INF,INF,0,INF]);\n // return $gr->Show();\n return $gr->Disjtra($a,$p);\n }", "public function isVisitedEdge($edge);", "function prims_mst($distance_table){\n //TODO use sets or something similar to sets for this\n $u = array();\n $v = array_keys($distance_table);\n\n $new_edges = array();\n $all_vertexes = array_keys($distance_table);\n\n $a = array_pop($v);\n array_push($u,$a);\n\n //Keep looping until we've got all the edges\n $i = 0; //Loop protector to prevent infinite loops\n $max_ittr = count($all_vertexes)+4;\n while(!contains_all_verticies($u,$all_vertexes) && $i < $max_ittr){\n\n //Now go through all the edges in $v find it's closest neighbour in $u\n //Find the miinmum of those and put that vertex in $v\n $min_v = INF;\n $min_i = 0;\n $min_j = 0;\n foreach($v as $v1){\n $mins = find_min_vertex($v1,$u,$distance_table);\n if($mins[1] < $min_v){\n $min_v = $mins[1];\n $min_i = $mins[0];\n $min_j = $v1;\n }\n }\n //add the edge to the edges and the vertex to $u\n array_push($u,$min_j);\n array_push($new_edges,array($min_j,$min_i));\n\n $v = array_delete($v,$min_j);\n\n\n\n $i++;\n }\n\n return $new_edges;\n}", "abstract public function getVerticesTarget();", "public function getUserNeighbours ( $user, $limit = 50 ) {\n\t\tif ( $this->api_key ) {\t\n\t\t\t$url = \n\t\t\t\tself::API_ROOT . $this->urls['UserNeighbours'] . \n\t\t\t\t\"&api_key=\" . $this->api_key . \n\t\t\t\t\"&user=\" . $user .\n\t\t\t\t\"&limit=\" . $limit;\n\t\t\t\t\n\t\t\treturn $this->getResults( $url );\n\t\t}\n\t}", "public function index()\n {\n $neighbors = Neighbor::all();\n return view('neighbor.index')->with('neighbors', $neighbors);\n }", "private function calculateConnections() {\n $map = array();\n $whiteRecheck = array();\n for ($row=0; $row < $this->matrix->getSize(); $row++) {\n for ($col=0; $col < $this->matrix->getSize(); $col++) {\n $map[$row][$col][5] = $this->isDarkInt($row, $col);\n $map[$row][$col][0] = 0;\n $map[$row][$col][4] = $this->isDarkInt($row, $col - 1);\n $map[$row][$col][6] = $this->isDarkInt($row, $col + 1);\n $map[$row][$col][8] = $this->isDarkInt($row - 1, $col);\n $map[$row][$col][2] = $this->isDarkInt($row + 1, $col);\n $map[$row][$col][7] = $this->isDarkInt($row - 1, $col - 1);\n $map[$row][$col][9] = $this->isDarkInt($row - 1, $col + 1);\n $map[$row][$col][1] = $this->isDarkInt($row + 1, $col - 1);\n $map[$row][$col][3] = $this->isDarkInt($row + 1, $col + 1);\n if (!$map[$row][$col][5]) {\n $fullCount = $map[$row][$col][1] + $map[$row][$col][2] + $map[$row][$col][3] + $map[$row][$col][4]\n + $map[$row][$col][6] + $map[$row][$col][7] + $map[$row][$col][8] + $map[$row][$col][9];\n $soloCount = $map[$row][$col][2] + $map[$row][$col][4] + $map[$row][$col][6] + $map[$row][$col][8];\n $map[$row][$col][7] = 0;\n $map[$row][$col][9] = 0;\n $map[$row][$col][1] = 0;\n $map[$row][$col][3] = 0;\n if ($this->isDarkInt($row, $col - 1) && $this->isDarkInt($row - 1, $col)) {\n $map[$row][$col][7] = 1;\n }\n if ($this->isDarkInt($row, $col + 1) && $this->isDarkInt($row - 1, $col)) {\n $map[$row][$col][9] = 1;\n }\n if ($this->isDarkInt($row, $col - 1) && $this->isDarkInt($row + 1, $col)) {\n $map[$row][$col][1] = 1;\n }\n if ($this->isDarkInt($row, $col + 1) && $this->isDarkInt($row + 1, $col)) {\n $map[$row][$col][3] = 1;\n }\n if ($fullCount >= 5) {\n $whiteRecheck[]=array('row' => $row, 'col' => $col);\n }\n if ($soloCount >= 4) {\n $map[$row][$col][0] = 1;\n }\n }\n }\n }\n foreach ($whiteRecheck as $key => $cw) {\n $row = $cw['row'];\n $col = $cw['col'];\n if (isset($map[$row + 1][$col - 1]) && !$map[$row + 1][$col - 1][5] && isset($map[$row + 1][$col - 1]) && $map[$row + 1][$col - 1][0]) {\n $map[$row][$col][1] = 0;\n $map[$row][$col - 1][3] = 0;\n $map[$row + 1][$col][7] = 0;\n $map[$row + 1][$col - 1][9] = 0;\n }\n if (isset($map[$row + 1][$col + 1]) && !$map[$row + 1][$col + 1][5] && isset($map[$row + 1][$col + 1]) && $map[$row + 1][$col + 1][0]) {\n $map[$row][$col][3] = 0;\n $map[$row][$col + 1][1] = 0;\n $map[$row + 1][$col][9] = 0;\n $map[$row + 1][$col + 1][7] = 0;\n }\n }\n return $map;\n }" ]
[ "0.7257222", "0.60856897", "0.6082075", "0.5742842", "0.5733574", "0.56998277", "0.5598441", "0.55713034", "0.54402417", "0.5418688", "0.5408478", "0.538175", "0.5363773", "0.5344014", "0.52620125", "0.5234594", "0.51420575", "0.5111883", "0.5072339", "0.5070315", "0.50499874", "0.50017756", "0.4996916", "0.4927528", "0.4922623", "0.48878744", "0.48832217", "0.4882706", "0.48611593", "0.48288667" ]
0.78646415
0
/Run breadfirst sesarch on neighbors to find the shortest path
function breadthFirstSearch($startVertex){ $startVertex->visited = true; $Q = new SplQueue(); $Q->push($startVertex); while(!$Q->empty()){ $x = new Vertex(); $x = $Q->front(); $Q->pop(); foreach($x->neighbors as $VertexPtr){ if($VertexPtr->visited == false){ $VertexPtr->visited = trie; $VertexPtr->pred = $x; $Q->push($VertexPtr); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function breadFirstSearch($origin, $desitnation)\n {\n //mark all nodes as unvisited\n foreach($this->graph as $vetex => $adj)\n {\n $this->visited[$vertec] = false;\n }\n\n //create an empty queue\n $q = new SplQueue();\n\n //enqueue the origin vertex and mark as visted\n $q->enqueue($origin);\n $this->visited[$origin] = true;\n\n //this is used to track the path back from each node\n $path = array();\n $path[$origin] = new SplDoubleLinkedList();\n $path[$origin]->setIteratorMode(\n SpleDoubleLinkedLit::IT_MODE_FIFO|SpleDoublyLinkedList::IT_MODE_KEEP\n );\n\n $path[$origin]->push($origin);\n\n $found = false;\n //while queue is not empty and destination not found\n while(!$q->isEmpty() && $q->bottom != $destination)\n {\n $t = $q->dequeue();\n\n if(!empty($this->graph[$t]))\n {\n //for each adjacent neighbor\n foreach($this->graph[$t] as $vertex)\n {\n if(!$this->visited[$vertex])\n {\n //if not yet visited, enqueue vertex and mark\n //as visited\n $q->enqueue($vertex);\n $this->visited[$vertex] = true;\n //add vertex to current path\n $path[$vertex] = clone$path[$t];\n $path[$vertex]->push($vertex);\n }\n }\n }\n }\n\n if(isset($path[$destination]))\n {\n echo \"$origin to $desitnation in \",\n count($path[$destination]) - 1,\n \"hopsn\";\n $sep = '';\n foreach($path[$destination] as $vertex)\n {\n echo $sep, $vertex;\n $sep = '->';\n }\n echo \"n\";\n }\n else\n {\n echo \"No route from the $origin to $destination\";\n }\n }", "public function shortestPath($source, $target)\n {\n //vertex\n $d = array();\n //array of predecessors for each vertex\n $pi = array();\n //queue of all unoptimized vertives\n $Q = new SplPriorityQueue();\n\n foreach($this->graph as $v => $adj)\n {\n $d[$v] = INF; //set intitial distance to \"infinity\"\n $pi[$v] = null; // no known predecessors yet\n foreach($adj as $w => $cost)\n {\n //use the edge cost as the priority\n $Q->insert($w, $cost);\n }\n }\n\n //initial distance at source is 0\n $d[$source] = 0;\n\n while(!$Q->isEmpty())\n {\n //extract min cost\n $u = $Q->extract();\n if(!empty($this->graph[$u]))\n {\n //alternate route length to adjacent neightbor\n $alt = $d[$u] + $cost;\n //if alternate route is shorter\n if($alt < $d[$v])\n {\n $d[$v] = $alt;//update minimun length to vertex\n $pi[$v] = $u;//add neighbor to predecessors for vertex\n }\n }\n }\n }", "public function breadthFirstSearch($origin, $destination, $maxTime) {\n // mark all nodes as unvisited\n foreach ($this->graph as $vertex => $adj) {\n $this->visited[$vertex] = false;\n }\n\n // create an empty queue\n $q = new SplQueue();\n\n // enqueue the origin vertex and mark as visited\n $q->enqueue($origin);\n $this->visited[$origin] = true;\n\n // this is used to track the path back from each node\n $path = array();\n $path[$origin] = new SplDoublyLinkedList();\n $path[$origin]->setIteratorMode(\n SplDoublyLinkedList::IT_MODE_FIFO|SplDoublyLinkedList::IT_MODE_KEEP\n );\n\n $path[$origin]->push($origin);\n\n $found = false;\n // while queue is not empty and destination not found\n while (!$q->isEmpty() && $q->bottom() != $destination) {\n $t = $q->dequeue();\n\n if (!empty($this->graph[$t])) {\n // for each adjacent neighbor\n foreach ($this->graph[$t] as $vertex) {\n $totalTime = 0;\n foreach($vertex as $v=>$time){\n if (!$this->visited[$v]) {\n // if not yet visited, enqueue vertex and mark\n // as visited\n $q->enqueue($v);\n $this->visited[$v] = true;\n // add vertex to current path\n $path[$v] = clone $path[$t];\n $path[$v]->push([$v => $time]);\n $totalTime += $time;\n if($v == $destination){\n $sep = '';\n $output = '';\n $totalTime = 0;\n foreach ($path[$destination] as $key => $value) {\n if($key == 0) {\n $output .= $sep. $value;\n $sep = '=>';\n continue;\n }\n foreach($value as $vertex => $time){\n $output .= $sep. $vertex;\n $totalTime += $time;\n }\n\n }\n $output .= $sep.$totalTime.PHP_EOL;\n if($totalTime < $maxTime) {\n echo $output;\n break;\n }else {\n $this->visited[$v] = false;\n unset($path[$v]);\n }\n }\n }\n }\n\n }\n }\n }\n //print_r($path);\n if (!isset($path[$destination])) {\n echo \"Path not found between $origin to $destination\".PHP_EOL;\n }\n }", "function dijkstra(Graph $graph, $startIndex) {\n // init spt bool array to mark visited vertices\n // init dist array to mark distance between vertices from start\n // init parent array to all -1\n // set start dist to 0\n // set traverse ptr to start index\n // while not all vertices are visited\n // put index into spt\n // get edges of index\n // loop through all edges of this index\n // if distance to reach this vertex is bigger than this index dist + current weight\n // set this vertex dist to this index dist + current weight\n // set parent of this vertex to index\n // advance to next edge\n // loop through all vertices\n // if stored dist is bigger than current vertex dist\n // set dist to new smaller dist\n // set index to the smaller dist\n $spt = array_fill(0, $graph->getVerticeCount(), False);\n $dist = array_fill(0, $graph->getVerticeCount(), PHP_INT_MAX);\n $parent = array_fill(0, $graph->getVerticeCount(), -1);\n\n $dist[$startIndex] = 0;\n $index = $startIndex;\n\n while (in_array(False, $spt)) {\n $spt[$index] = True;\n $curr = $graph->getEdges()[$index];\n while (!empty($curr)) {\n if ($dist[$curr->data] > $dist[$index] + $curr->weight) {\n $dist[$curr->data] = $dist[$index] + $curr->weight;\n $parent[$curr->data] = $index;\n }\n $curr = $curr->next;\n }\n $minDist = PHP_INT_MAX;\n for ($i=0; $i < $graph->getVerticeCount(); $i++) { \n if (!$spt[$i] && $minDist > $dist[$i]) {\n $minDist = $dist[$i];\n $index = $i;\n }\n }\n }\n return $parent;\n}", "function prims_mst($distance_table){\n //TODO use sets or something similar to sets for this\n $u = array();\n $v = array_keys($distance_table);\n\n $new_edges = array();\n $all_vertexes = array_keys($distance_table);\n\n $a = array_pop($v);\n array_push($u,$a);\n\n //Keep looping until we've got all the edges\n $i = 0; //Loop protector to prevent infinite loops\n $max_ittr = count($all_vertexes)+4;\n while(!contains_all_verticies($u,$all_vertexes) && $i < $max_ittr){\n\n //Now go through all the edges in $v find it's closest neighbour in $u\n //Find the miinmum of those and put that vertex in $v\n $min_v = INF;\n $min_i = 0;\n $min_j = 0;\n foreach($v as $v1){\n $mins = find_min_vertex($v1,$u,$distance_table);\n if($mins[1] < $min_v){\n $min_v = $mins[1];\n $min_i = $mins[0];\n $min_j = $v1;\n }\n }\n //add the edge to the edges and the vertex to $u\n array_push($u,$min_j);\n array_push($new_edges,array($min_j,$min_i));\n\n $v = array_delete($v,$min_j);\n\n\n\n $i++;\n }\n\n return $new_edges;\n}", "public function createResult()\n {\n $totalCostCheapestPathFromTo = array();\n $cheapestPathFromTo = array();\n $vertexSet = array_values($this->graph->getVertices());\n\n $nVertices = count($vertexSet);\n\n //Total cost from i to i is 0\n for ($i = 0; $i < $nVertices; ++$i) {\n\n $totalCostCheapestPathFromTo[$i][$i] = 0;\n }\n\n // Calculating shortestPath(i,j,k+1) = min(shortestPath(i,j,k),shortestPath(i,k+1,k) + shortestPath(k+1,j,k))\n for ($k = 0; $k < $nVertices; ++$k) {\n\n for ($i = 0; $i < $nVertices; ++$i) {\n\n $this->updateInfo($vertexSet, $totalCostCheapestPathFromTo, $cheapestPathFromTo, $i, $k);\n\n for ($j = 0; $j < $nVertices; ++$j) {\n\n $this->updateInfo($vertexSet, $totalCostCheapestPathFromTo, $cheapestPathFromTo, $i, $k);\n $this->updateInfo($vertexSet, $totalCostCheapestPathFromTo, $cheapestPathFromTo, $i, $j);\n $this->updateInfo($vertexSet, $totalCostCheapestPathFromTo, $cheapestPathFromTo, $k, $j);\n\n // If we find that the path from (i, k) + (k, j) is shorter than the path (i, j), the new path is\n // calculated.\n if ($totalCostCheapestPathFromTo[$i][$k] + $totalCostCheapestPathFromTo[$k][$j] < $totalCostCheapestPathFromTo[$i][$j]) {\n\n $totalCostCheapestPathFromTo[$i][$j] = $totalCostCheapestPathFromTo[$i][$k] + $totalCostCheapestPathFromTo[$k][$j];\n\n // Testing if we are not repeating a vertex' path over itself before merging the paths\n if ($vertexSet[$i]->getId() != $vertexSet[$k]->getId() || $vertexSet[$k]->getId() != $vertexSet[$j]->getId()) {\n\n $cheapestPathFromTo[$vertexSet[$i]->getId()][$vertexSet[$j]->getId()] = array_merge($cheapestPathFromTo[$vertexSet[$i]->getId()][$vertexSet[$k]->getId()],\n $cheapestPathFromTo[$vertexSet[$k]->getId()][$vertexSet[$j]->getId()]);\n }\n\n }\n\n }\n\n }\n\n if($totalCostCheapestPathFromTo[$k][$k] < 0) {\n\n throw new UnexpectedValueException('Floyd-Warshall not supported for negative cycles');\n }\n }\n\n return new FloydWarshallResult($cheapestPathFromTo, $this->graph);\n }", "static public function DijkstraAlgorithmByArray($first, $finish) {\n $link_db = Piwidict::getDatabaseConnection();\n\n if ($first == $finish) return array(0,array($first));\n\n $vertex_arr = PWRelatedWords::getAllRelatedWords(); // list of unvisited vertexes generated from list of vertexes having an edge\n if (!in_array($first, $vertex_arr))\n return array(0,NULL); // search vertexes is not connected with any edge\n\n $infinity = 1000000;\n foreach ($vertex_arr as $v)\n $unvisited[$v] = $infinity;\n $unvisited[$first] = 0;\n\n $edge_table = PWRelatedWords::getTableName(); // table of related words (words and distance between them)\n\n $prev_arr = array(); // list of next-to-last for path from first to last vertexes\n $prev_arr[$first] = NULL;\n\n $prev=$first;\n $path_len = 0;\n// $dist_arr = array(); // <key>,<value>: list of distances <value> from $first to <key>\n// $dist_arr[$first] =0;\n\n $success = 0; // the condition of finding the shortest path in the given vertex ($finish)\n\n//print \"<PRE>\";\n$count=0;\n//print $first;\n//return;\n while (!$success && sizeof($unvisited) && $path_len<$infinity) { // until all vertixes will not be visited\n// && $count<10\nprint \"<p>\".$count.\": \".sizeof($unvisited);\n//.\".-----------------------------</p>\";\n//print_r($finish_arr);\n//print_r($len_arr);\n $query = \"SELECT * FROM $edge_table WHERE lemma_id1='$prev' or lemma_id2='$prev'\"; // search nearest vertexes to $prev (НЕТ необходимости сортировать, так как неважно в какой последовательности ставятся метки)\n $res_neib = $link_db -> query_e($query,\"Query failed in file <b>\".__FILE__.\"</b>, string <b>\".__LINE__.\"</b>\");\n\n while ($row_neib = $res_neib->fetch_object()) {\n if ($row_neib->lemma_id1 == $prev)\n $last = $row_neib->lemma_id2; // $last - nearest vertexes to $prev and last vertex for next paths\n else \n $last = $row_neib->lemma_id1;\n $new_path_len = $path_len + $row_neib->weight; // path length from $prev to $last (neighbour of $prev via semantic relations)\n\n// if (!isset($dist_arr[$last]) || $dist_arr[$last]>$new_path_len) { // this is new path from $first to $last OR \n if (isset($unvisited[$last]) && $unvisited[$last]>$new_path_len) { // this is new path from $first to $last OR \n // already (one) path from $first to $last does exist, but the new path is shorter\n// $dist_arr[$last] =\n $unvisited[$last] = $new_path_len;\n $prev_arr[$last] = $prev;\n }\n }\n $count++;\n\n $path_len = min(array_values($unvisited)); // choose minimal distance of path from first to any unvisited vertex \n $prev = array_search($path_len, $unvisited); // choose unvisited vertex with minimal distance\n\nprint \" = \".$path_len;\n\n unset($unvisited[$prev]); // mark this vertes as visited, delete it from unvisited list\n\n if ($prev == $finish) { // the shortest path in $finish are found!!\n $success=1; \n continue; \n }\n\n }\nprint \"<p>$count iterations\";\n\n if ($success) { // \n $path = array($finish);\n $prev = $prev_arr[$finish];\n\n while ($prev != NULL) {\n array_unshift($path,$prev);\n $prev = $prev_arr[$prev];\n }\n\n return array($path_len, $path); \n } else return array(NULL,NULL); // any path from $first to $finish are not found\n }", "public function shortestPaths($source, $target, array $exclude = array()) {\n\n $this->distance = array_fill_keys(array_keys($this->graph), INF);\n $this->distance[$source] = 0;\n $this->previous = array_fill_keys(array_keys($this->graph), array());\n $this->queue = array($source => 0);\n\n while (!empty($this->queue))\n $this->processNextNodeInQueue($exclude);\n\n if ($source === $target)\n return array(array($source));\n\n elseif (empty($this->previous[$target]))\n return array();\n\n else\n return $this->extractPaths($target);\n }", "function jeanisRoute($citys, $roads) {\n // 需要投递的城市\n $deliverMap = [];\n $k = count($citys);\n foreach ($citys as $city) {\n $deliverMap[$city] = true;\n }\n \n // road转成connectMap\n $connectMap = [];\n foreach ($roads as $item) {\n $connectMap[$item[0]][$item[1]] = $connectMap[$item[1]][$item[0]] = $item[2];\n }\n \n // 以第一个节点作为根\n $root = 1;\n \n // 其所有子节点中待投递城市的数量\n $subDeliveryCountArr = [];\n \n // 所有走过的边的距离之和\n $result = 0;\n \n // 最长距离\n $globalMaxDis = 0;\n \n processDis($subDeliveryCountArr, $connectMap, $deliverMap, $result, $globalMaxDis, $root, 0, $k);\n\n \n return 2 * $result - $globalMaxDis;\n}", "protected function dijkstraEdges ($from)\n\t{\n\t\t//init\n\t\t$lengths = array(); // vertexId => length\n\t\t$prevVertices = array(); // i => vertexId\n\t\t$vertices = $this->getVerticesIds(); // i => vertexId\n\n\t\t$prevVertices[$from] = null;\n\t\t$lengths[$from] = 0;\n\n\t\t// alg\n\t\twhile(count($vertices) > 0){ // while some vertices remain\n\t\t\t$minValue = null;\n\t\t\t$minKey = null;\n\t\t\tforeach($vertices as $i => $vertexKey){ //pop the one with shortest path\n\t\t\t\tif (isset($lengths[$vertexKey])){\n\t\t\t\t\tif($minValue === null || $lengths[$vertexKey] < $minValue){\n\t\t\t\t\t\t$minValue = $lengths[$vertexKey];\n\t\t\t\t\t\t$minKey = $i;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($minValue === null || $minKey === null){ //or pop random\n\t\t\t\treset($vertices);\n\t\t\t\tlist($minKey, $minValue) = each($vertices);\n\t\t\t}\n\t\t\t$u = $vertices[$minKey];\n\t\t\tunset($vertices[$minKey]);\n\n\t\t\tif (isset($lengths[$u])){\n\t\t\t\t$neighbours = array();\n\t\t\t\tforeach($this->edges[$u] as $key => $distance){ // get distances of neighbours\n\t\t\t\t\t$neighbours[$key] = $distance;\n\t\t\t\t}\n\t\t\t\tforeach($neighbours as $neighbourId => $neighbourDistance){\n\t\t\t\t\t$potentialLength = $lengths[$u] + $neighbourDistance;\n\t\t\t\t\tif(!isset($lengths[$neighbourId]) || $potentialLength < $lengths[$neighbourId]){ // check better route\n\t\t\t\t\t\t$lengths[$neighbourId] = $potentialLength;\n\t\t\t\t\t\t$prevVertices[$neighbourId] = $u;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $prevVertices;\n\t}", "static public function DijkstraAlgorithmByDB($first, $finish) {\n $link_db = Piwidict::getDatabaseConnection();\n\n if ($first == $finish) return array(0,array($first));\n\n $edge_table = PWRelatedWords::getTableName(); // table of related words (words and distance between them)\n $path_table = PWShortPath::getTableName(); // table of shortest paths (first, last, next-to-last vertexes, length of path)\n//print \"$first, $finish\";\n $query = \"SELECT lemma_id1 FROM $edge_table WHERE lemma_id1='$first' or lemma_id2='$first' LIMIT 1\"; // check if any edge with $first exists\n $res_exist = $link_db -> query_e($query,\"Query failed in file <b>\".__FILE__.\"</b>, string <b>\".__LINE__.\"</b>\");\n if ($link_db -> query_count($res_exist) == 0) \n return array(0,NULL);\n\n $query = \"SELECT lemma_id1 FROM $edge_table WHERE lemma_id1='$finish' or lemma_id2='$finish' LIMIT 1\"; // check if any edge with $finish exists\n $res_exist = $link_db -> query_e($query,\"Query failed in file <b>\".__FILE__.\"</b>, string <b>\".__LINE__.\"</b>\");\n if ($link_db -> query_count($res_exist) == 0) \n return array(0,NULL);\n\n $success = 0; // the condition of finding the shortest path in the given vertex ($finish)\n $count_row = 1;\n\n $query = \"UPDATE $path_table SET mark=0 where lemma_id_1=\".$first; // mark all vertexes as unvisited (if already any paths in DB exists)\n// $query = \"DELETE FROM $path_table where lemma_id_1=\".$first; // mark all vertexes as unvisited (if already any paths in DB exists)\n $link_db -> query_e($query,\"Query failed in file <b>\".__FILE__.\"</b>, string <b>\".__LINE__.\"</b>\");\n\n $prev = $first;\n $path_len = 0;\n//print \"<PRE>\";\n$count=0;\n//print $first;\n//return;\n while (!$success && $count_row) { // until all vertixes will not be visited\n $count++;\n// && $count<3\nprint \"<p>\".$count.\": \".$count_row.\".-----------------------------</p>\";\n//print_r($finish_arr);\n//print_r($len_arr);\n $query = \"SELECT * FROM $edge_table WHERE lemma_id1='$prev' or lemma_id2='$prev'\"; // search nearest vertexes to $prev (НЕТ необходимости сортировать, так как неважно в какой последовательности ставятся метки)\n $res_neib = $link_db -> query_e($query,\"Query failed in file <b>\".__FILE__.\"</b>, string <b>\".__LINE__.\"</b>\");\n\n while ($row_neib = $res_neib->fetch_object()) {\n if ($row_neib->lemma_id1 == $prev)\n $last = $row_neib->lemma_id2; // $last - nearest vertexes to $prev and last vertex for next paths\n else \n $last = $row_neib->lemma_id1;\n $new_path_len = $path_len + $row_neib->weight; // path length from $prev to $last (neighbour of $prev via semantic relations)\n\n $query = \"SELECT path_len,mark FROM $path_table WHERE lemma_id_1='$first' and lemma_id_n='$last'\"; // recounted only unvisited vertexes\n//print \"<P>$query\";\n $res_path = $link_db -> query_e($query,\"Query failed in file <b>\".__FILE__.\"</b>, string <b>\".__LINE__.\"</b>\");\n\n if ($link_db -> query_count($res_path) == 0) {\n // 1. this is new path from $start to $finish which is absent in table pw_short_path_LANG_CODE\n $query = \"INSERT INTO $path_table (`lemma_id_1`, `lemma_id_n`, `path_len`, `lemma_id_prev_n`, mark) VALUES ($first, $last, $new_path_len, $prev, 0)\";\n//print \"<P>$query\";\n $link_db -> query_e($query,\"Query failed in file <b>\".__FILE__.\"</b>, string <b>\".__LINE__.\"</b>\");\n } else {\n // 2. already (one) path from $start to $finish does exist, then update (length and previous word) only if length of new path is shorter\n $row_path = $res_path->fetch_object();\n if ($row_path->mark==0 && $new_path_len < $row_path->path_len) {\n $query = \"UPDATE $path_table SET path_len=$new_path_len, lemma_id_prev_n=$prev WHERE lemma_id_1=$first and lemma_id_n=$last\";\n//print \"<P>$query\";\n $link_db -> query_e($query,\"Query failed in file <b>\".__FILE__.\"</b>, string <b>\".__LINE__.\"</b>\");\n }\n }\n }\n\n $query = \"SELECT path_len, lemma_id_n FROM $path_table WHERE lemma_id_1='$first' and mark=0 order by path_len\"; // choose minimal distance of path from first to any unvisited vertex \n $res_min = $link_db -> query_e($query,\"Query failed in file <b>\".__FILE__.\"</b>, string <b>\".__LINE__.\"</b>\");\n\n $count_row = $link_db -> query_count($res_min);\n if (!$count_row) // all paths from start are marked as visited\n $path_len = 0;\n\n else { // choose vertex with minimal distance\n $row_min = $res_min->fetch_object(); // get only one row - minimal path length\n $path_len = $row_min->path_len; // choose minimal distance of path from first to any unvisited vertex \n $prev = $row_min->lemma_id_n; // choose unvisited vertex with minimal distance\n }\n//print \"<p>prev:$prev, path_len:\".$path_len;\n \n $query = \"UPDATE $path_table SET mark=1 where lemma_id_1=$first and lemma_id_n=$prev\"; // mark vertex $prev as unvisited\n//print \"<P>$query\";\n $link_db -> query_e($query,\"Query failed in file <b>\".__FILE__.\"</b>, string <b>\".__LINE__.\"</b>\");\n\n if ($prev == $finish) // the shortest path in $finish are found!!\n $success=1; \n }\nprint \"<p>$count iterations\";\n\n if ($success) { // \n $path = array($finish);\n $prev = $finish;\n\n while ($prev != start) {\n $query = \"SELECT lemma_id_prev_n FROM $path_table WHERE lemma_id_1='$first' and lemma_id_n='$prev' order by path_len LIMIT 1\"; // choose minimal distance of path from first to any unvisited vertex \n $res = $link_db -> query_e($query,\"Query failed in file <b>\".__FILE__.\"</b>, string <b>\".__LINE__.\"</b>\");\n\n $row = $res->fetch_object();\n $prev = $row -> lemma_id_prev_n;\n\n array_unshift($path,$prev);\n }\n\n return array($path_len, $path); \n } else return array(NULL,NULL); // any path from $first to $finish are not found\n }", "function floydWarshall(array $graph): array\n{\n $dist = $graph;\n\n $size = count($dist);\n\n for ($k = 0; $k < $size; $k++) {\n for ($i = 0; $i < $size; $i++) {\n for ($j = 0; $j < $size; $j++) {\n $dist[$i][$j] = min($dist[$i][$j], $dist[$i][$k] + $dist[$k][$j]);\n }\n }\n }\n return $dist;\n}", "public function BreadthFirstSearch($node){\r\n if($node == null)\r\n return;\r\n\r\n $queue = [];\r\n array_push($queue,$node);\r\n\r\n while (count($queue) > 0) {\r\n $node = array_shift($queue);\r\n echo $node.\" \";\r\n\r\n if($node->left != null)\r\n array_push($queue,$node->left);\r\n\r\n if($node->right != null)\r\n array_push($queue,$node->right);\r\n }\r\n }", "public function get_neighbors()\n\t{\n\t\t// get parent Directory and its children\n\t\t$path = $this->dir->getPath();\n\t\t$parent = new self(dirname($path));\n\t\t$dirs = $parent->get_dirs();\n\n\t\t// find position of current dir\n\t\t$key = array_search(basename($path), $dirs);\n\n\t\t// check if previous/next directories exist\n\t\t$neighbors = array();\n\t\tif (array_key_exists($key - 1, $dirs))\n\t\t\t$neighbors['prev'] = $dirs[$key - 1];\n\t\tif (array_key_exists($key + 1, $dirs))\n\t\t\t$neighbors['next'] = $dirs[$key + 1];\n\n\t\treturn $neighbors;\n\t}", "protected function dijkstraVertices ($from)\n\t{\n\t\t//init\n\t\t$profitSum = array(); // vertexId => length\n\t\t$prevVertices = array(); // i => vertexId\n\t\t$vertices = $this->getVerticesIds(); // i => vertexId\n\t\t$verticesProfitTmp = $this->vertices->toArray(); // vertexId => profit\n\t\t$verticesProfit = array();\n\t\tforeach ($verticesProfitTmp as $key => $item){\n\t\t\t$verticesProfit[$key] = $item;\n\t\t}\n\t\t$prevVertices[$from] = null;\n\t\t$profitSum[$from] = 0;\n\n\t\t// alg\n\t\twhile(count($vertices) > 0){ // while some vertices remain\n\t\t\t$minValue = null;\n\t\t\t$minKey = null;\n\t\t\tforeach($vertices as $i => $vertexKey){ // pop the one with lowest profit\n\t\t\t\tif (isset($profitSum[$vertexKey])){\n\t\t\t\t\tif($minValue === null || $profitSum[$vertexKey] < $minValue){\n\t\t\t\t\t\t$minValue = $profitSum[$vertexKey];\n\t\t\t\t\t\t$minKey = $i;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($minValue === null || $minKey === null){ //or pop random\n\t\t\t\treset($vertices);\n\t\t\t\tlist($minKey, $minValue) = each($vertices);\n\t\t\t}\n\t\t\t$u = $vertices[$minKey];\n\t\t\tunset($vertices[$minKey]);\n\n\t\t\tif (isset($profitSum[$u])){\n\t\t\t\t$neighbours = array();\n\t\t\t\tforeach($this->edges[$u] as $key => $distance){ // get profits of neighbours\n\t\t\t\t\t$profit = $verticesProfit[$key];\n\t\t\t\t\t$neighbours[$key] = $profit == 0 ? 0.01 : 1000-log($profit);\n\t\t\t\t}\n\t\t\t\tforeach($neighbours as $neighbourId => $neighbourDistance){\n\t\t\t\t\t$potentialLength = $profitSum[$u] + $neighbourDistance;\n\t\t\t\t\tif(!isset($profitSum[$neighbourId]) || $potentialLength < $profitSum[$neighbourId]){ // check better route\n\t\t\t\t\t\t$profitSum[$neighbourId] = $potentialLength;\n\t\t\t\t\t\t$prevVertices[$neighbourId] = $u;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $prevVertices;\n\t}", "function getNeighbours($arr, $x, $y){\n\t$c = getColumn($arr, $x);\n\t$r = getRow($arr, $y);\n\t[$bnum, $bpos] = locateBlock($x, $y);\n\t$b = getBlock($arr, $bnum);\n\t$ret = array_merge(remove($b, $bpos), remove($c, $y), remove($r, $x));\n\treturn $ret;\n}", "function findNeighbor($Vertex_forWho,$Vertex_finder,$word,$differenceCount){\n\t\t//since some words like car had r as the end but cars had the r and s as end\n\t\t//this function kept breaking, because this was my base case, but to save myself\n\t\t// a headache i split them up into word sized tries\n\n\t\t//if the end of the word is met, then if the difference is only 1 push it back\n\t\t//as an edge to both finder and for who.\n\n\t\tif($Vertexfind->end == true){\n\t\t\tif($differenceCount == 1){\n\t\t\t\t$Vertex_forWho->neighbors[] = $Vertex_finder;\n\t\t\t\t$Vertex_finder->neighbors[] = $Vertex_forWho;\n\t\t\t}\n\t\t}//if the word is still 1 character long, check its edges and find the neighbors for it\n\t\telse if(strlen($word) == 1){\n\t\t\tforeach($Vertex_finder->edgeP as $e){\n\t\t\t\tif($e->letter == $word[0])\n\t\t\t\t\tfindNeighbor($Vertex_forWho,$e->child,substr($word,1,strlen($word)),$differenceCount);\n\t\t\t\telse\n\t\t\t\t\tfindNeighbor($Vertex_forWho,$e->child,substr($word,1,strlen($word)),$differenceCount + 1);\n\t\t\t}\n\t\t}//for any wordzie bigger than 1, add all the neighbors\n\t\telse if(strlen($word) > 1){\n\t\t\tif($differenceCount > 1)\n\t\t\t\treturn;\n\t\t\telse if($differenceCount == 0){\n\t\t\t\tforeach($Vertex_finder->edgeP as $e){\n\t\t\t\t\tif($e->letter == $word[0])\n\t\t\t\t\t\tfindNeighbor($Vertex_forWho,$e->child,substr($word,1,strlen($word)), 0);\n\t\t\t\t\telse\n\t\t\t\t\t\tfindNeighbor($Vertex_forWho,$e->child,substr($word,1,strlen($word)), 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if($differenceCount == 1){\n\t\t\t\tforeach($Vertex_finder->edgeP as $e){\n\t\t\t\t\tif($e->letter == $word[0])\n\t\t\t\t\t\tfindNeighbor($Vertex_forWho,$e->child,substr($word,1,strlen($word)),$differenceCount);\n\t\t\t\t\telse\n\t\t\t\t\t\tfindNeighbor($Vertex_forWho,$e->child,substr($word,1,strlen($word)),$differenceCount + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function floydWarshall($graph, $V, $INF)\n{\n $dist = [];\n foreach ($graph as $ind => $g) {\n foreach ($g as $key) {\n $dist[$ind][] = 0;\n }\n }\n $path = $dist;\n\n /* initial values for based on shortest paths considering no intermediate vertex. */\n for ($i = 0; $i < $V; $i++) {\n for ($j = 0; $j < $V; $j++) {\n $dist[$i][$j] = $graph[$i][$j];\n $path[$i][$j] = ($graph[$i][$j] > 0 && $graph[$i][$j] < $INF) ? 1 : 0;\n }\n }\n\n /* Add all vertices */\n for ($k = 0; $k < $V; $k++) {\n // Pick all vertices as source one by one\n for ($i = 0; $i < $V; $i++) {\n // Pick all vertices as destination\n // for the above picked source\n for ($j = 0; $j < $V; $j++) {\n // If vertex k is on the shortest path from\n // i to j, then update the value of dist[i][j]\n if (\n $dist[$i][$k] + $dist[$k][$j] <\n $dist[$i][$j]\n ) {\n $dist[$i][$j] = $dist[$i][$k] +\n $dist[$k][$j];\n $path[$i][$j] = $path[$i][$k] +\n $path[$k][$j];\n }\n }\n }\n }\n\n return [$dist, $path];\n}", "public function findCheapest(string $city1, string $city2): array\n {\n $airport1 = $this->airportRepository->findByCity($city1);\n \n abort_if(is_null($airport1), 404, 'Airport in the city ' . $city1 . ' does not exist.');\n \n $airport2 = $this->airportRepository->findByCity($city2);\n \n abort_if(is_null($airport2), 404, 'Airport in the city ' . $city2 . ' does not exist.');\n \n if (Cache::has('routes')) {\n $routes = Cache::get('routes');\n } else {\n $routes = $this->routeRepository->findAll();\n }\n \n $graph = $this->dijkstraGraph->createGraph($routes, 'source_id', 'destination_id', 'price');\n \n $cheapestPath = $this->dijkstraGraph->shortestPath($airport1['id'], $airport2['id']);\n \n $airports = $this->airportRepository->findByIds($cheapestPath);\n \n $cheapestRoute = [];\n $price = 0;\n foreach ($cheapestPath as $key => $element) {\n $airport = $airports[$element];\n if ($key === array_key_first($cheapestPath)) {\n $cheapestRoute['start'] = $this->getRouteInformation($airport);\n $price += $graph[$cheapestPath[$key]][$cheapestPath[$key + 1]];\n } elseif ($key === array_key_last($cheapestPath)) {\n $cheapestRoute['end'] = $this->getRouteInformation($airport);\n } else {\n $cheapestRoute['through'][] = $this->getRouteInformation($airport);\n $price += $graph[$cheapestPath[$key]][$cheapestPath[$key + 1]];\n }\n }\n \n $cheapestRoute['price'] = $price;\n \n return $cheapestRoute;\n }", "public function getShortestPath($origin, $destination);", "public function findPath(){\r\n\r\n $position = $this->_startPoint;\r\n $tile = $this->_getTile($position);\r\n\r\n while(!$this->_checkEnd($position)){\r\n $direction = $tile->move();\r\n $position = $this->_getNewPosition($position,$direction);\r\n $newTile = $this->_getTile($position);\r\n $newTile->enter($direction);\r\n $tile = $newTile;\r\n }\r\n\r\n return $this->_getResult();\r\n }", "public function step(array $matrix, array &$visitedPoints, $point_y, $point_x): void\n {\n if (isset($visitedPoints[$point_y][$point_x])) {\n return;\n }\n\n /**\n * We have 4 directions with offsets (y,x);\n * - up (-1,0)\n * - left (0,-1)\n * - right (0,1)\n * - down (1,0)\n */\n\n // First check next neighbors for the cheapest and then add you own risk to their risk\n // The previous neighbors we always see as up or left\n $neighbors = [];\n foreach ([[-1,0], [0,-1], [0,1], [1,0]] as [$offset_y, $offset_x]) {\n // Don't bother with non-existing points\n if (!isset($matrix[$point_y+$offset_y][$point_x+$offset_x])) {\n continue;\n }\n $neighbors[$matrix[$point_y+$offset_y][$point_x+$offset_x]] = [\n \"y\" => $point_y+$offset_y,\n \"x\" => $point_x+$offset_x,\n \"risk_val\" => $matrix[$point_y+$offset_y][$point_x+$offset_x],\n \"total_risk_val\" => $visitedPoints[$point_y+$offset_y][$point_x+$offset_x][\"total_risk\"]];\n }\n if (empty($neighbors)) {\n // start\n $visitedPoints[$point_y][$point_x] = [\n \"total_risk_val\" => 0,\n \"risk_val\" => $matrix[$point_y+$offset_y][$point_x+$offset_x],\n \"cheapest_neighbor_x\" => null,\n \"cheapest_neighbor_y\" => null\n ];\n } else {\n sort($neighbors);\n $cheapest_neighbor = reset($neighbors);\n $visitedPoints[$point_y][$point_x] = [\n \"total_risk_val\" => $cheapest_neighbor[2] + $matrix[$point_y][$point_x],\n \"risk_val\" => $matrix[$point_y+$offset_y][$point_x+$offset_x],\n \"cheapest_neighbor_x\" => $cheapest_neighbor[1],\n \"cheapest_neighbor_y\" => $cheapest_neighbor[0]\n ];\n }\n foreach ([[-1,0], [0,-1], [0,1], [1,0]] as [$offset_y, $offset_x]) {\n // Don't bother with non-existing points\n if (!isset($matrix[$point_y+$offset_y][$point_x+$offset_x])) {\n continue;\n }\n $this->step($matrix, $visitedPoints, $point_y+$offset_y, $point_x+$offset_x);\n }\n return;\n }", "function find_min_vertex($v1,$vertices,$distance_table){\n $min = INF;\n $min_i = 0;\n\n foreach($vertices as $v2){\n $d = distance_lookup($v1,$v2,$distance_table);\n if($d < $min){\n $min = $d;\n $min_i = $v2;\n }\n }\n return array($min_i,$min);\n\n}", "function generar_DFS($indice,$mat,$numero){\r\n $padre[$indice] = 1;\r\n vardump($numero);\r\n for($i = 0; $i<$numero; $i++){\r\n if($i == $indice){\r\n for($j = 0; $j<$numero; $j++){\r\n if($mat[$i][$j]==1 && $padre[$j]==0){ #si el vertice inicial esta conectado al vertice final y este no fue visitado\r\n $matrizDFS[$i][$j] = 1;\r\n generar_DFS($j,$mat,$numero);\r\n } #se registra la conexion en la matriz dfs global\r\n }\r\n }\r\n }\r\n #los datos de la matriz global pasan a una matriz local\r\n return $matrizDFS; #se regresa la matriz DFS\r\n}", "function getBikeParkLoc($from_lat, $from_lon){\n // find the closest node_id to ($from_lat, $from_lon) on a way\n global $mysqli;\n $offset = 0.1;\n $sql = \"SELECT node_id, lat, lon, (lat-{$from_lat})*(lat-{$from_lat}) + (lon - {$from_lon})*(lon - {$from_lon}) AS x FROM osm_bike_parkings\n ORDER BY x ASC LIMIT 1\";\n $arr = array();\n $result = $mysqli->query($sql);\n while($result && $row = $result->fetch_assoc()){\n $arr[] = array($row['lat'],$row['lon']);\n }\n return $arr[0];\n}", "public function neighbors()\n {\n $parent = $this->parent;\n $exclude = $this->term_id;\n\n $query = static::where('term_id', '!=', $exclude);\n\n return $parent ? $query->where('parent', $parent) : $query->whereNull('parent');\n }", "private function isReachable(array $from, array $to): bool\n {\n $cells = [];\n if ($from[0] === $to[0]) {\n for ($i = min($from[1], $to[1]); $i <= max($from[1], $to[1]); ++$i) {\n $cells[] = $this->getCell($from[0], $i);\n }\n } else if ($from[1] === $to[1]) {\n for ($i = min($from[0], $to[0]); $i <= max($from[0], $to[0]); ++$i) {\n $cells[] = $this->getCell($i, $from[1]);\n }\n } else {\n $x1 = min($from[0], $to[0]);\n $y1 = $x1 === $from[0] ? $from[1] : $to[1];\n $x2 = max($from[0], $to[0]);\n $y2 = $x2 === $from[0] ? $from[1] : $to[1];\n while (abs($x1 - $x2) >= 0 && abs($y1 - $y2) >= 0) {\n $cells[] = $this->getCell($x1, $y1);\n if ($x1 > $x2) {\n --$x1;\n } else if ($x1 < $x2) {\n ++$x1;\n } else if ($x1 === $x2) {\n break;\n }\n if ($y1 > $y2) {\n --$y1;\n } else if ($y1 < $y2) {\n ++$y1;\n } else if ($y1 === $y2) {\n break;\n }\n }\n }\n\n $pieces = count(array_filter($cells, function ($i) {\n return !is_null($i);\n }));\n\n if ($pieces === 1) {\n return true;\n }\n if ($pieces === 2) {\n $result = 0;\n if ($cells[0] instanceof Piece) {\n $result += $cells[0]->getColor() !== $this->getCell($from[0], $from[1])->getColor() ? 1 : 0;\n }\n if ($cells[count($cells) - 1] instanceof Piece) {\n $result +=\n $cells[count($cells) - 1]->getColor() !== $this->getCell($from[0], $from[1])->getColor() ? 1 : 0;\n }\n if (\n $this->getCell($from[0], $from[1]) instanceof Pawn &&\n $from[0] === $to[0]\n ) {\n $result += 1;\n }\n return $result === 1;\n }\n return false;\n }", "public function neighbors($v);", "public function getNeighbors(array $columns = ['*']);", "function MinimumDistance($distance, $shortestPathTreeSet, $verticesCount)\r\n\t{\r\n\t\tglobal $INT_MAX;\r\n\t\t$min = $INT_MAX;\r\n\t\t$minIndex = 0;\r\n\r\n\t\tfor ($v = 0; $v < $verticesCount; ++$v)\r\n\t\t{\r\n\t\t\tif ($shortestPathTreeSet[$v] == false && $distance[$v] <= $min)\r\n\t\t\t{\r\n\t\t\t\t$min = $distance[$v];\r\n\t\t\t\t$minIndex = $v;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $minIndex;\r\n\t}" ]
[ "0.6038467", "0.57633936", "0.57107615", "0.5567789", "0.5436847", "0.53547996", "0.5277927", "0.5260983", "0.519865", "0.5121522", "0.51197696", "0.5076012", "0.5063239", "0.5058841", "0.5001685", "0.49322623", "0.4921283", "0.4901554", "0.4843623", "0.47763368", "0.47162768", "0.47142154", "0.4713368", "0.47084874", "0.4701476", "0.46147534", "0.46079615", "0.4587651", "0.45606837", "0.4534258" ]
0.5885793
1
Return the method name for the setter of a given variable Example: Converts 'user_id' to 'setUserId'
protected function getSetter($key) { $key = str_replace('_', ' ', $key); $key = ucwords($key); $key = str_replace(' ', '', $key); return 'set'.$key; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSetterName()\n {\n return \"set\" . self::underscoreToCamelCase($this->name,true);\n }", "function setter(string $property): string\n{\n return 'set' . Str::studly($property);\n}", "private function setterMethodName($parameter)\n {\n return 'set' . studly_case($parameter);\n }", "public function getMethodName($dbField)\n {\n return 'set' . ucfirst($this->convertToCamelCase($dbField));\n }", "public function getMutatorMethod($key)\n {\n $attribute = ucfirst(Str::camel($key));\n\n return \"set{$attribute}Value\";\n }", "protected function getColumnSetter($column) {\n return 'set' . $this->getColumnForParameter($column)->getPhpName();\n }", "protected static function columnToSetterFunc()\n {\n return function ($tableName, $columnName) {\n $words = explode('_', $columnName);\n\n if (count($words) <= 1) { // no table prefix\n $name = 'set' . ucfirst($columnName);\n } else {\n $tablePrefix = array_shift($words);\n $name = 'set' . implode('', array_map('ucfirst', $words));\n }\n\n return $name;\n };\n }", "protected function getServiceSetterName()\n {\n return 'setLogger';\n }", "public function setMethodName( $value ) {\r\n\t\t$this->method_name = $value;\r\n\t}", "function __set($attr_name, $value) {\n // in $attr_name, replace _ with \" \"\n $attr_name = str_replace('_', ' ', $attr_name);\n $attr_name = ucwords($attr_name);\n $attr_name = str_replace(' ', '', $attr_name);\n $function = \"set$attr_name\";\n //var_dump($function);\n $this->$function($value);\n }", "function setMethod($val) {\n $this->identifier = $this->updateDB('identifier', $val);\n }", "protected function variableToMethodString($variable_name) {\n $var_split = preg_split(\"/_/\", $variable_name);\n $return_string = \"\";\n foreach ($var_split as $var) {\n $return_string .= ucFirst($var);\n }\n return $return_string;\n }", "protected function smartyPropertyToSetter($property)\n {\n $words = explode('_', strtolower($property));\n\n $setter = 'set';\n foreach ($words as $word) {\n $setter .= ucfirst(trim($word));\n }\n\n return $setter;\n }", "function getter(string $property): string\n{\n return 'get' . Str::studly($property);\n}", "private function getPropertyName($methodName)\n {\n $pattern = implode('|', array_merge(self::$accessorPrefixes, self::$mutatorPrefixes));\n\n if (preg_match('/^('.$pattern.')(.+)$/i', $methodName, $matches)) {\n return $matches[2];\n }\n }", "protected function getMutatorName($value)\n {\n $value = ucwords(str_replace(['-', '_'], ' ', $value));\n\n return lcfirst(str_replace(' ', '', $value));\n }", "public function setterIze($offset)\n {\n return 'set' . str_replace(' ', '', ucwords(strtr($offset, '_-', ' ')));\n }", "public function getGetterName()\n {\n return \"get\" . self::underscoreToCamelCase($this->name,true);\n }", "final protected function createMutatorName(string $prefix, string $field): string\n {\n return ($prefix . \\str_replace('_', '', \\ucwords($field, '_')));\n }", "public function setName($value);", "public function stringtoMethod($string = null, $prefix = 'set')\n {\n if(empty($string) || is_numeric($string) || !strlen($string) > 2) {\n return false;\n }\n\n return $prefix.ucfirst($string);\n }", "public function getName(): string\n {\n if (!$this->useAlternateName) {\n return 'get' . $this->getPropertyName();\n } else {\n $methodName = 'get' . $this->getPropertyName() . 'By';\n\n $camelizedColumns = array_map([TDBMDaoGenerator::class, 'toCamelCase'], $this->foreignKey->getUnquotedLocalColumns());\n\n $methodName .= implode('And', $camelizedColumns);\n\n return $methodName;\n }\n }", "protected function getColumnSetter($name = 'version_column')\n {\n return 'set' . $this->getColumnPhpName($name);\n }", "private function getFieldNameFromMethodName($methodName)\n {\n $str = substr($methodName, 3); // removing 'get'\n $str = $this->lcfirst($str);\n $str = preg_replace('/([A-Z])/', '_$1', $str);\n return strtolower($str);\n }", "public static function set($varname, $varvalue, $method = null){\n \n self::load();\n \n if(is_null($method)){\n $method = self::method();\n }\n \n switch ( strtoupper($method) ) {\n \n case 'GET':\n self::$request->query->set($varname, $varvalue);\n break;\n \n case 'POST':\n self::$request->request->set($varname, $varvalue);\n break;\n }\n }", "function propertyName( $id );", "public function __set($_name, $_value);", "public function __set($var, $value) { $this->{$this->_parameterMap[$var]} = $value; }", "public function __set($var, $value) { $this->{$this->_parameterMap[$var]} = $value; }", "public function __set ($variableName, $value) {\n // write\n }" ]
[ "0.77010584", "0.7133158", "0.67792386", "0.6497578", "0.6461078", "0.64607704", "0.632203", "0.61418223", "0.6036828", "0.5963286", "0.5763751", "0.5756819", "0.5698017", "0.56674814", "0.5553794", "0.55533886", "0.55370986", "0.55077225", "0.54966855", "0.54821616", "0.54574376", "0.54147255", "0.5398416", "0.5393512", "0.53584313", "0.5349467", "0.5314528", "0.53093785", "0.53093785", "0.5299027" ]
0.7297386
1
Set the given field with the given value typecasted as an integer
protected function setAsInteger($field, $value) { $this->object[$field] = (int) $value; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setValue(int $field, $value) : void;", "public function setValue($field, $value): int {\n if (in_array($field, static::fields, TRUE)){\n $this->{$field}->setValue($value);\n return 1;\n }\n return 0;\n }", "function o_castInt($value) {\n\t\t\treturn Obj::singleton()->castInt($value);\n\t\t}", "public function getInt(string $field): int\n {\n return intval($this->get($field));\n }", "public function wt_parse_int_field($value) {\n // Remove the ' prepended to fields that start with - if needed.\n//\t\t$value = $this->unescape_data( $value );\n\n return intval($value);\n }", "public function setInt32Field($value)\n {\n return $this->set(self::INT32_FIELD, $value);\n }", "function getValue(int $field);", "public function setValue($value) {\n\t\t$value = (int) $value;\n\t\treturn $value;\n\t}", "public function getInt32Field()\n {\n $value = $this->get(self::INT32_FIELD);\n return $value === null ? (integer)$value : $value;\n }", "function getIdAttribute ($val) { return (int) $val; }", "public function updateInteger( Inx_Api_Recipient_Attribute $attr, $iValue );", "static function integer($value){\n\t\treturn DBValue::decimal($value);\n\t}", "public function testIntegerFieldValidation()\n {\n $field = $this->table->getField('numberfour');\n\n $testVal = 1;\n $expected = 1;\n $this->assertEquals($expected, $field->getPHPValue($testVal));\n\n $testVal = 1.123;\n $this->assertEquals($expected, $field->getPHPValue($testVal));\n\n $testVal = 0;\n $expected = 0;\n $this->assertEquals($expected, $field->getPHPValue($testVal));\n }", "public function setValue($value)\n {\n if (is_int($value) === false) {\n throw new base_database_Exception(TMS(base_database_Exception::NO_INT_VALUE, array('value' => $value)));\n }\n $this->int = $value;\n }", "public function getInt64Field()\n {\n $value = $this->get(self::INT64_FIELD);\n return $value === null ? (integer)$value : $value;\n }", "public function setInt64Field($value)\n {\n return $this->set(self::INT64_FIELD, $value);\n }", "public function setValue($value)\n\t{\t\t\n\t\tif(!is_numeric($value))\n\t\t{\n\t\t\tthrow(new ArghException('IntegerParameter values must be numeric'));\n\t\t}\n\t\t\n\t\t$this->value = intval($value);\n\t}", "public static function _integer($value, $field) {\n\t\treturn (bool)preg_match('/^-?[0-9]+$/', $value);\n\t}", "private function newIntegerField(stdClass $fieldDef): DBTable\\Field\n {\n $field = new Fld\\Integer($fieldDef->column_name);\n $this->setProperties($field, $fieldDef);\n $field->setPrecision($fieldDef->numeric_precision);\n\n return $field;\n }", "public function toInt() : int\n {\n return intval($this->value);\n }", "function int($value)\n{\n return intval($value);\n}", "public function set($value)\n\t{\n\t\tif ($value)\n\t\t{\n\t\t\tif (is_numeric($value))\n\t\t\t{\n\t\t\t\treturn (int)$value;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn (string)$value;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Empty values should be null so \n\t\t\t// they are auto-incremented properly\n\t\t\treturn NULL;\n\t\t}\n\t}", "public function setFieldValue(Field $field, $model, $value);", "protected function typeCast($value) {\n\t\t# Cast\n\t\treturn (int) $value;\n\t}", "public function setInt($key, $value)\n {\n if (empty($value)) {\n $value = 0;\n }\n\n $this->set($key, (int) $value);\n }", "public function setField($field);", "public function setField($field);", "function db_intval($int)\n{\n\treturn $int + 0;\n}", "public function load(Mage_Core_Model_Abstract $object, $value, $field = null)\n {\n if(!is_numeric($value) && is_null($field)) {\n $field = 'identifier';\n }\n\n return parent::load($object, $value, $field);\n }", "public function set($field, $value);" ]
[ "0.7122519", "0.6866179", "0.6641615", "0.6443829", "0.6291112", "0.6191459", "0.6169387", "0.6167649", "0.6090318", "0.60780144", "0.6063863", "0.60432625", "0.6023284", "0.60185283", "0.59998816", "0.59918654", "0.5924552", "0.5913186", "0.59008855", "0.5897239", "0.58916587", "0.5890979", "0.587845", "0.58567035", "0.5829555", "0.58006006", "0.58006006", "0.5797158", "0.578889", "0.57745755" ]
0.7137426
0
Set the given field with the given value typecasted as a float
protected function setAsFloat($field, $value) { $this->object[$field] = (float) $value; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setFloatField($value)\n {\n return $this->set(self::FLOAT_FIELD, $value);\n }", "function o_castFloat($value) {\n\t\t\treturn Obj::singleton()->castFloat($value);\n\t\t}", "public function set($value = null)\r\n {\r\n return parent::set((float)$value);\r\n }", "public function setValue($var)\n {\n GPBUtil::checkFloat($var);\n $this->value = $var;\n\n return $this;\n }", "public function getFloat(string $field): float\n {\n return floatval($this->get($field));\n }", "public function getFloatField()\n {\n $value = $this->get(self::FLOAT_FIELD);\n return $value === null ? (double)$value : $value;\n }", "public function SetFloat(string $key, float $value) : void\r\n\t{\r\n\t\t$this->Set($key, $value);\r\n\t}", "public static function float(?string $valueType = null);", "public function setFNumber(?float $value): void {\n $this->getBackingStore()->set('fNumber', $value);\n }", "private function float ($param)\n {\n $this->type = 'float';\n $this->value = (float)$this->value;\n return true;\n }", "public function putFloat(string $name, ?float $value): string;", "function floatval($var)\n{\n}", "private static function toFloat($value)\n {\n return (float) $value;\n }", "public function toFloat(): float\n {\n return (float) $this->getValue();\n }", "final protected function setColumnFloat($key, $value, $allowNull = false)\n\t\t{\n\t\t\t$col = $this->findColumn($key);\n\t\t\tif($col === null)\n\t\t\t\treturn;\n\n\t\t\t$col->setValue($allowNull && is_null($value) ? null : CDFDataHelper::AsFloat($value));\n\t\t}", "public function setFloat(string $key, int $value): StoreInterface {\n $field = Field::autoFactory($key);\n $field->setFloatField($key, $value);\n $field->save();\n\n return $this;\n }", "public function setFloat(string $key, float $value, int $ttl = 0): bool;", "public static function float() {}", "public function float()\n {\n $floatFilter = new stubFloatFilter();\n $this->assertSame($floatFilter, $floatFilter->setDecimals(2));\n $this->assertEquals(156, $floatFilter->execute('1.564'));\n }", "public function getFloat() :float\n {\n return $this->value;\n }", "function &float(float $value, string $namespace = 'default'): float\n{\n $var = new Variable\\FloatVariable($value);\n Repository::add($var, $namespace);\n return $var->getValue();\n}", "function toFloat ($value) {\n assert(count(func_get_args()) == 1);\n if (is_scalar($value)) {\n $convertedValue = filter_var($value, FILTER_VALIDATE_FLOAT, FILTER_NULL_ON_FAILURE);\n if ($convertedValue !== null)\n return $convertedValue;\n }\n if (is_object($value) && hasMember($value, 'toFloat'))\n return toFloat($value->toFloat());\n throw new RuntimeException('Unable to convert to float.');\n}", "public static function ensureFloat($value)\n\t{\n\t\treturn (float)$value;\n\t}", "public function floatValue($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "static public function Float($var, $flags = null) {\r\n\r\n\t\t$cleaned = filter_var($var, FILTER_SANITIZE_NUMBER_FLOAT, $flags);\r\n\t\treturn $cleaned == \"\" ? false : (float)$cleaned;\r\n\r\n\t}", "public function checkFloat(): float\n {\n if (!is_float($this->getValue())) {\n throw new TypeInvalidException('float', gettype($this->getValue()));\n }\n\n return $this->getValue();\n }", "function validate_float() {\n # Check if the value is a foat\n if (is_float($this->cur_val)) {\n # Remove any existing error message\n $this->error_message = \"\";\n\n # Return Value\n return $this->cur_val;\n }\n else {\n # Set Error Message\n $this->set_error( \"Validation for float ({$this->cur_val}) failed. This is type \" . gettype($this->cur_val));\n\n # Return Float Value\n return floatval($this->cur_val);\n }\n }", "public function scrubFloat(float $data) : float;", "function sanitize_float( $value, $key, array $data ) {\n\treturn (float) $value;\n}", "function o_isFloat($value) {\n\t\t\treturn Obj::singleton()->isFloat($value);\n\t\t}" ]
[ "0.7726843", "0.7273483", "0.7042471", "0.7024189", "0.70025975", "0.6977175", "0.6860591", "0.6653839", "0.6648697", "0.6625575", "0.66055685", "0.6603513", "0.6565375", "0.6536551", "0.64959276", "0.64860475", "0.64772356", "0.63983834", "0.63973117", "0.6386981", "0.6345343", "0.63371074", "0.6325252", "0.63146216", "0.62908083", "0.6262286", "0.6262227", "0.6242015", "0.62031245", "0.6170686" ]
0.77681315
0
Set the given field with the given value typecasted as a string
protected function setAsString($field, $value) { $this->object[$field] = (string) $value; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function set($field, $value);", "public function set($field, $value);", "public function setField(string $name, $value);", "function map_field($field){\n $str= $field->to_str();\n //\n //return field to str\n return $str;\n }", "public function setField($field);", "public function setField($field);", "public function setValue($fieldName, $value, $encoding = 'UTF-8') {}", "public function setValue($fieldname, $value);", "public function setField($name, $value);", "public function setField($value) {\n\t\t$this->_field = $value;\n\t}", "public function setFieldValue(Field $field, $model, $value);", "public function setFieldValue($fieldSlug, $value);", "protected function setLocalField($field, $value) {\n if ($field == 'union_name') {\n $field = 'organization_name';\n }\n #converts phone field so it's found in union's telecommunication_number\n if ($field == 'union_phone_no') {\n $field = 'contact_number';\n }\n return parent::setLocalField($field, $value);\n }", "public function SetField($val, $field)\n {\n $this->{$field} = $val;\n //echo $field.'<br>';\n }", "public function setField(string $name, Field $field);", "function nodeCoreTextField(&$node, $field, $value){\n \t\tif (!empty($node->nid)){\n \t\t\t//its an existing node...\n \t\t\tif (!isset($node->{$field}) || $node->{$field} != $value){\n \t\t\t\t//...with a new incoming value\n \t\t\t\t$this->nodeNeedsUpdate[$node->nid] = true;\n \t\t\t\t//dsm(__FUNCTION__.\" flagging \".$node->nid);\n \t\t\t}\n \t\t}\n \t\t\t\n \t\t$node->{$field} = $value;\n \t}", "public function set($field, $value) {\r\n\t\t$this -> fields[$field] = $value;\r\n\t}", "function setField($field, $value)\n {\n $this->_data[$field] = $value;\n }", "public function toValue(\n ExtraField $field\n ) {\n Assert::stringNotEmpty(\n $field->name,\n 'Дополнительное поле не имеет названия.'\n );\n\n Assert::notEmpty(\n $field->value,\n 'Дополнительное поле не имеет значения.'\n );\n\n return $field->name .'|'. $field->value;\n }", "function o_castString($value) {\n\t\t\treturn Obj::singleton()->castString($value);\n\t\t}", "protected function setFieldValue ($field) {\n if ($this->$field instanceof Newforms_File)\n $this->$field->setValue('');\n if (!$this->__bound) return;\n if (is_array($this->__Data)) {\n if (isset($this->__Data[$field])) {\n $this->$field->setValue ($this->__Data[$field]);\n return;\n }\n return;\n }\n if (is_object ($this->__Data)) {\n if (isset($this->__Data->$field)) {\n $this->$field->setValue ($this->__Data->$field);\n return;\n }\n return;\n }\n }", "public function __set($field, $value){\n if (array_key_exists($field, $this->fields)){\n $this->fields[$field] = $value;\n }\n }", "public function __set($field, $value){\n if (array_key_exists($field, $this->fields)){\n $this->fields[$field] = $value;\n }\n }", "function __r_setValueType(&$str) {\n\t//$str=gettype($str).$str;\n\t// if (gettype($str)=='string' && substr($str,0,1)=='0') $str='=\"'.$str.'\"';\n\t// if (gettype($str) == 'string' && substr($str,0,1) == '0') $str = '\\''.$str;\n}", "abstract public function convertField($field);", "public function setValue($field, $value){\n $this->values[$field] = $value;\n }", "public function setField(string $field): void\n {\n $this->field = $field;\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 setValueField($valueField) {\n\t\t$this->valueField = $valueField;\n\t}", "protected function _setStringValue($name, $value, $encoding) {}" ]
[ "0.66491777", "0.66491777", "0.6647228", "0.6556398", "0.6523034", "0.6523034", "0.646744", "0.6452322", "0.64317095", "0.6431247", "0.64247346", "0.6370303", "0.63624835", "0.635717", "0.6300282", "0.6289519", "0.626967", "0.621251", "0.62057155", "0.6197703", "0.61959285", "0.61835605", "0.61835605", "0.61644405", "0.6163312", "0.61265224", "0.61061376", "0.6083066", "0.60818887", "0.60734046" ]
0.6738087
0
Tests the 'Back to site' link behaves with manage layout as admin page.
public function testBackToSiteLink() { $assert_session = $this->assertSession(); $page = $this->getSession()->getPage(); $this->drupalLogin($this->drupalCreateUser([ 'configure any layout', 'access administration pages', 'administer node display', 'administer node fields', 'access toolbar', ])); $field_ui_prefix = 'admin/structure/types/manage/bundle_with_section_field'; // From the manage display page, go to manage the layout. $this->drupalGet("$field_ui_prefix/display/default"); $this->submitForm(['layout[enabled]' => TRUE], 'Save'); $assert_session->linkExists('Manage layout'); $this->clickLink('Manage layout'); // Save the defaults. $page->pressButton('Save layout'); $assert_session->addressEquals("$field_ui_prefix/display/default"); // As the Layout Builder UI is typically displayed using the frontend theme, // it is not marked as an administrative page at the route level even though // it performs an administrative task, therefore, we need to verify that it // behaves as such, redirecting out of the admin section. // Clicking "Back to site" navigates to the homepage. $this->drupalGet("$field_ui_prefix/display/default/layout"); $this->clickLink('Back to site'); $assert_session->addressEquals("/user/2"); $this->drupalGet("$field_ui_prefix/display/default/layout/discard-changes"); $page->pressButton('Confirm'); $this->clickLink('Back to site'); $assert_session->addressEquals("/user/2"); $this->drupalGet("$field_ui_prefix/display/default/layout/disable"); $page->pressButton('Confirm'); $this->clickLink('Back to site'); $assert_session->addressEquals("/user/2"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function BackLink()\n {\n return BackendRouter::ModuleUrl(new Overview());\n }", "protected function BackLink()\n {\n return BackendRouter::ModuleUrl(new Overview());\n }", "public function testgoBackOneLevel()\n {\n\n // this link is available to users who are not authenticated\n $client = static::createClient();\n\n $client->followRedirects(true);\n $crawler = $client->request('GET', '/tag/2');\n $link= $crawler->selectLink('Back to the list')->link();;\n\n\n $this->assertEquals(\n\n $link->getUri(),'http://localhost/tag/');\n\n }", "public function goBackToHome()\n {\n if (Gate::allows('isContractor')) {\n abort(420, 'You Are not Allowed to access this site');\n }\n return view('welcome');\n }", "protected function _redirectBack()\n {\n $this->_helper->redirector->gotoUrl($this->_request->getServer('HTTP_REFERER'));\n }", "function cera_grimlock_after_site() {\n\t\tdo_action( 'grimlock_back_to_top_button' );\n\t}", "protected function renderBackButton() {}", "function orderdown() {\n\t\t\n\t\t$this->_order(1);\n\t\t\n\t\t$this->adminLink->makeURL();\n\t\t$this->app->redirect( $this->adminLink->url );\n\t\n\t}", "public function getBackUrl()\n {\n return $this->getUrl('*/*/index');\n }", "public function getBackUrl()\n {\n return $this->getUrl('*/*/index');\n }", "function fiorello_mikado_back_to_top_button() {\n\t\tif (fiorello_mikado_options()->getOptionValue('show_back_button') == 'yes') { ?>\n\t\t\t<a id='mkdf-back-to-top' href='#'>\n <span class=\"mkdf-icon-stack\">\n <?php fiorello_mikado_icon_collections()->getBackToTopIcon('font_awesome');?>\n <?php fiorello_mikado_icon_collections()->getBackToTopIcon('font_awesome');?>\n </span>\n\t\t\t</a>\n\t\t<?php }\n\t}", "public function mainscreen()\r\n\t{\r\n\t\t$this->setRedirect( 'index.php?option=com_jblesta&controller=default' );\r\n\t\t$this->redirect();\r\n\t}", "public function testHome() { \n $array = $this->adminController->home();\n\n $this->assertEquals('Admin Panel', $array['title']);\n }", "public function back();", "public function getBackLink(){\n $folder = $this->currentPage();\n \n return Controller::join_links(singleton('AssetAdmin')->Link('show'), $folder ? $folder->ID : 0);\n }", "function revert_site() {\n if ( MAIN_SITE != \"\" ) {\n restore_current_blog();\n }\n}", "function OnGoBack(){\n if (strlen($this->host_library_ID))\n $this->library_ID = $this->host_library_ID;\n\n if ($this->is_context_frame)\n\t\t\t$url = \"?package=context&page=contextframe&event=close\";\n\t\telse\n\t\t\t$url =\"?\".($this->Package!=\"\" ? \"package=\".$this->Package.\"&\" : \"\").\"page=\" . $this->listHandler . \"&\" . $this->library_ID . \"_start=\" . $this->start . \"&\" . $this->library_ID . \"_order_by=\" . $this->order_by . \"&library=\" . $this->library_ID . \"&\" . $this->library_ID . \"_parent_id=\" . $this->parent_id . \"&\" . $this->restore;\n\n $this->AfterSubmitRedirect($url);\n }", "static private function historyback()\n {\n echo '<script>window.history.back();</script>';\n }", "public function switchUserBack();", "public function paml_back_to_login() {\n\t\techo '<a href=\"#login\" class=\"modal-login-nav\">' . __( 'Login', 'pressapps' ) . '</a>';\n\t}", "public function previousAction()\n {\n $this->pageAction('goToPreviousPage');\n }", "public function testMenuLinkContentForm() {\n $this->drupalGet('admin/structure/menu/manage/admin/add');\n $option = $this->assertSession()->optionExists('edit-menu-parent', 'admin:');\n $this->assertTrue($option->isSelected());\n // Test that the field description is present.\n $this->assertSession()->pageTextContains('The location this menu link points to.');\n\n $this->submitForm([\n 'title[0][value]' => 'Front page',\n 'link[0][uri]' => '<front>',\n ], 'Save');\n $this->assertSession()->pageTextContains('The menu link has been saved.');\n }", "public function goHome()\n {\n $this->redirect(config('default_module').'/'.config('default_controller').'/'.config('default_action'));\n }", "function back() {\n if (!empty($_SERVER['HTTP_REFERER'])) {\n header('location: ' . $_SERVER['HTTP_REFERER']);\n exit;\n }\n}", "function orderdown()\n\t{\n\t\tJRequest::checkToken() or jexit( 'Invalid Token' );\n\n\t\t$model = $this->getModel('weblink');\n\t\t$model->move(1);\n\n\t\t$this->setRedirect( 'index.php?option=com_weblinks');\n\t}", "function test_restrict_deletion_of_Home_page(){}", "function smarty_function_page_back($params, &$smarty)\n{\n\t$message_2196 = $smarty->get_template_vars(message_2196);\n\treturn '<a id=\"linkbacktop_back\" href=\"javascript:history.go(-1)\" title=\"' . $message_2196 . '\">' . $message_2196 . '</a>';\n}", "public function goHome()\n {\n $this->redirect(url($this->getHomeUrl()));\n }", "function orderup() {\n\t\t\n\t\t$this->_order(-1);\n\t\t\n\t\t$this->adminLink->makeURL();\n\t\t$this->app->redirect( $this->adminLink->url );\n\t\n\t}", "function back_link($width)\n\t{\n\t\tif(empty($_POST))\n\t\t\t$_SESSION['back_page'] = $_SERVER['HTTP_REFERER'];\n\t\t\t\n\t\t\techo '<table width=\"'.$width.'\" border=\"0\" align=\"center\"><tr><td align=\"right\" valign=\"middle\"><a href=\"'.$_SESSION['back_page'].'\" title=\"'.BACK_ICON_ALT.'\"><img border=\"0\" align=\"absmiddle\" src=\"'.BACK_ICON.'\" title=\"'.BACK_ICON_ALT.'\" alt=\"'.BACK_ICON_ALT.'\">Back</a></td></tr></table>';\n\t}" ]
[ "0.67043716", "0.67043716", "0.62552434", "0.6172643", "0.60133404", "0.60096174", "0.5935994", "0.5867099", "0.5849595", "0.5849595", "0.58401513", "0.5789324", "0.57285047", "0.5714606", "0.57101625", "0.5685016", "0.5673081", "0.5656947", "0.5649427", "0.56389576", "0.56075", "0.55790365", "0.5574071", "0.55569595", "0.55558866", "0.5552709", "0.5552293", "0.5552063", "0.5548422", "0.5531474" ]
0.7478297
0
WordPress WP List Table Restituisce un array con il tipo di status, la sua label e la count sul database
function statusesWithCount( $table_name, $statuses, $field_name = 'status' ) { global $wpdb; $sql = <<< SQL SELECT DISTINCT( `{$field_name}` ), COUNT(*) AS count FROM `{$table_name}` GROUP BY `{$field_name}` SQL; $result = $wpdb->get_results( $sql, ARRAY_A ); foreach ( $result as $status ) { if ( !empty( $status['status'] ) ) { $statuses[$status['status']]['count'] = $status['count']; } } $statuses['all']['count'] = self::count( $table_name ); return $statuses; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function statuses() {\n //return parent::statusesWithCount( self::tableName(), self::arrayStatuses() );\n\n global $wpdb;\n\n $table_name = self::tableName();\n $statuses = self::arrayStatuses();\n $field_name = 'status';\n /*\n * @ToDo Decommentare qui se non vogliamo i conteggi dinamici in base al filtro\n * @ToDo La query è molto onerosa\n *\n *\n */\n $table_orders = BNMExtendsOrders::tableName();\n $sql = <<< SQL\n SELECT DISTINCT( {$table_orders}.{$field_name} ),\n COUNT(*) AS count\n FROM `{$table_name}`\n LEFT JOIN `{$table_orders}`\n ON {$table_orders}.id = {$table_name}.id_order\n GROUP BY {$table_orders}.{$field_name}\nSQL;\n\n\n\n $result = $wpdb->get_results( $sql, ARRAY_A );\n\n foreach ( $result as $status ) {\n if ( !empty( $status['status'] ) ) {\n $statuses[$status['status']]['count'] = $status['count'];\n }\n }\n\n $statuses['all']['count'] = self::count( $table_name );\n\n return $statuses;\n }", "public static function arrayStatuses() {\n\n /*\n $statuses = array(\n 'all' => array(\n 'label' => __( 'All', WPXSMARTSHOP_TEXTDOMAIN ),\n 'count' => 0\n ),\n 'publish' => array(\n 'label' => __( 'Publish', WPXSMARTSHOP_TEXTDOMAIN ),\n 'count' => 0\n ),\n 'trash' => array(\n 'label' => __( 'Trash', WPXSMARTSHOP_TEXTDOMAIN ),\n 'count' => 0\n )\n );*/\n $statuses = array(\n 'all' => array(\n 'label' => __( 'All', WPXSMARTSHOP_TEXTDOMAIN ),\n 'count' => 0\n ),\n WPXSMARTSHOP_ORDER_STATUS_PENDING => array(\n 'label' => __( 'Pending', WPXSMARTSHOP_TEXTDOMAIN ),\n 'count' => 0\n ),\n WPXSMARTSHOP_ORDER_STATUS_CONFIRMED => array(\n 'label' => __( 'Confirmed', WPXSMARTSHOP_TEXTDOMAIN ),\n 'count' => 0\n ),\n WPXSMARTSHOP_ORDER_STATUS_CANCELLED => array(\n 'label' => __( 'Cancelled', WPXSMARTSHOP_TEXTDOMAIN ),\n 'count' => 0\n ),\n WPXSMARTSHOP_ORDER_STATUS_DEFUNCT => array(\n 'label' => __( 'Defunct', WPXSMARTSHOP_TEXTDOMAIN ),\n 'count' => 0\n ),\n 'trash' => array(\n 'label' => __( 'Trash', WPXSMARTSHOP_TEXTDOMAIN ),\n 'count' => 0\n )\n );\n return $statuses;\n }", "public function getStatusesList(){\n return $this->_get(1);\n }", "private function get_status_counts_data() {\n\n\t\t// Get my complete dataset.\n\t\t$dataset = $this->table_data();\n\n\t\t// Return false without any data.\n\t\tif ( empty( $dataset ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Trim my list to just the status.\n\t\t$status_ids = wp_list_pluck( $dataset, 'review_status' );\n\n\t\t// Set up the return structure.\n\t\t$setup['all'] = array(\n\t\t\t'label' => __( 'All', 'woo-better-reviews' ),\n\t\t\t'count' => count( $status_ids ),\n\t\t\t'setup' => 'status',\n\t\t);\n\n\t\t// Get my statuses.\n\t\t$statuses = Helpers\\get_review_statuses();\n\n\t\t// If we have no statuses, just return the 'all'.\n\t\tif ( empty( $statuses ) ) {\n\t\t\treturn $setup;\n\t\t}\n\n\t\t// Now loop the statuses we have and handle the counts.\n\t\tforeach ( $statuses as $status_key => $status_label ) {\n\n\t\t\t// Handle the individual count by using the array keys and status.\n\t\t\t$setup[ $status_key ] = array(\n\t\t\t\t'label' => $status_label,\n\t\t\t\t'count' => count( array_keys( $status_ids, $status_key ) ),\n\t\t\t\t'setup' => 'status',\n\t\t\t);\n\t\t}\n\n\t\t// If we have a single product, show that.\n\t\tif ( ! empty( $_GET['wbr-review-filter'] ) && ! empty( $_GET['wbr-product-id'] ) ) {\n\n\t\t\t// Set my product ID.\n\t\t\t$product_id = absint( $_GET['wbr-product-id'] );\n\n\t\t\t// Handle the individual count by using the array keys and status.\n\t\t\t$setup['filtered'] = array(\n\t\t\t\t'label' => get_the_title( $product_id ),\n\t\t\t\t'count' => Queries\\get_review_count_for_product( $product_id ),\n\t\t\t\t'setup' => 'single',\n\t\t\t);\n\t\t}\n\n\t\t// Return it, filtered.\n\t\treturn apply_filters( Core\\HOOK_PREFIX . 'status_counts_data', $setup );\n\t}", "function by_status_berlaku()\n {\n $this->db->select(\"COUNT(id) AS total,COUNT( CASE WHEN status_berlaku = '1' THEN 1 END ) AS berlaku,COUNT( CASE WHEN status_berlaku = '0' THEN 1 END ) AS tidak_berlaku\");\n $this->db->from($this->table);\n return $this->db->get()->row();\n }", "public function getItemStatus() {\r\n\t\t$status = array();\r\n\t\t\t$status[0] = array('id' => 0,\r\n\t\t\t\t\t\t\t'name' => 'Sold',\r\n\t\t\t\t\t\t\t'checked' => false,\r\n\t\t\t\t\t\t\t'field_name' => 'sold'\r\n\t\t\t\t\t\t);\r\n\t\t\t$status[1] = array('id' => 1,\r\n\t\t\t\t\t\t\t'name' => 'Available',\r\n\t\t\t\t\t\t\t'checked' => false,\r\n\t\t\t\t\t\t\t'field_name' => 'available'\r\n\t\t\t\t\t\t);\r\n\t\t\t$status[2] = array('id' => 2,\r\n\t\t\t\t\t\t\t'name' => 'Out on Job',\r\n\t\t\t\t\t\t\t'checked' => false,\r\n\t\t\t\t\t\t\t'field_name' => 'out_on_job'\r\n\t\t\t\t\t\t);\r\n\t\t\t$status[3] = array('id' => 3,\r\n\t\t\t\t\t\t\t'name' => 'Pending Sale',\r\n\t\t\t\t\t\t\t'checked' => false,\r\n\t\t\t\t\t\t\t'field_name' => 'pending_sale'\r\n\t\t\t\t\t\t);\r\n\t\t\t$status[4] = array('id' => 4,\r\n\t\t\t\t\t\t\t'name' => 'Out on Memo',\r\n\t\t\t\t\t\t\t'checked' => false,\r\n\t\t\t\t\t\t\t'field_name' => 'out_on_memo'\r\n\t\t\t\t\t\t);\r\n\t\t\t$status[5] = array('id' => 5,\r\n\t\t\t\t\t\t\t'name' => 'Burgled',\r\n\t\t\t\t\t\t\t'checked' => false,\r\n\t\t\t\t\t\t\t'field_name' => 'burgled'\r\n\t\t\t\t\t\t);\r\n\t\t\t$status[6] = array('id' => 6,\r\n\t\t\t\t\t\t\t'name' => 'Assembled',\r\n\t\t\t\t\t\t\t'checked' => false,\r\n\t\t\t\t\t\t\t'field_name' => 'assembled'\r\n\t\t\t\t\t\t);\r\n\t\t\t$status[7] = array('id' => 7,\r\n\t\t\t\t\t\t\t'name' => 'Returned To Consignee',\r\n\t\t\t\t\t\t\t'checked' => false,\r\n\t\t\t\t\t\t\t'field_name' => 'return_to_consignee'\r\n\t\t\t\t\t\t);\r\n\t\t\t$status[8] = array(\r\n\t\t\t\t\t\t\t'id' => 8,\r\n\t\t\t\t\t\t\t'name' => 'Pending Repair Queue',\r\n\t\t\t\t\t\t\t'checked' => false,\r\n\t\t\t\t\t\t\t'field_name' => 'pending_repair'\r\n\t\t\t\t\t\t);\r\n\t\t\t$status[91] = array('id' => 91,\r\n\t\t\t\t\t\t\t'name' => 'Francesklein Import',\r\n\t\t\t\t\t\t\t'checked' => false,\r\n\t\t\t\t\t\t\t'field_name' => 'francesklein_import'\r\n\t\t\t\t\t\t);\r\n\t\t\t$status[98] = array('id' => 98,\r\n\t\t\t\t\t\t\t'name' => 'Never Going Online',\r\n\t\t\t\t\t\t\t'checked' => false,\r\n\t\t\t\t\t\t\t'field_name' => 'never_going_online'\r\n\t\t\t\t\t\t);\r\n\t\t\t$status[99] = array('id' => 99,\r\n\t\t\t\t\t\t\t'name' => 'Unavailable',\r\n\t\t\t\t\t\t\t'checked' => false,\r\n\t\t\t\t\t\t\t'field_name' => 'unavailable'\r\n\t\t\t\t\t);\r\n\t\treturn $status;\r\n\t}", "public static function list() {\n self::init();\n $columns = self::getListTableColumns();\n $columns = array_map(function($object) {\n return $object['label'];\n }, $columns);\n $columns = array_values($columns);\n\n $columnsSql = implode(', ', self::$listTableColumnsKeys);\n $data = self::$wpdb->get_results(\n self::$wpdb->prepare(\n \"SELECT {$columnsSql}\n FROM \" . self::$table . \"\n ORDER BY id ASC\"\n )\n );\n return $data;\n }", "public function getStatusList()\n {\n return ['0' => __('修改'), '1' => __('提议'), '2' => __('新增'), '3' => __('废止')];\n }", "public static function getStatuses(): array;", "function monitor_list_statuses() {\n $query = \"select distinct(`wf_status`) from `\".GALAXIA_TABLE_PREFIX.\"instances`\";\n $result = $this->query($query);\n $ret = Array();\n while($res = $result->fetchRow()) {\n $ret[] = $res['wf_status'];\n }\n return $ret;\n }", "function getStatus() {\n \t\n \t$status = array();\n \n $sql = \"SELECT COUNT(*) as num_contact FROM mp_pile WHERE `statut` = 'a_contacter'\";\n $sel = mysql_query($sql);\n $result = mysql_fetch_array($sel);\n \n $status[\"to_contact\"] = $result['num_contact'];\n\n $sql = \"SELECT COUNT(*) as num_contact FROM mp_pile WHERE `statut` = 'contacte'\";\n $sel = mysql_query($sql);\n $result = mysql_fetch_array($sel);\n \n $status[\"contacted\"] = $result['num_contact'];\n \n $sql = \"SELECT COUNT(*) as num_contact FROM mp_pile WHERE `statut` = 'a_rappeler'\";\n $sel = mysql_query($sql);\n $result = mysql_fetch_array($sel);\n \n $status[\"call_back\"] = $result['num_contact'];\n \n $sql = \"SELECT COUNT(*) as num_contact FROM mp_pile WHERE `statut` = 'termine'\";\n $sel = mysql_query($sql);\n $result = mysql_fetch_array($sel);\n \n $status[\"deleted\"] = $result['num_contact'];\n \n $sql = \"SELECT COUNT(*) as num_motif FROM mp_activation_motifs\";\n $sel = mysql_query($sql);\n $result = mysql_fetch_array($sel);\n\n $status[\"number_motif\"] = $result['num_motif'];\n \n \n return $status;\n }", "public function getCountsList(){\n return $this->_get(6);\n }", "public function getStatuses() {\n\t}", "public function getDeliveryStatusList(){\n\t\t/* variable initialization */\n\t\t$strReturnArr\t= $strQueryArr\t= array();\n\t\t\n\t\t/* Creating query array */\n\t\t$strQueryArr\t= array(\n\t\t\t\t\t\t\t\t\t'table'=>$this->_strTableName,\n\t\t\t\t\t\t\t\t\t'column'=>array('id','description'),\n\t\t\t\t\t\t\t\t\t'where'=>array('attribute_code'=>DELIVERY_STATUS_WIDGET_ATTR_CODE),\n\t\t\t\t\t\t\t );\n\t\t\t\t\t\t\t \n\t\t/* Get data from dataset */\n\t\t$strResultSetArr\t= $this->_databaseObject->getDataFromTable($strQueryArr);\n\t\t/* removed used variable */\n\t\tunset($strQueryArr);\n\t\t\n\t\t/* if status found teh do needful */\n\t\tif(!empty($strResultSetArr)){\n\t\t\t/* Iterting the loop */\n\t\t\tforeach($strResultSetArr as $strResultSetArrKey => $strResultSetArrValue){\n\t\t\t\t/* setting the key value paris */\n\t\t\t\t$strReturnArr['keyvalue'][$strResultSetArrValue['id']]\t= $strResultSetArrValue['description'];\n\t\t\t}\n\t\t}\n\t\t/* set the default result set */\n\t\t$strReturnArr['defaultvalue']\t= $strResultSetArr;\n\t\t/* removed used variable */\n\t\tunset($strResultSetArr);\n\t\t\n\t\t/* return the status result set */\n\t\treturn $strReturnArr;\n\t}", "function statuses_table() {\n\n\t$table = array('papi_type_statuses',\"\n\t\tid INT AUTO_INCREMENT primary key NOT NULL,\n\t\tdate DATETIME NOT NULL,\n\t\tstatus TEXT NOT NULL,\n\t\torg_service VARCHAR(32),\n\t\torg_id VARCHAR(32)\n\t\");\n\n\treturn $table;\n\n}", "abstract protected function getStatusesInfos();", "public static function getStatusList()\n {\n return array(\n self::STATUS_TRASH => 'trash',\n self::STATUS_DRAFT => 'draft',\n self::STATUS_PUBLISHED => 'published',\n );\n }", "function all_kontrak(){\n $this->db->select(\"count(status_aktif) as Kontrak \");\n $this->db->from('tb_pegawai');\n $this->db->where('status_aktif', 1);\n $this->db->where('status_peg', 2);\n $this->db->where('status_profesi', 4);\n $result = $this->db->get()->result();\n return $result;\n }", "function toListWithCount($jsonArray){\n $list = array();\n //echo $jsonArray;\n $bindings= $jsonArray['results']['bindings'];\n foreach ($bindings as $binding){\n if(isset($binding['count']['value'])){\n $tmp['value'] = $binding['suggest']['value'];\n\n $tmp['type'] = $binding['suggest']['type'];\n\n $tmp['lang'] = @$binding['suggest']['xml:lang'];\n $tmp['datatype'] = @$binding['suggest']['datatype'];\n\n $tmp['count'] = $binding['count']['value'];\n\n\n $list[] = $tmp;\n }\n }\n return $list;\t\n }", "public function getStatusArray()\n\t{\n\t\treturn $this->makeReturnTable();\n\t}", "public function getCountList(){\n\t\t$select = $this->getListSelect();\n\t\t$stmt = $select->query();\n\t\t$objects = array();\n\t\treturn count($stmt->fetchAll());\n\t}", "function jumlahdata() {\r\n\t\t\treturn $this->db->count_all('tb_kelas');\t\t\t\r\n\t\t\t}", "public function listing() {\n return array(\n '#header' => array($this->t('Title'), $this->t('Description'), $this->t('Operations')),\n '#type' => 'table',\n ) + $this->listingLevel($this->paymentStatusManager->hierarchy(), 0);\n }", "public static function getStatusesList()\n {\n $sql = 'SELECT id AS value, display_name AS text '\n . 'FROM location_status '\n . 'WHERE active = 1';\n $command = Yii::app()->db->createCommand($sql);\n return $command->queryAll(true);\n }", "public function getCount();", "public function getCount();", "public function getCount();", "function count_new_pro_list(){\n\t\treturn $this->db->select('count(*)','product_list','status = 3');\n\t}", "abstract public static function getStatuses();", "public static function getStatusList() {\r\n return [\r\n self::STATUS_ACTIVE => 'Active',\r\n self::STATUS_RETIRED => 'Retired'\r\n ];\r\n }" ]
[ "0.73178685", "0.6528165", "0.62678427", "0.6252064", "0.62262625", "0.622553", "0.6109378", "0.60659975", "0.6047154", "0.60281193", "0.6000045", "0.5978296", "0.594938", "0.59173304", "0.5899136", "0.58824915", "0.58711296", "0.58551526", "0.58247805", "0.58225137", "0.58197767", "0.5815149", "0.57987577", "0.57867324", "0.5769284", "0.5769284", "0.5769284", "0.57653", "0.57541025", "0.5742261" ]
0.68093413
1
==== Property Declarations ============================================= ======================================================================== ==== End of Property Declarations ====================================== ======================================================================== ==== Method Declarations =============================================== ======================================================================== ==== getForm() ========================================================= Recieve all rows using name & email parameters Parameters: $name string of a name $email string of a email Return: TRUE database results found FALSE no database results found ========================================================================
protected function getForm(string $name, string $email) { $sql = "SELECT * FROM " . $this->formsTableName . " WHERE name = ? AND email = ?"; $stmt = $this->connect()->prepare($sql); $stmt->bindParam(1, $name, \PDO::PARAM_STR); $stmt->bindParam(2, $email, \PDO::PARAM_STR); $stmt->execute(); $res = $stmt->fetchAll(); if($res){ return $res; } else { return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getForm();", "public static function getForm();", "abstract function getForm();", "function getForms()\n {\n $func_status = 'pass';\n $func_error = '';\n $forms = '';\n\n try {\n $tableName = \"permissions_forms\";\n\n $getForms = new Mysql;\n $getForms->dbConnect();\n $resultSet = $getForms->selectAll($tableName);\n $getForms->dbDisconnect();\n\n if($resultSet) {\n if(mysqli_num_rows($resultSet) > 0){\n $forms = '[';\n while($row = mysqli_fetch_array($resultSet)){\n $newFormTitle = preg_replace(\"/\\\"/\",\" \",$row['FORMTITLE']);\n $forms .= '['.$row['FORMID'].',\"'.$newFormTitle.'\"],';\n }\n $forms = substr($forms, 0, -1);\n $forms .= ']';\n } else {\n $func_status = 'fail';\n $func_error = 'getForms: Query returned no results..';\n }\n } else {\n $func_status = 'fail';\n $func_error = 'getForms: Error performing query..';\n }\n\n } catch (Exception $e) {\n $func_status = 'fail';\n $func_error = 'getForms: Caught exception: '.$e->getMessage();\n mail(\"[email protected]\", \"PermissionsTable Demo Error: Users getForms\", $e->getMessage());\n }\n\n return '{\"STATUS\":\"'.$func_status.'\",\"ERROR\":\"'.$func_error.'\",\"RESULT\":'.$forms.'}';\n\n }", "abstract protected function getForm();", "function getMainForm()\r\n\t{\r\n\t\t// mendapatkan form-form nya row per row.\r\n\t\t// dan kemudian memasukkan value dari query database kedalam input form masing2 yang sesuai\r\n\t\t$i = 0;\r\n\t\t$arrData = array();\r\n\t\t$out = '<tbody>';\r\n\t\t$this->arrInput = get_object_vars($this->input);\r\n\t\twhile ($arrResult = $this->nav->fetch())\r\n\t\t{\r\n\t\t\t$this->arrResult = $arrResult;\r\n\t\t\t$tableId = $this->arrResult[$this->tableId];\r\n\t\t\t$out .= '<tr data-id=\"'.$tableId.'\">';\r\n\t\t\tforeach($this->arrInput AS $input)\r\n\t\t\t{\r\n\t\t\t\tif (!$input->isInsideMultiInput && !$input->isHeader)\r\n\t\t\t\t{\r\n\t\t\t\t\t// digunakan pada sqllinks\r\n\t\t\t\t\tif (preg_match ('~ as ~is',$this->tableId))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif (preg_match('~(.*) (as) (.*)~is', $this->tableId, $match))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$this->tableId=$match[3];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ($this->isMultiLanguage && !isset($this->load_lang[$i]) && !empty($this->strField2Lang))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$q = \"SELECT `lang_id`, `\".implode('`, `', $this->strField2Lang).\"` FROM `$this->LanguageTable` WHERE `$this->LanguageTableId`={$tableId}\".$this->LanguageTableWhere;\r\n\t\t\t\t\t\t$this->load_lang[$i] = 1;\r\n\t\t\t\t\t\t$r = $this->db->getAll($q);\r\n\t\t\t\t\t\tforeach($r AS $d)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tforeach($this->strField2Lang AS $f)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$arrResult[$f][$d['lang_id']] = $d[$f];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$arrResult[$input->objectName] = $this->getDefaultValue($input, $arrResult, $i);\r\n\t\t\t\t\t// dapatkan array data report\r\n\t\t\t\t\tif ($this->isReportOn && $input->isIncludedInReport)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$irow = $input->getReportOutput($arrResult[$input->objectName]);\r\n\t\t\t\t\t\tif ($input->reportFunction && is_callable($input->displayFunction))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$irow = call_user_func_array($input->displayFunction, array($irow));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (is_callable($input->exportFunction))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$irow = call_user_func_array($input->exportFunction, array($irow));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$arrData[$i][]\t= $irow;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif ($input->isInsideRow)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$out\t.= '<td>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$str_value = in_array($input->objectName, ['system_delete_tool']) ? $arrResult[$this->tableId] : $arrResult[$input->objectName];\r\n\t\t\t\t\t$tmp = $input->getOutput($str_value, $input->name.'['.$i.']', $this->setDefaultExtra($input));\r\n\t\t\t\t\tif (!empty($this->disableInput[$input->objectName]))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$is_disable = false;\r\n\t\t\t\t\t\tforeach ((array)$this->disableInput[$input->objectName] as $exec)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$comparator = is_array($arrResult[$exec[2]]) ? current($arrResult[$exec[2]]) : $arrResult[$exec[2]];\r\n\t\t\t\t\t\t\teval('if($exec[1] '.$exec[0].' $comparator){$is_disable=true;}');\r\n\t\t\t\t\t\t\tif ($is_disable)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif ($is_disable)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$tmp = preg_replace(array('~(<input\\s?)~is', '~(<select\\s?)~is', '~(<textarea\\s?)~is'), '$1 disabled ', $tmp);\r\n\t\t\t\t\t\t\tif ($input->objectName != 'system_delete_tool')\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$tmp.= $this->setDisableInputRecovery($arrResult[$input->objectName], $input->name.'['.$i.']', $tmp);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ($input->isInsideRow)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$out\t.= $tmp.'</td>';\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif (!empty($tmp) && preg_match('~hidden~is', $tmp))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$out .= $tmp;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t$out .= '<div class=\"hidden\">'.$tmp.'</div>';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} // end foreach\r\n\t\t\t$out .= '</tr>';\r\n\t\t\t$i++;\r\n\t\t}\r\n\t\t$out .= '</tbody>';\r\n\t\tif ($this->isReportOn)\r\n\t\t{\r\n\t\t\t$this->reportData['data'] = $arrData;\r\n\t\t}\r\n\t\treturn $out;\r\n\t}", "public function retrieveData ()\r\n {\r\n // deciding on the way we retrieve data\r\n $method = &$_POST;\r\n if ($this->_meta['method'] == 'get')\r\n $method = &$_GET;\r\n if (!isset ($method[$this->_meta['id'].'_submitted']))\r\n return false;\r\n // getting the information for each field\r\n foreach ($this->_fields as $key => $val)\r\n // if a field is missing, make form invalid\r\n if (!isset ($method[$key]) || !$method[$key])\r\n {\r\n if (!isset ($val['value']))\r\n {\r\n $this->_errors[$key] = 'required';\r\n $this->_valid = false;\r\n }\r\n else\r\n $this->_values[$key] = $val['value'];\r\n }\r\n else\r\n $this->_values[$key] = $method[$key];\r\n return true;\r\n }", "private function findForm(){\n\n\t\t$results = $this->wpdb->get_results($this->wpdb->prepare(\"\n\t\t\tSELECT\n\t\t\t\t`form`.`id` \t\t\tas 'id',\n\t\t\t\t`form`.`label` \t\t\tas 'label',\n\t\t\t\t`form`.`confirm_submit` as 'confirm_submit',\n\t\t\t\t`form`.`date_available` as 'date_available',\n\t\t\t\t`form`.`date_expire` \tas 'date_expire'\n\t\t\tFROM `mark_reg_forms` as `form`\n\t\t\tWHERE\n\t\t\t\t`form`.`id` = %d\n\t\t\t\tAND `form`.`enabled` = 1\n\t\t\", $this->form_id));\n\n\t\tif(count($results)):\n\t\t\t$this->form_confirm_submit\t= $results[0]->confirm_submit;\n\t\t\t$this->form_label \t\t\t= $results[0]->label;\n\t\t\t$this->form_date_available\t= $results[0]->date_available;\n\t\t\t$this->form_date_expire\t\t= $results[0]->date_expire;\n\t\t\t$this->form_name\t\t\t= 'mark_reg_form_'.$this->form_id;\n\t\telse:\n\t\t\t$this->log(\"FORM NOT FOUND FOR ID: $this->form_id\");\n\t\tendif;\n\t}", "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 function indexAction()\n {\n \t$form_id = $this->params()->fromQuery(\"fid\", \"\");\n\n \t//select contact profile form to use\n \tif ($form_id == \"\")\n \t{\n \t\t//check if form id is set in user session\n \t\t$objUserStorage = FrontUserSession::getUserLocalStorageObject();\n \t\tif (isset($objUserStorage->readUserNativePreferences()->cpp_layout_id) && is_numeric($objUserStorage->readUserNativePreferences()->cpp_layout_id))\n \t\t{\n \t\t\t//load the specified form's fields\n \t\t\t$form_id = $objUserStorage->readUserNativePreferences()->cpp_layout_id;\n \t\t\t$objForm = $this->getFormAdminModel()->getForm($form_id);\n \t\t} else {\n \t\t\t$form_id = \"none\";\n \t\t}//end if\n \t} else {\n \t\tif ($form_id != \"none\" && is_numeric($form_id))\n \t\t{\n \t\t\t$objForm = $this->getFormAdminModel()->getForm($form_id);\n \t\t}//end if\n \t}//end if\n\n \t//extract search params from query\n \t$arr_params = $this->params()->fromQuery();\n\n \t$request = $this->getRequest();\n \tif ($request->isPost())\n \t{\n \t\t$arr_params = array_merge($arr_params, (array) $request->getPost());\n \t}//end foreach\n\n \t//load contacts\n\t\t$objContacts = $this->getContactsModel()->fetchContacts($arr_params);\n\n\t\tif (!isset($objForm))\n\t\t{\n\t\t\t$objForm = FALSE;\n\t\t}//end if\n\n\t\treturn array(\n\t\t\t\t\t\"objForm\" => $objForm,\n\t\t\t\t\t\"objContacts\" => $objContacts,\n\t\t\t\t\t\"arr_params\" => $arr_params,\n\t\t\t\t);\n }", "abstract public function getForm() : void;", "public function getReadEnquiries()\r\n\t\t{\r\n\t\t\tContact::SetQuery($name, $email, $subject, $message);\r\n\t\t}", "public function transactionGetForm ();", "public function getForm($data = array(), $loadData = true)\n {\n // Get the form.\n $form = $this->loadForm('com_labgeneagrogene.requestform', 'requestform', array(\n 'control' => 'jform',\n 'load_data' => false\n ));\n\n\t$examsCheckboxes = $this->getRelatedAdminModel('Exams')->getXmlFieldCheckboxes();\n if($examsCheckboxes) {\n $form->setField($examsCheckboxes);\n }\n\n if($loadData){\n @$form->bind($this->loadFormData());\n }\n\n if (empty($form)) {\n return false;\n }\n\n return $form;\n }", "public static function getForm($nameForm, $data = array())\n {\n $result = \"\";\n require_once(getenv(\"DOCUMENT_ROOT\").SP.\"lib\".SP.\"components\".SP.\"Form.php\");\n $file = getenv(\"DOCUMENT_ROOT\").SP.'view'.SP.'form'.SP.$nameForm.'.php';\n if(file_exists($file))\n {\n extract($data);\n ob_start();\n require($file);\n $result = ob_get_contents();\n ob_end_clean();\n }\n return $result;\n }", "public function getForm($data = array(), $loadData = true)\r\n {\r\n // Get the form.\r\n return $this->loadForm('com_data.email', 'email', array('control' => 'jform', 'load_data' => $loadData));\r\n }", "public function gui2()\n {\n require_code('form_templates');\n\n $submit_name = do_lang_tempcode('PROCEED');\n $post_url = build_url(array('page' => '_SELF', 'type' => 'actual'), '_SELF');\n\n $fields = new Tempcode();\n $hidden = new Tempcode();\n $already = array();\n $email_counter = 0;\n foreach ($_POST as $key => $input_value) {\n if (get_magic_quotes_gpc()) {\n $input_value = stripslashes($input_value);\n }\n\n if (substr($key, 0, 14) == 'email_address_') {\n $already[] = $input_value; //email address\n $email_counter++;\n $hidden->attach(form_input_hidden($key, $input_value));\n } else {\n // Add hidden field to the form\n if ($key != 'upload') {\n $hidden->attach(form_input_hidden($key, $input_value));\n }\n }\n }\n\n $hidden->attach(form_input_hidden('select_contacts_page', '1'));\n\n $text = do_lang_tempcode('RECOMMEND_SITE_TEXT_CHOOSE_CONTACTS', escape_html(get_site_name()));\n\n $page_title = get_param_string('page_title', null, true);\n if (is_null(get_param_string('from', null, true))) {\n $hidden->attach(form_input_hidden('wrap_message', '1'));\n }\n\n $success_read = false;\n\n // Start processing CSV file\n if ((get_option('enable_csv_recommend') == '1') && (!is_guest())) {\n if (array_key_exists('upload', $_FILES)) { // NB: We disabled plupload for this form so don't need to consider it\n if (is_uploaded_file($_FILES['upload']['tmp_name']) && preg_match('#\\.csv#', $_FILES['upload']['name']) != 0) {\n $possible_email_fields = array('E-mail', 'Email', 'E-mail address', 'Email address', 'Primary Email');\n $possible_name_fields = array('Name', 'Forename', 'First Name', 'Display Name', 'First');\n\n $fixed_contents = unixify_line_format(file_get_contents($_FILES['upload']['tmp_name']));\n require_code('files');\n cms_file_put_contents_safe($_FILES['upload']['tmp_name'], $fixed_contents, FILE_WRITE_FAILURE_SILENT);\n\n safe_ini_set('auto_detect_line_endings', '1');\n $myfile = fopen($_FILES['upload']['tmp_name'], 'rt');\n\n $del = ',';\n\n $csv_header_line_fields = fgetcsv($myfile, 10240, $del);\n if ((count($csv_header_line_fields) == 1) && (strpos($csv_header_line_fields[0], ';') !== false)) {\n $del = ';';\n rewind($myfile);\n $csv_header_line_fields = fgetcsv($myfile, 10240, $del);\n }\n\n $skip_next_process = false;\n\n if (function_exists('mb_convert_encoding')) {\n if ((function_exists('mb_detect_encoding')) && (strlen(mb_detect_encoding($csv_header_line_fields[0], \"ASCII,UTF-8,UTF-16,UTF16\")) == 0)) { // Apple mail weirdness\n // Test string just for Apple mail detection\n $test_unicode = utf8_decode(mb_convert_encoding($csv_header_line_fields[0], \"UTF-8\", \"UTF-16\"));\n if (preg_match('#\\?\\?ame#u', $test_unicode) != 0) {\n foreach ($csv_header_line_fields as $key => $value) {\n $csv_header_line_fields[$key] = utf8_decode(mb_convert_encoding($csv_header_line_fields[$key], \"UTF-8\", \"UTF-16\"));\n\n $found_email_address = '';\n $found_name = '';\n\n $first_row_exploded = explode(';', $csv_header_line_fields[0]);\n\n $email_index = 1; // by default\n $name_index = 0; // by default\n\n foreach ($csv_header_line_fields as $key2 => $value2) {\n if (preg_match('#\\?\\?ame#', $value2) != 0) {\n $name_index = $key2; // Windows mail\n }\n if (preg_match('#E\\-mail#', $value2) != 0) {\n $email_index = $key2; // both\n }\n }\n\n while (($csv_line = fgetcsv($myfile, 10240, $del)) !== false) { // Reading a CSV record\n foreach ($csv_line as $key2 => $value2) {\n $csv_line[$key2] = utf8_decode(mb_convert_encoding($value2, \"UTF-8\", \"UTF-16\"));\n }\n\n $found_email_address = (array_key_exists($email_index, $csv_line) && strlen($csv_line[$email_index]) > 0) ? $csv_line[$email_index] : '';\n $found_email_address = (preg_match('#.*\\@.*\\..*#', $found_email_address) != 0) ? preg_replace(\"#\\\"#\", '', $found_email_address) : '';\n $found_name = $found_email_address;\n\n if (strlen($found_email_address) > 0) {\n $skip_next_process = true;\n // Add to the list what we've found\n $fields->attach(form_input_tick($found_name, $found_email_address, 'use_details_' . strval($email_counter), true));\n $hidden->attach(form_input_hidden('details_email_' . strval($email_counter), $found_email_address));\n $hidden->attach(form_input_hidden('details_name_' . strval($email_counter), $found_name));\n $email_counter++;\n $success_read = true;\n }\n }\n }\n }\n }\n }\n\n if (!$skip_next_process) {\n // There is a strange symbol that appears at start of the Windows Mail file, so we need to convert the first file line to catch these\n if ((function_exists('mb_check_encoding')) && (mb_check_encoding($csv_header_line_fields[0], 'UTF-8'))) {\n $csv_header_line_fields[0] = utf8_decode($csv_header_line_fields[0]);\n }\n\n // This means that we need to import from Windows mail (also for Outlook Express) export file, which is different from others csv export formats\n if (array_key_exists(0, $csv_header_line_fields) && (preg_match('#\\?Name#', $csv_header_line_fields[0]) != 0 || preg_match('#Name\\;E\\-mail\\sAddress#', $csv_header_line_fields[0]) != 0)) {\n $found_email_address = '';\n $found_name = '';\n\n $first_row_exploded = explode(';', $csv_header_line_fields[0]);\n\n $email_index = 1; // by default\n $name_index = 0; // by default\n\n foreach ($first_row_exploded as $key => $value) {\n if (preg_match('#\\?Name#', $value) != 0) {\n $name_index = $key; // Windows mail\n }\n if (preg_match('#^Name$#', $value) != 0) {\n $name_index = $key; // Outlook Express\n }\n if (preg_match('#E\\-mail\\sAddress#', $value) != 0) {\n $email_index = $key; // both\n }\n }\n\n while (($csv_line = fgetcsv($myfile, 10240, $del)) !== false) { // Reading a CSV record\n $row_exploded = (array_key_exists(0, $csv_line) && strlen($csv_line['0']) > 0) ? explode(';', $csv_line[0]) : array('', '');\n\n $found_email_address = (strlen($row_exploded[$email_index]) > 0) ? $row_exploded[$email_index] : '';\n $found_name = (strlen($row_exploded[$name_index]) > 0) ? $row_exploded[$name_index] : '';\n\n if (strlen($found_email_address) > 0) {\n // Add to the list what we've found\n $fields->attach(form_input_tick($found_name, do_lang_tempcode('RECOMMENDING_TO_LINE', escape_html($found_name), escape_html($found_email_address)), 'use_details_' . strval($email_counter), true));\n $hidden->attach(form_input_hidden('details_email_' . strval($email_counter), $found_email_address));\n $hidden->attach(form_input_hidden('details_name_' . strval($email_counter), $found_name));\n $email_counter++;\n $success_read = true;\n }\n }\n } else {\n require_code('type_sanitisation');\n\n // Find e-mail\n $email_field_index = mixed();\n foreach ($possible_email_fields as $field) {\n foreach ($csv_header_line_fields as $i => $header_field) {\n if (strtolower($header_field) == strtolower($field)) {\n $email_field_index = $i;\n $success_read = true;\n break 2;\n }\n\n // No header\n if (is_email_address($header_field)) {\n $email_field_index = $i;\n $success_read = true;\n rewind($myfile);\n break 2;\n }\n }\n }\n\n if ($success_read) {\n // Find name\n $name_field_index = mixed();\n foreach ($possible_name_fields as $field) {\n foreach ($csv_header_line_fields as $i => $header_field) {\n if ((strtolower($header_field) == strtolower($field)) && ($i != $email_field_index)) {\n $name_field_index = $i;\n break 2;\n }\n }\n }\n // Hmm, first one that is not the email then\n if (is_null($name_field_index)) {\n foreach ($csv_header_line_fields as $i => $header_field) {\n if ($i != $email_field_index) {\n $name_field_index = $i;\n break;\n }\n }\n }\n\n // Go through all records\n while (($csv_line = fgetcsv($myfile, 10240, $del)) !== false) { // Reading a CSV record\n if (empty($csv_line[$email_field_index])) {\n continue;\n }\n if (empty($csv_line[$name_field_index])) {\n continue;\n }\n\n $found_email_address = $csv_line[$email_field_index];\n $found_name = ucwords($csv_line[$name_field_index]);\n\n if (is_email_address($found_email_address)) {\n // Add to the list what we've found\n $fields->attach(form_input_tick($found_name, do_lang_tempcode('RECOMMENDING_TO_LINE', escape_html($found_name), escape_html($found_email_address)), 'use_details_' . strval($email_counter), true));\n $hidden->attach(form_input_hidden('details_email_' . strval($email_counter), $found_email_address));\n $hidden->attach(form_input_hidden('details_name_' . strval($email_counter), $found_name));\n $email_counter++;\n }\n }\n }\n }\n }\n\n fclose($myfile);\n }\n }\n }\n\n if (!$success_read) {\n warn_exit(do_lang_tempcode('ERROR_NO_CONTACTS_SELECTED'));\n }\n\n return do_template('FORM_SCREEN', array('_GUID' => 'e3831cf87d76295c48cbce627bdd07e3', 'PREVIEW' => true, 'SKIP_WEBSTANDARDS' => true, 'TITLE' => $this->title, 'HIDDEN' => $hidden, 'FIELDS' => $fields, 'URL' => $post_url, 'SUBMIT_ICON' => 'menu__site_meta__recommend', 'SUBMIT_NAME' => $submit_name, 'TEXT' => $text));\n }", "public function MetadataEntryForm()\n {\n // NIWA are worried about parameter case and would like it case insensitive so convert all get vars to lower\n // I think this is because they are not 100% what case the parameters from oracle will be in.\n $params = array_change_key_case($this->getRequest()->getVars(), CASE_LOWER);\n\n // Check in the parameters sent to this page if there are certian fields needed to power the\n // functionality which emails project coordinators and if so get them as we will need to add\n // them to the bottom of the form as hidden fields, this way we can access them in the form\n // processing and send the email.\n $hiddenFields = array();\n\n // These 2 fields can be populated either by Project_Coordinator or Project_Administrator as Oracle actually\n // sends Project_Administrator. NIWA want to keep the field here called coordinator.\n if (!empty($params['project_coordinator'])) {\n $hiddenFields['_Project_Coordinator'] = $params['project_coordinator'];\n } else if (!empty($params['project_administrator'])) {\n $hiddenFields['_Project_Coordinator'] = $params['project_administrator'];\n }\n\n if (!empty($params['project_coordinator_email'])) {\n $hiddenFields['_Project_Coordinator_email'] = $params['project_coordinator_email'];\n } else if (!empty($params['project_administrator_email'])) {\n $hiddenFields['_Project_Coordinator_email'] = $params['project_administrator_email'];\n }\n\n if (!empty($params['project_manager'])) {\n $hiddenFields['_Project_Manager'] = $params['project_manager'];\n }\n\n if (!empty($params['project_code'])) {\n $hiddenFields['_Project_Code'] = $params['project_code'];\n }\n\n // Get the fields defined for this page, exclude the placeholder fields as they are not displayed to the user.\n $metadataFields = $this->Fields()->where(\"FieldType != 'PLACEHOLDER'\")->Sort('SortOrder', 'asc');\n\n // Create fieldfield for the form fields.\n $formFields = FieldList::create();\n $actions = FieldList::create();\n $requiredFields = array();\n\n // Push the required fields message as a literal field at the top.\n $formFields->push(\n LiteralField::create('required', '<p>* Required fields</p>')\n );\n\n if ($metadataFields->count()) {\n foreach($metadataFields as $field) {\n // Create a version of the label with spaces replaced with underscores as that is how\n // any paraemters in the URL will come (plus we can use it for the field name)\n $fieldName = str_replace(' ', '_', $field->Label);\n $fieldLabel = $field->Label;\n\n // If the field is required then add it to the required fields and also add an\n // asterix to the end of the field label.\n if ($field->Required) {\n $requiredFields[] = $fieldName;\n $fieldLabel .= ' *';\n }\n\n // Check if there is a parameter in the GET vars with the corresponding name.\n $fieldValue = null;\n\n if (isset($params[strtolower($fieldName)])) {\n $fieldValue = $params[strtolower($fieldName)];\n }\n\n // Define a var for the new field, means no matter the type created\n // later on in the code we can apply common things like the value.\n $newField = null;\n\n // Single line text field creation.\n if ($field->FieldType == 'TEXTBOX') {\n $formFields->push($newField = TextField::create($fieldName, $fieldLabel));\n } else if ($field->FieldType == 'TEXTAREA') {\n $formFields->push($newField = TextareaField::create($fieldName, $fieldLabel));\n } else if ($field->FieldType == 'KEYWORDS') {\n // If keywords then output 2 fields the textbox for the keywords and then also a\n // literal read only list of those already specified by the admin below.\n $formFields->push($newField = TextAreaField::create($fieldName, $fieldLabel));\n $formFields->push(LiteralField::create(\n $fieldName . '_adminKeywords',\n \"<div class='control-group' style='margin-top: -12px'>Already specified : \" . $field->KeywordsValue . \"</div>\"\n ));\n } else if ($field->FieldType == 'DROPDOWN') {\n // Some dropdowns have an 'other' option so must add the 'other' to the entries\n // and also have a conditionally displayed text field for when other is chosen.\n $entries = $field->DropdownEntries()->sort('SortOrder', 'Asc')->map('Key', 'Label');\n\n if ($field->DropdownOtherOption == true) {\n $entries->push('other', 'Other');\n }\n\n $formFields->push(\n $newField = DropdownField::create(\n $fieldName,\n $fieldLabel,\n $entries\n )->setEmptyString('Select')\n );\n\n if ($field->DropdownOtherOption == true) {\n $formFields->push(\n TextField::create(\n \"${fieldName}_other\",\n \"Please specify the 'other'\"\n )->hideUnless($fieldName)->isEqualTo(\"other\")->end()\n );\n\n //++ @TODO\n // Ideally if the dropdown is required then if other is selected the other field\n // should also be required. Unfortunatley the conditional validation logic of ZEN\n // does not work in the front end - so need to figure out how to do this.\n }\n }\n\n // If a new field was created then set some things on it which are common no matter the type.\n if ($newField) {\n // Set help text for the field if defined.\n if (!empty($field->HelpText)) {\n $newField->setRightTitle($field->HelpText);\n }\n\n // Field must only be made readonly if the admin specified that they should be\n // provided that a value was specified in the URL for it.\n if ($field->Readonly && $fieldValue) {\n $newField->setReadonly(true);\n }\n\n // Set the value of the field one was plucked from the URL params.\n if ($fieldValue) {\n $newField->setValue($fieldValue);\n }\n }\n }\n\n // Add fields to the bottom of the form for the user to include a message in the email sent to curators\n // this is entirely optional and will not be used in most cases so is hidden until a checkbox is ticked.\n $formFields->push(\n CheckboxField::create('AdditionalMessage', 'Include a message from me to the curators')\n );\n\n // For the email address, because its project managers filling out the form, check if the Project_Manager_email\n // has been specified in the URL params and if so pre-populate the field with that value.\n $formFields->push(\n $emailField = EmailField::create('AdditionalMessageEmail', 'My email address')\n ->setRightTitle('Please enter your email address so the curator knows who the message below is from.')\n ->hideUnless('AdditionalMessage')->isChecked()->end()\n );\n\n if (isset($params['project_manager_email'])) {\n $emailField->setValue($params['project_manager_email']);\n }\n\n $formFields->push(\n TextareaField::create('AdditionalMessageText', 'My message')\n ->setRightTitle('You can enter a message here which is appended to the email sent the curator after the record has successfully been pushed to the catalogue.')\n ->hideUnless('AdditionalMessage')->isChecked()->end()\n );\n\n // If there are any hidden fields then loop though and add them as hidden fields to the bottom of the form.\n if ($hiddenFields) {\n foreach($hiddenFields as $key => $val) {\n $formFields->push(\n HiddenField::create($key, '', $val)\n );\n }\n }\n\n // We have at least one field so set the action for the form to submit the entry to the catalogue.\n $actions = FieldList::create(FormAction::create('sendMetadataForm', 'Send'));\n } else {\n $formFields->push(\n ErrorMessage::create('No metadata entry fields have been specified for this page.')\n );\n }\n\n // Set up the required fields validation.\n $validator = ZenValidator::create();\n $validator->addRequiredFields($requiredFields);\n\n // Create form.\n $form = Form::create($this, 'MetadataEntryForm', $formFields, $actions, $validator);\n\n // Check if the data for the form has been saved in the session, if so then populate\n // the form with this data, if not then just return the default form.\n $data = Session::get(\"FormData.{$form->getName()}.data\");\n\n return $data ? $form->loadDataFrom($data) : $form;\n }", "public function searchForm( $return = false )\r\n\t{\r\n\t\tif( $this->searchMethod == 'general' ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif( $this->searchMethod == 'range' ) {\r\n\t\t\treturn $this->rangeSearch( $this->searchRangeValues );\r\n\t\t}\r\n\r\n\t\t$db =& SPFactory::db();\r\n\t\t$fdata = array();\r\n try {\r\n \t$db->dselect( array( 'baseData' ), 'spdb_field_data', array( 'fid' => $this->fid, 'copy' => '0', 'enabled' => 1 ), 'field( lang, \\''.Sobi::Lang().'\\'), baseData', 0, 0, 'baseData' );\r\n \t$data = $db->loadResultArray();\r\n } catch ( SPException $x ) {\r\n \tSobi::Error( $this->name(), SPLang::e( 'CANNOT_GET_FIELDS_DATA_DB_ERR', $x->getMessage() ), SPC::WARNING, 0, __LINE__, __FILE__ );\r\n }\r\n\r\n $data = ( ( array ) $data );\r\n if( count( $data ) ) {\r\n \t$fdata[ '' ] = Sobi::Txt( 'FD.INBOX_SEARCH_SELECT', array( 'name' => $this->name ) );\r\n \tforeach ( $data as $i => $d ) {\r\n \t\t$fdata[ strip_tags( $d ) ] = strip_tags( $d );\r\n \t}\r\n }\r\n return SPHtml_Input::select( $this->nid, $fdata, $this->_selected, false, array( 'class' => $this->cssClass.' '.Sobi::Cfg( 'search.form_list_def_css', 'SPSearchSelect' ), 'size' => '1' ) );\r\n\t}", "public function getForm($data = array(), $loadData = true)\n\t{\n\t\t// Get the form.\n\t\t$options = array('control' => 'jform', 'load_data' => $loadData);\n $form = $this->loadForm('tkdclub', 'email', $options);\n\n\t\tif (empty($form))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $form;\n\t}", "public function getForm($data = array(), $loadData = true) \n {\n\t\t\techo '<br/> **************************************************************';\n\t\t echo '<br/> model VISTA -> funcion getForm\t\t\t\t ';\n\t\t echo '<br/> ************************************************************** <br/>';\n // Get the form.\n $form = $this->loadForm('com_codigorecibo.vista', 'vista',array('control' => 'jform', 'load_data' => $loadData));\n if (empty($form)) \n {\n return false;\n }\n \n \n return $form;\n }", "public function retrieveFormFields()\n {\n return $this->start()->uri(\"/api/form/field\")\n ->get()\n ->go();\n }", "public function listForms();", "public function getForm($data = array(), $loadData = true)\n\t{\n\t}", "protected function getRecByNameEmail(string $name, string $email) {\n $sql = \"SELECT COUNT(*) FROM \" . $this->formsTableName . \" WHERE name = ? AND email = ?\";\n $stmt = $this->connect()->prepare($sql);\n $stmt->bindParam(1, $name, \\PDO::PARAM_STR);\n $stmt->bindParam(2, $email, \\PDO::PARAM_STR);\n $stmt->execute();\n $res = $stmt->fetchAll();\n return $res[0]['COUNT(*)'];\n }", "abstract protected function getFormTypeQuery();", "public function RunSearch()\n {\n BizSystem::log(LOG_DEBUG,\"FORMOBJ\",$this->m_Name.\"::RunSearch()\");\n global $g_BizSystem;\n $this->m_SearchRule = \"\";\n foreach ($this->m_RecordRow as $fldCtrl) {\n $value = $g_BizSystem->GetClientProxy()->GetFormInputs($fldCtrl->m_Name);\n if ($value) {\n $searchStr = $this->InputValToRule($fldCtrl->m_BizFieldName, $value);\n if ($this->m_SearchRule == \"\")\n $this->m_SearchRule .= $searchStr;\n else\n $this->m_SearchRule .= \" AND \" . $searchStr;\n }\n }\n\n $this->SetDisplayMode (MODE_R);\n $this->GotoPage(1);\n $this->m_RecordId = null; // clean the current record id\n $this->m_ClearSearchRule = true;\n return $this->ReRender();\n }", "public function getForm($data = array(), $loadData = true)\n\t{\n\t\t// Get the form.\n\t\t$form = $this->loadForm(\n\t\t\t'com_tjucm.itemform', 'itemform',\n\t\t\tarray('control' => 'jform',\n\t\t\t\t'load_data' => $loadData,\n\t\t\t)\n\t\t);\n\n\t\tif (empty($form))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $form;\n\t}", "public function getEmails(){\r\n \r\n $dbConfig = array(\r\n \"DB_DNS\" => 'mysql:host=localhost;port=3306;dbname=PHPadvClassSpring2015',\r\n \"DB_USER\" => 'root', \r\n \"DB_PASSWORD\" => '');\r\n $pdo = new DB($dbConfig);\r\n $db = $pdo->getDB();\r\n $stmt = $db->prepare(\"SELECT * FROM emailtype where active = 1\");\r\n if ($stmt->execute() && $stmt->rowCount() > 0) {\r\n $results = $stmt->fetchAll(PDO::FETCH_ASSOC);\r\n echo '<h3>Types of E-mails</h3>';\r\n foreach ($results as $value) {\r\n echo '<p>- <strong>', $value['emailtype'], '</strong></p>';\r\n }\r\n } else {\r\n echo '<p>No data found!</p>';\r\n } \r\n \r\n }", "public function showSearchForm(){\r\n global $nitobigridthemes,$isadmin,$havewriteperm;\r\n\r\n $rowsperpage = \"10\";\r\n\r\n if($isadmin==1){\r\n $grIdColumn=7; //define primary key column index, it will set as readonly afterwards (count from 0)\r\n $deleteddefaultvalue_js=\"myGrid.getCellObject(rowNo,6).setValue(0);\"; //if admin login got deleted column, during admin insert new record shall set it default =0 (not deleted)\r\n }\r\n else{\r\n $grIdColumn=5;//define primary key column index for normal user\r\n $deleteddefaultvalue_js=\"\";\r\n }\r\n\r\n $savectrl=\"\";\r\n $permctrl=\" rowinsertenabled=\\\"false\\\" rowdeleteenabled=\\\"false\\\" onbeforesaveevent=\\\"return false\\\" \";\r\n $alloweditgrid= \"false\";\r\n\r\necho <<< EOF\r\n\r\n<script language=\"javascript\" type=\"text/javascript\">\r\n\r\n jQuery(document).ready((function (){nitobi.loadComponent('DataboundGridApprovalList');}));\r\n\r\n function init(){}\r\n\r\n function search(){\r\n\r\n var grid = nitobi.getGrid(\"DataboundGridApprovalList\");\r\n var searchemployee_no=document.getElementById(\"searchemployee_no\").value;\r\n var searchemployee_name=document.getElementById(\"searchemployee_name\").value;\r\n var searchleave_fromdate=document.getElementById(\"searchleave_fromdate\").value;\r\n var searchleave_todate=document.getElementById(\"searchleave_todate\").value;\r\n //var searchleave_no=document.getElementById(\"searchleave_no\").value;\r\n var searchiscomplete=document.getElementById(\"searchiscomplete\").checked;\r\n var searchishistory=document.getElementById(\"searchishistory\").checked;\r\n\r\n var searchTxt = \"\";\r\n if(searchiscomplete == true)\r\n searchiscompletetxt = \"Yes\";\r\n else\r\n searchiscompletetxt = \"No\";\r\n\r\n if(searchishistory == true)\r\n searchishistorytxt = \"Yes\";\r\n else\r\n searchishistorytxt = \"No\";\r\n\r\n if(searchemployee_no != \"\")\r\n searchTxt += \"Employee No : \"+searchemployee_no+\"<br/>\";\r\n if(searchemployee_name != \"\")\r\n searchTxt += \"Employee Name : \"+searchemployee_name+\"<br/>\";\r\n if(searchleave_fromdate != \"\")\r\n searchTxt += \"Date From : \"+searchleave_fromdate+\"<br/>\";\r\n if(searchleave_todate != \"\")\r\n searchTxt += \"Date To : \"+searchleave_todate+\"<br/>\";\r\n //if(searchleave_no != \"\")\r\n //searchTxt += \"Doc No : \"+searchleave_no+\"<br/>\";\r\n\r\n searchTxt += \"Complete : \"+searchiscompletetxt+\"<br/>\";\r\n //searchTxt += \"Approval History : \"+searchishistorytxt+\"<br/>\";\r\n\r\n /*\r\n *only user isadmin will have element searchisdeleted (apply in every windows and records)\r\n *check element is exist before submit variable to avoid javascript failure\r\n */\r\n //if(document.getElementById(\"searchisdeleted\"))\r\n //var searchisdeleted=document.getElementById(\"searchisdeleted\").checked;\r\n\r\n //Submit javascript to grid with _GET method\r\n\tgrid.getDataSource().setGetHandlerParameter('searchemployee_no',searchemployee_no);\r\n\tgrid.getDataSource().setGetHandlerParameter('searchemployee_name',searchemployee_name);\r\n\tgrid.getDataSource().setGetHandlerParameter('searchleave_fromdate',searchleave_fromdate);\r\n grid.getDataSource().setGetHandlerParameter('searchleave_todate',searchleave_todate);\r\n //grid.getDataSource().setGetHandlerParameter('searchleave_no',searchleave_no);\r\n grid.getDataSource().setGetHandlerParameter('searchiscomplete',searchiscomplete);\r\n grid.getDataSource().setGetHandlerParameter('searchishistory',searchishistory);\r\n\r\n document.getElementById('rightBox').innerHTML = searchTxt;\r\n //reload grid data\r\n\tgrid.dataBind();\r\n //Pager.First('DataboundGridApprovalList');\r\n }\r\n\r\n //optional function to generate primary key value, ignore this function because we use autogen method\r\n function GetNewRecordID()\r\n {\r\n//\t\tvar myAjaxRequest = new nitobi.ajax.HttpRequest();\r\n//\r\n//\t\t// Define the url for your generatekey script\r\n//\t\t//myAjaxRequest.handler = 'approvallist.php?rnd=' + Math.random();\r\n// myAjaxRequest.handler = 'approvallist.php?action=searchgrid&';\r\n//\t\tmyAjaxRequest.async = false;\r\n//\t\tmyAjaxRequest.get();\r\n//\r\n//\t\t// return the result to the grid\r\n//\t\treturn myAjaxRequest.httpObj.responseText;\r\n }\r\n\r\n //after grid html render properly, set focus on it. It is important when use choose particular cell but\r\n // immediately press search again. From screen we won't detect cell is selected infact from javascript\r\n // detect selected\r\n function dataready(){\r\n\r\n var g = nitobi.getGrid('DataboundGridApprovalList');\r\n g.move(0,0);//need to trigger relative position 0,0 in for next code able to highlight at screen\r\n var selRow = g.getSelectedRow();\r\n\r\n }\r\n\r\n //Call event after save complete\r\n function savedone(eventArgs){\r\n var grid= nitobi.getGrid('DataboundGridApprovalList');\r\n var dataSource =grid.getDataSource();\r\n var errorMessage = dataSource.getHandlerError();\r\n\r\n if (!errorMessage) {//save successfully\r\n \t jQuery('#msgbox').fadeTo('slow', 1, function() {\r\n \t document.getElementById('msgbox').innerHTML=\"Record save successfully\";\r\n //document.getElementById('popupmessage').innerHTML=\"Please Wait.....\";\r\n search();\r\n popup('popUpDiv');\r\n\t\t});\r\n return true;\r\n }\r\n else{ //save failed\r\n \tsearch();\r\n\r\n popup('popUpDiv');\r\n\r\n \treturn false;\r\n \t}\r\n }\r\n\r\n //if save_data have error, trigger this function\r\n function showError(){\r\n\r\n var grid= nitobi.getGrid('DataboundGridApprovalList');\r\n var dataSource =grid.getDataSource();\r\n var errorMessage = dataSource.getHandlerError();\r\n\r\n\r\n\r\n if (errorMessage) {\r\n document.getElementById('msgbox').innerHTML=\"<b style=\\\"color:red\\\">\"+errorMessage+\"</b><br/>\";\r\n //grid.dataBind();\r\n }\r\n else\r\n document.getElementById('msgbox').innerHTML=\"\";\r\n jQuery('#msgbox').fadeTo('slow', 1, function() {});\r\n }\r\n\r\n\r\n //if user click particular column, auto fall into edit mode\r\n function clickrecord(eventArgs){\r\n row=eventArgs.getCell().getRow();\r\n col=eventArgs.getCell().getColumn();\r\n \r\n var myGrid = nitobi.getGrid('DataboundGridApprovalList');\r\n var myCell = myGrid.getCellObject(row, col);\r\n var objectVal = myGrid.getCellObject(row, 11);\r\n var objectVal2 = myGrid.getCellObject(row, 10);\r\n var objectVal3 = myGrid.getCellObject(row, 9);\r\n var objectVal4 = myGrid.getCellObject(row, 12);\r\n var objectVal5 = myGrid.getCellObject(row, 8);\r\n var objectVal6 = myGrid.getCellObject(row, 13);\r\n\r\n var primarykey_value = objectVal.getValue();\r\n var primarykey_name = objectVal2.getValue();\r\n var tablename = objectVal3.getValue();\r\n var window_workflow = objectVal4.getValue();\r\n var workflowtransaction_id = objectVal5.getValue();\r\n var hyperlink = objectVal6.getValue();\r\n\t\r\n if(col == 6){\r\n// if(primarykey_name == \"leave_id\"){\r\n// window.open(\"leave.php?action=edit&leave_id=\"+primarykey_value,\"Leave\"+primarykey_value);\r\n// }\r\n\r\n //if(primarykey_name == \"leave_id\"){\r\n //window.open(\"leave.php?action=edit&leave_id=\"+primarykey_value,\"Leave\"+primarykey_value);\r\n window.open(hyperlink+\"?action=edit&\"+primarykey_name+\"=\"+primarykey_value,window_workflow+\"-\"+primarykey_value);\r\n //}\r\n search();\r\n }\r\n\r\n if(col == 7){\r\n// alert(workflowtransaction_id);\r\n //if(primarykey_name == \"leave_id\"){\r\n var data=\"action=approvalwindows&primarykey_value=\"+primarykey_value+\"&primarykey_name=\"+primarykey_name+\"&tablename=\"+tablename+\"&window_workflow=\"+window_workflow+\"&workflowtransaction_id=\"+workflowtransaction_id;\r\n\r\n $.ajax({\r\n url: \"approvallist.php\",type: \"GET\",data: data,cache: false,\r\n success: function (xml) { \r\n\r\n document.getElementById('idApprovalWindows').innerHTML = xml;\r\n document.getElementById('idApprovalWindows').style.display = \"\";\r\n search();\r\n }\r\n\r\n });\r\n\r\n //}\r\n }\r\n\r\n\r\n\r\n }\r\n\r\n //add line button will call this\r\n function addline(){\r\n var g= nitobi.getGrid('DataboundGridApprovalList');\r\n g.insertAfterCurrentRow();\r\n }\r\n\r\n //trigger save activity from javascript\r\n function save()\r\n {\r\n \tif(document.getElementById(\"afterconfirm\").value==1){ //Ask for confirmation from delete activity already, process data immediately\r\n\t var g= nitobi.getGrid('DataboundGridApprovalList');\r\n\t document.getElementById(\"afterconfirm\").value=0;\r\n\t g.save();\r\n }\r\n\telse{ // not yet request confirmation\r\n \t if(confirm(\"Confirm the changes? Data will save into database immediately\")){\r\n //popup('popUpDiv');\r\n \t var g= nitobi.getGrid('DataboundGridApprovalList');\r\n\t document.getElementById(\"afterconfirm\").value=0;\r\n\t g.save();\r\n\t search();\r\n \t }\r\n \t // else //cancel request\r\n\t //search();\r\n\t}\r\n }\r\n\r\n function beforesave(){\r\n document.getElementById('popupmessage').innerHTML=\"Please Wait.....\";\r\n popup('popUpDiv');\r\n }\r\n\r\n function onclickdeletebutton(){ //when press delete button will triger this function and ask for confirmation\r\n \tvar g= nitobi.getGrid('DataboundGridApprovalList');\r\n var selRow = g.getSelectedRow();\r\n if(selRow==-1){// no select any row\r\n alert(\"Please choose a row before deleting.\");\r\n return false;\r\n }\r\n else\r\n g.deleteCurrentRow();\r\n }\r\n\r\n function checkAllowEdit(eventArgs){\r\n\tvar g= nitobi.getGrid('DataboundGridApprovalList');\r\n col=eventArgs.getCell().getColumn();\r\n if($alloweditgrid) //if user have permission to edit the cell, control primary key column read only at here too\r\n return true;\r\n else\r\n return false;\r\n }\r\n\r\n\r\n//after insert a new line will automatically fill in some value here\r\n function setDefaultValue(eventArgs)\r\n {\r\n var myGrid = eventArgs.getSource();\r\n var r = eventArgs.getRow();\r\n var rowNo = r.Row;\r\n myGrid.getCellObject(rowNo,3).setValue(10);\r\n $deleteddefaultvalue_js\r\n myGrid.selectCellByCoords(rowNo, 0);\r\n}\r\n\r\n\tfunction beforeDelete(){\r\n\t\tif(confirm('Delete this record? Data will save into database immediately.')){\r\n\t\t\tdocument.getElementById(\"afterconfirm\").value=1;\r\n //popup('popUpDiv');\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\telse{\r\n\t\t\tdocument.getElementById(\"afterconfirm\").value=0;\r\n\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n function closeWorkflowWindow(){\r\n document.getElementById('idApprovalWindows').style.display = \"none\";\r\n }\r\n\r\n</script>\r\n <div id=\"idApprovalWindows\" style=\"display:none\"></div>\r\n <table style=\"width:950px;\"><tr><td>$this->addnewctrl</td><td align=\"right\">$this->searchctrl</td></tr></table>\r\n\r\n <div >\r\n <table style=\"width:950px;\" align=\"center\">\r\n\r\n <tr><td align=\"center\" class=\"searchformheader\">Search Form</td></tr>\r\n\r\n <tr>\r\n <td>\r\nEOF;\r\n $this->headerSearchForm();\r\necho <<< EOF\r\n </td>\r\n </tr>\r\n\r\n <tr>\r\n <td>\r\n <div align=\"center\" id=\"statusDiv\"></div>\r\n <div align=\"center\">\r\n <input type=\"hidden\" id=\"totalRowGrid\" value=\"$rowsperpage\">\r\n <table style=\"width:950px;\"><tr><td class=\"head tdPager\">\r\n $savectrl\r\n\r\n <div id=\"pager_control\" class=\"inline\">\r\n <div id=\"pager_first\" class=\"inline FirstPage\" onclick=\"Pager.First('DataboundGridApprovalList');\" onmouseover=\"this.className+=' FirstPageHover';\" onmouseout=\"this.className='inline FirstPage';\" style=\"margin:0;border-right:1px solid #B1BAC2;\"></div>\r\n <div id=\"pager_prev\" class=\"inline PreviousPage\" onclick=\"Pager.Previous('DataboundGridApprovalList');\" onmouseover=\"this.className+=' PreviousPageHover';\" onmouseout=\"this.className='inline PreviousPage';\" style=\"margin:0;\"></div>\r\n <div class=\"inline\" style=\"height:22px;top:3px;\">\r\n <span class=\"inline\">Page</span>\r\n <span class=\"inline\" id=\"pager_current\">0</span>\r\n <span class=\"inline\">of</span>\r\n <span class=\"inline\" id=\"pager_total\">0</span>\r\n </div>\r\n <div id=\"pager_next\" class=\"inline NextPage\" onclick=\"Pager.Next('DataboundGridApprovalList');\" onmouseover=\"this.className+=' NextPageHover';\" onmouseout=\"this.className='inline NextPage';\" style=\"margin:0;border-right:1px solid #B1BAC2;\"></div>\r\n <div id=\"pager_last\" class=\"inline LastPage\" onclick=\"Pager.Last('DataboundGridApprovalList');\" onmouseover=\"this.className+=' LastPageHover';\" onmouseout=\"this.className='inline LastPage';\" style=\"margin:0;\"></div>\r\n </div>\r\n </td></tr></table>\r\n </td>\r\n </tr>\r\n\r\n <!-- savehandler=\"approvallist.php?action=save\" -->\r\n <tr>\r\n <td align=\"center\">\r\n\r\n <ntb:grid id=\"DataboundGridApprovalList\"\r\n mode=\"standard\"\r\n toolbarenabled='false'\r\n $permctrl\r\n ondatareadyevent=\"HandleReady(eventArgs);\"\r\n onhandlererrorevent=\"showError()\"\r\n oncellclickevent=\"clickrecord(eventArgs)\"\r\n keygenerator=\"GetNewRecordID();\"\r\n\r\n gethandler=\"approvallist.php?action=searchgrid\"\r\n\r\n onbeforecelleditevent=\"checkAllowEdit(eventArgs)\"\r\n onafterrowinsertevent=\"setDefaultValue(eventArgs)\"\r\n rowhighlightenabled=\"true\"\r\n width=\"943\"\r\n height=\"380\"\r\n rowheight=\"70\"\r\n onaftersaveevent=\"savedone(eventArgs)\"\r\n onbeforerowdeleteevent=\"beforeDelete()\"\r\n onafterrowdeleteevent=\"save()\"\r\n autosaveenabled=\"false\"\r\n theme=\"$nitobigridthemes\"\r\n rowsperpage=\"$rowsperpage\"\r\n >\r\n\r\n <ntb:columns>\r\n <ntb:textcolumn width=\"30\" label=\"No.\" xdatafld=\"seq_no\" classname=\"{\\$rh}\"></ntb:textcolumn>\r\n <ntb:textcolumn width=\"150\" label=\"Description\" xdatafld=\"workflow_name\" classname=\"{\\$rh}\"></ntb:textcolumn>\r\n <ntb:textcolumn width=\"130\" label=\"Employee\" xdatafld=\"employee_name\" classname=\"{\\$rh}\"></ntb:textcolumn>\r\n <ntb:textcolumn width=\"115\" label=\"Date\" xdatafld=\"apply_date\" classname=\"{\\$rh}\"></ntb:textcolumn>\r\n <ntb:textcolumn width=\"350\" label=\"Detail\" xdatafld=\"workflowtransaction_description\" classname=\"{\\$rh}\"></ntb:textcolumn>\r\n <ntb:textcolumn width=\"65\" label=\"Status\" xdatafld=\"workflowstatus_name\" classname=\"{\\$rh}\"></ntb:textcolumn>\r\n <ntb:textcolumn label=\"Edit\" xdatafld=\"operation\" sortenabled=\"false\" width=\"35\" initial=\"images/del.gif\" classname=\"{\\$rh}\" align=\"center\" cssstyle=\"cursor:pointer;\">\r\n <ntb:imageeditor></ntb:imageeditor>\r\n </ntb:textcolumn>\r\n <ntb:textcolumn label=\"Action\" xdatafld=\"approval\" sortenabled=\"false\" width=\"45\" initial=\"images/approval.gif\" classname=\"{\\$rh}\" align=\"center\" cssstyle=\"cursor:pointer;\">\r\n <ntb:imageeditor></ntb:imageeditor>\r\n </ntb:textcolumn>\r\n\r\n <ntb:textcolumn label=\"\" visible=\"false\" width=\"0\" xdatafld=\"workflowtransaction_id\" sortenabled=\"false\"></ntb:textcolumn>\r\n <ntb:textcolumn label=\"\" visible=\"false\" width=\"0\" xdatafld=\"tablename\" sortenabled=\"false\"></ntb:textcolumn>\r\n <ntb:textcolumn label=\"\" visible=\"false\" width=\"0\" xdatafld=\"primarykey_name\" sortenabled=\"false\"></ntb:textcolumn>\r\n <ntb:textcolumn label=\"\" visible=\"false\" width=\"0\" xdatafld=\"primarykey_value\" sortenabled=\"false\"></ntb:textcolumn>\r\n <ntb:textcolumn label=\"\" visible=\"false\" width=\"0\" xdatafld=\"window_workflow\" sortenabled=\"false\"></ntb:textcolumn>\r\n <ntb:textcolumn label=\"\" visible=\"false\" width=\"0\" xdatafld=\"hyperlink\" sortenabled=\"false\"></ntb:textcolumn>\r\n\r\n</ntb:columns>\r\n </ntb:grid>\r\n\r\n </td>\r\n </tr>\r\n\r\n <tr>\r\n <td><div id=\"msgbox\" style='display:none'></div></td>\r\n </tr>\r\n\r\n </table>\r\n </div>\r\nEOF;\r\n }" ]
[ "0.6425265", "0.63722837", "0.6259364", "0.62215644", "0.6205603", "0.6174275", "0.59410477", "0.589464", "0.58898467", "0.5853461", "0.5797628", "0.574772", "0.57431763", "0.5741406", "0.570083", "0.5668568", "0.5650954", "0.5633477", "0.56190294", "0.56185323", "0.5615549", "0.5602869", "0.55633414", "0.5559666", "0.55517036", "0.5545464", "0.55391794", "0.5533673", "0.55064833", "0.55036485" ]
0.79565746
0
end of getForm() ==== setForm() ========================================================= Upload the contact form data into the database. Parameters: $arr associated array of contact form data Return: TRUE insertion of contact form successful FALSE unsccessful insertion of contact form ========================================================================
protected function setForm(array $arr) { $sql = "INSERT INTO " . $this->formsTableName . " (name, email, telNum, persFavFood, msg, rating, retCust, favCat, ts) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)"; $stmt = $this->connect()->prepare($sql); $res = $stmt->execute([$arr['name'], $arr['email'], $arr['telNum'], $arr['persFavFood'], $arr['msg'], $arr['rating'], $arr['retCust'], $arr['favCat'], $arr['ts']]); if($res){ return TRUE; } else { return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SaveForm($form_data) {\n $this->db->insert('adebiti', $form_data);\n if ($this->db->affected_rows() == '1') {\n return TRUE;\n }\n return FALSE;\n }", "public function processFormData($arrPost, $arrForm, $arrFiles)\n {\n\t\tif(!$arrForm['csvExport']){\n\t\t\treturn;\n\t\t}\n\n if(is_array($arrPost))\n {\n $objFormSubmission = new FormDbModel();\n $objFormSubmission->tstamp = time();\n $objFormSubmission->submitted_date = time();\n $objFormSubmission->form_data = json_encode($arrPost);\n $objFormSubmission->form_name = $arrForm['title'];\n\t\t\t$objFormSubmission->pid = $arrForm['id'];\n\t\t\t$objFormSubmission->save();\n }\n }", "function SaveForm($form_data)\n\t{\n\t\t$this->db->insert('gig_table', $form_data);\n\t\tif ($this->db->affected_rows() == '1')\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\treturn FALSE;\n\t}", "public function SaveForm($form_data)\r\n {\r\n $this->db->insert($this->table, $form_data);\r\n\r\n if ($this->db->affected_rows() == '1')\r\n {\r\n return TRUE;\r\n }\r\n\r\n return FALSE;\r\n }", "function SaveForm($form_data)\n\t{\n\t\t$this->db->insert($this->table, $form_data);\n\t\t\n\t\tif ($this->db->affected_rows() == '1')\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\t\n\t\treturn FALSE;\n\t}", "private function saveForm()\n {\n \tglobal $core;\n\n\t\t// Form ID check\n\t\tif (!empty($_POST['mj_form_id']) &&\n\t\t\tfilter_var($_POST['mj_form_id'], FILTER_VALIDATE_INT) === false) {\n\t\t\t$core->error->add(sprintf(__('Unknown form of ID “%s”.'), $_POST['mj_form_id']));\n\t\t}\n\n \t// Form name check\n \tif (empty($_POST['mj_form_name'])) {\n \t\t$core->error->add(__('Please enter a form name.'));\n \t} elseif (strlen($_POST['mj_form_name']) > 50) {\n \t\t$core->error->add(__('The form name is too long.'));\n \t}\n\n \t// Form data handler check, only if we are creating a new form\n\t\tif (empty($_POST['mj_form_id'])) {\n\t\t\tif (empty($_POST['mj_form_action'])) {\n\t\t\t\t$core->error->add(__('Please choose a handler for the form results.'));\n\t\t\t} else if (!in_array($_POST['mj_form_action'], majordome::getDataHandlerList())) {\n\t\t\t\t$core->error->add(__('The chosen data handler does not exists.'));\n\t\t\t}\n\t\t}\n\n \t// Form fields check\n \tif (empty($_POST['mj_form_content'])) {\n\t\t\t/* If we are editing an existing form, an empty content means that\n\t\t\t * it is unchanged\n\t\t\t */\n\t\t\tif (isset($_POST['mj_form_id']) && isset($this->form_data)) {\n\t\t\t\t$_POST['mj_form_content'] = $this->form_data->form_fields;\n\t\t\t} else {\n\t\t\t\t$core->error->add(__('The form has no field.'));\n\t\t\t}\n \t}\n\n \tif ($core->error->flag() === false) {\n \t\t// The form is valid, we store the result in the DB\n\n\t\t\tif (empty($_POST['mj_form_id'])) {\n\t\t\t\t// We create a new form\n\t\t\t\t$success = majordomeDBHandler::insert($_POST['mj_form_name'], $_POST['mj_form_desc'], $_POST['mj_form_action'], $_POST['mj_form_content']);\n\n\t\t\t\tif ($success) {\n\t\t\t\t\t// The form has been successfully created, so we hide this page from the view\n\t\t\t\t\tdcPage::addSuccessNotice(__('The form has been successfully created.'));\n\t\t\t\t\t$this->hidden = true;\n\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\t$core->error->add(sprintf(__('An unknown error occurred. The form could not be created.'), html::escapeHTML($_POST['mj_form_name'])));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// We update the existing form\n\t\t\t\ttry {\n\t\t\t\t\tmajordomeDBHandler::update($_POST['mj_form_id'], $_POST['mj_form_name'], $_POST['mj_form_desc'], $_POST['mj_form_content']);\n\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\t$core->error->add(sprintf(__('An unknown error occurred: %s.'), $e->getMessage()));\n\t\t\t\t}\n\n\t\t\t\t// The form has been successfully created, so we hide this page from the view\n\t\t\t\tdcPage::addSuccessNotice(__('The form has been successfully updated.'));\n\t\t\t\t$this->hidden = true;\n\t\t\t\treturn true;\n\t\t\t}\n \t}\n\n\t\treturn false;\n\t}", "function updateContact($sfConn, $dataArray){\n\t\techo(\"<P> updateContact \");\n $sObjects = array();\n foreach ($dataArray as $fieldset)\n {\n\t\t\t\techo(\"<P> Set records to Contact \");\n $sObject = new sObject();\n $sObject->type = 'Contact'; \n $sObject->fields = $fieldset;\n \t$sObject->Id = $fieldset[iaa_id];\n array_push($sObjects, $sObject);\n }\n\t\techo(\"<P> Ready to roll \");\n $success = update_objects($sfConn, $sObjects);\n return $success; \n }", "protected function handleSave()\n {\n require_once('modules/Campaigns/utils.php');\n require_once(\"include/formbase.php\");\n $lead = false;\n if (!empty($_REQUEST['record']))\n {\n $lead = BeanFactory::getBean('Leads', $_REQUEST['record']);\n }\n\n global $beanList;\n $this->loadDefs();\n $beans = array();\n $selectedBeans = array();\n $selects = array();\n //Make sure the contact object is availible for relationships.\n $beans['Contacts'] = BeanFactory::newBean('Contacts');\n $beans['Contacts']->id = create_guid();\n $beans['Contacts']->new_with_id = true;\n\n // Bug 39287 - Check for Duplicates on selected modules before save\n if (!empty($_REQUEST['selectedContact']))\n {\n $beans['Contacts']->retrieve($_REQUEST['selectedContact']);\n if (!empty($beans['Contacts']->id))\n {\n $beans['Contacts']->new_with_id = false;\n unset($_REQUEST[\"convert_create_Contacts\"]);\n unset($_POST[\"convert_create_Contacts\"]);\n }\n }\n elseif (!empty($_REQUEST[\"convert_create_Contacts\"]) && $_REQUEST[\"convert_create_Contacts\"] != \"false\" && !isset($_POST['ContinueContact']))\n {\n $contactForm = new ContactFormBase();\n $duplicateContacts = $contactForm->checkForDuplicates('Contacts');\n\n if (isset($duplicateContacts))\n {\n echo $contactForm->buildTableForm($duplicateContacts, 'Contacts');\n return;\n }\n $this->new_contact = true;\n } elseif (isset($_POST['ContinueContact'])) {\n $this->new_contact = true;\n }\n // Accounts\n if (!empty($_REQUEST['selectedAccount']))\n {\n $_REQUEST['account_id'] = $_REQUEST['selectedAccount'];\n unset($_REQUEST[\"convert_create_Accounts\"]);\n unset($_POST[\"convert_create_Accounts\"]);\n }\n elseif (!empty($_REQUEST[\"convert_create_Accounts\"]) && $_REQUEST[\"convert_create_Accounts\"] != \"false\" && empty($_POST['ContinueAccount']))\n {\n $accountForm = new AccountFormBase();\n $duplicateAccounts = $accountForm->checkForDuplicates('Accounts');\n if (isset($duplicateAccounts))\n {\n echo $accountForm->buildTableForm($duplicateAccounts);\n return;\n }\n }\n\n foreach ($this->defs as $module => $vdef)\n {\n //Create a new record if \"create\" was selected\n \tif (!empty($_REQUEST[\"convert_create_$module\"]) && $_REQUEST[\"convert_create_$module\"] != \"false\")\n {\n //Save the new record\n\t if (empty($beans[$module]))\n\t \t$beans[$module] = BeanFactory::newBean($module);\n\n \t$this->populateNewBean($module, $beans[$module], $beans['Contacts'], $lead);\n\n // when creating a new contact, create the id for linking with other modules\n // and do not populate it with lead's old account_id\n if ($module == 'Contacts')\n {\n $beans[$module]->id = create_guid();\n $beans[$module]->new_with_id = true;\n $beans[$module]->account_id = '';\n }\n }\n //If an existing bean was selected, relate it to the contact\n else if (!empty($vdef['ConvertLead']['select']))\n {\n //Save the new record\n $select = $vdef['ConvertLead']['select'];\n $fieldDef = $beans['Contacts']->field_defs[$select];\n if (!empty($fieldDef['id_name']) && !empty($_REQUEST[$fieldDef['id_name']]))\n {\n $beans['Contacts']->{$fieldDef['id_name']} = $_REQUEST[$fieldDef['id_name']];\n $selects[$module] = $_REQUEST[$fieldDef['id_name']];\n if (!empty($_REQUEST[$select]))\n {\n $beans['Contacts']->$select = $_REQUEST[$select];\n }\n // Bug 39268 - Add the existing beans to a list of beans we'll potentially add the lead's activities to\n $selectedBeans[$module] = BeanFactory::getBean($module, $_REQUEST[$fieldDef['id_name']]);;\n // If we selected the Contact, just overwrite the $beans['Contacts']\n if ($module == 'Contacts')\n {\n $beans[$module] = $selectedBeans[$module];\n }\n }\n }\n }\n\n $this->handleActivities($lead, $beans);\n // Bug 39268 - Add the lead's activities to the selected beans\n $this->handleActivities($lead, $selectedBeans);\n\n //link selected account to lead if it exists\n if (!empty($selectedBeans['Accounts']))\n {\n $lead->account_id = $selectedBeans['Accounts']->id;\n }\n \n // link account to contact, if we picked an existing contact and created a new account\n if (!empty($beans['Accounts']->id) && !empty($beans['Contacts']->account_id) \n && $beans['Accounts']->id != $beans['Contacts']->account_id)\n {\n $beans['Contacts']->account_id = $beans['Accounts']->id;\n }\n \n // Saving beans with priorities.\n // Contacts and Accounts should be saved before lead activities to create correct relations\n $saveBeanPriority = array('Contacts', 'Accounts');\n $tempBeans = array();\n\n foreach ($saveBeanPriority as $name)\n {\n if (isset($beans[$name]))\n {\n $tempBeans[$name] = $beans[$name];\n }\n }\n\n $beans = array_merge($tempBeans, $beans);\n unset($tempBeans);\n\n $calcFieldBeans = array();\n //Handle non-contacts relationships\n foreach ($beans as $bean)\n {\n if (!empty($lead))\n {\n if(empty($bean->team_name))\n {\n $bean->team_id = $lead->team_id;\n $bean->team_set_id = $lead->team_set_id;\n }\n if (empty($bean->assigned_user_id))\n {\n $bean->assigned_user_id = $lead->assigned_user_id;\n }\n $leadsRel = $this->findRelationship($bean, $lead);\n if (!empty($leadsRel))\n {\n $bean->load_relationship($leadsRel);\n $relObject = $bean->$leadsRel->getRelationshipObject();\n if ($relObject->relationship_type == \"one-to-many\" && $bean->$leadsRel->_get_bean_position())\n {\n $id_field = $relObject->rhs_key;\n $lead->$id_field = $bean->id;\n }\n else\n {\n $bean->$leadsRel->add($lead->id);\n }\n }\n }\n //Special case code for opportunities->Accounts\n if ($bean->object_name == \"Opportunity\" && empty($bean->account_id))\n {\n if (isset($beans['Accounts']))\n {\n $bean->account_id = $beans['Accounts']->id;\n $bean->account_name = $beans['Accounts']->name;\n }\n else if (!empty($selects['Accounts']))\n {\n $bean->account_id = $selects['Accounts'];\n }\n }\n\n //create meetings-users relationship\n if ($bean->object_name == \"Meeting\")\n {\n $bean = $this->setMeetingsUsersRelationship($bean);\n }\n $this->copyAddressFields($bean, $beans['Contacts']);\n\n $bean->save();\n //if campaign id exists then there should be an entry in campaign_log table for the newly created contact: bug 44522\n if (isset($lead->campaign_id) && $lead->campaign_id != null && $bean->object_name == \"Contact\")\n {\n campaign_log_lead_or_contact_entry($lead->campaign_id, $lead, $beans['Contacts'], 'contact');\n }\n\n //iterate through each field in field map and check meta for calculated fields\n foreach ($bean->field_defs as $calcFieldDefs) {\n if (!empty($calcFieldDefs['calculated'])) {\n //bean has a calculated field, lets add it to the array for later processing\n $calcFieldBeans[] = $bean;\n break;\n }\n }\n\n }\n if (!empty($lead))\n {\t//Mark the original Lead converted\n $lead->status = \"Converted\";\n $lead->converted = '1';\n $lead->in_workflow = true;\n $lead->save();\n }\n\n //IF beans have calculated fields, re-save now that all beans and relationships have been updated\n foreach ($calcFieldBeans as $calcFieldBean) {\n //refetch bean and save to update Calculated Fields.\n $calcFieldBean->retrieve($calcFieldBean->id);\n $calcFieldBean->save();\n }\n\n $this->displaySaveResults($beans);\n }", "public static function insert()\n {\n if (isset($_POST['name'], \n $_POST['telephone'],\n $_POST['mobile'],\n $_POST['email'],\n $_POST['clientid'])) {\n ContactDAO::create($_POST['name'], \n $_POST['telephone'],\n $_POST['mobile'],\n $_POST['email'],\n $_POST['clientid']);\n }\n }", "protected function saveFormData($form_data, $contact_data, &$form_record=array())\n {\n // first check the contact data\n $contact_id = -1;\n\n if (!empty($contact_data) && isset($contact_data['communication_email'])) {\n // check the contact information and create a new or update an existing record\n\n if (false !== ($contact_id = $this->app['contact']->existsLogin($contact_data['communication_email']))) {\n // this contact already exists!\n $contact = $this->app['contact']->select($contact_id);\n $data = array();\n\n foreach ($contact['person'][0] as $key => $value) {\n if (isset($contact_data[$key]) && !empty($contact_data[$key]) &&\n ($contact_data[$key] != $value)) {\n $data['person'][0]['contact_id'] = $contact_id;\n $data['person'][0]['person_id'] = $contact['person'][0]['person_id'];\n $data['person'][0][$key] = $contact_data[$key];\n }\n }\n\n foreach ($contact['address'][0] as $key => $value) {\n if (isset($contact_data[$key]) && !empty($contact_data[$key]) &&\n ($contact_data[$key] != $value)) {\n $data['address'][0]['contact_id'] = $contact_id;\n $data['address'][0]['address_id'] = $contact['address'][0]['address_id'];\n $data['address'][0][$key] = $contact_data[$key];\n }\n }\n\n $phone_checked = false;\n foreach ($contact['communication'] as $communication) {\n // update existing communication entries\n if (($communication['communication_type'] == 'EMAIL') &&\n ($communication['communication_usage'] == 'PRIMARY') &&\n !empty($contact_data['communication_email']) &&\n ($communication['communication_value'] != $contact_data['communication_email'])) {\n $data['communication'][] = array(\n 'contact_id' => $contact_id,\n 'communication_id' => $communication['communication_id'],\n 'communication_value' => $contact_data['communication_email']\n );\n }\n elseif (($communication['communication_type'] == 'PHONE') &&\n ($communication['communication_usage'] == 'PRIMARY') &&\n !empty($contact_data['communication_phone']) &&\n ($communication['communication_value'] != $contact_data['communication_phone'])) {\n $data['communication'][] = array(\n 'contact_id' => $contact_id,\n 'communication_id' => $communication['communication_id'],\n 'communication_value' => $contact_data['communication_phone']\n );\n $phone_checked = true;\n }\n }\n\n\n if (!$phone_checked && !empty($contact_data['communication_phone'])) {\n // add a communication entry for the phone\n $data['communication'][] = array(\n 'contact_id' => $contact_id,\n 'communication_id' => -1,\n 'communication_type' => 'PHONE',\n 'communication_value' => $contact_data['communication_phone'],\n 'communication_usage' => 'PRIMARY'\n );\n }\n\n\n if (!empty($data)) {\n $data['contact']['contact_id'] = $contact_id;\n if (!$this->app['contact']->update($data, $contact_id)) {\n return false;\n }\n }\n }\n else {\n // create a new contact\n $data = array(\n 'contact' => array(\n 'contact_id' => -1,\n 'contact_name' => $contact_data['communication_email'],\n 'contact_login' => $contact_data['communication_email'],\n 'contact_type' => 'PERSON'\n ),\n 'person' => array(\n array(\n 'contact_id' => -1,\n 'person_id' => -1,\n 'person_gender' => isset($contact_data['person_gender']) ? $contact_data['person_gender'] : 'MALE',\n 'person_title' => isset($contact_data['person_title']) ? $contact_data['person_title'] : 'NO_TITLE',\n 'person_first_name' => isset($contact_data['person_first_name']) ? $contact_data['person_first_name'] : '',\n 'person_last_name' => isset($contact_data['person_last_name']) ? $contact_data['person_last_name'] : '',\n 'person_nick_name' => isset($contact_data['person_nick_name']) ? $contact_data['person_nick_name'] : '',\n 'person_birthday' => isset($contact_data['person_birthday']) ? $contact_data['person_birthday'] : '0000-00-00'\n )\n ),\n 'address' => array(\n array(\n 'contact_id' => -1,\n 'address_id' => -1,\n 'address_type' => 'PRIMARY', // PRIVATE is no longer in use,\n 'address_street' => isset($contact_data['address_street']) ? $contact_data['address_street'] : '',\n 'address_zip' => isset($contact_data['address_zip']) ? $contact_data['address_zip'] : '',\n 'address_city' => isset($contact_data['address_city']) ? $contact_data['address_city'] : ''\n )\n ),\n 'communication' => array(\n array(\n 'contact_id' => -1,\n 'communication_id' => -1,\n 'communication_type' => 'EMAIL',\n 'communication_value' => $contact_data['communication_email'],\n 'communication_usage' => 'PRIMARY'\n ),\n array(\n 'contact_id' => -1,\n 'communication_id' => -1,\n 'communication_type' => 'PHONE',\n 'communication_value' => isset($contact_data['communication_phone']) ? $contact_data['communication_phone'] : '',\n 'communication_usage' => 'PRIMARY'\n )\n )\n );\n if (!$this->app['contact']->insert($data, $contact_id)) {\n // problem inserting the new contact!\n return false;\n }\n }\n\n // check if the TAG `FORMS` exists and create it if needed\n if (!$this->app['contact']->existsTagName('FORMS')) {\n $this->app['contact']->createTagName('FORMS',\n $this->app['translator']->trans('This tag will be assigned to all user-defined `Contact` forms.'));\n }\n\n $tags = array();\n $tags[] = 'FORMS';\n\n if (isset($contact_data['tags']) && !empty($contact_data['tags'])) {\n // check user defined TAGS\n if (false !== strpos($contact_data['tags'], ',')) {\n $user_tags = explode(',', $contact_data['tags']);\n foreach ($user_tags as $user_tag) {\n $user_tag = strtoupper(trim($user_tag));\n if (!empty($user_tag)) {\n // check the TAG\n $tag_name = null;\n if (!$this->app['contact']->validateTagName($user_tag, $tag_name)) {\n // failed the tag name check!\n $this->app['monolog']->addDebug('The user defined TAG '.$user_tag.' failed the tag name check!');\n continue;\n }\n if (!$this->app['contact']->existsTagName($tag_name)) {\n // create the TAG\n $this->app['contact']->createTagName($tag_name,\n sprintf('This tag was automatically generated for the form %s', self::$form_name));\n }\n $tags[] = $tag_name;\n }\n }\n }\n else {\n $tags[] = strtoupper(trim($contact_data['tags']));\n }\n }\n\n if (isset(self::$form_config['tags']) && is_array(self::$form_config['tags'])) {\n foreach (self::$form_config['tags'] as $key => $tag) {\n if (!isset($tag['name'])) {\n $this->setAlert('Missing the field `name` in the `form.json` tag definition!',\n array(), self::ALERT_TYPE_DANGER);\n return false;\n }\n $tag_name = null;\n if (!$this->app['contact']->validateTagName($tag['name'], $tag_name)) {\n // failed the tag name check!\n return false;\n }\n if ($this->app['contact']->existsTagName($tag_name)) {\n // this tag already exists, add the tag to the array\n $tags[] = $tag_name;\n continue;\n }\n // add a description to the tag\n $tag_description = isset($tag['description']) ? $tag['description'] :\n sprintf('This tag was automatically generated for the form %s', self::$form_name);\n $this->app['contact']->createTagName($tag_name, $tag_description);\n $tags[] = $tag_name;\n }\n }\n\n // loop through the tags and check if they are assigned to the contact\n foreach ($tags as $tag) {\n if (!$this->app['contact']->issetContactTag($tag, $contact_id)) {\n $this->app['contact']->setContactTag($tag, $contact_id);\n }\n }\n }\n\n $form_record = array(\n 'contact_id' => $contact_id,\n 'contact_data' => json_encode($contact_data),\n 'form_name' => self::$form_name,\n 'form_config' => json_encode(self::$form_config),\n 'form_data' => json_encode($form_data),\n 'form_submitted_when' => date('Y-m-h H:i:s'),\n 'form_submitter_ip' => $_SERVER['REMOTE_ADDR']\n );\n\n $FormData = new FormData($this->app);\n $FormData->insert($form_record);\n return true;\n }", "function SaveForm($form_data)\n {\n $this->db->insert('prizebonddraw', $form_data);\n\n if ($this->db->affected_rows() == '1')\n {\n return TRUE;\n }\n\n return FALSE;\n }", "function handleFormSubmit($mode = self::CREATE){\r\n\t\t$ret = false;\r\n\t\ttry{\r\n\t\t\t$ret = $this->isSubmit();\r\n\t\t\tif($ret === NULL){\r\n\t\t\t\t$this->fillWithData(NULL, true);\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t\tif($ret === false){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}catch(EFormEnd $e){\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tif($ret === true){\r\n\t\t\t$fromDB = false;\r\n\t\t\tif($data = $this->validate()){\r\n\t\t\t\t$bSave = false;\r\n\r\n\t\t\t\t$this->fields->fillWithData($data);\r\n\r\n\t\t\t\t$data = $this->handleMEntity($this->getData());\r\n\r\n\t\t\t\ttry{\r\n\t\t\t\t\tif($this->interCallBacks->isCallable(self::ON_BEFORE_SAVE)){\r\n\t\t\t\t\t\tif(!($call_ret = $this->interCallBacks->runCallBackParams(self::ON_BEFORE_SAVE, [\r\n\t\t\t\t\t\t\t$data,\r\n\t\t\t\t\t\t\t$this\r\n\t\t\t\t\t\t]))){\r\n\t\t\t\t\t\t\t$this->fillWithData($data);\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$data = $call_ret;\r\n\t\t\t\t\t}\r\n\t\t\t\t}catch(ModelSaveException $e){\r\n\t\t\t\t\t$this->fillWithData($data);\r\n\t\t\t\t\t$this->addErr($e->getErrors());\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tOBE_App::$db->startTransaction();\r\n\r\n\t\t\t\ttry{\r\n\t\t\t\t\t$fromDB = true;\r\n\t\t\t\t\tif($this->recordIdkeyName === NULL){\r\n\t\t\t\t\t\t$bSave = $this->model->Save($data, $this->scope->recordId, $this->recursionSave);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t$keyName = $data[$this->model->name][$this->recordIdkeyName];\r\n\t\t\t\t\t\t$bInsert = false;\r\n\t\t\t\t\t\tif($this->scope->recordId === NULL){\r\n\t\t\t\t\t\t\t$bInsert = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$this->model->primaryKey = $this->recordIdkeyName;\r\n\t\t\t\t\t\t$bSave = $this->model->Save($data, $this->scope->recordId, $this->recursionSave, $bInsert);\r\n\t\t\t\t\t\t$data[$this->model->name][$this->recordIdkeyName] = $keyName;\r\n\t\t\t\t\t}\r\n\t\t\t\t}catch(ModelSaveException $e){\r\n\t\t\t\t\t$this->addErr($e->getErrors());\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif($bSave){\r\n\t\t\t\t\tif($this->recordIdkeyName !== NULL){\r\n\t\t\t\t\t\t$this->scope->recordId = $data[$this->model->name][$this->recordIdkeyName];\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t$this->scope->recordId = $this->model->id;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$mid = $this->scope->recordId;\r\n\t\t\t\t\tif($this->scope->parent){\r\n\t\t\t\t\t\t$mid = $this->scope->getMasterId();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$masterScope = $this->scope->getMaster();\r\n\r\n\t\t\t\t\t$this->bSave = true;\r\n\t\t\t\t\tif($this->model->_saveWasInsert){\r\n\t\t\t\t\t\tif($this->interCallBacks->isCallable(self::ON_INSERT_NEW)){\r\n\t\t\t\t\t\t\t$data = $this->interCallBacks->runCallBackParams(self::ON_INSERT_NEW, [\r\n\t\t\t\t\t\t\t\t$data,\r\n\t\t\t\t\t\t\t\t$this\r\n\t\t\t\t\t\t\t]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$masterScope->info->activityLog('Vytvořeno', ($this->scope->parent) ? $this->scope->info->name : 'Vytvořen záznam', $mid);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t$masterScope->info->activityLog('Upraveno', ($this->scope->parent) ? $this->scope->info->name : 'Upraven záznam', $mid);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$this->mode = self::EDIT;\r\n\t\t\t\t\tOBE_App::$db->finishTransaction(true);\r\n\t\t\t\t\tif($this->interCallBacks->isCallable(self::ON_AFTER_SAVE)){\r\n\t\t\t\t\t\t$this->interCallBacks->runCallBackParams(self::ON_AFTER_SAVE,\r\n\t\t\t\t\t\t\t[\r\n\t\t\t\t\t\t\t\t$data,\r\n\t\t\t\t\t\t\t\t$this,\r\n\t\t\t\t\t\t\t\t$this->model->_saveWasInsert\r\n\t\t\t\t\t\t\t]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$this->fillWithData();\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif($es = OBE_App::$db->errors->getErrors()){\r\n\t\t\t\t\t\t$this->addErr('Chyba při ukládání do databáze!');\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$this->addErr($es);\r\n\t\t\t\t\tOBE_App::$db->finishTransaction(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$this->fillWithData($data, false, $fromDB);\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public function insertFormSubmit()\r\n {\r\n $post = array(\r\n 'name' => ($_POST['name']),\r\n 'surname' => ($_POST['surname']),\r\n 'surname' => ($_POST['email']),\r\n 'telephone' => ($_POST['telephone'])\r\n );\r\n if (!empty($post)) {\r\n $formsubmit = new FormSubmit();\r\n $formsubmit->setDate();\r\n $this->entityManager->persist($formsubmit);\r\n $submitdata = new FormSubmitData();\r\n $submitdata->setName(($_POST['name']));\r\n $submitdata->setValue(base64_encode(serialize($post)));\r\n $this->entityManager->persist($submitdata);\r\n $this->entityManager->flush();\r\n echo 'ok';\r\n }\r\n }", "function insertDynamicFormData($post,$deviceType,$appVersion,$OSVersion,$browserVersion)\n{\n $FormValueData = serialize(json_decode($post['data']));\n //print_r(unserialize($imagesIndex)); die;\n $explode = explode(',', @$_POST['imagesIndex']);\n //print_r($explode); die();\n $UserID = is_require($post, 'UserID');\n $CustomerID = is_require($post, 'CustomerID');\n $FormDataID = is_require($post, 'FormDataID');\n $StatusID='1';\n $success = false;\n $CreatedDateTime = date('Y-m-d H:i:s');\n $ModifyDateTime = date('Y-m-d H:i:s');\n $con=connectToDB(); //connect to the DB\n $StatusID='1';\n $result = mysql_query(\"call insertDynamicFormData('\".$FormValueData.\"','\".$UserID.\"','\".$CustomerID.\"','\".$FormDataID.\"','\".$StatusID.\"','\".$CreatedDateTime.\"','\".$ModifyDateTime.\"')\")or die(mysql_error());\n $row = mysql_fetch_assoc($result);\n if(!empty($row)) {\n $row['FormValueData'] = unserialize($row['FormValueData']);\n $success = true;\n }\n if(!empty($_POST['imagesIndex'])) {\n foreach ($explode as $key => $value) {\n //echo $value; die();\n $fileName = $_FILES[$value]['name'];\n $targetDir = $_SERVER['DOCUMENT_ROOT'].\"/stealthcare/uploads/\";\n $targetFile = $targetDir . $fileName;\n if(move_uploaded_file($_FILES[$value]['tmp_name'], $targetFile)) {\n $success = true;\n } else {\n $success = false;\n }\n }\n }\n if($success) {\n $data['ResponseData'] = $row;\n $data['Message'] = \"Form data inserted successfully.\";\n $data['ResponseCode'] = \"200\";\n $data['Status'] = \"Success\";\n $data['StatusCode'] = \"1\";\n } else {\n $data['ResponseData'] = \"\";\n $data['Message'] = \"Error\";\n $data['ResponseCode'] = \"200\";\n $data['Status'] = \"Failed\";\n $data['StatusCode'] = \"0\";\n }\n print json_encode($data);\n mysql_close($con); //close the connection\n}", "function saveForm(){\t\n\t\t$this->saveFormBase();\n\t\t$this->saveFormGeoCoverage();\n\t\t$this->saveVaFormResolution();\n\t\tif ($this->dataset->nbModForm >0) $this->saveModForm();\n\t\tif ($this->dataset->nbSatForm >0) $this->saveSatForm();\n\t\tif ($this->dataset->nbInstruForm >0) $this->saveInstruForm();\n\t\t$this->saveFormGrid();\n\t\t//Parameter\n\t\t$this->saveFormVariables($this->dataset->nbVars);\n\t\t//REQ DATA_FORMAT\n\t\t$this->dataset->required_data_formats = array();\n\t\t$this->dataset->required_data_formats[0] = new data_format;\n\t\t$this->dataset->required_data_formats[0]->data_format_id = $this->exportValue('required_data_format');\n\t}", "function saveRecord($arrFields = array(), $tablename = '', $enablePrepData = false) {\n\t\t\tif(isset($enablePrepData) && $enablePrepData) {\n\t\t\t\t$arrFields = mysqlPrepValues($arrFields);\n\t\t\t}\n\t\t\t\n\t\t\t$total_fields = count($arrFields);\n\t\t\t$count = 0;\n\t\t\t$field_list = \"\"; $field_values = \"\";\n\t\t\tforeach($arrFields as $key => $item) {\n\t\t\t\t$field_list .= '`' . $key . '`';\n\t\t\t\t$field_values .= '\"' . $item . '\"';\n\t\t\t\t$count++;\n\t\t\t\tif ($count != $total_fields) {\n\t\t\t\t\t$field_list .= ', ';\n\t\t\t\t\t$field_values .= ', ';\n\t\t\t\t}\n\t\t\t}\n\t\t\t$sql = 'INSERT INTO ' . $tablename . '(' . $field_list . ') VALUES (' . $field_values . ')';\n\t\t\t//echo $sql;exit;\n\t\t\tif ($this->db->query($sql)) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "function insert_record()\n\t{\n\t $dbname=$this->dbname;\n\t $DB1=$this->__connect($dbname,$this->table_name);\n $fields_data=$this->__list_fields_data($dbname,$this->table_name);\n // echo_array($fields_data);\n $index=$this->_get_primary($fields_data);\n //echo $index;\n //echo_array($_POST);\n \n \n //since we are coming from a form there\n //are $_POST values\n foreach ($fields_data->name as $key=>$value)\n {\n $data[$value['name']]=$_POST[$value['name']];\n }\n\n //needs checking if a FOREIGN FIELD\n //insert into database \n $this->db->insert($this->table_name, $data);\n\n $keys=(array_keys($data));\n $values=(array_values($data));\n\n //prepare some data for the form controls\n //in this case the Tdataset control\n \n $i=0;\n $num_fields=count($keys);\n for ($i=0;$i<$num_fields;$i++){\n $this->table->add_row($keys[$i],$values[$i]);\n }\n $this->table->set_heading('field','Value');\n $this->table->set_caption('Insert');\n $this->table->set_template($this->tmpl);\n $s=$this->table->generate();\n $s.='<a href=\"http://localhost/CodeIgniter/admin/dbutil/browse/'.$dbname.'/'.$this->table_name.'\">Click to Edit More</a>';\n return $s;\n\t}", "function record_form($params, $action)\n{\n $data = $GLOBALS['PFR_LOCATIONS_fields'];\n $sub_arr = $GLOBALS['SUBCATEGORY_array'];\n $conn = $GLOBALS['connection_TBSM'];\n\t\n\t$actions_arr = array (\n\t\t\"cancel\" => array (\n\t\t\t\"text\" \t=> \"Вернуться\",\n\t\t\t\"image\" \t=> \"images/arrowdown.png\",\n\t\t\t\"title\" \t=> \"Вернуться назад\",\n \"onclick\" => \"return true;\", // return confirm('Сделанные изменения не будут сохранены! Вернуться?');\",\n \"access\" => \"\",\n\t\t),\n\t\t\"save\" => array (\n\t\t\t\"text\" \t=> \"Сохранить\",\n\t\t\t\"image\" \t=> \"images/ok.png\",\n\t\t\t\"title\" \t=> \"Сохранить текущую запись\",\n \"onclick\" => \"return confirm('Сохранить текущую запись?');\",\n \"access\" => \"\",\n\t\t),\n\t\t\"clone\" => array (\n\t\t\t\"text\" \t=> \"Клонировать\",\n\t\t\t\"image\" \t=> \"images/copy.png\",\n\t\t\t\"title\" \t=> \"Клонировать текущую запись\",\n \"onclick\" => \"return confirm('Если были сделаны изменения - они не будут сохранены! Клонировать текущую запись?');\",\n \"access\" => \"\",\n\t\t),\n\t\t\"delete\" => array (\n\t\t\t\"text\" \t=> \"Удалить\",\n\t\t\t\"image\" \t=> \"images/delete.png\",\n\t\t\t\"title\" \t=> \"Удалить текущую запись\",\n \"onclick\" => \"return confirm('Удалить текущую запись?');\",\n \"access\" => \"\",\n ),\n\t);\n\n // insert or update record to PFR_LOCATIONS\n if ($action == 'save') {\n // insert\n if (empty($data['ID']['VALUE'])) {\n $fields = \"\";\n $values = \"\";\n foreach ($data as $field => $prop) {\n if ($field != 'ID') {\n $fields .= \"{$field}, \";\n switch ($prop['COLTYPE']) {\n case 'INTEGER':\n $values .= (!empty($_POST[$field]) ? intval($_POST[$field]) : intval($prop['DEFAULT'])) . \", \";\n break;\n case 'TIMESTMP':\n $values .= \"'\" . date(\"Y-m-d H:i:s\") . \"', \";\n break;\n default:\n $values .= \"'\" . (empty($_POST[$field]) ? $prop['DEFAULT'] : $_POST[$field]) . \"', \";\n break;\n }\n }\n }\n $fields = rtrim($fields, \", \");\n $values = rtrim($values, \", \");\n\n $ins = \"insert into DB2INST1.PFR_LOCATIONS ({$fields}) values ({$values})\";\n $stmt = db2_prepare($conn, $ins);\n return db2_execute($stmt);\n }\n // update\n else {\n $fields_values = \"\";\n foreach ($data as $field => $prop) {\n if ($field != 'ID')\n switch ($prop['COLTYPE']) {\n case 'INTEGER':\n $fields_values .= $field . \" = \" . intval($_POST[$field]) . \", \"; break;\n case 'TIMESTMP':\n $fields_values .= $field . \" = '\" . date(\"Y-m-d H:i:s\") . \"', \"; break;\n default:\n $fields_values .= $field . \" = '\" . $_POST[$field] . \"', \"; break;\n }\n }\n $fields_values = rtrim($fields_values, \", \");\n\n $upd = \"update DB2INST1.PFR_LOCATIONS set \".$fields_values.\" where ID = {$data['ID']['VALUE']}\";\n $stmt = db2_prepare($conn, $upd);\n return db2_execute($stmt);\n }\n }\n\n // delete record from PFR_LOCATIONS\n if ($action == 'delete') {\n $del = \"delete from DB2INST1.PFR_LOCATIONS where ID = '\".$data['ID']['VALUE'].\"'\";\n $stmt = db2_prepare($conn, $del);\n return db2_execute($stmt);\n }\n\n // select existing record from PFR_LOCATIONS\n if ($action == 'edit') {\n $sel = \"select * from DB2INST1.PFR_LOCATIONS where ID = {$data['ID']['VALUE']}\";\n $stmt = db2_prepare($conn, $sel);\n if (!db2_execute($stmt))\n return false;\n if (empty($row = db2_fetch_assoc($stmt)))\n return false;\n foreach ($data as $field => &$prop)\n $prop['VALUE'] = $row[$field];\n unset($prop);\n }\n\n // web-form output\n echo \"<h3>Запись в таблице PFR_LOCATIONS</h3>\";\n\techo \"<form action='{$_SERVER[\"PHP_SELF\"]}?{$params}' method='post'>\";\n\techo \"<table border='0' cellspacing='0' cellpadding='5'>\";\n\t\tforeach ($data as $field => $prop) {\n\t\t\techo \"<tr>\";\n\t\t\t\techo \"<td>{$field}</td>\";\n\t\t\t\techo \"<td>\";\n\t\t\t\t if ($field == 'SUBCATEGORY') {\n echo \"<select class = 'select_in_form' size = '1' id = 'subcategory' name = '{$field}'>\";\n foreach ($sub_arr as $key => $val)\n echo \"<option value = '{$key}' \".($key == $prop['VALUE'] ? 'selected' : '').\">$key</option>\";\n echo \"</select>\";\n }\n else\n echo \"<input type='text' \n name='{$field}'\n value='\".($action == 'edit' ? $prop['VALUE'] : (empty($prop['VALUE']) ? $prop['DEFAULT'] : $prop['VALUE'])).\"'\n size='64'\n maxlength='{$prop['LENGTH']}'\".\n ($prop['COLTYPE'] == 'INTEGER' ? \"pattern=\\\"[-]?[0-9]+\\\"\" : '').\n (($action == 'view' or $prop['COLTYPE'] == 'TIMESTMP' or $field == 'ID') ? 'disabled' : '').\">\";\n\t\t\t\techo \"</td>\";\n\t\t\t\techo \"<td><font size='-2'>{$prop['COLTYPE']} ({$prop['LENGTH']})</font></td>\";\n\t\t\techo \"</tr>\";\n\t\t}\n\t\techo \"<tr><td align='center' colspan='0'><br>\";\n $actions_arr['delete']['access'] = empty($data['ID']['VALUE']) ? 'disabled' : '';\n\t\t\tforeach ($actions_arr as $key => $value)\n\t\t\t\techo \"<button type='submit' name='sendRequest' value='{$key}' title='{$value['title']}' onclick=\\\"{$value['onclick']}\\\" {$value['access']}><img src='{$value['image']}' width='16' height='16'>&nbsp;{$value['text']}</button>&emsp;\";\n\t\techo \"</td></tr>\";\n\techo \"</table>\";\n\t// hidden field for ID\n echo \"<input hidden type='text' name='ID_hidden' value='{$data['ID']['VALUE']}'>\";\n\techo \"</form>\";\n\treturn true;\n}", "function createForm(){\n\t\t$this->createFormBase();\n\t\t$this->addElement('reset','reset','Reset');\t\t\t\n\t\t$tab['seeker_0'] = '0';\n\t\t$this->setDefaults($tab);\n\t\t$this->addElement('submit','bouton_add_pi','Add a contact',array('onclick' => \"document.getElementById('frmvadataset').action += '#a_contact'\"));\n\t\t$this->createVaFormResolution();\n\t\t$this->createFormGeoCoverage();\n\t\t$this->createFormGrid();\t\n\t\t//Required format\n\t\t$dformat = new data_format;\n\t\t$dformat_select = $dformat->chargeFormDestFormat($this,'required_data_format','Required data format','NetCDF');\n\t\t$this->addElement($dformat_select);\n\t\t$this->getElement('organism_0')->setLabel(\"Organism short name\");\n\t\t$this->getElement('project_0')->setLabel(\"Useful in the framework of\");\n\t\t$this->getElement('dats_abstract')->setLabel(\"Abstract \");\n\t\t$this->getElement('dats_purpose')->setLabel(\"Purpose\");\n\t\t$this->getElement('database')->setLabel(\"Data center\");\n\t\t$this->getElement('new_db_url')->setLabel(\"Data center url\");\n\t\t$this->getElement('dats_use_constraints')->setLabel(\"Access and use constraints\");\t\t\t\n\t\t$this->getElement('sensor_resol_tmp')->setLabel('Temporal (hh:mm:ss)');\t\t\t\n\t\t$this->getElement('place_alt_min_0')->setLabel(\"Altitude min\");\n\t\t$this->getElement('place_alt_max_0')->setLabel(\"Altitude max\");\n\t\t$this->getElement('data_format_0')->setLabel(\"Original data format\");\n\t\t$this->addElement('file','upload_doc','Attached document');\n\t\t$this->addElement('submit','upload','Upload');\n\t\t$this->addElement('submit','delete','Delete');\n\t\t\n\t\tfor ($i = 0; $i < $this->dataset->nbVars; $i++){\n\t\t\t$this->getElement('methode_acq_'.$i)->setLabel(\"Parameter processing related information\");\n\t\t}\n\t\t$this->addElement('submit','bouton_add_variable','Add a parameter',array('onclick' => \"document.getElementById('frmvadataset').action += '#a_param'\"));\n\t\t\n\t\t$this->addElement('submit','bouton_add_projet','Add a project',array('onclick' => \"document.getElementById('frmvadataset').action += '#a_general'\"));\n\t\t$option = array();\n\t\t$option['default'] = \"\";\n\t\t$option['model'] = \"Model\";\n\t\t$option['instrument'] = \"Instrument\";\n\t\t$option['satellite'] = \"Satellite\";\n\t\t$this->addElement('select','source_type','source type :',$option,array('onchange' => \"DeactivateButtonAddSource()\",'onclick' => \"DeactivateButtonAddSource();\",'onmouseover' => 'DeactivateButtonAddSource();' ));\n\t\t$this->addElement('submit','bouton_add_source','Add a source',array('disabled' => 'true','onclick' => \"document.getElementById('frmvadataset').action += '#a_source'\",'onmouseout' => 'DeactivateButtonAddSource();'));\n\t\t\n\t\tif (isset ( $this->dataset->dats_sensors ) && ! empty ( $this->dataset->dats_sensors )) {\n\t\t\t$this->dats_sensors = array();\n\t\t\t$this->dats_sensors = $this->dataset->dats_sensors ;\n\t\t}\n\t\tif (isset ( $this->dataset->sites ) && ! empty ( $this->dataset->sites )) {\n\t\t\t$this->sites = array();\n\t\t\t$this->sites = $this->dataset->sites;\n\t\t}\n\t\t\n\t\tif ( isset ( $this->dataset->dats_id ) && $this->dataset->dats_id > 0) {\n\t\t\tif (isset ( $this->dataset->nbModFormSensor )){\n\t\t\t\tif($this->dataset->nbModForm <= $this->dataset->nbModFormSensor ){\n\t\t\t\t\t$this->dataset->nbModForm = $this->dataset->nbModFormSensor;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isset ( $this->dataset->nbSatFormSensor )){\n\t\t\t\t//$this->dataset->nbSatFormSensor = $this->dataset->nbSatFormSensor - 1;\n\t\t\t\tif($this->dataset->nbSatForm <= $this->dataset->nbSatFormSensor){\n\t\t\t\t\t$this->dataset->nbSatForm = $this->dataset->nbSatFormSensor;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isset ( $this->dataset->nbInstruFormSensor )){\n\t\t\t\tif($this->dataset->nbInstruForm <= $this->dataset->nbInstruFormSensor){\n\t\t\t\t\t$this->dataset->nbInstruForm = $this->dataset->nbInstruFormSensor;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif($this->dataset->nbModForm > 0)\n\t\t\t$this->addMod();\n\t\tif($this->dataset->nbInstruForm > 0)\n\t\t\t$this->addInstru();\t\n\t\tif($this->dataset->nbSatForm > 0)\n\t\t\t$this->addSat();\n\t\t\n\t\t$this->dataset->dats_sensors = null ;\n\t\t$this->dataset->sites = null;\n\t}", "function setRecord($data_arr,$table,$id=0,$chkfield=\"\")\n\t{\n\t\tif($id)\n\t\t{\n\t\t\t// we already have this record in the db\n\t\t\t// so we are updating it\n\t\t\t$where=$this->WhereClause($chkfield,$id);\n\t\t\tif(strlen($where))\n\t\t\t{\n\t\t\t\t$sql=\"update \" . $table . \" set \";\n\t\t\t\t$sql.=$this->explodeUpdate($data_arr);\n\t\t\t\t$sql.=\" where $where\";\n\t\t\t}\n\t\t}else{\n\t\t\t// this record does not yet exist\n\t\t\t// so we are creating it\n\t\t\t$sql=\"insert into \" . $table . \" \";\n\t\t\t$sql.=$this->explodeData($data_arr);\n\t\t}\n // debug(\"in setRecord - query\",$sql);\n\t\tif(strlen($sql))\n\t\t{\n\t\t\t$this->query($sql);\n\t\t}\n\t\tif($this->_mysql_errno)\n\t\t{\n\t\t\treturn 0;\n\t\t}elseif($id)\n\t\t{\n\t\t\treturn $id;\n\t\t}else{\n\t\t\treturn $this->_insert_id;\n\t\t}\n\t}", "function validate_form_fields($array = NULL, $update = false) {\n $fields = $this->load_required_fields($array, $update);\n\n if ($array == NULL)\n $array = $_POST;\n\n if (is_array($_FILES))\n $array = array_merge($array, $_FILES);\n\n //Mergin Array\n $group_fields = array_merge($fields, $this->load_other_fields());\n\n validate_cb_form($group_fields, $array);\n }", "function form($action=null,$submit='Submit',$rows=null,$taction=null,$editmode=null) {\n\t //print_r($_POST);\n\t global $sFromErr;\n\t\t $taction = 'cpsubloadhtmlmail';//templates\n\t\t $iaction = 'cpsubloadimage';//add images (embed)\t\t \n\t\t $daction = 'cpsubattach';//add attachments\t\t \n\t\t \n\t\t $activebatch = $this->load_saved_batch();\n \n\t\t $sendto = GetParam('to')?GetParam('to'):$this->to;\n\t\t $sendcc = GetParam('cc')?GetParam('cc'):null;\t\t \n\t\t $sendbcc = GetParam('bcc')?GetParam('bcc'):null;\t\t\t \n\t\t \n\t\t $mailuser = $this->mailuser?$this->mailuser:$this->from;\t//echo '>',$mailname;\n\t $mymail = GetParam('from')?GetParam('from'):$mailuser;\t\t// echo '>',$mymail;\n\t\t\n\t\t \n\t\t if (!$submit)\n\t\t $submit = localize('_SUBMIT',getlocal());\n \n if (!$rows)\n\t\t $rows = 16;\n \n if ($action)\n\t\t $myaction = seturl(\"t=\".$action.\"&editmode=\".GetReq('editmode')); \n\t\t else \n $myaction = seturl(\"t=cmail\".\"&editmode=\".GetReq('editmode')); \n\t\t \n\t\t //in case of activebatch ..go directly to batch num\n\t\t if (($activebatch) && ($this->bypass_method==false))\n\t\t $myaction .= '&batchid=' . $activebatch; \n\t\t \t\t \n $out .= \"<FORM action=\". \"$myaction\" . \" method=post>\"; \t\n\t \t \n //error message\n $out .= setError($sFormErr);\t\t \n\t \n $from[] = \"<B>\" . localize('_FROM',getlocal()) . \":</B>\";\n $fromattr[] = \"right;20;\";\n\t\t $from[] = \"<input type=\\\"text\\\" name=\\\"from\\\" maxlenght=\\\"40\\\" readonly =\\\"readonly\\\" value=\\\"\".$mymail.\"\\\">&nbsp;\" . $this->mailname;\n\t $fromattr[] = \"left;80%;\";\t\t\n\n\t $fwin = new window('',$from,$fromattr);\n\t $winout .= $fwin->render(\"center::100%::0::group_article_selected::left::0::0::\");\t\n\t unset ($fwin);\t \n\t \n //TO..\n $to[] = \"<B>\" . localize('_TO',getlocal()) . \":</B>\";\n \t $toattr[] = \"right;20%;\";\t \n\t $to[] = \"<input type=\\\"text\\\" name=\\\"to\\\" maxlenght=\\\"40\\\" value=\\\"$sendto\\\">&nbsp;\" . $this->toname;\t\n\t\t $toattr[] = \"left;80%;\";\n\t $twin = new window('',$to,$toattr);\n\t $winout .= $twin->render(\"center::100%::0::group_article_selected::left::0::0::\");\t\n\t unset ($twin);\t\t \n\t\t \n //CC..\n if ((SMTP_PHPMAILER=='true') || (SENDMAIL_PHPMAILER=='true')) {\t\t\t \t\t\t \n $cc[] = \"<B>\" . localize('_CC',getlocal()) . \":</B>\";\n \t $toattr[] = \"right;20%;\";\t \n\t $cc[] = \"<input style=\\\"width:100%\\\" type=\\\"text\\\" name=\\\"cc\\\" maxlenght=\\\"80\\\" value=\\\"$sendcc\\\">\";\n\t\t $toattr[] = \"left;80%;\";\t\t \n\t $twin = new window('',$cc,$toattr);\n\t $winout .= $twin->render(\"center::100%::0::group_article_selected::left::0::0::\");\t\n\t unset ($twin);\t\t\n\t\t \n $bcc[] = \"<B>\" . localize('_BCC',getlocal()) . \":</B>\";\n \t $toattr[] = \"right;20%;\";\t \n\t $bcc[] = \"<input style=\\\"width:100%\\\" type=\\\"text\\\" name=\\\"bcc\\\" maxlenght=\\\"80\\\" value=\\\"$sendbcc\\\">\";\n\t\t $toattr[] = \"left;80%;\";\t\t \n\t $twin = new window('',$bcc,$toattr);\n\t $winout .= $twin->render(\"center::100%::0::group_article_selected::left::0::0::\");\t\n\t unset ($twin);\t\t\t \n\t\t } \t\t\t \n \n\t //SUBJECT..\n\t\t $sbj = $subject?$subject:GetParam('subject');\n $subt[] = \"<B>\" . localize('_SUBJECT',getlocal()) . \":</B>\";\n \t $subattr[] = \"right;20%;\";\t \n $subt[] = \"<input style=\\\"width:100%\\\" type=\\\"text\\\" name=\\\"subject\\\" maxlenght=\\\"30\\\" value=\\\"\".$sbj.\"\\\">\"; \n \t $subattr[] = \"left;80%;\";\n\t $swin = new window('',$subt,$subattr);\n\t $winout .= $swin->render(\"center::100%::0::group_article_selected::left::0::0::\");\t\n\t unset ($swin);\t \n\t\t \n\t\t //OPTIONS \n $opt[] = \"&nbsp;\";\n \t $toattr[] = \"right;20%;\";\t\n\t\t $check1 = $activebatch?'checked':null; \t\t \n\t $options = \"<B>\" . localize('_INCLSUBS',getlocal()) . \"&nbsp;<input type=\\\"checkbox\\\" name=\\\"includesubs\\\" $check1>\";\t\t\n $options .= \"<B>\" . localize('_INCLALL',getlocal()) . \"&nbsp;<input type=\\\"checkbox\\\" name=\\\"includeall\\\" ><br>\";\t\t\t\t \n if ((SMTP_PHPMAILER=='true') || (SENDMAIL_PHPMAILER=='true')) {\t\n\t\t $check2 = $this->ishtml?'checked':null;\n $options .= \"<B>\" . localize('_ISHTML',getlocal()) . \"&nbsp;<input type=\\\"checkbox\\\" name=\\\"ishtml\\\" $check2><br>\";\t\t \n\t\t }\t\n\t\t else\n\t\t $options .= \"<B>\" . localize('_SMTPDEBUG',getlocal()) . \"&nbsp;<input type=\\\"checkbox\\\" name=\\\"smtpdebug\\\"><br>\";//debug smtp\n\t\t \t \n\t $opt[] = $options;\n \t $toattr[] = \"left;80%;\";\t\n\t $twin = new window('',$opt,$toattr);\n\t $winout .= $twin->render(\"center::100%::0::group_article_selected::left::0::0::\");\t\n\t unset ($twin);\t\t \n\t \t \n\t //MAIL BODY..\t\t \n $mb[] = \"&nbsp;\";//\"<B>\" . localize('_MESSAGE',getlocal()) . \":</B>\";\n \t $mbattr[] = \"right;1%;\";\t\n\t\t \n\t\t if (GetReq('t')=='cpsubloadhtmlmail') { //LOAS A NEW TEMPLATE\n\t\t $path = $this->urlpath.$this->infolder.$this->newsletter_path;//GetGlobal('controller')->calldpc_var('rctedit.htmlpath');\t\t \n\t\t //echo $path; print_r($_POST);\n\t\t if ($template = GetParam('template')) {\n\t\t $data = GetGlobal('controller')->calldpc_method('rctedit.loadfromfile use '.$template.'+'.$path);\n\t\t }\n\t\t else \n\t\t $data = null;\n\t\t\t \n\t\t $conditions = $this->spam_conditions_text($this->antispamlink,0,$this->ishtml);\n\t\t $this->mailbody = $data . $conditions; //str_replace('</html>',$conditions.'</html>',$data);\n\t\t \n\t\t //$this->htmleditor = new tinyMCE('textareas','ADVANCEDFULL',1,'images',$this->dirdepth);\n\t\t //$mbody = $this->htmleditor->render('mail_text','100%',$rows+10,$data . $conditions);\n\t\t $mbody = $this->render_textarea($data . $conditions, $rows);\n\t\t \n\t\t $this->template = $this->url . $this->infolder . $this->newsletter_path . $template; \n\n\t\t $this->ishtml = true;\t\n\t\t SetSessionParam('template',$this->template);\n\t\t SetSessionParam('mailbody',$this->mailbody);\t\t\n\t\t //reset embeded images \n\t\t $this->images = array();\t\t \n\t SetSessionParam('images',null);\n\t\t //reset attachments \n\t\t $this->attachments = array();\t\t \n\t SetSessionParam('attachments',null);\t\t \n\t\t }\n\t\t elseif (GetReq('t')=='cpsubloadimage') {//..OR ADD EMBEDED IMAGE\n\t\t \n\t\t if ($this->mailbody) \n\t\t $mailbody = $this->mailbody;\n\t\t else \n\t\t $mailbody .= GetParam('mail_text')?GetParam('mail_text'):$this->get_mail_body();\t\t\t \n\t\t \n\t\t /*if ($this->ishtml == true) {\n\t\t $this->htmleditor = new tinyMCE('textareas','ADVANCEDFULL',1,'images',$this->dirdepth);\n\t\t $mbody = $this->htmleditor->render('mail_text','100%',$rows+10,$mailbody);\t\t \n\t\t }\t\t\t \n\t\t else {\n $mbody = \"<DIV class=\\\"monospace\\\"><TEXTAREA style=\\\"width:100%\\\" NAME=\\\"mail_text\\\" ROWS=$rows cols=60 wrap=\\\"virtual\\\">\";\t \n $mbody .= $mailbody; \n $mbody .= \"</TEXTAREA></DIV>\";\n\t\t }*/\n\t\t $mbody = $this->render_textarea($mailbody,$rows);\t \n\t\t \t\n\t\t if ($img = GetParam('image'))\n\t $this->images[] = $img;\t\n\t\t //echo '>',GetParam('image');\t \n\t SetSessionParam('images',serialize($this->images));\t\t \t\t \n\t\t }\t\t\n\t\t elseif (GetReq('t')=='cpsubattach') {//..OR ATTACH A FILE\n\t\t \n\t\t if ($this->mailbody) \n\t\t $mailbody = $this->mailbody;\n\t\t else \n\t\t $mailbody .= GetParam('mail_text')?GetParam('mail_text'):$this->get_mail_body();\t\t\t \n\t\t \n\t\t /*if ($this->ishtml == true) {\n\t\t $this->htmleditor = new tinyMCE('textareas','ADVANCEDFULL',1,'images',$this->dirdepth);\n\t\t $mbody = $this->htmleditor->render('mail_text','100%',$rows+10,$mailbody);\t\t \n\t\t }\t\t\t \n\t\t else {\n $mbody = \"<DIV class=\\\"monospace\\\"><TEXTAREA style=\\\"width:100%\\\" NAME=\\\"mail_text\\\" ROWS=$rows cols=60 wrap=\\\"virtual\\\">\";\t \n $mbody .= $mailbody; \n $mbody .= \"</TEXTAREA></DIV>\";\n\t\t }\t*/\t\n\t\t \n\t\t $mbody = $this->render_textarea($mailbody,$rows);\n\t\t \n\t\t if ($attachedfile = GetParam('attachment'))\t\t \n\t $this->attachments[] = $attachedfile;\t\n\t\t //echo '>',GetParam('attachment');\t \n\t SetSessionParam('attachments',serialize($this->attachments));\t\t \t\t \n\t\t }\t\t\n\t\t elseif (GetReq('t')=='cpsubsend') {//..OR SEND A MAIL\n\t\t if ($this->mailbody) \n\t\t $mailbody = $this->mailbody;\n\t\t else \n\t\t $mailbody .= GetParam('mail_text')?GetParam('mail_text'):$this->get_mail_body();\t\t\t \n\t\t \n\t\t /*if ($this->ishtml == true) {\n\t\t $this->htmleditor = new tinyMCE('textareas','ADVANCEDFULL',1,'images',$this->dirdepth);\n\t\t $mbody = $this->htmleditor->render('mail_text','100%',$rows+10,$mailbody);\t\t \n\t\t }\t\t\t \n\t\t else {\n $mbody = \"<DIV class=\\\"monospace\\\"><TEXTAREA style=\\\"width:100%\\\" NAME=\\\"mail_text\\\" ROWS=$rows cols=60 wrap=\\\"virtual\\\">\";\t \n $mbody .= $mailbody; \n $mbody .= \"</TEXTAREA></DIV>\";\n\t\t }\t*/\n\t\t \n\t\t $mbody = $this->render_textarea($mailbody,$rows);\t\t \n\t\t } \t \n\t\t elseif ($this->ishtml = true) {//..OR JUST SHOW NEW HTML MAIL ..\n\t\t //$this->htmleditor = new tinyMCE('textareas','ADVANCEDFULL',1,'images',$this->dirdepth);\n\t\t \n\t\t if ($this->mailbody) \n\t\t $mbody = $this->mailbody;\n\t\t else {\n\t\t $mbody = GetParam('mail_text')?GetParam('mail_text'):$this->get_mail_body();\t\n $mbody .= $this->spam_conditions_text($this->antispamlink,0,$this->ishtml);\t\t\t \n \t\t $this->mailbody = $mbody;\n\t\t\t SetSessionParam('mailbody',$mbody);\n\t\t }\t \n\t\t\t \t\t \n\t\t //$mbody = $this->htmleditor->render('mail_text','100%',$rows+10,$mbody);\n\t\t \n\t\t $mbody = $this->render_textarea($mbody,$rows);\n\t\t \n\t\t //reset arrays\n\t\t SetSessionParam('template',null);\t\n\t\t SetSessionParam('mailbody',null);\t\n\t\t //reset embeded images \n\t\t $this->images = array();\t\t \n\t SetSessionParam('images',null);\n\t\t //reset attachments \n\t\t $this->attachments = array();\t\t \n\t SetSessionParam('attachments',null);\t\t\t \t\t \t\t \n\t\t }\t \n\t\t else { //OR IN TEXT MODE\n\t\t \n\t\t $this->mailbody = null;\n\t\t \n //$mbody = \"<DIV class=\\\"monospace\\\"><TEXTAREA style=\\\"width:100%\\\" NAME=\\\"mail_text\\\" ROWS=$rows cols=60 wrap=\\\"virtual\\\">\";\n\t\t if ($this->mailbody) \n\t\t $mbody .= $this->mailbody;\n\t\t else {\n\t\t $mbody .= GetParam('mail_text')?GetParam('mail_text'):$this->get_mail_body();\t\t \n $mbody .= $this->spam_conditions_text($this->antispamlink,0,0);\n\t\t }\t \n\t\t \n //$mbody .= \"</TEXTAREA></DIV>\";\n\t\t \n\t\t $mbody = $this->render_textarea($mbody,$rows);\n\t\t \n\t\t $this->ishtml = false;\t\n\t\t SetSessionParam('template',null);\t\n\t\t SetSessionParam('mailbody',null);\t\n\t\t //reset embeded images \n\t\t $this->images = array();\t\t \n\t SetSessionParam('images',null);\n\t\t //reset attachments \n\t\t $this->attachments = array();\t\t \n\t SetSessionParam('attachments',null);\t\t\t \t\t \t \n\t\t }\t \n\t\t \n\t $mb[] = $mbody;\n\t $mbattr[] = \"left;99%\";\n\t $mbwin = new window('',$mb,$mbattr);\n\t $winout .= $mbwin->render(\"center::100%::0::group_win_body::left::0::0::\");\t\n\t unset ($mbwin);\t \n\t \n\t \n\t\t //alternate text body\n\t\t if (!$editmode) {\n\t\t \n\t\t if (GetParam('alttext')) {\n\t\t $defaulttext = GetParam('alttext');\n\t\t }\n\t\t else {\n\t\t $defaulttext = localize('_NOTVIEW',0);\n\t\t $defaulttext .= localize('_NOTVIEW',1);\t\t \n\t\t $defaulttext .= $this->template ? $this->template :'Alternate Text message for non html viewers';\n\t\t $defaulttext .= $this->spam_conditions_text($this->antispamlink,0,0);\t\t \n\t\t } \n\t\t \n $alttext = \"<DIV class=\\\"monospace\\\"><TEXTAREA style=\\\"width:100%\\\" NAME=\\\"alttext\\\" ROWS=5 cols=60 wrap=\\\"virtual\\\">\";\n\t\t $alttext .= $defaulttext;\n\t\t $alttext .= \"</TEXTAREA></DIV>\";;\t\t \n\t $alt[] = $alttext;\n \t $toattr[] = \"left;80%;\";\t\n\t $twin = new window('',$alt,$toattr);\n\t $winout .= $twin->render(\"center::100%::0::group_article_selected::left::0::0::\");\t\n\t unset ($twin);\t\n\t\t \n\t\t }//editmode\t\n\t\t \t \n\t //main window\n\t $mywin = new window('',$winout);\n\t $out .= $mywin->render();\t\n\t unset ($mywin);\t \n\t \n\t \n\t //batch num restored\n\t\t if ($activebatch) {\n\t\t $cmd = \"Previous campaign has stoped at batch num (reset or bypass)\";\n\t\t $cm = ($activebatch-1) * $this->batch; \n\t\t $cmd .= \"<br>Campaign stopped at \" . $cm . \" mails from \" . $this->subs_no . ' subscribers!<br>'; \n\t\t \n\t\t if ($this->bypass_method==true)\t\t\t \n\t\t $cmd .= \"<input style=\\\"width:30\\\" type=\\\"text\\\" name=\\\"batchrestore\\\" maxlenght=\\\"4\\\" value=\\\"\".($activebatch-1) .\"\\\">\"; \t \n\t\t //$cmd .= \"<br>\";\n\t\t }\n\t\t else\n\t\t $cmd = $this->subs_no . ' subscribers!<br>';\n\t \n\t //BUTTONS\n\t\t if ($action) {\n $cmd .= \"<input type=\\\"hidden\\\" name=\\\"FormName\\\" value=\\\"SendCMail\\\">\"; \n $cmd .= \"<INPUT type=\\\"submit\\\" name=\\\"submit\\\" value=\\\"\" . $submit . \"\\\">&nbsp;\"; \n $cmd .= \"<INPUT type=\\\"hidden\\\" name=\\\"FormAction\\\" value=\\\"\" . $action . \"\\\">\";\t\t\t \n\t\t }\n\t\t else {\n $cmd .= \"<input type=\\\"hidden\\\" name=\\\"FormName\\\" value=\\\"SendCMail\\\">\"; \n $cmd .= \"<INPUT type=\\\"submit\\\" name=\\\"submit\\\" value=\\\"\" . localize('_SENDCMAIL',getlocal()) . \"\\\">&nbsp;\"; \n $cmd .= \"<INPUT type=\\\"hidden\\\" name=\\\"FormAction\\\" value=\\\"\" . \"sendcmail\" . \"\\\">\";\t \n\t\t } \n\t\t \n\t $but[] = $cmd;\n\t $battr[] = \"left\";\n\t $bwin = new window('',$but,$battr);\n\t $out .= $bwin->render(\"center::100%::0::group_article_selected::left::0::0::\");\t\n\t unset ($bwin);\n\t \t \n $out .= \"</FORM>\"; \n\t\t \n\t if (defined('RCTEDIT_DPC')) {\n\t\t //html\n\t\t $out1_title = \"<B>\" . localize('_HTMLTEMPLATE',getlocal()) . \":</B>&nbsp;\" . $this->template;\n\t $out1 = GetGlobal('controller')->calldpc_method('rctedit.show_files use template+Load Newsletter+'.$taction.'+'.$this->newsletter_path.'+'.implode(',',$this->templatetypes));\t\t \n\t\t if (defined('RCUPLOAD_DPC')) \n\t\t $out1 .= GetGlobal('controller')->calldpc_method('rcupload.uploadform use cpsubuploadtemplate+/'.$this->newsletter_path.'+++'.$this->maxsize); \n\t\t\t \n\t $awin = new window($out1_title,$out1);\n\t $out .= $awin->render(\"center::100%::0::group_article_selected::left::0::0::\");\t\n\t unset ($awin);\t\n\t\t \t\t\t \n\t\t //embeded images\n\t\t if ((is_array($this->images)) && (!empty($this->images))) {\n\t\t //print_r($this->images);\n\t\t $myimages = implode(',',$this->images);\n\t\t }\t \n\t\t else\n\t\t $myimages = 'none';\t \n\t\t $out2_title = \"<B>\" . localize('_ADDIMAGES',getlocal()) . \":</B>&nbsp;\" . '<'.$myimages.'>';\n\t $out2 = GetGlobal('controller')->calldpc_method('rctedit.show_files use image+Embed Image+'.$iaction.'+'.$this->imgpath.'+'.implode(',',$this->imgtypes));\t\t \n\t\t if (defined('RCUPLOAD_DPC')) \n\t\t $out2 .= GetGlobal('controller')->calldpc_method('rcupload.uploadform use cpsubuploadimage+/'.$this->imgpath.'+++'.$this->maxsize);\t\t \n\t\t\t \n\t $bwin = new window($out2_title,$out2);\n\t $out .= $bwin->render(\"center::100%::0::group_article_selected::left::0::0::\");\t\n\t unset ($bwin);\t\t\t \n\t\t\t \n\t\t //attachments\n\t\t if ((is_array($this->attachments)) && (!empty($this->attachments))) {\n\t\t //print_r($this->images);\n\t\t $mydocs = implode(',',$this->attachments);\n\t\t }\t \n\t\t else\n\t\t $mydocs = 'none';\t\t \n\t\t $out3_title = \"<B>\" . localize('_ATTACHMENTS',getlocal()) . \":</B>&nbsp;\" . '<'.$mydocs.'>';\n\t $out3 = GetGlobal('controller')->calldpc_method('rctedit.show_files use attachment+Attach File+'.$daction.'+'.$this->docpath.'+'.implode(',',$this->doctypes));\t\t \n\t\t if (defined('RCUPLOAD_DPC')) \n\t\t $out3 .= GetGlobal('controller')->calldpc_method('rcupload.uploadform use cpsubuploaddocument+/'.$this->docpath.'+++'.$this->maxsize);\t\n\t\t\t \n\t $cwin = new window($out3_title,$out3);\n\t $out .= $cwin->render(\"center::100%::0::group_article_selected::left::0::0::\");\t\n\t unset ($cwin);\t\t\t\t \n\t\t } \t\t \n\t\t \n\t $mywin = new window(localize('_SMTPSENDFORM',getlocal()) . ' ['.GetParam('id').']',$out);\n\t $wout = $mywin->render();\t\n\t unset ($mywin);\t\t \n\t\t \n\t\t return ($wout); \n }", "function store()\n\t{\t\n\t\t//$row =& $this->getTable();\n\t\t$db\t\t= JFactory::getDbo();\n\t\t\n\t\t$data = JRequest::get( 'post' );\n\t\t\n\t\tif($data[\"dsr_txt_prename\"] == '' ||\n\t\t\t$data[\"dsr_txt_name\"] == '' ||\n\t\t\t$data[\"dsr_txt_address\"] == '' ||\n\t\t\t$data[\"dsr_txt_plz\"] == '' ||\n\t\t\t$data[\"dsr_txt_city\"] == '' ||\n\t\t\t$data[\"dsr_txt_phone\"] == '' ||\n\t\t\t$data[\"dsr_txt_email\"] == '' ||\n\t\t\t$data[\"dsr_chk_AGB\"] == \"\" ||\n\t\t\t$data[\"dsr_title\"] == \"\" ||\n\t\t\t!filter_var($_POST[\"dsr_txt_email\"], FILTER_VALIDATE_EMAIL) ){\n\t\t\t\n\t\t\tJError::raiseWarning( 500, JText::_('COM_JEVENT_LBL_CORRECT_ERRORS') );\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t/*if(!$this->check($data[\"dsr_txt_email\"] )){\n\t\t\tJError::raiseWarning( 500, JText::_('Email not valid!') );\n\t\t\treturn false;\n\t\t}*/\n\t\t\t\n\t\t$insData =new stdClass();\n\t\t//$insData->idt_drivin_event_apply = $_POST['id_upt'];\n\t\t$insData->idt_drivin_event = $_POST[\"applyEventId\"];\n\t\t\n\t\t$insData->s_name = $data[\"dsr_txt_name\"];\n\t\t$insData->s_prename = $data[\"dsr_txt_prename\"];\n\t\t$insData->s_address = $data[\"dsr_txt_address\"];\n\t\t$insData->s_plz = $data[\"dsr_txt_plz\"] ;\n\t\t$insData->s_city = $data[\"dsr_txt_city\"];\n\t\t$insData->s_phone = $data[\"dsr_txt_phone\"];\n\t\t$insData->s_email = $data[\"dsr_txt_email\"];\n\t\t$insData->dt_cancel = null;\n\t\t$insData->s_title = $data[\"dsr_title\"];\n\t\t\t\t\n\t\t$db = JFactory::getDBO();\n\t\tif(!$db->insertObject( '#__jevent_events_apply', $insData, 'idt_drivin_event_apply' )){\n\t\t\techo $db->stderr();\n\t\t\t//return false;\n\t\t\t$bSQLOk = false;\n\t\t}else{\n\t\t\t$bSQLOk = true;\n\t\t\t//test();\n\t\t\t$db\t\t= JFactory::getDbo();\n\t\t$query\t= $db->getQuery(true);\n\n\t\t$query->select($db->nameQuote('s_name'));\n\t\t$query->select($db->nameQuote('s_prename'));\n\t\t$query->select($db->nameQuote('s_address'));\n\t\t$query->select($db->nameQuote('s_plz'));\n\t\t$query->select($db->nameQuote('s_city'));\n\t\t$query->select($db->nameQuote('s_phone'));\n\t\t$query->select($db->nameQuote('s_email'));\n\t\t$query->select($db->nameQuote('idt_drivin_event_apply')); \n\t\t$query->select($db->nameQuote('s_title'));\n\t\t$query->from($db->nameQuote('#__jevent_events_apply'));\n\t\t$query->where($db->nameQuote('idt_drivin_event_apply') . '=' . $db->insertid());\n\t\tif(!$bCanceled)\n\t\t\t$query->where($db->nameQuote('dt_Cancel') . ' is null');\n\t\telse\n\t\t\t$query->where($db->nameQuote('dt_Cancel') . ' is not null');\n\n\t\t$db->setQuery($query);\n\t\t//if ($link = $db->loadRowList()) {\n\t\t$link = $db->loadRowList();\n\t\t\t$mailer = new jEventMailer();\n\t\t\t//$mailer->test();\n\t\t\tif(!$mailer->sendApplicationEmail2($db->insertid(), $link, $this->getEventById())){\n\t\t\t\t$this->setError($mailer->error);\n\t\t\t\techo \"Eroooor \" . $mailer->error;\n\t\t\t}\n\t\t}\n\t\t\t\n\t\t//if($bSQLOk)\n\t\t//\t$bMailOk = sendApplicationEmail($_POST[\"dsr_txt_email\"], $_POST[\"applyEventId\"]);\n\t\t//else\n\t\t//\t$bMailOk = false;\n\t\t//$mailer = new jEventMailer();\n\t\t//$mailer->test();\n\n\t\t// Bind the form fields to the hello table\n\t\t/*if (!$row->bind($data)) {\n\t\t\t$this->setError($this->_db->getErrorMsg());\n\t\t\treturn false;\n\t\t}\n\n\t\t// Make sure the hello record is valid\n\t\tif (!$row->check()) {\n\t\t\t$this->setError($this->_db->getErrorMsg());\n\t\t\treturn false;\n\t\t}\n\n\t\t// Store the web link table to the database\n\t\tif (!$row->store()) {\n\t\t\t$this->setError( $row->getErrorMsg() );\n\t\t\treturn false;\n\t\t}*/\n\n\t\treturn true;\n\t}", "function createContact($sfConn, $dataArray){\n\t\techo(\"<P> createContact <P>\");\n $sObjects = array();\n foreach ($dataArray as $fieldset)\n {\n\t\techo(\"<P> Set records to Contact <P>\");\n $sObject = new sObject();\n $sObject->type = 'Contact'; \n $sObject->fields = $fieldset;\n array_push($sObjects, $sObject);\n }\n\t\techo(\"<P> Ready to roll <P>\");\n $success = create_multiple($sfConn, $sObjects);\n return $success; \n }", "public abstract function validateFormInput($FORM_array);", "public function postData()\n\t{\n\t\t$this->setCustomerName($_POST['frmcname']);\n\t\t$this->setCustomerAddress1($_POST['frmcaddy1']);\n\t\t$this->setCustomerAddress2($_POST['frmcaddy2']);\n\t\t$this->setCustomerCity($_POST['frmccity']);\n\t\t$this->setCustomerZipcode($_POST['frmczipcode']);\n\t\t$this->setCustomerState($_POST['frmcstate']);\n\t\t$this->setCustomerPhone( $_POST['frmcpnumber']);\n\t\t$this->setCustomerExt($_POST['frmcext']);\n\t\t$this->setCustomerFax($_POST['frmcfnumber']);\n\t\t$this->setCustomerEmail($_POST['frmcemail']);\n\t\t$this->setCustomerRdp($_POST['frmcrdp']);\n\t\t$this->setCustomerNotes($_POST['frmcnotes']);\n\t\t$this->setFlag($_POST['frmflaggedq']);\n\t\t$this->setFlagReason($_POST['frmflagreason']);\n\t}", "public function initContactDataForm()\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\n\t\t// name\n\t\t$ti = new ilTextInputGUI($lng->txt(\"name\"), \"inst_name\");\n\t\t$ti->setMaxLength(64);\n\t\t$ti->setSize(30);\n\t\t$ti->setRequired(true);\n\t\t$this->form->addItem($ti);\n\n\t\t// description\n\t\t$ti = new ilTextInputGUI($lng->txt(\"client_info\"), \"inst_info\");\n\t\t$ti->setMaxLength(64);\n\t\t$ti->setSize(30);\n\t\t$this->form->addItem($ti);\n\n\t\t// institution\n\t\t$ti = new ilTextInputGUI($lng->txt(\"client_institution\"), \"inst_institution\");\n\t\t$ti->setMaxLength(64);\n\t\t$ti->setSize(30);\n\t\t$this->form->addItem($ti);\n\n\t\t// contact data\n\t\t$sh = new ilFormSectionHeaderGUI();\n\t\t$sh->setTitle($lng->txt(\"contact_data\"));\n\t\t$this->form->addItem($sh);\n\n\t\t// first name\n\t\t$ti = new ilTextInputGUI($lng->txt(\"firstname\"), \"admin_firstname\");\n\t\t$ti->setMaxLength(64);\n\t\t$ti->setSize(30);\n\t\t$ti->setRequired(true);\n\t\t$this->form->addItem($ti);\n\n\t\t// last name\n\t\t$ti = new ilTextInputGUI($lng->txt(\"lastname\"), \"admin_lastname\");\n\t\t$ti->setMaxLength(64);\n\t\t$ti->setSize(30);\n\t\t$ti->setRequired(true);\n\t\t$this->form->addItem($ti);\n\n\t\t$fs = array (\n\t\t\t\"title\" => array(\"max\" => 64, \"size\" => 30),\n\t\t\t\"position\" => array(\"max\" => 64, \"size\" => 30),\n\t\t\t\"institution\" => array(\"max\" => 200, \"size\" => 30),\n\t\t\t\"street\" => array(\"max\" => 64, \"size\" => 30),\n\t\t\t\"zipcode\" => array(\"max\" => 10, \"size\" => 5),\n\t\t\t\"city\" => array(\"max\" => 64, \"size\" => 30),\n\t\t\t\"country\" => array(\"max\" => 64, \"size\" => 30),\n\t\t\t\"phone\" => array(\"max\" => 64, \"size\" => 30)\n\t\t\t);\n\t\tforeach ($fs as $f => $op)\n\t\t{\n\t\t\t// field\n\t\t\t$ti = new ilTextInputGUI($lng->txt($f), \"admin_\".$f);\n\t\t\t$ti->setMaxLength($op[\"max\"]);\n\t\t\t$ti->setSize($op[\"size\"]);\n\t\t\t$ti->setInfo($lng->txt(\"\"));\n\t\t\t$this->form->addItem($ti);\n\t\t}\n\n\t\t// email\n\t\t$ti = new ilEmailInputGUI($lng->txt(\"email\"), \"admin_email\");\n\t\t$ti->setRequired(true);\n\t\t$ti->allowRFC822(true);\n\t\t$this->form->addItem($ti);\n\n\t\t// feedback recipient\n\t\t$ti = new ilEmailInputGUI($lng->txt(\"feedback_recipient\"), \"feedback_recipient\");\n\t\t$ti->setInfo($lng->txt(\"feedback_recipient_info\"));\n\t\t$ti->setRequired(true);\n\t\t$ti->allowRFC822(true);\n\t\t$this->form->addItem($ti);\n\n\t\t// error recipient\n\t\t$ti = new ilEmailInputGUI($lng->txt(\"error_recipient\"), \"error_recipient\");\n\t\t$ti->allowRFC822(true);\n\t\t$this->form->addItem($ti);\n\n\t\t$this->form->addCommandButton(\"saveContact\", $lng->txt(\"save\"));\n\n\t\t$this->form->setTitle($lng->txt(\"client_data\"));\n\t\t$this->form->setFormAction(\"setup.php?cmd=gateway\");\n\t}", "abstract function performInsert(Form $arg0);", "function contactUs ($sendEmail=false, $serverSetting=null){\n\t\t\t$simpleFormBuilder = new simpleFormBuilder;\n\t\t\t\n\t\t\t$builder \t= array\t(\n\t\t\t\t\t\t\t\"prosesname\"=> \"Your Contact Has Been Saved \",\n\t\t\t\t\t\t\t\"action\"\t=> \"\",\n\t\t\t\t\t\t\t\"method\"\t=> \"insert\",\n\t\t\t\t\t\t\t\"datatable\"\t=> \"tbl_contact\",\n\t\t\t\t\t\t\t\"element\"\t=> array\t( \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Name\" => array( \"type\" => \"text\", \"dataname\" => \"contact_name\t\", \"required\" => 1),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Email\" => array( \"type\" => \"text\", \"dataname\" => \"contact_email\", \"required\" => 1, \"emailvalid\" => 1),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Phone\" => array( \"type\" => \"text\", \"dataname\" => \"contact_phone\", \"required\" => 1, \"phonevalid\" => 1),\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Address\" => array( \"type\" => \"text\", \"dataname\" => \"contact_address\", \"required\" => 1),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Message\" => array( \"type\" => \"textarea\", \"dataname\" => \"contact_message\", \"required\" => 1, \"width\" => \"75\"),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"captcha\" => array( \"type\" => \"captcha\", \"ignore\" => 1, \"message\" => \"(spam protection)\"),\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\t\"hidden\" => array( \"type\" => \"hidden\", \"dataname\" => \"contact_date\" , \"value\" => date(\"Y-m-d H:i:s\")),\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\n\t\t\n\t\t\t$form\t= $simpleFormBuilder->builder($builder, false, false, false);\n\t\t\t\n\t\t\tif($simpleFormBuilder->haveError != 1 AND isset($_POST['submit']) AND $sendEmail == true){\n\t\t\t\techo $simpleFormBuilder->haveError;\n\t\t\t\tif(is_null($serverSetting)){\n\t\t\t\t\t$objEmail \t= new send2email(MAIL_SERVER, SITE_EMAIL, SITE_EMAIL_PASS, MAIL_PORT, true);\n\t\t\t\t\t$receiver\t= MANAGEMENT_EMAIL;\n\t\t\t\t}else{\n\t\t\t\t\t$objEmail \t= new send2email(trim($serverSetting[0]), trim($serverSetting[1]), trim($serverSetting[2]), trim($serverSetting[3]), trim($serverSetting[4]) );\n\t\t\t\t\t$receiver\t= $serverSetting[5];\n\t\t\t\t}\n\n\t\t\t\t$send \t\t= $objEmail->send($_POST[\"contact_email\"], '[Blanco Indonesia] Contact Us from '.$_POST[\"contact_name\"] .' ('.$_POST[\"contact_phone\"]. ')', $_POST[\"contact_message\"], $receiver, 'Contact Us', $_POST[\"contact_name\"]);\n\t\t\t\t/*echo '<!-- <pre>'; print_r($send); echo ' </pre> -->';*/\n\t\t\t}\n\t\t\t\n\t\t\treturn $form;\n\t\t}", "public function insert(){\n $formClass = $this->type.'_Form';\n $form = new $formClass($this->values);\n $errors = $form->isValid();\n $object = $form->get('object');\n if (empty($errors)) {\n try {\n $object->insert($this->values);\n } catch (Exception $e) {\n $form = new $formClass($this->values, array());\n $html = '<div class=\"message messageError\">\n '.$e->getMessage().'\n </div>\n '.$form->createForm($form->createFormFields(), array('action'=>url($this->type.'/insert', true), 'submit'=>__('save'), 'class'=>'formAdmin formAdminInsert'));\n return array('success'=>'0', 'html'=>$html);\n }\n $multipleChoice = (count((array)$this->object->info->info->form->multipleActions) > 0) ? true : false;\n $html = $object->showUi('Admin', array('userType'=>$this->login->get('type'), 'multipleChoice'=>$multipleChoice));\n return array('success'=>'1', 'html'=>$html, 'id'=>$object->id());\n } else {\n $form = new $formClass($this->values, $errors);\n $html = $form->createForm($form->createFormFields(), array('action'=>url($this->type.'/insert', true), 'submit'=>__('save'), 'class'=>'formAdmin formAdminInsert'));\n return array('success'=>'0', 'html'=>$html);\n }\n }" ]
[ "0.5889654", "0.58836126", "0.5765263", "0.57520115", "0.5687094", "0.56868714", "0.56360644", "0.5554503", "0.5480203", "0.5460281", "0.54574454", "0.5454157", "0.54475754", "0.5447162", "0.54355466", "0.54097307", "0.53602475", "0.5350493", "0.5347769", "0.5320692", "0.5311659", "0.53100777", "0.5303224", "0.5294403", "0.5292825", "0.52795875", "0.52413917", "0.52341175", "0.5233599", "0.52310115" ]
0.7853629
0
end of setForm() ==== getRecByEmail() =================================================== Check how many rows exists in the database with the email parameter. Parameters: $email string of an email Return: $res string number of rows found ========================================================================
protected function getRecByEmail(string $email) { $sql = "SELECT COUNT(*) FROM " . $this->formsTableName . " WHERE email = ?"; $stmt = $this->connect()->prepare($sql); $stmt->bindParam(1, $email, \PDO::PARAM_STR); $stmt->execute(); $res = $stmt->fetchAll(); return $res[0]['COUNT(*)']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getRecByNameEmail(string $name, string $email) {\n $sql = \"SELECT COUNT(*) FROM \" . $this->formsTableName . \" WHERE name = ? AND email = ?\";\n $stmt = $this->connect()->prepare($sql);\n $stmt->bindParam(1, $name, \\PDO::PARAM_STR);\n $stmt->bindParam(2, $email, \\PDO::PARAM_STR);\n $stmt->execute();\n $res = $stmt->fetchAll();\n return $res[0]['COUNT(*)'];\n }", "function emailTaken($email) {\n\t$db = connectDB();\n $sql = <<<SQL\n \tSELECT userID\n \tFROM users\n \tWHERE email = ?\nSQL;\n\n $statement = $db->prepare($sql);\n $statement->bind_param(\"s\", $email);\n $statement->execute();\n $statement->store_result();\n\t$res = $statement->num_rows;\n\n\t$statement->close();\n\t$db->close();\n\n return $res;\n}", "public function buscaEmail($email)\n {\n \n $query = $this->db\n ->where('email', $email)\n ->get('clientes');\n\n return $query->num_rows();\n }", "public function checkDuplicateEmail( $email )\n {\n include(\"config/database.php\");\n try {\n $sql = \"SELECT email FROM students where email='$email'\";\n $result = $pdoCon->prepare($sql);\n $result->execute();\n $rows = $result->rowCount();\n } catch (Exception $e) {\n echo \"Unable to retrieved results\";\n exit;\n }\n return $rows;\n }", "function isEmailPresent($email = NULL){\t\t\t\n\t\t$query = \" SELECT id\";\n\t\t$query .= \" FROM \" . $this->config->item('ems_organisers','dbtables');\n\t\t$query .= \" WHERE email = ? \";\t\t\n\t\t$dataBindArr = array($email);\n\t\t$res = $this->db->query($query, $dataBindArr);\n\t\t$resArr = $res->result();\t\t\n\t\treturn count($resArr);\n\t}", "static function email_available($email) {\n global $con;\n $sql = \"SELECT COUNT(`id`) AS 'count' FROM `user` WHERE `email` LIKE '\".$email.\"';\";\n $query = mysqli_query($con, $sql);\n $count = mysqli_fetch_object($query)->count;\n if ($count == 0) {\n return TRUE;\n } else {\n return FALSE;\n }\n }", "public function searchIfMailExists($email)\n {\n $reqmail = $this->db->prepare(\"SELECT * FROM users WHERE email = ?\");\n $reqmail->execute(array($email));\n $mailexist = $reqmail->rowCount();\n\n return $mailexist;\n }", "public function findEmail($email = \"[email protected]\") {\n\t\t$users = $this->em->createQuery ( \" SELECT PARTIAL u.{id} FROM App\\Entity\\User u WHERE u.email = ?1 \" )->setParameter ( 1, $email )->execute ();\n\t\treturn count ( $users );\n\t}", "function sql_nemails($email)\n{\n global $connection, $trace, $tblmembre;\n $select = \"$tblmembre\";\n $tables = explode(\",\",$select);\n $where = \"\";\n for ($i=0;$i<count($tables);$i++) {\n $fields_array = sql_fields($tables[$i],'array');\n for ($j=0;$j<sql_fields($tables[$i],'');$j++) {\n if (strstr($fields_array[$j], \"email\")) {\n if\t($where !== '')\t$where .= \"OR\"\t;\n $where .= \" $fields_array[$j]='$email' \";\n }\n }\n }\n $sql = mysqli_query($connection, \"SELECT * FROM $select WHERE $where\");\n $row = mysqli_num_rows($sql);\n return $row;\n}", "private function isUserExists($email) {\n \n $result = $this->con->query(\"SELECT iduser from user WHERE email = '\".$email.\"';\");\n $num_rows=$result->num_rows;\n \n \n return $num_rows;\n }", "public function user_if_email_exists($email)\n\t{\n\t\t$sql = \"SELECT id FROM \".$this->table.\" WHERE email = ?\";\n\t\t$data = array($email);\n\t\t$query = $this->db->query($sql, $data);\n\t\treturn $query->num_rows();\n\t}", "public function getByEmail($email) {\n if (isset($this->contacts[$email])) {\n echo $this->formatContact($email, $this->contacts[$email]);\n\n return 1;\n } else {\n echo 'Error: Contact does not exist';\n return 0;\n }\n }", "public function searchUser($email) {\r\n\r\n\t\t//TODO: Look at bookmark class for sample try/catch block around DB code\r\n\t\t$sqlObj = new DataBase();\r\n\t\t$found = FALSE;\r\n\r\n\t\t$query = \"SELECT * FROM `user_credentials` WHERE `email`='$email'\";\r\n\r\n\t\ttry {\r\n\t\t\t$sqlObj->DoQuery($query);\r\n\t\t\t$resultset = $sqlObj->GetData();\r\n\r\n\t\t\t$num = $sqlObj->getNumberOfRecords();\r\n\t\t} catch (MyException $e) {\r\n\t\t\t$e->getMyExceptionMessage();\r\n\t\t}\r\n\t\tif ($num == 1) {\r\n\t\t\t$id = $resultset[0]['id'];\r\n\t\t\t$found = $id;\r\n\t\t} else {\r\n\t\t\t$found = -1;\r\n\t\t}\r\n\t\t$sqlObj->destroy();\r\n\r\n\t\treturn $found;\r\n\t}", "function userExist($email){\n $users = json_decode($this->getAll());\n foreach ($users as &$user) {\n if($user->email == $email){\n return $user->counter;\n }\n }\n return NULL;\n }", "function numberOfSameEmailAddress($email) {\n $sql = \"SELECT * FROM member WHERE email = '\" . $email . \"'\";\n $result = getAll($sql);\n\n return count($result);\n}", "public function check_email_existence() {\n\t\t$email = $_GET['email'];\n\t\t$checkExistEmail = $this->User->find('count', array('conditions'=>array('User.email' => $email)));\n\t\techo $checkExistEmail;\n\t\texit();\n\t}", "public function availableEmail($email)\n {\n\n $pdo = DB::connect();\n $stmt = $pdo->prepare(\"SELECT COUNT(id) FROM users WHERE email = :email\");\n $stmt->bindParam(':email', $email);\n $stmt->execute();\n $result = $stmt->fetchColumn();\n\n if ($result > 0) {\n return false;\n } else {\n return true;\n }\n }", "private function check_for_email($email)\r\n\t{\r\n\t\t//We make use of the global dbCon that we've created in the config file\r\n\t\tglobal $dbCon;\r\n\r\n\t\t//SQL statement where we Count the occurances (it's faster!)\r\n\t\t$sql = \"SELECT COUNT(id) AS students FROM student WHERE email = ?;\";\r\n\t\t$stmt = $dbCon->prepare($sql); //Prepare Statement\r\n\t\tif ($stmt === false)\r\n\t\t{\r\n\t\t\ttrigger_error('SQL Error: ' . $dbCon->error, E_USER_ERROR);\r\n\t\t}\r\n\t\t$stmt->bind_param('s', $email);\r\n\t\t$stmt->execute(); //Execute\r\n\t\t$stmt->bind_result($students); //Get ResultSet\r\n\t\t$stmt->fetch();\r\n\t\t$stmt->close();\r\n\r\n\t\tif ($students > 0)\r\n\t\t{\r\n\t\t\treturn \"Email is already in system. Try to log in!\";\r\n\t\t}\r\n\t\treturn TRUE;\r\n\t}", "public function check_email($mail,$user_id)\r\n {\r\n try\r\n {\r\n $ret_=0;\r\n $s_qry=\"Select count(*) as i_total \"\r\n .\"From \".$this->tbl_recom.\" \"\r\n .\" Where s_referred_email='\".$mail.\"' AND i_referrer_id=\".$user_id;\r\n\t\t\t\t\r\n $rs=$this->db->query($s_qry);\r\n\t\t \r\n\t\t $s_qry1=\"Select count(*) as i_total \"\r\n .\"From \".$this->tbl_user.\" \"\r\n .\" Where s_email='\".$mail.\"' \";\r\n\t\t\t\t\r\n $rs1=$this->db->query($s_qry1);\r\n $i_cnt=0;\r\n\t\t// echo $ret_;\r\n if($rs->num_rows()>0)\r\n {\r\n\t\t \t foreach($rs->result() as $row)\r\n {\r\n $ret_=intval($row->i_total); \r\n } \r\n\t\t\t// echo $ret_;\r\n\t\t \tif($ret_!=0)\r\n\t\t\t$ret_ =1;\r\n }\r\n\t\t if($rs1->num_rows()>0 &&$ret_==0)\r\n {\r\n\t\t \t foreach($rs1->result() as $row)\r\n {\r\n $ret_=intval($row->i_total); \r\n } \r\n\t\t \tif($ret_!=0)\r\n\t\t\t $ret_ = 2; \r\n }\r\n\t\t // echo $ret_;\r\n \r\n return $ret_;\r\n }\r\n catch(Exception $err_obj)\r\n {\r\n show_error($err_obj->getMessage());\r\n }\r\n }", "function email_exists($email){\n $sql = \"SELECT id FROM users WHERE email='$email'\";\n $result = query($sql);\n\n if(row_count($result)==1){\n return true;\n }else{\n return false;\n }\n}", "function KTEmail($email){\n\t\t\t\t$sql=\"SELECT * FROM user WHERE Email='$email'\";\n\t\t\t\t$re=mysql_query($sql) or die(mysql_error());\n\t\t\t\t$n=mysql_num_rows($re);\n\t\t\t\tif($n>=1)\n\t\t\t\t\treturn true;\n\t\t\t\telse\n\t\t\t\t\treturn false;\n\t\t\t}", "function check_if_email_is_in_use($email){\n\n $query = $this->db->get_where('tbl_doctor_account', array('dacc_email' => $email));\n return $query->num_rows();\n\n }", "public function validate_email_user_reset($email)\n {\n return $this->db->from('ec_client')->where('email', $email)->count_all_results();\n }", "function email_exists($email)\n {\n // 1. Connect to the database.\n $link = connect();\n\n // 2. Protect variables to avoid any SQL injection\n $email = mysqli_real_escape_string($link, $email);\n\n // 3. Generate a query and return the result.\n $result = mysqli_query($link, \"\n SELECT id\n FROM tbl_users\n WHERE email = '{$email}'\n \");\n\n // 4. Disconnect from the database.\n disconnect($link);\n\n // 5. There should only be one row, or FALSE if nothing.\n return mysqli_num_rows($result) >= 1;\n }", "function search_by_email($tableName,$email) // searching employee by email\r\n {\r\n $conn = self::build_connection();\r\n $sql = \"select * from \".$tableName .\" WHERE email='{$email}'\";\r\n $result = $conn->query($sql);\r\n self::close_connection($conn);\r\n if($result->num_rows > 0){ //if value >0 true\r\n return true;\r\n }\r\n else{\r\n return false;\r\n }\r\n }", "private function checkEmail(){\n\n $request = $this->_connexion->prepare(\"SELECT COUNT(*) AS num FROM Users WHERE user_email=?\");\n $request->execute(array($this->_userEmail));\n $numberOfRows = $request->fetch();\n\n if($numberOfRows['num'] == 0)\n return false;\n else\n return true;\n\n }", "public function email_check($str){ \n $con = array( \n 'returnType' => 'count', \n 'conditions' => array( \n 'email' => $str \n ) \n ); \n $checkEmail = $this->Admins->getRows($con); \n if($checkEmail > 0){ \n $this->form_validation->set_message('email_check', 'The given email already exists.'); \n return FALSE; \n }else{ \n return TRUE; \n } \n }", "function emailExists($email){\r\n $sql = \"SELECT email FROM users WHERE email = '$email'\";\r\n $count = $this->q($sql)->num_rows;\r\n if ($count > 0 ){ return true; } else{ return false; }\r\n }", "public function consultaEmail($email){\n \n if (filter_var($email, FILTER_VALIDATE_EMAIL)){\n \n $sql = new Sql();\n $res = $sql->select('SELECT * FROM usuarios \n WHERE email_usuario = :email_usuario',array(\n ':email_usuario'=>$email));\n \n if(count($res)>0){\n return 1001;//caso SIM email ja esta em uso\n }else{\n return 0;//tudo certo email NAO ESTA em uso\n }\n\n }else{\n return 1002;//email informado nao e valido\n }\n \n }", "function email_exist($email) {\n\n $sql = \"SELECT id FROM users WHERE email = '$email'\";\n\n $result = query($sql);\n \n if(row_count($result) == 1) {\n return true;\n } else {\n return false;\n }\n}" ]
[ "0.7195172", "0.71636033", "0.6947688", "0.69180524", "0.6747372", "0.6745044", "0.6716814", "0.67041016", "0.667102", "0.6626002", "0.6569871", "0.6568219", "0.6541039", "0.6529713", "0.65229553", "0.64886206", "0.644988", "0.64486545", "0.64356935", "0.6435421", "0.64329886", "0.6409118", "0.6408549", "0.6398264", "0.6384246", "0.6373837", "0.6372915", "0.63689816", "0.6341841", "0.63381946" ]
0.7843579
0
end of getRecByEmail() ==== getRecByNameEmail() =============================================== Check how many rows exists in the database with the name & email parameters. Parameters: $name string of a name $email string of an email Return: $res string number of rows found ========================================================================
protected function getRecByNameEmail(string $name, string $email) { $sql = "SELECT COUNT(*) FROM " . $this->formsTableName . " WHERE name = ? AND email = ?"; $stmt = $this->connect()->prepare($sql); $stmt->bindParam(1, $name, \PDO::PARAM_STR); $stmt->bindParam(2, $email, \PDO::PARAM_STR); $stmt->execute(); $res = $stmt->fetchAll(); return $res[0]['COUNT(*)']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function emailTaken($email) {\n\t$db = connectDB();\n $sql = <<<SQL\n \tSELECT userID\n \tFROM users\n \tWHERE email = ?\nSQL;\n\n $statement = $db->prepare($sql);\n $statement->bind_param(\"s\", $email);\n $statement->execute();\n $statement->store_result();\n\t$res = $statement->num_rows;\n\n\t$statement->close();\n\t$db->close();\n\n return $res;\n}", "public function checkDuplicateEmail( $email )\n {\n include(\"config/database.php\");\n try {\n $sql = \"SELECT email FROM students where email='$email'\";\n $result = $pdoCon->prepare($sql);\n $result->execute();\n $rows = $result->rowCount();\n } catch (Exception $e) {\n echo \"Unable to retrieved results\";\n exit;\n }\n return $rows;\n }", "protected function getRecByEmail(string $email) {\n $sql = \"SELECT COUNT(*) FROM \" . $this->formsTableName . \" WHERE email = ?\";\n $stmt = $this->connect()->prepare($sql);\n $stmt->bindParam(1, $email, \\PDO::PARAM_STR);\n $stmt->execute();\n $res = $stmt->fetchAll();\n return $res[0]['COUNT(*)'];\n }", "public function searchIfMailExists($email)\n {\n $reqmail = $this->db->prepare(\"SELECT * FROM users WHERE email = ?\");\n $reqmail->execute(array($email));\n $mailexist = $reqmail->rowCount();\n\n return $mailexist;\n }", "function isEmailPresent($email = NULL){\t\t\t\n\t\t$query = \" SELECT id\";\n\t\t$query .= \" FROM \" . $this->config->item('ems_organisers','dbtables');\n\t\t$query .= \" WHERE email = ? \";\t\t\n\t\t$dataBindArr = array($email);\n\t\t$res = $this->db->query($query, $dataBindArr);\n\t\t$resArr = $res->result();\t\t\n\t\treturn count($resArr);\n\t}", "private function isUserExists($email) {\n \n $result = $this->con->query(\"SELECT iduser from user WHERE email = '\".$email.\"';\");\n $num_rows=$result->num_rows;\n \n \n return $num_rows;\n }", "static function email_available($email) {\n global $con;\n $sql = \"SELECT COUNT(`id`) AS 'count' FROM `user` WHERE `email` LIKE '\".$email.\"';\";\n $query = mysqli_query($con, $sql);\n $count = mysqli_fetch_object($query)->count;\n if ($count == 0) {\n return TRUE;\n } else {\n return FALSE;\n }\n }", "function email_exists($email){\n $sql = \"SELECT id FROM users WHERE email='$email'\";\n $result = query($sql);\n\n if(row_count($result)==1){\n return true;\n }else{\n return false;\n }\n}", "function numberOfSameEmailAddress($email) {\n $sql = \"SELECT * FROM member WHERE email = '\" . $email . \"'\";\n $result = getAll($sql);\n\n return count($result);\n}", "function existUser($email){\n\n\t\tglobal $conn;\n\n\t\t$query = \"SELECT COUNT(*) AS Registered FROM User WHERE email='\" . $email . \"'\";\n\n\t\t$result = $conn->query($query);\n\n\t\tif($result->num_rows != 1){\n\t\t\techo \"Error selecting \" . $email . \" user\";\n\t\t}else{\n\t\t\t$assocResult = $result->fetch_assoc();\n\t\t\treturn $assocResult['Registered'];\n\t\t}\n\t}", "function recipientExists($id_email, $recip_email, $recip_name) {\n if ($this->connectToMySql()) {\n $query = sprintf(\"SELECT * FROM scuola.email_recipients WHERE\n id_email = %s AND\n email = '%s' AND\n name = '%s'\", $id_email, $recip_email, $recip_name);\n\n // Perform Query\n $result = mysql_query($query);\n if (!$result) {\n setcookie('message', mysql_error());\n }\n }\n $this->closeConnection();\n return mysql_num_rows($result) == 1;\n }", "function emailExists($email){\r\n $sql = \"SELECT email FROM users WHERE email = '$email'\";\r\n $count = $this->q($sql)->num_rows;\r\n if ($count > 0 ){ return true; } else{ return false; }\r\n }", "function emailExist($dbx, string $targetEmail){\n // debug($dbx->count(\"SELECT * FROM user WHERE email = ?\",[$targetEmail]));\n return $dbx->count(\"SELECT * FROM user WHERE email = ?\",[$targetEmail]);\n}", "function email_exist($email) {\n\n $sql = \"SELECT id FROM users WHERE email = '$email'\";\n\n $result = query($sql);\n \n if(row_count($result) == 1) {\n return true;\n } else {\n return false;\n }\n}", "public function user_if_email_exists($email)\n\t{\n\t\t$sql = \"SELECT id FROM \".$this->table.\" WHERE email = ?\";\n\t\t$data = array($email);\n\t\t$query = $this->db->query($sql, $data);\n\t\treturn $query->num_rows();\n\t}", "function userExist($email){\n $users = json_decode($this->getAll());\n foreach ($users as &$user) {\n if($user->email == $email){\n return $user->counter;\n }\n }\n return NULL;\n }", "function checkUserByEmail($email)\n{\n // Make Database Connection\n $objDB = objDB();\n\n // Make The Statement\n $stmt = $objDB->prepare('SELECT * FROM users WHERE email=?');\n\n // Bind The Paramters\n $stmt->bind_param('s', $email);\n\n // execute\n $stmt->execute();\n\n // Store The Result\n $stmt->store_result();\n\n // Return Numbers of rows\n return $stmt->num_rows;\n}", "function search_by_email($tableName,$email) // searching employee by email\r\n {\r\n $conn = self::build_connection();\r\n $sql = \"select * from \".$tableName .\" WHERE email='{$email}'\";\r\n $result = $conn->query($sql);\r\n self::close_connection($conn);\r\n if($result->num_rows > 0){ //if value >0 true\r\n return true;\r\n }\r\n else{\r\n return false;\r\n }\r\n }", "function email_exists($email)\n {\n // 1. Connect to the database.\n $link = connect();\n\n // 2. Protect variables to avoid any SQL injection\n $email = mysqli_real_escape_string($link, $email);\n\n // 3. Generate a query and return the result.\n $result = mysqli_query($link, \"\n SELECT id\n FROM tbl_users\n WHERE email = '{$email}'\n \");\n\n // 4. Disconnect from the database.\n disconnect($link);\n\n // 5. There should only be one row, or FALSE if nothing.\n return mysqli_num_rows($result) >= 1;\n }", "public function check_user_exist($email){\n\n $query = $this -> conn -> prepare('SELECT COUNT(*) from users WHERE email =:email');\n $query -> execute(array('email' => $email));\n\n if($query){\n\n $row_count = $query -> fetchColumn();\n\n if ($row_count == 0){\n\n return false;\n\n } else {\n\n return true;\n\n }\n } else {\n\n return false;\n }\n }", "function email_exists($email){\n include 'connection.php';\n $query = \"SELECT email FROM basicusers WHERE email = '$email'\";\n $result = $connection->query($query);\n $rows = $result->num_rows;\n for($i=0; $i<$rows; $i++){\n $result->data_seek($i);\n $row = $result->fetch_array(MYSQLI_ASSOC);\n if($row['email'] == $email){\n return true;\n }\n else return false;\n }\n}", "function check_email_duplicate(){\n $this->SQL = \"SELECT email FROM users\"\n . \" WHERE email = '\" . $this->params['email'] . \"';\" ;\n \n \n $this->selecet_query();\n return $this->results;\n \n }", "public function searchUser($email) {\r\n\r\n\t\t//TODO: Look at bookmark class for sample try/catch block around DB code\r\n\t\t$sqlObj = new DataBase();\r\n\t\t$found = FALSE;\r\n\r\n\t\t$query = \"SELECT * FROM `user_credentials` WHERE `email`='$email'\";\r\n\r\n\t\ttry {\r\n\t\t\t$sqlObj->DoQuery($query);\r\n\t\t\t$resultset = $sqlObj->GetData();\r\n\r\n\t\t\t$num = $sqlObj->getNumberOfRecords();\r\n\t\t} catch (MyException $e) {\r\n\t\t\t$e->getMyExceptionMessage();\r\n\t\t}\r\n\t\tif ($num == 1) {\r\n\t\t\t$id = $resultset[0]['id'];\r\n\t\t\t$found = $id;\r\n\t\t} else {\r\n\t\t\t$found = -1;\r\n\t\t}\r\n\t\t$sqlObj->destroy();\r\n\r\n\t\treturn $found;\r\n\t}", "public function findEmail($email = \"[email protected]\") {\n\t\t$users = $this->em->createQuery ( \" SELECT PARTIAL u.{id} FROM App\\Entity\\User u WHERE u.email = ?1 \" )->setParameter ( 1, $email )->execute ();\n\t\treturn count ( $users );\n\t}", "public function emailExist($email){\n\t\t$query = $this->_db->prepare('SELECT COUNT(*) FROM utilisateur WHERE email=:email');\n\t\t$query->execute(array(':email' => $email));\n\t\t//get result\n\t\treturn (bool) $query->fetchColumn();\n\t}", "public function emailExists ($email){\n $con = connectPDO();\n $query = $con->prepare(\"SELECT COUNT(id) FROM users WHERE email = ?\");\n $query->execute(array($email));\n $rowcount = $query->fetchColumn();\n if ($rowcount > 0) {\n return true;\n }else{\n return false;\n }\n }", "public function check_user_exist_android($email){\n\n $query = $this -> conn -> prepare('SELECT COUNT(*) from androidusers WHERE email =:email');\n $query -> execute(array('email' => $email));\n\n if($query){\n\n $row_count = $query -> fetchColumn();\n\n if ($row_count == 0){\n\n return false;\n\n } else {\n\n return true;\n\n }\n } else {\n\n return false;\n }\n }", "function sql_nemails($email)\n{\n global $connection, $trace, $tblmembre;\n $select = \"$tblmembre\";\n $tables = explode(\",\",$select);\n $where = \"\";\n for ($i=0;$i<count($tables);$i++) {\n $fields_array = sql_fields($tables[$i],'array');\n for ($j=0;$j<sql_fields($tables[$i],'');$j++) {\n if (strstr($fields_array[$j], \"email\")) {\n if\t($where !== '')\t$where .= \"OR\"\t;\n $where .= \" $fields_array[$j]='$email' \";\n }\n }\n }\n $sql = mysqli_query($connection, \"SELECT * FROM $select WHERE $where\");\n $row = mysqli_num_rows($sql);\n return $row;\n}", "public static function existeEmail($email){\n $db = DWESBaseDatos::obtenerInstancia();\n\n $db -> ejecuta(\"SELECT count(*) as cantidad\n FROM usuario WHERE email = ?\", $email);\n $datos= $db->obtenDatos();\n if ($datos[0]['cantidad'] > 0) {\n //echo 'true' .' es verdad';\n return true;\n }else{\n //echo 'false' .' no existe';\n return false;\n }\n\n }", "public function check_email_existence() {\n\t\t$email = $_GET['email'];\n\t\t$checkExistEmail = $this->User->find('count', array('conditions'=>array('User.email' => $email)));\n\t\techo $checkExistEmail;\n\t\texit();\n\t}" ]
[ "0.72584003", "0.6987202", "0.68426913", "0.680507", "0.67845136", "0.6750169", "0.6718966", "0.67175156", "0.6664361", "0.66412026", "0.6638678", "0.6634671", "0.66083956", "0.6603715", "0.65979105", "0.6587985", "0.6562047", "0.65560746", "0.6551698", "0.6508218", "0.6508178", "0.6488898", "0.64835745", "0.6481918", "0.64234465", "0.6421208", "0.6400808", "0.6395552", "0.63853264", "0.638356" ]
0.78417575
0
end of getRecByNameEmail() ==== delRecByEmail() =================================================== Find and delete the oldest contact form using the email parameter Parameters: $email string of a email Return: TRUE row deletion successful FALSE row deletion failed ========================================================================
protected function delRecByEmail(string $email) { try { $sql = "DELETE FROM " . $this->formsTableName . " WHERE email = ? ORDER BY ts ASC LIMIT 1"; $stmt = $this->connect()->prepare($sql); $stmt->bindParam(1, $email, \PDO::PARAM_STR); $stmt->execute(); $res = $stmt->fetchAll(); return TRUE; } catch(PDOException $e) { return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeEmail( $email ){\n \n $conn = $this->connect();\n \n $sql = 'select email from ' . $this->dbtable . ' where email = lower(\"' . trim($email) . '\")';\n\t\t\t$query = mysql_query( $sql, $conn);\n\t\t\t\n\t\t\tif( mysql_num_rows( $query ) > 0 ){\n\t\t\t\t$sql = 'delete from ' . $this->dbtable . ' where email = \"' . trim($email) . '\"';\n\t\t\t\tmysql_query( $sql, $conn);\n\t\t\t} else {\n\t\t\t\treturn 'EMAIL NÃO CADASTRADO'; //Email not exists msg\n\t\t\t}\n \n mysql_close( $conn );\n \n return 'EMAIL REMOVIDO COM SUCESSO'; //Email removed sucefully\n }", "public function deleteByEmail($email) {\n\t\treturn $this->delete(array('email' => $email));\n\t}", "public function deleteEddEntries($email)\n { \n $this->edd_gdpr_delete_orders($email); \n }", "public function delete($email);", "public static function remove($email)\n\t{\n\t\t// Delete from database\n\t\t$db = BluApplication::getDatabase();\n\t\t$query = 'DELETE FROM maillist\n\t\t\tWHERE email = \"'.$email.'\"';\n\t\t$db->setQuery($query);\n\t\t$db->query();\n\n\t\t// Remove from constant contact\n\t\t$constantContact = self::_getConstantContact();\n\t\treturn $constantContact->remove($email);\n\t}", "public function deleteContact(EmailAddress $email);", "public function deleteRecord(){\n\t\t/* Variable initialization */\n\t\t$intEmailCode \t= ($this->input->post('txtDeleteRecordCode') !='') ? getDecyptionValue($this->input->post('txtDeleteRecordCode')) : 0;\n\n\t\t/* if email code is not pass then do needful */\n\t\tif($intEmailCode == 0){\n\t\t\t/* Return error message */\n\t\t\tjsonReturn(array('status'=>0,'message'=>\"Invalid email template code requested.\"), true);\n\t\t}\n\t\t/* Setting the updated array */\n\t\t$strUpdatedArr\t= array(\n\t\t\t\t\t\t\t\t\t'table'=>$this->_strPrimaryTableName,\n\t\t\t\t\t\t\t\t\t'data'=>array(\n\t\t\t\t\t\t\t\t\t\t\t\t'deleted'=>1,\n\t\t\t\t\t\t\t\t\t\t\t\t'updated_by'=>$this->getUserCode(),\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t'where'=>array(\n\t\t\t\t\t\t\t\t\t\t\t\t'id'=>$intEmailCode\n\t\t\t\t\t\t\t\t\t\t\t)\n\n\t\t\t\t\t\t\t\t);\n\t\t/* Updating the requested record set */\n\t\t$intNunberOfRecordUpdated = $this->_objDataOperation->setUpdateData($strUpdatedArr);\n\n\t\tif($intNunberOfRecordUpdated > 0){\n\t\t\tjsonReturn(array('status'=>1,'message'=>'Requested email template deleted successfully.'), true);\n\t\t}else{\n\t\t\tjsonReturn(array('status'=>0,'message'=>DML_ERROR), true);\n\t\t}\n\n\t\t/* removed variables */\n\t\tunset($strUpdatedArr);\n\t}", "private function delete_email($email = false, $email_id = false, $delete_code = false) {\n\n\t\tif(($delete_code) && ($email_id)) {\n\n $search = Emails::find('first', array(\n 'conditions' => array(\n '_id' => $email_id,\n 'DeleteCode' => $delete_code,\n\t\t\t\t\t\t'Verified' => false,\n 'Default' => false,\n ) ))->delete();\n\t\t}elseif($email) {\n\n\t\t\t$search = Emails::find('all', array(\n\t\t\t\t'conditions' => array(\n\t\t\t\t\t\t'Email' => $email,\n\t\t\t\t\t\t'Verified' => false,\n\t\t\t\t\t\t'Default' => false)\n\t\t\t\t\t\t))->delete();\n\t\t}\n\t}", "public function deleteFromDb() {\n\n // calling configuration of database\n include('database/config.php');\n\n // Accessing cookie stored in validate-user-login.php\n $email = $_COOKIE['email'];\n\n // Removing data by using json_remove function\n $result = mysqli_query($connection, \"UPDATE users SET contact=json_remove(contact, '$.{$this->contactToDelete}') WHERE email='$email'\");\n\n // Refreshing page by redirecting\n header(\"Location: main.php#\");\n }", "function do_delete_additional_email($s_id, $contacts_id) {\n\t# Dim some Vars:\n\t\tglobal $_DBCFG, $db_coin;\n\n\t# Do purge contact\n\t\t$query\t= 'DELETE FROM '.$_DBCFG['suppliers_contacts'].' WHERE contacts_id='.$contacts_id.' AND contacts_s_id='.$s_id;\n\t\t$db_coin->db_query_execute($query) OR DIE(\"Unable to complete request\");\n\t\treturn $db_coin->db_query_affected_rows();\n}", "function removeEmail($email) {\n\t$query = sprintf(\"DELETE FROM Emails WHERE email='%s'\",\n\t\tmysql_real_escape_string($email)\n\t);\n\t\n\tdb_query($query);\n}", "public function remove_row() {\n\t\t\t$email = $this->input->post('email');\n\n\t\t\t$this->load->model('users_table');\n\t\t\t$data = $this->users_table->remove_row($email);\n\t\t}", "function removeEmail($email) {\n\t\tglobal $polarbear_db;\n\t\t$emailSafe = $polarbear_db->escape($email);\n\t\t$sql = \"DELETE FROM \" . POLARBEAR_DB_PREFIX . \"_emaillist_emails WHERE listID = '{$this->id}' AND email = '$emailSafe'\";\n\t\t$polarbear_db->query($sql);\n\t}", "public function remove($email)\n {\n $retorno = 'false';\n if (($position = $this->findUser('Email', $email)) !== false) {\n unset($this->registros[$position]);\n $this->saveFileJson();\n $retorno = 'true';\n }\n return $retorno;\n }", "public static function deleteMessage($name,$email) {\n $query = \"DELETE from message where name = '$name' and email = '$email' \";\n $result = mysql_query($query);\n return $result;\n }", "public function deleted(Email $email)\n {\n //\n }", "function hapus($email) {\n\tglobal $conn;\n\tmysqli_query($conn, \"DELETE FROM pengguna WHERE email='$email'\");\n\n\treturn mysqli_affected_rows($conn); \n}", "function deleteRecord(mysqli $conn, $email){\r\n $sql = \"DELETE FROM users WHERE email = '$email'\";\r\n $result = $conn->query($sql);\r\n if(!$result){\r\n echo \"Failed to delete record\";\r\n // End if()\r\n }\r\n// Close function\r\n}", "function delete_contact()\n {\nrequire_once 'Zend/Loader.php';\nZend_Loader::loadClass('Zend_Gdata');\nZend_Loader::loadClass('Zend_Gdata_ClientLogin');\nZend_Loader::loadClass('Zend_Http_Client');\nZend_Loader::loadClass('Zend_Gdata_Query');\nZend_Loader::loadClass('Zend_Gdata_Feed');\n\n// set credentials for ClientLogin authentication\n$user = \"[email protected]\";\n$pass = \"guessme\";\n\n// set ID of entry to delete\n// from <link rel=edit>\n$id = 'http://www.google.com/m8/feeds/contacts/default/base/29e98jf648c495c7b';\n\ntry {\n // perform login and set protocol version to 3.0\n $client = Zend_Gdata_ClientLogin::getHttpClient(\n $user, $pass, 'cp');\n $client->setHeaders('If-Match: *');\n $gdata = new Zend_Gdata($client);\n $gdata->setMajorProtocolVersion(3);\n \n // delete entry\n $gdata->delete($id);\n echo '<h2>Delete Contact</h2>';\n echo 'Entry deleted';\n} catch (Exception $e) {\n die('ERROR:' . $e->getMessage());\n}\n }", "function function_delete($input_array){\t\n\n$email_id = $input_array[\"email_id\"]; \n$email_address = $input_array[\"email_address\"]; \n$datetime_now = $input_array[\"datetime_now\"]; \n\n\nif ($email_id != \"\" ) { \n$sql_command = \"\t\nupdate \tapp_newsletter_email \nset \t\nsystem_delete = 'delete' , \ndatetime_delete = '$datetime_now'\n\nwhere \nemail_id = '$email_id' \n\";\t\t\n$result_update = $this->db->Execute($sql_command);\t\n} //////\n\n\n\nif ($email_address != \"\" ) { \n$sql_command = \"\t\nupdate \tapp_newsletter_email \nset \t\nsystem_delete = 'delete' , \ndatetime_delete = '$datetime_now'\n\nwhere \nemail_address = '$email_address' \n\";\t\t\n$result_update = $this->db->Execute($sql_command);\t\n} //////\n\n\nif (!$result_update) {$show_status = \"error\" ; } else { $show_status = \"success\" ; }\n\n$result_return = array(\n\"show_status\"=>\"$show_status\" , \n\"email_id\"=>\"$email_id\" , \n);\nreturn $result_return ;\t\n\t\t\n}", "function deleterec($recid)\r\n{\r\n\t$res = sql_select();\r\n \t$count = sql_getrecordcount();\r\n \tmysqli_data_seek($res, $recid);\r\n \t$row = mysqli_fetch_assoc($res);\r\n \tshowrecnav(\"del\", $recid, $count);\r\n?>\r\n\t<br>\r\n\t<form action=\"company/processCompany.php?status=true&action=delete\" method=\"post\">\r\n\t\t<input type=\"hidden\" name=\"sql\" value=\"delete\">\r\n\t\t<input type=\"hidden\" name=\"customer_id\" value=\"<?php echo $row[\"customer_id\"] ?>\">\r\n\t\t<?php showrow($row, $recid) ?>\r\n\t\t<p><input type=\"submit\" name=\"action\" value=\"Confirm\"></p>\r\n\t</form>\r\n<?php\r\n mysqli_free_result($res);\r\n}", "function delContact ($p) {\r\n\r\n\t// pre checks\r\n\tif (!isAdmin()) return false;\r\n\tif (!isset($p['user'])) return false;\r\n\tif (empty($p['user'])) return false;\r\n\r\n\t// security\r\n\t$userPrep = prepareDBValue($p['user']);\r\n\r\n\t// get contact id\r\n\t$dbResult = queryDB('select id from contacts where username=\\'' . $userPrep . '\\'');\r\n\tif (!isset($dbResult[0]['id'])) return false;\r\n\t$userID = $dbResult[0]['id'];\r\n\r\n\t// delete all notifications assigned to the posted contact\r\n\tqueryDB('delete from notifications_to_contacts where contact_id=\\'' . $userID . '\\'');\r\n\r\n\t// disable all notifications and change usernames of all notifications owned by this user\r\n\tqueryDB('update notifications set active=\\'0\\', username=\\'' . prepareDBValue('[' . $p['user'] . ']') . '\\' where username=\\'' . $userPrep . '\\'');\r\n\r\n\t// finally, delete the user\r\n\tqueryDB('delete from contacts where id=\\'' . $userID . '\\'');\r\n\r\n\treturn true;\r\n\r\n}", "public function forceDeleted(Email $email)\n {\n //\n }", "function delete_contact_from_list($cat_id, $email) {\n require_once 'createsend-php-5.1.2/csrest_subscribers.php';\n $auth = array('api_key' => CM_API_KEY);\n\n $wrap = new CS_REST_Subscribers(get_term_meta($cat_id, 'list_id', true), $auth);\n $result = $wrap->delete($email);\n}", "public function delEmail($id)\n {\n\n $this->db->query('DELETE FROM email_list WHERE em_id = :id');\n $this->db->bind(':id', $id);\n\n // Execute\n if ($this->db->execute()) {\n return true;\n } else {\n return false;\n }\n }", "function aaModelDeleteIEmailAccount($imailid) {\r\n\r\n\tglobal $pdo_conn, $pdo_t;\r\n\r\n\t$sql = \"DELETE FROM \".$pdo_t['t_iemail'].\" WHERE IMAILID = :imailid\";\r\n\t\t\r\n\t$q = $pdo_conn->prepare($sql);\r\n\t$q->execute(array('imailid' => $imailid));\r\n\t\t\r\n\theader('Location: '.$_SERVER['REQUEST_URI']);\r\n\texit;\r\n\r\n}", "public function delete_user($email) \n\t{\n\t\treturn $this->vpopmail_readline(sprintf(\"D %s\", $email));\n\t}", "public function deleteUser($email) {\r\n\t\t$sqlObj = new DataBase();\r\n\t\t$id = (int) $this->searchUser($email);\r\n\t\tif ($id != FALSE) {\r\n\t\t\t$query = \"DELETE FROM `db_tackster`.`user_credentials` WHERE `user_credentials`.`id`=$id\";\r\n\t\t\t$sqlObj->DoQuery($query);\r\n\t\t\t$query = \"DELETE FROM `db_tackster`.`user_profile` WHERE `user_profile`.`uc_id` = $id\";\r\n\t\t\t$sqlObj->DoQuery($query);\r\n\t\t\t$query = \"DELETE FROM `db_tackster`.`track` WHERE `track`.`uc_id` = $id\";\r\n\t\t\t$sqlObj->DoQuery($query);\r\n\t\t\t$query = \"DELETE FROM `db_tackster`.`bmk_activity` WHERE `bmk_activity`.`uc_id` = $id\";\r\n\t\t\t$sqlObj->DoQuery($query);\r\n\t\t\t$query = \"DELETE FROM `db_tackster`.`bmk_entry` WHERE `bmk_entry`.`uc_id` = $id\";\r\n\t\t\t$sqlObj->DoQuery($query);\r\n\t\t\t$query = \"DELETE FROM `db_tackster`.`bmk_activity` WHERE `bmk_activity`.`uc_id` = $id\";\r\n\t\t\t$sqlObj->DoQuery($query);\r\n\t\t}\r\n\t\t$sqlObj->destroy();\r\n\t}", "function delete($email) {\n return $this->delete_request($this->_subscribers_base_route.'.json?email='.urlencode($email));\n }", "function delEmailHandler1() {\n global $inputs;\n\n $sql = \"DELETE FROM mail WHERE id = \" . $inputs['id'];\n execSql($sql);\n\n formatOutput(true, 'delete success');\n}" ]
[ "0.66217035", "0.65925646", "0.6545741", "0.6542247", "0.6494282", "0.64216745", "0.6401216", "0.637896", "0.6308607", "0.6303122", "0.6250834", "0.61782515", "0.61770433", "0.6162416", "0.6112688", "0.6103987", "0.6094252", "0.60901666", "0.6050489", "0.6047234", "0.6010882", "0.5999712", "0.5984761", "0.5962121", "0.59379524", "0.59252787", "0.5915291", "0.5904005", "0.58816683", "0.58144003" ]
0.8066477
0
Return the list of injection strategies used
public function getInjectionStrategies(): TypedCollectionInterface { return $this->injectionStrategies; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getAvailableStrategies() {\n\t\t$availableStrategies = array();\n\t\t$path = APP . 'Lib' . DS . 'Migrations' . DS;\n\t\tforeach (new \\DirectoryIterator($path) as $info) {\n \t\t\tif ($info->isDot()) {\n \t\t\t\tcontinue;\n \t\t\t}\n\n \t\t\tif (preg_match('/Strategy\\.php/', $info->getBasename())) {\n \t\t\t\t$type = str_replace('Strategy.php', '', $info->getBasename());\n \t\t\t\t$availableStrategies[] = strtolower($type);\n \t\t\t}\n\t\t}\n\n\t\treturn $availableStrategies;\n\t}", "protected function _loadStrategies(){\n\t\tif (isset($this->env['Strategy']) && is_array($this->env['Strategy']) && count($this->env['Strategy']) > 0){\n\t\t\tforeach ($this->env['Strategy'] as $key => $strategy){\n\t\t\t\tif (!is_array($strategy)){\n\t\t\t\t\t$key = $strategy;\n\t\t\t\t\t$strategy = array();\n\t\t\t\t}\n\n\t\t\t\t// Define a URL-friendly name\n\t\t\t\tif (empty($strategy['_opauth_url_name'])) $strategy['_opauth_url_name'] = strtolower($key);\n\t\t\t\t$this->strategyMap[$strategy['_opauth_url_name']] = $key;\n\t\t\t\t\n\t\t\t\t$this->env['Strategy'][$key] = $strategy;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\ttrigger_error('No Opauth strategies defined', E_USER_ERROR);\n\t\t}\n\t}", "public function authenticationStrategies()\n {\n $data = [];\n $settings = [];\n $settings['security']['authentication']['authenticationStrategy'] = 'allTokens';\n $data[] = [$settings, Context::AUTHENTICATE_ALL_TOKENS];\n $settings['security']['authentication']['authenticationStrategy'] = 'oneToken';\n $data[] = [$settings, Context::AUTHENTICATE_ONE_TOKEN];\n $settings['security']['authentication']['authenticationStrategy'] = 'atLeastOneToken';\n $data[] = [$settings, Context::AUTHENTICATE_AT_LEAST_ONE_TOKEN];\n $settings['security']['authentication']['authenticationStrategy'] = 'anyToken';\n $data[] = [$settings, Context::AUTHENTICATE_ANY_TOKEN];\n return $data;\n }", "function &getSupportedInjectionAdapters() {\n\t\t// Load meta-data adapters from the database.\n\t\tif ($this->getHasLoadableAdapters() && !$this->_injectionAdaptersLoaded) {\n\t\t\t$filterDao =& DAORegistry::getDAO('FilterDAO'); /* @var $filterDao FilterDAO */\n\t\t\t$loadedAdapters =& $filterDao->getObjectsByTypeDescription('metadata::%', 'class::%', $this, false);\n\t\t\tforeach($loadedAdapters as $loadedAdapter) {\n\t\t\t\t$this->addSupportedMetadataAdapter($loadedAdapter);\n\t\t\t}\n\t\t\t$this->_injectionAdaptersLoaded = true;\n\t\t}\n\n\t\treturn $this->_metadataInjectionAdapters;\n\t}", "private function getAvailableAggregationStrategies(): array\n {\n return [\n self::AGGREGATION_STRATEGY_FIRE_AND_FORGET,\n ];\n }", "public function getInjectMethods() {}", "private function strategiesAsString()\n {\n return implode(',', $this->ruleRepository->getStrategiesList());\n }", "protected function getProviderLookup()\n {\n // to skip loading those providers completely.\n return array_merge($this->providerLookup, [\n 'keycloak' => KeycloakProvider::class\n ]);\n }", "public function getDependencies() : array\n {\n return [\n 'aliases' => [\n // Choose a different adapter changing the alias value\n AccessTokenRepositoryInterface::class => Pdo\\AccessTokenRepository::class,\n AuthCodeRepositoryInterface::class => Pdo\\AuthCodeRepository::class,\n ClientRepositoryInterface::class => Pdo\\ClientRepository::class,\n RefreshTokenRepositoryInterface::class => Pdo\\RefreshTokenRepository::class,\n ScopeRepositoryInterface::class => Pdo\\ScopeRepository::class,\n UserRepositoryInterface::class => Pdo\\UserRepository::class,\n AuthenticationInterface::class => OAuth2Adapter::class\n ],\n 'factories' => [\n AuthorizationMiddleware::class => AuthorizationMiddlewareFactory::class,\n AuthorizationHandler::class => AuthorizationHandlerFactory::class,\n TokenEndpointHandler::class => TokenEndpointHandlerFactory::class,\n OAuth2Adapter::class => OAuth2AdapterFactory::class,\n AuthorizationServer::class => AuthorizationServerFactory::class,\n ResourceServer::class => ResourceServerFactory::class,\n // Pdo adapter\n Pdo\\PdoService::class => Pdo\\PdoServiceFactory::class,\n Pdo\\AccessTokenRepository::class => Pdo\\AccessTokenRepositoryFactory::class,\n Pdo\\AuthCodeRepository::class => Pdo\\AuthCodeRepositoryFactory::class,\n Pdo\\ClientRepository::class => Pdo\\ClientRepositoryFactory::class,\n Pdo\\RefreshTokenRepository::class => Pdo\\RefreshTokenRepositoryFactory::class,\n Pdo\\ScopeRepository::class => Pdo\\ScopeRepositoryFactory::class,\n Pdo\\UserRepository::class => Pdo\\UserRepositoryFactory::class,\n // Default Grants\n ClientCredentialsGrant::class => ClientCredentialsGrantFactory::class,\n PasswordGrant::class => PasswordGrantFactory::class,\n AuthCodeGrant::class => AuthCodeGrantFactory::class,\n ImplicitGrant::class => ImplicitGrantFactory::class,\n RefreshTokenGrant::class => RefreshTokenGrantFactory::class,\n ]\n ];\n }", "public function provides()\n\t{\n\t\treturn array('conferencer');\n\t}", "public function getDependencies()\n {\n return array(\n MongoServiceProvider::SERVICE_NAME\n );\n }", "private function registerViewStrategies()\n {\n if (! isset($this->config['strategies'])) {\n return;\n }\n\n $strategies = $this->config['strategies'];\n\n if (is_string($strategies)) {\n $strategies = [$strategies];\n }\n\n if (! is_array($strategies) && ! $strategies instanceof Traversable) {\n return;\n }\n\n $view = $this->getView();\n $events = $view->getEventManager();\n\n foreach ($strategies as $strategy) {\n if (! is_string($strategy)) {\n continue;\n }\n\n $listener = $this->services->get($strategy);\n if ($listener instanceof ListenerAggregateInterface) {\n $listener->attach($events, 100);\n }\n }\n }", "public function provides() {\n $providers = array();\n foreach ($this->providers as $key => $value) {\n $providers[] = $key;\n }\n return $providers;\n }", "public static function get_drivers() {\n return array(\n '' => get_string('choosedots'),\n 'native/mysqli' => \\moodle_database::get_driver_instance('mysqli', 'native')->get_name(),\n 'native/mariadb' => \\moodle_database::get_driver_instance('mariadb', 'native')->get_name(),\n 'native/pgsql' => \\moodle_database::get_driver_instance('pgsql', 'native')->get_name(),\n 'native/oci' => \\moodle_database::get_driver_instance('oci', 'native')->get_name(),\n 'native/sqlsrv' => \\moodle_database::get_driver_instance('sqlsrv', 'native')->get_name()\n );\n }", "public function provides()\n {\n return [\n 'auth',\n 'Permit\\CurrentUser\\ContainerInterface',\n 'Permit\\Access\\CheckerInterface',\n 'Permit\\CurrentUser\\LoginValidatorInterface'\n ];\n }", "protected function getAdapters(): array\n {\n return [\n \"grouped\" => \"Phalcon\\\\Config\\\\Adapter\\\\Grouped\",\n \"ini\" => \"Phalcon\\\\Config\\\\Adapter\\\\Ini\",\n \"json\" => \"Phalcon\\\\Config\\\\Adapter\\\\Json\",\n \"php\" => \"Phalcon\\\\Config\\\\Adapter\\\\Php\",\n \"yaml\" => \"Phalcon\\\\Config\\\\Adapter\\\\Yaml\",\n ];\n }", "public function provides()\n {\n return [\n SecretCompressor::class,\n SecretEncrypter::class,\n SecretManager::class\n ];\n }", "public function getDependencies()\n {\n return [\n 'invokables' => [\n// 'authentication.adapter' => Adapter\\DummySuccessAdapter::class,\n ],\n 'factories' => [\n Middleware\\AuthenticationMiddleware::class => Middleware\\AuthenticationMiddlewareFactory::class,\n Action\\LoginAction::class => Action\\LoginActionFactory::class,\n Action\\LogoutAction::class => Action\\LogoutActionFactory::class,\n \\Zend\\Authentication\\AuthenticationService::class => Service\\AuthenticationServiceFactory::class,\n ],\n ];\n }", "public function getDependencies(): array\n {\n return [\n 'invokables' => [\n ],\n 'factories' => [\n // third party\n Adapter::class => AdapterServiceFactory::class,\n CorsMiddleware::class => Middleware\\CorsMiddlewareFactory::class,\n // Handler\n Handler\\AuthorizationTokenHandler::class => Handler\\AuthorizationTokenFactory::class,\n Handler\\ObtainCalcResultHandler::class => Handler\\ObtainCalcResultFactory::class,\n Handler\\StoreCalcResultHandler::class => Handler\\StoreCalcResultFactory::class,\n // Service\n Service\\PreserveNumberOfResultsService::class => Service\\PreserveNumberOfResultsFactory::class,\n Service\\CalcResultExtractingService::class => Service\\CalcResultExtractingFactory::class,\n // Repository\n Repository\\CalcResultsRepository::class => Repository\\CalcResultsFactory::class,\n ],\n ];\n }", "public function provides()\n {\n return [\n 'sm.callback.factory',\n 'sm.event.dispatcher',\n 'sm.factory',\n Debug::class,\n ];\n }", "public function provides()\n {\n return [\n 'datamapper.presenter.scanner',\n 'command.presenter.register',\n 'command.presenter.clear'\n ];\n }", "protected static function getServiceProviders()\n {\n return [];\n }", "public function provides() {\n\t\treturn array();\n\t}", "public function provides()\n {\n return [\n 'digitalocean.adapterfactory',\n 'digitalocean.factory',\n 'digitalocean',\n 'digitalocean.connection',\n ];\n }", "public function provides()\n\t{\n\t\treturn [\n\t\t\t'lock',\n\t\t\t'lock.store',\n\t\t\t'command.lock.clear'\n\t\t];\n\t}", "public static function getAvailableDrivers()\n {\n return array_keys(self::$_driverMap);\n }", "public function provides(): array\n {\n if ($this->app->environment('production')) {\n return array_values($this->commands);\n } else {\n return array_merge(array_values($this->commands), array_values($this->devCommands));\n }\n }", "public function provides()\n {\n return array(\n //\n );\n }", "public function getEngines() {\n return $this->dependencyInjector->getAll('ride\\\\library\\\\template\\\\engine\\\\Engine');\n }", "public function provides()\n {\n return [\n 'dubbo_cli',\n 'dubbo_cli.factory',\n ];\n }" ]
[ "0.7098468", "0.62777054", "0.62403274", "0.6216394", "0.62068605", "0.61737406", "0.59344494", "0.5932356", "0.5887029", "0.5873927", "0.5868579", "0.58343774", "0.5786879", "0.574524", "0.57451737", "0.5710181", "0.5653659", "0.5627613", "0.5617549", "0.56082076", "0.5607703", "0.55620104", "0.5560033", "0.55439186", "0.55425245", "0.5534939", "0.551849", "0.5513713", "0.55024654", "0.54995984" ]
0.7091983
1
/////////////////////////////////////////////////////////////////// Get total product count
public static function getTotalProductCount() { Db_Actions::DbSelect("SELECT COUNT(id) FROM cscart_products"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getProductCount()\n {\n $count = 0;\n \tforeach ($this->getItems() as $item) {\n \t $count += $item['count'];\n \t}\n \treturn $count;\n }", "public function getTotalProducts()\n {\n $resource = $this->_productFactory->create()->getResource();\n \n $connection = $resource->getConnection();\n $select = $connection->select();\n $select->from(\n $resource->getTable('catalog_product_entity'),\n ['total_product' => 'count( entity_id )']\n )->where(\n 'vendor_id = :vendor_id'\n );\n $bind = ['vendor_id' => $this->getVendor()->getId()];\n \n $total = $connection->fetchOne($select, $bind);\n return $total;\n }", "public function getCountProduct()\n {\n return $this->product_model->countAll();\n }", "public function getProductCount()\n {\n return count($this->products);\n }", "public function count()\n {\n $count = 0;\n foreach($this->_data as &$product) {\n $count += $product['quantity'];\n }\n\n\t\treturn $count;\n\t}", "public function numberOfProducts(){\n if (!$this->cart_id){\n return 0;\n }\n return JeproshopCartModelCart::getNumberOfProducts($this->cart_id);\n }", "public function ProductCount()\n {\n return Products::count();\n }", "public function getNumProducts()\n {\n return $this->numProducts;\n }", "function getProductCount($params = array()){\n\t\tMpApi::sleep(); \n\t\treturn json_decode($this->callCurl(MpApi::GET , '/multivendor/product/count.json' , $params ),true);\n\t}", "public function getProductsCount()\n\t{\n\t\tif ($this->hasData('products_count')) {\n\t\t\treturn $this->getData('products_count');\n\t\t}\n\n\t\tif (null === $this->getData('products_count')) {\n\t\t\t$this->setData('products_count', self::DEFAULT_PRODUCTS_COUNT);\n\t\t}\n\n\t\treturn $this->getData('products_count');\n\t}", "public function countProduct(){\n return count(Product::all());\n }", "public function getProductTotalCount($productData) {\n if (isset ( $productData ['sku'] )) {\n return count ( $productData ['sku'] );\n }\n }", "public function NumOfProducts()\n {\n return Product::all()->count();\n }", "public function getProductsCount()\n {\n if (null === $this->_productsCount) {\n $this->_productsCount = self::DEFAULT_PRODUCTS_COUNT;\n }\n return $this->_productsCount;\n }", "public function getAllProductsCount()\n {\n\n return $this->all()->count();\n }", "public function total_items()\n {\n $total_items = 0;\n $items = $this->_session->offsetGet('products');\n if ($this->_isCartArray($items) === TRUE)\n {\n foreach ($items as $key)\n {\n $total_items =+ ($total_items + $key['qty']);\n }\n return $total_items;\n }\n }", "public function totalCount();", "public function totalCount();", "public function getProNumRows()\n {\n return $this->db->count_all('products');\n }", "public function getTotalQuantity()\n {\n $quantity = 0;\n \n if ($this->hasProducts()) {\n foreach ($this->getBasketProductsJoinProduct() as $basketProduct) {\n $quantity = $quantity + $basketProduct->getQuantity();\n }\n }\n \n return $quantity;\n }", "public static function getOrderedProductsQuantity(): string\n {\n $query = new Query();\n $total = $query->select([\n 'COUNT(*) as total'\n ])\n ->from(['sale_items'])\n ->where([\n 'customer_auth_id' => Yii::$app->user->identity->id,\n 'sale_id' => 0\n ])\n ->scalar();\n\n return $total;\n }", "public function count() {\n\t\treturn $this->field('Cart.order_item_count', $this->cartConditions());\n\t}", "public function count() {\n\n // query to count all product records\n $query = \"SELECT count(*) FROM $this->table_name\";\n\n // prepare query statement\n $stmt = $this->conn->prepare($query);\n\n // execute query\n $stmt->execute();\n\n // get row value\n $rows = $stmt->fetch(PDO::FETCH_NUM);\n\n // return count\n return $rows[0];\n }", "public function getTotalCount()\n {\n $this->loadItems();\n return $this->calculator->getCount($this->items);\n }", "public function getBasketProductsCount(): int\n\t{\n\t\tif ($this->basketProducts === null) {\n\t\t\t$this->getBasketProducts();\n\t\t}\n\n\t\treturn $this->basketProductsCount;\n\t}", "public function getCartVolume() {\n $product_total = 0;\n\n $products = $this->getProducts();\n\n foreach ($products as $product) {\n //$product_total += $product['quantity'];\n $product_total += $product['quantity'];\n }\n\n return $product_total;\n }", "function oos_total_products_in_category($category_id)\n{\n\n $products_count = 0;\n\n $dbconn =& oosDBGetConn();\n $oostable =& oosDBGetTables();\n\n $productstable = $oostable['products'];\n $products_to_categoriestable = $oostable['products_to_categories'];\n $products = $dbconn->Execute(\"SELECT COUNT(*) AS total FROM $productstable p, $products_to_categoriestable p2c WHERE p.products_id = p2c.products_id AND p.products_status >= '1' AND p2c.categories_id = '\" . intval($category_id) . \"'\");\n\n $products_count += $products->fields['total'];\n\n return $products_count;\n}", "public function getTotal()\n {\n return $this->getQty() * $this->getProduct()->getPrice();\n }", "public function getProductItemCounts()\n {\n if (array_key_exists(\"productItemCounts\", $this->_propDict)) {\n if (is_a($this->_propDict[\"productItemCounts\"], \"\\Microsoft\\Graph\\Model\\KeyValuePair\") || is_null($this->_propDict[\"productItemCounts\"])) {\n return $this->_propDict[\"productItemCounts\"];\n } else {\n $this->_propDict[\"productItemCounts\"] = new KeyValuePair($this->_propDict[\"productItemCounts\"]);\n return $this->_propDict[\"productItemCounts\"];\n }\n }\n return null;\n }", "public function total(): int\n {\n return Arr::get($this->meta, 'total', $this->count());\n }" ]
[ "0.90284467", "0.8108571", "0.8093267", "0.8035205", "0.7779086", "0.77560496", "0.77557915", "0.76248777", "0.76099056", "0.7558842", "0.75444514", "0.753077", "0.75024605", "0.74686164", "0.74683267", "0.74584734", "0.735191", "0.735191", "0.7341474", "0.73247087", "0.7277171", "0.7277068", "0.7214189", "0.7203048", "0.7199394", "0.71927464", "0.7190162", "0.71771276", "0.7176101", "0.7172954" ]
0.83563393
1
/////////////////////////////////////////////////////////////////// Get all top level categories
public static function getCategories() { $top_level_cats = array(); //Select all top level categories Db_Actions::DbSelect("SELECT * FROM cscart_categories LEFT OUTER JOIN cscart_category_descriptions ON cscart_categories.category_id = cscart_category_descriptions.category_id WHERE cscart_categories.parent_id=0"); $result = Db_Actions::DbGetResults(); if (!isset($result->empty_result)) { foreach ($result as $cat) { $top_level_cats[] = array('id' => $cat->category_id, 'cat_name' => $cat->category, 'company_id' => $cat->company_id, 'status' => $cat->status, 'product_count' => $cat->product_count, 'is_op' => $cat->is_op, 'usergroup_ids' => $cat->usergroup_ids); } } if (!isset($result->empty_result)) { return $result; } else { return new stdClass(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAllCategories()\n\t{\n\t\treturn $this->_db->loadAssoc(\"SELECT * FROM @_#_categories ORDER BY title\", 'parent_id', true);\n\t}", "public function getCategories();", "public function getCategories();", "public function getAllCategories();", "function getAllCategories()\n {\n return $this->data->getAllCategories();\n }", "public function getAllCategories() {\n\n if (!isset(parent::all()[0])) {\n return [];\n }\n return parent::all()[0]->children;\n }", "function getAllCategories() {\n\t\t$url = $this->apiURL . \"categories/\" . $this->yourID . \"/\" . $this->yourAPIKey;\n\t\treturn $this->_curl_get($url);\n\t}", "public function getCategoriesAll()\n {\n return $this->where('cat_active', 1)->with('subcategories')->get();\n }", "function get_all_category(){\n $cat_args = array(\n 'type' => 'post',\n 'child_of' => 0,\n 'parent' => '',\n 'orderby' => 'name',\n 'order' => 'ASC',\n 'hide_empty' => 1,\n 'hierarchical' => 1,\n 'exclude' => '',\n 'include' => '',\n 'number' => '',\n 'taxonomy' => 'category',\n 'pad_counts' => false\n\n );\n $all_category = get_categories( $cat_args );\n\n return $all_category;\n }", "public static function getCategoryTopLevel() {\n\t\t\t$db = Db::getInstance();\n\t\t\t// Regex that grabs all top-level categories using location\n\t\t\t$regexForTopLevel = \"^[0-9]+$\";\n\t\t\t$categoryQuery = $db->prepare('SELECT location, description \n\t\t\t\t\t\t\t\t\t\t\t FROM categories \n\t\t\t\t\t\t\t\t\t\t\tWHERE location REGEXP :regex\n\t\t\t\t\t\t\t\t\t\t ORDER BY location'\n\t\t\t\t\t\t\t\t\t\t );\n\t\t\t\t$categoryQuery->execute(array('regex' => $regexForTopLevel));\n\t\t\t$allTopCategories = $categoryQuery->fetchAll(PDO::FETCH_ASSOC);\n\t\t\treturn $allTopCategories;\n\t\t}", "public function categories()\n {\n // Cache results\n static $categories;\n\n if ($categories) {\n return $categories;\n }\n\n $app = \\Slim\\Slim::getInstance();\n $dataMapper = $app->dataMapper;\n $CategoryMapper = $dataMapper('CategoryMapper');\n\n return $categories = $CategoryMapper->getAllCategories();\n }", "public static function getCategories()\n\t{\n\t\treturn Category::getAll();\n\t}", "function getAllCategories()\n {\n // Get list of categories using solr\n $metadataDao = MidasLoader::loadModel('Metadata')->getMetadata(MIDAS_METADATA_TEXT, \"mrbextrator\", \"category\");\n $enabledDao = MidasLoader::loadModel('Metadata')->getMetadata(MIDAS_METADATA_TEXT, \"mrbextrator\", \"slicerdatastore\");\n $terms = array(); \n if($metadataDao)\n {\n $db = Zend_Registry::get('dbAdapter');\n $results = $db->query(\"SELECT value, itemrevision_id FROM metadatavalue WHERE metadata_id='\".$metadataDao->getKey().\"' order by value ASC\")\n ->fetchAll();\n foreach($results as $result)\n {\n $arrayTerms = explode(\" --- \", $result['value']);\n foreach($arrayTerms as $term)\n { \n if(strpos($term, \"zzz\") === false) continue;\n $tmpResults = $db->query(\"SELECT value FROM metadatavalue WHERE itemrevision_id='\".$result['itemrevision_id'].\"' AND metadata_id='\".$enabledDao->getKey().\"' order by value ASC\")\n ->fetchAll();\n if(empty($tmpResults))continue;\n $term = trim(str_replace('zzz', '', $term));\n if(!isset($terms[$term]))\n {\n $terms[$term] = 0;\n }\n $terms[$term]++;\n }\n } \n }\n ksort($terms);\n return $terms;\n }", "public static function getRootCategories()\n {\n $app = App::getInstance();\n\n $sql = $app['safesql']->query(\n \"SELECT\n\t\t\t\t`id`\n\t\t\tFROM `category`\n\t\t\tWHERE hidden = 0\n\t\t\tAND id > 0\n\t\t\tAND parent IS NULL\n\t\t\tAND deleted = 0\n\t\t\tORDER BY `order` ASC\",\n array());\n $results = $app['db']->get_results($sql);\n $cats = array();\n\n if (!is_null($results)) {\n foreach ($results as $cat) {\n $cats[] = new Category($cat->id);\n }\n }\n return $cats;\n }", "public static function getTopCategories() {\n global $lC_Database, $lC_Language;\n \n $Qcategories = $lC_Database->query('select c.categories_id, cd.categories_name, c.categories_link_target, c.categories_custom_url, c.categories_mode from :table_categories c, :table_categories_description cd where c.parent_id = 0 and c.categories_id = cd.categories_id and cd.language_id = :language_id and c.categories_status = 1 and c.categories_visibility_nav = 1 order by sort_order, cd.categories_name');\n $Qcategories->bindTable(':table_categories', TABLE_CATEGORIES);\n $Qcategories->bindTable(':table_categories_description', TABLE_CATEGORIES_DESCRIPTION);\n $Qcategories->bindInt(':language_id', $lC_Language->getID());\n $Qcategories->execute();\n while ( $Qcategories->next() ) {\n $topCategories[] = array('id' => $Qcategories->value('categories_id'),\n 'name' => $Qcategories->value('categories_name'),\n 'link_target' => $Qcategories->value('categories_link_target'),\n 'custom_url' => $Qcategories->value('categories_custom_url'),\n 'mode' => $Qcategories->value('categories_mode'));\n }\n \n return $topCategories; \n }", "public function getallCategories(){\n\t\t$criteria = new CDbCriteria;\n\t\t$criteria->select = '*';\n\t \treturn $terms = NeCategory::model()->findAll($criteria);\n\t}", "public function get_categories () {\n\t\treturn Category::all();\n\t}", "public static function getAllCategories()\n\t{\n\t\t$categories= Category::all();\n\t\treturn $categories;\n\t}", "public function categories() {\n\t\treturn $this->terms('category');\n\t}", "public function allCategories()\n {\n return Category::all();\n }", "function getCategories(){\n\t$storeId = Mage::app()->getStore()->getId(); \n\n\t$collection = Mage::getModel('catalog/category')->getCollection()\n\t\t->setStoreId($storeId)\n\t\t->addAttributeToSelect(\"name\");\n\t$catIds = $collection->getAllIds();\n\n\t$cat = Mage::getModel('catalog/category');\n\n\t$max_level = 0;\n\n\tforeach ($catIds as $catId) {\n\t\t$cat_single = $cat->load($catId);\n\t\t$level = $cat_single->getLevel();\n\t\tif ($level > $max_level) {\n\t\t\t$max_level = $level;\n\t\t}\n\n\t\t$CAT_TMP[$level][$catId]['name'] = $cat_single->getName();\n\t\t$CAT_TMP[$level][$catId]['childrens'] = $cat_single->getChildren();\n\t}\n\n\t$CAT = array();\n\t\n\tfor ($k = 0; $k <= $max_level; $k++) {\n\t\tif (is_array($CAT_TMP[$k])) {\n\t\t\tforeach ($CAT_TMP[$k] as $i=>$v) {\n\t\t\t\tif (isset($CAT[$i]['name']) && ($CAT[$i]['name'] != \"\")) {\t\t\t\t\t\n\t\t\t\t\t/////Berry add/////\n\t\t\t\t\tif($k == 2)\n\t\t\t\t\t\t$CAT[$i]['name'] .= $v['name'];\n\t\t\t\t\telse\n\t\t\t\t\t\t$CAT[$i]['name'] .= \"\";\n\t\t\t\t\t\t\n\t\t\t\t\t//$CAT[$i]['name'] .= \" > \" . $v['name'];\n\t\t\t\t\t$CAT[$i]['level'] = $k;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$CAT[$i]['name'] = $v['name'];\n\t\t\t\t\t$CAT[$i]['level'] = $k;\n\t\t\t\t}\n\n\t\t\t\tif (($v['name'] != \"\") && ($v['childrens'] != \"\")) {\n\t\t\t\t\tif (strpos($v['childrens'], \",\")) {\n\t\t\t\t\t\t$children_ids = explode(\",\", $v['childrens']);\n\t\t\t\t\t\tforeach ($children_ids as $children) {\n\t\t\t\t\t\t\tif (isset($CAT[$children]['name']) && ($CAT[$children]['name'] != \"\")) {\n\t\t\t\t\t\t\t\t$CAT[$children]['name'] = $CAT[$i]['name'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t$CAT[$children]['name'] = $CAT[$i]['name'];\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\telse {\n\t\t\t\t\t\tif (isset($CAT[$v['childrens']]['name']) && ($CAT[$v['childrens']]['name'] != \"\")) {\n\t\t\t\t\t\t\t$CAT[$v['childrens']]['name'] = $CAT[$i]['name'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$CAT[$v['childrens']]['name'] = $CAT[$i]['name'];\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}\n\tunset($collection);\n\tunset($CAT_TMP);\n\treturn $CAT;\n}", "public function getCategories()\n\t{\n\t\treturn BlogCategory::all();\t\n\t}", "public function getCategories() : array;", "public function getAllCategories() {\n $allCategories= $this->getCategories(); \n foreach ($allCategories as $value){\n $value->setChildren($this->getSubCategories($value->getId()));\n }\n return $allCategories;\n \n }", "public function getAllCategories(){\r\n\t\treturn $this->query(\"SELECT * FROM category\");\r\n\t}", "function Categories() {\n\t\treturn DataObject::get('categoryobject', '', 'Title');\n\t}", "public function get_categories() {\n\t\treturn $this->terms('category');\n\t}", "function getCategories()\n\t{\n\t\t$query = ' SELECT ' .\n\t\t\t$this->db->nameQuote('alias') . ',' .\n\t\t\t$this->db->nameQuote('id') . ',' .\n\t\t\t$this->db->nameQuote('name') .\n\t\t\t' FROM ' . $this->db->nameQuote('#__k2_categories') .\n\t\t\t' WHERE ' . $this->db->nameQuote('parent') . ' = ' . $this->db->quote($this->params->get('primaryCategory')) .\n\t\t\t' AND ' . $this->db->nameQuote('id') . ' NOT IN (' . implode(',', $this->params->get('regionCategories')) . ')' .\n\t\t\t' AND ' . $this->db->nameQuote('published') . ' = ' . $this->db->quote('1') .\n\t\t\t' AND ' . $this->db->nameQuote('trash') . ' = ' . $this->db->quote('0') .\n\t\t\t' ORDER BY ' . $this->db->nameQuote('ordering') . ' ASC';\n\n\t\t$this->db->setQuery($query);\n\n\t\treturn $this->db->loadObjectList();\n\t}", "public function findCategories();", "static function categories()\n {\n $category = \\SOE\\DB\\Category::where('parent_id', '0')\n ->orderBy('category_order')\n ->get();\n $return = array();\n foreach($categories as $cat)\n {\n $return[$cat->id] = $cat->slug;\n }\n return $return;\n }" ]
[ "0.7896574", "0.7813748", "0.7813748", "0.77887344", "0.77032274", "0.7661748", "0.7658546", "0.76123273", "0.7598974", "0.75817806", "0.7560357", "0.754041", "0.7532735", "0.7523088", "0.7491185", "0.74835724", "0.7466275", "0.74441797", "0.7423476", "0.74049145", "0.73974645", "0.73942846", "0.73839414", "0.73606825", "0.7355281", "0.73354685", "0.7328348", "0.7325752", "0.7322762", "0.73103833" ]
0.83286905
0
////////////////////////////////////////////////////////////////////// Delete product from cart
public static function deleteProductFromCart($product_id) { $auth = fn_fill_auth(); $cart = $_SESSION['cart']; fn_delete_cart_product($cart, $cart_id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeProduct(Product $product){\n \t$this->myCart->remove($product);\n }", "public function delete() {\n if (!$this->customer->isLogged()) {\n die();\n }\n $product_id = $this->request->post['product_id'];\n $this->load->model('catalog/product');\n\n $this->model_catalog_product->deleteProduct($product_id);\n\n echo \"ok\";\n exit();\n\n }", "public function remove()\n\t{\n\t\t$item = ORM::factory('cart_item', $this->input->post('id'));\n\t\t$this->cart->remove_product($item);\n\t\t\n\t\turl::redirect('cart');\n\t}", "function delete_product_item($id){\n $this->delete($id);\n }", "public function deleteCartProduct($id = null)\n {\n Session::forget('CouponAmount');\n Session::forget('CouponCode');\n\n DB::table('cart')->where(['id'=>$id])->delete();\n return redirect('/cart')->with('update_message','Product has been deleted from cart');\n }", "public function deleteProduct(Product $product);", "public static function cart_remove_product()\n {\n if (!isset($_REQUEST['cart-item-key'])) {\n WordPress_Rewrite_API_Request::missing_params();\n }\n\n //@TODO Check item_key exist in Cart or Use $_REQUEST['product_id'] as item_key\n\n // Remove\n WooCommerce_Cart::remove_item_cart(sanitize_text_field($_REQUEST['cart-item-key']));\n\n // Result\n wp_send_json_success(self::_return_cart_list(), 200);\n }", "private function deleteProduct()\n {\n echo PHP_EOL;\n \n try\n {\n $productToDelete = $this->productDao->getByEan(self::PRODUCT_TURKEY_EAN);\n $resultOfDelete = $this->productDao->delete($productToDelete); \n\n echo 'Product with id: ' . $productToDelete->id . ' was deleted ' .\n (($resultOfDelete) ? '' : 'un') .\n 'successfuly!' . PHP_EOL; \n }\n catch (Exception $e)\n {\n echo $e->getMessage();\n }\n }", "public function product_delete()\n\t\t\t\t{\n\t\t\t\t}", "public static function delete_product($id)\n {\n echo $id;\n $cart = session()->get('cart');\n if(isset($cart[$id])) {\n unset($cart[$id]);\n session()->put('cart', $cart);\n }\n session()->flash('success', 'Product removed successfully');\n\n return redirect()->back();\n\n }", "public function destroy(Cart $cart,Product $product)\n {\n\n //TO DO GET CART_PRODUCTS DATA HERE AND DELETE IT\n\n\n //TO DO DELETE CART DATA HERE\n\n return back();\n }", "public function deleteProduct($id, $request)\n {\n unset($this->cart[$id]);\n $this->saveCart($request);\n }", "public function deleting(Cart $cart)\n {\n //\n }", "function delete($product)\n {\n if (array_key_exists($product->id, $this->items)) {\n $storeProductDelete = $this->items[$product->id];\n //giam tien\n $this->totalPrice -= $storeProductDelete['price'];\n //giam so luong\n $this->totalQuantity -= $storeProductDelete['quantity'];\n // xoa phan tu o vi tri $product->id\n unset($this->items[$product->id]);\n }\n }", "public function delete()\n\t{\n\t\t$option = JRequest::getVar('option');\n\t\t$post = JRequest::get('post');\n\t\t$cartElement = $post['cart_index'];\n\t\t$Itemid = JRequest::getVar('Itemid');\n\t\t$redhelper = new redhelper;\n\t\t$Itemid = $redhelper->getCartItemid();\n\t\t$model = $this->getModel('cart');\n\n\t\t$model->delete($cartElement);\n\t\t$this->_carthelper->cartFinalCalculation();\n\t\t$this->_carthelper->carttodb();\n\t\t$link = JRoute::_('index.php?option=' . $option . '&view=cart&Itemid=' . $Itemid, false);\n\t\t$this->setRedirect($link);\n\t}", "public function removeproductAction() {\n $id = $this->getRequest()->getParam('id');\n $poProductId = $this->getRequest()->getParam('poproductid');\n $model = Mage::getModel('inventorypurchasing/purchaseorder_draftpo_product')->load($poProductId);\n $product = Mage::getResourceModel('catalog/product_collection')\n ->addFieldToFilter('entity_id', $model->getProductId())\n ->setPageSize(1)->setCurPage(1)\n ->getFirstItem();\n try {\n $model->delete();\n Mage::getSingleton('vendors/session')->addSuccess(\n $this->helper()->__('Product %s has been removed.', '<i>' . $product->getSku() . '</i>')\n );\n $this->_redirect('*/*/view', array('id' => $id));\n } catch (Exception $e) {\n Mage::getSingleton('vendors/session')->addError($this->helper()->__('There is error while removing product.'));\n Mage::getSingleton('vendors/session')->addError($e->getMessage());\n $this->_redirect('*/*/view', array('id' => $id));\n }\n }", "public function removeProduct($product)\n {\n\n $cart = $product->cart()->where('cart_id',$this->id)->wherePivot('deleted_at',null)->first();\n\n if (! is_null($cart))\n\n $cart->pivot->delete();\n }", "public function destroy(Product $product)\n {\n return Cart::deleteFromSession($product);\n }", "public function deleteFromCart($prod_id){\n $this->cartConstruct();\n $this->removeItem($prod_id);\n if(count($this->items)>0)\n {\n Session::put('cart',$this);\n }\n else\n {\n Session::forget('cart',$this);\n }\n return redirect()->back();\n\t}", "function deleteFromCart()\n{\n\t$productID = (int)$_GET['p']; //Get product id to be removed.\n\t\t\n\t$sql = \"DELETE FROM Cart WHERE ItemID = $productID\";\n\n\t$result = query($sql);\n\t\n\theader('Location: ./cart.php');\t\n}", "public function deleteCart(){\n $cartItemModel = \\Ccc::objectManager('\\Model\\Item',false);\n\n foreach($this->getCartItems() as $item){\n $ids[] = $item->itemId;\n }\n \n if($cartItemModel->deleteData($ids)){\n return true;\n }\n\n return false;\n }", "public function delete(Product $product)\n\t{\n\t\t//\tObteniendo los productos del carro.\n\t\t$cart = \\Session::get('cart');\n\t\t//\tEliminando el producto del carro.\n\t\tunset($cart[$product->id]);\n\t\t\\Session::put('cart', $cart);\n\n\t\treturn redirect()->route('cart-show');\n\t}", "function deleteCart() {\n\t\t$queryString = \"DELETE FROM cart;\";\n\n\t\tif ($stmt = $this->connection->prepare($queryString)) {\n\t\t\t$stmt->execute();\n\t\t\t$stmt->store_result();\n\t\t\theader(\"Location: http://serenity.ist.rit.edu/~qsb2538/341/project1/cart.php\");\n\t\t}\n\t}", "private function deleteIdFromProductsCart($cart, $productId)\n {\n unset($cart['products'][array_search($productId, $cart['products'])]);\n return $cart;\n }", "public function delete_product() {\n\t\t$values=array(\"rstatus\"=>\"C\");\n\t\t$rowIndex = $_POST['row_index'];\n\t\t$where =array(\"id\"=>$_POST['product_id']);\n\t\tif($this->update(\"products\",$values,$where)) {\t\t\t\n\t\t\techo '{\"masterItemsList\":{\"updateFlag\":\"void\",\"rowIndex\":'.$rowIndex.'}}';\n\t\t}\n\t\telse\n\t\t\techo 'Error while deleting';\n\t}", "public function destroy($id)\n {\n\n $cart = Cart::where('user_id', Auth()->id())\n ->first();\n\n $deleteProduct = CartProduct::findOrFail($id);\n $deleteProduct->delete();\n\n $CartProducts = CartProduct::where('user_id', Auth()->id())\n ->where('cart_id', $cart->id)\n ->get();\n\n if ($CartProducts->count() >= 1) {\n $this->updateTotal($cart);\n return redirect()->route('my-cart.index');\n } else {\n $cart->delete();\n return redirect()->route('my-cart.index');\n }\n // End of delete\n }", "public function actionDeleteProduct()\n {\n $order = Order::model()->findByPk(Yii::app()->request->getPost('order_id'));\n\n if (!$order)\n $this->error404(Yii::t('CartModule.admin', 'ORDER_NOT_FOUND'));\n\n if ($order->is_deleted)\n throw new CHttpException(404, Yii::t('CartModule.admin', 'ORDER_ISDELETED'));\n\n $order->deleteProduct(Yii::app()->request->getPost('id'));\n }", "public function actionDeleteProduct()\n\t{\n\t\t$model = OrderProduct::model()->findByPk($_POST['product_id']);\n\t\tif($model)\n\t\t\t$model->delete();\n\t}", "public function delete()\n {\n // get request\n $request = $this->getRequest()->request;\n // get product ID from request\n $product_id = $request['a'];\n // get product ids from session\n $compareProducts = $this->View()->getSession('compare', $compareProducts)?$this->View()->getSession('compare', $compareProducts):array();\n\n if (in_array($product_id, $compareProducts)) {\n // unseting product from compare session\n $key = array_search($product_id, $compareProducts);\n unset($compareProducts[$key]);\n }\n\n $this->View()->setSession('compare', $compareProducts);\n\n if ($request['XHR']) {\n die(json_encode([\n 'success' => true,\n 'message' => $this->View()->translating('compare_item_deleted'),\n 'count' => count($compareProducts),\n ]));\n }\n\n Router::redirect('compare');\n }", "public function delete_product_purchase()\n\t{\n\t\tif(empty($this->request->data['id_cliente']) || empty($this->request->data['produto_id']))\n\t\t{\n\t\t\t$this->Return = false;\n\t\t\t$this->Message = 'Informar produto e codigo do cliente';\n\t\t\t$this->EncodeReturn();\t\n\t\t}\n\n\t\t$CartSession = json_decode(base64_decode($this->request->data['carrinho']), 1);\n\n\t\t$i = 0;\t\t\t\t\n\t\tforeach ($CartSession['item'] as $item) \n\t\t{\n\t\t\tif($item['Produto']['id'] == $this->request->data['produto_id'] && $i == $this->request->data['indice'])\n\t\t\t{\n\t\t\t\tunset($CartSession['item'][$i]);\t\t\t\t\n\t\t\t}\n\n\t\t\t$i++;\n\t\t}\t\t\n\n\t\tsort($CartSession['item']);\t\n\n\t\t##realiza soma de valores\n\t\t$this->CountPurchase($CartSession);\t\n\t\t$this->EncodeReturn();\t\n\t}" ]
[ "0.7960117", "0.772794", "0.771067", "0.7682363", "0.7673694", "0.7645469", "0.75880367", "0.7546866", "0.7544915", "0.7503153", "0.74693835", "0.74689454", "0.746671", "0.74597186", "0.74350214", "0.7421636", "0.7408494", "0.73823726", "0.7378197", "0.7328592", "0.7292169", "0.72911525", "0.7258322", "0.7231787", "0.7211656", "0.71672106", "0.7135013", "0.71284336", "0.7118745", "0.7074712" ]
0.77758974
1
/////////////////////////////////////////////////////////////////////// Load background images
public static function loadBackgroundImages() { $dir = scandir('../img/bgs'); $bg_images = array(); foreach ($dir as $file) { if ($file != "." && $file != "..") { if (file_exists("../img/bgs/" . $file)) { $currFileExt = pathinfo("../img/bgs/" . $file, 4); if ($currFileExt == "jpg" || $currFileExt == "png" || $currFileExt == "gif" || $currFileExt == "jpeg" || $currFileExt == "bmp") { $bg_images[] = $file; } } } } $curr_page = isset($_POST['curr_page']) ? intval($_POST['curr_page']) : 1; $max_bgs_per_page = 9; $offset = $curr_page * $max_bgs_per_page - $max_bgs_per_page; $slice = array_slice($bg_images, $offset, $max_bgs_per_page); $counter = 0; $middleClass = ""; foreach ($slice as $bg) { $counter++; if ($counter == 1) { ?><div class="cs-product-row"><?php } if ($counter == 2) { $middleClass = "cs-prd-middle"; } else { $middleClass = ""; } ?> <?php $bg_index = self::parseInt($bg); ?> <div class="cs-product pad-bot thumb_za_pozadini <?php echo $middleClass; ?>" index_za_pozadina_e="<?php echo $bg_index; ?>"> <img src="img/bgs/<?php echo $bg ?>" width="97" height="126" data-bgname="<?php echo $bg ?>" class="cs-main-bg" /> </div> <?php if ($counter == 3) { ?></div><?php $counter = 0; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_background_image()\n {\n }", "function _captcha_show_gd_img_get_backgrounds()\n\t{\n\t\t//-----------------------------------------\n\t\t// INIT\n\t\t//-----------------------------------------\n\t\t\n\t\t$images = array();\n\t\t$_path = $this->path_background;\n\t\t\n\t\tif ( $_dir = @opendir( $_path ) )\n\t\t{\n\t\t\twhile( false !== ( $_file = @readdir( $_dir ) ) )\n\t\t\t{\n\t\t\t\tif ( preg_match( \"#\\.(gif|jpeg|jpg|png)$#i\", $_file ) )\n\t\t\t\t{\n\t\t\t\t\t$images[] = $_path . '/' . $_file;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $images;\n\t}", "public function disable_lazyload_background_images() {\r\n\t\treturn false;\r\n\t}", "function background_image()\n {\n }", "public static function loadFilterImages() {\n $dir = scandir('../img/effects');\n $bg_images = array();\n foreach ($dir as $file) {\n if ($file != \".\" && $file != \"..\") {\n if (file_exists(\"../img/effects/\" . $file)) {\n $currFileExt = pathinfo(\"../img/effects/\" . $file, 4);\n if ($currFileExt == \"jpg\" || $currFileExt == \"png\" || $currFileExt == \"gif\" || $currFileExt == \"jpeg\" || $currFileExt == \"bmp\") {\n $bg_images[] = $file;\n }\n }\n }\n }\n $curr_page = isset($_POST['curr_page']) ? intval($_POST['curr_page']) : 1;\n $max_bgs_per_page = 9;\n $offset = $curr_page * $max_bgs_per_page - $max_bgs_per_page;\n $slice = array_slice($bg_images, $offset, $max_bgs_per_page);\n echo json_encode($slice);\n }", "function bgimg($img){\n\treturn \"background: url('\".$img.\"'); background-size: cover; background-position: 0 50%;\";\n}", "public function setBackgroundImage($url);", "protected function searchBackgroundImage() {\n\t\t$resources = FALSE;\n\n\t\tif (isset($this->settings['mode']) && $this->settings['mode'] == 'directory' && trim($this->settings['directory']) !== '') {\n\t\t\t// Get background image from a directory\n\t\t\t$resources = $this->searchBackgroundImageInDirectory();\n\t\t}\n\n\t\tif (!isset($this->settings['mode']) || $this->settings['mode'] == 'rootline') {\n\t\t\t// Get background image from a rootline\n\t\t\t$resources = $this->searchBackgroundImageInRootline();\n\n\t\t}\n\n\t\tif ($resources == FALSE || !($resources instanceof Tx_Extbase_Persistence_ObjectStorage && $resources->current() instanceof Tx_Supersized_Domain_Model_Resource)) {\n\t\t\t$this->setDefaultBackgroundImage();\n\t\t}\n\n\t\treturn $resources;\n\t}", "function cucina_retina_backgrounds(){\n\t$is_retina = (bool) get_theme_mod( 'background_size' );\n\tif ( $is_retina ) {\n\t\t$image = get_background_image();\n\t\tif ( ! $image ){\n\t\t\treturn;\n\t\t}\n\n\t\t$metadata = getimagesize( $image );\n\t\tif ( ! is_array( $metadata ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$width = $metadata[0];\n\t\t$height = $metadata[1];\n\t\tprintf( '<style>body{ background-size: %dpx %dpx; }</style>', $width/2, $height/2 );\n\t}\n}", "function background_img($link){\n\t\t\t\techo \"<style> body{background: url(\". $link. \");\n\t\t\t\t\t\t\t\t\tbackground-repeat: no-repeat;\n\t\t\t\t\t\t\t\t\tbackground-size: cover;\n\t\t\t\t\t\t\t\t\t} </style>\";\n\t\t\t}", "private static function background($im, int $width, int $height) {\n $path = __DIR__ . DIRECTORY_SEPARATOR . 'assets' . DIRECTORY_SEPARATOR . 'bgs' . DIRECTORY_SEPARATOR;\n $dir = dir($path);\n\n $bgs = [];\n while (false !== ($file = $dir->read())) {\n if ('.' != $file[0] && substr($file, -4) == '.jpg') {\n $bgs[] = $path . $file;\n }\n }\n $dir->close();\n\n $gb = $bgs[array_rand($bgs)];\n\n list($w, $h) = @getimagesize($gb);\n // Resample\n $bgImage = @imagecreatefromjpeg($gb);\n @imagecopyresampled($im, $bgImage, 0, 0, 0, 0, $width, $height, $w, $h);\n }", "function bethel_get_default_background_args() {\n\treturn array ('default-color' => '#f5f5f5',\n\t\t\t\t 'default-image' => get_stylesheet_directory_uri().'/images/background.jpg',\n\t\t\t\t 'default-repeat' => 'repeat'\n\t );\n}", "private function set_background_color()\n {\n imagecolorallocate(\n $this->img,\n L_BACKGROUND_COLOR_R,\n L_BACKGROUND_COLOR_G,\n L_BACKGROUND_COLOR_B\n );\n }", "public function loadResources() {}", "function getBackground() {return $this->readBackground();}", "private function loadImages(): void\n {\n if (count($this->images) == 1) {\n $this->addMeta('image', $this->images[0]);\n\n return;\n }\n\n foreach ($this->images as $number => $url) {\n $this->addMeta(\"image{$number}\", $url);\n }\n }", "function _custom_header_background_just_in_time()\n {\n }", "function readBackground() {return $this->_background;}", "public function ajax_background_add()\n {\n }", "function PREFIX_responsive_background( $images = false ) {\n\tif ( ! $images ) {\n\t\treturn false;\n\t}\n\n\treturn htmlentities( json_encode( array( 'source' => $images ) ) );\n}", "function _custom_background_cb()\n {\n }", "protected function loadRegisteredSprites() {}", "function inject_css(){\n $group_id=bp_get_current_group_id();\n if(empty($group_id))\n return;\n $image=bgclite_get_image($group_id);\n \n if(empty($image)|| apply_filters('bp_group_customizer_iwilldo_it_myself',false))\n return;\n ?>\n <style type=\"text/css\">\n body.is-single-group{\n background:url(<?php echo $image;?>) center top fixed no-repeat,url(\"http://sill-web.de/gzc/wp-content/themes/yoo_master2_wp/css/navy_blue.png\") repeat;\n }\n </style> \n <?php\n\n }", "function wprt_background_css( $bg ) {\n\t// Define vars\n\t$css = '';\n\t$bg_style = $bg .'_style';\n\n\tif ( $bg_img = wprt_get_mod( $bg, null ) ) {\n\t\t$css .= 'background-image: url('. esc_url( $bg_img ). ');';\n\t}\n\n\tif ( $bg_style = wprt_get_mod( $bg_style ) ) {\n\t\tif ( 'fixed' == $bg_style ) {\n\t\t\t$css .= ' background-position: center center; background-repeat: no-repeat; background-attachment: fixed; background-size: cover;';\n\t\t} elseif ( 'fixed-top' == $bg_style ) {\n\t\t\t$css .= ' background-position: center top; background-repeat: no-repeat; background-attachment: fixed; background-size: cover;';\n\t\t} elseif ( 'fixed-bottom' == $bg_style ) {\n\t\t\t$css .= ' background-position: center bottom; background-repeat: no-repeat; background-attachment: fixed; background-size: cover;';\n\t\t} elseif ( 'cover' == $bg_style ) {\n\t\t\t$css .= ' background-repeat: no-repeat; background-position: center center; background-size: cover;';\n\t\t} elseif ( 'center-top' == $bg_style ) {\n\t\t\t$css .= ' background-repeat: no-repeat; background-position: center top;';\n\t\t} elseif ( 'repeat' == $bg_style ) {\n\t\t\t$css .= ' background-repeat: repeat;';\n\t\t} elseif ( 'repeat-x' == $bg_style ) {\n\t\t\t$css .= ' background-repeat: repeat-x;';\n\t\t} elseif ( 'repeat-y' == $bg_style ) {\n\t\t\t$css .= ' background-repeat: repeat-y;';\n\t\t}\n\t}\n\n\treturn esc_attr( $css );\n}", "protected function loadImage()\n {\n if (!is_resource($this->tmpImage)) {\n $create = $this->createFunctionName;\n $this->tmpImage = $create($this->filePath);\n imagesavealpha($this->tmpImage, true);\n }\n }", "function p2_body_class_background_image( $classes ) {\n\t$image = get_option( 'p2_background_image' );\n\n\tif ( empty( $image ) || 'none' == $image )\n\t\treturn $classes;\n\n\t$classes[] = esc_attr( 'p2-background-image-' . $image );\n\n\treturn $classes;\n}", "public function load_assets() {}", "protected function loadImages() {\r\n $this->images = new \\App\\Table\\ImagesTable(App::getInstance()->getDb());\r\n }", "public function getBackgroundImage()\r\n {\r\n $orientation = $this->getOrientation();\r\n $backgroundImage = '';\r\n /** @var $helperImage Mage_XmlConnect_Helper_Image */\r\n $helperImage = Mage::helper('xmlconnect/image');\r\n\r\n switch ($orientation) {\r\n case Mage_XmlConnect_Helper_Ipad::ORIENTATION_LANDSCAPE:\r\n $configPath = 'conf/body/backgroundIpadLandscapeImage';\r\n $imageUrlOrig = $this->getData($configPath);\r\n if ($imageUrlOrig) {\r\n $width = Mage_XmlConnect_Helper_Ipad::PREVIEW_LANDSCAPE_BACKGROUND_WIDTH;\r\n $height = Mage_XmlConnect_Helper_Ipad::PREVIEW_LANDSCAPE_BACKGROUND_HEIGHT;\r\n $backgroundImage = $helperImage->getCustomSizeImageUrl($imageUrlOrig, $width, $height);\r\n } else {\r\n $backgroundImage = $this->getPreviewImagesUrl('ipad/background_home_landscape.jpg');\r\n }\r\n break;\r\n case Mage_XmlConnect_Helper_Ipad::ORIENTATION_PORTRAIT:\r\n $configPath = 'conf/body/backgroundIpadPortraitImage';\r\n $imageUrlOrig = $this->getData($configPath);\r\n if ($imageUrlOrig) {\r\n $width = Mage_XmlConnect_Helper_Ipad::PREVIEW_PORTRAIT_BACKGROUND_WIDTH;\r\n $height = Mage_XmlConnect_Helper_Ipad::PREVIEW_PORTRAIT_BACKGROUND_HEIGHT;\r\n $backgroundImage = $helperImage->getCustomSizeImageUrl($imageUrlOrig, $width, $height);\r\n } else {\r\n $backgroundImage = $this->getPreviewImagesUrl('ipad/background_portrait.jpg');\r\n }\r\n break;\r\n default:\r\n Mage::throwException(\r\n Mage::helper('xmlconnect')->__('Wrong Ipad background image orientation has been specified: \"%s\".', $orientation)\r\n );\r\n break;\r\n }\r\n return $backgroundImage;\r\n }", "public function get_url_background_pion(){ return $this->_url_background_pion;}" ]
[ "0.7112916", "0.70450956", "0.66364455", "0.65244246", "0.6285328", "0.6258714", "0.6213515", "0.60697585", "0.6044611", "0.5965043", "0.5903245", "0.5897445", "0.5887693", "0.5850463", "0.5773511", "0.56341195", "0.56041133", "0.5596392", "0.55842763", "0.5557801", "0.5511458", "0.5480808", "0.5477229", "0.54727256", "0.5462086", "0.5457541", "0.5421294", "0.54196346", "0.5388688", "0.5384551" ]
0.7271041
0
/////////////////////////////////////////////////////////////////////// Load filter images
public static function loadFilterImages() { $dir = scandir('../img/effects'); $bg_images = array(); foreach ($dir as $file) { if ($file != "." && $file != "..") { if (file_exists("../img/effects/" . $file)) { $currFileExt = pathinfo("../img/effects/" . $file, 4); if ($currFileExt == "jpg" || $currFileExt == "png" || $currFileExt == "gif" || $currFileExt == "jpeg" || $currFileExt == "bmp") { $bg_images[] = $file; } } } } $curr_page = isset($_POST['curr_page']) ? intval($_POST['curr_page']) : 1; $max_bgs_per_page = 9; $offset = $curr_page * $max_bgs_per_page - $max_bgs_per_page; $slice = array_slice($bg_images, $offset, $max_bgs_per_page); echo json_encode($slice); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addFilter($_image, $filter, $param1, $param2, $param3)\n {\n \n //se o filtro estiver no array de filtros simples\n if(array_key_exists($filter,self::$_simpleFilters))\n {\n imagefilter($_image, self::$_simpleFilters[$filter]);\n return $_image;\n }\n //verifico se o filtro e do array de customizados\n elseif(in_array($filter,self::$_customFilters))\n {\n //verifico que tipo de filtro e esse\n switch ($filter)\n {\n case \"sharpen\":\n require_once \"Custom/Sharpen.php\"; //Efeito Sharpen\n //arumando as propriedades para que nao ocorra nehum tipo de erro durante a execucao\n $param1 = (($param1 > 200 || $param1 < 50)?50:$param1);\n $param2 = (($param2 > 1 || $param2 < 0.5)?0.5:$param2);\n $param3 = (($param3 > 5 || $param3 < 0)?0:$param3);\n\n //instanciando a classe do Sharpen\n $sharpen = new Sharpen;\n $_image = $sharpen->addSharpen($_image, $param1, $param2, $param3);\n return $_image;\n break;\n\n case \"noise\":\n require_once \"Custom/Noise.php\"; //Efeito Noise\n //instanciando a classe de noise\n $noise = new Noise;\n $_image = $noise->addNoise($_image);\n return $_image;\n break;\n\n case \"scatter\":\n require_once \"Custom/Scatter.php\"; //Efeito Scatter\n //instanciando a classe de scatter\n $scatter = new Scatter;\n $_image = $scatter->addScatter($_image);\n return $_image;\n break;\n\n case \"pixelate\":\n require_once \"Custom/Pixelate.php\"; //Efeito Pixelate\n //instanciando a classe de pixelate\n $pixelate = new Pixelate;\n $_image = $pixelate->addPixelate($_image);\n return $_image;\n break;\n\n case \"interlace\":\n require_once \"Custom/Interlace.php\"; //Efeito Interlace\n //instanciando a classe de interlace\n $interlace = new Interlace;\n $_image = $interlace->addInterlace($_image);\n return $_image;\n break;\n\n case \"screen\":\n require_once \"Custom/Screen.php\"; //Efeito Screen\n //instanciando a classe de Screen\n $screen = new Screen;\n $_image = $screen->addScreen($_image);\n return $_image;\n break;\n }\n }\n //se o filtro estiver no array de filtros simples\n elseif(array_key_exists($filter,self::$_advancedFilters))\n {\n //verifico se o filtro recebe mais de um parametro\n if($filter == 'colorize')\n {\n imagefilter($_image, self::$_advancedFilters[$filter], $param1, $param2, $param3);\n return $_image;\n }\n\n //caso contrario\n else\n {\n imagefilter($_image, self::$_advancedFilters[$filter], $param1);\n return $_image;\n }\n }\n //se nao existir entao sera lancada uma excessao\n else\n {\n throw new Exception(\"Filtro inexistente - Absent filter\");\n return false;\n }\n }", "function image_filter($im, $name){\n\tif($im && imagefilter($im, IMG_FILTER_NEGATE)){\n\t\timagepng($im, '../upload/filter/effect_invert/'. $name);\n\t}\n\tif($im && imagefilter($im, IMG_FILTER_GRAYSCALE)){\n\t\timagepng($im, '../upload/filter/effect_grayscale/'. $name);\n\t}\n\tif($im && imagefilter($im, IMG_FILTER_BRIGHTNESS, 20)){\n\t\timagepng($im, '../upload/filter/effect_brightness/'. $name);\n\t}\n\tif($im && imagefilter($im, IMG_FILTER_CONTRAST, 20)){\n\t\timagepng($im, '../upload/filter/effect_contrast/'. $name);\n\t}\n\t\n\t\t\n\tif($im && imagefilter($im, IMG_FILTER_COLORIZE, 255, 0, 0)){\n\t\timagepng($im, '../upload/filter/effect_color_red/'. $name);\n\t}\n\t\n\tif($im && imagefilter($im, IMG_FILTER_COLORIZE, 0, 255, 0)){\n\t\timagepng($im, '../upload/filter/effect_color_green/'. $name);\n\t}\n\t\n\tif($im && imagefilter($im, IMG_FILTER_COLORIZE, 0, 0, 255)){\n\t\timagepng($im, '../upload/filter/effect_color_blue/'. $name);\n\t}\n\t\n\t\n\t\n\t//if($im && imagefilter($im, IMG_FILTER_EDGEDETECT, 20)){\n\t//\timagepng($im, '../upload/filter/effect_brightness/'. $name);\n\t//}\n\t\n\tif($im && imagefilter($im, IMG_FILTER_EMBOSS)){\n\t\timagepng($im, '../upload/filter/effect_emboss/'. $name);\n\t}\n\t\n\tif($im && imagefilter($im, IMG_FILTER_GAUSSIAN_BLUR)){\n\t\timagepng($im, '../upload/filter/effect_gaussian_blue/'. $name);\n\t}\n\t\n\t//if($im && imagefilter($im, IMG_FILTER_SELECTIVE_BLUR, 20)){\n\t//\timagepng($im, '../upload/filter/effect_brightness/'. $name);\n\t//}\n\n\tif($im && imagefilter($im, IMG_FILTER_MEAN_REMOVAL, 20)){\n\t\timagepng($im, '../upload/filter/effect_mean_remove/'. $name);\n\t}\n\n\tif($im && imagefilter($im, IMG_FILTER_SMOOTH, 1)){\n\t\timagepng($im, '../upload/filter/effect_smooth/'. $name);\n\t}\n\n\tif($im && imagefilter($im, IMG_FILTER_PIXELATE, 3, TRUE)){\n\t\timagepng($im, '../upload/filter/effect_brightness/'. $name);\n\t}\n}", "private function loadFilters()\n {\n require __DIR__.'/filters.php';\n }", "private function readImages()\r\n {\r\n if(file_exists($this->location) && is_readable($this->location))\r\n {\r\n $images = array();\r\n\r\n foreach(array_diff(scandir($this->location), array('.', '..')) as $file)\r\n {\r\n if($this->isValidImageType($file))\r\n {\r\n $type = strtolower(pathinfo($file, PATHINFO_EXTENSION));\r\n\r\n if(!in_array($type, $this->extensions))\r\n {\r\n $this->extensions[] = $type;\r\n }\r\n\r\n $images[] = new Image($this->location . '/' . $file);\r\n }\r\n }\r\n\r\n usort($images, function($a, $b) {\r\n return $a->getWidth() > $b->getWidth();\r\n });\r\n\r\n $this->images = $images;\r\n }\r\n }", "function filter(){\r\n\t$images = new ImageCollection();\r\n\t\r\n\tif( isset($_GET['city']) || isset($_GET['country']) ) {\r\n\t\t$city = 0;\t\t\r\n\t\tif( isset($_GET['city']) && !empty($_GET['city']) ) {\r\n\t\t\t$city = $_GET['city'];\r\n\t\t}\r\n\t\t$country = \"ZZZ\";\r\n\t\tif( isset($_GET['country']) && !empty($_GET['country']) ) {\r\n\t\t\t$country = $_GET['country'];\r\n\t\t}\r\n\t\t\r\n\t\t$images->loadCollection();\r\n\t\t\t\t\r\n\t\tif($city > 0 && $country == \"ZZZ\") { //if city set\r\n\t\t\t$images->loadCollectionByCity($city);\r\n\t\t}\r\n\t\telseif($city == 0 && $country != \"ZZZ\") { //if country set\r\n\t\t\t$images->loadCollectionByCountry($country);\r\n\t\t}\r\n\t\telseif($city > 0 && $country != \"ZZZ\") { //if country and city set\r\n\t\t\t$images->loadCollectionByCityAndCountry($city, $country);\r\n\t\t}\r\n\t\t\r\n\t\toutputImages($images);\r\n\t}\r\n\telseif( isset($_GET['search']) ) {\r\n\t\t$search = $_GET['search'];\r\n\t\t$images->loadCollectionBySearch($search);\r\n\t\t\t\t\r\n\t\toutputImages($images);\r\n\t}\r\n\telse {\r\n\t\t$images->loadCollection();\r\n\t\t\r\n\t\toutputImages($images);\r\n\t}\r\n}", "function kses_init_filters()\n {\n }", "protected function loadImages() {\r\n $this->images = new \\App\\Table\\ImagesTable(App::getInstance()->getDb());\r\n }", "private function filters() {\n\n\n\t}", "public function filterLoad($asset) {}", "abstract public function prepareFilters();", "protected function combineImages() {}", "function loadFossils($data){\n\n \t//using the data from the filter we create the where statement for querying the database\n \t$where = [];\n \t$i = 0;\n \t\n \tif ($data['genus'] != \"-1\"){\n \t\t$where[$i] = \"genus = '\" . $data['genus'].\"'\";\n\t\t\t$i += 1;\n \t}\n\n /*\n \t$where[$i] = \"age_min = \" . $data['age_min'];\n $i += 1;\n\n $where[$i] = \"age_max = \" . $data['age_max'];\n $i += 1;*/\n\n $where[$i] = $this->age_criteria($data[\"age_min\"], $data[\"age_max\"]);\n $i += 1;\n \n\n \tif ($data['collector'] != \"-1\"){\n \t\t$where[$i] = \"collector = '\" . $data['collector'].\"'\";\n \t\t$i += 1;\n \t}\n\n $where_string = \"\";\n\n if ($i != 0)\n {\n \tfor ($j=0; $j<$i-1; $j++)\n \t{\n \t\t\t$where_string .= $where[$j] . \" AND \";\n \t}\n \t\n $where_string .= $where[$i-1]; \n }\n else {\n $where_string = \" 1\";\n }\n\n $query=NULL;\n\n \t//Now we look at the projects_master table to give us the data_table foreach project\n if($data['project']==\"-1\"){\n $query = $this->db->query('SELECT id, name, image, blurb, data_table, image_table FROM projects_master');\n }\n\n \t$return = array();\n \n \tif($query->num_rows() > 0) {\n \t\tforeach($query->result_array() as $row)\n \t\t{\n \t\t\t//we retrieve the data from each fossil from each project\n \t\t\t$query2 = $this->db->query('SELECT data_id, image_id, genus, species, age, country, place, collector, lat, lng FROM ' . $row[\"data_table\"].' WHERE '.$where_string.' and lat!=\"0\" and lng!=\"0\"');\n\n //return $query2->result_array(); \n $image_table = $row['image_table'];\n\t\t\t\t//if($query2->num_rows>0){\n\t\t\t //$return[] = $query2->result_array();\n\t\t\t\t//}\n foreach ($query2->result_array() as $row)\n {\n //$temp = $this->geocode($row['country'].' '.$row['place']);\n \n /*if ($temp != false) {\n $row['lattitude'] = $temp[0];\n $row['longitude'] = $temp[1];\n \n }*/\n\n $query3 = $this->db->query(\"SELECT image_url FROM \".$image_table.\" WHERE image_id=\".$row[\"image_id\"]);\n\n \n if($query3->num_rows() > 0) {\n foreach ($query3->result() as $u) {\n $row['url'] = $u->image_url;\n }\n }\n //return $row;\n if ($row['lat'] != \"\") {\n $return[] = $row; \n }\n }\t\t\n \t\t}\n //return the data\n return $return;\n \t}\n }", "public function prepareLocalImages($images) {\n\t\t$requestParams = $this->getRequest()->getParams();\n $filter_fields = array('filename','size', 'status'); \n if( !empty($requestParams['order_by']) && in_array($requestParams['order_by'], $filter_fields)) {\n $order_by = $requestParams['order_by'];\n if(isset($requestParams['dir']) && $requestParams['dir']=='desc') { \n $this->order_dir = 'desc';\n }else {\n $this->order_dir = 'asc';\n }\n } else {\n $order_by = '' ;\n }\n $this->order_by = $order_by;\n \n if($order_by == 'size') { \n usort($images, array(\"Imagerecycle_Imagerecycle_Block_Images\",\"cmpSize\") ); \n }else if($order_by == 'status') {\n usort($images, array(\"Imagerecycle_Imagerecycle_Block_Images\",\"cmpStatus\")); \n }else if($order_by == 'filename' && $this->order_dir == 'desc') {\n usort($images, array(\"Imagerecycle_Imagerecycle_Block_Images\",\"cmpNameDesc\")); \n } \n \n $start = ($this->page - 1) * $this->limit;\n $result = array_slice($images, $start, $this->limit);\n \n return $result;\n }", "private function loadImages(): void\n {\n if (count($this->images) == 1) {\n $this->addMeta('image', $this->images[0]);\n\n return;\n }\n\n foreach ($this->images as $number => $url) {\n $this->addMeta(\"image{$number}\", $url);\n }\n }", "function loadImage()\n\t{\n\t\tswitch ($this->type) {\n\t\t\tcase 1:\n\t\t\t\t$this->ImageStream = @imagecreatefromgif($this->sFileLocation);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t$this->ImageStream = @imagecreatefromjpeg($this->sFileLocation);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t$this->ImageStream = @imagecreatefrompng($this->sFileLocation);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$this->printError('invalid imagetype');\n\t\t}\n\n\t\tif (!$this->ImageStream) {\n\t\t\t$this->printError('image not loaded');\n\t\t}\n\t}", "function add_filters()\n {\n }", "function applyFilter($filter)\n {\n if (count($this->error) == 0)\n {\n // split up filter name and filter configuration\n $filterInfos = explode('-',$filter);\n eval(\"\\$temp = new \".$filterInfos[0].\" (\\$this->imgSrc,\\$filterInfos);\");\n if ($temp->dest !== false)\n {\n // filter was applied\n // $filterUsed[] = $filterItem['value'];\n $this->imgSrc = $temp->dest;\n return true;\n }\n else\n {\n // filter was not applied, save filter errors\n foreach($temp->error as $error)\n {\n $this->error[] = $filterInfos[0].': '.$error;\n }\n return false;\n }\n }\n }", "public function setImagesets()\n {\n $this->_imagesets = [];\n try {\n $pnmain = $this->_qobject->getPNMainTable();\n $type = $this->_image->getImageParams('type');\n if ($type == 'rgb') {\n $model = $this->_image->getImageParams('R_model');\n } else {\n $model = $this->_image->getImageParams('in_model');\n }\n\n if (!$model || $model == null) {\n return $this->mylogger->logMessage(\"Model for the parameter 'run_id' is not defined.\", $this, 'warning',\n false);\n }\n $runs = $pnmain->{$model}()\n ->where('found', 'y')\n ->distinct('run_id')\n ->pluck('run_id')\n ->toArray();\n\n if (!$runs || $runs == null || empty($runs)) {\n return $this->mylogger->logMessage(\"No results.\", $this, 'warning', false);\n }\n\n// $old_base_file_names = array_column($this->_oldresults, 'OutImage');\n\n foreach ($runs as $run_id) {\n $run_id = ($run_id == null || !$run_id) ? \"-1\" : $run_id;\n\n $base_file_name = $this->pngName($this->_qobject->getIdPNMain(),\n $this->_image->getImageParams('name_out'), $run_id);\n\n $full_file_name = MyFunctions::pathslash($this->_getOutDir()) . $base_file_name;\n\n $outimages = $this->_setOutimages($full_file_name);\n if (empty($outimages)) {\n continue;\n }\n\n $metadata = [\n 'type' => $type,\n 'run_id' => $run_id,\n 'OutImage' => $base_file_name,\n \"rgb_cube\" => ($type == 'rgb') ? $this->getRGBcubeName($this->_qobject->getIdPNMain(),\n $this->_image->getImageParams('name_out'),\n $run_id) : null,\n \"out_images\" => $outimages,\n ];\n\n\n// if (in_array($base_file_name, $old_base_file_names)) {\n// continue;\n// }\n\n $rgb_components = $this->_getRGBComponents($pnmain, $run_id);\n\n if ($rgb_components) {\n $this->_imagesets[$run_id] = array_merge($metadata, $rgb_components);\n } else {\n $this->mylogger->logMessage(\"Missing fits image(s).\", $this, 'warning', false);\n }\n }\n } catch (\\Exception $e) {\n $this->_imagesets = [];\n return $this->mylogger->logMessage(\"Problem with setting imagesets: \" . $e . \".\", $this, 'warning', false);\n }\n if (empty($this->_imagesets)) {\n return false;\n }\n return true;\n\n }", "private function parse_images($category) {\n\t\t$image_list = array();\n\t\t$relpath = \"images/$category\";\n\n\t\tforeach (glob($this->root . \"/$relpath/*\") as $image) {\n\t\t\tif (preg_match(self::IMAGE_FILTER, $image)) {\n\t\t\t\t// We got a valid image, now lets make it into a relative path.\n\t\t\t\tpreg_match(\"/(projects\\/\" . $this->id .\"\\/images.+)/\", $image, $matches);\n\t\t\t\tarray_push($image_list, $matches[1]);\n\t\t\t}\n\t\t}\n\n\t\treturn $image_list;\n\t}", "function get_images() \t{\n \t\treturn $this->getImages();\n \t}", "function applyFilter( &$resource, $filter_name='', $options=array())\n {\n if (Image_Filter::loadFilter($filter_name)){\n $class = 'Image_Filter_'.$filter_name;\n call_user_func(array($class,'applyFilter'), $resource, $options);\n return true;\n }\n return false;\n }", "function applyFilterOnResource( &$resource, $filter_name='', $options=array())\n {\n if (Image_Filter::loadFilter($filter_name)){\n $class = 'Image_Filter_'.$filter_name;\n call_user_func(array($class,'applyFilterOnResource'), $resource, $options);\n }\n }", "public function getImageArray();", "protected static function filtes()\n {\n /*\n * The filters fetches are transported\n * to router Bus calls\n **/\n }", "function getImageFiles() {\n $path = dirname(__FILE__) . \"/img\";\n $images = array();\n $folder = opendir($path);\n while (false !== ($filename = readdir($folder))) {\n if ($filename != \"ajax-loader.gif\") {\n $parts = serendipity_parseFileName($filename);\n $img_data = serendipity_getimagesize($path . '/' . $filename);\n if (!isset($img_data['noimage'])) {\n // Curly braces are just a different syntax of associative array assignment\n $images[$filename] = array('fname'=>$filename, 'width'=>$img_data[0], 'height'=>$img_data[1]);\n }\n }\n }\n closedir($folder);\n ksort($images);\n return $images;\n }", "function loadImages($user_id = 0){\n\t\tglobal $tsUser;\n\t\t//\n\t\tif(empty($user_id)) $user_id = $tsUser->uid;\n\t\t$images = $this->fetch_array($this->select(\"u_fotos\",\"*\",\"f_user = $user_id\",\"\",\"\"));\n\t\t//\n\t\treturn $images;\n\t}", "public static function data_images() {\n\t\tif ( empty( self::$images ) ) {\n\t\t\tself::$images = glob( dirname( dirname( __FILE__ ) ) . '/images/*' );\n\t\t}\n\n\t\treturn self::$images;\n\t}", "public static function FindUnusedImages()\n {\n }", "abstract protected function getFilters();", "protected function getLiipImagine_Filter_ManagerService()\n {\n $this->services['liip_imagine.filter.manager'] = $instance = new \\Liip\\ImagineBundle\\Imagine\\Filter\\FilterManager($this->get('liip_imagine.filter.configuration'), $this->get('liip_imagine'), $this->get('liip_imagine.binary.mime_type_guesser'));\n\n $instance->addLoader('relative_resize', $this->get('liip_imagine.filter.loader.relative_resize'));\n $instance->addLoader('resize', $this->get('liip_imagine.filter.loader.resize'));\n $instance->addLoader('thumbnail', $this->get('liip_imagine.filter.loader.thumbnail'));\n $instance->addLoader('crop', $this->get('liip_imagine.filter.loader.crop'));\n $instance->addLoader('grayscale', $this->get('liip_imagine.filter.loader.grayscale'));\n $instance->addLoader('paste', $this->get('liip_imagine.filter.loader.paste'));\n $instance->addLoader('watermark', $this->get('liip_imagine.filter.loader.watermark'));\n $instance->addLoader('background', $this->get('liip_imagine.filter.loader.background'));\n $instance->addLoader('strip', $this->get('liip_imagine.filter.loader.strip'));\n $instance->addLoader('scale', $this->get('liip_imagine.filter.loader.scale'));\n $instance->addLoader('upscale', $this->get('liip_imagine.filter.loader.upscale'));\n $instance->addLoader('downscale', $this->get('liip_imagine.filter.loader.downscale'));\n $instance->addLoader('auto_rotate', $this->get('liip_imagine.filter.loader.auto_rotate'));\n $instance->addLoader('rotate', $this->get('liip_imagine.filter.loader.rotate'));\n $instance->addLoader('flip', $this->get('liip_imagine.filter.loader.flip'));\n $instance->addLoader('interlace', $this->get('liip_imagine.filter.loader.interlace'));\n $instance->addPostProcessor('jpegoptim', $this->get('liip_imagine.filter.post_processor.jpegoptim'));\n $instance->addPostProcessor('optipng', $this->get('liip_imagine.filter.post_processor.optipng'));\n $instance->addPostProcessor('pngquant', $this->get('liip_imagine.filter.post_processor.pngquant'));\n $instance->addPostProcessor('mozjpeg', $this->get('liip_imagine.filter.post_processor.mozjpeg'));\n\n return $instance;\n }" ]
[ "0.6393928", "0.62254095", "0.6221049", "0.59474915", "0.5925864", "0.58376104", "0.58333474", "0.57603294", "0.5747043", "0.5700138", "0.56835365", "0.5663423", "0.5642942", "0.5636832", "0.5601619", "0.55926204", "0.5569385", "0.55532074", "0.5515226", "0.5499478", "0.5487089", "0.54662985", "0.54470253", "0.54462236", "0.54302895", "0.5421949", "0.5419304", "0.54162043", "0.5401731", "0.53644925" ]
0.7335104
0
/////////////////////////////////////////////////////////////////////// get number of pages with effect images
public static function getEffectsNumPages() { $dir = scandir('../img/effects'); $bg_images = array(); foreach ($dir as $file) { if ($file != "." && $file != "..") { if (file_exists("../img/bgs/" . $file)) { $currFileExt = pathinfo("../img/bgs/" . $file, 4); if ($currFileExt == "jpg" || $currFileExt == "png" || $currFileExt == "gif" || $currFileExt == "jpeg" || $currFileExt == "bmp") { $bg_images[] = $file; } } } } $max_bgs_per_page = 9; echo ceil(count($bg_images) / $max_bgs_per_page) < 1 ? 1 : ceil(count($bg_images) / $max_bgs_per_page); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_page_count() {\n global $connexion, $config;\n $nb_images = $connexion->query('SELECT COUNT(id) FROM image')->fetchColumn();\n $nb_pages = ceil($nb_images / $config['nb_pictures_page']);\n return $nb_pages;\n}", "public function numOfPages(): int;", "public function getPageNumber();", "public function getPageNumber();", "public function getPageNumbers();", "public function getPageCount() \r\n { \r\n }", "function get_object_count()\r\n {\r\n return $this->get_browser()->count_photo_gallery_publications($this->get_condition());\r\n }", "private function _count_page()\n {\n $count_career = $this->core_model->count('career');\n return ceil($count_career / 4);\n }", "public function getPagesCount()\n {\n \treturn count($this->_pages);\n }", "function getPageCount() {\n return $this->helper->getPageCount();\n }", "function getPageCount() {\n return $this->helper->getPageCount();\n }", "private function getNumPages() {\n //display all in one page\n if (($this->limit < 1) || ($this->limit > $this->itemscount)) {\n $this->numpages = 1;\n } else {\n //Calculate rest numbers from dividing operation so we can add one\n //more page for this items\n $restItemsNum = $this->itemscount % $this->limit;\n //if rest items > 0 then add one more page else just divide items\n //by limit\n $restItemsNum > 0 ? $this->numpages = intval($this->itemscount / $this->limit) + 1 : $this->numpages = intval($this->itemscount / $this->limit);\n }\n }", "public function numPages() {\n $links = $this->_document->links('self');\n return $links[0]->totalpages;\n }", "public function count_homepage_photos(){\n $sql=\"SELECT COUNT(*) FROM photos WHERE img_navigacija_id=2\";\n $result=self::$connect->query($sql);\n while($row=$result->fetch(PDO::FETCH_NUM)){\n return $row[0];\n }\n }", "public function getNbPages(): int;", "public function getPageNumber() {}", "public function getPageNumber() {}", "public function getNumberOfImages()\n {\n return $this->resource->getNumberImages();\n }", "function getNumPages(){\n\t\treturn $this->numPages;\n\t}", "function how_many_photos($data)\r\n\t{\r\n\t\tglobal $db;\r\n\t\t$query = 'SELECT spotlight_post_id FROM gv_spotlight_post_image WHERE (spotlight_image_block = 0) AND spotlight_post_id = ' . $data;\r\n\t\t$result = mysql_query($query, $db) or die(mysql_error($db));\r\n\t\t\r\n\t\tif(mysql_num_rows($result) > 0)\r\n\t\t{\r\n\t\t\t$number_of_images = mysql_num_rows($result);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t\t$number_of_images = 0;\r\n\t\t}\r\n\t\treturn $number_of_images;\r\n\t}", "public function get_nb_pictures(){\n $return = array();\n $sql = sprintf(\"SELECT count(*) FROM miki_album_picture WHERE id_album = %d\",\n mysql_real_escape_string($this->id));\n $result = mysql_query($sql);\n $row = mysql_fetch_array($result);\n return $row[0];\n }", "function get_page_count($conditions_array=array())\n\t{\n\t\t$this->db->where($conditions_array);\n\t\treturn $this->db->count_all_results('red_diy_pages');\n\t}", "public function getNbPages(){\n $db = $this -> init();\n \n $selectCount = $db ->query('Select COUNT(*) as nb_posts from posts') or die(print_r($db->errorInfo()));\n $count = $selectCount->fetch();\n return $count['nb_posts']/5;\n }", "public function pageCount() {\r\n\t\tif ($this->__pageItems > 0) {\r\n\t\t\t$intReturn = ceil(count($this->collection) / $this->__pageItems);\r\n\t\t} else {\r\n\t\t\t$intReturn = 1;\r\n\t\t}\r\n\r\n\t\treturn $intReturn;\r\n\t}", "public function count()\n {\n return $this->getImages()->count();\n }", "public function numOfPages(): int\n {\n return count($this->repository);\n }", "function get_gallery_count()\n {\n $settings = C_NextGen_Settings::get_instance();\n $count = $settings->get('gallery_count', FALSE);\n if (!$count) {\n $count = M_NextGen_Admin::update_gallery_count_setting();\n }\n return $count;\n }", "public function count()\n\t{\n\t\treturn count($this->_pages);\n\t}", "public function number_of_pages(){\n $cantidad= $this->total_amount / $this->amount_per_page;\n if(is_int($cantidad)){\n return $cantidad;\n }\n else{\n $cantidad_int= intval($cantidad);\n if($cantidad_int > $cantidad){\n return $cantidad_int;\n }\n else{\n return $cantidad_int + 1;\n }\n }\n }", "function getnumpages($tid)\n{\n $nops = mysql_fetch_array(mysql_query(\"SELECT COUNT(*) FROM ibwf_posts WHERE tid='\".$tid.\"'\"));\n $nops = $nops[0]+1; //where did the 1 come from? the topic text, duh!\n $nopg = ceil($nops/5); //5 is the posts to show in each page\n return $nopg;\n}" ]
[ "0.7511876", "0.6687339", "0.65935946", "0.65935946", "0.6548419", "0.6490648", "0.6467559", "0.63953197", "0.6363755", "0.6362878", "0.6362878", "0.6351505", "0.63401836", "0.63002276", "0.62988055", "0.62848926", "0.62848926", "0.6284278", "0.62774885", "0.6248097", "0.6238196", "0.62315685", "0.6229033", "0.62167764", "0.621123", "0.61987084", "0.61979866", "0.6194058", "0.6192335", "0.6190467" ]
0.8249625
0
///////////////////////////////////////////////////////////////////////// Get dress type by product id
public static function GetDressTypeByID($productID = null) { $category_dress_type_id = Db_Actions::DbSelectRow("SELECT category_dress_type_id FROM cscart_products WHERE product_id=$productID"); if (!isset($category_dress_type_id->empty_result)) { return $category_dress_type_id->category_dress_type_id; } return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getProductType();", "public function getProductType()\n {\n }", "public function getProduct_type () {\n\t$preValue = $this->preGetValue(\"product_type\"); \n\tif($preValue !== null && !\\Pimcore::inAdmin()) { \n\t\treturn $preValue;\n\t}\n\t$data = $this->product_type;\n\treturn $data;\n}", "function project_type($id)\n{\n\t$name=mysql_fetch_array(mysql_query(\"select type_name from manage_property_type where ptype='$id'\"));\n\treturn $name['type_name'];\n\t}", "public function getProductTypeInfo($ptId)\n\t{\n\t\t$sql = \"SELECT * FROM `#__storefront_product_types` WHERE `ptId` = \" . $this->_db->quote($ptId);\n\n\t\t$this->_db->setQuery($sql);\n\t\t$res = $this->_db->loadAssoc();\n\t\treturn $res;\n\t}", "public function getType()\n {\n \n $tipos = \n\n $TypeOfProduct = TypeOfProduct::find($this->type_id); \n\n return $TypeOfProduct->description;\n }", "public function show($id)\n {\n return ProductType::findOrFail($id);\n }", "public static function get_product_type($id)\n {\n if (!$product = wc_get_product($id)) {\n return false;\n }\n return $product->product_type;\n }", "public static function getPurchaseable(string $type, mixed $id) : mixed\n {\n return Product::findOrFail($id);\n }", "private function selectItemType($id)\n {\n $tables = array(\"desktops\" => \"DS\", \"laptops\" => \"LP\"); //this array stores the names of the tables in database\n\n $prefix = substr($id, 0, 2); //all of the product types have unique prefix\n\n return array_search($prefix, $tables);\n }", "public static function getProductTypeId()\n\t{\n\t\t$input = JFactory::getApplication()->input;\n\n\t\tswitch ($input->getCmd('view'))\n\t\t{\n\t\t\tcase 'product':\n\t\t\t\t$model = new GazebosModelProduct;\n\t\t\t\t$id = $model->getItem()->type_id;\n\t\t\t\tbreak;\n\t\t\tcase 'producttype':\n\t\t\t\t$id = $input->getInt('id');\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn $id;\n\t}", "public function show($productType_id, $id)\n {\n //\n }", "public static function getProductType($unique_id,$merchant_id)\n {\n $query = \"SELECT `type` FROM `jet_product` WHERE `merchant_id`='\".$merchant_id.\"' and `variant_id`='\".$unique_id.\"' LIMIT 0,1\";\n $data = self::sqlRecords($query,'one','select');\n \n if(isset($data['type']) && !empty($data['type'])) {\n return $data['type'];\n } else {\n return false;\n }\n }", "function get_sample_type_info($sample_type_id, $term) { \r\n\t\tglobal $db;\r\n\t\t$query = \"SELECT * from sample_types WHERE sample_type_id='\".$sample_type_id.\"'\";\r\n\t\t$result = $db->query($query) or die($db->error);\r\n\t\t$row = $result->fetch_array();\r\n\t\treturn $row[$term];\r\n\t}", "public function getProductType()\n {\n return Zend_Json::encode($this->escapeHtml($this->getProduct()->getTypeId()));\n }", "private function getType($id) {\n \n $this->loadTypes();\n \n foreach ($this->types as $type) {\n \n if ($type->getId() === $id) return $type;\n }\n \n return NULL;\n }", "private function getType($product)\n { \n $productTypes = $product->types;\n\n if(!$productTypes->isEmpty())\n {\n $typeName=NULL;\n\n foreach ($productTypes as $productType) {\n\n $typeName .= $productType->type_name . \"+\";\n }\n\n return trim($typeName,\"+\");\n\n }\n else\n {\n return NULL;\n }\n }", "public function getTargetType($type) {\n $retObj = array();\n switch ($type) {\n case 'Brand':\n $retObj[] = new ProductBrand($this->targetData);\n $retObj[] = new ProductBrand();\n \n return $retObj;\n break;\n case 'Condition':\n $retObj[] = new ProductCanonicalCondition($this->targetData);\n $retObj[] = new ProductCanonicalCondition();\n \n return $retObj;\n break;\n case 'Category':\n $retObj[] = new ProductBiddingCategory('BIDDING_CATEGORY_L1', $this->targetData);\n $retObj[] = new ProductBiddingCategory('BIDDING_CATEGORY_L1');\n \n return $retObj;\n break;\n case 'Channel':\n $retObj[] = new ProductChannel($this->targetData);\n $retObj[] = new ProductChannel();\n \n return $retObj;\n break;\n case 'Item ID':\n $retObj[] = new ProductOfferId($this->targetData);\n $retObj[] = new ProductOfferId();\n \n return $retObj;\n break;\n case 'Product type':\n $retObj[] = new ProductType('PRODUCT_TYPE_L1', $this->targetData);\n $retObj[] = new ProductType('PRODUCT_TYPE_L1');\n \n return $retObj;\n break;\n case 'Channel exclusivity':\n $retObj[] = new ProductChannelExclusivity($this->targetData);\n $retObj[] = new ProductChannelExclusivity();\n \n return $retObj;\n break;\n case 'CUSTOM_ATTRIBUTE_0':\n $retObj[] = new ProductCustomAttribute($type, $this->targetData);\n $retObj[] = new ProductCustomAttribute($type);\n $retObj[] = new ProductCustomAttribute();\n \n return $retObj;\n break;\n case 'CUSTOM_ATTRIBUTE_1':\n $retObj[] = new ProductCustomAttribute($type, $this->targetData);\n $retObj[] = new ProductCustomAttribute($type);\n $retObj[] = new ProductCustomAttribute();\n \n return $retObj;\n break;\n case 'CUSTOM_ATTRIBUTE_2':\n $retObj[] = new ProductCustomAttribute($type, $this->targetData);\n $retObj[] = new ProductCustomAttribute($type);\n $retObj[] = new ProductCustomAttribute();\n \n return $retObj;\n break;\n case 'CUSTOM_ATTRIBUTE_3':\n $retObj[] = new ProductCustomAttribute($type, $this->targetData);\n $retObj[] = new ProductCustomAttribute($type);\n $retObj[] = new ProductCustomAttribute();\n \n return $retObj;\n break;\n case 'CUSTOM_ATTRIBUTE_4':\n $retObj[] = new ProductCustomAttribute($type, $this->targetData);\n $retObj[] = new ProductCustomAttribute($type);\n $retObj[] = new ProductCustomAttribute();\n \n return $retObj;\n break;\n \n default:\n break;\n }\n }", "function getProductTypes(){\n\t\t$id = $_GET['id'];\n\t\t$elem_id = $_GET['elem_id'];\n\t\t$wc = $this->getWc($id);\n\t\t$types = array();\n\t\tforeach ($wc as $k=>$v){\n\t\t\t$types[$v['ptid']] = true;\n\t\t}\n\t\tif ($elem_id){\n\t\t\t$elem = $this->getWc($id, $elem_id);\n\t\t\tunset($types[$elem['ptid']]);\n\t\t}\n\t\t$sql = \"SELECT id, name FROM product_types WHERE visible > 0 AND id NOT IN ('\".implode(\"', '\", array_keys($types)).\"')\";\n\t\t$rows = sql_getRows($sql, true);\n\t\treturn $rows;\n\t}", "public static function getProductTypeForProduct(int $productId): int\n {\n if ($productId === 0) {\n return 0;\n }\n\n if (isset(self::$productTypeForProduct[$productId])) {\n return self::$productTypeForProduct[$productId];\n }\n\n self::$productTypeForProduct[$productId] = (int)BackendUtility::getRecord(\n ProductRepository::TABLE_NAME,\n $productId,\n 'product_type'\n )['product_type'] ?? 0;\n\n return self::$productTypeForProduct[$productId];\n }", "public function find($id)\n {\n\n $sql = \"SELECT product.*, brand.name AS brand_name, type.name AS type_name, category.name AS category_name\n FROM product\n JOIN brand ON product.brand_id = brand.id \n JOIN type ON product.type_id = type.id \n JOIN category ON product.category_id = category.id \n WHERE product.id = $id \";\n\n $pdo = Database::getPDO();\n $stmt = $pdo->query($sql);\n\n $product = $stmt->fetchObject(self::class);\n return $product;\n }", "public function getPriceTypes() {\n\t\t$db = JFactory::getDBO();\n\n\t\t// Create a new query object.\n\t\t$query = $db->getQuery(true);\n\n\t\t$query->select($db->quoteName(array('a.id', 'a.name')));\n\t\t$query->from($db->quoteName('#__gtpihpssurvey_ref_price_types', 'a'));\n\t\t\n\t\t//echo nl2br(str_replace('#__','pihps_',$query));\n\t\t$db->setQuery($query);\n\t\treturn $db->loadObjectList('id');\n\t}", "public function get_type()\n {\n return self::$_id;\n }", "public function get_equipment_type();", "public function getTypeSlugByID ($id_type = '') {\n $this->connection->where('id_type', $id_type);\n $result = $this->connection->select('slug', 'types');\n\n if ($result && $result->num_rows > 0) {\n while ($row = $result->fetch_assoc()) {\n return $row['slug'];\n }\n }\n else {\n return NULL;\n }\n }", "public function show($id)\n {\n $prodCat = r_product_type::with('rProductType')\n ->get();\n\n return new JsonResource($prodCat->where('PRODT_ID',$id));\n }", "public function getProductType() {\n return $this->item->getProductType();\n }", "public function getTypes(){\n\t\t$stmt = $this->db->query(\"SELECT * FROM products_types\");\n\t\treturn $stmt->fetchAll(PDO::FETCH_OBJ);\n\t}", "public function get_type();", "public function productType()\n {\n return $this->belongsTo(\\App\\Models\\ProductType::class, \"product_type_id\", \"id\");\n }" ]
[ "0.7453759", "0.69906604", "0.67866784", "0.65888214", "0.6587682", "0.6511979", "0.6503158", "0.6491178", "0.64238894", "0.6414557", "0.64011276", "0.63666785", "0.63503695", "0.6309984", "0.63068414", "0.62736684", "0.62623", "0.622652", "0.6197643", "0.61783797", "0.615799", "0.61474705", "0.6144282", "0.6142261", "0.6128539", "0.609251", "0.6067895", "0.60492957", "0.6032308", "0.6032277" ]
0.75321233
0
//////////////////////////////////////////////////////// Get product color variations
public static function getProductColorVariations($productID) { Db_Actions::DbSelect("SELECT * FROM cscart_product_color_variations WHERE product_id=$productID ORDER BY id DESC"); $data = Db_Actions::DbGetResults(); if (!isset($data->empty_result)) { $counter = 1; $product_data = array(); foreach ($data as $product) { if ($counter <= 3) { $product_data[] = array('product_id' => $product->color_product_id, 'product_name' => self::getProductName($product->color_product_id), 'product_image_url' => $root_url . self::getProductImage($product->color_product_id), 'product_price' => self::getProductPrice($product->color_product_id), 'category_dress_type_id' => self::getCategoryDressTypeID($product->color_product_id), 'subcategory_dress_type_id' => self::getSubCategoryDressTypeID($product->color_product_id), 'color' => $product->color_variation ); } $counter++; } foreach ($product_data as $variation) { ?><a href="#" class="cs-varr <?php echo $variation['color'] ?>" product_id="<?php echo $variation['product_id'] ?>" product_title="<?php echo $variation['product_name'] ?>" product_price="<?php echo $variation['product_price'] ?>" category_dress_type_id="<?php echo $variation['category_dress_type_id'] ?>" subcategory_dress_type_id="<?php echo $variation['subcategory_dress_type_id'] ?>" img_url="<?php echo $variation['product_image_url'] ?>" ><img src="img/product-images/variation-<?php echo $variation['color'] ?>.png" width="14" height="13" /></a><?php } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function colorList() {\n $colorArr = (new \\yii\\db\\Query())\n ->select(['color'])\n ->from('product_variation')\n ->where(['!=', 'color', ''])\n ->groupBy(['color'])\n ->all();\n return $colorArr;\n }", "public function getProductColors()\n {\n return $this->hasMany(ProductColors::class, ['color_id' => 'id']);\n }", "public static function get_style_variations()\n {\n }", "private function getColors(): array\n {\n $colors = $this->website->getConfiguration()->getColors();\n $choices = [];\n foreach ($colors as $color) {\n if ($color->getCategory() === \"background\" && $color->getIsActive()) {\n $choices[$color->getAdminName()] = $color->getSlug();\n $this->colors[$color->getSlug()] = $color->getColor();\n }\n }\n return $choices;\n }", "public function testProductGetVariants()\n {\n $product = $this->find('product', 1);\n \n $variants = $product->getVariants();\n \n $productColor = $this->find('productColor', 1);\n $productSize = $this->find('productSize', 1);\n \n $this->assertTrue(\n $variants[$productSize->getId()][$productColor->getId()]\n );\n }", "public function getAlternateColorSpace() {}", "public function getAlternateColorSpace() {}", "public function getAlternateColorSpace() {}", "function getProductColoursAsJSArray( $product_id ) {\n\t\t\tif ( $product_id > 0 ) {\n\t\t\t\t$sql = \"SELECT d.id, d.name, d.pantone, d.`rgb` FROM colour_colour_details d\n \t JOIN shop_product_colour pc ON pc.colour_id = d.id\n \tWHERE pc.product_id =\" . $product_id . \"\n\tand published = 1\n \torder by d.id \";\n\t\t\t\t$s = ' [';\n\t\t\t\t$result = mysql_query( $sql );\n\t\t\t\twhile ( $row = mysql_fetch_array( $result ) ) {\n\t\t\t\t\t$s .= \"[\" . $row['id'] . \",'\" . $row['name'] . \"','\" . $row['pantone'] . \"','#\" . $row['rgb'] . \"'],\";\n\t\t\t\t}\n\t\t\t\t// knock final comma\n\t\t\t\t$s = substr( $s, 0, strlen( $s ) - 1 );\n\t\t\t\t// add closing bracket, but only if we found some items\n\t\t\t\tif ( trim( $s ) != '' ) {\n\t\t\t\t\t$s .= ']';\n\t\t\t\t} else {\n\t\t\t\t\t$s .= '[]';\n\t\t\t\t}\n\t\t\t\treturn $s;\n\t\t\t} else {\n\t\t\t\treturn '[]';\n\t\t\t}\n\t\t}", "public function getVariation()\n {\n return $this->db->get($this->product_variant);\n }", "public function prod_var(){\n\t \n\t$color = $_GET['color'];\n\t$style = $_GET['style'];\t\n\t\n\t$this->data['prod_arr'] = $this->product_model->get_product_detail($style);\t\n\t$this->data['size'] = $this->product_model->get_size($style,$color);\n\t$this->data['prod_attr'] = $this->product_model->get_prod_attributes($style);\n\t$this->data['color'] = $this->product_model->get_color($style);\n\t\n\t$count = sizeof($this->data['color']);\n\t$count_size = sizeof($this->data['size']);\n\t$this->data['count_color'] = $count;\n\t$this->data['color_compare'] = $color;\n\tif(isset($_GET[\"size\"]))\n\t{\n\t\t$this->data['size_compare'] = $size;\n\t}\n\t$this->data['count_size'] = $count_size;\n\tif(isset($this->data[\"size\"]))\n\t{\n\t\techo json_encode($this->data[\"size\"]);\t\n\t}\n\t\n}", "public function get_product_variations() : array {\n\t\tpreg_match( '/skuProducts=\\[(.*?)\\];/si', $this->request, $matches );\n\t\tif ( empty( $matches[1] ) ) {\n\t\t\treturn [ 'variations' => [] ];\n\t\t}\n\n\t\treturn [ 'variations' => json_decode( sprintf( '[%s]', $matches[1] ), true ) ];\n\t}", "public function getProductAttributesGroups()\n {\n $colors = array();\n $groups = array();\n $combinations = array();\n\n $attributes_groups = $this->product->getAttributesGroups($this->context->language->id);\n\n if (is_array($attributes_groups) && $attributes_groups) {\n foreach ($attributes_groups as $row) {\n // Color management\n if (isset($row['is_color_group'])\n && $row['is_color_group']\n && (isset($row['attribute_color']) && $row['attribute_color'])\n || (file_exists(_PS_COL_IMG_DIR_ . $row['id_attribute'] . '.jpg'))) {\n $colors[$row['id_attribute']]['value'] = $row['attribute_color'];\n $colors[$row['id_attribute']]['name'] = $row['attribute_name'];\n if (!isset($colors[$row['id_attribute']]['attributes_quantity'])) {\n $colors[$row['id_attribute']]['attributes_quantity'] = 0;\n }\n $colors[$row['id_attribute']]['attributes_quantity'] += (int)$row['quantity'];\n }\n if (!isset($groups[$row['id_attribute_group']])) {\n $groups[$row['id_attribute_group']] = array(\n 'group_name' => $row['group_name'],\n 'name' => $row['public_group_name'],\n 'group_type' => $row['group_type'],\n 'default' => -1,\n );\n }\n\n $attr_g = $row['id_attribute_group'];\n $groups[$attr_g]['attributes'][$row['id_attribute']] = $row['attribute_name'];\n if ($row['default_on'] && $groups[$row['id_attribute_group']]['default'] == -1) {\n $groups[$row['id_attribute_group']]['default'] = (int)$row['id_attribute'];\n }\n if (!isset($groups[$row['id_attribute_group']]['attributes_quantity'][$row['id_attribute']])) {\n $groups[$row['id_attribute_group']]['attributes_quantity'][$row['id_attribute']] = 0;\n }\n $r_attr = $row['id_attribute_group'];\n $groups[$r_attr]['attributes_quantity'][$row['id_attribute']] += (int)$row['quantity'];\n\n $combinations[$row['id_product_attribute']]['attributes'][] = (int)$row['id_attribute'];\n\n //calculate full price for combination\n $priceDisplay = Product::getTaxCalculationMethod(0); //(int)$this->context->cookie->id_customer\n if (!$priceDisplay || $priceDisplay == 2) {\n $combination_price = $this->product->getPrice(true, $row['id_product_attribute']);\n } else {\n $combination_price = $this->product->getPrice(false, $row['id_product_attribute']);\n }\n $combinations[$row['id_product_attribute']]['price'] = $this->formatPrice($combination_price);\n $combinations[$row['id_product_attribute']]['float_price'] = $combination_price;\n $combinations[$row['id_product_attribute']]['quantity'] = (int)$row['quantity'];\n $combinations[$row['id_product_attribute']]['minimal_quantity'] = (int)$row['minimal_quantity'];\n }\n\n // wash attributes list (if some attributes are unavailables and if allowed to wash it)\n if (!Product::isAvailableWhenOutOfStock($this->product->out_of_stock)\n && Configuration::get('PS_DISP_UNAVAILABLE_ATTR') == 0) {\n foreach ($groups as &$group) {\n foreach ($group['attributes_quantity'] as $key => &$quantity) {\n if ($quantity <= 0) {\n unset($group['attributes'][$key]);\n }\n }\n }\n\n foreach ($colors as $key => $color) {\n if ($color['attributes_quantity'] <= 0) {\n unset($colors[$key]);\n }\n }\n }\n foreach ($combinations as $id_product_attribute => $comb) {\n $attribute_list = '';\n foreach ($comb['attributes'] as $id_attribute) {\n $attribute_list .= '\\'' . (int)$id_attribute . '\\',';\n }\n $attribute_list = rtrim($attribute_list, ',');\n $combinations[$id_product_attribute]['list'] = $attribute_list;\n }\n }\n\n return array(\n 'groups' => $groups,\n 'colors' => (count($colors)) ? $colors : false,\n 'combinations' => $combinations\n );\n }", "public function getColorComponents() {}", "public function getColorComponents() {}", "public function getColorComponents() {}", "public function getColorComponents() {}", "public function getColorComponents() {}", "public function getColorComponents() {}", "public function getColorComponents() {}", "function fn_product_variations_convert_to_configurable_product($product_id)\n{\n $auth = array();\n\n $product = fn_get_product_data($product_id, $auth);\n $languages = Languages::getAll();\n $product_options = fn_get_product_options($product_id, CART_LANGUAGE, true);\n $product_row = db_get_row('SELECT * FROM ?:products WHERE product_id = ?i', $product_id);\n $product_variation_ids = db_get_fields('SELECT product_id FROM ?:products WHERE parent_product_id = ?i', $product_id);\n $product_exceptions = fn_get_product_exceptions($product_id);\n\n foreach ($product_variation_ids as $product_variation_id) {\n fn_delete_product($product_variation_id);\n }\n\n $options_ids = array();\n $inventory_combinations = db_get_array('SELECT * FROM ?:product_options_inventory WHERE product_id = ?i', $product_id);\n $index = 0;\n\n foreach ($inventory_combinations as $item) {\n $index++;\n $selected_options = array();\n $parts = array_chunk(explode('_', $item['combination']), 2);\n\n foreach ($parts as $part) {\n $selected_options[$part[0]] = $part[1];\n }\n\n $combination = fn_product_variations_get_variation_by_selected_options(\n $product,\n $product_options,\n $selected_options,\n $index\n );\n\n if (!empty($item['product_code'])) {\n $combination['code'] = $item['product_code'];\n }\n\n if (!empty($item['amount'])) {\n $combination['amount'] = $item['amount'];\n }\n\n $is_allow = true;\n\n if ($product_row['exceptions_type'] == 'F') {\n foreach ($product_exceptions as $exception) {\n\n foreach ($exception['combination'] as $option_id => &$variant_id) {\n if ($variant_id == OPTION_EXCEPTION_VARIANT_ANY || $variant_id == OPTION_EXCEPTION_VARIANT_NOTHING) {\n $variant_id = isset($combination['selected_options'][$option_id]) ? $combination['selected_options'][$option_id] : null;\n }\n }\n unset($variant_id);\n\n if ($exception['combination'] == $combination['selected_options']) {\n $is_allow = false;\n break;\n }\n }\n } elseif ($product_row['exceptions_type'] == 'A') {\n $is_allow = false;\n\n foreach ($product_exceptions as $exception) {\n\n foreach ($exception['combination'] as $option_id => &$variant_id) {\n if ($variant_id == OPTION_EXCEPTION_VARIANT_ANY) {\n $variant_id = isset($combination['selected_options'][$option_id]) ? $combination['selected_options'][$option_id] : null;\n }\n }\n unset($variant_id);\n\n if ($exception['combination'] == $combination['selected_options']) {\n $is_allow = true;\n break;\n }\n }\n }\n\n if (!$is_allow) {\n continue;\n }\n\n $variation_id = fn_product_variations_save_variation($product_row, $combination, $languages);\n\n $image = fn_get_image_pairs($item['combination_hash'], 'product_option', 'M', true, true);\n\n if ($image) {\n $detailed = $icons = array();\n $pair_data = array(\n 'type' => 'M'\n );\n\n if (!empty($image['icon'])) {\n $tmp_name = fn_create_temp_file();\n Storage::instance('images')->export($image['icon']['relative_path'], $tmp_name);\n $name = fn_basename($image['icon']['image_path']);\n\n $icons[$image['pair_id']] = array(\n 'path' => $tmp_name,\n 'size' => filesize($tmp_name),\n 'error' => 0,\n 'name' => $name\n );\n\n $pair_data['image_alt'] = empty($image['icon']['alt']) ? '' : $image['icon']['alt'];\n }\n\n if (!empty($image['detailed'])) {\n $tmp_name = fn_create_temp_file();\n Storage::instance('images')->export($image['detailed']['relative_path'], $tmp_name);\n $name = fn_basename($image['detailed']['image_path']);\n\n $detailed[$image['pair_id']] = array(\n 'path' => $tmp_name,\n 'size' => filesize($tmp_name),\n 'error' => 0,\n 'name' => $name\n );\n\n $pair_data['detailed_alt'] = empty($image['detailed']['alt']) ? '' : $image['detailed']['alt'];\n }\n\n $pairs_data = array(\n $image['pair_id'] => $pair_data\n );\n\n fn_update_image_pairs($icons, $detailed, $pairs_data, $variation_id, 'product');\n }\n }\n\n if (!empty($selected_options)) {\n $options_ids = array_keys($selected_options);\n }\n\n db_query(\n 'UPDATE ?:products SET product_type = ?s, variation_options = ?s WHERE product_id = ?i',\n ProductManager::PRODUCT_TYPE_CONFIGURABLE, json_encode(array_values($options_ids)), $product_id\n );\n\n fn_delete_product_option_combinations($product_id);\n db_query('DELETE FROM ?:product_options_exceptions WHERE product_id = ?i', $product_id);\n}", "public function getVariation()\r\n {\r\n return array();\r\n }", "public function productAssets()\n {\n $variations = ProductVariation::with('stocks')->get();\n $assets = $variations->sum(function ($variant) {\n return $variant->stockCount() * $variant->base_price;\n });\n\n $opAssets = $variations->sum(function ($variant) {\n return $variant->stockCount() * $variant->price;\n });\n\n return [\n 'assets' => $assets,\n 'op_asset' => $opAssets\n ];\n }", "function filter_woocommerce_rest_prepare_product_object( $response, $object, $request ) {\n if( empty( $response->data ) ) {\n return $response;\n }\n\n $attribute_taxonomies = wc_get_attribute_taxonomies();\n\n // Loop through the attributes on current product\n $attributes = $response->data['attributes'];\n foreach($attributes as $attrkey => $attribute) {\n\n /* ########################################################\n - Adding new swatch key to attribute response for color attributes,\n which holds the hex code for each swatch color option\n ######################################################## */\n // Get an array of attributes whose attribute type is color\n $color_type_attribute_taxonomies = array_filter($attribute_taxonomies, function($attribute_taxonomy) {\n return $attribute_taxonomy->attribute_type == 'color';\n });\n // Loop through the color type attributes\n foreach($color_type_attribute_taxonomies as $tax_object) {\n //Check if current attribute is a color type attribute\n if ($attribute['id'] == $tax_object->attribute_id) {\n // Get current attribute's options\n $options = $response->data['attributes'][$attrkey]['options'];\n // Get current attribute's terms\n $color_terms = get_terms('pa_' . $tax_object->attribute_name);\n foreach( $options as $option ) {\n foreach($color_terms as $term) {\n if ($term->name == $option) {\n // Add a new swatch with hex value for each color option\n $response->data['attributes'][$attrkey]['swatches'][$option] = get_term_meta( $term->term_id, 'product_attribute_color', true);\n }\n }\n }\n }\n }\n\n /* ########################################################\n - Adding attribute taxonomy to the attribute response\n - Adding attribute identifier to the attribute response\n - Adding more detailed option data to the attribute options response\n ######################################################## */\n foreach($attribute_taxonomies as $attribute_taxonomy) {\n if ($attribute['id'] == $attribute_taxonomy->attribute_id) {\n\n /* Add slug to current attribute response */\n $response->data['attributes'][$attrkey]['taxonomy'] = ('pa_' . $attribute_taxonomy->attribute_name);\n\n /* Add attribute identifier to current attribute response */\n $response->data['attributes'][$attrkey]['slug'] = $attribute_taxonomy->attribute_name;\n\n /* Replace default options data with detailed options data for current attribute */\n $options = $response->data['attributes'][$attrkey]['options'];\n $new_options = array();\n $attribute_terms = get_terms('pa_' . $attribute_taxonomy->attribute_name);\n\n foreach( $options as $option ) {\n foreach($attribute_terms as $attribute_term) {\n if ($attribute_term->name == $option) {\n $new_options[] = (object) [\n 'id' => $attribute_term->term_id,\n 'name' => $attribute_term->name,\n 'slug' => $attribute_term->slug,\n 'taxonomy' => $attribute_term->taxonomy,\n 'description' => $attribute_term->description,\n 'count' => $attribute_term->count\n ];\n }\n }\n }\n $response->data['attributes'][$attrkey]['options'] = $new_options;\n }\n }\n }\n\n /* ########################################################\n - Replacing Variation IDs with Variation details\n ######################################################## */\n\n // Get the current product object\n $variation_ids = $response->data['variations'];\n\n $detailed_variations = array_map(function($variation_id) {\n $variation = wc_get_product($variation_id);\n return (object) [\n 'variation_id' => $variation->get_id(),\n 'image_url' => wp_get_attachment_url($variation->get_image_id()),\n 'variation_regular_price' => $variation->get_regular_price(),\n 'variation_sale_price' => $variation->get_sale_price(),\n 'attributes' => $variation->get_attributes(),\n 'is_on_sale' => $variation->is_on_sale()\n ];\n }, $variation_ids);\n\n $response->data['variations'] = $detailed_variations;\n\n\n /* ########################################################\n - Get ALL Variation attributes for a product\n ######################################################## */\n if ($response->data['type'] == 'variable') {\n $variation_attributes = wc_get_product($response->data['id'])->get_variation_attributes();\n $variation_attributes = array_map(function($attribute) {\n return (array_values($attribute));\n }, $variation_attributes);\n $response->data['variation_attributes'] = $variation_attributes;\n }\n\n\n\n /* Return new response */\n return $response;\n}", "function getAllProductVariantOptions(Request $request) {\n $collectionName = $request->query->get('collectionName');\n $arr = [];\n $em = $this->getDoctrine()->getManager();\n $products = [];\n if(strpos($collectionName, ';') !== false) {\n $collectionArray = explode(';', $collectionName);\n foreach ($collectionArray as $collectionName) {\n $collection = $em->getRepository('App:ProductTypes')->findOneBy(['name' => $collectionName]);\n $products[] = $em->getRepository('App:Products')->findBy(['type' => $collection]);\n }\n } else {\n $collection = $em->getRepository('App:ProductTypes')->findOneBy(['name' => $collectionName]);\n $products = $em->getRepository('App:Products')->findBy(['type' => $collection]);\n\n if (!$collection) {\n $brand = $em->getRepository('App:Brands')->findOneBy(['name' => $collectionName]);\n $products = $em->getRepository('App:Products')->findBy(['brand' => $brand]);\n }\n }\n\n $colorsArr = [];\n $sizeArr = [];\n $brandArr = [];\n\n foreach ($products as $product) {\n if(is_array($product)) {\n foreach ($product as $item) {\n if ($item->getSize()) {\n $sizeArr[] = $item->getSize()->getSize();\n }\n\n if($item->getColor()) {\n $colorsArr[] = $item->getColor()->getName();\n }\n\n if ($item->getBrand()) {\n $brandArr[] = $item->getBrand()->getName();\n }\n }\n } else {\n if ($product->getSize()) {\n $sizeArr[] = $product->getSize()->getSize();\n }\n\n if($product->getColor()) {\n $colorsArr[] = $product->getColor()->getName();\n }\n\n if ($product->getBrand()) {\n $brandArr[] = $product->getBrand()->getName();\n }\n }\n }\n\n $arr['colors'] = array_unique($colorsArr);\n $arr['sizes'] = array_unique($sizeArr);\n $arr['brands'] = array_unique($brandArr);\n\n return new JsonResponse($arr);\n }", "public static function get_attribution_product_fields($product)\n {\n $list = array();\n if ($product['type'] == \"variable\" and count($product['variations']) > 0) {\n foreach ($product['attributes'] as $attribute) {\n\n // If Attribute Not User For Variation\n if ($attribute['variation'] === false) {\n continue;\n }\n\n // Get Basic Detail\n $list[wc_attribute_taxonomy_name($attribute['slug'])] = array(\n 'name' => $attribute['name'],\n 'options' => array()\n );\n $options = array();\n foreach ($attribute['terms'] as $term_key => $term) {\n\n // Check Term in Variables Product\n $exist = false;\n foreach ($product['variations'] as $variations_product) {\n $in_stock = $variations_product['in_stock'];\n $stock_quantity = $variations_product['stock_quantity'];\n if ($in_stock === true) {\n foreach ($variations_product['attributes'] as $variations_product_attribute) {\n if ($term['slug'] == $variations_product_attribute['option']) {\n $exist = true;\n break;\n }\n }\n }\n }\n if ($exist === true) {\n $options[$term['slug']] = $term['name'];\n }\n }\n $list[wc_attribute_taxonomy_name($attribute['slug'])]['options'] = $options;\n }\n }\n\n /**\n * [pa_color] => Array\n * (\n * [name] => رنگ\n * [options] => Array\n * (\n * [blue] => آبی\n * [red] => قرمز\n * )\n * )\n * [pa_size] => Array\n * (\n * [name] => سایز\n * [options] => Array\n * (\n * [l] => L\n */\n return $list;\n }", "private function _getProductvariantsList($product) {\n\n $productvariantsList = array();\n $linkHelper = new Helper\\HtmlLinkHelper();\n $spanHelper = new Helper\\HtmlSpanHelper();\n\n /* @var $productvariant Entity\\ProductEntity */\n foreach ($product->getChilderen() as $productvariant) {\n\n $categoryId = $productvariant->getProductCategories()->first()->getCategory()->getId();\n\n $name = $productvariant->getCurrentTranslation()->getName();\n\n // render link\n $liString = $linkHelper->getHtml(\n $name,\n $this->url()->fromRoute('home/default', array(\n 'controller' => 'product',\n 'action' => 'form',\n 'param' => 'product',\n 'value' => $productvariant->getId(),\n 'param2' => 'category',\n 'value2' => $categoryId\n )),\n $name,\n 'pane-navi-link productvariant',\n array(\n 'data-pane-title' => '',\n 'data-delete-url' => $this->url()->fromRoute('home/default', array(\n 'controller' => 'product',\n 'action' => 'delete',\n 'param' => 'product',\n 'value' => $productvariant->getId()\n ))\n ),\n null\n );\n\n// $liString .= $spanHelper->getHtml(\n// '',\n// 'edit',\n// array(\n// 'data-form-url' => $this->url()->fromRoute('home/default', array(\n// 'controller' => 'product',\n// 'action' => 'form',\n// 'param' => 'product',\n// 'value' => $productvariant->getId()\n// ))\n// )\n// );\n\n $productvariantsList[] = $liString;\n }\n\n return $productvariantsList;\n }", "public function color()\n {\n $color = $this->customer->color;\n\n $r = substr($color, 1, 2);\n $g = substr($color, 3, 2);\n $b = substr($color, 5, 2);\n $luma = (float)0.2126 * hexdec($r)\n + 0.7152 * hexdec($g)\n + 0.0722 * hexdec($b);\n\n return ['color' => $this->customer->color, 'luma' => $luma];\n }", "public function test_get_style_variations_returns_all_variations() {\n\t\t// Switch to a child theme.\n\t\tswitch_theme( 'block-theme-child' );\n\t\twp_set_current_user( self::$administrator_id );\n\n\t\t$actual_settings = WP_Theme_JSON_Resolver::get_style_variations();\n\t\t$expected_settings = array(\n\t\t\tarray(\n\t\t\t\t'version' => 2,\n\t\t\t\t'title' => 'variation-b',\n\t\t\t\t'settings' => array(\n\t\t\t\t\t'blocks' => array(\n\t\t\t\t\t\t'core/post-title' => array(\n\t\t\t\t\t\t\t'color' => array(\n\t\t\t\t\t\t\t\t'palette' => array(\n\t\t\t\t\t\t\t\t\t'theme' => array(\n\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t'slug' => 'dark',\n\t\t\t\t\t\t\t\t\t\t\t'name' => 'Dark',\n\t\t\t\t\t\t\t\t\t\t\t'color' => '#010101',\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\t\t\t\t),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'version' => 2,\n\t\t\t\t'title' => 'Block theme variation',\n\t\t\t\t'settings' => array(\n\t\t\t\t\t'color' => array(\n\t\t\t\t\t\t'palette' => array(\n\t\t\t\t\t\t\t'theme' => array(\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'slug' => 'foreground',\n\t\t\t\t\t\t\t\t\t'name' => 'Foreground',\n\t\t\t\t\t\t\t\t\t'color' => '#3F67C6',\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\t\t\t\t),\n\t\t\t\t'styles' => array(\n\t\t\t\t\t'blocks' => array(\n\t\t\t\t\t\t'core/post-title' => array(\n\t\t\t\t\t\t\t'typography' => array(\n\t\t\t\t\t\t\t\t'fontWeight' => '700',\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\t\t);\n\n\t\twp_recursive_ksort( $actual_settings );\n\t\twp_recursive_ksort( $expected_settings );\n\n\t\t$this->assertSame(\n\t\t\t$expected_settings,\n\t\t\t$actual_settings\n\t\t);\n\t}", "public function getCssCustomProduct()\n {\n return Mage::getStoreConfig('splitprice/split_price_presentation/css_product');\n }" ]
[ "0.7293336", "0.6595711", "0.63992804", "0.6195265", "0.61694485", "0.6166649", "0.6166649", "0.6166649", "0.6160724", "0.61212796", "0.6115576", "0.60391694", "0.6014347", "0.59842944", "0.59842634", "0.59842634", "0.59842634", "0.59842634", "0.59842634", "0.59842634", "0.59671783", "0.59483796", "0.5927769", "0.58798426", "0.58578426", "0.584655", "0.584234", "0.5815221", "0.57914037", "0.57673717" ]
0.7296927
0
Set Tracking Number after Student Signup to show lead pixel (using getLeadPixel) for ShareASale to track signup
public function setTrackingNumber($studentId) { // Using session since currently signup is made via AJAX. Need to show lead pixel later Yii::$app->session->set(self::SESSION_KEY, $studentId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "final public function Add_Linkedin_Pixel() {\n\t\tif (isset(self::$LINKEDIN_PIXEL_ID) && !empty(self::$LINKEDIN_PIXEL_ID)) {\n\t\t?>\n<script type=\"text/javascript\">\n_linkedin_data_partner_id = \"<?= self::$LINKEDIN_PIXEL_ID; ?>\";\n</script><script type=\"text/javascript\">\n(function(){var s = document.getElementsByTagName(\"script\")[0];\nvar b = document.createElement(\"script\");\nb.type = \"text/javascript\";b.async = true;\nb.src = \"https://snap.licdn.com/li.lms-analytics/insight.min.js\";\ns.parentNode.insertBefore(b, s);})();\n</script>\n<?\n \t}\n\t}", "public function logPixelPaymentInfo($observer){\n //Logging event\n Mage::getModel('core/session')->setPixelPaymentInfo(true);\n }", "public function tracking_field() {\n\t\techo cyprus_get_settings( 'mts_analytics_code' );\n\t}", "public function track_identity()\n {\n }", "public function track($trackingNumber);", "final public function Add_Facebook_Pixel() {\n\t\tif (isset(self::$FACEBOOK_PIXEL_ID) && !empty(self::$FACEBOOK_PIXEL_ID)) {\n\t\t?>\n<script>\n!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?\nn.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;\nn.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;\nt.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,\ndocument,'script','https://connect.facebook.net/en_US/fbevents.js');\nfbq('init', '<?= self::$FACEBOOK_PIXEL_ID; ?>');\nfbq('track', 'PageView');\n</script>\n<noscript><img height=\"1\" width=\"1\" style=\"display:none\"\nsrc=\"https://www.facebook.com/tr?id=<?= self::$FACEBOOK_PIXEL_ID; ?>&ev=PageView&noscript=1\"\n/></noscript>\n<?\n \t}\n\t}", "public function logPixelCompleteRegistration($observer){\n //Logging event\n Mage::getModel('core/session')->setPixelCompleteRegistration(true);\n }", "function trackPageView() {\n $timeStamp = time();\n $domainName = $_SERVER[\"SERVER_NAME\"];\n if (empty($domainName)) {\n $domainName = \"\";\n }\n\n // Get the referrer from the utmr parameter, this is the referrer to the\n // page that contains the tracking pixel, not the referrer for tracking\n // pixel.\n $documentReferer = $_GET[\"utmr\"];\n if (empty($documentReferer) && $documentReferer !== \"0\") {\n $documentReferer = \"-\";\n } else {\n $documentReferer = urldecode($documentReferer);\n }\n $documentPath = $_GET[\"utmp\"];\n if (empty($documentPath)) {\n $documentPath = \"\";\n } else {\n $documentPath = urldecode($documentPath);\n }\n\n $account = $_GET[\"utmac\"];\n $userAgent = $_SERVER[\"HTTP_USER_AGENT\"];\n if (empty($userAgent)) {\n $userAgent = \"\";\n }\n\n // Try and get visitor cookie from the request.\n $cookie = isset($_COOKIE[COOKIE_NAME]) ? $_COOKIE[COOKIE_NAME] : '';\n\n $dcmguid = isset($_SERVER[\"HTTP_X_DCMGUID\"]) ? $_SERVER[\"HTTP_X_DCMGUID\"] : '';\n $visitorId = getVisitorId(\n $dcmguid, $account, $userAgent, $cookie);\n\n // Always try and add the cookie to the response.\n setrawcookie(\n COOKIE_NAME,\n $visitorId,\n $timeStamp + COOKIE_USER_PERSISTENCE,\n COOKIE_PATH);\n\n $utmGifLocation = \"http://www.google-analytics.com/__utm.gif\";\n\n // Construct the gif hit url.\n $utmUrl = $utmGifLocation . \"?\" .\n \"utmwv=\" . VERSION .\n \"&utmn=\" . getRandomNumber() .\n \"&utmhn=\" . urlencode($domainName) .\n \"&utmr=\" . urlencode($documentReferer) .\n \"&utmp=\" . urlencode($documentPath) .\n \"&utmac=\" . $account .\n \"&utmcc=__utma%3D999.999.999.999.999.1%3B\" .\n \"&utmvid=\" . $visitorId .\n \"&utmip=\" . getIP($_SERVER[\"REMOTE_ADDR\"]);\n\n sendRequestToGoogleAnalytics($utmUrl);\n\n // If the debug parameter is on, add a header to the response that contains\n // the url that was used to contact Google Analytics.\n if (!empty($_GET[\"utmdebug\"])) {\n header(\"X-GA-MOBILE-URL:\" . $utmUrl);\n }\n // Finally write the gif data to the response.\n writeGifData();\n }", "public function logPixelCompleteRegistrationNewsletter($observer) {\n $subscriber = $observer->getEvent()->getSubscriber();\n $statusChanged = $subscriber->getIsStatusChanged();\n if($subscriber->getStatus() == Mage_Newsletter_Model_Subscriber::STATUS_SUBSCRIBED && $statusChanged) {\n Mage::getModel('core/session')->setPixelCompleteRegistration(true);\n\n //Set flag for Lead Event\n Mage::getModel('core/session')->setPixelLead(true);\n }\n }", "function add_pixel(){\r\n $id = get_option('glv_pixel_value');\r\n $pixel = \"\r\n <!-- Facebook Pixel Code -->\r\n <script>\r\n !function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?\r\n n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;\r\n n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;\r\n t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,\r\n document,'script','https://connect.facebook.net/en_US/fbevents.js');\r\n fbq('init', '\".$id.\"'); // Insert your pixel ID here.\r\n fbq('track', 'PageView');\r\n </script>\r\n <noscript><img height='1' width='1' style='display:none'\r\n src='https://www.facebook.com/tr?id=\".$id.\"&ev=PageView&noscript=1'\r\n /></noscript>\r\n <!-- DO NOT MODIFY -->\r\n <!-- End Facebook Pixel Code -->\r\n \";\r\n print $pixel;\r\n }", "public function tracking() {\n\n\t\t// Return if user is logged in\n\t\tif ( is_user_logged_in() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Display tracking code\n\t\tif ( $tracking = get_theme_mod( 'tracking' ) ) {\n\t\t\techo $tracking;\n\t\t}\n\n\t}", "public function setCreditInfo() {\n\t\t$this->creditInfo = $this->photo['title'] . \"&nbsp;by&nbsp;\" . $this->userName;\n\t}", "public static function optin_track_usage() {\n\n\t\t/** update week day for tracking */\n\t\t$track_week_day = date( 'w' );\n\t\tupdate_option( 'xl_track_day', $track_week_day, false );\n\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 execute(\\Magento\\Framework\\Event\\Observer $observer)\n {\n $this->payPalPlusHelper->resetWebProfileId();\n }", "public function viewed_signup() {\n\t\tif ( $this->not_page_reload() ) {\n\t\t\t$this->js_record_event( $this->event_name['viewed_signup'] );\n\t\t}\n\t}", "function inject_facebook_pixel() {?>\n\t<!-- Facebook Pixel Code -->\n\t<!-- Pixel ID is embedded here -->\n\t<script>\n\t\t!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?\n\t\tn.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;\n\t\tn.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;\n\t\tt.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,\n\t\tdocument,'script','https://connect.facebook.net/en_US/fbevents.js');\n\t\tfbq('init', 000000000000000); // Insert your pixel ID here.\n\t\tfbq('track', 'PageView');\n\t</script>\n\t<!-- The Pixel ID is embedded below as well -->\n\t<noscript><img height=\"1\" width=\"1\" style=\"display:none\"\n\t\tsrc=\"https://www.facebook.com/tr?id=000000000000000&ev=PageView&noscript=1\"/>\n\t</noscript>\n\t<!-- DO NOT MODIFY -->\n\t<!-- End Facebook Pixel Code -->\n<?php }", "public static function trackPageHit($email_is_set){\n wp_enqueue_script( 'flexie_metadata_script', plugin_dir_url(__FILE__).'assets/js/flexie_metadata_script.js', array(), null, false );\n if ( $email_is_set ){ \n wp_localize_script( 'flexie_metadata_script', 'flexie_metadata_script_object',\n array(\n 'pageHit' => true,\n 'registerEmail' => wp_get_current_user()->user_email\n )\n );\n } \t\n }", "function tsuiseki_tracking_view($data) {\n if (!empty($data)) {\n $t_data = (string)(trim($data));\n // We need to cut the first \"ref=\" as it comes from the javascript part\n // and may overlay the partner field.\n if (preg_match('/^ref=.*/', $t_data)) {\n $t_data = mb_substr($t_data, mb_strpos($t_data, '=') + 1);\n }\n $t_parts = preg_split('/;;/', $t_data);\n $src_url = (string)(trim($t_parts[0]));\n $width = (string)(trim($t_parts[1]));\n $height = (string)(trim($t_parts[2]));\n $browser = (string)(trim($t_parts[3]));\n $browser_version = (string)(trim($t_parts[4]));\n $referer = (string)(trim($t_parts[5]));\n if (!empty($referer)) {\n // Wir extrahieren nur die Domain!\n $r_parts = array();\n preg_match('/[a-z]{3,5}:\\/\\/(.+?)[\\/?:]/', $referer, $r_parts);\n if (!empty($r_parts[1])) {\n $referer = 'referer='. (string)trim($r_parts[1]);\n }\n }\n }\n $key = (string)trim($_SESSION['TSUISEKI_TRACKER_KEY']);\n if (!empty($src_url) && !empty($key)) {\n $ref = urldecode($src_url);\n $data = (string)(trim(tsuiseki_tracking_get_data($ref)));\n $data .= '&'. $width .'&'. $height .'&'. $browser .'&'. $browser_version .'&'. $referer;\n $data = urlencode($data);\n $ip = ip2long($_SERVER['REMOTE_ADDR']);\n $url = \"http://tracker.tsuiseki.com/tsuiseki.php?q=$key;0;$ip;$data&ajax=1\";\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_USERAGENT, (string)trim($_SERVER['HTTP_USER_AGENT']));\n curl_setopt($ch, CURLOPT_REFERER, $src_url);\n $result = curl_exec($ch);\n if (curl_errno($ch) > 0) {\n trigger_error(curl_error($ch), curl_errno($ch));\n }\n curl_close($ch);\n }\n\n // generate the response\n $response = json_encode( array( 'success' => true ) );\n // response output\n header( \"Content-Type: application/json\" );\n echo $response;\n exit;\n //return 0;\n}", "public function saveSignIn()\n {\n $this->has_signed_in_once = true;\n $this->last_signin = date('Y-m-d H:i:s');\n $this->save();\n }", "public function logPixelPurchase($observer){\n //Logging event\n Mage::getModel('core/session')->setPixelPurchase(true);\n }", "public function getTrackingNumber()\n {\n return $this->tracking_number;\n }", "private function pixel_init_code() {\n\t\t\t$version_info = self::get_version_info();\n\t\t\t$agent_string = sprintf(\n\t\t\t\t'%s-%s-%s',\n\t\t\t\t$version_info['source'],\n\t\t\t\t$version_info['version'],\n\t\t\t\t$version_info['pluginVersion']\n\t\t\t);\n\n\t\t\t$params = array(\n\t\t\t\t'agent' => $agent_string,\n\t\t\t);\n\n\t\t\treturn apply_filters(\n\t\t\t\t'facebook_woocommerce_pixel_init',\n\t\t\t\tsprintf(\n\t\t\t\t\t\"fbq('init', '%s', %s, %s);\\n\",\n\t\t\t\t\tesc_js( self::get_pixel_id() ),\n\t\t\t\t\tjson_encode( $this->user_info, JSON_PRETTY_PRINT | JSON_FORCE_OBJECT ),\n\t\t\t\t\tjson_encode( $params, JSON_PRETTY_PRINT | JSON_FORCE_OBJECT )\n\t\t\t\t)\n\t\t\t);\n\t\t}", "public function getTrackingNumber()\n {\n return $this->trackingNumber;\n }", "function tsuiseki_tracking_click($data) {\n if (!empty($data)) {\n $t_data = (string)(trim($data));\n // We need to cut the first \"ref=\" as it comes from the javascript part\n // and may overlay the partner field.\n if (preg_match('/^ref=.*/', $t_data)) {\n $t_data = mb_substr($t_data, mb_strpos($t_data, '=') + 1);\n }\n $t_parts = preg_split('/;;/', $t_data);\n $src_url = (string)(trim($t_parts[0]));\n $width = (string)(trim($t_parts[1]));\n $height = (string)(trim($t_parts[2]));\n $mousex = (string)(trim($t_parts[3]));\n $mousey = (string)(trim($t_parts[4]));\n $browser = (string)(trim($t_parts[5]));\n $browser_version = (string)(trim($t_parts[6]));\n $referer = (string)(trim($t_parts[7]));\n if (!empty($referer)) {\n // Wir extrahieren nur die Domain!\n $r_parts = array();\n preg_match('/[a-z]{3,5}:\\/\\/(.+?)[\\/?:]/', $referer, $r_parts);\n if (!empty($r_parts[1])) {\n $referer = 'referer='. (string)trim($r_parts[1]);\n }\n }\n $click_type = (string)(trim($t_parts[8]));\n $click_bits = (string)trim($t_parts[9]);\n }\n\n $key = (string)trim($_SESSION['TSUISEKI_TRACKER_KEY']);\n if (!empty($src_url) && !empty($key)) {\n $ref = urldecode($src_url);\n $data = (string)(trim(tsuiseki_tracking_get_data($ref)));\n $data .= '&'. $width .'&'. $height .'&'. $mousex .'&'. $mousey .'&'. $browser .'&'. $browser_version .'&'. $click_bits .'&'. $referer .'&'. $click_type;\n $data = urlencode($data);\n $ip = ip2long($_SERVER['REMOTE_ADDR']);\n $url = \"http://tracker.tsuiseki.com/tsuiseki.php?q=$key;1;$ip;$data&ajax=1\";\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_USERAGENT, (string)trim($_SERVER['HTTP_USER_AGENT']));\n curl_setopt($ch, CURLOPT_REFERER, $src_url);\n $result = curl_exec($ch);\n if (curl_errno($ch) > 0) {\n trigger_error(curl_error($ch), curl_errno($ch));\n }\n curl_close($ch);\n }\n // generate the response\n $response = json_encode( array( 'success' => true ) );\n // response output\n header( \"Content-Type: application/json\" );\n echo $response;\n exit;\n //return 0;\n}", "public function affiliate(CommonFunctionsInterface $commonFunctionRepo)\n {\n $insid = $commonFunctionRepo->checkAffiliatePixel('YLBESTPPI',1,1116);\n print $insid;\n exit;\n }", "public function getTrackNumber() {}", "function pmprosl_sociallocker_tracking() {\n\tif ( ! ( int ) $_POST['targetId'] )\n\t\texit;\n\n\t// Next make sure the \"sender\" is valid\n\tif ( empty( $_POST['sender'] ) || ! in_array( $_POST['sender'], array( 'button', 'timer', 'cross' ) ) )\n\t\texit;\n\n\t// Next make sure the \"senderName\" is valid\n\tif ( empty( $_POST['senderName'] ) )\n\t\texit;\n\n\t// Finally, make sure we haven't already set the cookie\n\tif( isset( $_COOKIE['pmprosl_has_access_flag'] ) && ! $_COOKIE['pmprosl_has_access_flag'] )\n\t\texit;\n\n\t// Passed all validation checks, lets set the cookies\n\tsetcookie( 'pmprosl_has_access', PMPROSL_FREE_LEVEL_ID, ( time() + ( 60 * 60 * 24 * PMPROSL_MEMBERSHIP_PERIOD_DAYS ) ), COOKIEPATH, COOKIE_DOMAIN, false ); // has_access cookie (expires in PMPROSL_MEMBERSHIP_PERIOD_DAYS days)\n\tsetcookie( 'pmprosl_has_access_flag', true, ( time() + ( 60 * 60 * 24 * 10 * 365 ) ), COOKIEPATH, COOKIE_DOMAIN, false ); // has_access flag cookie used to verify if a user already had access once (expires in 10 years; i.e. never)\n\n\treturn; // We're returning here because we know Social Locker's hook is coming up next\n}", "function google_analytics_config()\n{\n\n $tracking_code = $this->getRequest()->getParam('google_analytics_tracking_code');\n set_option('google_analytics_tracking_code', $tracking_code);\n\n}", "public function setupTrackKey($track_key = NULL)\n\t{\n\t\tif (!$track_key || $this->statpro->setTrackKey($track_key) != $track_key)\n\t\t{\n\t\t\t$track_key = $this->statpro->createTrackKey();\n\t\t\t\n\t\t\t$this->logNewTrackKey();\n\t\t}\n\t\t\n\t\treturn $track_key;\n\t}", "private function createTrackingNumber()\n {\n $tracking = 5000000000;\n $current = WaybillNumber::orderBy('id', 'DESC')->first();\n\n if (! $current) {\n $tracking = WaybillNumber::create(['current' => $tracking]);\n\n return $tracking->current;\n }\n\n $tracking = (int) $current['current'] + 1;\n\n $tracking = WaybillNumber::create(['current' => $tracking]);\n\n return $tracking->current;\n }" ]
[ "0.59880346", "0.5326944", "0.5278816", "0.52383524", "0.5222721", "0.5217581", "0.5213451", "0.51702744", "0.51691544", "0.5159023", "0.5077513", "0.5053144", "0.5021646", "0.50158083", "0.49500686", "0.4865999", "0.48360163", "0.48113772", "0.4803118", "0.47862053", "0.4763268", "0.47515666", "0.47436506", "0.47396293", "0.47105646", "0.47038642", "0.47000957", "0.46645856", "0.46629623", "0.4655514" ]
0.58327305
1
Get Tracking Number from session
public function getTrackingNumber($removeFromSession = false) { // Using session since currently signup is made via AJAX. Need to show lead pixel later $trackingNumber = Yii::$app->session->get(self::SESSION_KEY); if ($removeFromSession) { Yii::$app->session->remove(self::SESSION_KEY); } return $trackingNumber; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTrackingNumber()\n {\n return $this->tracking_number;\n }", "public function getTrackingNumber()\n {\n return $this->trackingNumber;\n }", "public function getTrackingNumber() : string\n\t{\n\t\treturn $this->trackingNumber;\n\t}", "public function getTrackingID()\n {\n return $this->trackingID;\n }", "public function getTrackingId()\n {\n return $this->trackingId;\n }", "public function getTrackNumber() {}", "public function getTrackingId()\n {\n if (isset($this->data['TrackingId'])) {\n return $this->data['TrackingId'];\n } else {\n return false;\n }\n }", "public function getTrackingNumber(Mage_Sales_Model_Order_Shipment $shipment)\n {\n $trackingNumber = '';\n $tracks = $shipment->getAllTracks();\n\n if (array_key_exists(0, $tracks)) {\n $trackingNumber = $tracks[0]->getTrackNumber();\n }\n\n return $trackingNumber;\n }", "private function getEntryIdFromSession()\n {\n return Session::get($this->session_key, 0);\n }", "public function getTrackNumber()\n {\n return $this->trackNumber;\n }", "public function getSessionID() {\n if(isset($this->data['booking']['session']['id'])) {\n return $this->data['booking']['session']['id'];\n }\n return null;\n\n }", "public function getSessionID(){\r\n\t\treturn $this->sessionID;\r\n\t}", "final function getSession_id() {\n\t\treturn $this->getSessionId();\n\t}", "public function getSessionID();", "private function createTrackingNumber()\n {\n $tracking = 5000000000;\n $current = WaybillNumber::orderBy('id', 'DESC')->first();\n\n if (! $current) {\n $tracking = WaybillNumber::create(['current' => $tracking]);\n\n return $tracking->current;\n }\n\n $tracking = (int) $current['current'] + 1;\n\n $tracking = WaybillNumber::create(['current' => $tracking]);\n\n return $tracking->current;\n }", "public function get_session_id()\n {\n }", "public function getSessionID()\n {\n return $this->sessionID;\n }", "public function getSessionID() {\n return $this->sessionID;\n }", "public static function getIdFromSession()\n\t{\n\n\t\treturn $_SESSION[User::SESSION]['iduser'];\t\t\n\n\t}", "public function getSessionid()\n {\n return $this->sessionid;\n }", "public function getSessionID()\n {\n return $this->getKey('SessionID');\n }", "public function getTrackingAttribute()\n {\n return data_get($this, 'trackingNumber.tracking_number');\n }", "public static function getId(){\n\t\treturn session_id();\n\t}", "public static function getCurLocationID()\n {\n return Yii::app()->getsetSession->getLocationId();\n }", "public function getSessionID()\n {\n return $this->_session;\n }", "public function getID()\n {\n // this only works for web users!\n return $this->session->userdata('ID');\n }", "protected function _getId ()\n {\n return session_id();\n }", "public function getId()\n {\n return $this->getValue('session_id');\n }", "public function getSession()\r\n {\r\n return $this->sessionID;\r\n }", "private function getCurrentID() {\n if ($this->sessionid > 0) {\n\t\t\treturn $this->sessionid;\n\t\t}\n $cookie_id = 0;\n\t\tif (isset($GLOBALS[\"_COOKIE\"][\"sessionid\"])) {\n\t\t\t$cookie_array = explode('|', $GLOBALS[\"_COOKIE\"][\"sessionid\"]);\n\t\t\tif ($cookie_array[0]) {\n\t\t\t\t$cookie_id = $cookie_array[0];\n\t\t\t}\n\t\t}\n\t\treturn $cookie_id;\n }" ]
[ "0.78255403", "0.777399", "0.76148957", "0.7233682", "0.6962543", "0.67749804", "0.67300135", "0.6602317", "0.65683454", "0.6556503", "0.64596075", "0.6437846", "0.64263564", "0.63654274", "0.63055474", "0.63038117", "0.62856865", "0.6276421", "0.62431353", "0.62251395", "0.6170429", "0.61490595", "0.6144043", "0.6141713", "0.6128415", "0.6122834", "0.6101129", "0.6095861", "0.60818887", "0.60724294" ]
0.7838732
0
Add text to current page and return it's coordinates Create new page if needed
public function addText($text = "", $x, $y, $opt = FONT_REGULAR_10, &$curPos = null) { /* Close current page and create new one if current position reach end of page */ if ($curPos && $curPos["y"] <= 10) { $this->endPage(); $this->createPage(); /* Add text to top of new page */ $this->pdf->fit_textline($text, $x, 800, $opt); } else { $this->pdf->fit_textline($text, $x, $y, $opt); } $curPos = array( "x" => $this->pdf->get_option("textx", ""), "y" => $this->pdf->get_option("texty", ""), ); return $curPos; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function page_text($x, $y, $text, $font, $size, $color = array(0,0,0), $adjust = 0, $angle = 0) {\n $this->_pdf->close_object();\n $this->_pdf->page_text($x, $y, $text, $font, $size, $color, $adjust, $angle);\n $this->_pdf->reopen_object($this->_current_page_id);\n }", "function NewPage()\n {\n $ypos = $this->GetY();\n if ($ypos > 230){\n $this->AddPage();\n }\n }", "function newPage($pdf) {\r\n global $OrderId, $currentRow, $itemRowStart;\r\n\r\n $currentRow = $itemRowStart;\r\n\r\n $pdf->Addpage();\r\n $pdf->SetFont('Helvetica', 'B', 16);\r\n $pdf->Image('blissLogo.png');\r\n $pdf->Text(20, 43, \"OrderId:\");\r\n $pdf->Text(43, 43, $OrderId);\r\n $pdf->SetFont('Arial', 'I', 10);\r\n $pdf->SetY(266.5);\r\n $pdf->Cell(0, 10, 'Page ' . $pdf->PageNo(), 0, 0, 'C');\r\n $pdf->line( 12,245,190,245);\r\n$pdf->line( 12,267,190,267);\r\n\r\n \r\n}", "public function insertDocumentNumber(Zend_Pdf_Page $page, $text)\r\n {\r\n // get first page for number\r\n $page = reset($this->_getPdf()->pages);\r\n $page->setFillColor(new Zend_Pdf_Color_GrayScale(1));\r\n $this->_setFontRegular($page, 10);\r\n $docHeader = $this->getDocHeaderCoordinates();\r\n $page->drawText($text, 35, $docHeader[1] - 15, 'UTF-8');\r\n }", "public function pageWithText($page, $text)\n {\n return '';\n }", "function writePage($text) {\n //TODO: Write the text to the page.\n return 1;\n }", "public function add( $text ) {\n\t\t$this->page->append( $text );\n\t}", "private function nextPage() {\n $this->lastPage = array(\n \"vOffset\" => $this->vOffset,\n \"hOffset\" => $this->hOffset,\n );\n $footerToAppend = false;\n $this->currentPageNumber++;\n if (isset($this->pages[$this->currentPageNumber])) {\n $this->currentPage = $this->pages[$this->currentPageNumber];\n $this->vOffset = $this->currentFontSize;\n $this->hOffset = 0;\n } else {\n $this->pages[$this->currentPageNumber] = $this->haruDoc->addPage();\n $this->currentPage = $this->pages[$this->currentPageNumber];\n $this->currentPage->setTextRenderingMode(\\HaruPage::FILL);\n $this->vOffset = $this->currentFontSize;\n $this->hOffset = ($this->hOffset ? $this->hOffset : 0);\n $footerToAppend = true;\n }\n if ($this->currentFont && $this->currentFontSize && $this->currentFontColor) {\n $this->currentPage->setFontAndSize($this->currentFont, $this->currentFontSize);\n $this->setColor($this->currentFontColor[0], $this->currentFontColor[1], $this->currentFontColor[2]);\n }\n if ($footerToAppend && $this->currentPageNumber > 1) {\n $this->currentPage->beginText();\n $this->setFont(self::FONT_NORMAL, 12, array(0,0,0));\n $this->currentPage->textOut($this->PAGE_WIDTH - self::HMARGIN - $this->currentPage->getTextWidth($this->currentPageNumber),\n self::VMARGIN - 30, $this->currentPageNumber);\n $this->revertFont();\n $this->setFont(self::FONT_BOLD, 12, array(0,0,0));\n $this->currentPage->textOut(self::HMARGIN,\n self::VMARGIN - 30, $this->currentBookName);\n $this->revertFont();\n $this->currentPage->endText();\n\n }\n\n }", "public function appendOneLine($text) {\n if (strpos($text, \" \") === 0 && ($this->hOffset == 0 || in_array($this->current[\"char\"], array(\"&\", \"$\")))) {\n $text = substr($text, 1);\n }\n\n $this->currentPage->beginText();\n $nbCarac = $this->currentFont->measureText($text,\n ($this->PAGE_WIDTH - 2*self::HMARGIN - $this->hOffset - $this->permanentLeftSpacing - $this->permanentRightSpacing),\n $this->currentFontSize, $this->currentPage->getCharSpace(),\n $this->currentPage->getWordSpace(), true);\n\n // If a the text content can't be appended (either there is no whitespaces,\n // either the is not enough space in the line)\n if ($nbCarac === 0) {\n $isEnoughSpaceOnNextLine = $this->currentFont->measureText($text,\n ($this->PAGE_WIDTH - 2*self::HMARGIN - $this->permanentLeftSpacing - $this->permanentRightSpacing),\n $this->currentFontSize, $this->currentPage->getCharSpace(),\n $this->currentPage->getWordSpace(), true);\n if ($isEnoughSpaceOnNextLine) {\n $this->currentPage->endText();\n return $text;\n } else {\n $nbCarac = $this->currentFont->measureText($text,\n ($this->PAGE_WIDTH - 2*self::HMARGIN - $this->hOffset - $this->permanentLeftSpacing - $this->permanentRightSpacing),\n $this->currentFontSize, $this->currentPage->getCharSpace(),\n $this->currentPage->getWordSpace(), false);\n }\n }\n\n $isLastLine = ($nbCarac == strlen($text));\n\n $textToAppend = substr($text, 0, $nbCarac);\n $text = substr($text, $nbCarac);\n\n // Append text (in a new page if needed)\n if ($this->PAGE_HEIGHT - (self::VMARGIN + $this->vOffset) < self::VMARGIN) {\n $this->currentPage->endText();\n $this->current[\"pages\"][] = $this->currentPage;\n $this->nextPage();\n $this->currentPage->beginText();\n }\n $this->currentPage->textOut(self::HMARGIN + $this->hOffset + $this->permanentLeftSpacing,\n $this->PAGE_HEIGHT - (self::VMARGIN + $this->vOffset), $textToAppend);\n if ($textToAppend)\n $this->current[\"char\"] = $textToAppend{strlen($textToAppend)-1};\n\n $this->hOffset += $this->currentPage->getTextWidth($textToAppend);\n\n $this->currentPage->endText();\n $this->current[\"charOffset\"] = $this->vOffset;\n\n return ($isLastLine ? null : $text);\n }", "public function drawText(Zend_Pdf_Page $page, $text, $x1, $y1, $x2 = null, $position = self::TEXT_ALIGN_LEFT, $encoding = null) {\n $bottom = $y1; // could do the same for vertical-centering\n\n switch ($position) {\n case self::TEXT_ALIGN_LEFT:\n $left = $x1;\n break;\n case self::TEXT_ALIGN_RIGHT:\n $text_width = $this->getTextWidth($text, $page->getFont(), $page->getFontSize());\n $left = $x1 - $text_width;\n break;\n case self::TEXT_ALIGN_CENTER:\n if (null === $x2) {\n throw new Exception(\"Cannot center text horizontally, x2 is not provided\");\n }\n $text_width = $this->getTextWidth($text, $page->getFont(), $page->getFontSize());\n $box_width = $x2 - $x1;\n $left = $x1 + ($box_width - $text_width) / 2;\n break;\n default:\n throw new Exception(\"Invalid position value \\\"$position\\\"\");\n }\n\n // display multi-line text\n foreach (explode(PHP_EOL, $text) as $i => $line) {\n $page->drawText($line, $left, $bottom - $i * $page->getFontSize(), $encoding);\n }\n return $this;\n }", "function addText($text);", "function addPageContent(& $page, & $parentElement) {\n\t\t$element = $parentElement->appendChild(\n\t\t\t$this->_document->createElement('pageContent'));\n\t\t\n\t\t$this->addCommonProporties($page, $element);\n\t\t\n\t\t$textElement = $element->appendChild($this->_document->createElement('text'));\n\t\t$textElement->appendChild(\n\t\t\t$this->_document->createCDATASection(urldecode($page->getField('text'))));\n\t\t\n\t\tif ($page->getField('location') == 'right')\n\t\t\t$element->setAttribute('location', 'right');\n\t\telse\n\t\t\t$element->setAttribute('location', 'left');\n\t}", "protected function newPage()\n {\n $this->addPage();\n $this->variables['page'] = $this->pageNo();\n if ($this->templatePages > 0) {\n $templateIndex = $this->importPage(min($this->pageNo(), $this->templatePages));\n $this->useImportedPage($templateIndex);\n }\n\n $this->setXY($this->layout['pageNoX'], $this->layout['pageNoY']);\n $this->write(5, $this->t('page'));\n $this->setY($this->layout['contentMarginTopPX']);\n }", "function getPos($sourcefile_width,$sourcefile_height,$pos,$met_image=\"\"){\n if ($met_image){\n $insertfile_width = ImageSx($met_image);\n $insertfile_height = ImageSy($met_image);\n }else {\n $lineCount = explode(\"\\r\\n\",$this->met_text);\n $fontSize = imagettfbbox($this->met_text_size,$this->met_text_angle,$this->met_text_font,$this->met_text);\n $insertfile_width = $fontSize[2] - $fontSize[0];\n $insertfile_height = count($lineCount)*($fontSize[1] - $fontSize[5]);\n\t\t\t $fontSizeone =imagettfbbox($this->met_text_size,$this->met_text_angle,$this->met_text_font,'e');\n\t\t\t $fontSizeone = ($fontSizeone[2] - $fontSizeone[0])/2;\n }\n\t\tswitch ($pos){\n\t\t\tcase 0:\n\t\t\t $dest_x = ( $sourcefile_width / 2 ) - ( $insertfile_width / 2 );\n\t\t\t $dest_y = ( $sourcefile_height / 2 ) + ( $insertfile_height / 2 );\n\t\t\t break;\n\n\t\t\tcase 1:\n\t\t\t $dest_x = 0;\n\t\t\t $dest_y = $insertfile_height;\n\t\t\t break;\n\t\t\tcase 2:\n\t\t\t $dest_x = $sourcefile_width - $insertfile_width-$fontSizeone;\n\t\t\t $dest_y = $insertfile_height;\n\t\t\t break;\n\n\t\t\tcase 3:\n\t\t\t $dest_x = $sourcefile_width - $insertfile_width-$fontSizeone;\n\t\t\t $dest_y = $sourcefile_height - ($insertfile_height/4);\n\t\t\t break;\n\n\t\t\tcase 4:\n\t\t\t $dest_x = 0;\n\t\t\t $dest_y = $sourcefile_height - ($insertfile_height/4);\n\t\t\t break;\n\n\t\t\tcase 5:\n\t\t\t $dest_x = ( ( $sourcefile_width - $insertfile_width ) / 2 );\n\t\t\t $dest_y = $insertfile_height;\n\t\t\t break;\n\n\t\t\tcase 6:\n\t\t\t $dest_x = $sourcefile_width - $insertfile_width -$fontSizeone;\n\t\t\t $dest_y = ( $sourcefile_height / 2 ) + ( $insertfile_height / 2 );\n\t\t\t break;\n\n\t\t\tcase 7:\n\t\t\t $dest_x = ( ( $sourcefile_width - $insertfile_width ) / 2 );\n\t\t\t $dest_y = $sourcefile_height - ($insertfile_height/4);\n\t\t\t break;\n\n\t\t\tcase 8:\n\t\t\t $dest_x = 0;\n\t\t\t $dest_y = ( $sourcefile_height / 2 ) + ( $insertfile_height / 2 );\n\t\t\t break;\n\n\t\t\tdefault:\n\t\t\t $dest_x = $sourcefile_width - $insertfile_width;\n\t\t\t $dest_y = $sourcefile_height - $insertfile_height;\n\t\t\t break;\n\t\t}\t\n\t\tif($met_image){\n\t\t\t$dest_y=$dest_y-$insertfile_height;\n\t\t}\n return array(\"dest_x\"=>$dest_x,\"dest_y\"=>$dest_y);\n}", "function addPage($pdf,$font='freesans'){\n $pdf->AddPage();\n $pdf->SetXY(110,10);\n $pdf->SetFont($font, '', 20);\n $pdf->writeHTML('Relação de Vendas');\n $pdf->SetXY(10,24);\n $pdf->SetFont($font, 'B', 11);\n $pdf->writeHTMLCell(15, 0, $pdf->GetX(), $pdf->GetY(), '<b>Pedido</b>');\n $pdf->writeHTMLCell(40, 0, $pdf->GetX(), $pdf->GetY(), '<b>NF</b>');\n $pdf->writeHTMLCell(50, 0, $pdf->GetX(), $pdf->GetY(), '<b>Loja</b>');\n $pdf->writeHTMLCell(40, 0, $pdf->GetX(), $pdf->GetY(), '<b>Vendedor</b>');\n $pdf->writeHTMLCell(40, 0, $pdf->GetX(), $pdf->GetY(), '<b>Cliente</b>');\n $pdf->writeHTMLCell(25, 0, $pdf->GetX(), $pdf->GetY(), '<b>Data</b>');\n $pdf->writeHTMLCell(20, 0, $pdf->GetX(), $pdf->GetY(), '<b>Arred.</b>');\n $pdf->writeHTMLCell(25, 0, $pdf->GetX(), $pdf->GetY(), '<b>Desconto</b>');\n $pdf->writeHTMLCell(30, 0, $pdf->GetX(), $pdf->GetY(), '<b>Valor</b>');\n $pdf->Ln();\n $pdf->SetY($pdf->GetY()+2);\n $pdf->Line(10, $pdf->GetY(), 285, $pdf->GetY()); // Desenha uma linha\n $pdf->SetY($pdf->GetY()+2);\n }", "public function pageWithText(int $page, string $text, ?string $rel = null): string;", "public function appendText($text) {\n// if ($this->vOffset > $this->current[\"charOffset\"] + 3*LINE_SPACING + 3*$this->currentFontSize)\n// $this->vOffset = $this->current[\"charOffset\"] + 3*LINE_SPACING + 3*$this->currentFontSize;\n if ($this->appendToBuffer) {\n array_push($this->buffer, array(\n \"text\" => $text,\n \"font\" => $this->currentFont,\n \"size\" => $this->currentFontSize,\n \"color\" => $this->currentFontColor\n ));\n return;\n }\n\n $this->currentPage->beginText();\n do {\n // Clear the whitespace if it begins the line or if last char is a special char\n if (strpos($text, \" \") === 0 && ($this->hOffset == 0 || in_array($this->current[\"char\"], array(\"&\", \"$\")))) {\n $text = substr($text, 1);\n }\n\n // Number of chars allowed in the current line\n $nbCarac = $this->currentFont->measureText($text,\n ($this->PAGE_WIDTH - 2*self::HMARGIN - $this->hOffset - $this->permanentLeftSpacing - $this->permanentRightSpacing),\n $this->currentFontSize, $this->currentPage->getCharSpace(),\n $this->currentPage->getWordSpace(), true);\n\n // If a the text content can't be appended (either there is no whitespaces,\n // either the is not enough space in the line)\n if ($nbCarac === 0) {\n $isEnoughSpaceOnNextLine = $this->currentFont->measureText($text,\n ($this->PAGE_WIDTH - 2*self::HMARGIN - $this->permanentLeftSpacing - $this->permanentRightSpacing),\n $this->currentFontSize, $this->currentPage->getCharSpace(),\n $this->currentPage->getWordSpace(), true);\n if ($isEnoughSpaceOnNextLine) {\n $this->vOffset += $this->currentFontSize + self::LINE_SPACING;\n $this->hOffset = 0;\n $isLastLine = false;\n continue;\n } else {\n $nbCarac = $this->currentFont->measureText($text,\n ($this->PAGE_WIDTH - 2*self::HMARGIN - $this->hOffset - $this->permanentLeftSpacing - $this->permanentRightSpacing),\n $this->currentFontSize, $this->currentPage->getCharSpace(),\n $this->currentPage->getWordSpace(), false);\n }\n }\n $isLastLine = ($nbCarac == strlen($text));\n\n $textToAppend = substr($text, 0, $nbCarac);\n $text = substr($text, $nbCarac);\n\n // Append text (in a new page if needed) with align\n if ($this->PAGE_HEIGHT - (self::VMARGIN + $this->vOffset) < self::VMARGIN) {\n $this->currentPage->endText();\n $this->current[\"pages\"][] = $this->currentPage;\n $this->nextPage();\n $this->currentPage->beginText();\n }\n if ($this->current[\"align\"] == \"center\") {\n $spacing = $this->PAGE_WIDTH - 2*self::HMARGIN -\n $this->permanentLeftSpacing - $this->permanentRightSpacing - $this->currentPage->getTextWidth($textToAppend);\n $this->currentPage->textOut(self::HMARGIN + $this->hOffset + $this->permanentLeftSpacing + $spacing/2,\n $this->PAGE_HEIGHT - (self::VMARGIN + $this->vOffset), $textToAppend);\n } elseif ($this->current[\"align\"] == \"right\") {\n $spacing = $this->PAGE_WIDTH - 2*self::HMARGIN -\n $this->permanentLeftSpacing - $this->permanentRightSpacing - $this->currentPage->getTextWidth($textToAppend);\n $this->currentPage->textOut(self::HMARGIN + $this->hOffset + $this->permanentLeftSpacing + $spacing,\n $this->PAGE_HEIGHT - (self::VMARGIN + $this->vOffset), $textToAppend);\n } else { // left\n $this->currentPage->textOut(self::HMARGIN + $this->hOffset + $this->permanentLeftSpacing,\n $this->PAGE_HEIGHT - (self::VMARGIN + $this->vOffset), $textToAppend);\n }\n if ($textToAppend)\n $this->current[\"char\"] = $textToAppend{strlen($textToAppend)-1};\n\n // Offsets for next line\n if (!$isLastLine) {\n $this->vOffset += $this->currentFontSize + self::LINE_SPACING;\n $this->hOffset = 0;\n } else {\n $this->hOffset += $this->currentPage->getTextWidth($textToAppend);\n }\n\n }\n while(!$isLastLine); // While it remains chars to append\n $this->currentPage->endText();\n $this->current[\"charOffset\"] = $this->vOffset;\n }", "function locationsAddLocation($text){\n array_push($text, array('key' => 'PARENT_LOCATIONS_ADD_LOCATION',\n 'parent' => '',\n 'text' => 'Locations - Add location'));\n \n array_push($text, array('key' => 'LOCATIONS_ADD_LOCATION_NAME',\n 'parent' => 'PARENT_LOCATIONS_ADD_LOCATION',\n 'text' => 'New location'));\n array_push($text, array('key' => 'LOCATIONS_ADD_LOCATION_SUBMIT',\n 'parent' => 'PARENT_LOCATIONS_ADD_LOCATION',\n 'text' => 'Add location'));\n array_push($text, array('key' => 'LOCATIONS_ADD_LOCATION_ADDING',\n 'parent' => 'PARENT_LOCATIONS_ADD_LOCATION',\n 'text' => 'Adding a new location ...'));\n array_push($text, array('key' => 'LOCATIONS_ADD_LOCATION_SUCCESS',\n 'parent' => 'PARENT_LOCATIONS_ADD_LOCATION',\n 'text' => 'You have succesfully added a new location.'));\n \n return $text;\n }", "function do_text_text_content($textid, $only_body=true): void\n{\n // Text settings\n $record = get_text_data($textid);\n $title = $record['TxTitle'];\n $langid = (int)$record['TxLgID'];\n $ann = $record['TxAnnotatedText'];\n $pos = $record['TxPosition'];\n \n // Language settings\n $record = get_language_settings($langid);\n $wb1 = isset($record['LgDict1URI']) ? $record['LgDict1URI'] : \"\";\n $wb2 = isset($record['LgDict2URI']) ? $record['LgDict2URI'] : \"\";\n $wb3 = isset($record['LgGoogleTranslateURI']) ? $record['LgGoogleTranslateURI'] : \"\";\n $textsize = $record['LgTextSize'];\n $removeSpaces = $record['LgRemoveSpaces'];\n $rtlScript = (bool)$record['LgRightToLeft'];\n \n // User settings\n $showAll = getSettingZeroOrOne('showallwords', 1);\n $showLearning = getSettingZeroOrOne('showlearningtranslations', 1);\n \n /**\n * @var int $mode_trans \n * Annotation position between 0 and 4\n */\n $mode_trans = (int) getSettingWithDefault('set-text-frame-annotation-position');\n /**\n * @var bool $ruby \n * Ruby annotations\n */\n $ruby = $mode_trans==2 || $mode_trans==4;\n\n if (!$only_body) {\n // Start the page with a HEAD and opens a BODY tag \n pagestart_nobody($title);\n }\n ?>\n <script type=\"text/javascript\" src=\"js/jquery.hoverIntent.js\" charset=\"utf-8\"></script>\n <?php \n $visit_status = getSettingWithDefault('set-text-visit-statuses-via-key');\n if ($visit_status == '') {\n $visit_status = '0';\n }\n $var_array = array(\n // Change globals from jQuery hover\n 'ANN_ARRAY' => json_decode(annotation_to_json($ann)),\n 'DELIMITER' => tohtml(\n str_replace(\n array('\\\\',']','-','^'), \n array('\\\\\\\\','\\\\]','\\\\-','\\\\^'), \n getSettingWithDefault('set-term-translation-delimiters')\n )\n ),\n 'WBLINK1' => $wb1,\n 'WBLINK2' => $wb2,\n 'WBLINK3' => $wb3,\n 'RTL' => $rtlScript,\n 'TID' => $textid,\n 'ADDFILTER' => makeStatusClassFilter((int)$visit_status),\n 'JQ_TOOLTIP' => getSettingWithDefault('set-tooltip-mode') == 2 ? 1 : 0,\n // Add new globals\n 'ANNOTATIONS_MODE' => $mode_trans,\n 'POS' => $pos\n );\n do_text_text_javascript($var_array);\n do_text_text_style($showLearning, $mode_trans, $textsize, strlen($ann) > 0);\n ?>\n\n <div id=\"thetext\" <?php echo ($rtlScript ? 'dir=\"rtl\"' : '') ?>>\n <p style=\"margin-bottom: 10px;\n <?php echo $removeSpaces ? 'word-break:break-all;' : ''; ?>\n font-size: <?php echo $textsize; ?>%; \n line-height: <?php echo $ruby?'1':'1.4'; ?>;\"\n >\n <!-- Start displaying words -->\n <?php main_word_loop($textid, $showAll); ?></span>\n </p>\n <p style=\"font-size:<?php echo $textsize; ?>%;line-height: 1.4; margin-bottom: 300px;\">&nbsp;</p>\n </div>\n <?php \n if (!$only_body) { \n pageend(); \n }\n flush();\n}", "private function printTextToBlock(&$pdf, $text, $w, $h, $x, $y, $lpl = null, $line = 1, $align = 'L', $valign = 'M')\n {\n// $text = str_pad('', 9999, '成績の概要当期の営業');\n if (!is_null($lpl)) {\n if (mb_strlen($text, 'utf-8') > ($lpl * $line)) {\n $text = mb_substr($text, 0, ($lpl * $line), 'utf-8');\n }\n $lines = array();\n for ($i = 0; $i < $line; $i++) {\n if (mb_strlen($text, 'utf-8') > $lpl) {\n $lines[] = mb_substr($text, 0, $lpl, 'utf-8');\n $text = mb_substr($text, $lpl, null, 'utf-8');\n } else {\n $lines[] = $text;\n break;\n }\n }\n $text = implode(\"\\n\", $lines);\n }\n\n $pdf->MultiCell($w, $h, $text, 0, $align, false, 0, $x, $y, true, 0, false, true, $h, $valign);\n }", "function appendPage($pageName, $newPageBody)\n{\n $newPageBody = trim($newPageBody);\n $sFile = getPagePath($pageName);\n if($newPageBody != \"\")\n {\n $f = fopen($sFile, \"at\");\n fwrite($f, \"\\n\\n\\n\\n\");\n fwrite($f, $newPageBody);\n fclose($f);\n }\n else\n {\n @unlink($sFile);\n }\n}", "function updateTextPosition($p_id, $p_x, $p_y) {\n\t$con = open_connection();\n\tmysqli_query($con,\"UPDATE text SET x_coordinate = '\". $p_x .\"', y_coordinate = '\". $p_y .\"' WHERE text_id = '\". $p_id .\"'\");\n\tmysqli_close($con);\n}", "function NewPageHeader () {\n\tglobal $PageNumber,\n\t\t\t\t$pdf,\n\t\t\t\t$YPos,\n\t\t\t\t$YPos2,\n\t\t\t\t$YPos4,\n\t\t\t\t$Page_Height,\n\t\t\t\t$Page_Width,\n\t\t\t\t$Top_Margin,\n\t\t\t\t$FontSize,\n\t\t\t\t$Left_Margin,\n\t\t\t\t$XPos,\n\t\t\t\t$XPos2,\n\t\t\t\t$Right_Margin,\n\t\t\t\t$line_height;\n\t\t\t\t$line_width;\n\n\t/*PDF page header for GL Account report */\n\n\tif ($PageNumber > 1){\n\t\t$pdf->newPage();\n\t}\n$YPos= $Page_Height-$Top_Margin;\n\n\n\t\n\n\n}", "function printOtherInfos($pdf, $infosUtiles) {\n $pdf->setPrintFooter(true);\n $pdf->setPrintHeader(true);\n $pdf->AddPage();\n $pdf->Bookmark('Informations utiles', 2, 0, '', '', array(128, 0, 0));\n $pdf->SetTextColor(255, 255, 255);\n $pdf->SetFont('helvetica', '', 17);\n $pdf->SetXY(7, 25);\n $pdf->Cell(52, 0, \"Informations utiles \", 0, false, 'L', 1, '', 0, false, 'M', 'M');\n $pdf->SetXY(7, 35);\n preHTML($pdf);\n $pdf->writeHTML($infosUtiles, true, 0, true, 0);\n}", "function textOut($x, $y, $text)\r\n {\r\n $this->forceFont();\r\n echo \"$this->_canvas.drawString(\\\"$text\\\", $x, $y);\\n\";\r\n }", "protected function getActivePageWrapper($text)\n {\n return sprintf($this->activePageWrapper, $text);\n }", "function addText()\r\n {\r\n return null; //PEAR::raiseError(\"No addText method exists\", true);\r\n }", "function PDF_add_weblink($pdfdoc, $lowerleftx, $lowerlefty, $upperrightx, $upperrighty, $url)\n{\n}", "public function drawPage()\n\t\t{\n\t\t}", "public function main(){\n $pdf = new PDF();\n $pdf->AliasNbPages();\n $pdf->AddPage();\n $pdf->SetFont('Times','',12);\n for($i=1;$i<=40;$i++){\n $pdf->Cell(0,10,'Printing line number '.$i,0,1);\n }\n\n // First page\n $html = 'You can now<np> easily print text mixing different styles: <b>bold</b>, <i>italic</i>,\n <u>underlined</u>, or <b><i><u>all at once</u></i></b>!<br><br>You can also insert links on\n text, such as <a href=\"http://www.fpdf.org\">www.fpdf.org</a>, or on an image: click on the logo.';\n\n $pdf->AddPage();\n $pdf->SetFont('Arial','',20);\n // $pdf->Write(5,\"To find out what's new in this tutorial, click \");\n // $pdf->SetFont('','U');\n // $link = $pdf->AddLink();\n // $pdf->Write(5,'here',$link);\n // $pdf->SetFont('');\n // // Second page\n // $pdf->AddPage();\n // $pdf->SetLink($link);\n // $pdf->Image('logo.png',10,12,30,0,'','http://www.fpdf.org');\n $pdf->SetLeftMargin(15);\n $pdf->SetFontSize(14);\n $pdf->WriteHTML($html);\n\n $pdf->Output();\n\n }" ]
[ "0.625468", "0.6119661", "0.60499084", "0.58596385", "0.5695841", "0.56725997", "0.5637599", "0.5576045", "0.5564694", "0.5549563", "0.5519742", "0.5501276", "0.5466034", "0.5432984", "0.5429372", "0.5407655", "0.5387293", "0.5349953", "0.5346931", "0.53123045", "0.529699", "0.52808636", "0.5196804", "0.5196088", "0.51957506", "0.51886207", "0.51758003", "0.5170365", "0.5160103", "0.5158617" ]
0.6525794
0
find'n replace Mycpts & Mycpt (as cpt). Remember to preseve case include in functions.php add custom meta to cpt_mycpt_box_content & cpt_mycpt_meta_box_save functions
function cpt_mycpt_box() { add_meta_box( 'cpt_mycpt_box', __( 'Mycpt', '' ), 'cpt_mycpt_box_content', 'mycpt', 'side', 'high' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wpsl_convert_cpt() {\n \n if ( !current_user_can( 'manage_options' ) )\n die( '-1' );\n check_ajax_referer( 'wpsl-cpt-fix' );\n\n // Start the cpt coversion.\n wpsl_cpt_conversion();\n\n exit();\n}", "public function cws_register_cpt() {\n\n\t\tforeach ( $this->cpts as $key => $value ) {\n\n\t\t\tregister_post_type( $key, $value );\n\n\t\t}\n\n\t}", "public static function cpt_meta_box_markup( $object, $item ) {\n\t\t$info = self::build_cpt_info( $item );\n\t\t$meta_key = $info[\"meta_key\"];\n\t\t$nonce_key = $info[\"nonce_key\"];\n\t\t$cpt_type = $info[\"cpt_type\"];\n\t\t$cpt_form_field = $info[\"cpt_form_field\"] . \"[]\";\n\t\t$current_ids = self::get_by_type_and_page( $item, $object->ID );\n\t\t//$current_ids = get_post_meta($object->ID, $meta_key, true);\n\t\t$all_items = self::get_all( $item );\n\n\t\twp_nonce_field( basename( __FILE__ ), $nonce_key );\n\t\techo \"<div class='evo_cpt_list'>\";\n\t\tself::log_obect( $current_ids );\n\t\tif ( $current_ids ) {\n\t\t\tforeach ( $current_ids as $id ) {\n\t\t\t\techo sprintf( \"<div class=\\\"current_cpts\\\">%s<input type=\\\"hidden\\\" name=\\\"{$cpt_form_field}\\\" value=\\\"%s\\\" /><div class=\\\"evo_remove\\\"></div></div>\\n\", $all_items[ $id ]->post_title, $id );\n\t\t\t}\n\n\t\t}\n\t\techo \"</div>\";\n\t\techo '<div class=\"evo_select_callout\">';\n\t\techo \"<select name='evo_new_{$item}_id'>\";\n\t\techo \"<option value='select'>Select a {$info[\"cpt_text\"]}</option>\";\n\t\tif ( $all_items ) {\n\t\t\tforeach ( $all_items as $item ) {\n\t\t\t\techo sprintf( \"<option value=\\\"%s\\\">%s</option>\", $item->ID, $item->post_title );\n\t\t\t}\n\t\t}\n\n\t\techo '</select>';\n\t\techo \"<div data-field-name='{$cpt_form_field}' class='evo_add_cpt'></div>\";\n\t\techo '</div>';\n\t}", "function elijah_customize_cpt_content( $content ) {\n\tif( ! is_archive() && ! is_author() && !is_search() ) {\n\t\tif ($GLOBALS['post']->post_type == 'research_goal') {\n\t\t\tob_start();\n\t\t\tinclude( elijah_templates_dir . 'research-goal-content.php' );\n\t\t\t$content = ob_get_contents();\n\t\t\tob_end_clean();\n\t\t} elseif( $GLOBALS['post']->post_type == 'research_tip') {\n\t\t\tob_start();\n\t\t\tinclude( elijah_templates_dir . 'research-tip-content.php' );\n\t\t\t$content = ob_get_contents();\n\t\t\tob_end_clean();\n\t\t}\n\t}\n\treturn $content;\n}", "function customize_meta_boxes()\n{\n // These remove meta boxes from POSTS\n //remove_post_type_support(\"post\",\"excerpt\"); //Remove Excerpt Support\n //remove_post_type_support(\"post\",\"author\"); //Remove Author Support\n //remove_post_type_support(\"post\",\"revisions\"); //Remove Revision Support\n //remove_post_type_support(\"post\",\"comments\"); //Remove Comments Support\n //remove_post_type_support(\"post\",\"trackbacks\"); //Remove trackbacks Support\n //remove_post_type_support(\"post\",\"editor\"); //Remove Editor Support\n //remove_post_type_support(\"post\",\"custom-fields\"); //Remove custom-fields Support\n //remove_post_type_support(\"post\",\"title\"); //Remove Title Support\n\n\n // These remove meta boxes from PAGES\n //remove_post_type_support(\"page\",\"revisions\"); //Remove Revision Support\n //remove_post_type_support(\"page\",\"comments\"); //Remove Comments Support\n //remove_post_type_support(\"page\",\"author\"); //Remove Author Support\n //remove_post_type_support(\"page\",\"trackbacks\"); //Remove trackbacks Support\n //remove_post_type_support(\"page\",\"custom-fields\"); //Remove custom-fields Support\n\n}", "function setting_admin_include_cpt() {\n\t$options = get_option('nrelate_admin_options');\n\t\n\t$selected = isset( $options['admin_include_post_types'] ) ? $options['admin_include_post_types'] : array( 'post' );\n\t\n\t$post_types = get_post_types( \n\t\tarray(\n\t\t\t'public'=>true, \n\t\t\t//'publicly_queryable'=>true,\n\t\t\t//'capability_type'=> array('post','page'),\n\t\t\t'show_ui'=>true\n\t\t), 'object' \n\t);\n\t\n\techo \"<div id='nrelate-include-cpts' class='cptdiv'><ul id='posttypeschecklist' class='list:posttypes categorychecklist form-no-clear'>\";\n\t\n\tforeach ( $post_types as $id => $post_type ) {\n\t\t$checked = in_array( $id, $selected ) ? \"checked='checked'\" : \"\";\n\t\techo \"<li id='post-type-{$id}'><label class='selectit'><input type='checkbox' value='{$id}' name='nrelate_admin_options[admin_include_post_types][]' {$checked} id='in-post-type-{$id}' /> {$post_type->name}</label></li>\";\n\t}\n\t\n\techo '</ul></div>';\n\n\n$javascript_cpt = <<< JAVA_SCRIPT\njQuery(document).ready(function(){\n\tvar nrel_include_cpts_changed = false;\n\t\n\tjQuery('#nrelate-include-cpts :checkbox').change(function(){\n\t\tvar me= jQuery(this);\n\t\tif (!nrel_include_cpts_changed) {\n\t\t\tif (confirm(\"Any changes to this section will require a site reindex. Are you sure you want to continue?\\u000AIf Yes, press OK, SAVE CHANGES and press the REINDEX button (Reindexing may take a while, please be patient).\"))\n\t\t\t{\n\t\t\t\tnrel_include_cpts_changed = true;\n\t\t\t} \n\t\t\telse \n\t\t\t{\n\t\t\t\tme.attr('checked', !me.is(':checked'));\n\t\t\t}\n\t\t}\n\t});\t\t\t\t\t\t\t\t\n});\nJAVA_SCRIPT;\n\n\techo \"<script type='text/javascript'>{$javascript_cpt}</script>\";\n}", "function _sp_custom_meta_boxes() {\n\t$post_id = ( isset( $_GET['post'] ) ) ? $_GET['post'] : ( isset( $_POST['post_ID'] ) ? $_POST['post_ID'] : '');\n\n\t$template_file = get_post_meta( $post_id, '_wp_page_template', TRUE );\n\n\t/////////////////////////////////////////////////////\n\t// portfolio sort position\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'portfolio-sort-position',\n\t\t__( 'Sort Position', 'sp-theme' ),\n\t\t'_sp_custom_box_portfolio_sort_position',\n\t\t'sp-portfolio',\n\t\t'side',\n\t\t'low' \n\t);\n\n\t/////////////////////////////////////////////////////\n\t// slider carousel shortcode\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'carousel-shortcode',\n\t\t__( 'Carousel Shortcode', 'sp-theme' ),\n\t\t'_sp_custom_box_carousel_shortcode',\n\t\t'sp-slider',\n\t\t'side',\n\t\t'low' \n\t);\n\n\t/////////////////////////////////////////////////////\n\t// wpautop post\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_auto_formatting_post',\n\t\t__( 'Auto Content Formating', 'sp-theme' ),\n\t\t'_sp_custom_box_wpautop',\n\t\t'post',\n\t\t'side',\n\t\t'low' \n\t);\n\n\t/////////////////////////////////////////////////////\n\t// wpautop page\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_auto_formatting_page',\n\t\t__( 'Auto Content Formating', 'sp-theme' ), \n\t\t'_sp_custom_box_wpautop',\n\t\t'page',\n\t\t'side',\n\t\t'low'\n\t);\t\n\n\t/////////////////////////////////////////////////////\n\t// wpatup portfolio\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_auto_formatting_portfolio',\n\t\t__( 'Auto Content Formating', 'sp-theme' ), \n\t\t'_sp_custom_box_wpautop',\n\t\t'sp-portfolio',\n\t\t'side',\n\t\t'low'\n\t);\t\n\n\t/////////////////////////////////////////////////////\n\t// custom page layout page\n\t/////////////////////////////////////////////////////\n\t// don't show on maintenance page\n\tif ( $template_file !== 'maintenance-page.php' ) {\n\t\tadd_meta_box(\n\t\t\t'sp_page_layout',\n\t\t\t__( 'Custom Sidebar Layout', 'sp-theme' ), \n\t\t\t'_sp_custom_box_layout',\n\t\t\t'page',\n\t\t\t'side',\n\t\t\t'low'\n\t\t);\t\n\t}\n\n\t/////////////////////////////////////////////////////\n\t// custom page layout post\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_post_layout',\n\t\t__( 'Custom Sidebar Layout', 'sp-theme' ), \n\t\t'_sp_custom_box_layout',\n\t\t'post',\n\t\t'side',\n\t\t'low'\n\t);\t\n\n\t/////////////////////////////////////////////////////\n\t// custom page layout portfolio\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_portfolio_layout',\n\t\t__( 'Custom Sidebar Layout', 'sp-theme' ), \n\t\t'_sp_custom_box_layout',\n\t\t'sp-portfolio',\n\t\t'side',\n\t\t'low'\n\t);\n\n\t/////////////////////////////////////////////////////\n\t// custom page layout product\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_product_layout',\n\t\t__( 'Custom Sidebar Layout', 'sp-theme' ), \n\t\t'_sp_custom_box_layout',\n\t\t'product',\n\t\t'side',\n\t\t'low'\n\t);\n\n\t// check if SEO enabled\n\tif ( sp_get_option( 'seo_enable', 'is', 'on' ) || ! sp_get_option( 'seo_enable', 'isset' ) ) {\n\n\t\t/////////////////////////////////////////////////////\n\t\t// seo post\n\t\t/////////////////////////////////////////////////////\n\t\tadd_meta_box(\n\t\t\t'sp_seo_settings',\n\t\t\t__( 'Seo Settings', 'sp-theme' ),\n\t\t\t'_sp_custom_box_seo_settings',\n\t\t\t'post'\n\t\t);\n\n\t\t/////////////////////////////////////////////////////\n\t\t// seo page\n\t\t/////////////////////////////////////////////////////\n\t\t// don't show on maintenance page\n\t\tif ( $template_file !== 'maintenance-page.php' ) {\n\t\t\tadd_meta_box(\n\t\t\t\t'sp_seo_settings',\n\t\t\t\t__( 'Seo Settings', 'sp-theme' ),\n\t\t\t\t'_sp_custom_box_seo_settings',\n\t\t\t\t'page'\n\t\t\t);\n\t\t}\n\n\t\t/////////////////////////////////////////////////////\n\t\t// seo woo product\n\t\t/////////////////////////////////////////////////////\n\t\tadd_meta_box(\n\t\t\t'sp_seo_settings',\n\t\t\t__( 'Seo Settings', 'sp-theme' ),\n\t\t\t'_sp_custom_box_seo_settings',\n\t\t\t'product'\n\t\t);\n\n\t\t/////////////////////////////////////////////////////\n\t\t// seo portfolio\n\t\t/////////////////////////////////////////////////////\n\t\tadd_meta_box(\n\t\t\t'sp_seo_settings',\n\t\t\t__( 'Seo Settings', 'sp-theme' ),\n\t\t\t'_sp_custom_box_seo_settings',\n\t\t\t'sp-portfolio'\n\t\t);\n\t}\n\t\n\t/////////////////////////////////////////////////////\n\t// testimonial submitter\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_testimonial_submitter',\n\t\t__( 'Testimonial Submitter', 'sp-theme' ),\n\t\t'_sp_custom_box_testimonial_settings',\n\t\t'sp-testimonial',\n\t\t'side',\n\t\t'core'\n\t); \n\n\t/////////////////////////////////////////////////////\n\t// advanced page options\n\t/////////////////////////////////////////////////////\n\t// don't show on maintenance page\n\tif ( $template_file !== 'maintenance-page.php' ) {\t\n\t\tadd_meta_box(\n\t\t\t'sp_advanced_page_options',\n\t\t\t__( 'Advanced Options', 'sp-theme' ),\n\t\t\t'_sp_custom_box_advanced_page_options',\n\t\t\t'page'\n\t\t);\n\t}\n\n\t/////////////////////////////////////////////////////\n\t// advanced post options\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_advanced_post_options',\n\t\t__( 'Advanced Options', 'sp-theme' ),\n\t\t'_sp_custom_box_advanced_page_options',\n\t\t'post'\n\t);\n\n\t/////////////////////////////////////////////////////\n\t// advanced portfolio options\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_advanced_portfolio_options',\n\t\t__( 'Advanced Options', 'sp-theme' ),\n\t\t'_sp_custom_box_advanced_page_options',\n\t\t'sp-portfolio'\n\t);\n\n\t/////////////////////////////////////////////////////\n\t// advanced woo product options\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_advanced_woo_product_options',\n\t\t__( 'Advanced Options', 'sp-theme' ),\n\t\t'_sp_custom_box_advanced_page_options',\n\t\t'product'\n\t);\n\n\t/////////////////////////////////////////////////////\n\t// contact form shortcode\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'contact-form-shortcode',\n\t\t__( 'Contact Form Shortcode', 'sp-theme' ),\n\t\t'_sp_custom_box_contact_form_shortcode',\n\t\t'sp-contact-form',\n\t\t'side',\n\t\t'low' \n\t);\n\n\t/////////////////////////////////////////////////////\n\t// contact form general settings\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'contact-form-settings',\n\t\t__( 'Contact Form Settings', 'sp-theme' ),\n\t\t'_sp_custom_box_contact_form_settings',\n\t\t'sp-contact-form',\n\t\t'normal',\n\t\t'high'\n\t);\n\t\n\t/////////////////////////////////////////////////////\n\t// contact form content\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'contact-form-content',\n\t\t__( 'Contact Form Content', 'sp-theme' ),\n\t\t'_sp_custom_box_contact_form_content',\n\t\t'sp-contact-form',\n\t\t'normal',\n\t\t'high'\n\t); \n\n\t/////////////////////////////////////////////////////\n\t// contact form messages\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'contact-form-messages',\n\t\t__( 'Contact Form Messages', 'sp-theme' ),\n\t\t'_sp_custom_box_contact_form_messages',\n\t\t'sp-contact-form',\n\t\t'normal',\n\t\t'high'\n\t);\n\n\t/////////////////////////////////////////////////////\n\t// page builder page\n\t/////////////////////////////////////////////////////\n\t// don't show on maintenance page\n\tif ( $template_file !== 'maintenance-page.php' ) {\t\n\t\tadd_meta_box(\n\t\t\t'page-builder',\n\t\t\t__( 'Page Builder', 'sp-theme' ),\n\t\t\t'_sp_custom_box_page_builder',\n\t\t\t'page',\n\t\t\t'normal',\n\t\t\t'high'\n\t\t);\n\t}\n\n\t/////////////////////////////////////////////////////\n\t// alternate product image on hover\n\t/////////////////////////////////////////////////////\n\t/*\n\tadd_meta_box(\n\t\t'sp_alternate_product_image',\n\t\t__( 'Alternate Product Image', 'sp-theme' ),\n\t\t'_sp_custom_box_alternate_product_image',\n\t\t'product',\n\t\t'side',\n\t\t'low' \n\t);\n\t*/\n\n\t/////////////////////////////////////////////////////\n\t// custom product tabs\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_custom_product_tabs',\n\t\t__( 'Product Tabs Option', 'sp-theme' ),\n\t\t'_sp_custom_product_tabs',\n\t\t'product',\n\t\t'normal',\n\t\t'low' \n\t);\n\n\t/////////////////////////////////////////////////////\n\t// featured video post\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_featured_video',\n\t\t__( 'Featured Video', 'sp-theme' ), \n\t\t'_sp_custom_box_featured_video',\n\t\t'post',\n\t\t'side',\n\t\t'low'\n\t);\t\n\n\t/////////////////////////////////////////////////////\n\t// faq sort order\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_faq_order',\n\t\t__( 'Sort Order', 'sp-theme' ), \n\t\t'_sp_custom_box_faq_order',\n\t\t'sp-faq',\n\t\t'side',\n\t\t'low'\n\t);\t\n\n\treturn true;\n}", "function dupeoff_add_custom_box() {\n\tadd_meta_box( \n\t'dupeoff',\n\t__( 'DupeOff - Plagiarism and Duplicate Content Report', 'dupeoff_textdomain' ),\n\t'dupeoff_inner_custom_box',\n\t'post' \n\t);\n\tadd_meta_box( \n\t'dupeoff',\n\t__( 'DupeOff - Plagiarism and Duplicate Content Report', 'dupeoff_textdomain' ),\n\t'dupeoff_inner_custom_box',\n\t'page' \n\t);\n}", "function meetup_cpt_cb() {\n\n //https://developer.wordpress.org/reference/functions/get_post_type_labels/\n\n\n $mov_labels = array(\n 'name' => __('Movies'),\n 'singular_name' => __('Previous Movie'),\n 'add_new' => __('Add New Movie'),\n 'add_new_item' => __('Add New Movie'),\n 'edit_item' => __('Edit this Movie'),\n 'new_item' => __('New Movie'),\n 'view_item' => __('View Movies'),\n 'search_items' => __('Search Previous Movies'),\n 'not_found' => __('Na na na'),\n 'not_found_in_trash' => __('Nothing in the trash ladies and gentlemen!')\n );\n\n //https://developer.wordpress.org/reference/functions/register_post_type/\n $mov_args = array(\n 'labels' => $mov_labels,\n 'description' => 'Give this description some love',\n 'public' => true,\n 'publicly_queryable' => true,\n 'show_ui' => true,\n 'query_var' => true,\n 'menu_icon' => 'dashicons-video-alt2',\n 'capability_type' => 'post',\n 'has_archive' => true,\n 'rewrite' => array('slug' => 'best-movie-reviews', 'with_front' => true ),\n 'hierarchical' => false, //i want this to behave like a post\n 'menu_position' => null,\n //'show_in_rest' => true, //GUT\n 'supports' => array('title','editor', 'excerpt', 'thumbnail', 'author', 'custom-fields') //Core features include 'title', 'editor', 'comments', 'revisions', 'trackbacks', 'author', 'excerpt', 'page-attributes', 'thumbnail', '', and 'post-formats'.\n );\n \n //create my custom post type\n\n\n register_post_type('movies', $mov_args);\n\n flush_rewrite_rules();\n\n\n }", "function property_cpt() {\n\n\t$labels = array(\n\t\t'name' => _x( 'Propiedades', 'Post Type General Name', 'inversionisto' ),\n\t\t'singular_name' => _x( 'Propiedad', 'Post Type Singular Name', 'inversionisto' ),\n\t\t'menu_name' => __( 'Propiedades', 'inversionisto' ),\n\t\t'name_admin_bar' => __( 'Propiedad', 'inversionisto' ),\n\t\t'archives' => __( 'Item Archives', 'inversionisto' ),\n\t\t'attributes' => __( 'Item Attributes', 'inversionisto' ),\n\t\t'parent_item_colon' => __( 'Parent Item:', 'inversionisto' ),\n\t\t'all_items' => __( 'Todas', 'inversionisto' ),\n\t\t'add_new_item' => __( 'Add New Item', 'inversionisto' ),\n\t\t'add_new' => __( 'Nueva Propiedad', 'inversionisto' ),\n\t\t'new_item' => __( 'New Item', 'inversionisto' ),\n\t\t'edit_item' => __( 'Edit Item', 'inversionisto' ),\n\t\t'update_item' => __( 'Update Item', 'inversionisto' ),\n\t\t'view_item' => __( 'View Item', 'inversionisto' ),\n\t\t'view_items' => __( 'View Items', 'inversionisto' ),\n\t\t'search_items' => __( 'Search Item', 'inversionisto' ),\n\t\t'not_found' => __( 'Not found', 'inversionisto' ),\n\t\t'not_found_in_trash' => __( 'Not found in Trash', 'inversionisto' ),\n\t\t'featured_image' => __( 'Imagen destacada', 'inversionisto' ),\n\t\t'set_featured_image' => __( 'Usar como imagen destacada', 'inversionisto' ),\n\t\t'remove_featured_image' => __( 'Remover imagen destacada', 'inversionisto' ),\n\t\t'use_featured_image' => __( 'Usar como imagen destacada', 'inversionisto' ),\n\t\t'insert_into_item' => __( 'Insert into item', 'inversionisto' ),\n\t\t'uploaded_to_this_item' => __( 'Subido a esta propiedad', 'inversionisto' ),\n\t\t'items_list' => __( 'Items list', 'inversionisto' ),\n\t\t'items_list_navigation' => __( 'Items list navigation', 'inversionisto' ),\n\t\t'filter_items_list' => __( 'Filter items list', 'inversionisto' ),\n\t);\n\t$rewrite = array(\n\t\t'slug' => 'propiedad',\n\t\t'with_front' => true,\n\t\t'pages' => true,\n\t\t'feeds' => true,\n\t);\n\t$args = array(\n\t\t'label' => __( 'Propiedad', 'inversionisto' ),\n\t\t'description' => __( 'Post Type Description', 'inversionisto' ),\n\t\t'labels' => $labels,\n\t\t'supports' => array( 'title', 'editor', 'thumbnail' ),\n\t\t'hierarchical' => false,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'menu_position' => 5,\n\t\t'menu_icon' => 'dashicons-admin-home',\n\t\t'show_in_admin_bar' => false,\n\t\t'show_in_nav_menus' => true,\n\t\t'can_export' => true,\n\t\t'has_archive' => 'propiedades',\n\t\t'exclude_from_search' => false,\n\t\t'publicly_queryable' => true,\n\t\t'rewrite' => $rewrite,\n\t\t'capability_type' => 'post',\n\t\t'show_in_rest' => true,\n\t);\n\tregister_post_type( 'property', $args );\n\n}", "function sld_rm_post_custom_fields() {\n\t// pages\n\tremove_meta_box( 'postcustom' , 'page' , 'normal' );\n\tremove_meta_box( 'commentstatusdiv' , 'page' , 'normal' );\n\tremove_meta_box( 'commentsdiv' , 'page' , 'normal' );\n\tremove_meta_box( 'authordiv' , 'page' , 'normal' );\n\n\t// posts\n\tremove_meta_box( 'postcustom' , 'post' , 'normal' );\n\tremove_meta_box( 'postexcerpt' , 'post' , 'normal' );\n\tremove_meta_box( 'trackbacksdiv' , 'post' , 'normal' );\n}", "public function move_meta_box() {\n\n\t\tglobal $wp_taxonomies;\n\n\t\t$post_types = $wp_taxonomies['cahnrs-category']->object_type;\n\n\t\tforeach( $post_types as $post_type ) {\n\t\t\t\\remove_meta_box( 'cahnrs-categorydiv', $post_type, 'side' );\n\t\t\t\\add_meta_box( 'cahnrs-categorydiv', 'Content Settings', array( $this, 'cahnrs_page_settings_interface' ), $post_type, 'normal', 'high' );\n\t\t}\n\n\t}", "function nl_add_custom_to_yoast( $content ) {\n\t\tglobal $post;\n\t\t$pid = $post->ID;\n\t\t\n\t\t$custom = get_post_custom($pid);\n\t\tunset($custom['_yoast_wpseo_focuskw']); // Don't count the keyword in the Yoast field!\n\n\t\tforeach( $custom as $key => $value ) {\n\t\t\tif( substr( $key, 0, 1 ) != '_' && substr( $value[0], -1) != '}' && !is_array($value[0]) && !empty($value[0])) {\n\t\t\t $custom_content .= $value[0] . ' ';\n\t\t\t}\n\t\t}\n\n\t\t$content = $content . ' ' . $custom_content;\n\t\treturn $content;\n\n\t\tremove_filter('wpseo_pre_analysis_post_content', 'tbx_add_custom_to_yoast'); // don't let WP execute this twice\n\t}", "function add_custom_meta_box() { \nglobal $post, $post_type;\n\n\t// specific template\n\t//if('page-templatename.php' == get_post_meta($post->ID, '_wp_page_template', true)) {\n \tadd_meta_box( \n \t'custom_meta_box', // $id \n\t\t\t'More Stuff!', // $title \n\t\t\t'show_custom_meta_box', // $callback \n\t\t\t'post', // $page \n\t\t\t'normal', // $context \n\t\t\t'high'\n\t\t); // $priority \n\t//}\n\t\n\t//specific post-type\n\t/*if('custom post type' == $post_type) {\n \tadd_meta_box( \n \t'custom_meta_box', // $id \n\t\t\t'Options', // $title \n\t\t\t'show_custom_meta_box', // $callback \n\t\t\t'custom post type', // $page \n\t\t\t'normal', // $context \n\t\t\t'high'\n\t\t); // $priority \n\t}*/\n}", "function single_product_content_replace() {\n\tthe_content();\n}", "function tt_register_cpt($single, $plural = '') {\n if (empty($plural)) {\n $plural = $single.'s';\n }\n register_post_type(\n strtolower($single),\n array(\n 'label' => $plural,\n 'labels' => array(\n 'add_new_item' => \"Add New $single\",\n 'edit_item' => \"Edit $single\",\n 'new_item' => \"New $single\",\n 'view_item' => \"View $single\",\n 'search_items' => \"Search $plural\",\n 'not_found' => \"No $plural found\",\n 'not_found_in_trash' => \"No $plural found in Trash\",\n ),\n 'public' => true,\n 'has_archive' => true,\n 'supports' => array(\n 'title',\n 'editor',\n 'thumbnail',\n 'custom-fields',\n 'excerpt',\n ),\n 'taxonomies' => array('category'),\n )\n );\n}", "function remove_default_custom_fields( $type, $context, $post ) {\n foreach ( array( 'normal', 'advanced', 'side' ) as $context ) {\n foreach ( $this->postTypes as $postType ) {\n remove_meta_box( 'postcustom', $postType, $context );\n }\n }\n }", "function volpress_cpt_add_box() {\n\tadd_meta_box('volpress_section_1', 'Tasks', 'volpress_inner_custom_box', 'volpress', 'normal', 'default', array('section'=>1));\n\tadd_meta_box('volpress_section_2', 'Date', 'volpress_inner_custom_box', 'volpress', 'side', 'high', array('section'=>2));\n\t//add_meta_box('volpress_sectionid', 'My Post Section Title', 'volpress_inner_custom_box', 'volpress');\n}", "function add_custom_content_fields_meta_box( $posttypes , $custom_field_set , $custom_field_item )\n\t{\n\t\t\n\t\t/* assign current slider item */\n\t\tif( $custom_field_set == 'sliders' ) \n\t\t\t\n\t\t\t$this->slider_field_item = $custom_field_item != '' ? $custom_field_item : 'base';\n\t\t\n\t\t\n\t\tadd_action('add_meta_boxes', function() use( $posttypes, $custom_field_set , $custom_field_item ) {\n\t\t\t\t\n\t\t\t$custom_field_item_info = include( get_template_directory().'/module/'.$custom_field_set.'/'.$custom_field_item.'/config.details.php' );\n\n\t\t\tforeach ($posttypes as $key => $posttype_section ) {\n\t\t\t\t\n\t\t\t\tadd_meta_box('custom_post_type_section_'.$posttype_section . '-' . $custom_field_item , $custom_field_item_info['title'], function() use( $custom_field_set , $custom_field_item ){\n\n\t\t\t\t\t\t$custom_fields = $this->get_fields( $custom_field_set , $custom_field_item );\n\t\t\t\t\t\t$data['type'] = $custom_field_item;\n\t\t\t\t\t\t$data['dir'] = array('module',$custom_field_set , $custom_field_item , 'admin' ,'views');\n\t\t\t\t\t\t$data['view'] = $custom_field_item;\n\t\t\t\t\t\t$data['customfields'] = $custom_fields;\n\t\t\t\t\t\t\n\t\t\t\t\t\tload_view( $data );\n\n\t\t\t\t}, $posttype_section );\n\n\t\t\t}\n\n\t\t});\n\n\t\t$this->save_post( $custom_field_set , $custom_field_item );\n\t}", "public function remove_post_custom_fields() {\n\n\t\tremove_meta_box('postcustom' , 'post' , 'normal');\n\n\t}", "function create_service_cpt() {\n\n\t\n\t$args = array(\n\t\t'label' => __( 'Service', 'basic' ),\n\t\t'description' => __( 'Custom post type ', 'basic' ),\n\t\t'labels' => $labels,\n\t\t'menu_icon' => 'dashicons-buddicons-topics',\n\t\t'supports' => array('title', 'editor', 'thumbnail', 'author', 'comments', 'post-formats'),\n\t\t// 'taxonomies' => array('category', 'post_tag'),\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'menu_position' => 5,\n\t\t'show_in_admin_bar' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'can_export' => true,\n\t\t'has_archive' => true,\n\t\t'hierarchical' => false,\n\t\t'exclude_from_search' => false,\n\t\t'show_in_rest' => true,\n\t\t'publicly_queryable' => true,\n\t\t'capability_type' => 'post',\n\t);\n\tregister_post_type( 'service', $args );\n\n}", "function plugin_cpt_register() {\n\n\t\t\t$labels = array(\n\t\t\t\t'name' => _x( 'Plugins', 'plugins', 'wp3sixty-extra' ),\n\t\t\t\t'singular_name' => _x( 'Plugin', 'plugin', 'wp3sixty-extra' ),\n\t\t\t\t'menu_name' => __( 'Plugin', 'wp3sixty-extra' ),\n\t\t\t\t'name_admin_bar' => __( 'Plugin', 'wp3sixty-extra' ),\n\t\t\t\t'archives' => __( 'Plugin Archives', 'wp3sixty-extra' ),\n\t\t\t\t'parent_item_colon' => __( 'Parent Plugin:', 'wp3sixty-extra' ),\n\t\t\t\t'all_items' => __( 'All Plugins', 'wp3sixty-extra' ),\n\t\t\t\t'add_new_item' => __( 'Add New Plugin', 'wp3sixty-extra' ),\n\t\t\t\t'add_new' => __( 'Add New', 'wp3sixty-extra' ),\n\t\t\t\t'new_item' => __( 'New Plugin', 'wp3sixty-extra' ),\n\t\t\t\t'edit_item' => __( 'Edit Plugin', 'wp3sixty-extra' ),\n\t\t\t\t'update_item' => __( 'Update Plugin', 'wp3sixty-extra' ),\n\t\t\t\t'view_item' => __( 'View Plugin', 'wp3sixty-extra' ),\n\t\t\t\t'search_items' => __( 'Search Plugin', 'wp3sixty-extra' ),\n\t\t\t\t'not_found' => __( 'Not found', 'wp3sixty-extra' ),\n\t\t\t\t'not_found_in_trash' => __( 'Not found in Trash', 'wp3sixty-extra' ),\n\t\t\t\t'featured_image' => __( 'Featured Image', 'wp3sixty-extra' ),\n\t\t\t\t'set_featured_image' => __( 'Set featured image', 'wp3sixty-extra' ),\n\t\t\t\t'remove_featured_image' => __( 'Remove featured image', 'wp3sixty-extra' ),\n\t\t\t\t'use_featured_image' => __( 'Use as featured image', 'wp3sixty-extra' ),\n\t\t\t\t'insert_into_item' => __( 'Insert into plugin', 'wp3sixty-extra' ),\n\t\t\t\t'uploaded_to_this_item' => __( 'Uploaded to this plugin', 'wp3sixty-extra' ),\n\t\t\t\t'items_list' => __( 'Items plugin', 'wp3sixty-extra' ),\n\t\t\t\t'items_list_navigation' => __( 'Plugin list navigation', 'wp3sixty-extra' ),\n\t\t\t\t'filter_items_list' => __( 'Filter plugins list', 'wp3sixty-extra' ),\n\t\t\t);\n\t\t\t$args = array(\n\t\t\t\t'label' => __( 'plugin', 'wp3sixty-extra' ),\n\t\t\t\t'description' => __( 'plugin cpt', 'wp3sixty-extra' ),\n\t\t\t\t'labels' => $labels,\n\t\t\t\t'supports' => array(\n\t\t\t\t\t'title',\n\t\t\t\t\t'editor',\n\t\t\t\t\t'excerpt',\n\t\t\t\t\t'author',\n\t\t\t\t\t'thumbnail',\n\t\t\t\t\t'comments',\n\t\t\t\t\t'revisions',\n\t\t\t\t\t'custom-fields',\n\t\t\t\t\t'post-formats',\n\t\t\t\t),\n\t\t\t\t'taxonomies' => array( 'category', 'post_tag' ),\n\t\t\t\t'hierarchical' => false,\n\t\t\t\t'public' => true,\n\t\t\t\t'show_ui' => true,\n\t\t\t\t'show_in_menu' => true,\n\t\t\t\t'menu_position' => 5,\n\t\t\t\t'menu_icon' => 'dashicons-hammer',\n\t\t\t\t'show_in_admin_bar' => true,\n\t\t\t\t'show_in_nav_menus' => true,\n\t\t\t\t'can_export' => true,\n\t\t\t\t'has_archive' => true,\n\t\t\t\t'exclude_from_search' => false,\n\t\t\t\t'publicly_queryable' => true,\n\t\t\t\t'capability_type' => 'page',\n\t\t\t);\n\t\t\tregister_post_type( 'plugin', $args );\n\n\t\t}", "function wtfdivi099_add_meta_boxes() {\r\n\tforeach(get_post_types() as $pt) {\r\n\t\tif (post_type_supports($pt, 'editor') and function_exists('et_single_settings_meta_box')) {\r\n\t\t\tadd_meta_box('et_settings_meta_box', __('Divi Custom Post Settings', 'Divi'), 'et_single_settings_meta_box', $pt, 'side', 'high');\r\n\t\t}\r\n\t} \r\n}", "function clix_uppe_add_meta_box() {\r\n\tif( function_exists('add_meta_box') ) {\r\n\t\tadd_meta_box( 'clix_uppe_meta_box', 'Clix Category Exclusion', 'clix_uppe_meta_box', post, 'side' );\r\n \t}\r\n}", "function ot_after_save($options) {\r\n\t\t$clones = $options;\r\n\t\t$used_shortcodes = array();\r\n\t\t$global_css = '';\r\n\t\tforeach($options as $key => $val){\r\n\t\t\tif($key == 'archives_footer_cta_content'){\r\n\r\n\t\t\t\t$replacements = array();\r\n\t\t\t\t$css = $this->cactus_parse_inlinecss($val, $used_shortcodes, $replacements);\r\n\r\n\t\t\t\tif($css != ''){\r\n\r\n\t\t\t\t\t$new_val = $val;\r\n\t\t\t\t\tforeach($replacements as $replace){\r\n\t\t\t\t\t\t$new_val = str_replace($replace[0], $replace[1], $new_val);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$global_css .= ';' . $css;\r\n\t\t\t\t\t$clones[$key] = $new_val;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(startsWith($global_css,';')){\r\n\t\t\t$global_css = substr($global_css,1);\r\n\t\t}\r\n\r\n\t\t$shortcodes = get_option('ct_shortcodes_used_in_ot');\r\n\t\tif(!isset($shortcodes) || !is_array($shortcodes)){\r\n\t\t\tadd_option('ct_shortcodes_used_in_ot', array());\r\n\t\t}\r\n\r\n\t\t$shortcodes = $used_shortcodes;\r\n\t\tupdate_option('ct_shortcodes_used_in_ot', $shortcodes);\r\n\r\n\r\n\t\t// update global custom CSS in theme options, to be called in every pages\r\n\t\t$global_custom_css = get_option('ct_ot_custom_css');\r\n\t\tif(!isset($global_custom_css) || !is_array($global_custom_css)){\r\n\t\t\tadd_option('ct_ot_custom_css', '');\r\n\t\t}\r\n\r\n\t\t$global_custom_css = $global_css;\r\n\t\tupdate_option('ct_ot_custom_css', $global_custom_css);\r\n\r\n\t\tupdate_option(ot_options_id(), $clones);\r\n\r\n\t}", "function kp_project_features_meta_box( $meta_boxes )\n{\n $meta_boxes[] = array(\n 'title' => __( 'Project Features', 'kappe' ),\n 'post_types' => 'portfolio',\n 'fields' => array(\n array(\n 'id' => 'feature',\n 'name' => __( 'Feature', 'kappe' ),\n 'type' => 'text',\n 'clone' => true,\n 'sort_clone' => true\n )\n ),\n );\n return $meta_boxes;\n}", "function wp_arch_cpts() {\n /**\n * Registers a new post type\n * @uses $wp_post_types Inserts new post type object into the list\n *\n * @param string Post type key, must not exceed 20 characters\n * @param array|string See optional args description above.\n * @return object|WP_Error the registered post type object, or an error object\n */\n register_post_type( 'wp_arch_testimonial',\n array(\n 'labels' => array(\n 'name' => _x('Testimonials', 'post type general name'),\n 'singular_name' => _x('Testimonial', 'post type singular name'),\n 'add_new' => _x('Add New', 'testimonial'),\n 'add_new_item' => __('Add New Testimonial'),\n 'edit_item' => __('Edit Testimonial'),\n 'new_item' => __('New Testimonial'),\n 'view_item' => __('View Testimonial'),\n 'search_items' => __('Search Testimonial'),\n 'not_found' => __('No testimonials found'),\n 'not_found_in_trash' => __('No testimonials found in Trash'),\n 'parent_item_colon' => ''\n ),\n 'public' => true,\n 'description' => 'Our Testimonials',\n 'exclude_from_search' => true,\n 'has_archive' => true,\n 'rewrite' => array('slug' => 'testimonials'),\n 'hierarchical' => true,\n 'supports' => array(\n 'title',\n 'editor'\n ),\n )\n );\n}", "function bfa_ata_old_custom_box() {\r\n\r\n echo '<div class=\"dbx-b-ox-wrapper\">' . \"\\n\";\r\n echo '<fieldset id=\"bfa_ata_fieldsetid\" class=\"dbx-box\">' . \"\\n\";\r\n echo '<div class=\"dbx-h-andle-wrapper\"><h3 class=\"dbx-handle\">' . \r\n __( 'Body copy title', 'atahualpa' ) . \"</h3></div>\"; \r\n \r\n echo '<div class=\"dbx-c-ontent-wrapper\"><div class=\"dbx-content\">';\r\n\r\n // output editing form\r\n\r\n bfa_ata_inner_custom_box();\r\n\r\n // end wrapper\r\n\r\n echo \"</div></div></fieldset></div>\\n\";\r\n}", "function remove_my_post_metaboxes() {\n remove_meta_box( 'formatdiv','post','normal' ); // Format Div\n remove_meta_box( 'postcustom','post','normal' ); // Custom Fields\n remove_meta_box( 'trackbacksdiv','post','normal' ); // Trackback and Pingback\n remove_meta_box( 'postexcerpt','post','normal' ); // Custom Excerpt\n remove_meta_box( 'slugdiv','post','normal' ); // Custom Slug\n}", "function tcf_init() {\n require_once( 'library/custom-post-type.php' );\n\n // launching operation cleanup\n add_action( 'init', 'tcf_head_cleanup' );\n // A better title\n add_filter( 'wp_title', 'rw_title', 10, 3 );\n // remove WP version from RSS\n add_filter( 'the_generator', 'tcf_rss_version' );\n // remove pesky injected css for recent comments widget\n add_filter( 'wp_head', 'remove_wp_widget_recent_comments_style', 1 );\n // clean up comment styles in the head\n add_action( 'wp_head', 'remove_recent_comments_style', 1 );\n // clean up gallery output in wp\n add_filter( 'gallery_style', 'tcf_gallery_style' );\n\n // enqueue base scripts and styles\n add_action( 'wp_enqueue_scripts', 'tcf_scripts_and_styles', 800 );\n add_action( 'wp_enqueue_scripts', 'template_scripts_and_styles', 999 );\n // ie conditional wrapper\n\n // launching this stuff after theme setup\n tcf_theme_support();\n\n // adding sidebars to Wordpress (these are created in functions.php)\n add_action( 'widgets_init', 'tcf_register_sidebars' );\n\n // cleaning up random code around images\n add_filter( 'the_content', 'filter_ptags_on_images' );\n // cleaning up excerpt\n add_filter( 'excerpt_more', 'tcf_excerpt_more' );\n\n}" ]
[ "0.6074978", "0.5969558", "0.59518605", "0.5937615", "0.587778", "0.5822619", "0.5804349", "0.577158", "0.5770772", "0.5748372", "0.574136", "0.5718629", "0.56830835", "0.56570554", "0.5640189", "0.56377155", "0.56230205", "0.5621331", "0.56184965", "0.5618175", "0.56172454", "0.56165165", "0.56126416", "0.5607948", "0.5602411", "0.5599293", "0.557682", "0.5575006", "0.5570402", "0.55670416" ]
0.6151654
0
Finds cheapest flight between two cities
public function findCheapest(string $city1, string $city2): array { $airport1 = $this->airportRepository->findByCity($city1); abort_if(is_null($airport1), 404, 'Airport in the city ' . $city1 . ' does not exist.'); $airport2 = $this->airportRepository->findByCity($city2); abort_if(is_null($airport2), 404, 'Airport in the city ' . $city2 . ' does not exist.'); if (Cache::has('routes')) { $routes = Cache::get('routes'); } else { $routes = $this->routeRepository->findAll(); } $graph = $this->dijkstraGraph->createGraph($routes, 'source_id', 'destination_id', 'price'); $cheapestPath = $this->dijkstraGraph->shortestPath($airport1['id'], $airport2['id']); $airports = $this->airportRepository->findByIds($cheapestPath); $cheapestRoute = []; $price = 0; foreach ($cheapestPath as $key => $element) { $airport = $airports[$element]; if ($key === array_key_first($cheapestPath)) { $cheapestRoute['start'] = $this->getRouteInformation($airport); $price += $graph[$cheapestPath[$key]][$cheapestPath[$key + 1]]; } elseif ($key === array_key_last($cheapestPath)) { $cheapestRoute['end'] = $this->getRouteInformation($airport); } else { $cheapestRoute['through'][] = $this->getRouteInformation($airport); $price += $graph[$cheapestPath[$key]][$cheapestPath[$key + 1]]; } } $cheapestRoute['price'] = $price; return $cheapestRoute; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findMinPrice() : array {\n $minPriceFlight = null;\n foreach (range(0, $this->flexibility) as $index) {\n $fromDate = $this->incrementDate($this->startingDate, $index);\n $returnDate = $this->incrementDate($fromDate, $this->duration);\n foreach ($this->destinations as $destination) {\n $searchMinPrice = $this->flightFinder->getLowestPrice($this->startingAirport, $destination, $fromDate, $returnDate);\n $this->flights[] = compact('searchMinPrice', 'destination', 'fromDate', 'returnDate');\n if ($this->isPriceLower($minPriceFlight, $searchMinPrice)) {\n $minPriceFlight = compact('searchMinPrice', 'destination', 'fromDate', 'returnDate');\n }\n }\n }\n\n return $minPriceFlight;\n }", "function getDepartamentalRoute($originCity, $destinyCity)\n {\n }", "function jeanisRoute($citys, $roads) {\n // 需要投递的城市\n $deliverMap = [];\n $k = count($citys);\n foreach ($citys as $city) {\n $deliverMap[$city] = true;\n }\n \n // road转成connectMap\n $connectMap = [];\n foreach ($roads as $item) {\n $connectMap[$item[0]][$item[1]] = $connectMap[$item[1]][$item[0]] = $item[2];\n }\n \n // 以第一个节点作为根\n $root = 1;\n \n // 其所有子节点中待投递城市的数量\n $subDeliveryCountArr = [];\n \n // 所有走过的边的距离之和\n $result = 0;\n \n // 最长距离\n $globalMaxDis = 0;\n \n processDis($subDeliveryCountArr, $connectMap, $deliverMap, $result, $globalMaxDis, $root, 0, $k);\n\n \n return 2 * $result - $globalMaxDis;\n}", "public function testfindCheapestRoute()\n {\n $travelRoute = new TravelRoute();\n\n $this->assertEquals([\n 'route' => 'GRU,BRC,SCL',\n 'price' => 15\n ], $travelRoute->findCheapestRoute('GRU', 'SCL'));\n }", "public function shortestTransitDaysAndCheapest()\n {\n $products = $this->p();\n usort($products, [$this, 'sortByTransitDaysThenCheapest']);\n return $products[0];\n }", "public function findCity($cityOne, $cityTwo='', $cityThree='', \n $purpose, $temperature, $longitude, $latitude, $tripDistance) {\n # set object variables\n $this->purposeForTravel = $purpose;\n $this->preferredTemp = $temperature;\n $this->cityOne = $cityOne; \n $this->cityTwo = $cityTwo; \n $this->cityThree = $cityThree; \n $this->longitude = $longitude;\n $this->latitude = $latitude; \n $this->tripDistance = $tripDistance; \n if(isset($cityTwo))\n $this->citiesInputed++; \n if(isset($cityThree))\n $this->citiesInputed++; \n\t\t\n #calculate all city scores\n $this->perfectCity(); \n if ($this->purposeForTravel == 'Close Trip')\n $this->calcDistScores();\n $this->calcTempScores(); \n $this->calcTraitScores(); \n $this->calcTotalScores(); \n $this->weightScore(); \n \n # set chosen city variables\n if ($this->chosenCity != 'no city found') {\n $this->setCoordinates($this->chosenCity);\n $this->setTraits($this->chosenCity);\n $this->setTemperature($this->chosenCity); \n }\n }", "function getNationalRoute($originCity, $destinyCity)\n {\n }", "public function getCheapestFlights($flightsArray)\n {\n $cheapestArray = [];\n foreach ($flightsArray as $index => $items) {\n foreach ($items as $item) {\n if ($item->price === min(array_column($items, 'price'))) {\n $cheapestArray[$index] = ['price' => $item->price, 'booking_token' => $item->booking_token];\n }\n }\n }\n ksort($cheapestArray);\n return $cheapestArray;\n }", "function getMinDistance($student, $tutor)\n{\n\t$minDistance = MAX_DISTANCE;\n\tforeach ($student as &$studentLoc) {\n\t\t//print \"$studentLoc<br>\";\n\t\tforeach ($tutor as &$tutorLoc){\n\t\t\t$distance = get_distance($studentLoc,$tutorLoc);\n\t\t\t//print \"$distance $tutorLoc<br>\";\n\t\t\tif($distance < $minDistance)\n\t\t\t\t$minDistance = $distance;\n\t\t}\n\t}\n\treturn $minDistance;\n}", "protected function getJcDecauxNearestStation($latitude, $longitude, $city)\n {\n $nearestStation = new BikeStation($this->availableCities[$city[0]['contract_name']]['commercial_name']);\n $nearestDistance = -1;\n $nearestPos = [];\n $currentNearestStation = null;\n\n foreach ($city as $bikePlace) {\n if ($bikePlace['status'] !== 'OPEN' || !($bikePlace['available_bikes'] > 0)) {\n continue;\n }\n\n $currentDistance = $this\n ->distanceCalculator\n ->distance($latitude, $longitude, $bikePlace['position']['lat'], $bikePlace['position']['lng'], 'K')\n ;\n\n if ($currentDistance < $nearestDistance || $nearestDistance === -1) {\n $nearestDistance = $currentDistance;\n $nearestPos = $bikePlace['position'];\n $currentNearestStation = $bikePlace;\n }\n }\n\n $nearestStation->setName($currentNearestStation['name']);\n $nearestStation->setAvailableBikes(intval($currentNearestStation['available_bikes']));\n $nearestStation->setAvailableBikeStands(intval($currentNearestStation['available_bike_stands']));\n $nearestStation->setDistance($nearestDistance);\n $nearestStation->setPosition($nearestPos);\n $nearestStation->setNumber(intval($currentNearestStation['number']));\n $epoch = substr($currentNearestStation['last_update'], 0, -3);\n $nearestStation->setLastUpdate(new DateTime(\"@$epoch\"));\n\n return $nearestStation;\n }", "public function makeOneRequest($oldest_flight)\n {\n\n\n\t\t$em = $this->getDoctrine()->getManager();\n\n\t\t$all_flights = $this->getDoctrine()->getRepository('FlyingMainBundle:Flights');\n\n\t\t$oldest_date = $oldest_flight->getDate();\n\n\t\t//adicionar 3 dias a data desse voo, ja que o request da ryanair, da a data mais 3 dias para tras e para a frente\n\t\t$today_date = date(\"Y-m-d\");\n\n\t\t// so faz o request se a data de last updated for mais antiga que o numero de dias definidos nos parametros\n\t\t$min_update_days = $this->container->getParameter('min_update_days');\n\t\t$update_date_only = date('Y-m-d', strtotime($today_date. ' - '.$min_update_days.' days'));\n\t\t\n\t\tif ($oldest_flight->getLastUpdated() > $update_date_only ) return;\n\n\t\t$request_date = date('Y-m-d', strtotime($oldest_date. ' + 3 days'));\n\n\t\t$request_origin = $oldest_flight->getOrigin();\n\t\t$request_destination = $oldest_flight->getDestination();\n\n\t\t$request_date_formated = str_replace(\"-\",\"/\",$request_date);\n\n\t\t$url = 'https://www.bookryanair.com/SkySales/Search.aspx';\n\t\t$data = array('__EVENTTARGET' => 'SearchInput$ButtonSubmit',\n \t 'SearchInput$IsFlexible' => 'on',\n \t 'SearchInput$TripType' => 'OneWay',\n\t 'SearchInput$Orig' => $request_origin,\n\t 'SearchInput$Dest' => $request_destination,\n\t 'SearchInput$DeptDate' => $request_date_formated,\n\t 'SearchInput$RetDate' => $request_date_formated,\n\t 'SearchInput$PaxTypeADT' => \"1\");\n\n\t\t$options = array(\n\t\t 'http' => array(\n\t\t 'header' => \"Content-type: application/x-www-form-urlencoded\\r\\n\",\n\t\t 'method' => 'POST',\n\t\t 'content' => http_build_query($data),\n\t\t ),\n\t\t);\n\t\t$context = stream_context_create($options);\n\t\t$result = file_get_contents($url, false, $context);\n\n\t\tpreg_match('/FR\\.flightData\\s=\\s(.*?)\\;/',$result, $flightData);\n\t\tpreg_match('/FR\\.booking\\s=\\s(.*?)\\;/',$result, $booking);\n\t\t\n\t\t$flightData=json_decode($flightData[1],true);\n\t\n\t\tif ($flightData==null) { // pode ainda nao haver voo. marca como visto na DB\n\t\t\t$one_flight_to_update->setFlightNumber('NA');\n\t\t\t$one_flight_to_update->setLastUpdated($today_date);\n\t\t\treturn;\n\t\t}\n\t\t$booking=json_decode($booking[1],true); // daqui so interessa a moeda usada\n\t\t$currency = $booking['Info']['Curr'];\n\n\t\t//actualiza ja este voo como visto, porque pode dar origem a erros. Se a oldest date for igual a hoje, simplesmente nao vai actualizar este voo\n\t\t$oldest_flight->setLastUpdated($today_date);\n\n\t\tforeach ($flightData[$request_origin.$request_destination] as $one_day) {\n\n \t\t$this_day_date = $one_day[0];\n\n \t\t$flights_to_update = $all_flights->findBy(array('origin' => $request_origin, 'destination' => $request_destination, 'date' => $this_day_date)); \n\n \t\t$one_day_info= $one_day[1]; // aqui posso saber se o voo nao existe\n \t\t\n \t\t// considera-os como inexistentes ate prova em contrario\n\t\t\tforeach ($flights_to_update as $one_flight_to_update) {\n \t\t\t\t$one_flight_to_update->setFlightNumber('NA');\n\t\t\t\t\t$one_flight_to_update->setLastUpdated($today_date);\n \t\t\t}\n\n\t\t\t$one_day_info_count = count($one_day_info); // numero de voos nesse dia\n \t\t\n\t\t\tforeach($one_day_info as $one_flight ) { // percorre os voos nesse dia\n\t\t\t\t$flight_number = $one_flight[2];\n\t\t\t\t$times_dates = $one_flight[3];\n\n\t\t\t\t$departure_info = $times_dates[0];\n\t\t\t\t$arrival_info = $times_dates[1];\n\t\t\t\t\n\t\t\t\t$departure_date = $departure_info[0];\n\t\t\t\t$departure_time = $departure_info[1];\n\n\t\t\t\t$arrival_time = $arrival_info[1];\n\t\t\t\t\n\t\t\t\t$price_info = $one_flight[4]['ADT'][1];\n\n\t\t\t\tif (isset($price_info['Tax'])) $price_tax = $price_info['Tax'];\n\t\t\t\telse $price_tax=0;\n\n\t\t\t\t$price = $price_info['FarePrice'] + $price_tax;\n\n\t\t\t\tif ($currency!='EUR') { // faz a conversao para euro\n\t\t\t\t\t$currencies = $this->getDoctrine()->getRepository('FlyingMainBundle:Currencies');\n\t\t\t\t\t$currencies = $currencies->findOneBy(array('code' => $currency)); \n\t\t\t\t\t$price = $price/($currencies->getRate());\n\t\t\t\t}\n\n\t\t\t\t// ve se este voo existe na DB\n\t\t\t\t$search_flight_to_update = $all_flights->findOneBy(array('origin' => $request_origin, 'destination' => $request_destination, 'date' => $departure_date, 'departure' => $departure_time));\n\n\t\t\t\tif ($search_flight_to_update!='') { // existe na DB, por isso vai actualizar\n\t\t\t\t\t$search_flight_to_update->setFlightNumber($flight_number);\n\t\t\t\t\t$search_flight_to_update->setLastUpdated($today_date);\n\t\t\t\t\t$search_flight_to_update->setPrice($price);\n\t\t\t\t}\n\t\t\t\telse { // nao existe na DB por isso cria um novo\n\t\t\t\t\t$one_flight = new Flights();\n\t\t\t\t $one_flight->setOrigin($request_origin);\n\t\t\t\t $one_flight->setDestination($request_destination);\n\t\t\t\t\t$one_flight->setDate($departure_date);\n\t\t\t\t\t$one_flight->setFlightNumber($flight_number);\n\t\t\t\t\t$one_flight->setDeparture($departure_time);\n\t\t\t\t\t$one_flight->setArrival($arrival_time);\n\t\t\t\t\t$one_flight->setLastUpdated($today_date);\n\t\t\t\t\t$one_flight->setPrice($price);\n\t\t\t\t\t$one_flight->setActive(true);\n\t\t\t\t\t$em->persist($one_flight);\n\t\t\t\t}\n\t\t\t}\n \t}\n\n\t\t$em->flush();\n\n }", "function get_flight_from_ws($airline, $depcode, $descode, $depdate, $retdate, $direction=1, $format='json'){\n\t\n\t$airline = strtoupper(trim($airline));\n\t$depcode = strtoupper(trim($depcode));\n\t$descode = strtoupper(trim($descode));\n\t$depdate = str_replace('/','-',$depdate);\n\t$retdate = isset($retdate) && !empty($retdate) ? str_replace('/','-',$retdate) : $depdate; \n\t$api_key = '70cd2199f6dc871824ea9fed45170af354ffe9e6';\n \n $timeout = 30;\n \n\tif ($airline == 'VN' || $airline == 'QH') {\n $urls = array(\n // 'http://fs2.vietjet.net',\n 'http://fs3.vietjet.net',\n 'http://fs4.vietjet.net',\n 'http://fs5.vietjet.net',\n 'http://fs6.vietjet.net',\n 'http://fs7.vietjet.net',\n 'http://fs8.vietjet.net',\n 'http://fs9.vietjet.net',\n 'http://fs10.vietjet.net',\n 'http://fs11.vietjet.net',\n 'http://fs12.vietjet.net',\n 'http://fs13.vietjet.net',\n 'http://fs14.vietjet.net',\n 'http://fs15.vietjet.net',\n 'http://fs16.vietjet.net',\n 'http://fs17.vietjet.net',\n 'http://fs18.vietjet.net',\n 'http://fs19.vietjet.net',\n 'http://fs20.vietjet.net',\n 'http://fs21.vietjet.net',\n 'http://fs22.vietjet.net',\n 'http://fs23.vietjet.net',\n 'http://fs24.vietjet.net',\n 'http://fs25.vietjet.net',\n 'http://fs26.vietjet.net',\n 'http://fs27.vietjet.net',\n 'http://fs28.vietjet.net',\n 'http://fs29.vietjet.net',\n 'http://fs30.vietjet.net',\n );\n } else if ($airline == 'VJ' || $airline == 'BL'){\n $timeout = 35;\n $urls = array(\n 'http://fs2.vietjet.net',\n );\n }\n\n shuffle($urls);\n $url = $urls[array_rand($urls)];\n\t$url .= '/index.php/apiv1/api/flight_search/format/'.$format;\n\t$url .= '/airline/'.$airline.'/depcode/'.$depcode.'/descode/'.$descode.'/departdate/'.$depdate.'/returndate/'.$retdate.'/direction/'.$direction;\n\n\t$curl_handle = curl_init();\n\tcurl_setopt($curl_handle, CURLOPT_URL, $url);\n\tcurl_setopt($curl_handle, CURLOPT_ENCODING, 'gzip');\n\tcurl_setopt($curl_handle, CURLOPT_TIMEOUT, $timeout);\n curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, $timeout);\n\tcurl_setopt($curl_handle, CURLOPT_HTTPHEADER, array('X-API-KEY: '.$api_key));\n\tcurl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);\n $buffer = curl_exec($curl_handle);\n\n curl_close($curl_handle);\n $result = json_decode($buffer, true);\n\n\treturn $result;\n}", "function find_min_vertex($v1,$vertices,$distance_table){\n $min = INF;\n $min_i = 0;\n\n foreach($vertices as $v2){\n $d = distance_lookup($v1,$v2,$distance_table);\n if($d < $min){\n $min = $d;\n $min_i = $v2;\n }\n }\n return array($min_i,$min);\n\n}", "function caluculDistance($line,$nameStart,$nameEnd,$cat){\n\n\n if ( ! (($stationStart= getStationDB($nameStart,$line)) && ($stationEnd= getStationDB($nameEnd,$line)))) return \"stations do not exist\";\n //check direction\n\n if ($stationStart->getDist()< $stationEnd->getDist()) $keyword='ASC' ;\n else $keyword='DESC';\n\n\n $array =calculDistanceDB($stationStart,$stationEnd,$keyword,$cat);\n return $array;\n}", "public function get_flights($vars=array()) {\n\n if(!empty($vars))\n { \n $origin_city = (isset($vars['origin_city']) && ($vars['origin_city']!=\"\")) ? $vars['origin_city'] : \"\";\n $destination_city = (isset($vars['destination_city']) && ($vars['destination_city']!=\"\")) ? $vars['destination_city'] : \"\";\n $trip_type = (isset($vars['trip_type']) && ($vars['trip_type']!=\"\")) ? $vars['trip_type'] : 1;\n $departure_date = (isset($vars['departure_date']) && ($vars['departure_date']!=\"\")) ? $vars['departure_date'] : \"\";//date(\"Y-m-d\");\n $return_date = (isset($vars['return_date']) && ($vars['return_date']!=\"\")) ? $vars['return_date'] : \"\";//date(\"Y-m-d\",strtotime(\"+1 day\"));\n $persons = (isset($vars['persons']) && ($vars['persons']!=\"\")) ? $vars['persons'] : 1;\n \n $filters_flight = (isset($vars['filters_flight']) && ($vars['filters_flight']!=\"\")) ? $vars['filters_flight'] : \"\";\n $condition = \"\";\n if($filters_flight != \"\")\n {\n $condition .= \"arrivalLocation IN ($filters_flight) AND (Capacity > '0')\"; //This is to search for flight heading in cities that matched the filter result \n }else\n {\n //prepare condition\n if($trip_type == 2)\n { //return trip\n if(($origin_city == \"\") || ($destination_city == \"\") || ($departure_date == \"\") || ($return_date == \"\") )\n {\n return false;\n }\n $condition = \"( ( ( (DepartureAirport LIKE '%$origin_city%' AND ArrivalLocation LIKE '%$destination_city%') AND (DepartureDate = '$departure_date' ) ) \n OR ( (DepartureAirport LIKE '%$destination_city%' AND ArrivalLocation LIKE '%$origin_city%') AND (DepartureDate = '$return_date' ) ) )\n AND (Capacity >= '$persons') )\"; \n }else\n { //One way trip\n \n if(($origin_city == \"\") || ($destination_city == \"\") || ($departure_date == \"\") )\n {\n return false;\n }\n $condition = \"( ( (DepartureAirport LIKE '%$origin_city%' AND ArrivalLocation LIKE '%$destination_city%') AND (DepartureDate = '$departure_date' ) ) \n AND (Capacity >= '$persons') )\"; \n }\n }\n }else\n {\n $condition = \" 1='1' \"; \n }\n //echo $condition;\n $this->db->select('*');\n $this->db->from('flight');\n $this->db->where($condition);\n $this->db->order_by('Price', \"asc\");\n $query = $this->db->get();\n \n if ($query->num_rows() > 0) {\n return $query->result();\n } else {\n return false;\n }\n}", "function _casetravel($previousloc_X, $previousloc_Z, $previousaisle_X, $previousaisle_Z, $currentaisle_X, $currentaisle_Z, $FIRSTLOC_X, $FIRSTLOC_Z) {\n\n $outeraisle = abs($previousloc_X - $previousaisle_X) + abs($previousloc_Z - $previousaisle_Z); //previous last location to previous parking spot\n $outeraisle += abs($previousaisle_X - $currentaisle_X) + abs($previousaisle_Z - $currentaisle_Z); //previous parking spot to current parking spot\n $outeraisle += abs($currentaisle_X - $FIRSTLOC_X) + abs($currentaisle_Z - $FIRSTLOC_Z);\n\n return $outeraisle;\n}", "public function testFindLargestZipCodeAmongstCity(){\n\n // TODO définir le pipeline\n $pipeline = [];\n\n $result = $this->zips->aggregate($pipeline);\n $this->assertEquals('CHICAGO', $result->toArray()[0]['city']);\n }", "public function getFareByStates($origin, $destination)\n {\n $sql = \"SELECT fares.*, pm.origin, pm.destination, d.park AS destination_name, o.park AS origin_name, d_s.state_name AS destination_state, o_s.state_name AS origin_state\n FROM fares\n INNER JOIN park_map AS pm ON fares.park_map_id = pm.id\n INNER JOIN travel_park_map ON travel_park_map.park_map_id = pm.id\n INNER JOIN parks AS d ON pm.destination = d.id\n INNER JOIN parks AS o ON pm.origin = o.id\n INNER JOIN states AS o_s ON o.state_id = o_s.id\n INNER JOIN states AS d_s ON d.state_id = d_s.id\n WHERE o_s.id = :origin_state AND d_s.id = :destination_state\";\n\n if (self::$db->query($sql, array('origin_state' => $origin, 'destination_state' => $destination))) {\n return self::$db->fetch('obj');\n }\n }", "function getNearbyStations($startPoint,$endPoint){\n\n try {\n $startStations = OrderedStation::getStationsFromCoord($startPoint);\n $endStations = OrderedStation::getStationsFromCoord($endPoint);\n }catch (Exception $e){\n throw new Exception($e->getMessage());\n }\n //this type validation should probably be in a different function\n try {\n $finalStations = Station::ReduceStationPairings($startStations, $endStations);\n }catch (Exception $e){\n throw new Exception(\"Given coordinates refer to stations on different highways. \".$e->getMessage());\n }\n return $finalStations;\n\n }", "function find($from, $to, $date) {\n $flights = array();\n \n $date = '2009-05-29'; // hard coded to match the flight data\n \n $date = date('Y-m-j', strtotime($date));\n \n foreach ($this->flights as $flight) {\n if ($flight['dairport'] == $from['code'] && $flight['aairport'] == $to['code'] && $flight['ddate'] == $date) {\n $flight['dairport'] = $this->airports->lookup($flight['dairport']);\n $flight['aairport'] = $this->airports->lookup($flight['aairport']);\n $flights[] = $flight;\n }\n }\n \n uasort($flights, array($this, 'sort'));\n return $flights;\n }", "function find_closest_stations ($lat, $lng, $stations, $num, $recalc = FALSE) {\r\n\tstatic $R = 6371;\r\n\tstatic $distances = array();\r\n\t$closest = -1;\r\n\treset($distances);\r\n\t//if (count(array_diff($stations_cache,$stations)) > 0) {\r\n\t//\t$stations_cache = $stations;\r\n\t// \t$recalc = TRUE;\r\n\t//}\r\n\tif (count($distances) == 0 || $recalc) {\r\n\t\t$station_ids = array_keys( $stations );\r\n\t\tfor ( $i = 0 ; $i < count( $station_ids ) ; $i++ ) {\r\n\t\t\tif ( !isset( $stations[$station_ids[$i]] ) ) { continue; }\r\n\t\t\t// check for a duplicate station using an alternate ID, e.g. 999999XXXXX or XXXXXX99999\r\n\t\t\tif ( isset( $stations[$station_ids[$i]] ) && $stations[$station_ids[$i]]['usafid'] != '999999' && $stations[$station_ids[$i]]['wban'] != '99999' ) {\r\n\t\t\t\t$i_usafid_only = $stations[$station_ids[$i]]['usafid'] . '99999';\r\n\t\t\t\tif ( isset( $stations[$i_usafid_only] ) ) {\r\n\t\t\t\t\tunset( $stations[$i_usafid_only] );\r\n\t\t\t\t\tif ( isset( $distances[$i_usafid_only] ) ) {\r\n\t\t\t\t\t\tunset( $distances[$i_usafid_only] );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$i_wban_only = '999999' . $stations[$station_ids[$i]]['wban'];\r\n\t\t\t\tif ( isset( $stations[$i_wban_only] ) ) {\r\n\t\t\t\t\tunset( $stations[$i_wban_only] );\r\n\t\t\t\t\tif ( isset( $distances[$i_wban_only] ) ) {\r\n\t\t\t\t\t\tunset( $distances[$i_wban_only] );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$mlat = $stations[$station_ids[$i]]['lat'];\r\n\t\t\t$mlng = $stations[$station_ids[$i]]['lng'];\r\n\t\t\t$dLat = rad($mlat - $lat);\r\n\t\t\t$dLng = rad($mlng - $lng);\r\n\t\t\t$a = sin($dLat/2) * sin($dLat/2) +\r\n\t\t\t\tcos(rad($lat)) * cos(rad($lat)) * sin($dLng/2) * sin($dLng/2);\r\n\t\t\t$c = 2 * atan2(sqrt($a), sqrt(1-$a));\r\n\t\t\t$d = $R * $c;\r\n\t\t\t/* If the distance calculation results in is_nan($d), do not add it to the distances array. \r\n\t\t\tThese values will always be pushed to the top of the array, resulting in a poor \r\n\t\t\t\"closest station\" calculation. */\r\n\t\t\tif (!is_nan($d)) {\r\n\t\t\t\t$distances[$station_ids[$i]] = $d;\r\n\t\t\t}\r\n\t\t}\r\n\t\tasort($distances);\r\n\t} else {\r\n\t\tunset($distances[key($distances)]);\r\n\t}\r\n\treturn array_slice($distances,0,$num,TRUE);\r\n}", "function find_minimum($entities) {\r\n \r\n\tglobal $userconnection_distance;\r\n $keys = array_keys ($entities);\r\n $minid = $entities[$keys[0]];\r\n $mindist = $userconnection_distance[$minid];\r\n foreach ($keys as $key) {\r\n $tentity = $entities[$key];\r\n if ($userconnection_distance[$tentity] < $mindist) {\r\n $mindist = $userconnection_distance[$tentity];\r\n $minid = $tentity;\r\n }\r\n }\r\n return $minid;\r\n}", "function getCarParkLoc($from_lat, $from_lon){\n // find the closest node_id to ($from_lat, $from_lon) on a way\n global $mysqli;\n $offset = 0.1;\n $sql = \"SELECT node_id, lat, lon, (lat-{$from_lat})*(lat-{$from_lat}) + (lon - {$from_lon})*(lon - {$from_lon}) AS x FROM osm_car_parkings\n ORDER BY x ASC LIMIT 1\";\n $arr = array();\n $result = $mysqli->query($sql);\n while($result && $row = $result->fetch_assoc()){\n $arr[] = array($row['lat'],$row['lon']);\n }\n return $arr[0];\n}", "private function getStartLocation()\n {\n for ($counter = 0; $counter < count($this->boardingCards); $counter++) {\n\n $from = $this->boardingCards[$counter]->getFrom();\n /*\n * The start location is a place we depart from but never arrived\n */\n if (!array_key_exists($from, $this->toIndex)) {\n return $from;\n }\n }\n return null;\n }", "public function getMinimumStops()\n {\n $this->stops = 0;\n for ($i = 0; $i < self::MAX_STOPS; $i++) {\n $this->stops++;\n $this->handleStop();\n if ($this->driversKnowAllGossips()) {\n return $this->stops;\n }\n $this->nextStop();\n }\n return self::MINIMUM_NEVER;\n }", "function find_carpool_match($lat1,$lon1){\n\t\tglobal $connection;\n $query = \"SELECT *, \n\t\t\t\t( 3959 * acos( cos( radians('$lat1') ) * \n\t\t\t\t cos( radians( Lat ) ) * \n\t\t\t\t cos( radians( Lng ) - \n\t\t\t\t radians('$lon1') ) + \n\t\t\t\t sin( radians('$lat1') ) * \n\t\t\t\t sin( radians( Lat ) ) ) ) \n\t\t\t\t AS distance FROM employees WHERE NeedCarpool=1 HAVING distance < 5 ORDER BY distance ASC LIMIT 0, 10\";\n\n\t\t$result = mysqli_query($connection,$query);\n confirm_query($result);\n if($result)\n return $result;\n else\n return null; \n \n }", "function findPOILonelyPlanet($name, $lat, $lon) {\n global $lonelyplanetup, $lonelyplanetapi;\n\n $bbox = buildBBox($lat, $lon, 100);\n $q = \"http://$lonelyplanetup@$lonelyplanetapi/bounding_boxes/\";\n $q .= $bbox[3].','.$bbox[1].','.$bbox[2].','.$bbox[0].'/pois';\n // $q = \"/Users/rajsingh/workspace/openpoidb/application/lonelyplanet/example_bbox_faneuil_res.xml\";\n // echo \"lp url: $q\";\n $xml = simplexml_load_file($q);\n \n if ( empty($xml->poi) ) {\n return NULL;\n }\n\n $comp = new StringMatch;\n $matches = array();\n foreach ($xml->poi as $lppoi) {\n $n = (string)$lppoi->name;\n\n $lscore = $comp->fstrcmp($name, strlen($name), $n, strlen($n), 0.5);\n // echo \"score for $n is: $lscore\\n\";\n if ( $lscore > 0.5 ) {\n $m = new MatchCandidate($lppoi->id);\n $m->labels = array($n => $lscore);\n\n $blon = floatval($lppoi->{'digital-longitude'});\n $blat = floatval($lppoi->{'digital-latitude'});\n $dist = ddDistance($lat, $lon, $blat, $blon);\n $m->dist = $dist;\n\n $m->computeScore(500);\n $matches[] = $m;\n }\n }\n\n // get best match\n $highscore = 0.0;\n $bm = null;\n foreach ($matches as $m) {\n if ( $m->score > $highscore ) {\n $highscore = $m->score;\n $bm = $m;\n }\n // echo \"id: $m->geouuid\\tdistance: $m->dist\\tscore: $m->score\\n\";\n // foreach($m->labels as $l => $s) {\n // echo \"label: $l\\tscore: $s\\n\";\n // }\n }\n \n if ( !empty($bm) ) \n return (string)$bm->geouuid;\n else \n return NULL;\n}", "public function short_route($routes){\r\n $min_route = NULL;\r\n $min_cost = NULL;\r\n\r\n foreach($routes as $route){\r\n $cost = $this->get_cost_route($route);\r\n if(!isset($min_cost) || $cost < $min_cost){\r\n $min_route = $route;\r\n $min_cost = $cost;\r\n }\r\n }\r\n\r\n return array('route' => $min_route, 'cost' => $min_cost);\r\n\r\n }", "function _getClosestLocation($activity_name, $db_connection) {\n\t\t// given an activity name, find average location of registered users registered to that activity, \n\t\t// then return closest building to that location\n\t\t// step 1: gather all users and their coordinates registered to activity passed\n\t\t$users = array();\n\t\t$stmt = $db_connection->stmt_init();\n\t\tif ($stmt->prepare('SELECT user_name, user_x, user_y\n\t\t\t\t\t\t\tFROM registeredTo \n\t\t\t\t\t\t\tNATURAL JOIN\n\t\t\t\t\t\t\tUsers\n\t\t\t\t\t\t\tWHERE activity_name=?')) {\n\t\t\t$stmt->bind_param('s', $activity_name);\n\t\t\t$stmt->execute();\n\t\t\t$stmt->bind_result($user_name, $user_x, $user_y);\n\t\t\twhile ($stmt->fetch()) {\n\t\t\t\t$users[] = array(\"user_name\" => $user_name, 'x' => $user_x, 'y' => $user_y);\n\t\t\t}\n\t\t}\n\t\t$stmt->close();\n\t\t/*\n\t\tforeach ($users as $user_name => $coords) {\n\t\t\techo \"$user_name : \" . $coords['x'] . \" \" . $coords['y'] . '<br>'; \n\t\t}\n\t\t*/\n\n\t\t// step 2: gather all buildings and their coordinates where activity can take place\n\t\t$buildings = array();\n\t\t$stmt = $db_connection->stmt_init();\n\t\tif ($stmt->prepare('SELECT building_name, building_x, building_y\n\t\t\t\t\t\t\tFROM ActivityLocations \n\t\t\t\t\t\t\tNATURAL JOIN\n\t\t\t\t\t\t\tBuildings\n\t\t\t\t\t\t\tWHERE activity_name=?')) {\n\t\t\t$stmt->bind_param('s', $activity_name);\n\t\t\t$stmt->execute();\n\t\t\t$stmt->bind_result($building_name, $building_x, $building_y);\n\t\t\twhile ($stmt->fetch()) {\n\t\t\t\t$buildings[] = array(\"building_name\" => $building_name, 'x' => $building_x, 'y' => $building_y);\n\t\t\t}\n\t\t}\n\n\n\t\t// STEP 3: get middle x and middle y\n\t\t$middleX = getMedian($users, 'x');\n\t\t$middleY = getMedian($users, 'y');\n\n\t\t$closest_building = getClosest($buildings, $middleX, $middleY);\n\t\treturn array(\"activity_name\" => $activity_name, \"registered_users\" => $users, \"closest_building\" => $closest_building);\n\t}", "public static function getDestinationNeedCities($cityURL, $stateCode) {\n\t\tglobal $wpdb;\n\t\t\n\t\treturn $wpdb->get_results($wpdb->prepare(\"SELECT q.ID, `Requestee`, `Leaving`, `LeavingTimeZone`, `Occupants`, `FromCity`, `FromState`, `FromLatitude`, `FromLongitude`, `City` AS `ToCity`, `State` AS `ToState`, `Latitude` AS `ToLatitude`, `Longitude` AS `ToLongitude` FROM (SELECT ffi_ta_need.ID, `Requestee`, `Leaving`, `LeavingTimeZone`, `MalesPresent` + `FemalesPresent` + 1 AS `Occupants`, `City` AS `FromCity`, `State` AS `FromState`, `Latitude` AS `FromLatitude`, `Longitude` AS `FromLongitude`, `ToCity` FROM `ffi_ta_need` LEFT JOIN `ffi_ta_cities` ON ffi_ta_need.FromCity = ffi_ta_cities.ID LEFT JOIN (SELECT wp_usermeta.user_id AS `ID`, CONCAT(wp_usermeta.meta_value, ' ', last.meta_value) AS `Requestee` FROM `wp_usermeta` LEFT JOIN (SELECT `meta_value`, `user_id` FROM `wp_usermeta` WHERE `meta_key` = 'last_name') AS `last` ON wp_usermeta.user_id = last.user_id WHERE `meta_key` = 'first_name') AS `users` ON ffi_ta_need.Person = users.ID WHERE REPLACE(LOWER(ffi_ta_cities.City), ' ', '-') = %s AND ffi_ta_cities.State = %s AND (ffi_ta_need.Leaving > NOW() AND ffi_ta_need.Fulfilled = 0) OR (ffi_ta_need.Leaving <= NOW() AND ffi_ta_need.EndDate > NOW() AND ffi_ta_need.Fulfilled = 0) ORDER BY `Leaving` ASC) `q` LEFT JOIN `ffi_ta_cities` ON q.ToCity = ffi_ta_cities.ID ORDER BY `ToCity` ASC, `ToState` ASC, `Leaving` ASC\", $cityURL, $stateCode));\n\t}" ]
[ "0.5897992", "0.5793001", "0.57794833", "0.57518566", "0.5623613", "0.5551021", "0.54757845", "0.54124254", "0.53923035", "0.5346151", "0.5260339", "0.52358395", "0.52074176", "0.5170392", "0.51621073", "0.51505125", "0.51358765", "0.50730205", "0.5036109", "0.49859467", "0.49835134", "0.4940558", "0.4935654", "0.49197748", "0.48323932", "0.48306936", "0.4823869", "0.4818038", "0.47963485", "0.47861552" ]
0.71475494
0
Create a Font Awesome icon.
public static function newFontAwesomeIcon(): FontAwesomeIconInterface { return new FontAwesomeIcon(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fa_icon( $icon = 'user' ) {\n\t\treturn \"<i class=\\\"fa fa-{$icon}\\\"></i>\";\n\t}", "function font_awesome($icon){\n\treturn \"<span class='fa fa-fw $icon'></span>\";\n}", "public function get_icon()\n\t{\n\t\treturn 'fab fa-algolia';\n\t}", "static function icon($icon) {\n\t\treturn self::tag('i', 'glyphicon glyphicon-' . $icon);\n\t}", "function i($code){\n $icon = '<i class=\"fa fa-'.$code.'\"></i>';\n return $icon;\n }", "public function iconFunction($icon)\n {\n return sprintf('<span class=\"fa fa-%s\"></span>', $icon);\n }", "public function icon($icon);", "public function getIcon()\n {\n return ' fa fa-lock';\n }", "public static function parseFontAwesomeIcon(array $args): FontAwesomeIconInterface {\n\n $icon = static::newFontAwesomeIcon();\n\n $icon->setName(ArrayHelper::get($args, \"name\", \"home\"));\n $icon->setStyle(ArrayHelper::get($args, \"style\"));\n\n $icon->setAnimation(ArrayHelper::get($args, \"animation\"));\n $icon->setBordered(ArrayHelper::get($args, \"bordered\", false));\n $icon->setFixedWidth(ArrayHelper::get($args, \"fixedWidth\", false));\n $icon->setFont(ArrayHelper::get($args, \"font\"));\n $icon->setPull(ArrayHelper::get($args, \"pull\"));\n $icon->setSize(ArrayHelper::get($args, \"size\"));\n\n return $icon;\n }", "public function get_icon() {\n\t\treturn 'fa fa-pencil';\n\t}", "public function get_icon() {\n\t\treturn 'fa fa-pencil';\n\t}", "function _kalatheme_font_icon($name, $bundle = NULL, $attr = array(), $resolvePrefix = TRUE){\n if($bundle === NULL){\n $bundle = theme_get_setting('icon_font_library');\n }\n // Find the icon prefix\n if($resolvePrefix){\n switch($bundle){\n case('font_awesome'):\n $name = 'fa-' . $name;\n break;\n case('bootstrap_glyphicons'):\n $name = 'glyphicon-' . $name;\n break;\n }\n }\n\n $output = NULL;\n if (module_exists('icon')){\n $output = theme('icon', array(\n 'bundle' => $bundle,\n 'icon' => $name,\n 'attributes' => $attr\n ));\n }\n if($output === NULL){\n $attr = array();\n $attr += array('aria-hidden' => 'true' );\n $attr['class'] = array();\n\n if($bundle === 'font_awesome'){\n $attr['class'][] = 'fa';\n }\n elseif($bundle === 'bootstrap_glyphicons'){\n $attr['class'][] = 'glyphicon';\n }\n\n\n $attr['class'][] = $name;\n $output = '<span '. drupal_attributes($attr) . '></span>';\n }\n return $output;\n}", "function icon($which, $alt='', $url=false, $print_alt = false, $class=false) {\n return new Icon($which, $alt, $url, $print_alt, $class);\n}", "function addIcon($i){\n return $this->add('Icon',null,'Icon')->set($i)->addClass('atk-size-mega');\n }", "public function get_icon()\n {\n return 'fa fa-image';\n }", "function fa($icon, $element = null, $attr = null) {\n\t$render = '';\n\t\n\tif (is_null($element) && is_null($attr)) {\n\t\t$render = '<i class=\"fa fa-' . $icon . '\"></i>';\n\t} else {\n\t\tif (!is_null($element)) {\n\t\t\t$render = '<' . $element;\n\t\t} else {\n\t\t\t$render = '<i';\n\t\t}\n\t\tif (!is_null($attr)) {\n\t\t\tif (is_array($attr)) {\n\t\t\t\tif (!empty($attr['class'])) {\n\t\t\t\t\t$render .= ' class=\"fa fa-' . $icon . ' ' . $attr['class'] . '\"';\n\t\t\t\t} else {\n\t\t\t\t\t$render .= ' class=\"fa fa-' . $icon . '\"';\n\t\t\t\t}\n\t\t\t\tforeach ($attr as $index => $val) {\n\t\t\t\t\tif ($index != 'class') {\n\t\t\t\t\t\t$render .= ' ' . $index . '=\"' . $val . '\"';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$render .= ' ' . $attr;\n\t\t\t}\n\t\t} else {\n\t\t\t$render .= ' class=\"fa fa-' . $icon . '\"';\n\t\t}\n\t\tif (!is_null($element)) {\n\t\t\t$render .= '></' . $element . '>';\n\t\t} else {\n\t\t\t$render .= '></i>';\n\t\t}\n\t}\n\t\n\treturn $render;\n}", "public function get_icon() {\n\t\treturn 'fa fa-code';\n\t}", "public function get_icon() {\n\t\treturn 'fa fa-code';\n\t}", "public static function icon()\n {\n return '<i class=\"fas fa-plane-departure sidebar-icon\"></i>';\n }", "public function icon(): string;", "protected function iconHelp()\n {\n return 'For more icons please see <a href=\"http://fontawesome.io/icons/\" target=\"_blank\">http://fontawesome.io/icons/</a>';\n }", "protected function createIcon($item)\n {\n $output = '';\n\n if (array_key_exists('icon', $item)) {\n $output .= sprintf(\n '<i class=\"fa fa-lg fa-fw fa-%s\"></i> ',\n $item['icon']\n );\n }\n\n return $output;\n }", "function format_icon($p_icon, $p_color = '', $p_space_right = '5px'){\n\treturn '<i class=\"ace-icon fa ' . $p_icon . ' ' . $p_color . '\"></i>' . format_hspace($p_space_right);\n}", "public static function icon_factory( $fresh = false ) {\n\n\t\treturn self::factory( 'icon-factory', $fresh );\n\t}", "public function get_icon() {\n return 'fa fa-plug';\n }", "public function get_icon() {\n return 'fa fa-plug';\n }", "public function get_icon() {\n return 'fa fa-plug';\n }", "public function get_icon()\n {\n return 'fa fa-file-video-o';\n }", "function av_icon($icon, $font = false, $string = 'string')\n{\t\n\treturn avia_font_manager::frontend_icon($icon, $font, $string);\n}", "function studeon_vc_iconpicker_type_fontawesome($icons) {\n\t\t$list = studeon_get_list_icons();\n\t\tif (!is_array($list) || count($list) == 0) return $icons;\n\t\t$rez = array();\n\t\tforeach ($list as $icon)\n\t\t\t$rez[] = array($icon => str_replace('icon-', '', $icon));\n\t\treturn array_merge( $icons, array(esc_html__('Theme Icons', 'studeon') => $rez) );\n\t}" ]
[ "0.76038563", "0.75430125", "0.7001806", "0.6913122", "0.68559563", "0.6789669", "0.65218407", "0.6414753", "0.6343736", "0.6298402", "0.6298402", "0.62157124", "0.62005365", "0.61868227", "0.6165205", "0.615888", "0.60706115", "0.60706115", "0.60683924", "0.60541767", "0.6042999", "0.6030921", "0.60081786", "0.5995295", "0.5988851", "0.5988851", "0.5988851", "0.59859264", "0.5983694", "0.59829795" ]
0.75936645
1
Create a Material Design Iconic Font icon.
public static function newMaterialDesignIconicFontIcon(): MaterialDesignIconicFontIconInterface { return new MaterialDesignIconicFontIcon(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function parseMaterialDesignIconicFontIcon(array $args): MaterialDesignIconicFontIconInterface {\n\n $icon = static::newMaterialDesignIconicFontIcon();\n\n $icon->setName(ArrayHelper::get($args, \"name\", \"home\"));\n $icon->setStyle(ArrayHelper::get($args, \"style\"));\n\n $icon->setBorder(ArrayHelper::get($args, \"border\", false));\n $icon->setFixedWidth(ArrayHelper::get($args, \"fixedWidth\", false));\n $icon->setFlip(ArrayHelper::get($args, \"flip\"));\n $icon->setPull(ArrayHelper::get($args, \"pull\"));\n $icon->setRotate(ArrayHelper::get($args, \"rotate\"));\n $icon->setSize(ArrayHelper::get($args, \"size\"));\n $icon->setSpin(ArrayHelper::get($args, \"spin\"));\n\n return $icon;\n }", "public function getIcon() {}", "public function icon($icon);", "public function getIcon()\n {\n }", "function av_icon($icon, $font = false, $string = 'string')\n{\t\n\treturn avia_font_manager::frontend_icon($icon, $font, $string);\n}", "public function getIcon();", "public function getIcon();", "function addIcon($i){\n return $this->add('Icon',null,'Icon')->set($i)->addClass('atk-size-mega');\n }", "public static function getIcon(): string\n {\n }", "public static function getIcon(): string\n {\n }", "public function icon(): string;", "public function getIcon(): string\n {\n return $this->icon ?: static::DEFAULT_ICON;\n }", "protected function establish_icon() {\n\t\t$this->icon = \"<i class='sw swp_{$this->key}_icon'></i>\";\n\t}", "protected function get__icon()\n\t{\n\t\treturn 'coffee';\n\t}", "public function getIconName() {}", "public function getIconName() {}", "public function getIconName() {}", "public function getIconName() {}", "static function icon($icon) {\n\t\treturn self::tag('i', 'glyphicon glyphicon-' . $icon);\n\t}", "public function get_icon()\n\t{\n\t\treturn 'fab fa-algolia';\n\t}", "public static function newFontAwesomeIcon(): FontAwesomeIconInterface {\n return new FontAwesomeIcon();\n }", "public function get_icon() {\n\t\treturn 'eicon-image';\n\t}", "public function getSvgIcon();", "public function getIcon()\n {\n return $this->get(self::_ICON);\n }", "public static function getFactoryIconUseIt() {\n }", "public function get_menu_icon() {\n\t\treturn 'gform-icon--akismet';\n\t}", "protected function getIcon()\n {\n /** @var IconFactory $iconFactory */\n $iconFactory = GeneralUtility::makeInstance(IconFactory::class);\n return $iconFactory->getIcon('px-shopware-clear-cache', Icon::SIZE_SMALL)->render();\n }", "public function get_icon()\n {\n return 'fa fa-image';\n }", "public function getIconForResourceWithPngFileReturnsIcon() {}", "public function icon(): string\n {\n return 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACYSURBVEhLYxgFJIHU1FSjtLS0i0D8AYj7gEKMEBkqAaAFF4D4ERCvAFrwH4gDoFIMKSkpFkB+OTEYqgUTACXfA/GqjIwMQyD9H2hRHlQKJFcBEiMGQ7VgAqCBvUgK32dmZspCpagGGNPT0/1BLqeF4bQHQJePpiIwhmrBBEADR1MRfgB0+WgqAmOoFkwANHA0FY0CUgEDAwCQ0PUpNB3kqwAAAABJRU5ErkJggg==';\n }" ]
[ "0.7058905", "0.68383014", "0.66942304", "0.66805327", "0.66458786", "0.6594002", "0.6594002", "0.65276146", "0.65077174", "0.65077174", "0.6405133", "0.6391595", "0.63782626", "0.63415873", "0.6339644", "0.6339644", "0.6338894", "0.6338894", "0.6316775", "0.62772155", "0.6276117", "0.6270967", "0.62476224", "0.62387145", "0.62030584", "0.62029415", "0.61687", "0.61683506", "0.6163189", "0.6153032" ]
0.833063
0
Parse a Font Awesome icon.
public static function parseFontAwesomeIcon(array $args): FontAwesomeIconInterface { $icon = static::newFontAwesomeIcon(); $icon->setName(ArrayHelper::get($args, "name", "home")); $icon->setStyle(ArrayHelper::get($args, "style")); $icon->setAnimation(ArrayHelper::get($args, "animation")); $icon->setBordered(ArrayHelper::get($args, "bordered", false)); $icon->setFixedWidth(ArrayHelper::get($args, "fixedWidth", false)); $icon->setFont(ArrayHelper::get($args, "font")); $icon->setPull(ArrayHelper::get($args, "pull")); $icon->setSize(ArrayHelper::get($args, "size")); return $icon; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _parseFavicon($html){\n\n\t\t$matches = array();\n\n\t\t/* Search for <link rel=\"icon\" type=\"image/png\" href=\"http://example.com/icon.png\" /> */\n\t\tpreg_match('/><link.*?rel=(\"|\\').*icon(\"|\\').*?href=(\"|\\')(.*?)(\"|\\')/i', $html, $matches);\n\t\tif (count($matches) > 4)\n\t\t\treturn trim($matches[4]);\n\n\t\t/* Search for <link rel=\"icon\" type=\"image/png\" href=\"http://example.com/icon.png\" /> */\n\t\tpreg_match('/<link.*?type=(\"|\\')image.*(\"|\\').*?href=(\"|\\')(.*?)(\"|\\')/i', $html, $matches);\n\t\tif (count($matches) > 4)\n\t\t\treturn trim($matches[4]);\n\n\t\t/* \n\t\t * Order of attributes could be swapped around:\n\t\t * <link href=\"http://example.com/icon.png\" type=\"image/......\" />\n\t\t */\n\t\tpreg_match('/<link.*?href=(\"|\\')(.*?)(\"|\\').*?type=(\"|\\')image.*(\"|\\')/i', $html, $matches);\n\t\tif (count($matches) > 2)\n\t\t\treturn trim($matches[2]);\n\n\t\t/* \n\t\t * Order of attributes could be swapped around:\n\t\t * <link type=\"image/......\" href=\"http://example.com/icon.png\" />\n\t\t */\n\t\tpreg_match('/<link.*?rel=(\"|\\').*icon(\"|\\').*?href=(\"|\\')(.*?)(\"|\\')/i', $html, $matches);\n\t\tif (count($matches) > 4)\n\t\t\treturn trim($matches[4]);\n\n\t\t/* Order of attributes could be swapped around:\n\t\t * <link href=\"http://example.com/icon.png\" rel=\"icon\" />\n\t\t */\n\t\tpreg_match('/<link.*?href=(\"|\\')(.*?)(\"|\\').*?rel=(\"|\\').*icon(\"|\\')/i', $html, $matches);\n\t\tif (count($matches) > 2)\n\t\t\treturn trim($matches[2]);\n\n\t\t/* Order of attributes could be swapped around:\n\t\t * <link rel=\"icon\" href=\"http://example.com/icon.png\" />\n\t\t */\n\t\tpreg_match('/<link.*?rel=(\"|\\')icon(\"|\\').*?href=(\"|\\')(.*?)(\"|\\')/i', $html, $match_todo);\n\t\tif (count($match_todo) > 3)\n\t\t\treturn trim($match_todo[3]);\n\n\t\t/* No match */\n\t\treturn null;\n\t}", "function fa_icon( $icon = 'user' ) {\n\t\treturn \"<i class=\\\"fa fa-{$icon}\\\"></i>\";\n\t}", "public static function newFontAwesomeIcon(): FontAwesomeIconInterface {\n return new FontAwesomeIcon();\n }", "static function try_decode_icon($icon)\n\t{\n\t\tif(strpos($icon, 'u') === 0) $icon = json_decode('\"\\\\'.$icon.'\"');\n\t\treturn $icon;\n\t}", "function font_awesome($icon){\n\treturn \"<span class='fa fa-fw $icon'></span>\";\n}", "public function parseIconsFilter($text)\n {\n $that = $this;\n return preg_replace_callback(\n '/\\.faIco-([a-z0-9-]+)/',\n function ($matches) use ($that) {\n return $that->iconFunction($matches[1]);\n },\n $text\n );\n }", "private static function getFaiconsList() {\n\t\n\t\t$content = file_get_contents('https://raw.githubusercontent.com/FortAwesome/Font-Awesome/master/metadata/icons.json');\n\t\t$json = json_decode($content);\n\t\t$icons = [];\n\t\n\t\tforeach ($json as $icon => $value) {\n\t\t\tforeach ($value->styles as $style) {\n\t\t\t\t$icons[] = 'fa'.substr($style, 0 ,1).' fa-'.$icon;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $icons;\n\t}", "public static function validateIconName($element, FormStateInterface $form_state) {\n // Load the configuration settings.\n $configuration_settings = \\Drupal::config('fontawesome.settings');\n // Check if we need to bypass.\n if ($configuration_settings->get('bypass_validation')) {\n return;\n }\n\n $value = $element['#value'];\n if (strlen($value) == 0) {\n $form_state->setValueForElement($element, '');\n return;\n }\n\n // Load the icon data so we can check for a valid icon.\n $iconData = \\Drupal::service('fontawesome.font_awesome_manager')->getIconMetadata($value);\n\n if (!isset($iconData['name'])) {\n $form_state->setError($element, t(\"Invalid icon name %value. Please see @iconLink for correct icon names, or turn off validation in the Font Awesome settings if you are trying to use custom icon names.\", [\n '%value' => $value,\n '@iconLink' => Link::fromTextAndUrl(t('the Font Awesome icon list'), Url::fromUri('https://fontawesome.com/icons'))->toString(),\n ]));\n }\n }", "public function get_icon()\n\t{\n\t\treturn 'fab fa-algolia';\n\t}", "public function icon($icon);", "public function getIcon() {\r\n \r\n $mime = explode(\"/\", $this->mime); \r\n \r\n switch ($mime[0]) {\r\n case \"video\" : \r\n return [\r\n \"label\" => \"Video\",\r\n \"icon\" => '<i class=\"fa fa-file-video-o\"></i>'\r\n ];\r\n \r\n break;\r\n \r\n case \"image\" : \r\n return [\r\n \"label\" => \"Image\",\r\n \"icon\" => '<i class=\"fa fa-file-image-o\"></i>'\r\n ];\r\n \r\n break;\r\n \r\n }\r\n \r\n switch ($this->mime) {\r\n case \"application/msword\":\r\n case \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\":\r\n return [ \r\n \"label\" => \"Microsoft Word\",\r\n \"icon\" => '<i class=\"fa fa-file-word-o\"></i>'\r\n ];\r\n \r\n break;\r\n \r\n case \"application/vnd.ms-excel\":\r\n case \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\":\r\n return [ \r\n \"label\" => \"Microsoft Excel\",\r\n \"icon\" => '<i class=\"fa fa-file-excel-o\"></i>'\r\n ];\r\n \r\n break;\r\n \r\n case \"application/pdf\":\r\n case \"application/x-pdf\":\r\n return [ \r\n \"label\" => \"PDF\",\r\n \"icon\" => '<i class=\"fa fa-file-pdf-o\"></i>'\r\n ];\r\n \r\n break;\r\n \r\n }\r\n \r\n return [\r\n \"label\" => \"Unknown\",\r\n \"icon\" => '<i class=\"fa fa-file-o\"></i>'\r\n ];\r\n \r\n }", "public function getIcon() {\n\t\t//regex is used to check if there's a filename within the iconFile string\n\t\treturn preg_replace('/^.*\\/([^\\/]+\\.(gif|png))?$/i', '\\1', $this->iconFile) ? $this->iconFile : '';\n\t}", "protected function getFaIds()\n {\n $arrMatches = [];\n $path = \\Contao\\Config::get('fontawesomIconPickerFontawesomeMeta');\n if (strpos($path, '/') !== 0) {\n $path = '/'.$path;\n }\n $strFile = file_get_contents(TL_ROOT . $path);\n\n $arrYaml = Yaml::parse($strFile);\n foreach ($arrYaml as $iconName => $arrItemProps)\n {\n $arrItem = array(\n 'id' => $iconName,\n 'faClass' => 'fa-' . $iconName,\n 'styles' => $arrItemProps['styles'],\n 'label' => $arrItemProps['label'],\n 'unicode' => $arrItemProps['unicode']\n );\n\n if (is_array($arrItemProps['styles']))\n {\n if (in_array('light', $arrItemProps['styles']))\n {\n $arrItem['style'] = 'light';\n $arrItem['faStyle'] = 'fal';\n }\n\n if (in_array('regular', $arrItemProps['styles']))\n {\n $arrItem['style'] = 'regular';\n $arrItem['faStyle'] = 'far';\n }\n\n if (in_array('solid', $arrItemProps['styles']))\n {\n $arrItem['style'] = 'solid';\n $arrItem['faStyle'] = 'fas';\n }\n\n if (in_array('brands', $arrItemProps['styles']))\n {\n $arrItem['style'] = 'brands';\n $arrItem['faStyle'] = 'fab';\n }\n\n }\n $arrMatches[] = $arrItem;\n }\n\n return $arrMatches;\n }", "function av_icon($icon, $font = false, $string = 'string')\n{\t\n\treturn avia_font_manager::frontend_icon($icon, $font, $string);\n}", "function studeon_vc_iconpicker_type_fontawesome($icons) {\n\t\t$list = studeon_get_list_icons();\n\t\tif (!is_array($list) || count($list) == 0) return $icons;\n\t\t$rez = array();\n\t\tforeach ($list as $icon)\n\t\t\t$rez[] = array($icon => str_replace('icon-', '', $icon));\n\t\treturn array_merge( $icons, array(esc_html__('Theme Icons', 'studeon') => $rez) );\n\t}", "private function parseInlineIcons($message)\n {\n preg_match('/<icon.*<\\/icon>/U', $message, $inline);\n\n if ($inline) {\n preg_match('/(?<=<icon>).*(?=<\\/icon>)/U', $inline[0], $icon);\n $icon = $icon ? $this->getIconCode($icon[0]) : \"\";\n $message = str_replace($inline, $icon, $message);\n\n return $this->parseInlineIcons($message);\n }\n\n return $message;\n }", "function maybe_enqueue_font_awesome( $field )\n\t{\n\t\tif( 'font-awesome' == $field['type'] && $field['enqueue_fa'] ) {\n\t\t\tadd_action( 'wp_footer', array( $this, 'frontend_enqueue_scripts' ) );\n\t\t}\n\n\t\treturn $field;\n\t}", "public function icon(): string;", "public function get_icon()\n {\n return 'fa fa-image';\n }", "function av_icon_char($char)\n{\n\tglobal $avia_config;\n\treturn avia_font_manager::frontend_icon($avia_config['font_icons'][$char]['icon'], $avia_config['font_icons'][$char]['font'], false);\n}", "public function get_icon()\n {\n return 'fa fa-file-video-o';\n }", "function i($code){\n $icon = '<i class=\"fa fa-'.$code.'\"></i>';\n return $icon;\n }", "function format_icon($p_icon, $p_color = '', $p_space_right = '5px'){\n\treturn '<i class=\"ace-icon fa ' . $p_icon . ' ' . $p_color . '\"></i>' . format_hspace($p_space_right);\n}", "static function icon($icon) {\n\t\treturn self::tag('i', 'glyphicon glyphicon-' . $icon);\n\t}", "function av_icon_css_string($char)\n{\n\tglobal $avia_config;\n\treturn \"content:'\\\\\".str_replace('ue','E',$avia_config['font_icons'][$char]['icon']).\"'; font-family: '\".$avia_config['font_icons'][$char]['font'].\"';\";\n}", "public function getIconName() {}", "public function getIconName() {}", "public static function parseMaterialDesignIconicFontIcon(array $args): MaterialDesignIconicFontIconInterface {\n\n $icon = static::newMaterialDesignIconicFontIcon();\n\n $icon->setName(ArrayHelper::get($args, \"name\", \"home\"));\n $icon->setStyle(ArrayHelper::get($args, \"style\"));\n\n $icon->setBorder(ArrayHelper::get($args, \"border\", false));\n $icon->setFixedWidth(ArrayHelper::get($args, \"fixedWidth\", false));\n $icon->setFlip(ArrayHelper::get($args, \"flip\"));\n $icon->setPull(ArrayHelper::get($args, \"pull\"));\n $icon->setRotate(ArrayHelper::get($args, \"rotate\"));\n $icon->setSize(ArrayHelper::get($args, \"size\"));\n $icon->setSpin(ArrayHelper::get($args, \"spin\"));\n\n return $icon;\n }", "public function getIconName() {}", "public function getIconName() {}" ]
[ "0.6159965", "0.6083675", "0.5878301", "0.5808249", "0.57829416", "0.5760135", "0.57514143", "0.5750831", "0.5717603", "0.56902206", "0.55748963", "0.55155647", "0.5512094", "0.53570056", "0.52914655", "0.52423877", "0.5214178", "0.51343954", "0.51150113", "0.51147026", "0.5113578", "0.51133907", "0.5096938", "0.508336", "0.5078419", "0.5069457", "0.5069457", "0.50684476", "0.50684375", "0.50684375" ]
0.6573195
0
Parse a Material Design Iconic Font icon.
public static function parseMaterialDesignIconicFontIcon(array $args): MaterialDesignIconicFontIconInterface { $icon = static::newMaterialDesignIconicFontIcon(); $icon->setName(ArrayHelper::get($args, "name", "home")); $icon->setStyle(ArrayHelper::get($args, "style")); $icon->setBorder(ArrayHelper::get($args, "border", false)); $icon->setFixedWidth(ArrayHelper::get($args, "fixedWidth", false)); $icon->setFlip(ArrayHelper::get($args, "flip")); $icon->setPull(ArrayHelper::get($args, "pull")); $icon->setRotate(ArrayHelper::get($args, "rotate")); $icon->setSize(ArrayHelper::get($args, "size")); $icon->setSpin(ArrayHelper::get($args, "spin")); return $icon; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function newMaterialDesignIconicFontIcon(): MaterialDesignIconicFontIconInterface {\n return new MaterialDesignIconicFontIcon();\n }", "function av_icon($icon, $font = false, $string = 'string')\n{\t\n\treturn avia_font_manager::frontend_icon($icon, $font, $string);\n}", "public function icon($icon);", "public function getIcon();", "public function getIcon();", "public function getIcon() {}", "public function getIcon() {\n\t\t//regex is used to check if there's a filename within the iconFile string\n\t\treturn preg_replace('/^.*\\/([^\\/]+\\.(gif|png))?$/i', '\\1', $this->iconFile) ? $this->iconFile : '';\n\t}", "public function getSvgIcon();", "function av_icon_css_string($char)\n{\n\tglobal $avia_config;\n\treturn \"content:'\\\\\".str_replace('ue','E',$avia_config['font_icons'][$char]['icon']).\"'; font-family: '\".$avia_config['font_icons'][$char]['font'].\"';\";\n}", "private function get_icon()\n\t{\n\t\treturn $this->m_icon;\n\t}", "private function get_icon()\n\t{\n\t\treturn $this->m_icon;\n\t}", "public function get_menu_icon() {\n\t\treturn 'gform-icon--akismet';\n\t}", "public function getIcon() {\r\n \r\n $mime = explode(\"/\", $this->mime); \r\n \r\n switch ($mime[0]) {\r\n case \"video\" : \r\n return [\r\n \"label\" => \"Video\",\r\n \"icon\" => '<i class=\"fa fa-file-video-o\"></i>'\r\n ];\r\n \r\n break;\r\n \r\n case \"image\" : \r\n return [\r\n \"label\" => \"Image\",\r\n \"icon\" => '<i class=\"fa fa-file-image-o\"></i>'\r\n ];\r\n \r\n break;\r\n \r\n }\r\n \r\n switch ($this->mime) {\r\n case \"application/msword\":\r\n case \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\":\r\n return [ \r\n \"label\" => \"Microsoft Word\",\r\n \"icon\" => '<i class=\"fa fa-file-word-o\"></i>'\r\n ];\r\n \r\n break;\r\n \r\n case \"application/vnd.ms-excel\":\r\n case \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\":\r\n return [ \r\n \"label\" => \"Microsoft Excel\",\r\n \"icon\" => '<i class=\"fa fa-file-excel-o\"></i>'\r\n ];\r\n \r\n break;\r\n \r\n case \"application/pdf\":\r\n case \"application/x-pdf\":\r\n return [ \r\n \"label\" => \"PDF\",\r\n \"icon\" => '<i class=\"fa fa-file-pdf-o\"></i>'\r\n ];\r\n \r\n break;\r\n \r\n }\r\n \r\n return [\r\n \"label\" => \"Unknown\",\r\n \"icon\" => '<i class=\"fa fa-file-o\"></i>'\r\n ];\r\n \r\n }", "public function getIcon()\n {\n return $this->get(self::_ICON);\n }", "public function getIcon()\n {\n }", "public function icon ( )\n\t{\n\t\treturn Array( 'id' => $this->id,\t// shoud be consistent with what is passed to _uicmp_stuff_fold class\n\t\t\t\t\t 'title' => $this->messages['icon'] );\n\t}", "function av_icon_string($char)\n{\n\tglobal $avia_config;\n\t\n\tif(!isset($avia_config['font_icons'][$char]['icon'])) $char = 'standard';\n\t\n\treturn avia_font_manager::frontend_icon($avia_config['font_icons'][$char]['icon'], $avia_config['font_icons'][$char]['font']);\n}", "function av_icon_char($char)\n{\n\tglobal $avia_config;\n\treturn avia_font_manager::frontend_icon($avia_config['font_icons'][$char]['icon'], $avia_config['font_icons'][$char]['font'], false);\n}", "public function getIcon()\n {\n return $this->icon;\n }", "public function getIcon()\n {\n return $this->icon;\n }", "public function getIcon()\n {\n return $this->icon;\n }", "public function getIcon()\n {\n return $this->icon;\n }", "public function getIcon()\n {\n return $this->icon;\n }", "public function getIcon()\n {\n return $this->icon;\n }", "public function getIcon()\n {\n return $this->icon;\n }", "public function icon(): string;", "public function getIcon(): string\n {\n return $this->icon ?: static::DEFAULT_ICON;\n }", "public static function getIcon(): string\n {\n }", "public static function getIcon(): string\n {\n }", "static function try_decode_icon($icon)\n\t{\n\t\tif(strpos($icon, 'u') === 0) $icon = json_decode('\"\\\\'.$icon.'\"');\n\t\treturn $icon;\n\t}" ]
[ "0.676625", "0.6017633", "0.59385115", "0.5873442", "0.5873442", "0.5862009", "0.5770806", "0.5744816", "0.5736445", "0.5695407", "0.5695407", "0.56531", "0.56249464", "0.5595677", "0.55845106", "0.5574528", "0.55662036", "0.55342746", "0.5507407", "0.5507407", "0.5507407", "0.5507407", "0.5507407", "0.5507407", "0.5507407", "0.5507129", "0.54999876", "0.5466602", "0.5466602", "0.54634225" ]
0.6822867
0
Get the observers attached to this object.
public function observers() { return $this->observers; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getObservers()\n {\n return $this->observers;\n }", "public function getObservers()\n {\n return $this->observers;\n }", "public static function getObservers()\n\t{\n\t\t$observers = self::$_observers;\n\t\treturn $observers;\n\t}", "public function get_observers() : array\n\t{\n\t\treturn $this->_observers;\n\t}", "public function getObservacions()\n {\n return $this->observacions;\n }", "public final function GetObserver()\n {\n return $this->observer;\n }", "public function observers();", "public function getElementProgressObservers()\n {\n return $this->_elementProgressObservers;\n }", "public function getEventListeners()\n {\n return $this->eventListeners;\n }", "public function getObservateurs()\n {\n return $this->observateurs;\n }", "public function getSubscribers()\n\t\t{\n\t\t\treturn $this->subscribers;\n\t\t}", "public static function get_observer_list() {\n $events = \\core\\event\\manager::get_all_observers();\n foreach ($events as $key => $observers) {\n foreach ($observers as $observerskey => $observer) {\n $events[$key][$observerskey]->parentplugin =\n \\core_plugin_manager::instance()->get_parent_of_subplugin($observer->plugintype);\n }\n }\n return $events;\n }", "public function getObservacoes()\n {\n return $this->observacoes;\n }", "public function getSubscribers()\n {\n return $this['subscribers'];\n }", "function getObservaciones() {\r\n return $this->observaciones;\r\n }", "public static function getObservers(prototype\\Prototype $prototype) :array\n {\n return (isset(self::$observers[$prototype]) ? self::$observers[$prototype] : [] );\n }", "public function getEvents()\n {\n return $this->eventListeners;\n }", "public function getListeners()\n {\n return $this->listeners;\n }", "public function getListeners()\n {\n return $this->listeners;\n }", "public function getObservableEvents()\n {\n return array_merge(\n [\n 'creating', 'created', 'updating', 'updated',\n 'deleting', 'deleted', 'saving', 'saved',\n 'fetching', 'fetched'\n ],\n $this->observables\n );\n }", "public function events()\n {\n return $this->events;\n }", "public function events()\n {\n return $this->events;\n }", "public function subscribers() {\n return new Subscriber($this);\n }", "public function getObs()\n {\n return $this->obs;\n }", "public function getObservableEvents()\n {\n return array_merge(\n [\n 'retrieved', 'creating', 'created', 'updating', 'updated',\n 'saving', 'saved', 'restoring', 'restored', 'replicating',\n 'deleting', 'deleted', 'forceDeleted',\n ],\n static::getRelationshipObservables(),\n $this->observables,\n );\n }", "public function getWindowResizeListeners() {\n return ($this->resizeListeners == null) ? new SplObjectStorage() : $this->resizeListeners;\n }", "public function getNotifications()\n {\n return $this->_notifications;\n }", "public function getEvents()\n {\n return $this->_events;\n }", "public function getEvents() {\n return $this->_events;\n }", "public function getListeners(): array;" ]
[ "0.8706012", "0.8706012", "0.84819514", "0.8188519", "0.74312025", "0.7168714", "0.71632785", "0.6904595", "0.6642985", "0.6642676", "0.66323316", "0.6561525", "0.6549337", "0.6512406", "0.64812803", "0.6333697", "0.6272465", "0.6260663", "0.6260663", "0.62135774", "0.6192441", "0.6192441", "0.613398", "0.609224", "0.60046834", "0.59729975", "0.59691983", "0.59525687", "0.5938053", "0.59369344" ]
0.89210606
0
Detach an observer from the list of observers.
public function detach(Observer $observer) { if (($key = array_search($observer, $this->observers, true)) !== false) { unset($this->observers[$key]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function detach(Observer $observer) {\n foreach ($this->observers as $key => $obs) {\n if ($observer == $obs) {\n unset($this->observers[$key]);\n break;\n }\n }\n }", "public function detach(Observer $observer)\n\t{\n\t\tunset($this->_observers[array_search($observer, $this->_observers)]);\n\t}", "public function detach($observer)\n {\n $observerKey = spl_object_hash($observer);\n unset($this->observers[$observerKey]);\n }", "public function detach(SplObserver $observer){\n $id = spl_object_hash($observer);\n unset($this->observers[$id]);\n }", "public function removeObserver() {\n //$this->__observers = array();\n foreach($this->__observers as $obj) {\n unset($obj);\n }\n }", "function detach(AbstractObserver $observer)\n {\n foreach($this->observers as $okey => $oval) {\n if ($oval == $observer) {\n unset($this->observers[$okey]);\n }\n }\n }", "function detach(Observer $observer_in) {\n //or\n //$this->observers = array_diff($this->observers, array($observer_in));\n //or\n foreach($this->observers as $okey => $oval) {\n if ($oval == $observer_in) {\n unset($this->observers[$okey]);\n }\n }\n }", "public function detach( $observer )\r\n {\r\n $this->observers []= $observer; // an an observer to the observer subject.\r\n }", "public function detach(\\SplObserver $observer) {}", "public function detach(ObserverInterface $observer)\n {\n $observers = $this->getObservers();\n\n foreach ($observer->getEvents() as $event) {\n $count = count($observers[$event]);\n\n for ($i = 0; $i < $count; $i++) {\n if ($observers[$event][$i] == $observer) {\n unset($observers[$event][$i]);\n }\n }\n }\n\n $this->setObservers($observers);\n }", "public function detach(SplObserver $observer)\n {\n $this->_observers->detach($observer);\n }", "public function detach(\\SplObserver $observer)\n {\n $this->storage->detach($observer);\n }", "public function detach( \\SplObserver $observer )\n {\n $this->_storage->detach( $observer );\n }", "public function removeObserver($observer)\n {\n if (in_array($observer, $this->observers)) {\n $key = array_search($observer, $this->observers);\n if (!empty($this->observers[$key])) {\n unset($this->observers[$key]);\n }\n }\n }", "public function detach($observer)\n\t{\n // Not implemented here\n }", "public function detach($event, Event_ObserverInterface $observer) {\r\n\t\tif (isset($this->_eventObservers[$event])) {\r\n\t\t\t$key = array_search($observer, $this->_eventObservers[$event], true);\r\n\t\t\tif ($key !== false) {\r\n\t\t\t\tarray_splice($this->_eventObservers[$event], $key, 1);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function detach(\\SplObserver $observer) {\n\t\treturn $this->storage->delete($observer);\n\t}", "public function unsubscribe( ?IObserver $observer = null ) : IObservable\n {\n\n for ( $i = 0, $c = \\count( $this->_observers ); $i < $c; $i++)\n {\n if ( $observer === $this->_observers[ $i ] )\n {\n unset( $this->_observers[ $i ] );\n }\n }\n\n $this->_observers = array_values( $this->_observers );\n\n return $this;\n\n }", "public function detach(ObservesProxyLoading $observer) : void;", "public function detachObserver(Delegate_1 $d)\n\t{\n\t\t// detach this observer\n\t\t$hash = spl_object_hash($d);\n\t\tunset($this->observers[$hash]);\n\t}", "function detach($observer, $eventIDArray)\n {\n foreach ($eventIDArray as $eventID) {\n $nameHash = md5(get_class($observer) . $eventID);\n base::unsetStaticObserver($nameHash);\n }\n }", "public function detach(EventObserver $observer):bool{\r\n $name=$observer->eventName();\r\n if (is_string($name))$name=[$name];\r\n $deatch=0;\r\n foreach ($name as $v){\r\n foreach ($this->storage[$v]??[] as $k=>$ob){\r\n if($ob[0]===$observer){\r\n unset($this->storage[$v][$k]);\r\n $deatch++;\r\n }\r\n }\r\n }\r\n return $deatch;\r\n }", "public function detach(SplObserver $obj)\n\t{\n\t\t// Remove the listener\n\t\tunset($this->listeners[spl_object_hash($obj)]);\n\n\t\treturn $this;\n\t}", "function detach(ftpClientObserver $observer) {\r\n\t\tif ( !isset($this->_listeners[$observer->getId()]) ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tunset($this->_listeners[$observer->getId()]);\r\n\t\treturn true;\r\n\t}", "public function detach(EventManagerInterface $events)\r\n {\r\n foreach ($this->listeners as $index => $listener) {\r\n if ($events->detach($listener)) {\r\n unset($this->listeners[$index]);\r\n }\r\n }\r\n }", "public function detach(EventManagerInterface $events)\n {\n foreach ($this->listeners as $index => $listener) {\n if ($events->detach($listener)) {\n unset($listener[$index]);\n }\n }\n }", "public function removeObserver(Component $observer) {\n $observer->attributes()->remove('data-equalizer-watch');\n return $this;\n }", "public function detach(EventManagerInterface $events)\n {\n foreach ($this->listeners as $index => $listener) {\n if ($events->detach($listener)) {\n unset($this->listeners[$index]);\n }\n }\n }", "public function detach(EventManagerInterface $events)\n {\n foreach ($this->listeners as $index => $listener) {\n if ($events->detach($listener)) {\n unset($this->listeners[$index]);\n }\n }\n }", "public function detach(EventManagerInterface $events)\n {\n foreach ($this->listeners as $index => $listener) {\n if ($events->detach($listener)) {\n unset($this->listeners[$index]);\n }\n }\n }" ]
[ "0.82576317", "0.8136378", "0.7937366", "0.7899317", "0.78832656", "0.7800022", "0.7721606", "0.7624079", "0.7622597", "0.7566358", "0.74750525", "0.733576", "0.7317719", "0.7245711", "0.71319586", "0.7009916", "0.69106203", "0.6609986", "0.65475345", "0.6437398", "0.6430881", "0.6356355", "0.61851287", "0.60559875", "0.60073256", "0.5966593", "0.5900076", "0.5833134", "0.5833134", "0.5833134" ]
0.82060266
1
declare saveXML methods for all CurrencyXML classes
public function SaveXMLFile();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function saveXML(){\r\n return $this->xml->saveXML();\r\n }", "private function _saveExt() {\r\n\r\n }", "function saveToXML( $filename, $xml = null ){\n\t\tif( ! $xml ){\n\t\t\t$xml = $this->xml;\n\t\t}\n\t\t$xml->asXML( $filename );\n\t}", "abstract public function save();", "abstract public function save();", "abstract public function save();", "abstract public function save();", "abstract public function save();", "public abstract function save();", "public function write($xml);", "public function save(){ \r\n return $this->xmlfile->save($this->absolutepath);\r\n }", "private function writeCurrenciesToFile() {\n createFile(\n \"currencies.xml\",\n $this->currencies[0]->asXML()\n );\n }", "public function toXML();", "public function saveSO() {\n // Setup XML\n $xml = \"<FbiXml>\".\n \" <Ticket>\".\n \" <Key></Key>\".\n \" </Ticket>\".\n \"<FbiMsgsRq>\". \n \" <SOSaveRq>\\n\".\n\t\t\t\t\"\t\t\t\t\t<SalesOrder>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t<Salesman>admin</Salesman>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t<Number>60312</Number>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t<Status>10</Status>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t<Carrier>Will Call</Carrier>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t<FirstShipDate>2016-08-29T00:00:00</FirstShipDate>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t<CreatedDate>2016-08-29T00:00:00</CreatedDate>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t<IssuedDate>2016-08-29T16:48:56</IssuedDate>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t<TaxRatePercentage>0.0625</TaxRatePercentage>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t<TaxRateName>Utah</TaxRateName>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t<ShippingTerms>Prepaid </ShippingTerms>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t<PaymentTerms>COD</PaymentTerms>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t<CustomerContact>Beach Bike</CustomerContact>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t<CustomerName>Beach Bike</CustomerName>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t<FOB>Origin</FOB>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t<QuickBooksClassName>Salt Lake City</QuickBooksClassName>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t<LocationGroup>AYC</LocationGroup>\\n\".\t\t\t\t\n\t\t\t\t\"\t\t\t\t\t\t<BillTo>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t <Name>test</Name>\\n\".\n \" <AddressField>555 Suntan Ave.</AddressField>\".\n\t\t\t\t\" <City>Santa Barbara</City>\".\n\t\t\t\t\" \t <Zip>93101</Zip>\". \n\t\t\t\t\"\t\t\t\t\t\t</BillTo>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t<Ship>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t <Name>test</Name>\\n\".\n \" <AddressField>555 Suntan Ave.</AddressField>\".\n\t\t\t\t\" \t <Zip>93101</Zip>\".\n\t\t\t\t\" <Country>US</Country>\". \n\t\t\t\t\" <State>California</State>\". \n\t\t\t\t\"\t\t\t\t\t\t</Ship>\\n\";\n\t\t//foreach ($data['soitems'] AS $key=>$value) {\n\t\t\t$xml .=\"\t\t\t\t\t<SalesOrderItem>\\n\n\t\t\t\t\t\t\t\t\t\t <ID>-1</ID>\\n\n\t\t\t\t\t\t\t\t\t\t <ProductNumber>00-KIN-APPHDR-057</ProductNumber>\\n\n <SOID>94</SOID>\\n\n <Description>Battery Pack</Description>\n <Taxable>true</Taxable>\\n \n\t\t\t\t\t\t\t\t\t\t <Quantity>1</Quantity>\\n\n <ProductPrice>-95.00</ProductPrice>\n <TotalPrice>-95.00</TotalPrice>\n <UOMCode>ea</UOMCode>\n\t\t\t\t\t\t\t\t\t\t <ItemType>20</ItemType>\\n\n\t\t\t\t\t\t\t\t\t\t <QuickBooksClassName>Salt Lake City</QuickBooksClassName>\\n\n\t\t\t\t\t\t\t\t\t\t <NewItemFlag>false</NewItemFlag>\\n\n <LineNumber>2</LineNumber>\n\t\t\t\t\t\t\t\t\t\t</SalesOrderItem>\\n\";\n\t\t//}\n\t\t$xml .=\"\t\t\t\t\t </SalesOrder>\\n\".\n \"<IssueFlag>false</IssueFlag>\".\n\t\t\t\"<IgnoreItems>false</IgnoreItems>\".\n \"</SOSaveRq>\\n\".\n \"</FbiMsgsRq>\";\n\t\t// Create request and pack\n\t\t$this->createRequest($xml);\n $len = strlen($this->xmlRequest);\n $packed = pack(\"N\", $len);\n\n // Send and get the response\n fwrite($this->id, $packed, 4);\n fwrite($this->id, $this->xmlRequest);\n $this->getResponse();\n\n // Set the result\n $this->setResult($this->parseXML($this->xmlResponse));\n }", "public function save():void;", "protected function saving() {\n // This will get reimplemented by children when necessary\n }", "final function save() { return $this->parser->saveXML($this->root, LIBXML_NOEMPTYTAG); }", "public function saveXML(){\n\t\t$path = \"/var/www/html/cap_12\";\n\t\t$xml = $this->gerarXMLCAP12();\n\t\n\t\t$siglacap = $this->instituicao->siglacap;\n\t\t$anoFolder = date('Y');\n\t\t$mesFolder = date('m');\n\t\t$diaFolder = date('d');\n\t\n\t\t$writer = new Writer();\n\t\t$writer->write($path . DIRECTORY_SEPARATOR)\n\t\t\t\t ->write($anoFolder . DIRECTORY_SEPARATOR)\n\t\t\t\t ->write($mesFolder . DIRECTORY_SEPARATOR)\n\t\t\t\t ->write($diaFolder . DIRECTORY_SEPARATOR)\n\t\t\t\t ->write($siglacap . DIRECTORY_SEPARATOR);\n\t\t\t\t\n\t\t$nomePasta = $writer->getString();\n\t\t$fileHelper = new FileHelper();\n\t\t$fileHelper->createDirectory($nomePasta, 755, true);\t\n\t\t\n\t\t$nomeArquivo = $nomePasta. $this->identifier.\".xml\";\n\t\ttry {\n\t\t\t$this->salvarArquivo($nomeArquivo, $xml);\n\t\t\t\n\t\t} catch (Exception $e) {\n\t\t\tthrow new \\Exception(\"Erro ao tentar salvar o arquivo xml do cap\");\n\t\t}\n\t\treturn str_replace(\"/var/www/html/\", \"\", $nomeArquivo);\t\n\t}", "public function asXML();", "function toXML()\n {\n // Not implemented yet.\n }", "public function saveXml()\n {\n return $this->_dom->saveXML();\n }", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();" ]
[ "0.6602003", "0.60516995", "0.59322", "0.59290487", "0.59290487", "0.59290487", "0.59290487", "0.59290487", "0.5848328", "0.5848209", "0.5755934", "0.5752415", "0.57128674", "0.5674834", "0.5648613", "0.55392355", "0.5537048", "0.5531162", "0.55105424", "0.5495702", "0.54951566", "0.5462769", "0.5462769", "0.5462769", "0.5462769", "0.5462769", "0.5462769", "0.5462769", "0.5462769", "0.5462769" ]
0.67472976
0
Get Data content by index Pay attention to the return value, If no $indexTo target will return the empty array, When the target may be 0 or null, you need to pay attention to the judgment. Usage: $data = ['user' => ['name' => 'Mars', 'birthday' => '20000101']]; var_export(ArrayHelper::getContent($data)); // full $data content var_export(ArrayHelper::getContent($data, 'user')); // ['name' => 'Mars', 'birthday' => '20000101'] var_export(ArrayHelper::getContent($data, ['user', 'name'])); // Mars var_export(ArrayHelper::getContent($data, 'user, name')); // Mars var_export(ArrayHelper::getContent($data, ['user', 'name', 'aaa'])); // []
public static function getContent(Array $data, $indexTo = [], $exception = false) { /* Arguments prepare */ if (is_string($indexTo)) { $indexTo = array_map('trim', explode(',', $indexTo)); } $indexed = []; foreach ($indexTo as $idx) { // save runed index $indexed[] = $idx; if (is_array($data) && array_key_exists($idx, $data)) { // If exists, Get values by recursion $data = $data[$idx]; } else { // Not exists, Exception or return [] if ($exception) { throw new \Exception('Error index: ' . implode(' => ', $indexed), 400); } else { $data = []; break; } } } return $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getData($key = '', $index = null);", "function getContents($index=null) {\n\t\tif($index===null) {\n\t\t\treturn $this->_dataobjects;\n\t\t}\n\t\tif(!isset($this->_dataobjects[$index])) {\n\t\t\treturn false;\n\t\t}\n\t\treturn $this->_dataobjects[$index];\n\n\t}", "function data_get($target, $key, $default = null)\n {\n if (is_null($key)) {\n return $target;\n }\n\n $key = is_array($key) ? $key : explode('.', is_int($key) ? (string) $key : $key);\n while (!is_null($segment = array_shift($key))) {\n if ('*' === $segment) {\n if ($target instanceof Collection) {\n $target = $target->all();\n } elseif (!is_array($target)) {\n return value($default);\n }\n $result = [];\n foreach ($target as $item) {\n $result[] = data_get($item, $key);\n }\n\n return in_array('*', $key) ? Arr::collapse($result) : $result;\n }\n if (Arr::accessible($target) && Arr::exists($target, $segment)) {\n $target = $target[$segment];\n } elseif (is_object($target) && isset($target->{$segment})) {\n $target = $target->{$segment};\n } else {\n return value($default);\n }\n }\n\n return $target;\n }", "public function getData($key = '', $index = null)\n {\n if ('' === $key) {\n return $this->_data;\n }\n \n $default = null;\n \n // accept a/b/c as ['a']['b']['c']\n if (strpos ( $key, '/' )) {\n $keyArr = explode ( '/', $key );\n $data = $this->_data;\n foreach ( $keyArr as $i => $k ) {\n if ($k === '') {\n return $default;\n }\n if (is_array ( $data )) {\n if (! isset ( $data [$k] )) {\n return $default;\n }\n $data = $data [$k];\n } elseif ($data instanceof Object) {\n $data = $data->getData ( $k );\n } else {\n return $default;\n }\n }\n return $data;\n }\n \n // legacy functionality for $index\n if (isset ( $this->_data [$key] )) {\n if (is_null ( $index )) {\n return $this->_data [$key];\n }\n \n $value = $this->_data [$key];\n if (is_array ( $value )) {\n /**\n * If we have any data, even if it empty - we should use it, anyway\n */\n if (isset ( $value [$index] )) {\n return $value [$index];\n }\n return null;\n } elseif (is_string ( $value )) {\n $arr = explode ( \"\\n\", $value );\n return (isset ( $arr [$index] ) && (! empty ( $arr [$index] ) || strlen ( $arr [$index] ) > 0)) ? $arr [$index] : null;\n } elseif ($value instanceof Object) {\n return $value->getData ( $index );\n } else {\n return $default;\n }\n }\n return $default;\n }", "function data_get($target, $key, $default = null)\n {\n if (is_null($key)) {\n return $target;\n }\n\n $key = is_array($key) ? $key : explode('.', $key);\n\n while (!is_null($segment = array_shift($key))) {\n if ($segment === '*') {\n if (!is_array($target)) {\n return value($default);\n }\n\n $result = [];\n\n foreach ($target as $item) {\n $result[] = data_get($item, $key);\n }\n\n return in_array('*', $key) ? PhandArr::flatten($result) : $result;\n }\n\n if (PhandArr::accessible($target) && PhandArr::exists($target, $segment)) {\n $target = $target[$segment];\n } elseif (is_object($target) && isset($target->{$segment})) {\n $target = $target->{$segment};\n } else {\n return value($default);\n }\n }\n\n return $target;\n }", "function data_get($target, $key, $default = null)\n {\n if (is_null($key)) {\n return $target;\n }\n\n $key = is_array($key) ? $key : explode('.', $key);\n\n while (!is_null($segment = array_shift($key))) {\n if ($segment === '*') {\n if ($target instanceof Collection) {\n $target = $target->all();\n } elseif (!is_array($target)) {\n return value($default);\n }\n\n $result = Arr::pluck($target, $key);\n\n return in_array('*', $key) ? Arr::collapse($result) : $result;\n }\n\n if (Arr::accessible($target) && Arr::exists($target, $segment)) {\n $target = $target[$segment];\n } elseif (is_object($target) && isset($target->{$segment})) {\n $target = $target->{$segment};\n } else {\n return value($default);\n }\n }\n\n return $target;\n }", "public function buildAndFetchAll( $data, $arrayIndex=null );", "public function get($position = null)\n {\n return $this->getArray('content', $position);\n }", "public function get($position = null)\n {\n return $this->getArray('content', $position);\n }", "function asdb_data_get($target, $key, $default = null)\n\t{\n\t\tif (is_null($key)) {\n\t\t\treturn $target;\n\t\t}\n\n\t\t$key = is_array($key) ? $key : explode('.', $key);\n\n\t\tforeach ($key as $i => $segment) {\n\t\t\tunset($key[$i]);\n\n\t\t\tif (is_null($segment)) {\n\t\t\t\treturn $target;\n\t\t\t}\n\n\t\t\tif ($segment === '*') {\n\t\t\t\tif ($target instanceof Collection) {\n\t\t\t\t\t$target = $target->all();\n\t\t\t\t} elseif (! is_array($target)) {\n\t\t\t\t\treturn asdb_value($default);\n\t\t\t\t}\n\n\t\t\t\t$result = [];\n\n\t\t\t\tforeach ($target as $item) {\n\t\t\t\t\t$result[] = asdb_data_get($item, $key);\n\t\t\t\t}\n\n\t\t\t\treturn in_array('*', $key) ? Arr::collapse($result) : $result;\n\t\t\t}\n\n\t\t\tif (Arr::accessible($target) && Arr::exists($target, $segment)) {\n\t\t\t\t$target = $target[$segment];\n\t\t\t} elseif (is_object($target) && isset($target->{$segment})) {\n\t\t\t\t$target = $target->{$segment};\n\t\t\t} else {\n\t\t\t\treturn asdb_value($default);\n\t\t\t}\n\t\t}\n\n\t\treturn $target;\n\t}", "public function getContentSubs($content_id = 0, $toarray=false) {\n\t\t$criteria = $this->getContentsCriteria();\n\t\t$criteria->add(new icms_db_criteria_Item('content_pid', $content_id));\n\t\t$crit = new icms_db_criteria_Compo(new icms_db_criteria_Item('content_visibility', 2));\n\t\t$crit->add(new icms_db_criteria_Item('content_visibility', 3),'OR');\n\t\t$criteria->add($crit);\n\t\t$contents = $this->getObjects($criteria);\n\t\tif (!$toarray) return $contents;\n\t\t$ret = array();\n\t\tforeach(array_keys($contents) as $i) {\n\t\t\tif ($contents[$i]->accessGranted()){\n\t\t\t\t$ret[$i] = $contents[$i]->toArray();\n\t\t\t\t$ret[$i]['content_body'] = icms_core_DataFilter::icms_substr(icms_cleanTags($contents[$i]->getVar('content_body','n'),array()),0,300);\n\t\t\t\t$ret[$i]['content_url'] = $contents[$i]->getItemLink();\n\t\t\t}\n\t\t}\n\t\treturn $ret;\n\t}", "private function getAllContent() {\n $allContent = [];\n\n // Get all of the contents\n if($this->postData->getContents()) $allContent = array_merge($allContent, $this->postData->getContents());\n if($this->postData->getListContents()) $allContent = array_merge($allContent, $this->postData->getListContents());\n if($this->postData->getShortCodeData()) $allContent = array_merge($allContent, $this->postData->getShortCodeData());\n\n return $allContent;\n }", "public function data_get($target, $key, $default = null)\n {\n if (is_null($key)) {\n return $target;\n }\n\n $key = is_array($key) ? $key : explode('.', $key);\n\n while (! is_null($segment = array_shift($key))) {\n if ($segment === '*') {\n if ($target instanceof CollectionProxy) {\n $target = $target->all();\n } elseif (! is_array($target)) {\n return $this->value($default);\n }\n\n $result = Arr::pluck($target, $key);\n\n return in_array('*', $key) ? Arr::collapse($result) : $result;\n }\n\n if (Arr::accessible($target) && Arr::exists($target, $segment)) {\n $target = $target[$segment];\n } elseif (is_object($target) && isset($target->{$segment})) {\n $target = $target->{$segment};\n } else {\n return $this->value($default);\n }\n }\n\n return $target;\n }", "public function getContent($format = null);", "public function getSearchableContent()\n\t{\n\t\treturn [\n\t\t\t$this->Title,\n\t\t\t$this->Content\n\t\t];\n\t}", "public function getIndex();", "public function getIndex();", "public function getIndex();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();" ]
[ "0.55672264", "0.5444089", "0.52943254", "0.52768844", "0.5165288", "0.5115654", "0.508357", "0.506074", "0.506074", "0.504804", "0.5003804", "0.49891353", "0.49476627", "0.49091896", "0.49020645", "0.48923212", "0.48923212", "0.48923212", "0.48905784", "0.48905784", "0.48905784", "0.48905784", "0.48905784", "0.48905784", "0.48905784", "0.48905784", "0.48905784", "0.48905784", "0.48905784", "0.48905784" ]
0.7320773
0
Get fall point content 1. Get the data in an ordered noncontiguous index array. Such as: $data = ['20190501' => '20', '20190601' => '30', '20190615' => '50']; $value = ArrayHelper::getFallContent($data, '20190611', false); // $value = 30; 2. If there is no fall point, return null. 3. Ensure performance by sorting $data ahead of time: a. Sorting $data (ASC) b. Close $sortOut c. Use function ArrayHelper::getFallContent()
public static function getFallContent(Array $data, $referKey, $sortOut = 'default') { /*** Arguments prepare ***/ // Data sorting out $sortOut = $sortOut === 'default' ? self::getSortOut() : ! ! $sortOut; if ($sortOut) { ksort($data); } // Fall point content $opt = null; foreach ($data as $key => $value) { if ($key > $referKey) { break; } $opt = $value; } return $opt; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function habit_risk_banner_data($data, $key = 'healthian_price', $limit = 3) {\n\n $temp_data = $data;\n array_multisort(array_column($temp_data, $key), SORT_ASC, $temp_data);\n $temp_data = array_slice($temp_data,0,$limit);\n \n return $temp_data;\n }", "function getEvent($data_fighter){\n \n $date_lim = date (\"Y-m-d H:i:s\", mktime(date(\"H\"),date(\"i\"),date(\"s\"),date(\"m\"),date(\"d\")-1,date(\"Y\")));\n \n $data = $this->find('all', array('conditions' => array (\"date >\" => $date_lim))); \n \n $x = $data_fighter['Fighter']['coordinate_x'];\n $y = $data_fighter['Fighter']['coordinate_y'];\n \n \n $nb = 0;\n $tab = array();\n foreach($data as $key){\n \n $sight_x = $key['Event']['coordinate_x']-$x;\n if ($sight_x<0)\n $sight_x = $sight_x*(-1);\n $sight_y = $key['Event']['coordinate_y']-$y;\n if ($sight_y<0)\n $sight_y = $sight_y*(-1);\n $total = $sight_x+$sight_y;\n \n if ($total<=$data_fighter['Fighter']['skill_sight']){\n $tab[$nb]=$key;\n $nb++;\n }\n \n }\n \n return $tab;\n \n }", "function get_content_stories() {\r\n\t\tglobal $wpdb;\r\n\t\t\r\n\t\t$sql = \"SELECT story_id AS id, story_title AS title, story_content AS content, timeline_date AS date, featured FROM {$this->table_mf_timeline_stories}\";\r\n\t\t$results = $wpdb->get_results( $sql, 'ARRAY_A' );\r\n\t\t\r\n\t\tif( !empty( $results ) ) {\r\n\t\t\tforeach( $results as $story ) {\r\n\t\t\t\t$date_group = date( 'F Y', strtotime( $story['date'] ) );\r\n\t\t\t\t$story['source'] = 'timeline_stories';\r\n\t\t\t\t$stories[$date_group][] = $story;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn $stories;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "function getData()\n\t{\n\t\t// Lets load the content if it doesn't already exist\n\t\tif (empty($this->_data))\n\t\t{\n\t\t $config = EventBookingHelper::getConfig() ;\t\t \n\t\t $user = & JFactory::getUser();\n\t\t $nullDate = $this->_db->getNullDate() ;\n\t\t\t$query = $this->_buildQuery();\t\t\t\t\t\t\n\t\t\t$this->_db->setQuery($query);\t\t\t\t\t\t\n\t\t\t$rows = $this->_getList($query, $this->getState('limitstart'), $this->getState('limit'));\t\t\t\t\t\t\t\t\t\t\t\n\t\t\tif ($user->get('id')) {\n\t\t\t\t$userId = $user->get('id');\t\t\t\t\n\t\t\t\tfor ($i = 0 , $n = count($rows) ; $i < $n ; $i++) {\n\t\t\t\t\t$row = $rows[$i] ;\n\t\t\t\t\t$sql = 'SELECT COUNT(id) FROM #__eb_registrants WHERE user_id='.$userId.' AND event_id='.$row->id.' AND (published=1 OR (payment_method=\"os_offline\" AND published != 2))';\n\t\t\t\t\t$this->_db->setQuery($sql) ;\n\t\t\t\t\t$row->user_registered = $this->_db->loadResult() ;\t\t\t\t\t\n\t\t\t\t\t//Canculate discount price\t\t\t\t\t\n\t\t\t\t\tif ($config->show_discounted_price) {\n\t\t\t\t\t $discount = 0 ;\n\t\t\t\t\t if (($row->early_bird_discount_date != $nullDate) && ($row->date_diff >=0)) {\n \t\t if ($row->early_bird_discount_type == 1) { \t\t \t\t \n \t\t\t\t\t$discount += $row->individual_price*$row->early_bird_discount_amount/100 ;\t\t\t\t\t\t\n \t\t\t\t} else { \t\t\t\t \n \t\t\t\t\t$discount += $row->early_bird_discount_amount ;\n \t\t\t\t} \t\t\t\t\n\t\t\t\t\t }\n\t\t\t\t\t if ($row->discount > 0) {\t\t\t\t\t \n \t\t\t\tif ($row->discount_type == 1) { \t\t\t\t \n \t\t\t\t\t$discount += $row->individual_price*$row->discount/100 ;\t\t\t\t\t\t\n \t\t\t\t} else { \t\t\t\t \n \t\t\t\t\t$discount += $row->discount ;\n \t\t\t\t}\n \t\t\t} \t\t\t \t\t\t \n \t\t\t$row->discounted_price = $row->individual_price - $discount ; \t\t\t\n\t\t\t\t\t}\t\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 //Calculate discounted price\n\t\t\t if ($config->show_discounted_price) {\t\t\t \n \t\t\t for ($i = 0 , $n = count($rows) ; $i < $n ; $i++) {\n \t\t\t\t\t$row = $rows[$i] ; \t\t\t\t\t\t\t\t\t \t\t\t\t\t\n \t\t\t\t\tif ($config->show_discounted_price) {\n \t\t\t\t\t $discount = 0 ;\n \t\t\t\t\t if (($row->early_bird_discount_date != $nullDate) && ($row->date_diff >=0)) {\n \t\t if ($row->early_bird_discount_type == 1) { \t\t \t\t \n \t\t\t\t\t$discount += $row->individual_price*$row->early_bird_discount_amount/100 ;\t\t\t\t\t\t\n \t\t\t\t} else { \t\t\t\t \n \t\t\t\t\t$discount += $row->early_bird_discount_amount ;\n \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$row->discounted_price = $row->individual_price - $discount ; \t\t\t\n \t\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 \t\t\t \t\t\t \n\t\t\t }\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$this->_data = $rows ;\t\t\t\t\t\t\n\t\t}\n\t\t\n\t\treturn $this->_data;\n\t}", "public function getData()\n {\n if ($this->today == $this->first_day) {\n $data = $this->getAllData();\n }\n\n if (!empty($data)) {\n foreach ($data as $datum) {\n $this->handleData($datum);\n }\n }\n\n }", "function &getLocalizedData($key) {\n\t\t$localePrecedence = AppLocale::getLocalePrecedence();\n\t\tforeach ($localePrecedence as $locale) {\n\t\t\t$value =& $this->getData($key, $locale);\n\t\t\tif (!empty($value)) return $value;\n\t\t\tunset($value);\n\t\t}\n\n\t\t// Fallback: Get the first available piece of data.\n\t\t$data =& $this->getData($key, null);\n\t\tif (!empty($data)) {\n\t\t\t// WARNING: Collapsing the following into a single line causes PHP 5.0.5 to die.\n\t\t\t$locales = array_keys($data);\n\t\t\t$firstLocale = array_shift($locales);\n\t\t\treturn $data[$firstLocale];\n\t\t}\n\n\t\t// No data available; return null.\n\t\tunset($data);\n\t\t$data = null;\n\t\treturn $data;\n\t}", "private function _getPosData($sweres) {\n $swearr = explode(\"\\n\",$sweres);\n $points = array();\n $points['sun'] = $swearr[0]; //7\n $points['earth'] = fmod($swearr[0] + 180.0, 360.0); //5\n $points['moon'] = $swearr[1]; //4\n $points['lil'] = $swearr[2]; //2\n $points['nnode'] = $swearr[3]; //6\n $points['snode'] = fmod($swearr[3] + 180.0, 360.0); //8\n $points['asc'] = $swearr[4]; // 3\n $minuslil = $swearr[2] - 30.0;\n if ($minuslil < 0) {\n $minuslil += 360.0;\n }\n $points['prevlil'] = $minuslil; //1\n\n asort($points, SORT_NUMERIC);\n foreach (array_keys($points) as $key) {\n if ($key == 'asc') {\n break;\n } else {\n $points[$key] = array_shift($points);\n }\n }\n $order = array('prevlil' => 'I', 'lil' => 'II', 'asc' => 'III', 'moon' => 'IV', 'earth' => 'V',\n 'nnode' => 'VI', 'sun' => 'VII', 'snode' => 'VIII');\n $seq = array();\n foreach (array_keys($points) as $key) {\n $seq[] = $order[$key];\n }\n return $seq;\n }", "function oda_ordenanza_columns_content($column_name, $post_ID){\n\n if ( $_GET['post_type'] == 'ordenanza' ){\n\n if ( $column_name == 'ciudad'){\n $ciudad_ID = get_post_meta( $post_ID, ODA_PREFIX . 'ciudad_owner', true);\n $ciudad_color = get_post_meta( $ciudad_ID, ODA_PREFIX . 'ciudad_color', true);\n if ( empty( $ciudad_ID ) ){\n echo '<span class=\"label-status no-relation\">Sin ciudad</span>';\n }else{\n echo '<span class=\"label-status\" style=\"border-color:'. $ciudad_color .';\">' . get_the_title($ciudad_ID) . '</span>';\n }\n }\n\n if ( $column_name == 'tramite'){\n $nro_tramite = get_post_meta( $post_ID, ODA_PREFIX . 'resolucion_nro_tramite', true);\n if ($nro_tramite != '') {\n echo $nro_tramite;\n } else {\n _e('Sin número', 'oda');\n }\n }\n\n if ( $column_name == 'presentacion'){\n $fecha_presentacion = get_post_meta( $post_ID, ODA_PREFIX . 'resolucion_fecha', true);\n if ($fecha_presentacion != '') {\n echo $fecha_presentacion;\n } else {\n _e('Sin Fecha', 'oda');\n }\n }\n\n if ( $column_name == 'iniciativa'){\n $iniciativa_value = get_post_meta( $post_ID, ODA_PREFIX . 'ordenanza_iniciativa', true);\n\n $iniciativa_array = array(\n 'alcalde' => __( 'Alcalde', 'oda' ),\n 'concejal' => __( 'Concejal', 'oda' ),\n 'comisiones' => __( 'Comisiones', 'oda' ),\n 'ciudadania' => __( 'Ciudadanía', 'oda' ),\n );\n\n $ciudad_color = get_post_meta( $ciudad_ID, ODA_PREFIX . 'ciudad_color', true);\n if ( empty( $iniciativa_value ) ){\n echo '<span class=\"label-status no-relation\">Sin Iniciativa</span>';\n }else{\n echo '<span class=\"label-status\" style=\"border-color:'. $ciudad_color .';\">' . $iniciativa_array[$iniciativa_value] . '</span>';\n }\n }\n }\n\n}", "public function get_debit_data($i, $object, $highestRow, $worksheet) {\n $tax_debit_value = array();\n $data_arr4 = array();\n for ($j = $i; $j <= $highestRow; $j++) {\n if ($object->getActiveSheet()->getCell('B' . $j)->getValue() == \"Total\") {\n $highestColumn_dr = $worksheet->getHighestColumn($j);\n for ($k = 0; $k < 4; $k++) {\n $a11 = strlen($highestColumn_dr);\n $index1 = strlen($highestColumn_dr) - 1;\n $ord1 = ord($highestColumn_dr[$index1]);\n $a1 = substr($highestColumn_dr, 0, 1);\n $a2 = substr($highestColumn_dr, 1);\n if ($a1 != $a2 and $a2 == \"A\") {\n $ord = ord($highestColumn_dr[1]);\n $index = 1;\n $o1 = ord($a1);\n $o2 = chr($o1 - 1);\n $highestColumn_row_pp = $o2 . \"Z\";\n } else {\n $highestColumn_row_pp = $this->getAlpha($highestColumn_dr, $ord1, $a11, $index1);\n }\n $highestColumn_dr = $highestColumn_row_pp;\n }\n\n $highest_value_without_DR = $highestColumn_dr; //hightest cloumn till where we have to find our data\n $char = 'G';\n while ($char !== $highest_value_without_DR) {\n $values_DR[] = $object->getActiveSheet()->getCell($char . $j)->getValue();\n $char++;\n }\n $cnt = count($values_DR);\n\n//get the value for tax debit value\n\n $data_debit_value_tax = array();\n\n for ($a_dr = 0; $a_dr < $cnt; $a_dr++) {\n $Dr_values = $values_DR[$a_dr];\n $data_debit_value_tax[] = $values_DR[$a_dr];\n }\n\n $aa2 = array();\n for ($a_dr = 1; $a_dr < sizeof($values_DR); $a_dr++) {\n\n if ($a_dr % 5 != 0) {\n\n $aa2[] = $values_DR[$a_dr];\n }\n// var_dump($aa2);\n }\n $a1 = sizeof($aa2);\n $a2 = $a1 % 4;\n $a3 = $a1 - $a2;\n\n for ($k = 0; $k < $a3; $k = $k + 4) {\n $tax_debit_value[] = $aa2[$k] + $aa2[$k + 1] + $aa2[$k + 2] + $aa2[$k + 3];\n }\n\n for ($a_dr = 0; $a_dr < $cnt; $a_dr++) {\n// $Dr_values = $values_DR[$a_dr];\n $data_arr4[] = $values_DR[$a_dr];\n $a_dr = ($a_dr * 1 + 4);\n }\n }\n }\n\n return array($data_arr4, $tax_debit_value);\n }", "public function preProcessIndex($data): ?string\n {\n if ($data === null) {\n return null;\n }\n\n $fmt = App::make(NumberFormatter::class, ['iso' => $this->getIso()]);\n return $fmt->formatCurrency($data, $this->getIso());\n }", "public function applyData($data): ?array;", "public function getDataTypeContent()\n {\n // Next Get or Paginate the actual content from the MODEL that corresponds to the slug DataType\n if (strlen($this->dataType->model_name) != 0) {\n $this->model = app($this->dataType->model_name);\n\n if ($this->dataType->scope && $this->dataType->scope != '' && method_exists($this->model, 'scope'.ucfirst($this->dataType->scope))) {\n $query = $this->model->{$this->dataType->scope}();\n } else {\n $query = $this->model::select('*');\n }\n\n // Use withTrashed() if model uses SoftDeletes and if toggle is selected\n // @todo retirar comentario e so funcionar com usuario ativado \n // if ($this->model && in_array(SoftDeletes::class, class_uses($this->model)) && Auth::user()->can('delete', app($this->dataType->model_name))) {\n $usesSoftDeletes = true;\n\n if ($this->request->get('showSoftDeleted')) {\n $showSoftDeleted = true;\n $query = $query->withTrashed();\n }\n // }\n\n // If a column has a relationship associated with it, we do not want to show that field\n $this->removeRelationshipField($this->dataType, 'browse');\n\n if ($this->search->value != '' && $this->search->key && $this->search->filter) {\n $this->search_filter = ($this->search->filter == 'equals') ? '=' : 'LIKE';\n $this->search_value = ($this->search->filter == 'equals') ? $this->search->value : '%'.$this->search->value.'%';\n $query->where($this->search->key, $this->search_filter, $this->search_value);\n }\n\n if ($this->orderBy && in_array($this->orderBy, $this->dataType->fields())) {\n $querySortOrder = (!empty($sortOrder)) ? $sortOrder : 'desc';\n $this->dataTypeContent = call_user_func(\n [\n $query->orderBy($this->orderBy, $querySortOrder),\n $this->getter,\n ]\n );\n } elseif ($this->model->timestamps) {\n $this->dataTypeContent = call_user_func([$query->latest($this->model::CREATED_AT), $this->getter]);\n } else {\n $this->dataTypeContent = call_user_func([$query->orderBy($this->model->getKeyName(), 'DESC'), $this->getter]);\n }\n\n // Replace relationships' keys for labels and create READ links if a slug is provided.\n return $this->resolveRelations($this->dataTypeContent, $this->dataType);\n }\n\n $this->setModel(false);\n // If Model doesn't exist, get data from table name\n return call_user_func([DB::table($this->dataType->name), $this->getter]);\n }", "function data()\n {\n $arr = json_decode($this->jsonText, true);\n $ritit = new RecursiveIteratorIterator(new RecursiveArrayIterator($arr), RecursiveIteratorIterator::SELF_FIRST);\n $r = [];\n foreach ($ritit as $k => $v) {\n if (isset($v['points'])) {\n extract($v);\n $r[] = [\n 'id' => $id\n , 'title' => $title\n , 'account_wide' => $accountWide\n , 'faction_id' => $factionId\n ];\n }\n }\n\n return $r;\n }", "public function formatData() {\n $raw_data = $this->getRawData();\n $formatted_data = array();\n // Format the data based on tracking method.\n switch ($this->getTrackingMethod()) {\n case 'rest':\n // Replace marketo_id with value of MARKETO_REST_LEAD_FIELD_REST_KEY.\n foreach ($raw_data as $id => $value) {\n // Get the row corresponding to the marketo id.\n $result = db_select(MARKETO_REST_SCHEMA_LEAD_FIELDS)\n ->fields(MARKETO_REST_SCHEMA_LEAD_FIELDS)\n ->condition(MARKETO_REST_LEAD_FIELD_ID, $id)\n ->execute()\n ->fetchAll();\n // Cycle through the result row(s) and set the new rest field key.\n foreach ($result as $field) {\n if (isset($field->{MARKETO_REST_LEAD_FIELD_REST_KEY})) {\n $formatted_data[$field->{MARKETO_REST_LEAD_FIELD_REST_KEY}] = $value;\n }\n }\n }\n break;\n case 'munchkin':\n default:\n // Replace marketo_id with value of MARKETO_REST_LEAD_FIELD_MUNCHKIN_KEY.\n foreach ($raw_data as $id => $value) {\n // Get the row corresponding to the marketo id.\n $result = db_select(MARKETO_REST_SCHEMA_LEAD_FIELDS)\n ->fields(MARKETO_REST_SCHEMA_LEAD_FIELDS)\n ->condition(MARKETO_REST_LEAD_FIELD_ID, $id)\n ->execute()\n ->fetchAll();\n // Cycle through the result row(s) and set the new munchkin field key.\n foreach ($result as $field) {\n if (isset($field->{MARKETO_REST_LEAD_FIELD_MUNCHKIN_KEY})) {\n $formatted_data[$field->{MARKETO_REST_LEAD_FIELD_MUNCHKIN_KEY}] = $value;\n }\n }\n }\n break;\n }\n return $formatted_data;\n }", "public function getNonNull($content) {\n\t\tif (!is_array(current($content))) {\n\t\t\tthrow new Exception('Please use a multi-dimensional array'.\n\t\t\t\t'from '.$this->className.'->'.__FUNCTION__.'() line '.\n\t\t\t\t__LINE__\n\t\t\t);\n\t\t} else {\n\t\t\ttry {\t\t\t\n\t\t\t\t// loop through each array\n\t\t\t\t$count = count($content);\n\t\t\t\t\n\t\t\t\tfor ($i = 0; $i < $count; $i++) {\n\t\t\t\t\t$lastkey = array_pop(array_keys($content[$i]));\n\n\t\t\t\t\tforeach ($content[$i] as $subKey => $subValue) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (is_null($subValue)) {\n\t\t\t\t\t\t\tcontinue 2; // go to next array\n\t\t\t\t\t\t} \n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($subKey == $lastkey) {\n\t\t\t\t\t\t\treturn $content[$i];\n\t\t\t\t\t\t}\n\t\t\t\t\t} //<-- end foreach -->\n\t\t\t\t\t\n\t\t\t\t\treturn $content[0];\n\t\t\t\t} //<-- end foreach -->\n\t\t\t\t \n\t\t\t} catch (Exception $e) { \n\t\t\t\tthrow new Exception($e->getMessage().' from '.$this->className\n\t\t\t\t\t.'->'.__FUNCTION__.'() line '.__LINE__\n\t\t\t\t);\n\t\t\t} //<-- end try -->\n\t\t} //<-- end if -->\n\t}", "public function getFormattedData();", "public function provideData()\n {\n if ($this->computedData !== false) {\n return $this->computedData;\n }\n\n $data = array();\n\n foreach ($this->dataProvider->provideData() as $post) {\n $date = \\DateTime::createFromFormat('U', 0);\n if ($post->date() !== \"\") {\n $date = \\DateTime::createFromFormat('U', $post->date());\n }\n\n $year = $date->format('Y');\n $month = $date->format('m');\n $keyDate = \\DateTime::createFromFormat('Y-m',$year.'-'.$month);\n\n if (!isset($data[$year])) {\n $data[$year] = array(\n 'posts' => array(),\n 'months' => array(),\n 'date' => $keyDate\n );\n }\n\n if (!isset($data[$year]['months'])) {\n $data[$year]['months'] = array('posts' => array(), 'date' => $keyDate);\n }\n\n $data[$year]['posts'][] = $post;\n $data[$year]['months'][$month]['posts'][] = $post;\n }\n\n $this->computedData = $data;\n\n return $data;\n }", "function _resolveData($value, $colname){\n // resolve pre and postfixes\n $column = $this->_column($colname);\n $value = $this->_addPrePostFixes($column['type'], $value);\n\n // for pages, resolve title\n $type = $column['type'];\n if(is_array($type)) $type = $type['type'];\n if($type == 'title' || ($type == 'page' && useHeading('content'))){\n $value = p_get_first_heading($value);\n }\n return $value;\n }", "public function get_data();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();" ]
[ "0.47837684", "0.46918723", "0.46049055", "0.45817983", "0.45672053", "0.45473844", "0.4514903", "0.4512982", "0.45057955", "0.44910568", "0.44807276", "0.44619802", "0.44608885", "0.44560912", "0.4444486", "0.44078937", "0.43826428", "0.43641728", "0.43401757", "0.43365127", "0.43365127", "0.43365127", "0.43365127", "0.43365127", "0.43365127", "0.43365127", "0.43365127", "0.43365127", "0.43365127", "0.43365127" ]
0.57255435
0
Array Deff Recursive Compare $srcArray with $contrast and display it if something on $srcArray is not on $contrast.
public static function diffRecursive(Array $srcArray, $contrast) { $diffArray = []; foreach ($srcArray as $key => $value) { if (is_array($contrast) && array_key_exists($key, $contrast)) { if (is_array($value)) { $aRecursiveDiff = self::diffRecursive($value, $contrast[$key]); if (! empty($aRecursiveDiff)) { $diffArray[$key] = $aRecursiveDiff; } } elseif ($value != $contrast[$key]) { $diffArray[$key] = $value; } } else { $diffArray[$key] = $value; } } return $diffArray; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function __remarkFlow($array1, $array2){\r\n return array_diff($array1, $array2);\r\n }", "function multi_array_diff($array1, $array2)\n{\n\t$diff = array();\n\t\n\t#Do a foreach only if there are more than one levels of array below the current value (first value in array)\n\tif(contains_an_array($array1))#is_array(current($array1))\n\t{\n\t\t\n\t\tforeach($array1 AS $key_1=>$array1_1)\n\t\t{\n\t\t\tif(contains_an_array($array1_1))#is_array(current($array1_1))\n\t\t\t{\n\t\t\t\t#3 DIMENSIONAL ARRAYS \n\t\t\t\tforeach($array1_1 AS $key_1_2=>$array1_1_2)\n\t\t\t\t{\n\t\t\t\t\t#echo \"<br>KEY: \".$key_1_2.\" --- \"; print_r($array1_1_2);\n\t\t\t\t\tif(array_key_exists($key_1, $array2) && array_key_exists($key_1_2, $array2[$key_1])){\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(is_array($array1_1_2) && is_array($array2[$key_1][$key_1_2])){\n\t\t\t\t\t\t\tif(count(array_diff_assoc($array1_1_2, $array2[$key_1][$key_1_2])) != 0){\n\t\t\t\t\t\t\t\t$diff[$key_1][$key_1_2] = array_diff_assoc($array1_1_2, $array2[$key_1][$key_1_2]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(strcasecmp($array1_1_2, $array2[$key_1][$key_1_2]) != 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$diff[$key_1][$key_1_2] = $array1_1_2;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$diff[$key_1][$key_1_2] = $array1_1_2;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t#2 DIMENSIONAL ARRAYS\n\t\t\telse\n\t\t\t{\n\t\t\t\t#echo \"<br>KEY: \".$key_1.\" --- \"; print_r($array1_1);\n\t\t\t\tif(array_key_exists($key_1, $array2)){\n\t\t\t\t\t\n\t\t\t\t\tif(is_array($array1_1) && is_array($array2[$key_1])){\n\t\t\t\t\t\tif(count(array_diff($array1_1, $array2[$key_1])) != 0){\n\t\t\t\t\t\t\t$diff[$key_1] = array_diff($array1_1, $array2[$key_1]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if(strcasecmp($array1_1, $array2[$key_1]) != 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$diff[$key_1] = $array1_1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$diff[$key_1] = $array1_1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t#1 DIMENSIONAL ARRAYS\n\telse\n\t{\n\t\t$diff = array_diff($array1, $array2);\n\t}\n\t#echo \"<br><br><br><br>\";\n\t\n\treturn $diff;\n}", "abstract public function diffWith(array $array);", "public function test_attribute_copy_array()\n {\n $src = [\n \"1\" => \"shallow\",\n \"2\" => \"shallow\",\n \"3\" => [\n \"1\" => \"notshallow\",\n \"2\" => \"notshallow\",\n ],\n \"4\" => \"shallow\",\n \"5\" => [],\n ];\n $dist = shallow_copy_array($src);\n $expect = [\n \"1\" => \"shallow\",\n \"2\" => \"shallow\",\n \"4\" => \"shallow\"\n ];\n $this->assertTrue($this->arrays_are_similar($dist, $expect));\n }", "public function inferContrastFromPhrase($phrase)\n {\n $haystack = strtoupper($phrase);\n\n //Look for indication of both\n $both_contrast = FALSE; //Assume not both\n $both_contrast_ind[] = 'W&WO CONT';\n $both_contrast_ind[] = 'W&W/O CONT';\n $both_contrast_ind[] = 'WITH AND WITHOUT CONT';\n $both_contrast_ind[] = 'WITHOUT AND WITH CONT';\n $both_contrast_ind[] = 'WITH & WITHOUT CONT';\n $both_contrast_ind[] = 'WITHOUT & WITH CONT';\n foreach($both_contrast_ind as $needle)\n {\n $p = strpos($haystack, $needle);\n if($p !== FALSE)\n {\n $both_contrast = TRUE;\n break;\n }\n }\n if(!$both_contrast)\n {\n //Look for the NO indicators\n $no_contrast = NULL;\n $no_contrast_ind = array();\n $no_contrast_ind[] = 'WO CONT';\n $no_contrast_ind[] = 'W/O CONT';\n $no_contrast_ind[] = 'WN CONT';\n $no_contrast_ind[] = 'W/N CONT';\n $no_contrast_ind[] = 'NO CONT';\n $no_contrast_ind[] = 'WITHOUT CONT';\n $no_contrast_ind[] = 'NON-CONT';\n foreach($no_contrast_ind as $needle)\n {\n $p = strpos($haystack, $needle);\n if($p !== FALSE)\n {\n $no_contrast = TRUE;\n break;\n }\n }\n\n //Look for the YES indicators\n $yes_contrast = NULL;\n $yes_contrast_ind = array();\n $yes_contrast_ind[] = 'W CONT';\n $yes_contrast_ind[] = 'WITH CONT';\n $yes_contrast_ind[] = 'W/IV CONT';\n $yes_contrast_ind[] = 'INCLUDE CONT';\n $yes_contrast_ind[] = 'INC CONT';\n foreach($yes_contrast_ind as $needle)\n {\n $p = strpos($haystack, $needle);\n if($p !== FALSE)\n {\n $yes_contrast = TRUE;\n break;\n }\n }\n\n //Return our analysis result.\n if($no_contrast === TRUE && $yes_contrast === NULL)\n {\n return FALSE;\n }\n if($no_contrast === NULL && $yes_contrast === TRUE)\n {\n return TRUE;\n }\n }\n \n //No clues or confusing indications.\n return NULL;\n }", "function atkArrayDiff($array1, $array2)\n{\n\tforeach($array1 as $key => $value)\n\t{\n\t\tif(is_array($value))\n\t\t{\n\t\t\tif(!is_array($array2[$key]))\n\t\t\t{\n\t\t\t\t$difference[$key] = $value;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$new_diff = atkArrayDiff($value, $array2[$key]);\n\t\t\t\tif($new_diff != FALSE)\n\t\t\t\t{\n\t\t\t\t\t$difference[$key] = $new_diff;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telseif(!isset($array2[$key]) || $array2[$key] != $value)\n\t\t{\n\t\t\t$difference[$key] = $value;\n\t\t}\n\t}\n\n\treturn !isset($difference) ? false : $difference;\n}", "public function contrast($factor)\n {\n if (imagefilter($this->sourceImage, IMG_FILTER_CONTRAST, $factor))\n $this->objet->setSource($this->sourceImage);\n }", "public function myRevert(array $array);", "static function DisplayArray($array)\r\n {\r\n $depth = 0;\r\n if (is_array($array))\r\n {\r\n echo \"Array (<br />\";\r\n for($i = 0; $i < count($array); $i ++)\r\n {\r\n if (is_array($array[$i]))\r\n {\r\n DisplayInlineArray($array[$i], $depth + 1, $i);\r\n }\r\n else\r\n {\r\n echo \"[\" . $i . \"] => \" . $array[$i];\r\n echo \"<br />\";\r\n $depth = 0;\r\n }\r\n }\r\n echo \")<br />\";\r\n }\r\n else\r\n {\r\n echo \"Variabele is geen array\";\r\n }\r\n }", "public static function raiseAll($inputArray){\n\t\t//Syllables come to us courtesy of the chart at http://bit.ly/2hc2MlQ\n\t\t//Function takes in an array of syllables. Function returns a modified array.\n\t\t$outputArray = $inputArray;\n\t\tforeach($outputArray as $key=>$value){\n\t\t\tswitch($value){\n\t\t\t\tcase 'ra':\n\t\t\t\t\t$outputArray[$key] = 'di';\tbreak;\n\t\t\t\tcase 'me':\n\t\t\t\t\t$outputArray[$key] = 'ri'; break;\n\t\t\t\tcase 'se':\n\t\t\t\t\t$outputArray[$key] = 'fi'; break;\n\t\t\t\tcase 'le':\n\t\t\t\t\t$outputArray[$key] = 'si'; break;\n\t\t\t\tcase 'te':\n\t\t\t\t\t$outputArray[$key] = 'li'; break;\n\t\t\t}\t\n\t\t}\n\t\treturn($outputArray);\t\n\t}", "function de($arr, $backtrace_depth=1) {\n if (!DEV_MODE) {return; }\n\n $msg = array();\n $msg[] = \"<div class='debug'><code><pre>\";\n $msg[] = get_caller($backtrace_depth);\n $msg[] = '<br/>';\n $var_name = get_var_name($arr);\n $msg[] = ($var_name !== false) ? $var_name.' ' : '';\n $msg[] = var_export($arr, true);\n //$msg[] = nl2br(var_export($arr, true));\n $msg[] = \"</pre></code></div>\";\n echo join('', $msg);\n }", "function DisplayArray($array) {\n foreach ($array as $value) {\n if (is_array($value)) {\n DisplayArray($value);\n } else {\n echo $value . \"<br>\";\n }\n }\n }", "function compare_settings_arrays( $settings_array, $array2 ){\n $new = array();\n $this->settings_array_changes = 0;\n\n //do a count comparsion to check for removed values\n if( count($settings_array) != count($array2) ){\n ++$this->settings_array_changes;//count mismatch - something changed\n }\n\n //compare each setting against array2 and look for matches\n reset($settings_array);\n foreach( $settings_array as $array_key => $array_setting ){\n\n if( is_array($array2) === true ){\n reset($array2);\n foreach( $array2 as $array2_key => $array2_inside ){\n if( $array2_inside[1] != $array_setting[1] ){\n ++$this->settings_array_changes;\n }\n $new[] = $array2_inside[1];\n unset($array2[$array2_key]); //remove as it has been processed\n unset($settings_array[$array_key]); //remove as it has been processed\n break;\n }\n }else{\n //no values posted so this value should be deleted, unset settings\n unset($settings_array[$array_key]); //remove as it has been processed\n }\n }\n\n //now check for leftovers in array2, these are new settings so just store them\n if( is_array($array2) === true ){\n reset($array2);\n foreach( $array2 as $array2_key => $array2_inside ){\n ++$this->settings_array_changes;\n $new[] = $array2_inside[1];\n unset($array2[$array2_key]); //remove as it has been processed\n\n }\n }\n\n return $new;\n }", "function arrayRecursiveDiff($a1, $a2) {\n $result = array();\n\n foreach($a1 as $va1) {\n $found = false;\n foreach($a2 as $va2) {\n try{\n //echo \"va1: \".$va1.\" va2: \".$va2.\"<br>\";\n // if its a single value we need to convert to a singleton array \n if (!is_array($va1)){\n $va1 = compact($va1);\n }\n if (!is_array($va2)){\n $va2 = compact($va2);\n } \n\n $x = array_diff($va1, $va2);\n if (empty($x)) {\n $found = true;\n } \n }\n catch (Exception $e){\n echo \"va1: \".$va1.\" va2: \".$va2.\", Exception Line 45: \".$e->getMessage();\n }\n }\n if (!$found) { \n $result[] = $va1;\n }\n }\n\n foreach($a2 as $va2) {\n $found = false;\n foreach($a1 as $va1) {\n try{\n //echo \"va1: \".$va1.\" va2: \".$va2.\"<br>\";\n // if its a single value we need to convert to a singleton array \n if (!is_array($va1)){\n $va1 = compact($va1);\n }\n if (!is_array($va2)){\n $va2 = compact($va2);\n } \n\n $x = array_diff($va2, $va1);\n if (empty($x)) {\n $found = true;\n } \n }\n catch (Exception $e){\n echo \"va1: \".$va1.\" va2: \".$va2.\", Exception Line 63: \".$e->getMessage();\n }\n }\n if (!$found) { \n $result[] = $va2;\n }\n }\n \n return $result;\n }", "public static function getPermutations($inputArray){\n\t\t//Function adds all possible sharp/flat combinations and returns a nested array of the permutations.\n\t\t$outputArray = Array($inputArray);\t\n\t\t$syllablesToLower = Array('di','ri','fi','si','li');\n\t\tforeach($inputArray as $position=>$value){\n\t\t\tif(in_array($value,$syllablesToLower)){\n\t\t\t\tforeach(Adams::branch($outputArray,$position) as $lowered){\n\t\t\t\t\t$outputArray[] = $lowered;\t\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\treturn($outputArray);\n\t}", "protected function checkArrayEntries($array, ...$entries) {\n $missing = '';\n foreach ($entries as $e) {\n if (!isset($array[$e]))\n $missing .= $e . ', ';\n }\n if ($missing != '')\n return rtrim($missing, ', ');\n }", "function printArray($tempArray)\n{\n\tfor ($i = 0; $i < count($tempArray); $i++)\n\t{\n\t\tfor ($j = 0; $j < count($tempArray[$i]); $j++)\n\t\t{\n\t\t\tif ($tempArray[$i][$j] == $tempArray[$i][\"0\"])\n\t\t\t{\n\t\t\t\techo \"<h2>\" . \"----=\" . $tempArray[$i][$j] . \"=----<br>\" . \"</h2>\" ;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo $j . \". \" . $tempArray[$i][$j]. \"<br>\";\n\t\t\t}\n\t\t}\n\t\techo \"<br>\";\n\t}\n}", "public function test_attribute_copy_array_of_array()\n {\n $src = [\n [\n \"1\" => \"shallow\",\n \"2\" => \"shallow\",\n \"3\" => [\n \"1\" => \"notshallow\",\n \"2\" => \"notshallow\",\n ],\n \"4\" => \"shallow\",\n \"5\" => [],\n ],\n [\n \"1\" => \"shallow\",\n \"2\" => \"shallow\",\n \"3\" => [\n \"1\" => \"notshallow\",\n \"2\" => \"notshallow\",\n ],\n \"4\" => \"shallow\",\n \"5\" => [],\n ],\n ];\n $dist = shallow_copy_array_of_array($src);\n $expect = [\n [\n \"1\" => \"shallow\",\n \"2\" => \"shallow\",\n \"4\" => \"shallow\",\n ],\n [\n \"1\" => \"shallow\",\n \"2\" => \"shallow\",\n \"4\" => \"shallow\",\n ],\n ];\n $this->assertTrue($this->arrays_are_similar($dist, $expect));\n }", "function consolidateRelatedURIs($persArray){\n\t\t \n\t\t if(is_array($persArray)){\n\t\t\t\t$newPersArray = array();\n\t\t\t\t$doneURIs = array();\n\t\t\t\tforeach($persArray as $uriKey => $person){\n\t\t\t\t\t $doneRelURIs = array();\n\t\t\t\t\t $uriEx = explode(\"/\",$uriKey);\n\t\t\t\t\t $personUUID = $uriEx[count($uriEx) -1];\n\t\t\t\t\t $actName = $person[\"name\"];\n\t\t\t\t\t $actCount = $person[\"count\"];\n\t\t\t\t\t $linkedPersonURIs = $this->getLinkedPerson($personUUID);\n\t\t\t\t\t \n\t\t\t\t\t if(isset($person[\"rel\"]) || is_array($linkedPersonURIs)){\n\t\t\t\t\t\t \n\t\t\t\t\t\t if(!isset($person[\"rel\"]) && is_array($linkedPersonURIs)){\n\t\t\t\t\t\t\t\t$person[\"rel\"] = $linkedPersonURIs;\n\t\t\t\t\t\t }\n\t\t\t\t\t\t \n\t\t\t\t\t\t if(is_array($person[\"rel\"])){\n\t\t\t\t\t\t\t\t$maxCount = $actCount;\n\t\t\t\t\t\t\t\tforeach($person[\"rel\"] as $relURI){\n\t\t\t\t\t\t\t\t\t if(array_key_exists($relURI, $persArray) && !in_array($relURI, $doneURIs)){\n\t\t\t\t\t\t\t\t\t\t $relCount = $persArray[$relURI][\"count\"];\n\t\t\t\t\t\t\t\t\t\t if($relCount > $maxCount){\n\t\t\t\t\t\t\t\t\t\t\t\t$doneURIs[] = $uriKey;\n\t\t\t\t\t\t\t\t\t\t\t\t$uriKey = $relURI;\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t $actCount = $actCount + $relCount;\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t $doneRelURIs[] = $relURI;\n\t\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\t \n\t\t\t\t\t if(!in_array($uriKey, $doneURIs)){\n\t\t\t\t\t\t $doneURIs[] = $uriKey;\n\t\t\t\t\t\t $newPersArray[$uriKey] = array(\"name\" => $actName, \"count\" => $actCount);\n\t\t\t\t\t }\n\t\t\t\t\t \n\t\t\t\t\t foreach($doneRelURIs as $doneRel){\n\t\t\t\t\t\t if(!in_array($doneRel, $doneURIs)){\n\t\t\t\t\t\t\t\t$doneURIs[] = $doneRel;\n\t\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t}\n\t\t }\n\t\t else{\n\t\t\t\t$newPersArray = $persArray;\n\t\t }\n\t\t \n\t\t \n\t\t return $newPersArray;\n\t\t //return $persArray;\n\t }", "static function printr($array)\n {\n echo '<pre>' . print_r($array, true) . '</pre>';\n }", "public function array_sanitize($array){\n\n\t\t\treturn htmlentities(mysql_real_escape_string($array));\n\n\t\t}", "function nonBlacklistedDistunguishednameArray($array,$refused=\"\"){\n $cleanArray = array();\n foreach ($array as $dn) {\n if(blacklistedDistinguishedname($dn,$refused)==FALSE){\n array_push($cleanArray,$dn);\n }\n }\n return $cleanArray;\n}", "public static function compareAnswerColorsIndexedByAnswerIdArraysToExistingAnswers($arrAnswerColors, $arrPossibleAnswers)\n {\n return (count( $arrAnswerColors) == count( $arrPossibleAnswers ) && !array_diff( array_keys($arrAnswerColors), array_keys($arrPossibleAnswers)));\n }", "public function advpngProvider() {\n $cases = [];\n\n $cases[] = [[], ['--quiet', '--recompress', '-3']];\n $cases[] = [['recompress' => FALSE], ['--quiet', '-3']];\n $cases[] = [['recompress' => FALSE, 'mode' => 1], ['--quiet', '-1']];\n $cases[] = [['mode' => 0], ['--quiet', '--recompress', '-0']];\n $cases[] = [['mode' => 4], ['--quiet', '--recompress', '-4']];\n\n return $cases;\n }", "public function difference(array $array, $options = []) {\n\t\tif ($options instanceof Closure) {\n\t\t\t$options = array('callback' => $options);\n\n\t\t} else if (is_bool($options)) {\n\t\t\t$options = array('strict' => $options);\n\t\t}\n\n\t\t$options = (array) $options + array(\n\t\t\t'strict' => true,\n\t\t\t'callback' => null,\n\t\t\t'valueCallback' => null,\n\t\t\t'on' => 'values'\n\t\t);\n\n\t\t$callback = $options['callback'];\n\t\t$valueCallback = $options['valueCallback'];\n\n\t\t// Prepare array\n\t\t$value = Hash::filter($this->_value, false, function($val) {\n\t\t\treturn !is_array($val);\n\t\t});\n\n\t\t// Values\n\t\tif ($options['on'] === 'values') {\n\n\t\t\t// Compare with callback\n\t\t\tif ($valueCallback instanceof Closure) {\n\t\t\t\tif ($callback instanceof Closure) {\n\t\t\t\t\treturn array_udiff_uassoc($value, $array, $valueCallback, $callback);\n\n\t\t\t\t} else if ($options['strict']) {\n\t\t\t\t\treturn array_udiff_assoc($value, $array, $valueCallback);\n\n\t\t\t\t} else {\n\t\t\t\t\treturn array_udiff($value, $array, $valueCallback);\n\t\t\t\t}\n\n\t\t\t// Compare regular\n\t\t\t} else {\n\t\t\t\tif ($options['strict']) {\n\t\t\t\t\tif ($callback instanceof Closure) {\n\t\t\t\t\t\treturn array_diff_uassoc($value, $array, $callback);\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn array_diff_assoc($value, $array);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\treturn array_diff($value, $array);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Keys\n\t\t} else {\n\t\t\tif ($callback instanceof Closure) {\n\t\t\t\treturn array_diff_ukey($value, $array, $callback);\n\n\t\t\t} else {\n\t\t\t\treturn array_diff_key($value, $array);\n\t\t\t}\n\t\t}\n\t}", "function htmldump ( $array ) {\r\n\t\tforeach($array as $key => $val) {\r\n\t\t\t$return .= $this->ul(\r\n\t\t\t\t\t\t$this->li($this->font($key)) .\r\n\t\t\t\t\t\t\t$this->ul(\r\n\t\t\t\t\t\t\t\t$this->font(is_array($val) ? $this->htmldump($val) : $this->li($val))\r\n\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t);\r\n\t\t}\r\n\t\t\r\n\t\treturn $return;\r\n\t}", "function dump_array($array)\n{\n\n\t$_str = \"<table bgcolor = '%s'>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t%s\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table><br>\";\n\n\tif(is_array($array)){\n\n\t\t$size = count($array);\n\t\t$string = \"\";\n\n\t\tif($size) {\n\n\t\t\t$string .= \"{ <br>\";\n\n\t\t\tforeach($array as $a => $b) {\n\n\t\t\t\tif(is_array($b)) { $b = dump_array($b); }\n\t\t\t\tif(is_object($b)) { $b = dump_array(object_to_array($b)); }\n\t\t\t\t$string .= \"&nbsp;&nbsp;&nbsp;&nbsp;<b>$a = '$b'</b><br>\";\n\n \t\t}\n\n\t\t\t$string .= \" }<br>\";\n\t\t}\n\n\t\t$r = sprintf($_str, '#DACE0B', $string);\n\n\t\treturn $r;\n\n } else { return $array; }\n}", "public static function branch($inputArray,$position){\n\t\t//It returns an array of variations that have the specified position toggled (lowered).\n\t\t$outputArray = Array();\n\t\tforeach($inputArray as $subArray){\n\t\t\t$subArrayLowered = Adams::lowerSingle($subArray,$position);\n\t\t\t$outputArray[] = $subArrayLowered;\n\t\t}\t\n\t\treturn($outputArray);\n\t}", "function ary_diff( $ary_1, $ary_2 ) {\n // get differences that in ary_1 but not in ary_2\n // get difference that in ary_2 but not in ary_1\n // return the unique difference between value of 2 array\n $diff = array();\n\n // get differences that in ary_1 but not in ary_2\n foreach ( $ary_1 as $v1 ) {\n $flag = 0;\n foreach ( $ary_2 as $v2 ) {\n $flag |= ( $v1 == $v2 );\n if ( $flag ) break;\n }\n if ( !$flag ) array_push( $diff, $v1 );\n }\n\n return $diff;\n }", "function isWinner($values, $answer, $num)\n{\n $newArr = [];\n $ans = [];\n // clear js array from html tags and conver to low \n foreach ($values as $val) {\n $newArr[] = strtolower(strip_tags($val));\n }\n unset($val);\n\n // Convert stored array to the simple view\n for ($i = 0; $i < 16; $i++) {\n for ($j = 0; $j < 4; $j++) {\n for ($k = 0; $k < 4; $k++) {\n if (is_array($answer[$i][$j][$k])) {\n $ans[] = $answer[$i][$j][$k][0];\n } else {\n $ans[] = $answer[$i][$j][$k];\n }\n }\n }\n }\n // Compare two arrays\n for ($i = 0; $i < count($newArr); $i++) {\n if ($newArr[$i] != $ans[$i]) {\n if ($ans[$i] != $num) return 0; \n }\n }\n return 1;\n}" ]
[ "0.47898644", "0.46050486", "0.4549538", "0.44723508", "0.4381586", "0.4353555", "0.4328056", "0.43077257", "0.43019485", "0.42559448", "0.4249547", "0.4248624", "0.4238721", "0.42297322", "0.4105353", "0.4098338", "0.40856826", "0.40750143", "0.40749344", "0.406409", "0.4056068", "0.40487882", "0.40434843", "0.40275213", "0.40257466", "0.40242252", "0.40078256", "0.40069142", "0.3990584", "0.3986657" ]
0.7281569
0
Auto sort out : Get option
public static function getSortOut() { return self::$_options['sortOut']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getOptions() ;", "protected function getAllAvailableSortDescendingOptions() {}", "private function sortOptions()\r\n {\r\n $pageActions = array(); // For the result\r\n // Sort changes by file\r\n usort($this->changeAr, \"cmp\");\r\n\r\n foreach ($this->changeAr as $line) {\r\n $file = $line['file'];\r\n $action = $line['action'];\r\n if (array_key_exists($file, $pageActions)) {\r\n continue;\r\n }\r\n $pageActions[$file] = $action;\r\n }\r\n// print_r($pageActions);\r\n return $pageActions;\r\n }", "function _sf_get_list_of_sort_options() {\n\t\t\n\t\t$options = array('relevant', 'oldest', 'newest', 'closest');\n\t\t\n\t\t///// IF WE HAVE RATING\n\t\tif(ddp('rating') == 'on' && ddp('rating_sortby') == 'on') { $options[] = 'ratingdesc'; $options[] = 'ratingasc'; }\n\t\t\n\t\t///// WE NEED TO GO THROUGH OUR FIELDS TO SEE IF ANY OF THEM IS A VALID OPTION\n\t\t$args = array(\n\t\t\t\t\t\t\t\n\t\t\t'post_type' => 'search_field',\n\t\t\t'meta_query' => array(\n\t\t\t\n\t\t\t\tarray(\n\t\t\t\t\n\t\t\t\t\t'key' => 'enable_sort',\n\t\t\t\t\t'value' => 'on',\n\t\t\t\t\n\t\t\t\t),\n\t\t\t\t\n\t\t\t\tarray(\n\t\t\t\t\n\t\t\t\t\t'key' => 'field_type',\n\t\t\t\t\t'value' => array('range', 'min_val', 'max_val'),\n\t\t\t\t\t'compare' => 'IN',\n\t\t\t\t\n\t\t\t\t)\n\t\t\t\n\t\t\t),\n\t\t\t'posts_per_page' => -1,\n\t\t\n\t\t);\n\t\t\n\t\t$sortQ = new WP_Query($args);\n\t\t\n\t\tif($sortQ->have_posts()) {\n\t\t\t\n\t\t\tforeach($sortQ->posts as $search_field) {\n\t\t\t\t\n\t\t\t\t$options[] = $search_field->post_name.'_low';\n\t\t\t\t$options[] = $search_field->post_name.'_high';\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn $options;\n\t\t\n\t}", "function elm_admin_get_order_by_options() {\n\t$options = array(\n\t\t'asc' => __('ASC', 'elm'),\n\t\t'desc' => __('DESC', 'elm')\n\t);\n\t\n\treturn $options;\n}", "function _sf_get_list_sort_url($option) {\n\t\t\n\t\t//// RETURNS THE URL\n\t\t$url = add_query_arg(array('sort' => $option));\n\t\treturn $url;\n\t\t\n\t}", "function printSortOptions ($url) {\n print \"<p align='center'><b>Sort by:</b> \";\n foreach ($this->sort_opts as $s) {\n if ($s != $this->sort_opts[0]) {\n\t// print a separator between terms\n\tprint \" | \";\n }\n if ($s == $this->sort) {\n\tprint \"&nbsp;\" . $this->pretty_sort_opts[$s] . \"&nbsp;\";\n } else {\n\tprint \"&nbsp;<a href='$url?sort=$s'>\" . \n\t $this->pretty_sort_opts[$s] . \"</a>&nbsp;\";\n }\n }\n print \"</p>\";\n }", "protected function getAllAvailableSortOrderOptions() {}", "function ui_sortable_get_option($selector,$option){\n return jquery_support($selector,'sortable', \"'option' , '$option'\");\n}", "function getSort(){ return 301; }", "function getOptionValuesAndDescription($orderby = \"optiontext\") {\t\t\n\t\t$optionvaluesquery = \"SELECT lv.lookupvaluedescription as optiontext, lv.lookuptypevalue as optionvalue FROM lookuptype AS l , \n\t\tlookuptypevalue AS lv WHERE l.id = lv.lookuptypeid AND l.name ='\".$this->getName().\"' ORDER BY \".$orderby;\n\t\treturn getOptionValuesFromDatabaseQuery($optionvaluesquery);\n\t}", "function _sf_is_sort_by($option) {\n\t\t\n\t\t$options = _sf_get_list_of_sort_options();\n\t\t\n\t\t//// GETS GET FIRST AND MAKES SUREITS A VALID OPTION\n\t\tif(isset($_GET['sort']) && in_array($_GET['sort'], $options)) {\n\t\t\t\n\t\t\t//// IF IT'S A VALID OPTION\n\t\t\tif(in_array($option, $options)) {\n\t\t\t\t\n\t\t\t\t//// IF ITS THE CURRENT ONE\n\t\t\t\tif($_GET['sort'] == $option) {\n\t\t\t\t\t\n\t\t\t\t\treturn true;\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\treturn false;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\treturn false;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\t//// IF ITS A VALID OPTION\n\t\t\tif(in_array($option, $options)) {\n\t\t\t\t\t\n\t\t\t\t//// CHECKS AGAINST COOKIE FIRST\n\t\t\t\tif(isset($_COOKIE['sort'])) {\n\t\t\t\t\t\n\t\t\t\t\tif($_COOKIE['sort'] == $option) {\n\t\t\t\t\t\t\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\n\t\t\t\t\t\treturn false;\n\t\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\treturn false;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\treturn false;\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t}", "function getSort(){\n\treturn 281;\n}", "function getOptions();", "public function getSorting();", "public function getOpt($option) {}", "function getSort(){\n return 301;\n }", "function getSort(){\n $sort = $_GET[\"sort\"];\n if ($sort != 'on') {\n $sort = 'off';\n }\n return $sort;\n}", "public function getOptions()\n {\n return $this->where(array('is_del' => array('neq', -1)))->getField('id, name');\n }", "public function getSortValue() {}", "function getOptions()\n\t{\n\t\t\n\t\treturn $this->getAssoc(Array('id','title')/*, $cond*/);\n\t}", "function get_abook_sort() {\n global $data_dir, $username;\n\n /* get sorting order */\n if(sqgetGlobalVar('abook_sort_order', $temp, SQ_GET)) {\n $abook_sort_order = (int) $temp;\n\n if ($abook_sort_order < 0 or $abook_sort_order > 8)\n $abook_sort_order=8;\n\n setPref($data_dir, $username, 'abook_sort_order', $abook_sort_order);\n } else {\n /* get previous sorting options. default to unsorted */\n $abook_sort_order = getPref($data_dir, $username, 'abook_sort_order', 8);\n }\n\n return $abook_sort_order;\n}", "public function getSortMenu();", "function getSort(){\n return 188;\n }", "public function getOptions()\n {\n return $this->where(array('is_del' => array('neq', 1)))->getField('id, name');\n }", "function getSort() {\n return 999;\n }", "function getSort(){\n return 999;\n }", "function getSort(){\n return 999;\n }", "function getOptionValues() {\t\t\n\t\t$optionvaluesquery = \"SELECT lv.lookuptypevalue as optiontext, lv.lookuptypevalue as optionvalue FROM lookuptype AS l , \n\t\tlookuptypevalue AS lv WHERE l.id = lv.lookuptypeid AND l.name ='\".$this->getName().\"' ORDER BY optiontext \";\n\t\treturn getOptionValuesFromDatabaseQuery($optionvaluesquery);\n\t}", "public function getOptions();" ]
[ "0.6416963", "0.62562066", "0.62425476", "0.6211569", "0.6204801", "0.62027436", "0.61914593", "0.6186539", "0.6149563", "0.6095961", "0.6093745", "0.6065136", "0.605975", "0.60163313", "0.6014878", "0.60054713", "0.59631884", "0.5953354", "0.5947752", "0.59414846", "0.59390247", "0.58799726", "0.5879368", "0.5877891", "0.5869804", "0.58545995", "0.5847453", "0.5847453", "0.58421206", "0.58373386" ]
0.64855856
0
Registers the dashboard products features routes.
protected function forProductsFeatures($router) { $router->resource('features', 'Features\FeaturesController'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register_routes() {\n # GET/POST /products\n $routes[$this->base] = array(\n array( array( $this, 'get_products' ), WC_API_Server::READABLE ),\n array( array( $this, 'create_product' ), WC_API_SERVER::CREATABLE | WC_API_Server::ACCEPT_DATA ),\n );\n }", "public function register_routes() {\n\t\tparent::register_routes();\n\n\t\t// Add a route for listing variations without specifying the parent product ID.\n\t\tregister_rest_route(\n\t\t\t$this->namespace,\n\t\t\t'/variations',\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => \\WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array( $this, 'get_items' ),\n\t\t\t\t\t'permission_callback' => array( $this, 'get_items_permissions_check' ),\n\t\t\t\t\t'args' => $this->get_collection_params(),\n\t\t\t\t),\n\t\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t\t)\n\t\t);\n\t}", "function creta_product_register_route() {\n register_rest_route( 'cr/v1', 'cr-woo', array(\n 'methods' => 'GET',\n 'callback' => 'get_all_products_external',\n // 'permission_callback' => function() {\n // return current_user_can( 'edit_posts' );\n // },\n ) \n );\n\n register_rest_route( 'cr/v1', 'cr-woo/sku=(?P<sku>[a-zA-Z0-9-]+)', array(\n 'methods' => 'GET',\n 'callback' => 'get_product_by_sku_external',\n ) \n );\n\n register_rest_route( 'cr/v1', 'cr-woo/sku=(?P<sku>[a-zA-Z0-9-]+)', array(\n 'methods' => 'PUT',\n 'callback' => 'update_product_by_sku_external',\n ) \n );\n\n register_rest_route( 'cr/v1', 'cr-woo', array(\n 'methods' => 'POST',\n 'callback' => 'create_new_product_external',\n ) \n );\n\n register_rest_route( 'cr/v1', 'cr-woo/sku=(?P<sku>[a-zA-Z0-9-]+)', array(\n 'methods' => 'DELETE',\n 'callback' => 'del_product_by_sku_external',\n ) \n );\n\n /*--------route internal woocommerce */\n register_rest_route( 'cr/v1', 'cr-woo-in', array(\n 'methods' => 'GET',\n 'callback' => 'get_all_products_internal',\n // 'permission_callback' => function() {\n // return current_user_can( 'edit_posts' );\n // },\n )\n ); \n\n \n register_rest_route( 'cr/v1', 'cr-woo-in/sku=(?P<sku>[a-zA-Z0-9-]+)', array(\n 'methods' => 'GET',\n 'callback' => 'get_product_by_sku_internal',\n ) \n );\n\n register_rest_route( 'cr/v1', 'cr-woo-in/sku=(?P<sku>[a-zA-Z0-9-]+)', array(\n 'methods' => 'PUT',\n 'callback' => 'update_product_by_sku_internal',\n ) \n );\n\n register_rest_route( 'cr/v1', 'cr-woo-in', array(\n 'methods' => 'POST',\n 'callback' => 'create_new_product_internal',\n ) \n );\n\n register_rest_route( 'cr/v1', 'cr-woo-in/sku=(?P<sku>[a-zA-Z0-9-]+)', array(\n 'methods' => 'DELETE',\n 'callback' => 'del_product_by_sku_internal',\n ) \n );\n\n register_rest_route( 'cr/v1', 'cr-woo-in/sku-list', array(\n 'methods' => 'GET',\n 'callback' => 'get_sku_list_internal',\n ) \n );\n }", "function spf_register_route(){\n register_rest_route('wooapp/v1','/shop/products',Array(\n 'methods' => 'GET',\n 'callback' => 'spf_get_shop_products',\n ));\n\n register_rest_route('wooapp/v1', '/auth/register', [\n 'methods' => 'POST',\n 'callback' => 'spf_register_new_user',\n ]);\n\n register_rest_route('wooapp/v1', '/auth/login', [\n 'methods' => 'POST',\n 'callback' => 'spf_login_user',\n ]);\n}", "function add_endpoint() {\n flush_rewrite_rules();\n $whitelist_roles = array('administrator');\n $user = wp_get_current_user();\n $user_role = (array) $user->roles;\n \n if (in_array($user_role[0], $whitelist_roles)) {\n add_rewrite_endpoint( 'add-products', EP_ROOT | EP_PAGES );\n }\n }", "function registerEndpoints()\n{\n $namespace = 'travel-review-app/v1';\n\n register_rest_route(\n $namespace,\n '/destinations-default-wordpress',\n [\n 'methods' => 'GET',\n 'callback' => 'listDestinationsDefaultWordPress',\n ]\n );\n}", "public static function register_endpoints() {\n // endpoints will be registered here\n register_rest_route( Liang_API_Endpoints::$base_url, '/index', array(\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => array( 'Liang_API_Endpoints', 'get_index' ),\n ) );\n }", "public function register_routes() {\n\t\t$version = '1';\n\t\t$namespace = 'askmedesk/v' . $version;\n register_rest_route( $namespace, '/tipi-richiesta', array(\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => [$this, 'get_tipi_richiesta'],\n 'permission_callback' => [$this, 'askmedesk_permission_check']\n\t\t));\n\t\tregister_rest_route($namespace, '/creazione-richiesta', array(\n\t\t\t'methods' => WP_REST_Server::CREATABLE,\n\t\t\t'callback' => [$this, 'crea_richiesta'],\n\t\t\t'permission_callback' => [$this, 'askmedesk_permission_check'],\n\t\t\t'args' => $this->get_endpoint_args_for_item_schema( false )\n\t\t));\n\t}", "public function register_routes() {\n\t\tregister_rest_route( $this->namespace, $this->route, [\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => [$this, 'get_options']\n\t\t\t],\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => [$this, 'update_options'],\n\t\t\t\t'permission_callback' => [$this, 'update_option_permissions_check']\n\t\t\t],\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::DELETABLE,\n\t\t\t\t'callback' => [$this, 'delete_options'],\n\t\t\t\t'permission_callback' => [$this, 'delete_option_permissions_check']\n\t\t\t]\n\t\t] );\n\n\t\tregister_rest_route( $this->namespace, $this->route . '/(?P<slug>.+)', [\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => [$this, 'get_option']\n\t\t\t],\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => [$this, 'update_option'],\n\t\t\t\t'permission_callback' => [$this, 'update_option_permissions_check']\n\t\t\t],\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::DELETABLE,\n\t\t\t\t'callback' => [$this, 'delete_option'],\n\t\t\t\t'permission_callback' => [$this, 'delete_option_permissions_check']\n\t\t\t]\n\t\t] );\n\t}", "public function register_routes() {\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base, array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_shops' ),\n\t\t\t)\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P<id>.+)', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_shop' ),\n\t\t\t)\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base . '/manager', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => array( $this, 'register_shop_manager' ),\n\t\t\t)\n\t\t) );\n\t}", "public function register_routes()\n {\n\n $namespace = 'api/v1';\n $base = 'categories';\n\n register_rest_route($namespace, '/' . $base, array(\n array(\n 'methods' => WP_REST_Server::CREATABLE,\n 'callback' => array($this, 'create_item'),\n 'permission_callback' => array($this, 'create_item_permissions_check'),\n 'args' => $this->get_endpoint_args_for_item_schema(true),\n ),\n ));\n\n register_rest_route($namespace, '/' . $base . '/(?P<id>\\d+)', array(\n array(\n 'methods' => WP_REST_Server::EDITABLE,\n 'callback' => array($this, 'update_item'),\n 'permission_callback' => array($this, 'create_item_permissions_check'),\n 'args' => $this->get_endpoint_args_for_item_schema(true),\n ),\n ));\n }", "public function register()\n {\n Route::group([\n 'namespace' => 'WooCommerce\\ProductAttributeGroup\\Controllers'\n ], function () {\n require themosis_path('plugin.woocommerce-product-attribute-group.resources').'routes.php';\n });\n }", "protected function registerRoutes()\n {\n if (!$this->app['config']->get('laratrust.panel.register')) {\n return;\n }\n\n Route::group([\n 'prefix' => config('laratrust.panel.path'),\n 'namespace' => 'Laratrust\\Http\\Controllers',\n 'middleware' => config('laratrust.panel.middleware', 'web'),\n ], function () {\n Route::redirect('/', '/'. config('laratrust.panel.path'). '/roles-assignment');\n $this->loadRoutesFrom(__DIR__.'/../routes/web.php');\n });\n }", "function register_endpoints(){\n\t$route_base = 'wc/v1';\n\n\tregister_rest_route($route_base, '/posts', array(\n\t\t'methods' => 'GET',\n\t\t'callback' => 'api_get_posts',\n\t\t'permission_callback' => 'helper_authentication_check'\n\t));\n\n\tregister_rest_route($route_base, '/posts/(?P<post_id>\\d+)', array(\n\t\t'methods' => 'GET',\n\t\t'callback' => 'api_get_post',\n\t\t'permission_callback' => 'helper_authentication_check'\n\t));\n}", "function register_api_routes() {\n\tregister_rest_route( Altis\\API_NAMESPACE, '/telemetry', [\n\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t'permission_callback' => function () {\n\t\t\treturn is_user_logged_in();\n\t\t},\n\t\t'callback' => __NAMESPACE__ . '\\\\handle_telemetry_endpoint',\n\t\t'args' => [\n\t\t\t'opt_in' => [\n\t\t\t\t'type' => 'boolean',\n\t\t\t\t'default' => false,\n\t\t\t],\n\t\t],\n\t] );\n}", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }" ]
[ "0.7028157", "0.6476098", "0.64552987", "0.61809456", "0.6167883", "0.6129079", "0.60283643", "0.60172445", "0.6011936", "0.5960789", "0.5930411", "0.59294385", "0.5891678", "0.58700365", "0.58667773", "0.58648723", "0.586421", "0.586421", "0.586421", "0.586421", "0.586421", "0.586421", "0.586421", "0.586421", "0.586421", "0.586421", "0.586421", "0.586421", "0.586421", "0.586421" ]
0.6541153
1